From 08a4c142465134619369e000dd225efb187d558b Mon Sep 17 00:00:00 2001 From: Sourabh Gandhi Date: Mon, 1 Apr 2024 07:59:51 +0000 Subject: [PATCH 1/4] upgrade the facebook sdk version --- CHANGELOG.md | 3 +++ setup.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2fe6d8..dfbab1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.20.2 + * Bump facebook_business SDK to v19.0.2 [#238](https://github.com/singer-io/tap-facebook/pull/239) + ## 1.20.1 * Bump facebook_business SDK to v19.0.0 [#238](https://github.com/singer-io/tap-facebook/pull/238) diff --git a/setup.py b/setup.py index 29e9706..685255c 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup(name='tap-facebook', - version='1.20.1', + version='1.20.2', description='Singer.io tap for extracting data from the Facebook Ads API', author='Stitch', url='https://singer.io', @@ -13,7 +13,7 @@ 'attrs==17.3.0', 'backoff==2.2.1', 'pendulum==1.2.0', - 'facebook_business==19.0.0', + 'facebook_business==19.0.2', 'requests==2.20.0', 'singer-python==6.0.0', ], From 6fc1b04ca0d555fd8082e2ca5c721e0a400b74bf Mon Sep 17 00:00:00 2001 From: Sourabh Gandhi Date: Fri, 5 Apr 2024 07:36:47 +0000 Subject: [PATCH 2/4] place the facebook_business sdk locally and add retry for the summary param error --- setup.py | 1 - tap_facebook/__init__.py | 3 + tap_facebook/facebook_business/__init__.py | 15 + .../facebook_business/adobjects/__init__.py | 0 .../adobjects/abstractcrudobject.py | 639 ++ .../adobjects/abstractobject.py | 160 + .../facebook_business/adobjects/ad.py | 753 +++ .../facebook_business/adobjects/adaccount.py | 4221 +++++++++++++ .../adobjects/adaccountadruleshistory.py | 77 + .../adobjects/adaccountadvolume.py | 185 + .../adobjects/adaccountbusinessconstraints.py | 56 + .../adobjects/adaccountdefaultdestination.py | 39 + .../adobjects/adaccountdefaultobjective.py | 87 + .../adobjects/adaccountdeliveryestimate.py | 77 + .../adobjects/adaccountdsarecommendations.py | 37 + .../adaccountiosfourteencampaignlimits.py | 41 + ...ccountmatchedsearchapplicationsedgedata.py | 80 + .../adobjects/adaccountmaxbid.py | 37 + .../adobjects/adaccountpromotableobjects.py | 41 + .../adobjects/adaccountreachestimate.py | 41 + .../adaccountrecommendedcamapaignbudget.py | 41 + .../adobjects/adaccountsubscribedapps.py | 52 + .../adobjects/adaccounttargetingunified.py | 567 ++ .../adobjects/adaccounttrackingdata.py | 37 + .../adobjects/adaccountuser.py | 51 + .../facebook_business/adobjects/adactivity.py | 165 + .../adobjects/adassetbody.py | 44 + .../adobjects/adassetcalltoactiontype.py | 42 + ...assetcustomizationrulecustomizationspec.py | 60 + .../adobjects/adassetdescription.py | 44 + .../adobjects/adassetfeedadditionaldata.py | 47 + .../adobjects/adassetfeedspec.py | 158 + .../adassetfeedspecassetcustomizationrule.py | 61 + .../adobjects/adassetfeedspecassetlabel.py | 42 + .../adobjects/adassetfeedspecbody.py | 41 + .../adobjects/adassetfeedspeccalltoaction.py | 41 + .../adobjects/adassetfeedspeccaption.py | 41 + .../adobjects/adassetfeedspeccarousel.py | 43 + .../adassetfeedspeccarouselchildattachment.py | 55 + .../adobjects/adassetfeedspecdescription.py | 41 + .../adobjects/adassetfeedspecevents.py | 40 + .../adobjects/adassetfeedspecgrouprule.py | 49 + .../adobjects/adassetfeedspecimage.py | 45 + .../adobjects/adassetfeedspeclinkurl.py | 47 + .../adobjects/adassetfeedspectitle.py | 41 + .../adobjects/adassetfeedspecvideo.py | 47 + .../adobjects/adassetimage.py | 52 + .../adobjects/adassetlinkurl.py | 56 + .../adobjects/adassetmessageextensions.py | 37 + .../adobjects/adassetonsitedestinations.py | 43 + .../adobjects/adassettargetruletargeting.py | 56 + .../adobjects/adassettitle.py | 44 + .../adobjects/adassetvideo.py | 60 + .../adobjects/adasyncrequest.py | 132 + .../adobjects/adasyncrequestset.py | 214 + .../adasyncrequestsetnotificationresult.py | 39 + .../adobjects/adbidadjustments.py | 41 + .../adobjects/adcampaignbidconstraint.py | 37 + .../adobjects/adcampaigndeliveryestimate.py | 77 + ...campaigndeliverystatsunsupportedreasons.py | 39 + .../adcampaignfrequencycontrolspecs.py | 41 + .../adobjects/adcampaignissuesinfo.py | 45 + .../adobjects/adcampaignlearningstageinfo.py | 43 + .../adobjects/adcampaignoptimizationevent.py | 41 + .../adobjects/adcampaignpacedbidinfo.py | 37 + .../facebook_business/adobjects/adcreative.py | 541 ++ .../adobjects/adcreativeaddisclaimer.py | 41 + .../adobjects/adcreativebrandedcontentads.py | 49 + .../adcreativebrandedcontentadspartners.py | 43 + .../adcreativecollectionthumbnailinfo.py | 41 + .../adcreativedegreesoffreedomspec.py | 51 + .../adcreativefacebookbrandedcontent.py | 41 + .../adobjects/adcreativefeaturedetails.py | 37 + .../adobjects/adcreativefeaturesspec.py | 89 + .../adobjects/adcreativeinsights.py | 37 + .../adcreativeinstagrambrandedcontent.py | 37 + .../adcreativeinteractivecomponentsspec.py | 39 + .../adobjects/adcreativelinkdata.py | 111 + .../adcreativelinkdataapplinkspec.py | 43 + .../adcreativelinkdatacalltoaction.py | 118 + .../adcreativelinkdatacalltoactionvalue.py | 57 + .../adcreativelinkdatachildattachment.py | 57 + .../adcreativelinkdataimagelayerspec.py | 113 + .../adcreativelinkdataimageoverlayspec.py | 114 + .../adcreativelinkdatasponsorshipinfospec.py | 39 + .../adcreativelinkdatatemplatevideospec.py | 41 + .../adobjects/adcreativeobjectstoryspec.py | 49 + .../adcreativeomnichannellinkspec.py | 39 + .../adobjects/adcreativephotodata.py | 47 + .../adcreativephotodatamediaelements.py | 43 + .../adobjects/adcreativeplacedata.py | 47 + .../adcreativeplatformcustomization.py | 37 + .../adcreativeportraitcustomizations.py | 39 + .../adcreativepostclickconfiguration.py | 39 + .../adcreativepromotionmetadataspec.py | 52 + .../adcreativerecommendersettings.py | 39 + .../adobjects/adcreativesitelinksspec.py | 39 + .../adobjects/adcreativesourcingspec.py | 41 + .../adobjects/adcreativestaticfallbackspec.py | 47 + .../adobjects/adcreativetemplateurlspec.py | 49 + .../adobjects/adcreativetextdata.py | 37 + .../adobjects/adcreativevideodata.py | 69 + .../adobjects/adcustomizationrulespec.py | 55 + .../adobjects/addynamiccreative.py | 37 + .../adobjects/adentitytargetspend.py | 45 + .../adobjects/adgroupissuesinfo.py | 45 + .../adobjects/adgroupmetadata.py | 45 + .../adgroupplacementspecificreviewfeedback.py | 109 + .../adobjects/adgroupreviewfeedback.py | 39 + .../facebook_business/adobjects/adimage.py | 126 + .../facebook_business/adobjects/adkeywords.py | 43 + .../facebook_business/adobjects/adlabel.py | 273 + .../adobjects/admonetizationproperty.py | 194 + .../adnetworkanalyticsasyncqueryresult.py | 47 + .../adnetworkanalyticssyncqueryresult.py | 104 + .../adobjects/adplacement.py | 86 + .../adobjects/adplacepageset.py | 103 + .../adobjects/adplacepagesetmetadata.py | 43 + .../facebook_business/adobjects/adpreview.py | 118 + .../adobjects/adpromotedobject.py | 117 + .../adobjects/adrecommendation.py | 61 + .../adobjects/adrecommendationdata.py | 37 + .../adobjects/adreportrun.py | 182 + .../facebook_business/adobjects/adrule.py | 300 + .../adobjects/adruleevaluationspec.py | 81 + .../adobjects/adruleexecutionoptions.py | 46 + .../adobjects/adruleexecutionspec.py | 95 + .../adobjects/adrulefilters.py | 57 + .../adobjects/adrulehistory.py | 70 + .../adobjects/adrulehistoryresult.py | 47 + .../adobjects/adrulehistoryresultaction.py | 43 + .../adobjects/adruleschedule.py | 41 + .../adobjects/adruleschedulespec.py | 39 + .../adobjects/adruletrigger.py | 67 + .../adobjects/adsactionstats.py | 107 + .../facebook_business/adobjects/adset.py | 1103 ++++ .../adobjects/adshistogramstats.py | 107 + .../adobjects/adsimagecrops.py | 49 + .../adobjects/adsinsights.py | 449 ++ .../adsoptimaldeliverygrowthopportunity.py | 41 + .../facebook_business/adobjects/adspixel.py | 748 +++ .../adobjects/adspixelstats.py | 43 + .../adobjects/adspixelstatsresult.py | 65 + .../facebook_business/adobjects/adstudy.py | 363 ++ .../adobjects/adstudycell.py | 229 + .../adobjects/adstudyobjective.py | 360 ++ .../adobjects/adstudyobjectiveid.py | 44 + .../adstudyobjectiveoffsitedatasets.py | 42 + .../facebook_business/adobjects/advideo.py | 1354 +++++ .../adobjects/agencyclientdeclaration.py | 59 + .../facebook_business/adobjects/agerange.py | 39 + .../facebook_business/adobjects/album.py | 410 ++ .../adobjects/analyticssegment.py | 105 + .../adobjects/androidapplink.py | 43 + .../adobjects/application.py | 2315 ++++++++ .../facebook_business/adobjects/apprequest.py | 117 + .../adobjects/apprequestformerrecipient.py | 42 + .../adobjects/assigneduser.py | 46 + .../adobjects/asyncrequest.py | 59 + .../adobjects/asyncsession.py | 98 + .../adobjects/attributionspec.py | 39 + .../adobjects/audiencepermissionforactions.py | 45 + .../adobjects/audiocopyright.py | 124 + .../adobjects/automotivemodel.py | 234 + .../facebook_business/adobjects/avatar.py | 107 + .../adobjects/avatarprofilepicture.py | 72 + .../brandedcontentshadowigmediaid.py | 46 + .../adobjects/brandedcontentshadowiguserid.py | 40 + .../adobjects/brandrequest.py | 110 + .../adobjects/brandsafetyblocklistusage.py | 45 + .../adobjects/broadtargetingcategories.py | 67 + .../facebook_business/adobjects/business.py | 3981 +++++++++++++ .../adobjects/businessadaccountrequest.py | 42 + .../adobjects/businessapplicationrequest.py | 42 + .../adobjects/businessassetgroup.py | 1003 ++++ .../businessassetsharingagreement.py | 121 + .../adobjects/businesscreativefolder.py | 96 + .../adobjects/businessimage.py | 132 + .../businessmanagedpartnereligibility.py | 41 + .../businessownedobjectonbehalfofrequest.py | 88 + .../adobjects/businesspagerequest.py | 42 + .../businesspartnerpremiumoptions.py | 41 + .../adobjects/businessrolerequest.py | 176 + .../adobjects/businessuser.py | 319 + .../adobjects/businessvideo.py | 78 + .../facebook_business/adobjects/campaign.py | 1058 ++++ .../campaigngroupbrandconfiguration.py | 41 + ...ampaigngroupcollaborativeadspartnerinfo.py | 36 + .../facebook_business/adobjects/canvas.py | 222 + .../adobjects/canvasadsettings.py | 49 + .../adobjects/canvasbodyelement.py | 37 + .../adobjects/canvascollectionthumbnail.py | 41 + .../adobjects/canvasdynamicsetting.py | 74 + .../adobjects/canvaspreview.py | 37 + .../adobjects/catalogbasedtargeting.py | 37 + .../adobjects/catalogitemappealstatus.py | 51 + .../adobjects/catalogitemapplinks.py | 51 + .../catalogitemchannelstointegritystatus.py | 39 + .../catalogsegmentallmatchcountlaser.py | 47 + .../adobjects/catalogsubverticallist.py | 141 + .../facebook_business/adobjects/chatplugin.py | 59 + .../adobjects/checkbatchrequeststatus.py | 55 + .../facebook_business/adobjects/childevent.py | 46 + .../adobjects/clicktrackingtag.py | 33 + .../facebook_business/adobjects/cloudgame.py | 86 + .../collaborativeadspartnerinfolistitem.py | 36 + .../collaborativeadssharesettings.py | 80 + .../facebook_business/adobjects/comment.py | 419 ++ .../adobjects/commercemerchantsettings.py | 612 ++ .../commercemerchantsettingssetupstatus.py | 47 + .../adobjects/commerceorder.py | 620 ++ .../commerceordertransactiondetail.py | 116 + .../adobjects/commercepayout.py | 45 + .../adobjects/commercesettings.py | 39 + .../adobjects/connectionstargeting.py | 42 + .../contentpublishinglimitresponse.py | 39 + .../adobjects/contextualbundlingspec.py | 37 + .../adobjects/conversionactionquery.py | 87 + .../adobjects/copyrightreferencecontainer.py | 62 + .../facebook_business/adobjects/coverphoto.py | 48 + ...cpasadvertiserpartnershiprecommendation.py | 86 + .../adobjects/cpasbusinesssetupconfig.py | 121 + .../adobjects/cpascollaborationrequest.py | 104 + .../adobjects/cpasmerchantconfig.py | 82 + .../adobjects/creativehistory.py | 39 + .../facebook_business/adobjects/creditcard.py | 110 + .../adobjects/creditpartitionactionoptions.py | 41 + .../facebook_business/adobjects/crmaddress.py | 96 + .../ctxpartnerappwelcomemessageflow.py | 82 + .../facebook_business/adobjects/currency.py | 43 + .../adobjects/currencyamount.py | 43 + .../adobjects/customaudience.py | 703 +++ .../adobjects/customaudienceadaccount.py | 40 + .../adobjects/customaudiencedatasource.py | 116 + .../adobjects/customaudiencegroup.py | 41 + .../adobjects/customaudiencesalts.py | 39 + .../adobjects/customaudiencesession.py | 51 + .../customaudiencesharedaccountinfo.py | 45 + .../adobjects/customaudiencesharingstatus.py | 39 + .../adobjects/customaudiencestatus.py | 39 + .../adobjects/customaudiencestos.py | 44 + .../adobjects/customconversion.py | 243 + .../adobjects/customconversionstatsresult.py | 52 + .../adobjects/customusersettings.py | 39 + .../facebook_business/adobjects/dacheck.py | 54 + .../facebook_business/adobjects/dataset.py | 40 + .../facebook_business/adobjects/daypart.py | 43 + .../adobjects/deliverycheck.py | 43 + .../adobjects/deliverycheckextrainfo.py | 41 + .../adobjects/deliverywindow.py | 542 ++ .../adobjects/destination.py | 208 + .../adobjects/dynamicpostchildattachment.py | 47 + .../adobjects/dynamicpriceconfigbydate.py | 76 + .../adobjects/dynamicvideometadata.py | 76 + .../facebook_business/adobjects/engagement.py | 49 + .../adobjects/entityattextrange.py | 58 + .../facebook_business/adobjects/event.py | 528 ++ .../adobjects/eventsourcegroup.py | 182 + .../facebook_business/adobjects/experience.py | 48 + .../adobjects/extendedcredit.py | 273 + .../extendedcreditallocationconfig.py | 166 + .../adobjects/extendedcreditinvoicegroup.py | 242 + .../adobjects/externaleventsource.py | 49 + .../adobjects/fameexportconfig.py | 43 + .../adobjects/flexibletargeting.py | 91 + .../facebook_business/adobjects/flight.py | 251 + .../adobjects/fundingsourcedetails.py | 48 + .../adobjects/fundingsourcedetailscoupon.py | 45 + .../adobjects/fundraiserpersontocharity.py | 280 + .../facebook_business/adobjects/group.py | 1175 ++++ .../adobjects/hasleadaccess.py | 53 + .../adobjects/helpers/__init__.py | 0 .../adobjects/helpers/adaccountmixin.py | 69 + .../adobjects/helpers/adaccountusermixin.py | 48 + .../adobjects/helpers/adimagemixin.py | 146 + .../adobjects/helpers/adpreviewmixin.py | 10 + .../adobjects/helpers/adreportrunmixin.py | 21 + .../adobjects/helpers/adsinsightsmixin.py | 28 + .../adobjects/helpers/businessmixin.py | 18 + .../adobjects/helpers/customaudiencemixin.py | 257 + .../adobjects/helpers/productcatalogmixin.py | 128 + .../helpers/reachfrequencypredictionmixin.py | 44 + .../adobjects/highdemandperiod.py | 154 + ...demandperiodtimesuggestionweeklysegment.py | 43 + .../adobjects/homelisting.py | 350 ++ .../facebook_business/adobjects/hotel.py | 335 ++ .../facebook_business/adobjects/hotelroom.py | 121 + .../facebook_business/adobjects/idname.py | 42 + .../adobjects/igbcadspermission.py | 74 + .../facebook_business/adobjects/igcomment.py | 210 + .../adobjects/igcommentfromuser.py | 42 + .../facebook_business/adobjects/igmedia.py | 461 ++ .../adobjects/igshoppingproductappeal.py | 45 + .../adobjects/igshoppingreviewstatus.py | 41 + ...igshoppingreviewstatusonsiteeligibility.py | 39 + ...oppingreviewstatusreasonwithhelpmessage.py | 41 + .../facebook_business/adobjects/iguser.py | 833 +++ ...igvideocopyrightcheckmatchesinformation.py | 39 + .../adobjects/igvideocopyrightcheckstatus.py | 39 + .../adobjects/imagecopyright.py | 391 ++ .../adobjects/insightsresult.py | 84 + .../adobjects/insightsvalue.py | 55 + .../adobjects/instagramcarousel.py | 152 + .../adobjects/instagramcomment.py | 209 + .../adobjects/instagraminsightsresult.py | 108 + .../adobjects/instagraminsightsvalue.py | 39 + .../adobjects/instagrammedia.py | 162 + .../instagramshoppingmerchantreviewmessage.py | 39 + .../adobjects/instagramuser.py | 246 + .../adobjects/instagramvideometadata.py | 41 + .../facebook_business/adobjects/iosapplink.py | 41 + .../facebook_business/adobjects/jobopening.py | 148 + .../facebook_business/adobjects/keyvalue.py | 39 + .../facebook_business/adobjects/lead.py | 141 + .../leadgenappointmentbookinginfo.py | 41 + .../adobjects/leadgenappointmentslotsbyday.py | 39 + .../adobjects/leadgenappointmenttimeslot.py | 39 + ...leadgenconditionalquestionsgroupchoices.py | 41 + ...adgenconditionalquestionsgroupquestions.py | 41 + .../adobjects/leadgencontextcard.py | 50 + .../adobjects/leadgencustomdisclaimer.py | 41 + .../adobjects/leadgencustomdisclaimerbody.py | 39 + .../adobjects/leadgendraftquestion.py | 51 + .../adobjects/leadgenform.py | 288 + .../adobjects/leadgenlegalcontent.py | 44 + .../adobjects/leadgenlegalcontentcheckbox.py | 48 + .../leadgenpostsubmissioncheckresult.py | 41 + .../adobjects/leadgenprivacypolicy.py | 39 + .../adobjects/leadgenquestion.py | 56 + .../adobjects/leadgenquestionoption.py | 39 + .../adobjects/leadgenthankyoupage.py | 60 + .../adobjects/leadgenurlentityatranges.py | 41 + .../facebook_business/adobjects/lifeevent.py | 115 + .../facebook_business/adobjects/link.py | 168 + .../facebook_business/adobjects/livevideo.py | 577 ++ .../adobjects/livevideoadbreakconfig.py | 55 + .../adobjects/livevideoerror.py | 78 + .../adobjects/livevideoinputstream.py | 85 + .../livevideorecommendedencodersettings.py | 41 + .../adobjects/livevideotargeting.py | 43 + .../adobjects/localservicebusiness.py | 212 + .../facebook_business/adobjects/location.py | 61 + .../adobjects/lookalikespec.py | 59 + .../adobjects/mailingaddress.py | 84 + .../adobjects/managedpartnerbusiness.py | 49 + .../adobjects/managedpartnerextendedcredit.py | 44 + .../adobjects/mediafingerprint.py | 124 + .../facebook_business/adobjects/mediatitle.py | 295 + .../adobjects/messagingfeaturereview.py | 39 + .../adobjects/messagingfeaturestatus.py | 41 + .../messengeradspartialautomatedsteplist.py | 112 + .../adobjects/messengerprofile.py | 55 + .../adobjects/minimumbudget.py | 50 + .../adobjects/musicvideocopyright.py | 96 + .../facebook_business/adobjects/nullnode.py | 36 + .../adobjects/objectparser.py | 103 + .../adobjects/offlineconversiondataset.py | 665 +++ .../offlineconversiondatasetpermissions.py | 43 + .../offlineconversiondatasetupload.py | 171 + .../offlineconversiondatasetusage.py | 37 + .../adobjects/offsitepixel.py | 86 + .../adobjects/omegacustomertrx.py | 143 + .../adobjects/openbridgeconfiguration.py | 163 + .../adobjects/opengraphcontext.py | 70 + .../adobjects/outcomepredictionpoint.py | 43 + .../facebook_business/adobjects/page.py | 5273 +++++++++++++++++ .../adobjects/pageaboutstorycomposedblock.py | 45 + ...pageaboutstorycomposedblockentityranges.py | 41 + .../pageaboutstorycomposedblockinlinestyle.py | 41 + .../adobjects/pagecalltoaction.py | 265 + .../adobjects/pagecategory.py | 46 + .../adobjects/pagechangeproposal.py | 50 + .../adobjects/pagecommerceeligibility.py | 39 + .../adobjects/pageparking.py | 41 + .../adobjects/pagepaymentoptions.py | 45 + .../facebook_business/adobjects/pagepost.py | 703 +++ .../adobjects/pagepostexperiment.py | 174 + .../adobjects/pagerestaurantservices.py | 55 + .../adobjects/pagerestaurantspecialties.py | 45 + .../adobjects/pagesavedfilter.py | 82 + .../adobjects/pagesettings.py | 39 + .../adobjects/pagestartinfo.py | 39 + .../adobjects/pagethreadowner.py | 37 + .../adobjects/pageupcomingchange.py | 80 + .../adobjects/pageusermessagethreadlabel.py | 164 + .../adobjects/partnerstudy.py | 104 + .../adobjects/paymentenginepayment.py | 180 + .../adobjects/paymentpricepoints.py | 37 + .../adobjects/paymentsubscription.py | 116 + .../facebook_business/adobjects/permission.py | 45 + .../facebook_business/adobjects/persona.py | 104 + .../facebook_business/adobjects/photo.py | 397 ++ .../facebook_business/adobjects/place.py | 76 + .../facebook_business/adobjects/placetopic.py | 91 + .../adobjects/platformimagesource.py | 41 + .../adobjects/playablecontent.py | 94 + .../facebook_business/adobjects/post.py | 719 +++ .../facebook_business/adobjects/privacy.py | 47 + .../adobjects/privateliftstudyinstance.py | 132 + .../adobjects/productcatalog.py | 1982 +++++++ .../adobjects/productcatalogcategory.py | 70 + .../adobjects/productcatalogdatasource.py | 54 + .../productcatalogdiagnosticgroup.py | 127 + .../productcataloghotelroomsbatch.py | 43 + .../adobjects/productcatalogimagesettings.py | 39 + .../productcatalogimagesettingsoperation.py | 37 + .../productcatalogpricingvariablesbatch.py | 43 + .../productcatalogproductsetsbatch.py | 43 + .../adobjects/producteventstat.py | 85 + .../adobjects/productfeed.py | 814 +++ .../productfeedmissingfeeditemreplacement.py | 41 + .../adobjects/productfeedrule.py | 145 + .../adobjects/productfeedrulesuggestion.py | 41 + .../adobjects/productfeedschedule.py | 95 + .../adobjects/productfeedupload.py | 170 + .../adobjects/productfeeduploaderror.py | 166 + .../adobjects/productfeeduploaderrorreport.py | 39 + .../adobjects/productfeeduploaderrorsample.py | 74 + .../adobjects/productgroup.py | 286 + .../adobjects/productimage.py | 76 + .../adobjects/productitem.py | 1187 ++++ .../adobjects/productitemcommerceinsights.py | 41 + .../adobjects/productitemerror.py | 43 + .../adobjects/productitemimporteraddress.py | 47 + .../adobjects/productitemlocalinfo.py | 86 + .../productitemlocalinfolatlongshape.py | 39 + .../facebook_business/adobjects/productset.py | 470 ++ .../adobjects/productsetmetadata.py | 43 + .../adobjects/productvariant.py | 41 + .../facebook_business/adobjects/profile.py | 149 + .../adobjects/profilepicturesource.py | 59 + .../adobjects/publisherblocklist.py | 224 + .../adobjects/rawcustomaudience.py | 42 + .../adobjects/reachfrequencyactivity.py | 47 + .../adobjects/reachfrequencyadformat.py | 39 + ...reachfrequencycurvelowerconfidencerange.py | 47 + ...reachfrequencycurveupperconfidencerange.py | 47 + .../adobjects/reachfrequencydaypart.py | 41 + .../adobjects/reachfrequencyestimatescurve.py | 51 + ...achfrequencyestimatesplacementbreakdown.py | 67 + .../adobjects/reachfrequencyprediction.py | 323 + .../adobjects/reachfrequencyspec.py | 51 + .../adobjects/recommendation.py | 51 + .../adobjects/revsharepolicy.py | 39 + .../adobjects/richmediaelement.py | 41 + .../adobjects/rtbdynamicpost.py | 159 + .../adobjects/savedaudience.py | 100 + .../adobjects/savedmessageresponse.py | 80 + .../adobjects/securitysettings.py | 36 + .../adobjects/serverside/__init__.py | 19 + .../adobjects/serverside/action_source.py | 71 + .../adobjects/serverside/app_data.py | 253 + .../adobjects/serverside/batch_processor.py | 69 + .../adobjects/serverside/content.py | 268 + .../adobjects/serverside/custom_data.py | 556 ++ .../adobjects/serverside/delivery_category.py | 39 + .../adobjects/serverside/event.py | 517 ++ .../adobjects/serverside/event_request.py | 363 ++ .../serverside/event_request_async.py | 114 + .../adobjects/serverside/event_response.py | 154 + .../serverside/extended_device_info.py | 323 + .../adobjects/serverside/gender.py | 26 + .../adobjects/serverside/http_method.py | 25 + .../serverside/http_service_interface.py | 26 + .../adobjects/serverside/messaging_channel.py | 32 + .../adobjects/serverside/normalize.py | 203 + .../adobjects/serverside/request_options.py | 30 + .../adobjects/serverside/user_data.py | 1209 ++++ .../adobjects/serverside/util.py | 49 + .../adobjects/shadowighashtag.py | 136 + .../adobjects/shadowigmediabuilder.py | 76 + .../adobjects/shadowigmediacollaborators.py | 44 + .../adobjects/shadowigmediaproducttags.py | 57 + .../shadowigusercatalogproductsearch.py | 51 + .../shadowigusercatalogproductvariant.py | 39 + .../facebook_business/adobjects/shop.py | 82 + .../adobjects/splittestwinner.py | 41 + .../adobjects/storecatalogsettings.py | 112 + .../facebook_business/adobjects/stories.py | 52 + .../facebook_business/adobjects/systemuser.py | 238 + .../facebook_business/adobjects/tab.py | 58 + .../facebook_business/adobjects/targeting.py | 229 + .../adobjects/targetingautomation.py | 41 + .../adobjects/targetingdynamicrule.py | 51 + .../adobjects/targetinggeolocation.py | 75 + .../adobjects/targetinggeolocationcity.py | 49 + .../targetinggeolocationcustomlocation.py | 63 + .../targetinggeolocationelectoraldistrict.py | 45 + .../targetinggeolocationgeoentities.py | 45 + .../targetinggeolocationlocationcluster.py | 37 + .../targetinggeolocationlocationexpansion.py | 37 + .../adobjects/targetinggeolocationmarket.py | 43 + .../adobjects/targetinggeolocationplace.py | 53 + .../targetinggeolocationpoliticaldistrict.py | 43 + .../adobjects/targetinggeolocationregion.py | 41 + .../adobjects/targetinggeolocationzip.py | 45 + .../adobjects/targetingproductaudiencespec.py | 41 + .../targetingproductaudiencesubspec.py | 39 + .../adobjects/targetingprospectingaudience.py | 37 + .../adobjects/targetingrelaxation.py | 39 + .../adobjects/targetingsearch.py | 85 + .../adobjects/targetingsentenceline.py | 49 + .../adobjects/textwithentities.py | 37 + .../trackingandconversionwithdefaults.py | 43 + .../adobjects/unifiedthread.py | 142 + .../facebook_business/adobjects/url.py | 120 + .../facebook_business/adobjects/user.py | 2237 +++++++ .../adobjects/useravailablecatalogs.py | 43 + .../adobjects/usercoverphoto.py | 41 + .../facebook_business/adobjects/userdevice.py | 39 + .../adobjects/useridforapp.py | 42 + .../adobjects/useridforpage.py | 42 + .../userleadgendisclaimerresponse.py | 39 + .../adobjects/userleadgenfielddata.py | 39 + .../userpageonetimeoptintokensettings.py | 90 + .../adobjects/userpaymentmobilepricepoints.py | 43 + .../adobjects/valuebasedeligiblesource.py | 44 + .../facebook_business/adobjects/vehicle.py | 435 ++ .../adobjects/vehicleoffer.py | 264 + .../adobjects/videocopyright.py | 185 + .../adobjects/videocopyrightcheckstatus.py | 39 + .../adobjects/videocopyrightconditiongroup.py | 41 + .../adobjects/videocopyrightgeogate.py | 39 + .../adobjects/videocopyrightrule.py | 88 + .../adobjects/videocopyrightsegment.py | 41 + .../facebook_business/adobjects/videolist.py | 117 + .../facebook_business/adobjects/videopoll.py | 162 + .../adobjects/videostatus.py | 47 + .../adobjects/videostatuserror.py | 39 + .../adobjects/videostatusprocessingphase.py | 39 + .../adobjects/videostatuspublishingphase.py | 43 + .../adobjects/videostatusuploadingphase.py | 43 + .../adobjects/videothumbnail.py | 57 + .../adobjects/videouploadlimits.py | 39 + .../facebook_business/adobjects/voipinfo.py | 49 + .../facebook_business/adobjects/webapplink.py | 39 + .../adobjects/whatsappbusinessaccount.py | 1095 ++++ .../adobjects/whatsappbusinesshealthstatus.py | 48 + ...tsappbusinesshealthstatusformessagesend.py | 39 + ...nesspartnerclientverificationsubmission.py | 52 + .../whatsappbusinesspreverifiedphonenumber.py | 214 + .../adobjects/whatsappbusinessprofile.py | 104 + .../adobjects/windowsapplink.py | 43 + .../adobjects/windowsphoneapplink.py | 41 + .../woodhengepurchasedpaygreceipt.py | 76 + .../adobjects/workuserfrontline.py | 39 + tap_facebook/facebook_business/api.py | 921 +++ tap_facebook/facebook_business/apiconfig.py | 11 + tap_facebook/facebook_business/bootstrap.py | 92 + .../facebook_business/crashreporter.py | 122 + tap_facebook/facebook_business/exceptions.py | 153 + tap_facebook/facebook_business/exit_codes.py | 12 + .../facebook_business/fb_ca_chain_bundle.crt | 3188 ++++++++++ tap_facebook/facebook_business/mixins.py | 202 + tap_facebook/facebook_business/session.py | 72 + tap_facebook/facebook_business/specs.py | 65 + .../facebook_business/test/__init__.py | 1 + tap_facebook/facebook_business/test/docs.py | 702 +++ .../facebook_business/test/docs_utils.py | 273 + .../facebook_business/test/integration_ad.py | 286 + .../test/integration_adaccount.py | 385 ++ .../test/integration_adcreative.py | 225 + .../test/integration_adset.py | 205 + .../test/integration_campaign.py | 232 + .../test/integration_constant.py | 288 + .../test/integration_test_runner.py | 68 + .../test/integration_utils.py | 56 + .../facebook_business/test/other_docs.py | 75 + tap_facebook/facebook_business/test/unit.py | 465 ++ tap_facebook/facebook_business/typechecker.py | 205 + .../facebook_business/utils/__init__.py | 0 .../facebook_business/utils/api_utils.py | 16 + tap_facebook/facebook_business/utils/urls.py | 31 + .../facebook_business/utils/version.py | 30 + .../facebook_business/video_uploader.py | 397 ++ 575 files changed, 92334 insertions(+), 1 deletion(-) create mode 100644 tap_facebook/facebook_business/__init__.py create mode 100644 tap_facebook/facebook_business/adobjects/__init__.py create mode 100644 tap_facebook/facebook_business/adobjects/abstractcrudobject.py create mode 100644 tap_facebook/facebook_business/adobjects/abstractobject.py create mode 100644 tap_facebook/facebook_business/adobjects/ad.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccount.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountadruleshistory.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountadvolume.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountbusinessconstraints.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountdefaultdestination.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountdefaultobjective.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountdeliveryestimate.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountdsarecommendations.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountmaxbid.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountpromotableobjects.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountreachestimate.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountsubscribedapps.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccounttargetingunified.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccounttrackingdata.py create mode 100644 tap_facebook/facebook_business/adobjects/adaccountuser.py create mode 100644 tap_facebook/facebook_business/adobjects/adactivity.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetbody.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetcalltoactiontype.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetdescription.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedadditionaldata.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecassetlabel.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecbody.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeccalltoaction.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeccaption.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeccarousel.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecdescription.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecevents.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecgrouprule.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecimage.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeclinkurl.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspectitle.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecvideo.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetimage.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetlinkurl.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetmessageextensions.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetonsitedestinations.py create mode 100644 tap_facebook/facebook_business/adobjects/adassettargetruletargeting.py create mode 100644 tap_facebook/facebook_business/adobjects/adassettitle.py create mode 100644 tap_facebook/facebook_business/adobjects/adassetvideo.py create mode 100644 tap_facebook/facebook_business/adobjects/adasyncrequest.py create mode 100644 tap_facebook/facebook_business/adobjects/adasyncrequestset.py create mode 100644 tap_facebook/facebook_business/adobjects/adasyncrequestsetnotificationresult.py create mode 100644 tap_facebook/facebook_business/adobjects/adbidadjustments.py create mode 100644 tap_facebook/facebook_business/adobjects/adcampaignbidconstraint.py create mode 100644 tap_facebook/facebook_business/adobjects/adcampaigndeliveryestimate.py create mode 100644 tap_facebook/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py create mode 100644 tap_facebook/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py create mode 100644 tap_facebook/facebook_business/adobjects/adcampaignissuesinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/adcampaignlearningstageinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/adcampaignoptimizationevent.py create mode 100644 tap_facebook/facebook_business/adobjects/adcampaignpacedbidinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreative.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeaddisclaimer.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativebrandedcontentads.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativebrandedcontentadspartners.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativedegreesoffreedomspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativefacebookbrandedcontent.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativefeaturedetails.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativefeaturesspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeinsights.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdata.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdataapplinkspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoaction.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatachildattachment.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeobjectstoryspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeomnichannellinkspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativephotodata.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativephotodatamediaelements.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeplacedata.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeplatformcustomization.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativeportraitcustomizations.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativepostclickconfiguration.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativepromotionmetadataspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativerecommendersettings.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativesitelinksspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativesourcingspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativestaticfallbackspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativetemplateurlspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativetextdata.py create mode 100644 tap_facebook/facebook_business/adobjects/adcreativevideodata.py create mode 100644 tap_facebook/facebook_business/adobjects/adcustomizationrulespec.py create mode 100644 tap_facebook/facebook_business/adobjects/addynamiccreative.py create mode 100644 tap_facebook/facebook_business/adobjects/adentitytargetspend.py create mode 100644 tap_facebook/facebook_business/adobjects/adgroupissuesinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/adgroupmetadata.py create mode 100644 tap_facebook/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py create mode 100644 tap_facebook/facebook_business/adobjects/adgroupreviewfeedback.py create mode 100644 tap_facebook/facebook_business/adobjects/adimage.py create mode 100644 tap_facebook/facebook_business/adobjects/adkeywords.py create mode 100644 tap_facebook/facebook_business/adobjects/adlabel.py create mode 100644 tap_facebook/facebook_business/adobjects/admonetizationproperty.py create mode 100644 tap_facebook/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py create mode 100644 tap_facebook/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py create mode 100644 tap_facebook/facebook_business/adobjects/adplacement.py create mode 100644 tap_facebook/facebook_business/adobjects/adplacepageset.py create mode 100644 tap_facebook/facebook_business/adobjects/adplacepagesetmetadata.py create mode 100644 tap_facebook/facebook_business/adobjects/adpreview.py create mode 100644 tap_facebook/facebook_business/adobjects/adpromotedobject.py create mode 100644 tap_facebook/facebook_business/adobjects/adrecommendation.py create mode 100644 tap_facebook/facebook_business/adobjects/adrecommendationdata.py create mode 100644 tap_facebook/facebook_business/adobjects/adreportrun.py create mode 100644 tap_facebook/facebook_business/adobjects/adrule.py create mode 100644 tap_facebook/facebook_business/adobjects/adruleevaluationspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adruleexecutionoptions.py create mode 100644 tap_facebook/facebook_business/adobjects/adruleexecutionspec.py create mode 100644 tap_facebook/facebook_business/adobjects/adrulefilters.py create mode 100644 tap_facebook/facebook_business/adobjects/adrulehistory.py create mode 100644 tap_facebook/facebook_business/adobjects/adrulehistoryresult.py create mode 100644 tap_facebook/facebook_business/adobjects/adrulehistoryresultaction.py create mode 100644 tap_facebook/facebook_business/adobjects/adruleschedule.py create mode 100644 tap_facebook/facebook_business/adobjects/adruleschedulespec.py create mode 100644 tap_facebook/facebook_business/adobjects/adruletrigger.py create mode 100644 tap_facebook/facebook_business/adobjects/adsactionstats.py create mode 100644 tap_facebook/facebook_business/adobjects/adset.py create mode 100644 tap_facebook/facebook_business/adobjects/adshistogramstats.py create mode 100644 tap_facebook/facebook_business/adobjects/adsimagecrops.py create mode 100644 tap_facebook/facebook_business/adobjects/adsinsights.py create mode 100644 tap_facebook/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py create mode 100644 tap_facebook/facebook_business/adobjects/adspixel.py create mode 100644 tap_facebook/facebook_business/adobjects/adspixelstats.py create mode 100644 tap_facebook/facebook_business/adobjects/adspixelstatsresult.py create mode 100644 tap_facebook/facebook_business/adobjects/adstudy.py create mode 100644 tap_facebook/facebook_business/adobjects/adstudycell.py create mode 100644 tap_facebook/facebook_business/adobjects/adstudyobjective.py create mode 100644 tap_facebook/facebook_business/adobjects/adstudyobjectiveid.py create mode 100644 tap_facebook/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py create mode 100644 tap_facebook/facebook_business/adobjects/advideo.py create mode 100644 tap_facebook/facebook_business/adobjects/agencyclientdeclaration.py create mode 100644 tap_facebook/facebook_business/adobjects/agerange.py create mode 100644 tap_facebook/facebook_business/adobjects/album.py create mode 100644 tap_facebook/facebook_business/adobjects/analyticssegment.py create mode 100644 tap_facebook/facebook_business/adobjects/androidapplink.py create mode 100644 tap_facebook/facebook_business/adobjects/application.py create mode 100644 tap_facebook/facebook_business/adobjects/apprequest.py create mode 100644 tap_facebook/facebook_business/adobjects/apprequestformerrecipient.py create mode 100644 tap_facebook/facebook_business/adobjects/assigneduser.py create mode 100644 tap_facebook/facebook_business/adobjects/asyncrequest.py create mode 100644 tap_facebook/facebook_business/adobjects/asyncsession.py create mode 100644 tap_facebook/facebook_business/adobjects/attributionspec.py create mode 100644 tap_facebook/facebook_business/adobjects/audiencepermissionforactions.py create mode 100644 tap_facebook/facebook_business/adobjects/audiocopyright.py create mode 100644 tap_facebook/facebook_business/adobjects/automotivemodel.py create mode 100644 tap_facebook/facebook_business/adobjects/avatar.py create mode 100644 tap_facebook/facebook_business/adobjects/avatarprofilepicture.py create mode 100644 tap_facebook/facebook_business/adobjects/brandedcontentshadowigmediaid.py create mode 100644 tap_facebook/facebook_business/adobjects/brandedcontentshadowiguserid.py create mode 100644 tap_facebook/facebook_business/adobjects/brandrequest.py create mode 100644 tap_facebook/facebook_business/adobjects/brandsafetyblocklistusage.py create mode 100644 tap_facebook/facebook_business/adobjects/broadtargetingcategories.py create mode 100644 tap_facebook/facebook_business/adobjects/business.py create mode 100644 tap_facebook/facebook_business/adobjects/businessadaccountrequest.py create mode 100644 tap_facebook/facebook_business/adobjects/businessapplicationrequest.py create mode 100644 tap_facebook/facebook_business/adobjects/businessassetgroup.py create mode 100644 tap_facebook/facebook_business/adobjects/businessassetsharingagreement.py create mode 100644 tap_facebook/facebook_business/adobjects/businesscreativefolder.py create mode 100644 tap_facebook/facebook_business/adobjects/businessimage.py create mode 100644 tap_facebook/facebook_business/adobjects/businessmanagedpartnereligibility.py create mode 100644 tap_facebook/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py create mode 100644 tap_facebook/facebook_business/adobjects/businesspagerequest.py create mode 100644 tap_facebook/facebook_business/adobjects/businesspartnerpremiumoptions.py create mode 100644 tap_facebook/facebook_business/adobjects/businessrolerequest.py create mode 100644 tap_facebook/facebook_business/adobjects/businessuser.py create mode 100644 tap_facebook/facebook_business/adobjects/businessvideo.py create mode 100644 tap_facebook/facebook_business/adobjects/campaign.py create mode 100644 tap_facebook/facebook_business/adobjects/campaigngroupbrandconfiguration.py create mode 100644 tap_facebook/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/canvas.py create mode 100644 tap_facebook/facebook_business/adobjects/canvasadsettings.py create mode 100644 tap_facebook/facebook_business/adobjects/canvasbodyelement.py create mode 100644 tap_facebook/facebook_business/adobjects/canvascollectionthumbnail.py create mode 100644 tap_facebook/facebook_business/adobjects/canvasdynamicsetting.py create mode 100644 tap_facebook/facebook_business/adobjects/canvaspreview.py create mode 100644 tap_facebook/facebook_business/adobjects/catalogbasedtargeting.py create mode 100644 tap_facebook/facebook_business/adobjects/catalogitemappealstatus.py create mode 100644 tap_facebook/facebook_business/adobjects/catalogitemapplinks.py create mode 100644 tap_facebook/facebook_business/adobjects/catalogitemchannelstointegritystatus.py create mode 100644 tap_facebook/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py create mode 100644 tap_facebook/facebook_business/adobjects/catalogsubverticallist.py create mode 100644 tap_facebook/facebook_business/adobjects/chatplugin.py create mode 100644 tap_facebook/facebook_business/adobjects/checkbatchrequeststatus.py create mode 100644 tap_facebook/facebook_business/adobjects/childevent.py create mode 100644 tap_facebook/facebook_business/adobjects/clicktrackingtag.py create mode 100644 tap_facebook/facebook_business/adobjects/cloudgame.py create mode 100644 tap_facebook/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py create mode 100644 tap_facebook/facebook_business/adobjects/collaborativeadssharesettings.py create mode 100644 tap_facebook/facebook_business/adobjects/comment.py create mode 100644 tap_facebook/facebook_business/adobjects/commercemerchantsettings.py create mode 100644 tap_facebook/facebook_business/adobjects/commercemerchantsettingssetupstatus.py create mode 100644 tap_facebook/facebook_business/adobjects/commerceorder.py create mode 100644 tap_facebook/facebook_business/adobjects/commerceordertransactiondetail.py create mode 100644 tap_facebook/facebook_business/adobjects/commercepayout.py create mode 100644 tap_facebook/facebook_business/adobjects/commercesettings.py create mode 100644 tap_facebook/facebook_business/adobjects/connectionstargeting.py create mode 100644 tap_facebook/facebook_business/adobjects/contentpublishinglimitresponse.py create mode 100644 tap_facebook/facebook_business/adobjects/contextualbundlingspec.py create mode 100644 tap_facebook/facebook_business/adobjects/conversionactionquery.py create mode 100644 tap_facebook/facebook_business/adobjects/copyrightreferencecontainer.py create mode 100644 tap_facebook/facebook_business/adobjects/coverphoto.py create mode 100644 tap_facebook/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py create mode 100644 tap_facebook/facebook_business/adobjects/cpasbusinesssetupconfig.py create mode 100644 tap_facebook/facebook_business/adobjects/cpascollaborationrequest.py create mode 100644 tap_facebook/facebook_business/adobjects/cpasmerchantconfig.py create mode 100644 tap_facebook/facebook_business/adobjects/creativehistory.py create mode 100644 tap_facebook/facebook_business/adobjects/creditcard.py create mode 100644 tap_facebook/facebook_business/adobjects/creditpartitionactionoptions.py create mode 100644 tap_facebook/facebook_business/adobjects/crmaddress.py create mode 100644 tap_facebook/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py create mode 100644 tap_facebook/facebook_business/adobjects/currency.py create mode 100644 tap_facebook/facebook_business/adobjects/currencyamount.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudience.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudienceadaccount.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudiencedatasource.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudiencegroup.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudiencesalts.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudiencesession.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudiencesharedaccountinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudiencesharingstatus.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudiencestatus.py create mode 100644 tap_facebook/facebook_business/adobjects/customaudiencestos.py create mode 100644 tap_facebook/facebook_business/adobjects/customconversion.py create mode 100644 tap_facebook/facebook_business/adobjects/customconversionstatsresult.py create mode 100644 tap_facebook/facebook_business/adobjects/customusersettings.py create mode 100644 tap_facebook/facebook_business/adobjects/dacheck.py create mode 100644 tap_facebook/facebook_business/adobjects/dataset.py create mode 100644 tap_facebook/facebook_business/adobjects/daypart.py create mode 100644 tap_facebook/facebook_business/adobjects/deliverycheck.py create mode 100644 tap_facebook/facebook_business/adobjects/deliverycheckextrainfo.py create mode 100644 tap_facebook/facebook_business/adobjects/deliverywindow.py create mode 100644 tap_facebook/facebook_business/adobjects/destination.py create mode 100644 tap_facebook/facebook_business/adobjects/dynamicpostchildattachment.py create mode 100644 tap_facebook/facebook_business/adobjects/dynamicpriceconfigbydate.py create mode 100644 tap_facebook/facebook_business/adobjects/dynamicvideometadata.py create mode 100644 tap_facebook/facebook_business/adobjects/engagement.py create mode 100644 tap_facebook/facebook_business/adobjects/entityattextrange.py create mode 100644 tap_facebook/facebook_business/adobjects/event.py create mode 100644 tap_facebook/facebook_business/adobjects/eventsourcegroup.py create mode 100644 tap_facebook/facebook_business/adobjects/experience.py create mode 100644 tap_facebook/facebook_business/adobjects/extendedcredit.py create mode 100644 tap_facebook/facebook_business/adobjects/extendedcreditallocationconfig.py create mode 100644 tap_facebook/facebook_business/adobjects/extendedcreditinvoicegroup.py create mode 100644 tap_facebook/facebook_business/adobjects/externaleventsource.py create mode 100644 tap_facebook/facebook_business/adobjects/fameexportconfig.py create mode 100644 tap_facebook/facebook_business/adobjects/flexibletargeting.py create mode 100644 tap_facebook/facebook_business/adobjects/flight.py create mode 100644 tap_facebook/facebook_business/adobjects/fundingsourcedetails.py create mode 100644 tap_facebook/facebook_business/adobjects/fundingsourcedetailscoupon.py create mode 100644 tap_facebook/facebook_business/adobjects/fundraiserpersontocharity.py create mode 100644 tap_facebook/facebook_business/adobjects/group.py create mode 100644 tap_facebook/facebook_business/adobjects/hasleadaccess.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/__init__.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/adaccountmixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/adaccountusermixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/adimagemixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/adpreviewmixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/adreportrunmixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/adsinsightsmixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/businessmixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/customaudiencemixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/productcatalogmixin.py create mode 100644 tap_facebook/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py create mode 100644 tap_facebook/facebook_business/adobjects/highdemandperiod.py create mode 100644 tap_facebook/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py create mode 100644 tap_facebook/facebook_business/adobjects/homelisting.py create mode 100644 tap_facebook/facebook_business/adobjects/hotel.py create mode 100644 tap_facebook/facebook_business/adobjects/hotelroom.py create mode 100644 tap_facebook/facebook_business/adobjects/idname.py create mode 100644 tap_facebook/facebook_business/adobjects/igbcadspermission.py create mode 100644 tap_facebook/facebook_business/adobjects/igcomment.py create mode 100644 tap_facebook/facebook_business/adobjects/igcommentfromuser.py create mode 100644 tap_facebook/facebook_business/adobjects/igmedia.py create mode 100644 tap_facebook/facebook_business/adobjects/igshoppingproductappeal.py create mode 100644 tap_facebook/facebook_business/adobjects/igshoppingreviewstatus.py create mode 100644 tap_facebook/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py create mode 100644 tap_facebook/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py create mode 100644 tap_facebook/facebook_business/adobjects/iguser.py create mode 100644 tap_facebook/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py create mode 100644 tap_facebook/facebook_business/adobjects/igvideocopyrightcheckstatus.py create mode 100644 tap_facebook/facebook_business/adobjects/imagecopyright.py create mode 100644 tap_facebook/facebook_business/adobjects/insightsresult.py create mode 100644 tap_facebook/facebook_business/adobjects/insightsvalue.py create mode 100644 tap_facebook/facebook_business/adobjects/instagramcarousel.py create mode 100644 tap_facebook/facebook_business/adobjects/instagramcomment.py create mode 100644 tap_facebook/facebook_business/adobjects/instagraminsightsresult.py create mode 100644 tap_facebook/facebook_business/adobjects/instagraminsightsvalue.py create mode 100644 tap_facebook/facebook_business/adobjects/instagrammedia.py create mode 100644 tap_facebook/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py create mode 100644 tap_facebook/facebook_business/adobjects/instagramuser.py create mode 100644 tap_facebook/facebook_business/adobjects/instagramvideometadata.py create mode 100644 tap_facebook/facebook_business/adobjects/iosapplink.py create mode 100644 tap_facebook/facebook_business/adobjects/jobopening.py create mode 100644 tap_facebook/facebook_business/adobjects/keyvalue.py create mode 100644 tap_facebook/facebook_business/adobjects/lead.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenappointmentbookinginfo.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenappointmentslotsbyday.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenappointmenttimeslot.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgencontextcard.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgencustomdisclaimer.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgencustomdisclaimerbody.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgendraftquestion.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenform.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenlegalcontent.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenlegalcontentcheckbox.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenprivacypolicy.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenquestion.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenquestionoption.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenthankyoupage.py create mode 100644 tap_facebook/facebook_business/adobjects/leadgenurlentityatranges.py create mode 100644 tap_facebook/facebook_business/adobjects/lifeevent.py create mode 100644 tap_facebook/facebook_business/adobjects/link.py create mode 100644 tap_facebook/facebook_business/adobjects/livevideo.py create mode 100644 tap_facebook/facebook_business/adobjects/livevideoadbreakconfig.py create mode 100644 tap_facebook/facebook_business/adobjects/livevideoerror.py create mode 100644 tap_facebook/facebook_business/adobjects/livevideoinputstream.py create mode 100644 tap_facebook/facebook_business/adobjects/livevideorecommendedencodersettings.py create mode 100644 tap_facebook/facebook_business/adobjects/livevideotargeting.py create mode 100644 tap_facebook/facebook_business/adobjects/localservicebusiness.py create mode 100644 tap_facebook/facebook_business/adobjects/location.py create mode 100644 tap_facebook/facebook_business/adobjects/lookalikespec.py create mode 100644 tap_facebook/facebook_business/adobjects/mailingaddress.py create mode 100644 tap_facebook/facebook_business/adobjects/managedpartnerbusiness.py create mode 100644 tap_facebook/facebook_business/adobjects/managedpartnerextendedcredit.py create mode 100644 tap_facebook/facebook_business/adobjects/mediafingerprint.py create mode 100644 tap_facebook/facebook_business/adobjects/mediatitle.py create mode 100644 tap_facebook/facebook_business/adobjects/messagingfeaturereview.py create mode 100644 tap_facebook/facebook_business/adobjects/messagingfeaturestatus.py create mode 100644 tap_facebook/facebook_business/adobjects/messengeradspartialautomatedsteplist.py create mode 100644 tap_facebook/facebook_business/adobjects/messengerprofile.py create mode 100644 tap_facebook/facebook_business/adobjects/minimumbudget.py create mode 100644 tap_facebook/facebook_business/adobjects/musicvideocopyright.py create mode 100644 tap_facebook/facebook_business/adobjects/nullnode.py create mode 100644 tap_facebook/facebook_business/adobjects/objectparser.py create mode 100644 tap_facebook/facebook_business/adobjects/offlineconversiondataset.py create mode 100644 tap_facebook/facebook_business/adobjects/offlineconversiondatasetpermissions.py create mode 100644 tap_facebook/facebook_business/adobjects/offlineconversiondatasetupload.py create mode 100644 tap_facebook/facebook_business/adobjects/offlineconversiondatasetusage.py create mode 100644 tap_facebook/facebook_business/adobjects/offsitepixel.py create mode 100644 tap_facebook/facebook_business/adobjects/omegacustomertrx.py create mode 100644 tap_facebook/facebook_business/adobjects/openbridgeconfiguration.py create mode 100644 tap_facebook/facebook_business/adobjects/opengraphcontext.py create mode 100644 tap_facebook/facebook_business/adobjects/outcomepredictionpoint.py create mode 100644 tap_facebook/facebook_business/adobjects/page.py create mode 100644 tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblock.py create mode 100644 tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py create mode 100644 tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py create mode 100644 tap_facebook/facebook_business/adobjects/pagecalltoaction.py create mode 100644 tap_facebook/facebook_business/adobjects/pagecategory.py create mode 100644 tap_facebook/facebook_business/adobjects/pagechangeproposal.py create mode 100644 tap_facebook/facebook_business/adobjects/pagecommerceeligibility.py create mode 100644 tap_facebook/facebook_business/adobjects/pageparking.py create mode 100644 tap_facebook/facebook_business/adobjects/pagepaymentoptions.py create mode 100644 tap_facebook/facebook_business/adobjects/pagepost.py create mode 100644 tap_facebook/facebook_business/adobjects/pagepostexperiment.py create mode 100644 tap_facebook/facebook_business/adobjects/pagerestaurantservices.py create mode 100644 tap_facebook/facebook_business/adobjects/pagerestaurantspecialties.py create mode 100644 tap_facebook/facebook_business/adobjects/pagesavedfilter.py create mode 100644 tap_facebook/facebook_business/adobjects/pagesettings.py create mode 100644 tap_facebook/facebook_business/adobjects/pagestartinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/pagethreadowner.py create mode 100644 tap_facebook/facebook_business/adobjects/pageupcomingchange.py create mode 100644 tap_facebook/facebook_business/adobjects/pageusermessagethreadlabel.py create mode 100644 tap_facebook/facebook_business/adobjects/partnerstudy.py create mode 100644 tap_facebook/facebook_business/adobjects/paymentenginepayment.py create mode 100644 tap_facebook/facebook_business/adobjects/paymentpricepoints.py create mode 100644 tap_facebook/facebook_business/adobjects/paymentsubscription.py create mode 100644 tap_facebook/facebook_business/adobjects/permission.py create mode 100644 tap_facebook/facebook_business/adobjects/persona.py create mode 100644 tap_facebook/facebook_business/adobjects/photo.py create mode 100644 tap_facebook/facebook_business/adobjects/place.py create mode 100644 tap_facebook/facebook_business/adobjects/placetopic.py create mode 100644 tap_facebook/facebook_business/adobjects/platformimagesource.py create mode 100644 tap_facebook/facebook_business/adobjects/playablecontent.py create mode 100644 tap_facebook/facebook_business/adobjects/post.py create mode 100644 tap_facebook/facebook_business/adobjects/privacy.py create mode 100644 tap_facebook/facebook_business/adobjects/privateliftstudyinstance.py create mode 100644 tap_facebook/facebook_business/adobjects/productcatalog.py create mode 100644 tap_facebook/facebook_business/adobjects/productcatalogcategory.py create mode 100644 tap_facebook/facebook_business/adobjects/productcatalogdatasource.py create mode 100644 tap_facebook/facebook_business/adobjects/productcatalogdiagnosticgroup.py create mode 100644 tap_facebook/facebook_business/adobjects/productcataloghotelroomsbatch.py create mode 100644 tap_facebook/facebook_business/adobjects/productcatalogimagesettings.py create mode 100644 tap_facebook/facebook_business/adobjects/productcatalogimagesettingsoperation.py create mode 100644 tap_facebook/facebook_business/adobjects/productcatalogpricingvariablesbatch.py create mode 100644 tap_facebook/facebook_business/adobjects/productcatalogproductsetsbatch.py create mode 100644 tap_facebook/facebook_business/adobjects/producteventstat.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeed.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeedrule.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeedrulesuggestion.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeedschedule.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeedupload.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeeduploaderror.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeeduploaderrorreport.py create mode 100644 tap_facebook/facebook_business/adobjects/productfeeduploaderrorsample.py create mode 100644 tap_facebook/facebook_business/adobjects/productgroup.py create mode 100644 tap_facebook/facebook_business/adobjects/productimage.py create mode 100644 tap_facebook/facebook_business/adobjects/productitem.py create mode 100644 tap_facebook/facebook_business/adobjects/productitemcommerceinsights.py create mode 100644 tap_facebook/facebook_business/adobjects/productitemerror.py create mode 100644 tap_facebook/facebook_business/adobjects/productitemimporteraddress.py create mode 100644 tap_facebook/facebook_business/adobjects/productitemlocalinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/productitemlocalinfolatlongshape.py create mode 100644 tap_facebook/facebook_business/adobjects/productset.py create mode 100644 tap_facebook/facebook_business/adobjects/productsetmetadata.py create mode 100644 tap_facebook/facebook_business/adobjects/productvariant.py create mode 100644 tap_facebook/facebook_business/adobjects/profile.py create mode 100644 tap_facebook/facebook_business/adobjects/profilepicturesource.py create mode 100644 tap_facebook/facebook_business/adobjects/publisherblocklist.py create mode 100644 tap_facebook/facebook_business/adobjects/rawcustomaudience.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyactivity.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyadformat.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencydaypart.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyestimatescurve.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyprediction.py create mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyspec.py create mode 100644 tap_facebook/facebook_business/adobjects/recommendation.py create mode 100644 tap_facebook/facebook_business/adobjects/revsharepolicy.py create mode 100644 tap_facebook/facebook_business/adobjects/richmediaelement.py create mode 100644 tap_facebook/facebook_business/adobjects/rtbdynamicpost.py create mode 100644 tap_facebook/facebook_business/adobjects/savedaudience.py create mode 100644 tap_facebook/facebook_business/adobjects/savedmessageresponse.py create mode 100644 tap_facebook/facebook_business/adobjects/securitysettings.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/__init__.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/action_source.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/app_data.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/batch_processor.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/content.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/custom_data.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/delivery_category.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/event.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/event_request.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/event_request_async.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/event_response.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/extended_device_info.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/gender.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/http_method.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/http_service_interface.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/messaging_channel.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/normalize.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/request_options.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/user_data.py create mode 100644 tap_facebook/facebook_business/adobjects/serverside/util.py create mode 100644 tap_facebook/facebook_business/adobjects/shadowighashtag.py create mode 100644 tap_facebook/facebook_business/adobjects/shadowigmediabuilder.py create mode 100644 tap_facebook/facebook_business/adobjects/shadowigmediacollaborators.py create mode 100644 tap_facebook/facebook_business/adobjects/shadowigmediaproducttags.py create mode 100644 tap_facebook/facebook_business/adobjects/shadowigusercatalogproductsearch.py create mode 100644 tap_facebook/facebook_business/adobjects/shadowigusercatalogproductvariant.py create mode 100644 tap_facebook/facebook_business/adobjects/shop.py create mode 100644 tap_facebook/facebook_business/adobjects/splittestwinner.py create mode 100644 tap_facebook/facebook_business/adobjects/storecatalogsettings.py create mode 100644 tap_facebook/facebook_business/adobjects/stories.py create mode 100644 tap_facebook/facebook_business/adobjects/systemuser.py create mode 100644 tap_facebook/facebook_business/adobjects/tab.py create mode 100644 tap_facebook/facebook_business/adobjects/targeting.py create mode 100644 tap_facebook/facebook_business/adobjects/targetingautomation.py create mode 100644 tap_facebook/facebook_business/adobjects/targetingdynamicrule.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocation.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationcity.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationcustomlocation.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationgeoentities.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationlocationcluster.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationlocationexpansion.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationmarket.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationplace.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationregion.py create mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationzip.py create mode 100644 tap_facebook/facebook_business/adobjects/targetingproductaudiencespec.py create mode 100644 tap_facebook/facebook_business/adobjects/targetingproductaudiencesubspec.py create mode 100644 tap_facebook/facebook_business/adobjects/targetingprospectingaudience.py create mode 100644 tap_facebook/facebook_business/adobjects/targetingrelaxation.py create mode 100644 tap_facebook/facebook_business/adobjects/targetingsearch.py create mode 100644 tap_facebook/facebook_business/adobjects/targetingsentenceline.py create mode 100644 tap_facebook/facebook_business/adobjects/textwithentities.py create mode 100644 tap_facebook/facebook_business/adobjects/trackingandconversionwithdefaults.py create mode 100644 tap_facebook/facebook_business/adobjects/unifiedthread.py create mode 100644 tap_facebook/facebook_business/adobjects/url.py create mode 100644 tap_facebook/facebook_business/adobjects/user.py create mode 100644 tap_facebook/facebook_business/adobjects/useravailablecatalogs.py create mode 100644 tap_facebook/facebook_business/adobjects/usercoverphoto.py create mode 100644 tap_facebook/facebook_business/adobjects/userdevice.py create mode 100644 tap_facebook/facebook_business/adobjects/useridforapp.py create mode 100644 tap_facebook/facebook_business/adobjects/useridforpage.py create mode 100644 tap_facebook/facebook_business/adobjects/userleadgendisclaimerresponse.py create mode 100644 tap_facebook/facebook_business/adobjects/userleadgenfielddata.py create mode 100644 tap_facebook/facebook_business/adobjects/userpageonetimeoptintokensettings.py create mode 100644 tap_facebook/facebook_business/adobjects/userpaymentmobilepricepoints.py create mode 100644 tap_facebook/facebook_business/adobjects/valuebasedeligiblesource.py create mode 100644 tap_facebook/facebook_business/adobjects/vehicle.py create mode 100644 tap_facebook/facebook_business/adobjects/vehicleoffer.py create mode 100644 tap_facebook/facebook_business/adobjects/videocopyright.py create mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightcheckstatus.py create mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightconditiongroup.py create mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightgeogate.py create mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightrule.py create mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightsegment.py create mode 100644 tap_facebook/facebook_business/adobjects/videolist.py create mode 100644 tap_facebook/facebook_business/adobjects/videopoll.py create mode 100644 tap_facebook/facebook_business/adobjects/videostatus.py create mode 100644 tap_facebook/facebook_business/adobjects/videostatuserror.py create mode 100644 tap_facebook/facebook_business/adobjects/videostatusprocessingphase.py create mode 100644 tap_facebook/facebook_business/adobjects/videostatuspublishingphase.py create mode 100644 tap_facebook/facebook_business/adobjects/videostatusuploadingphase.py create mode 100644 tap_facebook/facebook_business/adobjects/videothumbnail.py create mode 100644 tap_facebook/facebook_business/adobjects/videouploadlimits.py create mode 100644 tap_facebook/facebook_business/adobjects/voipinfo.py create mode 100644 tap_facebook/facebook_business/adobjects/webapplink.py create mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinessaccount.py create mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatus.py create mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py create mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py create mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py create mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinessprofile.py create mode 100644 tap_facebook/facebook_business/adobjects/windowsapplink.py create mode 100644 tap_facebook/facebook_business/adobjects/windowsphoneapplink.py create mode 100644 tap_facebook/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py create mode 100644 tap_facebook/facebook_business/adobjects/workuserfrontline.py create mode 100644 tap_facebook/facebook_business/api.py create mode 100644 tap_facebook/facebook_business/apiconfig.py create mode 100644 tap_facebook/facebook_business/bootstrap.py create mode 100644 tap_facebook/facebook_business/crashreporter.py create mode 100644 tap_facebook/facebook_business/exceptions.py create mode 100644 tap_facebook/facebook_business/exit_codes.py create mode 100644 tap_facebook/facebook_business/fb_ca_chain_bundle.crt create mode 100644 tap_facebook/facebook_business/mixins.py create mode 100644 tap_facebook/facebook_business/session.py create mode 100644 tap_facebook/facebook_business/specs.py create mode 100644 tap_facebook/facebook_business/test/__init__.py create mode 100644 tap_facebook/facebook_business/test/docs.py create mode 100644 tap_facebook/facebook_business/test/docs_utils.py create mode 100644 tap_facebook/facebook_business/test/integration_ad.py create mode 100644 tap_facebook/facebook_business/test/integration_adaccount.py create mode 100644 tap_facebook/facebook_business/test/integration_adcreative.py create mode 100644 tap_facebook/facebook_business/test/integration_adset.py create mode 100644 tap_facebook/facebook_business/test/integration_campaign.py create mode 100644 tap_facebook/facebook_business/test/integration_constant.py create mode 100644 tap_facebook/facebook_business/test/integration_test_runner.py create mode 100644 tap_facebook/facebook_business/test/integration_utils.py create mode 100644 tap_facebook/facebook_business/test/other_docs.py create mode 100644 tap_facebook/facebook_business/test/unit.py create mode 100644 tap_facebook/facebook_business/typechecker.py create mode 100644 tap_facebook/facebook_business/utils/__init__.py create mode 100644 tap_facebook/facebook_business/utils/api_utils.py create mode 100644 tap_facebook/facebook_business/utils/urls.py create mode 100644 tap_facebook/facebook_business/utils/version.py create mode 100644 tap_facebook/facebook_business/video_uploader.py diff --git a/setup.py b/setup.py index 685255c..4e9051d 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,6 @@ 'attrs==17.3.0', 'backoff==2.2.1', 'pendulum==1.2.0', - 'facebook_business==19.0.2', 'requests==2.20.0', 'singer-python==6.0.0', ], diff --git a/tap_facebook/__init__.py b/tap_facebook/__init__.py index 6fbcebd..95c56c2 100755 --- a/tap_facebook/__init__.py +++ b/tap_facebook/__init__.py @@ -14,6 +14,9 @@ import requests import backoff +import sys +sys.path.append('/opt/code/tap-facebook/tap_facebook/') + import singer import singer.metrics as metrics from singer import utils, metadata diff --git a/tap_facebook/facebook_business/__init__.py b/tap_facebook/facebook_business/__init__.py new file mode 100644 index 0000000..382ec4e --- /dev/null +++ b/tap_facebook/facebook_business/__init__.py @@ -0,0 +1,15 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# 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__ = '19.0.2' +__all__ = [ + 'session', + 'objects', + 'api', +] diff --git a/tap_facebook/facebook_business/adobjects/__init__.py b/tap_facebook/facebook_business/adobjects/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tap_facebook/facebook_business/adobjects/abstractcrudobject.py b/tap_facebook/facebook_business/adobjects/abstractcrudobject.py new file mode 100644 index 0000000..01b7f2e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/abstractcrudobject.py @@ -0,0 +1,639 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# 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.api import ( + FacebookAdsApi, + Cursor, + FacebookRequest, +) + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.objectparser import ObjectParser + +import logging + +class AbstractCrudObject(AbstractObject): + """ + Extends AbstractObject and implements methods to create, read, update, + and delete. + Attributes: + parent_id: The object's parent's id. (default None) + api: The api instance associated with this object. (default None) + """ + + def __init__(self, fbid=None, parent_id=None, api=None): + """Initializes a CRUD object. + Args: + fbid (optional): The id of the object ont the Graph. + parent_id (optional): The id of the object's parent. + api (optional): An api object which all calls will go through. If + an api object is not specified, api calls will revert to going + through the default api. + """ + super(AbstractCrudObject, self).__init__() + + self._api = api or FacebookAdsApi.get_default_api() + self._changes = {} + if (parent_id is not None): + warning_message = "parent_id as a parameter of constructor is " \ + "being deprecated." + logging.warning(warning_message) + self._parent_id = parent_id + self._data['id'] = fbid + self._include_summary = True + + def __setitem__(self, key, value): + """Sets an item in this CRUD object while maintaining a changelog.""" + + if key not in self._data or self._data[key] != value: + self._changes[key] = value + super(AbstractCrudObject, self).__setitem__(key, value) + if '_setitem_trigger' in dir(self): + self._setitem_trigger(key, value) + + return self + + def __delitem__(self, key): + del self._data[key] + self._changes.pop(key, None) + + def __eq__(self, other): + """Two objects are the same if they have the same fbid.""" + return ( + # Same class + isinstance(other, self.__class__) and + + # Both have id's + self.get_id() and other.get_id() and + + # Both have same id + self.get_id() == other.get_id() + ) + + def __ne__(self, other): + return not self.__eq__(other) + + @classmethod + def get_by_ids(cls, ids, params=None, fields=None, api=None): + api = api or FacebookAdsApi.get_default_api() + params = dict(params or {}) + cls._assign_fields_to_params(fields, params) + params['ids'] = ','.join(map(str, ids)) + response = api.call( + 'GET', + ['/'], + params=params, + ) + result = [] + for fbid, data in response.json().items(): + obj = cls(fbid, api=api) + obj._set_data(data) + result.append(obj) + return result + + # Getters + + def get_id(self): + """Returns the object's fbid if set. Else, it returns None.""" + return self[self.Field.id] if hasattr(self, 'Field') and hasattr(self.Field, 'Field') else self['id'] + + # @deprecated deprecate parent_id in AbstractCrudObject + def get_parent_id(self): + warning_message = "parent_id is being deprecated." + logging.warning(warning_message) + """Returns the object's parent's id.""" + return self._parent_id or FacebookAdsApi.get_default_account_id() + + def get_api(self): + """ + Returns the api associated with the object. + """ + return self._api + + def get_id_assured(self): + """Returns the fbid of the object. + Raises: + FacebookBadObjectError if the object does not have an id. + """ + if not self.get(self.Field.id): + raise FacebookBadObjectError( + "%s object needs an id for this operation." + % self.__class__.__name__, + ) + + return self.get_id() + + # @deprecated deprecate parent_id in AbstractCrudObject + def get_parent_id_assured(self): + """Returns the object's parent's fbid. + Raises: + FacebookBadObjectError if the object does not have a parent id. + """ + warning_message = "parent_id is being deprecated." + logging.warning(warning_message) + if not self.get_parent_id(): + raise FacebookBadObjectError( + "%s object needs a parent_id for this operation." + % self.__class__.__name__, + ) + + return self.get_parent_id() + + def get_api_assured(self): + """Returns the fbid of the object. + Raises: + FacebookBadObjectError if get_api returns None. + """ + api = self.get_api() + if not api: + raise FacebookBadObjectError( + "%s does not yet have an associated api object.\n" + "Did you forget to instantiate an API session with: " + "FacebookAdsApi.init(app_id, app_secret, access_token)" + % self.__class__.__name__, + ) + + return api + + # Data management + + def _clear_history(self): + self._changes = {} + if 'filename' in self._data: + del self._data['filename'] + return self + + def _set_data(self, data): + """ + Sets object's data as if it were read from the server. + Warning: Does not log changes. + """ + for key in map(str, data): + self[key] = data[key] + + # clear history due to the update + self._changes.pop(key, None) + self._json = data + return self + + def export_changed_data(self): + """ + Returns a dictionary of property names mapped to their values for + properties modified from their original values. + """ + return self.export_value(self._changes) + + def export_data(self): + """ + Deprecated. Use export_all_data() or export_changed_data() instead. + """ + return self.export_changed_data() + + # CRUD Helpers + + def clear_id(self): + """Clears the object's fbid.""" + del self[self.Field.id] + return self + + def get_node_path(self): + """Returns the node's relative path as a tuple of tokens.""" + return (self.get_id_assured(),) + + def get_node_path_string(self): + """Returns the node's path as a tuple.""" + return '/'.join(self.get_node_path()) + + # CRUD + # @deprecated + # use Object(parent_id).create_xxx() instead + def remote_create( + self, + batch=None, + failure=None, + files=None, + params=None, + success=None, + api_version=None, + ): + """Creates the object by calling the API. + Args: + batch (optional): A FacebookAdsApiBatch object. If specified, + the call will be added to the batch. + params (optional): A mapping of request parameters where a key + is the parameter name and its value is a string or an object + which can be JSON-encoded. + files (optional): An optional mapping of file names to binary open + file objects. These files will be attached to the request. + success (optional): A callback function which will be called with + the FacebookResponse of this call if the call succeeded. + failure (optional): A callback function which will be called with + the FacebookResponse of this call if the call failed. + Returns: + self if not a batch call. + the return value of batch.add if a batch call. + """ + warning_message = "`remote_create` is being deprecated, please update your code with new function." + logging.warning(warning_message) + if self.get_id(): + raise FacebookBadObjectError( + "This %s object was already created." + % self.__class__.__name__, + ) + if not 'get_endpoint' in dir(self): + raise TypeError('Cannot create object of type %s.' + % self.__class__.__name__) + + params = {} if not params else params.copy() + params.update(self.export_all_data()) + request = None + if hasattr(self, 'api_create'): + request = self.api_create(self.get_parent_id_assured(), pending=True) + else: + request = FacebookRequest( + node_id=self.get_parent_id_assured(), + method='POST', + endpoint=self.get_endpoint(), + api=self._api, + target_class=self.__class__, + response_parser=ObjectParser( + reuse_object=self + ), + ) + request.add_params(params) + request.add_files(files) + + if batch is not None: + + def callback_success(response): + self._set_data(response.json()) + self._clear_history() + + if success: + success(response) + + def callback_failure(response): + if failure: + failure(response) + + return batch.add_request( + request=request, + success=callback_success, + failure=callback_failure, + ) + else: + response = request.execute() + self._set_data(response._json) + self._clear_history() + + return self + + # @deprecated + # use Object(id).api_get() instead + def remote_read( + self, + batch=None, + failure=None, + fields=None, + params=None, + success=None, + api_version=None, + ): + """Reads the object by calling the API. + Args: + batch (optional): A FacebookAdsApiBatch object. If specified, + the call will be added to the batch. + fields (optional): A list of fields to read. + params (optional): A mapping of request parameters where a key + is the parameter name and its value is a string or an object + which can be JSON-encoded. + files (optional): An optional mapping of file names to binary open + file objects. These files will be attached to the request. + success (optional): A callback function which will be called with + the FacebookResponse of this call if the call succeeded. + failure (optional): A callback function which will be called with + the FacebookResponse of this call if the call failed. + Returns: + self if not a batch call. + the return value of batch.add if a batch call. + """ + warning_message = "`remote_read` is being deprecated, please update your code with new function." + logging.warning(warning_message) + params = dict(params or {}) + if hasattr(self, 'api_get'): + request = self.api_get(pending=True) + else: + request = FacebookRequest( + node_id=self.get_id_assured(), + method='GET', + endpoint='/', + api=self._api, + target_class=self.__class__, + response_parser=ObjectParser( + reuse_object=self + ), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + def callback_success(response): + self._set_data(response.json()) + + if success: + success(response) + + def callback_failure(response): + if failure: + failure(response) + + batch_call = batch.add_request( + request=request, + success=callback_success, + failure=callback_failure, + ) + return batch_call + else: + self = request.execute() + return self + + # @deprecated + # use Object(id).api_update() instead + def remote_update( + self, + batch=None, + failure=None, + files=None, + params=None, + success=None, + api_version=None, + ): + """Updates the object by calling the API with only the changes recorded. + Args: + batch (optional): A FacebookAdsApiBatch object. If specified, + the call will be added to the batch. + params (optional): A mapping of request parameters where a key + is the parameter name and its value is a string or an object + which can be JSON-encoded. + files (optional): An optional mapping of file names to binary open + file objects. These files will be attached to the request. + success (optional): A callback function which will be called with + the FacebookResponse of this call if the call succeeded. + failure (optional): A callback function which will be called with + the FacebookResponse of this call if the call failed. + Returns: + self if not a batch call. + the return value of batch.add if a batch call. + """ + warning_message = "`remote_update` is being deprecated, please update your code with new function." + logging.warning(warning_message) + params = {} if not params else params.copy() + params.update(self.export_changed_data()) + self._set_data(params) + if hasattr(self, 'api_update'): + request = self.api_update(pending=True) + else: + request = FacebookRequest( + node_id=self.get_id_assured(), + method='POST', + endpoint='/', + api=self._api, + target_class=self.__class__, + response_parser=ObjectParser( + reuse_object=self + ), + ) + request.add_params(params) + request.add_files(files) + + if batch is not None: + def callback_success(response): + self._clear_history() + + if success: + success(response) + + def callback_failure(response): + if failure: + failure(response) + + batch_call = batch.add_request( + request=request, + success=callback_success, + failure=callback_failure, + ) + return batch_call + else: + request.execute() + self._clear_history() + + return self + + # @deprecated + # use Object(id).api_delete() instead + def remote_delete( + self, + batch=None, + failure=None, + params=None, + success=None, + api_version=None, + ): + """Deletes the object by calling the API with the DELETE http method. + Args: + batch (optional): A FacebookAdsApiBatch object. If specified, + the call will be added to the batch. + params (optional): A mapping of request parameters where a key + is the parameter name and its value is a string or an object + which can be JSON-encoded. + success (optional): A callback function which will be called with + the FacebookResponse of this call if the call succeeded. + failure (optional): A callback function which will be called with + the FacebookResponse of this call if the call failed. + Returns: + self if not a batch call. + the return value of batch.add if a batch call. + """ + warning_message = "`remote_delete` is being deprecated, please update your code with new function." + logging.warning(warning_message) + if hasattr(self, 'api_delete'): + request = self.api_delete(pending=True) + else: + request = FacebookRequest( + node_id=self.get_id_assured(), + method='DELETE', + endpoint='/', + api=self._api, + ) + request.add_params(params) + if batch is not None: + def callback_success(response): + self.clear_id() + + if success: + success(response) + + def callback_failure(response): + if failure: + failure(response) + + batch_call = batch.add_request( + request=request, + success=callback_success, + failure=callback_failure, + ) + return batch_call + else: + request.execute() + self.clear_id() + + return self + + # Helpers + + # @deprecated + def remote_save(self, *args, **kwargs): + """ + Calls remote_create method if object has not been created. Else, calls + the remote_update method. + """ + warning_message = "`remote_save` is being deprecated, please update your code with new function." + logging.warning(warning_message) + if self.get_id(): + return self.remote_update(*args, **kwargs) + else: + return self.remote_create(*args, **kwargs) + + def remote_archive( + self, + batch=None, + failure=None, + success=None + ): + if 'Status' not in dir(self) or 'archived' not in dir(self.Status): + raise TypeError('Cannot archive object of type %s.' + % self.__class__.__name__) + return self.api_create( + params={ + 'status': self.Status.archived, + }, + batch=batch, + failure=failure, + success=success, + ) + + # @deprecated + save = remote_save + + def iterate_edge( + self, + target_objects_class, + fields=None, + params=None, + fetch_first_page=True, + include_summary=True, + endpoint=None + ): + """ + Returns Cursor with argument self as source_object and + the rest as given __init__ arguments. + Note: list(iterate_edge(...)) can prefetch all the objects. + """ + source_object = self + cursor = Cursor( + source_object, + target_objects_class, + fields=fields, + params=params, + include_summary=include_summary, + endpoint=endpoint, + ) + if fetch_first_page: + cursor.load_next_page() + return cursor + + def iterate_edge_async(self, target_objects_class, fields=None, + params=None, is_async=False, include_summary=True, + endpoint=None): + from facebook_business.adobjects.adreportrun import AdReportRun + """ + Behaves as iterate_edge(...) if parameter is_async if False + (Default value) + If is_async is True: + Returns an AsyncJob which can be checked using remote_read() + to verify when the job is completed and the result ready to query + or download using get_result() + Example: + >>> job = object.iterate_edge_async( + TargetClass, fields, params, is_async=True) + >>> time.sleep(10) + >>> job.remote_read() + >>> if job: + result = job.read_result() + print result + """ + synchronous = not is_async + synchronous_iterator = self.iterate_edge( + target_objects_class, + fields, + params, + fetch_first_page=synchronous, + include_summary=include_summary, + ) + if synchronous: + return synchronous_iterator + + if not params: + params = {} + else: + params = dict(params) + self.__class__._assign_fields_to_params(fields, params) + + # To force an async response from an edge, do a POST instead of GET. + # The response comes in the format of an AsyncJob which + # indicates the progress of the async request. + if endpoint is None: + endpoint = target_objects_class.get_endpoint() + response = self.get_api_assured().call( + 'POST', + (self.get_id_assured(), endpoint), + params=params, + ).json() + + # AsyncJob stores the real iterator + # for when the result is ready to be queried + result = AdReportRun() + + if 'report_run_id' in response: + response['id'] = response['report_run_id'] + result._set_data(response) + return result + + def edge_object(self, target_objects_class, fields=None, params=None, endpoint=None): + """ + Returns first object when iterating over Cursor with argument + self as source_object and the rest as given __init__ arguments. + """ + params = {} if not params else params.copy() + params['limit'] = '1' + for obj in self.iterate_edge( + target_objects_class, + fields=fields, + params=params, + endpoint=endpoint, + ): + return obj + + # if nothing found, return None + return None + + def assure_call(self): + if not self._api: + raise FacebookBadObjectError( + 'Api call cannot be made if api is not set') diff --git a/tap_facebook/facebook_business/adobjects/abstractobject.py b/tap_facebook/facebook_business/adobjects/abstractobject.py new file mode 100644 index 0000000..f1070af --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/abstractobject.py @@ -0,0 +1,160 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# 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.typechecker import TypeChecker + +try: + # Since python 3 + import collections.abc as collections_abc +except ImportError: + # Won't work after python 3.8 + import collections as collections_abc + +import json + +class AbstractObject(collections_abc.MutableMapping): + + """ + Represents an abstract object (may or may not have explicitly be a node of + the Graph) as a MutableMapping of its data. + """ + + _default_read_fields = [] + _field_types = {} + + class Field: + pass + + def __init__(self): + self._data = {} + self._field_checker = TypeChecker(self._field_types, + self._get_field_enum_info()) + + def __getitem__(self, key): + return self._data[str(key)] + + def __setitem__(self, key, value): + if key.startswith('_'): + self.__setattr__(key, value) + else: + self._data[key] = self._field_checker.get_typed_value(key, value) + return self + + def __eq__(self, other): + return other is not None and hasattr(other, 'export_all_data') and \ + self.export_all_data() == other.export_all_data() + + def __delitem__(self, key): + del self._data[key] + + def __iter__(self): + return iter(self._data) + + def __len__(self): + return len(self._data) + + def __contains__(self, key): + return key in self._data + + def __unicode__(self): + return unicode(self._data) + + def __repr__(self): + return "<%s> %s" % ( + self.__class__.__name__, + json.dumps( + self.export_value(self._data), + sort_keys=True, + indent=4, + separators=(',', ': '), + ), + ) + + #reads in data from json object + def _set_data(self, data): + if hasattr(data, 'items'): + for key, value in data.items(): + self[key] = value + else: + raise FacebookBadObjectError("Bad data to set object data") + self._json = data + + @classmethod + def _get_field_enum_info(cls): + """Returns info for fields that use enum values + Should be implemented in subclasses + """ + return {} + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + """Returns the endpoint name. + Raises: + NotImplementedError if the method is not implemented in a class + that derives from this abstract class. + """ + raise NotImplementedError( + "%s must have implemented get_endpoint." % cls.__name__, + ) + + @classmethod + def get_default_read_fields(cls): + """Returns the class's list of default fields to read.""" + return cls._default_read_fields + + @classmethod + def set_default_read_fields(cls, fields): + """Sets the class's list of default fields to read. + Args: + fields: list of field names to read by default without specifying + them explicitly during a read operation either via EdgeIterator + or via AbstractCrudObject.read. + """ + cls._default_read_fields = fields + + @classmethod + def _assign_fields_to_params(cls, fields, params): + """Applies fields to params in a consistent manner.""" + if fields is None: + fields = cls.get_default_read_fields() + if fields: + params['fields'] = ','.join(fields) + + def set_data(self, data): + """ + For an AbstractObject, we do not need to keep history. + """ + self._set_data(data) + + def export_value(self, data): + if isinstance(data, AbstractObject): + data = data.export_all_data() + elif isinstance(data, dict): + data = dict((k, self.export_value(v)) + for k, v in data.items() + if v is not None) + elif isinstance(data, list): + data = [self.export_value(v) for v in data] + return data + + def export_data(self): + """ + Deprecated. Use export_all_data() instead. + """ + return self.export_all_data() + + def export_all_data(self): + return self.export_value(self._data) + + @classmethod + def create_object(cls, api, data, target_class): + new_object = target_class(api=api) + new_object._set_data(data) + return new_object diff --git a/tap_facebook/facebook_business/adobjects/ad.py b/tap_facebook/facebook_business/adobjects/ad.py new file mode 100644 index 0000000..f392b10 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/ad.py @@ -0,0 +1,753 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.mixins import HasAdLabels + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class Ad( + AbstractCrudObject, + HasAdLabels, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAd = True + super(Ad, self).__init__(fbid, parent_id, api) + + 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' + bid_amount = 'bid_amount' + bid_info = 'bid_info' + bid_type = 'bid_type' + campaign = 'campaign' + campaign_id = 'campaign_id' + configured_status = 'configured_status' + conversion_domain = 'conversion_domain' + conversion_specs = 'conversion_specs' + created_time = 'created_time' + creative = 'creative' + demolink_hash = 'demolink_hash' + display_sequence = 'display_sequence' + effective_status = 'effective_status' + engagement_audience = 'engagement_audience' + failed_delivery_checks = 'failed_delivery_checks' + id = 'id' + issues_info = 'issues_info' + last_updated_by_app_id = 'last_updated_by_app_id' + name = 'name' + preview_shareable_link = 'preview_shareable_link' + priority = 'priority' + recommendations = 'recommendations' + source_ad = 'source_ad' + source_ad_id = 'source_ad_id' + status = 'status' + targeting = 'targeting' + tracking_and_conversion_with_defaults = 'tracking_and_conversion_with_defaults' + tracking_specs = 'tracking_specs' + updated_time = 'updated_time' + adset_spec = 'adset_spec' + audience_id = 'audience_id' + date_format = 'date_format' + draft_adgroup_id = 'draft_adgroup_id' + execution_options = 'execution_options' + include_demolink_hashes = 'include_demolink_hashes' + filename = 'filename' + + class BidType: + absolute_ocpm = 'ABSOLUTE_OCPM' + cpa = 'CPA' + cpc = 'CPC' + cpm = 'CPM' + multi_premium = 'MULTI_PREMIUM' + + class ConfiguredStatus: + active = 'ACTIVE' + archived = 'ARCHIVED' + deleted = 'DELETED' + paused = 'PAUSED' + + class EffectiveStatus: + active = 'ACTIVE' + adset_paused = 'ADSET_PAUSED' + archived = 'ARCHIVED' + campaign_paused = 'CAMPAIGN_PAUSED' + deleted = 'DELETED' + disapproved = 'DISAPPROVED' + in_process = 'IN_PROCESS' + paused = 'PAUSED' + pending_billing_info = 'PENDING_BILLING_INFO' + pending_review = 'PENDING_REVIEW' + preapproved = 'PREAPPROVED' + with_issues = 'WITH_ISSUES' + + class Status: + active = 'ACTIVE' + archived = 'ARCHIVED' + deleted = 'DELETED' + 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' + + class ExecutionOptions: + include_recommendations = 'include_recommendations' + synchronous_ad_review = 'synchronous_ad_review' + validate_only = 'validate_only' + + class Operator: + all = 'ALL' + any = 'ANY' + + class StatusOption: + active = 'ACTIVE' + inherited_from_source = 'INHERITED_FROM_SOURCE' + paused = 'PAUSED' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'ads' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad(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 + if batch 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 = { + 'am_call_tags': 'map', + 'date_preset': 'date_preset_enum', + 'from_adtable': 'bool', + 'review_feedback_breakdown': 'bool', + 'time_range': 'map', + } + enums = { + 'date_preset_enum': [ + 'data_maximum', + 'last_14d', + 'last_28d', + 'last_30d', + 'last_3d', + 'last_7d', + 'last_90d', + 'last_month', + 'last_quarter', + 'last_week_mon_sun', + 'last_week_sun_sat', + 'last_year', + 'maximum', + 'this_month', + 'this_quarter', + 'this_week_mon_today', + 'this_week_sun_today', + 'this_year', + 'today', + 'yesterday', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + 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_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', + 'display_sequence': 'unsigned int', + 'draft_adgroup_id': 'string', + 'engagement_audience': 'bool', + 'execution_options': 'list', + 'include_demolink_hashes': 'bool', + 'name': 'string', + 'priority': 'unsigned int', + 'status': 'status_enum', + 'tracking_specs': 'Object', + } + enums = { + 'execution_options_enum': Ad.ExecutionOptions.__dict__.values(), + 'status_enum': Ad.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + 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_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.adcreative import AdCreative + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adcreatives', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCreative, 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'adlabels': 'list', + 'execution_options': 'list', + } + enums = { + 'execution_options_enum': Ad.ExecutionOptions.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adlabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_ad_rules_governed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adrule import AdRule + param_types = { + 'pass_evaluation': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adrules_governed', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdRule, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'time_range': 'map', + 'updated_since': 'int', + } + enums = { + 'date_preset_enum': Ad.DatePreset.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/copies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_copy(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'adset_id': 'string', + 'rename_options': 'Object', + 'status_option': 'status_option_enum', + } + enums = { + 'status_option_enum': Ad.StatusOption.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/copies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_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.adsinsights import AdsInsights + if is_async: + return self.get_insights_async(fields, params, batch, success, failure, pending) + param_types = { + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'action_report_time_enum', + 'breakdowns': 'list', + 'date_preset': 'date_preset_enum', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'level_enum', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + enums = { + 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), + 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), + 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), + 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), + 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), + 'level_enum': AdsInsights.Level.__dict__.values(), + 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsInsights, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsInsights, 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() + + def get_insights_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adreportrun import AdReportRun + from facebook_business.adobjects.adsinsights import AdsInsights + param_types = { + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'action_report_time_enum', + 'breakdowns': 'list', + 'date_preset': 'date_preset_enum', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'level_enum', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + enums = { + 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), + 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), + 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), + 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), + 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), + 'level_enum': AdsInsights.Level.__dict__.values(), + 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), + } + + if fields is not None: + params['fields'] = params.get('fields') if params.get('fields') is not None else list() + params['fields'].extend(field for field in fields if field not in params['fields']) + + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdReportRun, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdReportRun, api=self._api), + include_summary=False, + ) + request.add_params(params) + + if batch is 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_leads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.lead import Lead + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/leads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Lead, + api_type='EDGE', + response_parser=ObjectParser(target_class=Lead, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adpreview import AdPreview + param_types = { + 'ad_format': 'ad_format_enum', + 'creative_feature': 'creative_feature_enum', + 'dynamic_asset_label': 'string', + 'dynamic_creative_spec': 'Object', + 'dynamic_customization': 'Object', + 'end_date': 'datetime', + 'height': 'unsigned int', + 'locale': 'string', + 'place_page_id': 'int', + 'post': 'Object', + 'product_item_ids': 'list', + 'render_type': 'render_type_enum', + 'start_date': 'datetime', + 'width': 'unsigned int', + } + enums = { + 'ad_format_enum': AdPreview.AdFormat.__dict__.values(), + 'creative_feature_enum': AdPreview.CreativeFeature.__dict__.values(), + 'render_type_enum': AdPreview.RenderType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/previews', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdPreview, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdPreview, 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_targeting_sentence_lines(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.targetingsentenceline import TargetingSentenceLine + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/targetingsentencelines', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=TargetingSentenceLine, + api_type='EDGE', + response_parser=ObjectParser(target_class=TargetingSentenceLine, 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', + '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', + 'bid_amount': 'int', + 'bid_info': 'map', + 'bid_type': 'BidType', + 'campaign': 'Campaign', + 'campaign_id': 'string', + 'configured_status': 'ConfiguredStatus', + 'conversion_domain': 'string', + 'conversion_specs': 'list', + 'created_time': 'datetime', + 'creative': 'AdCreative', + 'demolink_hash': 'string', + 'display_sequence': 'int', + 'effective_status': 'EffectiveStatus', + 'engagement_audience': 'bool', + 'failed_delivery_checks': 'list', + 'id': 'string', + 'issues_info': 'list', + 'last_updated_by_app_id': 'string', + 'name': 'string', + 'preview_shareable_link': 'string', + 'priority': 'unsigned int', + 'recommendations': 'list', + 'source_ad': 'Ad', + 'source_ad_id': 'string', + 'status': 'Status', + 'targeting': 'Targeting', + 'tracking_and_conversion_with_defaults': 'TrackingAndConversionWithDefaults', + 'tracking_specs': 'list', + 'updated_time': 'datetime', + 'adset_spec': 'AdSet', + 'audience_id': 'string', + 'date_format': 'string', + 'draft_adgroup_id': 'string', + 'execution_options': 'list', + 'include_demolink_hashes': 'bool', + 'filename': 'file' + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BidType'] = Ad.BidType.__dict__.values() + field_enum_info['ConfiguredStatus'] = Ad.ConfiguredStatus.__dict__.values() + field_enum_info['EffectiveStatus'] = Ad.EffectiveStatus.__dict__.values() + 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['Operator'] = Ad.Operator.__dict__.values() + field_enum_info['StatusOption'] = Ad.StatusOption.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccount.py b/tap_facebook/facebook_business/adobjects/adaccount.py new file mode 100644 index 0000000..05a9c8e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccount.py @@ -0,0 +1,4221 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.adobjects.helpers.adaccountmixin import AdAccountMixin +from facebook_business.mixins import HasAdLabels + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdAccount( + AdAccountMixin, + AbstractCrudObject, + HasAdLabels, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccount = True + super(AdAccount, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + account_status = 'account_status' + 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' + business = 'business' + business_city = 'business_city' + business_country_code = 'business_country_code' + business_name = 'business_name' + business_state = 'business_state' + business_street = 'business_street' + business_street2 = 'business_street2' + business_zip = 'business_zip' + can_create_brand_lift_study = 'can_create_brand_lift_study' + capabilities = 'capabilities' + created_time = 'created_time' + currency = 'currency' + custom_audience_info = 'custom_audience_info' + default_dsa_beneficiary = 'default_dsa_beneficiary' + default_dsa_payor = 'default_dsa_payor' + disable_reason = 'disable_reason' + end_advertiser = 'end_advertiser' + end_advertiser_name = 'end_advertiser_name' + existing_customers = 'existing_customers' + extended_credit_invoice_group = 'extended_credit_invoice_group' + failed_delivery_checks = 'failed_delivery_checks' + fb_entity = 'fb_entity' + funding_source = 'funding_source' + funding_source_details = 'funding_source_details' + has_migrated_permissions = 'has_migrated_permissions' + has_page_authorized_adaccount = 'has_page_authorized_adaccount' + id = 'id' + io_number = 'io_number' + is_attribution_spec_system_default = 'is_attribution_spec_system_default' + is_direct_deals_enabled = 'is_direct_deals_enabled' + is_in_3ds_authorization_enabled_market = 'is_in_3ds_authorization_enabled_market' + is_notifications_enabled = 'is_notifications_enabled' + is_personal = 'is_personal' + is_prepay_account = 'is_prepay_account' + is_tax_id_required = 'is_tax_id_required' + liable_address = 'liable_address' + line_numbers = 'line_numbers' + media_agency = 'media_agency' + min_campaign_group_spend_cap = 'min_campaign_group_spend_cap' + min_daily_budget = 'min_daily_budget' + name = 'name' + offsite_pixels_tos_accepted = 'offsite_pixels_tos_accepted' + owner = 'owner' + owner_business = 'owner_business' + partner = 'partner' + rf_spec = 'rf_spec' + send_bill_to_address = 'send_bill_to_address' + show_checkout_experience = 'show_checkout_experience' + sold_to_address = 'sold_to_address' + spend_cap = 'spend_cap' + tax_id = 'tax_id' + tax_id_status = 'tax_id_status' + tax_id_type = 'tax_id_type' + timezone_id = 'timezone_id' + 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' + + class Currency: + aed = 'AED' + ars = 'ARS' + aud = 'AUD' + bdt = 'BDT' + bob = 'BOB' + brl = 'BRL' + cad = 'CAD' + chf = 'CHF' + clp = 'CLP' + cny = 'CNY' + cop = 'COP' + crc = 'CRC' + czk = 'CZK' + dkk = 'DKK' + dzd = 'DZD' + egp = 'EGP' + eur = 'EUR' + gbp = 'GBP' + gtq = 'GTQ' + hkd = 'HKD' + hnl = 'HNL' + huf = 'HUF' + idr = 'IDR' + ils = 'ILS' + inr = 'INR' + isk = 'ISK' + jpy = 'JPY' + kes = 'KES' + krw = 'KRW' + lkr = 'LKR' + mop = 'MOP' + mxn = 'MXN' + myr = 'MYR' + ngn = 'NGN' + nio = 'NIO' + nok = 'NOK' + nzd = 'NZD' + pen = 'PEN' + php = 'PHP' + pkr = 'PKR' + pln = 'PLN' + pyg = 'PYG' + qar = 'QAR' + ron = 'RON' + sar = 'SAR' + sek = 'SEK' + sgd = 'SGD' + thb = 'THB' + value_try = 'TRY' + twd = 'TWD' + uah = 'UAH' + usd = 'USD' + uyu = 'UYU' + 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' + analyze = 'ANALYZE' + draft = 'DRAFT' + manage = 'MANAGE' + + class ClaimObjective: + automotive_model = 'AUTOMOTIVE_MODEL' + collaborative_ads = 'COLLABORATIVE_ADS' + home_listing = 'HOME_LISTING' + media_title = 'MEDIA_TITLE' + product = 'PRODUCT' + travel = 'TRAVEL' + vehicle = 'VEHICLE' + vehicle_offer = 'VEHICLE_OFFER' + + class ContentType: + automotive_model = 'AUTOMOTIVE_MODEL' + destination = 'DESTINATION' + flight = 'FLIGHT' + 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' + vehicle = 'VEHICLE' + vehicle_offer = 'VEHICLE_OFFER' + + class Subtype: + app = 'APP' + bag_of_accounts = 'BAG_OF_ACCOUNTS' + bidding = 'BIDDING' + claim = 'CLAIM' + custom = 'CUSTOM' + engagement = 'ENGAGEMENT' + fox = 'FOX' + lookalike = 'LOOKALIKE' + managed = 'MANAGED' + measurement = 'MEASUREMENT' + offline_conversion = 'OFFLINE_CONVERSION' + partner = 'PARTNER' + primary = 'PRIMARY' + regulated_categories_audience = 'REGULATED_CATEGORIES_AUDIENCE' + study_rule_audience = 'STUDY_RULE_AUDIENCE' + subscriber_segment = 'SUBSCRIBER_SEGMENT' + video = 'VIDEO' + website = 'WEBSITE' + + class ActionSource: + physical_store = 'PHYSICAL_STORE' + website = 'WEBSITE' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adaccounts' + + 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=AdAccount, + 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 = { + 'agency_client_declaration': 'map', + 'attribution_spec': 'list', + 'business_info': 'map', + 'currency': 'currency_enum', + 'custom_audience_info': 'map', + 'default_dsa_beneficiary': 'string', + 'default_dsa_payor': 'string', + 'end_advertiser': 'string', + 'existing_customers': 'list', + 'is_notifications_enabled': 'bool', + 'media_agency': 'string', + 'name': 'string', + 'partner': 'string', + 'spend_cap': 'float', + 'spend_cap_action': 'string', + 'timezone_id': 'unsigned int', + 'tos_accepted': 'map', + } + enums = { + 'currency_enum': AdAccount.Currency.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccount, + 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_account_controls(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccountbusinessconstraints import AdAccountBusinessConstraints + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/account_controls', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountBusinessConstraints, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountBusinessConstraints, 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_account_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccountbusinessconstraints import AdAccountBusinessConstraints + param_types = { + 'audience_controls': 'Object', + 'placement_controls': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/account_controls', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountBusinessConstraints, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountBusinessConstraints, 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_activities(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adactivity import AdActivity + param_types = { + 'add_children': 'bool', + 'after': 'string', + 'business_id': 'string', + 'category': 'category_enum', + 'data_source': 'data_source_enum', + 'extra_oids': 'list', + 'limit': 'int', + 'oid': 'string', + 'since': 'datetime', + 'uid': 'int', + 'until': 'datetime', + } + enums = { + 'category_enum': AdActivity.Category.__dict__.values(), + 'data_source_enum': AdActivity.DataSource.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/activities', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdActivity, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdActivity, 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_ad_place_page_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.adplacepageset import AdPlacePageSet + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ad_place_page_sets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdPlacePageSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdPlacePageSet, 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_ad_place_page_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.adplacepageset import AdPlacePageSet + param_types = { + 'location_types': 'list', + 'name': 'string', + 'parent_page': 'string', + 'targeted_area_type': 'targeted_area_type_enum', + } + enums = { + 'location_types_enum': AdPlacePageSet.LocationTypes.__dict__.values(), + 'targeted_area_type_enum': AdPlacePageSet.TargetedAreaType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/ad_place_page_sets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdPlacePageSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdPlacePageSet, 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_ad_place_page_sets_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adplacepageset import AdPlacePageSet + param_types = { + 'location_types': 'list', + 'name': 'string', + 'parent_page': 'string', + 'targeted_area_type': 'targeted_area_type_enum', + } + enums = { + 'location_types_enum': AdPlacePageSet.LocationTypes.__dict__.values(), + 'targeted_area_type_enum': AdPlacePageSet.TargetedAreaType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/ad_place_page_sets_async', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdPlacePageSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdPlacePageSet, 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_ad_saved_keywords(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ad_saved_keywords', + 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_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudy import AdStudy + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ad_studies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_ad_cloud_playables(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.cloudgame import CloudGame + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adcloudplayables', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CloudGame, + api_type='EDGE', + response_parser=ObjectParser(target_class=CloudGame, 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_ad_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.adcreative import AdCreative + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adcreatives', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCreative, 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_ad_creative(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adcreative import AdCreative + param_types = { + 'actor_id': 'unsigned int', + 'adlabels': 'list', + 'applink_treatment': 'applink_treatment_enum', + 'asset_feed_spec': 'Object', + 'authorization_category': 'authorization_category_enum', + 'body': 'string', + 'branded_content': 'map', + 'branded_content_sponsor_page_id': 'string', + 'bundle_folder_id': 'string', + 'call_to_action': 'Object', + 'categorization_criteria': 'categorization_criteria_enum', + 'category_media_source': 'category_media_source_enum', + 'degrees_of_freedom_spec': 'map', + 'destination_set_id': 'string', + 'dynamic_ad_voice': 'dynamic_ad_voice_enum', + 'enable_launch_instant_app': 'bool', + 'facebook_branded_content': 'map', + 'image_crops': 'map', + 'image_file': 'string', + 'image_hash': 'string', + 'image_url': 'string', + 'instagram_actor_id': 'string', + 'instagram_branded_content': 'map', + 'instagram_permalink_url': 'string', + 'instagram_user_id': 'string', + 'interactive_components_spec': 'map', + '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', + 'object_story_spec': 'AdCreativeObjectStorySpec', + 'object_type': 'string', + 'object_url': 'string', + 'omnichannel_link_spec': 'map', + 'place_page_set_id': 'string', + 'platform_customizations': 'Object', + 'playable_asset_id': 'string', + 'portrait_customizations': 'map', + 'product_set_id': 'string', + 'recommender_settings': 'map', + 'source_instagram_media_id': 'string', + 'template_url': 'string', + 'template_url_spec': 'string', + 'thumbnail_url': 'string', + 'title': 'string', + 'url_tags': 'string', + 'use_page_actor_override': 'bool', + } + enums = { + 'applink_treatment_enum': AdCreative.ApplinkTreatment.__dict__.values(), + 'authorization_category_enum': AdCreative.AuthorizationCategory.__dict__.values(), + 'categorization_criteria_enum': AdCreative.CategorizationCriteria.__dict__.values(), + 'category_media_source_enum': AdCreative.CategoryMediaSource.__dict__.values(), + 'dynamic_ad_voice_enum': AdCreative.DynamicAdVoice.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adcreatives', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCreative, 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_ad_creatives_by_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adcreative import AdCreative + param_types = { + 'ad_label_ids': 'list', + 'operator': 'operator_enum', + } + enums = { + 'operator_enum': AdCreative.Operator.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adcreativesbylabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCreative, 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_ad_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.') + param_types = { + 'hash': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/adimages', + 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_ad_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.adimage import AdImage + param_types = { + 'biz_tag_id': 'unsigned int', + 'business_id': 'string', + 'hashes': 'list', + 'minheight': 'unsigned int', + 'minwidth': 'unsigned int', + 'name': 'string', + 'selected_hashes': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adimages', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdImage, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdImage, 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_ad_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.adimage import AdImage + param_types = { + 'bytes': 'string', + 'copy_from': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adimages', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdImage, + api_type='EDGE', + allow_file_upload=True, + response_parser=ObjectParser(target_class=AdImage, 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_ad_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adlabel import AdLabel + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adlabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdLabel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdLabel, 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adlabel import AdLabel + param_types = { + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adlabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdLabel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdLabel, 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_ad_playables(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.playablecontent import PlayableContent + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adplayables', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PlayableContent, + api_type='EDGE', + response_parser=ObjectParser(target_class=PlayableContent, 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_ad_playable(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.playablecontent import PlayableContent + param_types = { + 'app_id': 'string', + 'name': 'string', + 'session_id': 'string', + 'source': 'file', + 'source_url': 'string', + 'source_zip': 'file', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adplayables', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PlayableContent, + api_type='EDGE', + response_parser=ObjectParser(target_class=PlayableContent, 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_ad_rules_history(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccountadruleshistory import AdAccountAdRulesHistory + param_types = { + 'action': 'action_enum', + 'evaluation_type': 'evaluation_type_enum', + 'hide_no_changes': 'bool', + 'object_id': 'string', + } + enums = { + 'action_enum': AdAccountAdRulesHistory.Action.__dict__.values(), + 'evaluation_type_enum': AdAccountAdRulesHistory.EvaluationType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adrules_history', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountAdRulesHistory, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountAdRulesHistory, 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_ad_rules_library(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adrule import AdRule + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adrules_library', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdRule, 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_ad_rules_library(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adrule import AdRule + param_types = { + 'account_id': 'string', + 'evaluation_spec': 'Object', + 'execution_spec': 'Object', + 'name': 'string', + 'schedule_spec': 'Object', + 'status': 'status_enum', + 'ui_creation_source': 'ui_creation_source_enum', + } + enums = { + 'status_enum': AdRule.Status.__dict__.values(), + 'ui_creation_source_enum': AdRule.UiCreationSource.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adrules_library', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdRule, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.ad import Ad + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'time_range': 'map', + 'updated_since': 'int', + } + enums = { + 'date_preset_enum': Ad.DatePreset.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_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.') + 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', + 'audience_id': 'string', + 'bid_amount': 'int', + 'conversion_domain': 'string', + 'creative': 'AdCreative', + 'date_format': 'string', + 'display_sequence': 'unsigned int', + 'draft_adgroup_id': 'string', + 'engagement_audience': 'bool', + 'execution_options': 'list', + 'include_demolink_hashes': 'bool', + 'name': 'string', + 'priority': 'unsigned int', + 'source_ad_id': 'string', + 'status': 'status_enum', + 'tracking_specs': 'Object', + } + enums = { + 'execution_options_enum': Ad.ExecutionOptions.__dict__.values(), + 'status_enum': Ad.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/ads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + allow_file_upload=True, + response_parser=ObjectParser(target_class=Ad, 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.') + param_types = { + 'filtering': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads_reporting_mmm_reports', + 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_schedulers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/ads_reporting_mmm_schedulers', + 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_volume(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccountadvolume import AdAccountAdVolume + param_types = { + 'page_id': 'int', + 'recommendation_type': 'recommendation_type_enum', + 'show_breakdown_by_actor': 'bool', + } + enums = { + 'recommendation_type_enum': AdAccountAdVolume.RecommendationType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads_volume', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountAdVolume, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountAdVolume, 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_by_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.ad import Ad + param_types = { + 'ad_label_ids': 'list', + 'operator': 'operator_enum', + } + enums = { + 'operator_enum': Ad.Operator.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adsbylabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_ad_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.adset import AdSet + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'is_completed': 'bool', + 'time_range': 'map', + 'updated_since': 'int', + } + enums = { + 'date_preset_enum': AdSet.DatePreset.__dict__.values(), + 'effective_status_enum': AdSet.EffectiveStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_ad_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.adset import AdSet + param_types = { + 'adlabels': 'list', + 'adset_schedule': 'list', + 'attribution_spec': 'list', + 'bid_adjustments': 'Object', + 'bid_amount': 'int', + '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', + 'daily_budget': 'unsigned int', + 'daily_imps': 'unsigned int', + 'daily_min_spend_target': 'unsigned int', + 'daily_spend_cap': 'unsigned int', + 'date_format': 'string', + 'destination_type': 'destination_type_enum', + 'dsa_beneficiary': 'string', + 'dsa_payor': 'string', + 'end_time': 'datetime', + 'execution_options': 'list', + 'existing_customer_budget_percentage': 'unsigned int', + 'frequency_control_specs': 'list', + 'full_funnel_exploration_mode': 'full_funnel_exploration_mode_enum', + 'is_dynamic_creative': 'bool', + 'lifetime_budget': 'unsigned int', + 'lifetime_imps': 'unsigned int', + 'lifetime_min_spend_target': 'unsigned int', + 'lifetime_spend_cap': 'unsigned int', + 'line_number': 'unsigned int', + 'multi_optimization_goal_weight': 'multi_optimization_goal_weight_enum', + 'name': 'string', + 'optimization_goal': 'optimization_goal_enum', + 'optimization_sub_event': 'optimization_sub_event_enum', + 'pacing_type': 'list', + 'promoted_object': 'Object', + 'rb_prediction_id': 'string', + 'rf_prediction_id': 'string', + 'source_adset_id': 'string', + 'start_time': 'datetime', + 'status': 'status_enum', + 'targeting': 'Targeting', + 'time_based_ad_rotation_id_blocks': 'list>', + 'time_based_ad_rotation_intervals': 'list', + 'time_start': 'datetime', + 'time_stop': 'datetime', + 'topline_id': 'string', + 'tune_for_category': 'tune_for_category_enum', + } + enums = { + 'bid_strategy_enum': AdSet.BidStrategy.__dict__.values(), + 'billing_event_enum': AdSet.BillingEvent.__dict__.values(), + 'destination_type_enum': AdSet.DestinationType.__dict__.values(), + 'execution_options_enum': AdSet.ExecutionOptions.__dict__.values(), + 'full_funnel_exploration_mode_enum': AdSet.FullFunnelExplorationMode.__dict__.values(), + 'multi_optimization_goal_weight_enum': AdSet.MultiOptimizationGoalWeight.__dict__.values(), + 'optimization_goal_enum': AdSet.OptimizationGoal.__dict__.values(), + 'optimization_sub_event_enum': AdSet.OptimizationSubEvent.__dict__.values(), + 'status_enum': AdSet.Status.__dict__.values(), + 'tune_for_category_enum': AdSet.TuneForCategory.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_ad_sets_by_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adset import AdSet + param_types = { + 'ad_label_ids': 'list', + 'operator': 'operator_enum', + } + enums = { + 'operator_enum': AdSet.Operator.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adsetsbylabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'sort_by': 'sort_by_enum', + } + enums = { + 'sort_by_enum': AdsPixel.SortBy.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adspixels', + 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_ads_pixel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adspixels', + 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_advertisable_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 = { + 'app_id': 'string', + 'business_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/advertisable_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 delete_ad_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'video_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/advideos', + 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_ad_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.advideo import AdVideo + param_types = { + 'max_aspect_ratio': 'float', + 'maxheight': 'unsigned int', + 'maxlength': 'unsigned int', + 'maxwidth': 'unsigned int', + 'min_aspect_ratio': 'float', + 'minheight': 'unsigned int', + 'minlength': 'unsigned int', + 'minwidth': 'unsigned int', + 'title': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/advideos', + 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) + + if batch is 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_ad_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 = { + 'adaptive_type': 'string', + '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_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', + 'name': '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', + 'react_mode_metadata': 'string', + 'referenced_sticker_id': 'string', + 'replace_video_id': 'string', + 'slideshow_spec': 'map', + 'source': 'file', + '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', + 'video_file_chunk': 'file', + '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(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/advideos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdVideo, + api_type='EDGE', + allow_file_upload=True, + response_parser=ObjectParser(target_class=AdVideo, 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_affected_ad_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.adset import AdSet + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/affectedadsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_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): + 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='/agencies', + 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_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): + 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='/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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'user': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/assigned_users', + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.assigneduser import AssignedUser + param_types = { + 'business': 'string', + } + 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() + + def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'tasks': 'list', + 'user': 'int', + } + enums = { + 'tasks_enum': AdAccount.Tasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/assigned_users', + 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 create_async_batch_request(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.campaign import Campaign + param_types = { + 'adbatch': 'list', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/async_batch_requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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_async_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.asyncrequest import AsyncRequest + param_types = { + 'status': 'status_enum', + 'type': 'type_enum', + } + enums = { + 'status_enum': AsyncRequest.Status.__dict__.values(), + 'type_enum': AsyncRequest.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/async_requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AsyncRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=AsyncRequest, 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_async_ad_request_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.adasyncrequestset import AdAsyncRequestSet + param_types = { + 'is_completed': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/asyncadrequestsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAsyncRequestSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAsyncRequestSet, 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_async_ad_request_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.adasyncrequestset import AdAsyncRequestSet + param_types = { + 'ad_specs': 'list', + 'name': 'string', + 'notification_mode': 'notification_mode_enum', + 'notification_uri': 'string', + } + enums = { + 'notification_mode_enum': AdAsyncRequestSet.NotificationMode.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/asyncadrequestsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAsyncRequestSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAsyncRequestSet, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'publisher_urls_file': 'file', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/block_list_drafts', + 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_broad_targeting_categories(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.broadtargetingcategories import BroadTargetingCategories + param_types = { + 'custom_categories_only': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/broadtargetingcategories', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BroadTargetingCategories, + api_type='EDGE', + response_parser=ObjectParser(target_class=BroadTargetingCategories, 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_business_projects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='GET', + endpoint='/businessprojects', + 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'before_date': 'datetime', + 'delete_offset': 'unsigned int', + 'delete_strategy': 'delete_strategy_enum', + 'object_count': 'int', + } + enums = { + 'delete_strategy_enum': [ + 'DELETE_ANY', + 'DELETE_ARCHIVED_BEFORE', + 'DELETE_OLDEST', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/campaigns', + 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.campaign import Campaign + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'is_completed': 'bool', + 'time_range': 'map', + } + enums = { + 'date_preset_enum': Campaign.DatePreset.__dict__.values(), + 'effective_status_enum': Campaign.EffectiveStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/campaigns', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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_campaign(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.campaign import Campaign + param_types = { + 'adlabels': 'list', + 'bid_strategy': 'bid_strategy_enum', + 'buying_type': 'string', + 'daily_budget': 'unsigned int', + 'execution_options': 'list', + 'is_skadnetwork_attribution': 'bool', + 'iterative_split_test_configs': 'list', + 'lifetime_budget': 'unsigned int', + 'name': 'string', + 'objective': 'objective_enum', + 'pacing_type': 'list', + 'promoted_object': 'Object', + 'smart_promotion_type': 'smart_promotion_type_enum', + 'source_campaign_id': 'string', + 'special_ad_categories': 'list', + 'special_ad_category_country': 'list', + 'spend_cap': 'unsigned int', + 'start_time': 'datetime', + 'status': 'status_enum', + 'stop_time': 'datetime', + 'topline_id': 'string', + } + enums = { + 'bid_strategy_enum': Campaign.BidStrategy.__dict__.values(), + 'execution_options_enum': Campaign.ExecutionOptions.__dict__.values(), + 'objective_enum': Campaign.Objective.__dict__.values(), + 'smart_promotion_type_enum': Campaign.SmartPromotionType.__dict__.values(), + 'special_ad_categories_enum': Campaign.SpecialAdCategories.__dict__.values(), + 'special_ad_category_country_enum': Campaign.SpecialAdCategoryCountry.__dict__.values(), + 'status_enum': Campaign.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/campaigns', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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_campaigns_by_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.campaign import Campaign + param_types = { + 'ad_label_ids': 'list', + 'operator': 'operator_enum', + } + enums = { + 'operator_enum': Campaign.Operator.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/campaignsbylabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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_connected_instagram_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.iguser import IGUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/connected_instagram_accounts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGUser, 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_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/conversion_goals', + 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_custom_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.customaudience import CustomAudience + param_types = { + 'business_id': 'string', + 'fetch_primary_audience': 'bool', + 'fields': 'list', + 'filtering': 'list', + 'pixel_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/customaudiences', + 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 create_custom_audience(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customaudience import CustomAudience + param_types = { + 'allowed_domains': 'list', + 'associated_audience_id': 'unsigned int', + 'claim_objective': 'claim_objective_enum', + 'content_type': 'content_type_enum', + 'countries': 'string', + 'creation_params': 'map', + 'customer_file_source': 'customer_file_source_enum', + 'dataset_id': 'string', + 'description': 'string', + 'enable_fetch_or_create': 'bool', + 'event_source_group': 'string', + 'event_sources': 'list', + 'exclusions': 'list', + 'inclusions': 'list', + 'is_snapshot': 'bool', + 'is_value_based': 'bool', + 'list_of_accounts': 'list', + 'lookalike_spec': 'string', + 'name': 'string', + 'opt_out_link': 'string', + 'origin_audience_id': 'string', + 'parent_audience_id': 'unsigned int', + 'partner_reference_key': 'string', + 'pixel_id': 'string', + 'prefill': 'bool', + 'product_set_id': 'string', + 'regulated_audience_spec': 'string', + 'retention_days': 'unsigned int', + 'rev_share_policy_id': 'unsigned int', + 'rule': 'string', + 'rule_aggregation': 'string', + '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(), + 'content_type_enum': CustomAudience.ContentType.__dict__.values(), + 'customer_file_source_enum': CustomAudience.CustomerFileSource.__dict__.values(), + 'subtype_enum': CustomAudience.Subtype.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/customaudiences', + 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_custom_audiences_tos(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customaudiencestos import CustomAudiencesTOS + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/customaudiencestos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomAudiencesTOS, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomAudiencesTOS, 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_custom_audiences_to(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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': 'string', + 'tos_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/customaudiencestos', + 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customconversion import CustomConversion + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/customconversions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversion, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomConversion, 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_custom_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customconversion import CustomConversion + param_types = { + 'advanced_rule': 'string', + 'custom_event_type': 'custom_event_type_enum', + 'default_conversion_value': 'float', + 'description': 'string', + 'event_source_id': 'string', + 'name': 'string', + 'rule': 'string', + } + enums = { + 'custom_event_type_enum': CustomConversion.CustomEventType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/customconversions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversion, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomConversion, 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_delivery_estimate(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccountdeliveryestimate import AdAccountDeliveryEstimate + param_types = { + 'optimization_goal': 'optimization_goal_enum', + 'promoted_object': 'Object', + 'targeting_spec': 'Targeting', + } + enums = { + 'optimization_goal_enum': AdAccountDeliveryEstimate.OptimizationGoal.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/delivery_estimate', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountDeliveryEstimate, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountDeliveryEstimate, 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_deprecated_targeting_ad_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.adset import AdSet + param_types = { + 'type': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/deprecatedtargetingadsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adpreview import AdPreview + param_types = { + 'ad_format': 'ad_format_enum', + 'creative': 'AdCreative', + 'creative_feature': 'creative_feature_enum', + 'dynamic_asset_label': 'string', + 'dynamic_creative_spec': 'Object', + 'dynamic_customization': 'Object', + 'end_date': 'datetime', + 'height': 'unsigned int', + 'locale': 'string', + 'place_page_id': 'int', + 'post': 'Object', + 'product_item_ids': 'list', + 'render_type': 'render_type_enum', + 'start_date': 'datetime', + 'width': 'unsigned int', + } + enums = { + 'ad_format_enum': AdPreview.AdFormat.__dict__.values(), + 'creative_feature_enum': AdPreview.CreativeFeature.__dict__.values(), + 'render_type_enum': AdPreview.RenderType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/generatepreviews', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdPreview, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdPreview, 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_impacting_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudy import AdStudy + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/impacting_ad_studies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_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.adsinsights import AdsInsights + if is_async: + return self.get_insights_async(fields, params, batch, success, failure, pending) + param_types = { + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'action_report_time_enum', + 'breakdowns': 'list', + 'date_preset': 'date_preset_enum', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'level_enum', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + enums = { + 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), + 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), + 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), + 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), + 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), + 'level_enum': AdsInsights.Level.__dict__.values(), + 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsInsights, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsInsights, 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() + + def get_insights_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adreportrun import AdReportRun + from facebook_business.adobjects.adsinsights import AdsInsights + param_types = { + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'action_report_time_enum', + 'breakdowns': 'list', + 'date_preset': 'date_preset_enum', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'level_enum', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + enums = { + 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), + 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), + 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), + 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), + 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), + 'level_enum': AdsInsights.Level.__dict__.values(), + 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), + } + + if fields is not None: + params['fields'] = params.get('fields') if params.get('fields') is not None else list() + params['fields'].extend(field for field in fields if field not in params['fields']) + + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdReportRun, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdReportRun, api=self._api), + include_summary=False, + ) + request.add_params(params) + + if batch is 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_instagram_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.instagramuser import InstagramUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/instagram_accounts', + 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_ios_fourteen_campaign_limits(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccountiosfourteencampaignlimits import AdAccountIosFourteenCampaignLimits + param_types = { + 'app_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ios_fourteen_campaign_limits', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountIosFourteenCampaignLimits, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountIosFourteenCampaignLimits, 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_managed_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.') + param_types = { + 'campaign_group_id': 'unsigned int', + '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', + 'override_targeting_countries': 'list', + 'product_set_id': 'string', + 'start_time': 'unsigned int', + 'use_marketplace_template': 'bool', + 'use_seller_template': 'bool', + } + enums = { + 'campaign_group_status_enum': [ + 'ACTIVE', + 'ADSET_PAUSED', + 'ARCHIVED', + 'CAMPAIGN_PAUSED', + 'DELETED', + 'DISAPPROVED', + 'IN_PROCESS', + 'PAUSED', + 'PENDING_BILLING_INFO', + 'PENDING_REVIEW', + 'PREAPPROVED', + 'WITH_ISSUES', + ], + 'custom_event_type_enum': [ + 'ADD_TO_CART', + 'CONTENT_VIEW', + 'PURCHASE', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/managed_partner_ads', + 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_matched_search_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.adaccountmatchedsearchapplicationsedgedata import AdAccountMatchedSearchApplicationsEdgeData + param_types = { + 'allow_incomplete_app': 'bool', + 'app_store': 'app_store_enum', + 'app_store_country': 'string', + 'business_id': 'string', + 'is_skadnetwork_search': 'bool', + 'only_apps_with_permission': 'bool', + 'query_term': 'string', + } + enums = { + 'app_store_enum': AdAccountMatchedSearchApplicationsEdgeData.AppStore.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/matched_search_applications', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountMatchedSearchApplicationsEdgeData, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountMatchedSearchApplicationsEdgeData, 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_max_bid(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccountmaxbid import AdAccountMaxBid + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/max_bid', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountMaxBid, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountMaxBid, 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_minimum_budgets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.minimumbudget import MinimumBudget + param_types = { + 'bid_amount': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/minimum_budgets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MinimumBudget, + api_type='EDGE', + response_parser=ObjectParser(target_class=MinimumBudget, 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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessownedobjectonbehalfofrequest import BusinessOwnedObjectOnBehalfOfRequest + param_types = { + 'status': 'status_enum', + } + enums = { + 'status_enum': BusinessOwnedObjectOnBehalfOfRequest.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/onbehalf_requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessOwnedObjectOnBehalfOfRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessOwnedObjectOnBehalfOfRequest, 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_product_audience(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customaudience import CustomAudience + param_types = { + 'allowed_domains': 'list', + 'associated_audience_id': 'unsigned int', + 'claim_objective': 'claim_objective_enum', + 'content_type': 'content_type_enum', + 'creation_params': 'map', + 'description': 'string', + 'enable_fetch_or_create': 'bool', + 'event_source_group': 'string', + 'event_sources': 'list', + 'exclusions': 'list', + 'inclusions': 'list', + 'is_snapshot': 'bool', + 'is_value_based': 'bool', + 'name': 'string', + 'opt_out_link': 'string', + 'parent_audience_id': 'unsigned int', + 'product_set_id': 'string', + 'rev_share_policy_id': 'unsigned int', + 'subtype': 'subtype_enum', + } + enums = { + 'claim_objective_enum': AdAccount.ClaimObjective.__dict__.values(), + 'content_type_enum': AdAccount.ContentType.__dict__.values(), + 'subtype_enum': AdAccount.Subtype.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/product_audiences', + 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_promote_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.') + from facebook_business.adobjects.page import Page + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/promote_pages', + 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_publisher_block_lists(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.publisherblocklist import PublisherBlockList + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/publisher_block_lists', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PublisherBlockList, + api_type='EDGE', + response_parser=ObjectParser(target_class=PublisherBlockList, 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_publisher_block_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.publisherblocklist import PublisherBlockList + param_types = { + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/publisher_block_lists', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PublisherBlockList, + api_type='EDGE', + response_parser=ObjectParser(target_class=PublisherBlockList, 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_reach_estimate(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccountreachestimate import AdAccountReachEstimate + param_types = { + 'adgroup_ids': 'list', + 'caller_id': 'string', + 'concepts': 'string', + 'creative_action_spec': 'string', + 'is_debug': 'bool', + 'object_store_url': 'string', + 'targeting_spec': 'Targeting', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/reachestimate', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountReachEstimate, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountReachEstimate, 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_reach_frequency_predictions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.reachfrequencyprediction import ReachFrequencyPrediction + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/reachfrequencypredictions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ReachFrequencyPrediction, + api_type='EDGE', + response_parser=ObjectParser(target_class=ReachFrequencyPrediction, 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_reach_frequency_prediction(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.reachfrequencyprediction import ReachFrequencyPrediction + param_types = { + 'action': 'action_enum', + 'ad_formats': 'list', + 'auction_entry_option_index': 'unsigned int', + 'budget': 'unsigned int', + 'buying_type': 'buying_type_enum', + 'campaign_group_id': 'string', + 'day_parting_schedule': 'list', + 'deal_id': 'string', + 'destination_id': 'unsigned int', + 'destination_ids': 'list', + 'end_time': 'unsigned int', + 'exceptions': 'bool', + 'existing_campaign_id': 'string', + 'expiration_time': 'unsigned int', + 'frequency_cap': 'unsigned int', + 'grp_buying': 'bool', + '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', + 'is_higher_average_frequency': 'bool', + 'is_reach_and_frequency_io_buying': 'bool', + 'is_reserved_buying': 'bool', + 'num_curve_points': 'unsigned int', + 'objective': 'string', + 'optimization_goal': 'string', + 'prediction_mode': 'unsigned int', + 'reach': 'unsigned int', + 'rf_prediction_id': 'string', + 'rf_prediction_id_to_release': 'string', + 'rf_prediction_id_to_share': 'string', + 'start_time': 'unsigned int', + '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', + } + enums = { + 'action_enum': ReachFrequencyPrediction.Action.__dict__.values(), + 'buying_type_enum': ReachFrequencyPrediction.BuyingType.__dict__.values(), + 'instream_packages_enum': ReachFrequencyPrediction.InstreamPackages.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/reachfrequencypredictions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ReachFrequencyPrediction, + api_type='EDGE', + response_parser=ObjectParser(target_class=ReachFrequencyPrediction, 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_saved_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.savedaudience import SavedAudience + param_types = { + 'business_id': 'string', + 'fields': 'list', + 'filtering': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/saved_audiences', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=SavedAudience, + api_type='EDGE', + response_parser=ObjectParser(target_class=SavedAudience, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'app_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/subscribed_apps', + 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_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.') + from facebook_business.adobjects.adaccountsubscribedapps import AdAccountSubscribedApps + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/subscribed_apps', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountSubscribedApps, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountSubscribedApps, 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_subscribed_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.') + from facebook_business.adobjects.adaccountsubscribedapps import AdAccountSubscribedApps + param_types = { + 'app_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/subscribed_apps', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountSubscribedApps, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountSubscribedApps, 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_targeting_browse(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccounttargetingunified import AdAccountTargetingUnified + param_types = { + 'excluded_category': 'string', + 'include_nodes': 'bool', + 'is_exclusion': 'bool', + 'limit_type': 'limit_type_enum', + 'regulated_categories': 'list', + 'regulated_countries': 'list', + 'whitelisted_types': 'list', + } + enums = { + 'limit_type_enum': AdAccountTargetingUnified.LimitType.__dict__.values(), + 'regulated_categories_enum': AdAccountTargetingUnified.RegulatedCategories.__dict__.values(), + 'regulated_countries_enum': AdAccountTargetingUnified.RegulatedCountries.__dict__.values(), + 'whitelisted_types_enum': AdAccountTargetingUnified.WhitelistedTypes.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/targetingbrowse', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountTargetingUnified, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountTargetingUnified, 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_targeting_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.adaccounttargetingunified import AdAccountTargetingUnified + param_types = { + 'allow_only_fat_head_interests': 'bool', + 'app_store': 'app_store_enum', + 'countries': 'list', + 'is_exclusion': 'bool', + 'limit_type': 'limit_type_enum', + 'objective': 'objective_enum', + 'promoted_object': 'Object', + 'q': 'string', + 'regulated_categories': 'list', + 'regulated_countries': 'list', + 'session_id': 'unsigned int', + 'targeting_list': 'list', + 'whitelisted_types': 'list', + } + enums = { + 'app_store_enum': AdAccountTargetingUnified.AppStore.__dict__.values(), + 'limit_type_enum': AdAccountTargetingUnified.LimitType.__dict__.values(), + 'objective_enum': AdAccountTargetingUnified.Objective.__dict__.values(), + 'regulated_categories_enum': AdAccountTargetingUnified.RegulatedCategories.__dict__.values(), + 'regulated_countries_enum': AdAccountTargetingUnified.RegulatedCountries.__dict__.values(), + 'whitelisted_types_enum': AdAccountTargetingUnified.WhitelistedTypes.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/targetingsearch', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountTargetingUnified, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountTargetingUnified, 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_targeting_sentence_lines(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.targetingsentenceline import TargetingSentenceLine + param_types = { + 'discard_ages': 'bool', + 'discard_placements': 'bool', + 'hide_targeting_spec_from_return': 'bool', + 'targeting_spec': 'Targeting', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/targetingsentencelines', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=TargetingSentenceLine, + api_type='EDGE', + response_parser=ObjectParser(target_class=TargetingSentenceLine, 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_targeting_suggestions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccounttargetingunified import AdAccountTargetingUnified + param_types = { + 'app_store': 'app_store_enum', + 'countries': 'list', + 'limit_type': 'limit_type_enum', + 'mode': 'mode_enum', + 'objective': 'objective_enum', + 'objects': 'Object', + 'regulated_categories': 'list', + 'regulated_countries': 'list', + 'session_id': 'unsigned int', + 'targeting_list': 'list', + 'whitelisted_types': 'list', + } + enums = { + 'app_store_enum': AdAccountTargetingUnified.AppStore.__dict__.values(), + 'limit_type_enum': AdAccountTargetingUnified.LimitType.__dict__.values(), + 'mode_enum': AdAccountTargetingUnified.Mode.__dict__.values(), + 'objective_enum': AdAccountTargetingUnified.Objective.__dict__.values(), + 'regulated_categories_enum': AdAccountTargetingUnified.RegulatedCategories.__dict__.values(), + 'regulated_countries_enum': AdAccountTargetingUnified.RegulatedCountries.__dict__.values(), + 'whitelisted_types_enum': AdAccountTargetingUnified.WhitelistedTypes.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/targetingsuggestions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountTargetingUnified, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountTargetingUnified, 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_targeting_validation(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccounttargetingunified import AdAccountTargetingUnified + param_types = { + 'id_list': 'list', + 'is_exclusion': 'bool', + 'name_list': 'list', + 'targeting_list': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/targetingvalidation', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountTargetingUnified, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountTargetingUnified, 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_tracking(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adaccounttrackingdata import AdAccountTrackingData + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/tracking', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountTrackingData, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountTrackingData, 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_tracking(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'tracking_specs': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/tracking', + 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_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.adaccountuser import AdAccountUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountUser, 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_users_of_any_audience(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'namespace': 'string', + 'payload': 'Object', + 'session': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/usersofanyaudience', + 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_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.') + 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=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_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', + 'business': 'Business', + 'business_city': 'string', + 'business_country_code': 'string', + 'business_name': 'string', + 'business_state': 'string', + 'business_street': 'string', + 'business_street2': 'string', + 'business_zip': 'string', + 'can_create_brand_lift_study': 'bool', + 'capabilities': 'list', + 'created_time': 'datetime', + 'currency': 'string', + 'custom_audience_info': 'CustomAudienceGroup', + 'default_dsa_beneficiary': 'string', + 'default_dsa_payor': 'string', + 'disable_reason': 'unsigned int', + 'end_advertiser': 'string', + 'end_advertiser_name': 'string', + 'existing_customers': 'list', + 'extended_credit_invoice_group': 'ExtendedCreditInvoiceGroup', + 'failed_delivery_checks': 'list', + 'fb_entity': 'unsigned int', + 'funding_source': 'string', + 'funding_source_details': 'FundingSourceDetails', + 'has_migrated_permissions': 'bool', + 'has_page_authorized_adaccount': 'bool', + 'id': 'string', + 'io_number': 'string', + 'is_attribution_spec_system_default': 'bool', + 'is_direct_deals_enabled': 'bool', + 'is_in_3ds_authorization_enabled_market': 'bool', + 'is_notifications_enabled': 'bool', + 'is_personal': 'unsigned int', + 'is_prepay_account': 'bool', + 'is_tax_id_required': 'bool', + 'liable_address': 'CRMAddress', + 'line_numbers': 'list', + 'media_agency': 'string', + 'min_campaign_group_spend_cap': 'string', + 'min_daily_budget': 'unsigned int', + 'name': 'string', + 'offsite_pixels_tos_accepted': 'bool', + 'owner': 'string', + 'owner_business': 'Business', + 'partner': 'string', + 'rf_spec': 'ReachFrequencySpec', + 'send_bill_to_address': 'CRMAddress', + 'show_checkout_experience': 'bool', + 'sold_to_address': 'CRMAddress', + 'spend_cap': 'string', + 'tax_id': 'string', + 'tax_id_status': 'unsigned int', + 'tax_id_type': 'string', + 'timezone_id': 'unsigned int', + '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', + } + @classmethod + 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() + field_enum_info['Subtype'] = AdAccount.Subtype.__dict__.values() + field_enum_info['ActionSource'] = AdAccount.ActionSource.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountadruleshistory.py b/tap_facebook/facebook_business/adobjects/adaccountadruleshistory.py new file mode 100644 index 0000000..8142197 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountadruleshistory.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 AdAccountAdRulesHistory( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAdRulesHistory, self).__init__() + self._isAdAccountAdRulesHistory = True + self._api = api + + class Field(AbstractObject.Field): + evaluation_spec = 'evaluation_spec' + exception_code = 'exception_code' + exception_message = 'exception_message' + execution_spec = 'execution_spec' + is_manual = 'is_manual' + results = 'results' + rule_id = 'rule_id' + schedule_spec = 'schedule_spec' + timestamp = 'timestamp' + + class Action: + budget_not_redistributed = 'BUDGET_NOT_REDISTRIBUTED' + changed_bid = 'CHANGED_BID' + changed_budget = 'CHANGED_BUDGET' + email = 'EMAIL' + 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_semantic_based_audience_expansion = 'ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION' + endpoint_pinged = 'ENDPOINT_PINGED' + error = 'ERROR' + facebook_notification_sent = 'FACEBOOK_NOTIFICATION_SENT' + message_sent = 'MESSAGE_SENT' + not_changed = 'NOT_CHANGED' + paused = 'PAUSED' + unpaused = 'UNPAUSED' + + class EvaluationType: + schedule = 'SCHEDULE' + trigger = 'TRIGGER' + + _field_types = { + 'evaluation_spec': 'AdRuleEvaluationSpec', + 'exception_code': 'int', + 'exception_message': 'string', + 'execution_spec': 'AdRuleExecutionSpec', + 'is_manual': 'bool', + 'results': 'list', + 'rule_id': 'int', + 'schedule_spec': 'AdRuleScheduleSpec', + 'timestamp': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Action'] = AdAccountAdRulesHistory.Action.__dict__.values() + field_enum_info['EvaluationType'] = AdAccountAdRulesHistory.EvaluationType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountadvolume.py b/tap_facebook/facebook_business/adobjects/adaccountadvolume.py new file mode 100644 index 0000000..59a6d0d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountadvolume.py @@ -0,0 +1,185 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdAccountAdVolume( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAdVolume, self).__init__() + self._isAdAccountAdVolume = True + self._api = api + + class Field(AbstractObject.Field): + actor_id = 'actor_id' + actor_name = 'actor_name' + ad_limit_scope_business = 'ad_limit_scope_business' + ad_limit_scope_business_manager_id = 'ad_limit_scope_business_manager_id' + ad_limit_set_by_page_admin = 'ad_limit_set_by_page_admin' + ads_running_or_in_review_count = 'ads_running_or_in_review_count' + ads_running_or_in_review_count_subject_to_limit_set_by_page = 'ads_running_or_in_review_count_subject_to_limit_set_by_page' + current_account_ads_running_or_in_review_count = 'current_account_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' + limit_on_ads_running_or_in_review = 'limit_on_ads_running_or_in_review' + recommendations = 'recommendations' + + class RecommendationType: + 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_friction = 'ADVANTAGE_PLUS_AUDIENCE_FRICTION' + advantage_plus_audience_toggle = 'ADVANTAGE_PLUS_AUDIENCE_TOGGLE' + advantage_plus_creative = 'ADVANTAGE_PLUS_CREATIVE' + advantage_plus_creative_catalog = 'ADVANTAGE_PLUS_CREATIVE_CATALOG' + 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_budget_optimization_pfr = 'ASC_BUDGET_OPTIMIZATION_PFR' + asc_creation_package = 'ASC_CREATION_PACKAGE' + 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_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' + automatic_placements = 'AUTOMATIC_PLACEMENTS' + auto_bid = 'AUTO_BID' + blended_ads = 'BLENDED_ADS' + broad_targeting = 'BROAD_TARGETING' + 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' + 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_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_guidance = 'CTX_GUIDANCE' + da_advantage_plus_creative_info_labels = 'DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS' + dead_link = 'DEAD_LINK' + 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' + ges_test = 'GES_TEST' + guidance_center_code_gen = 'GUIDANCE_CENTER_CODE_GEN' + 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' + not_applicable = 'NOT_APPLICABLE' + 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' + predictive_creative_limited = 'PREDICTIVE_CREATIVE_LIMITED' + predictive_creative_limited_hourly = 'PREDICTIVE_CREATIVE_LIMITED_HOURLY' + rapid_learning_limited = 'RAPID_LEARNING_LIMITED' + rapid_learning_phase = 'RAPID_LEARNING_PHASE' + reels_duplication_upsell = 'REELS_DUPLICATION_UPSELL' + revert = 'REVERT' + scale_good_campaign = 'SCALE_GOOD_CAMPAIGN' + semantic_based_audience_expansion = 'SEMANTIC_BASED_AUDIENCE_EXPANSION' + setup_pixel = 'SETUP_PIXEL' + shops_ads = 'SHOPS_ADS' + signals_growth_capi = 'SIGNALS_GROWTH_CAPI' + signals_growth_capi_table = 'SIGNALS_GROWTH_CAPI_TABLE' + signals_growth_capi_v2 = 'SIGNALS_GROWTH_CAPI_V2' + 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' + 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 = { + 'actor_id': 'string', + 'actor_name': 'string', + 'ad_limit_scope_business': 'Business', + 'ad_limit_scope_business_manager_id': 'string', + 'ad_limit_set_by_page_admin': 'unsigned int', + 'ads_running_or_in_review_count': 'unsigned int', + 'ads_running_or_in_review_count_subject_to_limit_set_by_page': 'unsigned int', + 'current_account_ads_running_or_in_review_count': 'unsigned int', + 'future_limit_activation_date': 'string', + 'future_limit_on_ads_running_or_in_review': 'unsigned int', + 'limit_on_ads_running_or_in_review': 'unsigned int', + 'recommendations': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['RecommendationType'] = AdAccountAdVolume.RecommendationType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountbusinessconstraints.py b/tap_facebook/facebook_business/adobjects/adaccountbusinessconstraints.py new file mode 100644 index 0000000..a68e546 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountbusinessconstraints.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 AdAccountBusinessConstraints( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountBusinessConstraints = True + super(AdAccountBusinessConstraints, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + audience_controls = 'audience_controls' + campaigns_with_error = 'campaigns_with_error' + placement_controls = 'placement_controls' + status = 'status' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'account_controls' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_account_control(fields, params, batch, success, failure, pending) + + _field_types = { + 'audience_controls': 'Object', + 'campaigns_with_error': 'list', + 'placement_controls': 'Object', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountdefaultdestination.py b/tap_facebook/facebook_business/adobjects/adaccountdefaultdestination.py new file mode 100644 index 0000000..f8a6875 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountdefaultdestination.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 AdAccountDefaultDestination( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountDefaultDestination, self).__init__() + self._isAdAccountDefaultDestination = True + self._api = api + + class Field(AbstractObject.Field): + destination_id = 'destination_id' + destination_url = 'destination_url' + + _field_types = { + 'destination_id': 'string', + 'destination_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountdefaultobjective.py b/tap_facebook/facebook_business/adobjects/adaccountdefaultobjective.py new file mode 100644 index 0000000..bb86b4e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountdefaultobjective.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 AdAccountDefaultObjective( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountDefaultObjective, self).__init__() + self._isAdAccountDefaultObjective = True + self._api = api + + class Field(AbstractObject.Field): + default_objective_for_user = 'default_objective_for_user' + objective_for_level = 'objective_for_level' + + class DefaultObjectiveForUser: + 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' + + class ObjectiveForLevel: + 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' + + _field_types = { + 'default_objective_for_user': 'DefaultObjectiveForUser', + 'objective_for_level': 'ObjectiveForLevel', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['DefaultObjectiveForUser'] = AdAccountDefaultObjective.DefaultObjectiveForUser.__dict__.values() + field_enum_info['ObjectiveForLevel'] = AdAccountDefaultObjective.ObjectiveForLevel.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountdeliveryestimate.py b/tap_facebook/facebook_business/adobjects/adaccountdeliveryestimate.py new file mode 100644 index 0000000..a784697 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountdeliveryestimate.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 AdAccountDeliveryEstimate( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountDeliveryEstimate, self).__init__() + self._isAdAccountDeliveryEstimate = True + self._api = api + + class Field(AbstractObject.Field): + daily_outcomes_curve = 'daily_outcomes_curve' + estimate_dau = 'estimate_dau' + estimate_mau_lower_bound = 'estimate_mau_lower_bound' + estimate_mau_upper_bound = 'estimate_mau_upper_bound' + estimate_ready = 'estimate_ready' + targeting_optimization_types = 'targeting_optimization_types' + + 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' + 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 = { + 'daily_outcomes_curve': 'list', + 'estimate_dau': 'int', + 'estimate_mau_lower_bound': 'int', + 'estimate_mau_upper_bound': 'int', + 'estimate_ready': 'bool', + 'targeting_optimization_types': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['OptimizationGoal'] = AdAccountDeliveryEstimate.OptimizationGoal.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountdsarecommendations.py b/tap_facebook/facebook_business/adobjects/adaccountdsarecommendations.py new file mode 100644 index 0000000..6e2a347 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py b/tap_facebook/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py new file mode 100644 index 0000000..75a9667 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountiosfourteencampaignlimits.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 AdAccountIosFourteenCampaignLimits( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountIosFourteenCampaignLimits, self).__init__() + self._isAdAccountIosFourteenCampaignLimits = True + self._api = api + + class Field(AbstractObject.Field): + campaign_group_limit = 'campaign_group_limit' + campaign_group_limits_details = 'campaign_group_limits_details' + campaign_limit = 'campaign_limit' + + _field_types = { + 'campaign_group_limit': 'int', + 'campaign_group_limits_details': 'list', + 'campaign_limit': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py b/tap_facebook/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py new file mode 100644 index 0000000..a45d663 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdAccountMatchedSearchApplicationsEdgeData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountMatchedSearchApplicationsEdgeData, self).__init__() + self._isAdAccountMatchedSearchApplicationsEdgeData = True + self._api = api + + class Field(AbstractObject.Field): + app_id = 'app_id' + are_app_events_unavailable = 'are_app_events_unavailable' + icon_url = 'icon_url' + name = 'name' + search_source_store = 'search_source_store' + store = 'store' + unique_id = 'unique_id' + url = 'url' + + class AppStore: + amazon_app_store = 'AMAZON_APP_STORE' + apk_mirror = 'APK_MIRROR' + apk_monk = 'APK_MONK' + 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' + fb_gameroom = 'FB_GAMEROOM' + galaxy_store = 'GALAXY_STORE' + google_play = 'GOOGLE_PLAY' + instant_game = 'INSTANT_GAME' + itunes = 'ITUNES' + itunes_ipad = 'ITUNES_IPAD' + neon_android_store = 'NEON_ANDROID_STORE' + none = 'NONE' + oculus_app_store = 'OCULUS_APP_STORE' + oppo = 'OPPO' + roku_store = 'ROKU_STORE' + uptodown = 'UPTODOWN' + vivo = 'VIVO' + windows_10_store = 'WINDOWS_10_STORE' + windows_store = 'WINDOWS_STORE' + xiaomi = 'XIAOMI' + + _field_types = { + 'app_id': 'string', + 'are_app_events_unavailable': 'bool', + 'icon_url': 'string', + 'name': 'string', + 'search_source_store': 'string', + 'store': 'string', + 'unique_id': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['AppStore'] = AdAccountMatchedSearchApplicationsEdgeData.AppStore.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountmaxbid.py b/tap_facebook/facebook_business/adobjects/adaccountmaxbid.py new file mode 100644 index 0000000..0da1a73 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountmaxbid.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 AdAccountMaxBid( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountMaxBid, self).__init__() + self._isAdAccountMaxBid = True + self._api = api + + class Field(AbstractObject.Field): + max_bid = 'max_bid' + + _field_types = { + 'max_bid': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountpromotableobjects.py b/tap_facebook/facebook_business/adobjects/adaccountpromotableobjects.py new file mode 100644 index 0000000..4b66f6d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountpromotableobjects.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 AdAccountPromotableObjects( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountPromotableObjects, self).__init__() + self._isAdAccountPromotableObjects = True + self._api = api + + class Field(AbstractObject.Field): + promotable_app_ids = 'promotable_app_ids' + promotable_page_ids = 'promotable_page_ids' + promotable_urls = 'promotable_urls' + + _field_types = { + 'promotable_app_ids': 'list', + 'promotable_page_ids': 'list', + 'promotable_urls': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountreachestimate.py b/tap_facebook/facebook_business/adobjects/adaccountreachestimate.py new file mode 100644 index 0000000..2bbafd7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountreachestimate.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 AdAccountReachEstimate( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountReachEstimate, self).__init__() + self._isAdAccountReachEstimate = True + self._api = api + + class Field(AbstractObject.Field): + estimate_ready = 'estimate_ready' + users_lower_bound = 'users_lower_bound' + users_upper_bound = 'users_upper_bound' + + _field_types = { + 'estimate_ready': 'bool', + 'users_lower_bound': 'int', + 'users_upper_bound': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py b/tap_facebook/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py new file mode 100644 index 0000000..44b2db6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.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 AdAccountRecommendedCamapaignBudget( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountRecommendedCamapaignBudget, self).__init__() + self._isAdAccountRecommendedCamapaignBudget = True + self._api = api + + class Field(AbstractObject.Field): + daily = 'daily' + lifetime = 'lifetime' + objective = 'objective' + + _field_types = { + 'daily': 'string', + 'lifetime': 'string', + 'objective': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountsubscribedapps.py b/tap_facebook/facebook_business/adobjects/adaccountsubscribedapps.py new file mode 100644 index 0000000..c750fd8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountsubscribedapps.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 AdAccountSubscribedApps( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountSubscribedApps = True + super(AdAccountSubscribedApps, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + app_id = 'app_id' + app_name = 'app_name' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'subscribed_apps' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_subscribed_app(fields, params, batch, success, failure, pending) + + _field_types = { + 'app_id': 'string', + 'app_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccounttargetingunified.py b/tap_facebook/facebook_business/adobjects/adaccounttargetingunified.py new file mode 100644 index 0000000..a239966 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccounttargetingunified.py @@ -0,0 +1,567 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdAccountTargetingUnified( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountTargetingUnified = True + super(AdAccountTargetingUnified, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + audience_size_lower_bound = 'audience_size_lower_bound' + audience_size_upper_bound = 'audience_size_upper_bound' + conversion_lift = 'conversion_lift' + description = 'description' + id = 'id' + img = 'img' + info = 'info' + info_title = 'info_title' + is_recommendation = 'is_recommendation' + key = 'key' + link = 'link' + name = 'name' + parent = 'parent' + partner = 'partner' + path = 'path' + performance_rating = 'performance_rating' + raw_name = 'raw_name' + recommendation_model = 'recommendation_model' + search_interest_id = 'search_interest_id' + source = 'source' + spend = 'spend' + type = 'type' + valid = 'valid' + + class LimitType: + behaviors = 'behaviors' + college_years = 'college_years' + education_majors = 'education_majors' + education_schools = 'education_schools' + education_statuses = 'education_statuses' + ethnic_affinity = 'ethnic_affinity' + family_statuses = 'family_statuses' + generation = 'generation' + home_ownership = 'home_ownership' + home_type = 'home_type' + home_value = 'home_value' + household_composition = 'household_composition' + income = 'income' + industries = 'industries' + interested_in = 'interested_in' + interests = 'interests' + life_events = 'life_events' + location_categories = 'location_categories' + moms = 'moms' + net_worth = 'net_worth' + office_type = 'office_type' + politics = 'politics' + relationship_statuses = 'relationship_statuses' + user_adclusters = 'user_adclusters' + work_employers = 'work_employers' + work_positions = 'work_positions' + + class RegulatedCategories: + credit = 'CREDIT' + employment = 'EMPLOYMENT' + housing = 'HOUSING' + issues_elections_politics = 'ISSUES_ELECTIONS_POLITICS' + none = 'NONE' + online_gambling_and_gaming = 'ONLINE_GAMBLING_AND_GAMING' + + class RegulatedCountries: + ad = 'AD' + ae = 'AE' + af = 'AF' + ag = 'AG' + ai = 'AI' + al = 'AL' + am = 'AM' + an = 'AN' + ao = 'AO' + aq = 'AQ' + ar = 'AR' + value_as = 'AS' + at = 'AT' + au = 'AU' + aw = 'AW' + ax = 'AX' + az = 'AZ' + ba = 'BA' + bb = 'BB' + bd = 'BD' + be = 'BE' + bf = 'BF' + bg = 'BG' + bh = 'BH' + bi = 'BI' + bj = 'BJ' + bl = 'BL' + bm = 'BM' + bn = 'BN' + bo = 'BO' + bq = 'BQ' + br = 'BR' + bs = 'BS' + bt = 'BT' + bv = 'BV' + bw = 'BW' + by = 'BY' + bz = 'BZ' + ca = 'CA' + cc = 'CC' + cd = 'CD' + cf = 'CF' + cg = 'CG' + ch = 'CH' + ci = 'CI' + ck = 'CK' + cl = 'CL' + cm = 'CM' + cn = 'CN' + co = 'CO' + cr = 'CR' + cu = 'CU' + cv = 'CV' + cw = 'CW' + cx = 'CX' + cy = 'CY' + cz = 'CZ' + de = 'DE' + dj = 'DJ' + dk = 'DK' + dm = 'DM' + do = 'DO' + dz = 'DZ' + ec = 'EC' + ee = 'EE' + eg = 'EG' + eh = 'EH' + er = 'ER' + es = 'ES' + et = 'ET' + fi = 'FI' + fj = 'FJ' + fk = 'FK' + fm = 'FM' + fo = 'FO' + fr = 'FR' + ga = 'GA' + gb = 'GB' + gd = 'GD' + ge = 'GE' + gf = 'GF' + gg = 'GG' + gh = 'GH' + gi = 'GI' + gl = 'GL' + gm = 'GM' + gn = 'GN' + gp = 'GP' + gq = 'GQ' + gr = 'GR' + gs = 'GS' + gt = 'GT' + gu = 'GU' + gw = 'GW' + gy = 'GY' + hk = 'HK' + hm = 'HM' + hn = 'HN' + hr = 'HR' + ht = 'HT' + hu = 'HU' + id = 'ID' + ie = 'IE' + il = 'IL' + im = 'IM' + value_in = 'IN' + io = 'IO' + iq = 'IQ' + ir = 'IR' + value_is = 'IS' + it = 'IT' + je = 'JE' + jm = 'JM' + jo = 'JO' + jp = 'JP' + ke = 'KE' + kg = 'KG' + kh = 'KH' + ki = 'KI' + km = 'KM' + kn = 'KN' + kp = 'KP' + kr = 'KR' + kw = 'KW' + ky = 'KY' + kz = 'KZ' + la = 'LA' + lb = 'LB' + lc = 'LC' + li = 'LI' + lk = 'LK' + lr = 'LR' + ls = 'LS' + lt = 'LT' + lu = 'LU' + lv = 'LV' + ly = 'LY' + ma = 'MA' + mc = 'MC' + md = 'MD' + me = 'ME' + mf = 'MF' + mg = 'MG' + mh = 'MH' + mk = 'MK' + ml = 'ML' + mm = 'MM' + mn = 'MN' + mo = 'MO' + mp = 'MP' + mq = 'MQ' + mr = 'MR' + ms = 'MS' + mt = 'MT' + mu = 'MU' + mv = 'MV' + mw = 'MW' + mx = 'MX' + my = 'MY' + mz = 'MZ' + na = 'NA' + nc = 'NC' + ne = 'NE' + nf = 'NF' + ng = 'NG' + ni = 'NI' + nl = 'NL' + no = 'NO' + np = 'NP' + nr = 'NR' + nu = 'NU' + nz = 'NZ' + om = 'OM' + pa = 'PA' + pe = 'PE' + pf = 'PF' + pg = 'PG' + ph = 'PH' + pk = 'PK' + pl = 'PL' + pm = 'PM' + pn = 'PN' + pr = 'PR' + ps = 'PS' + pt = 'PT' + pw = 'PW' + py = 'PY' + qa = 'QA' + re = 'RE' + ro = 'RO' + rs = 'RS' + ru = 'RU' + rw = 'RW' + sa = 'SA' + sb = 'SB' + sc = 'SC' + sd = 'SD' + se = 'SE' + sg = 'SG' + sh = 'SH' + si = 'SI' + sj = 'SJ' + sk = 'SK' + sl = 'SL' + sm = 'SM' + sn = 'SN' + so = 'SO' + sr = 'SR' + ss = 'SS' + st = 'ST' + sv = 'SV' + sx = 'SX' + sy = 'SY' + sz = 'SZ' + tc = 'TC' + td = 'TD' + tf = 'TF' + tg = 'TG' + th = 'TH' + tj = 'TJ' + tk = 'TK' + tl = 'TL' + tm = 'TM' + tn = 'TN' + to = 'TO' + tr = 'TR' + tt = 'TT' + tv = 'TV' + tw = 'TW' + tz = 'TZ' + ua = 'UA' + ug = 'UG' + um = 'UM' + us = 'US' + uy = 'UY' + uz = 'UZ' + va = 'VA' + vc = 'VC' + ve = 'VE' + vg = 'VG' + vi = 'VI' + vn = 'VN' + vu = 'VU' + wf = 'WF' + ws = 'WS' + xk = 'XK' + ye = 'YE' + yt = 'YT' + za = 'ZA' + zm = 'ZM' + zw = 'ZW' + + class WhitelistedTypes: + 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' + behaviors = 'behaviors' + brand_safety_content_filter_levels = 'brand_safety_content_filter_levels' + brand_safety_content_severity_levels = 'brand_safety_content_severity_levels' + cafe_ca_contraction_targeting_signal = 'cafe_ca_contraction_targeting_signal' + cafe_ca_expansion_targeting_signal = 'cafe_ca_expansion_targeting_signal' + catalog_based_targeting = 'catalog_based_targeting' + cities = 'cities' + city_keys = 'city_keys' + college_years = 'college_years' + conjunctive_user_adclusters = 'conjunctive_user_adclusters' + connections = 'connections' + contextual_targeting_categories = 'contextual_targeting_categories' + countries = 'countries' + country = 'country' + country_groups = 'country_groups' + custom_audiences = 'custom_audiences' + device_platforms = 'device_platforms' + direct_install_devices = 'direct_install_devices' + dynamic_audience_ids = 'dynamic_audience_ids' + education_majors = 'education_majors' + education_schools = 'education_schools' + education_statuses = 'education_statuses' + effective_audience_network_positions = 'effective_audience_network_positions' + effective_device_platforms = 'effective_device_platforms' + effective_facebook_positions = 'effective_facebook_positions' + effective_instagram_positions = 'effective_instagram_positions' + effective_messenger_positions = 'effective_messenger_positions' + effective_oculus_positions = 'effective_oculus_positions' + effective_publisher_platforms = 'effective_publisher_platforms' + effective_whatsapp_positions = 'effective_whatsapp_positions' + engagement_specs = 'engagement_specs' + ethnic_affinity = 'ethnic_affinity' + exclude_previous_days = 'exclude_previous_days' + exclude_reached_since = 'exclude_reached_since' + excluded_brand_safety_content_types = 'excluded_brand_safety_content_types' + excluded_connections = 'excluded_connections' + excluded_custom_audiences = 'excluded_custom_audiences' + excluded_dynamic_audience_ids = 'excluded_dynamic_audience_ids' + excluded_engagement_specs = 'excluded_engagement_specs' + excluded_geo_locations = 'excluded_geo_locations' + excluded_mobile_device_model = 'excluded_mobile_device_model' + excluded_product_audience_specs = 'excluded_product_audience_specs' + excluded_publisher_categories = 'excluded_publisher_categories' + excluded_publisher_list_ids = 'excluded_publisher_list_ids' + 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' + flexible_spec = 'flexible_spec' + follow_profiles = 'follow_profiles' + follow_profiles_negative = 'follow_profiles_negative' + format = 'format' + friends_of_connections = 'friends_of_connections' + gatekeepers = 'gatekeepers' + genders = 'genders' + generation = 'generation' + geo_locations = 'geo_locations' + home_ownership = 'home_ownership' + home_type = 'home_type' + home_value = 'home_value' + household_composition = 'household_composition' + id = 'id' + income = 'income' + industries = 'industries' + instagram_hashtags = 'instagram_hashtags' + instagram_positions = 'instagram_positions' + instream_video_skippable_excluded = 'instream_video_skippable_excluded' + instream_video_sponsorship_placements = 'instream_video_sponsorship_placements' + interest_defaults_source = 'interest_defaults_source' + interested_in = 'interested_in' + interests = 'interests' + is_instagram_destination_ad = 'is_instagram_destination_ad' + is_whatsapp_destination_ad = 'is_whatsapp_destination_ad' + keywords = 'keywords' + life_events = 'life_events' + locales = 'locales' + location_categories = 'location_categories' + location_cluster_ids = 'location_cluster_ids' + location_expansion = 'location_expansion' + marketing_message_targeting = 'marketing_message_targeting' + marketplace_product_categories = 'marketplace_product_categories' + messenger_positions = 'messenger_positions' + mobile_device_model = 'mobile_device_model' + moms = 'moms' + net_worth = 'net_worth' + oculus_positions = 'oculus_positions' + office_type = 'office_type' + page_types = 'page_types' + place_page_set_ids = 'place_page_set_ids' + political_views = 'political_views' + politics = 'politics' + product_audience_specs = 'product_audience_specs' + prospecting_audience = 'prospecting_audience' + publisher_platforms = 'publisher_platforms' + radius = 'radius' + region_keys = 'region_keys' + regions = 'regions' + 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' + timezones = 'timezones' + topic = 'topic' + trending = 'trending' + user_adclusters = 'user_adclusters' + user_device = 'user_device' + user_event = 'user_event' + user_os = 'user_os' + user_page_threads = 'user_page_threads' + user_page_threads_excluded = 'user_page_threads_excluded' + whatsapp_positions = 'whatsapp_positions' + wireless_carrier = 'wireless_carrier' + work_employers = 'work_employers' + work_positions = 'work_positions' + zips = 'zips' + + class AppStore: + amazon_app_store = 'amazon_app_store' + apk_mirror = 'apk_mirror' + apk_monk = 'apk_monk' + 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' + fb_gameroom = 'fb_gameroom' + galaxy_store = 'galaxy_store' + google_play = 'google_play' + instant_game = 'instant_game' + itunes = 'itunes' + itunes_ipad = 'itunes_ipad' + neon_android_store = 'neon_android_store' + none = 'none' + oculus_app_store = 'oculus_app_store' + oppo = 'oppo' + roku_channel_store = 'roku_channel_store' + uptodown = 'uptodown' + vivo = 'vivo' + windows_10_store = 'windows_10_store' + windows_store = 'windows_store' + xiaomi = 'xiaomi' + + class Objective: + app_installs = 'APP_INSTALLS' + brand_awareness = 'BRAND_AWARENESS' + conversions = 'CONVERSIONS' + 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' + + class Mode: + best_performing = 'best_performing' + recently_used = 'recently_used' + related = 'related' + suggestions = 'suggestions' + + _field_types = { + 'audience_size_lower_bound': 'unsigned int', + 'audience_size_upper_bound': 'unsigned int', + 'conversion_lift': 'float', + 'description': 'string', + 'id': 'string', + 'img': 'string', + 'info': 'string', + 'info_title': 'string', + 'is_recommendation': 'bool', + 'key': 'string', + 'link': 'string', + 'name': 'string', + 'parent': 'string', + 'partner': 'string', + 'path': 'list', + 'performance_rating': 'unsigned int', + 'raw_name': 'string', + 'recommendation_model': 'string', + 'search_interest_id': 'string', + 'source': 'string', + 'spend': 'float', + 'type': 'string', + 'valid': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['LimitType'] = AdAccountTargetingUnified.LimitType.__dict__.values() + field_enum_info['RegulatedCategories'] = AdAccountTargetingUnified.RegulatedCategories.__dict__.values() + field_enum_info['RegulatedCountries'] = AdAccountTargetingUnified.RegulatedCountries.__dict__.values() + field_enum_info['WhitelistedTypes'] = AdAccountTargetingUnified.WhitelistedTypes.__dict__.values() + field_enum_info['AppStore'] = AdAccountTargetingUnified.AppStore.__dict__.values() + field_enum_info['Objective'] = AdAccountTargetingUnified.Objective.__dict__.values() + field_enum_info['Mode'] = AdAccountTargetingUnified.Mode.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccounttrackingdata.py b/tap_facebook/facebook_business/adobjects/adaccounttrackingdata.py new file mode 100644 index 0000000..bad8478 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccounttrackingdata.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 AdAccountTrackingData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountTrackingData, self).__init__() + self._isAdAccountTrackingData = True + self._api = api + + class Field(AbstractObject.Field): + tracking_specs = 'tracking_specs' + + _field_types = { + 'tracking_specs': 'ConversionActionQuery', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adaccountuser.py b/tap_facebook/facebook_business/adobjects/adaccountuser.py new file mode 100644 index 0000000..e4b0944 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adaccountuser.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 +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 +from facebook_business.adobjects.helpers.adaccountusermixin import AdAccountUserMixin + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdAccountUser( + AdAccountUserMixin, + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountUser = True + super(AdAccountUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + tasks = 'tasks' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'users' + + _field_types = { + 'id': 'string', + 'name': 'string', + 'tasks': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adactivity.py b/tap_facebook/facebook_business/adobjects/adactivity.py new file mode 100644 index 0000000..3765da2 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adactivity.py @@ -0,0 +1,165 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdActivity( + AbstractObject, +): + + def __init__(self, api=None): + super(AdActivity, self).__init__() + self._isAdActivity = True + self._api = api + + class Field(AbstractObject.Field): + actor_id = 'actor_id' + actor_name = 'actor_name' + application_id = 'application_id' + application_name = 'application_name' + date_time_in_timezone = 'date_time_in_timezone' + event_time = 'event_time' + event_type = 'event_type' + extra_data = 'extra_data' + object_id = 'object_id' + object_name = 'object_name' + object_type = 'object_type' + translated_event_type = 'translated_event_type' + + class EventType: + account_spending_limit_reached = 'account_spending_limit_reached' + ad_account_add_user_to_role = 'ad_account_add_user_to_role' + ad_account_billing_charge = 'ad_account_billing_charge' + ad_account_billing_charge_failed = 'ad_account_billing_charge_failed' + ad_account_billing_chargeback = 'ad_account_billing_chargeback' + ad_account_billing_chargeback_reversal = 'ad_account_billing_chargeback_reversal' + ad_account_billing_decline = 'ad_account_billing_decline' + ad_account_billing_refund = 'ad_account_billing_refund' + ad_account_remove_spend_limit = 'ad_account_remove_spend_limit' + ad_account_remove_user_from_role = 'ad_account_remove_user_from_role' + ad_account_reset_spend_limit = 'ad_account_reset_spend_limit' + ad_account_set_business_information = 'ad_account_set_business_information' + ad_account_update_spend_limit = 'ad_account_update_spend_limit' + ad_account_update_status = 'ad_account_update_status' + ad_review_approved = 'ad_review_approved' + ad_review_declined = 'ad_review_declined' + add_funding_source = 'add_funding_source' + add_images = 'add_images' + billing_event = 'billing_event' + campaign_ended = 'campaign_ended' + campaign_spending_limit_reached = 'campaign_spending_limit_reached' + conversion_event_updated = 'conversion_event_updated' + create_ad = 'create_ad' + create_ad_set = 'create_ad_set' + create_audience = 'create_audience' + create_campaign_group = 'create_campaign_group' + create_campaign_legacy = 'create_campaign_legacy' + delete_audience = 'delete_audience' + delete_images = 'delete_images' + di_ad_set_learning_stage_exit = 'di_ad_set_learning_stage_exit' + edit_and_update_ad_creative = 'edit_and_update_ad_creative' + edit_images = 'edit_images' + first_delivery_event = 'first_delivery_event' + funding_event_initiated = 'funding_event_initiated' + funding_event_successful = 'funding_event_successful' + lifetime_budget_spent = 'lifetime_budget_spent' + merge_campaigns = 'merge_campaigns' + receive_audience = 'receive_audience' + remove_funding_source = 'remove_funding_source' + remove_shared_audience = 'remove_shared_audience' + share_audience = 'share_audience' + unknown = 'unknown' + unshare_audience = 'unshare_audience' + update_ad_bid_info = 'update_ad_bid_info' + update_ad_bid_type = 'update_ad_bid_type' + update_ad_creative = 'update_ad_creative' + update_ad_friendly_name = 'update_ad_friendly_name' + update_ad_labels = 'update_ad_labels' + update_ad_run_status = 'update_ad_run_status' + update_ad_run_status_to_be_set_after_review = 'update_ad_run_status_to_be_set_after_review' + update_ad_set_ad_keywords = 'update_ad_set_ad_keywords' + update_ad_set_bid_adjustments = 'update_ad_set_bid_adjustments' + update_ad_set_bid_strategy = 'update_ad_set_bid_strategy' + update_ad_set_bidding = 'update_ad_set_bidding' + update_ad_set_budget = 'update_ad_set_budget' + update_ad_set_duration = 'update_ad_set_duration' + update_ad_set_learning_stage_status = 'update_ad_set_learning_stage_status' + update_ad_set_min_spend_target = 'update_ad_set_min_spend_target' + update_ad_set_name = 'update_ad_set_name' + update_ad_set_optimization_goal = 'update_ad_set_optimization_goal' + update_ad_set_run_status = 'update_ad_set_run_status' + update_ad_set_spend_cap = 'update_ad_set_spend_cap' + update_ad_set_target_spec = 'update_ad_set_target_spec' + update_ad_targets_spec = 'update_ad_targets_spec' + update_adgroup_stop_delivery = 'update_adgroup_stop_delivery' + update_audience = 'update_audience' + 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_delivery_type_cross_level_shift = 'update_delivery_type_cross_level_shift' + + class Category: + account = 'ACCOUNT' + ad = 'AD' + ad_keywords = 'AD_KEYWORDS' + ad_set = 'AD_SET' + audience = 'AUDIENCE' + bid = 'BID' + budget = 'BUDGET' + campaign = 'CAMPAIGN' + date = 'DATE' + status = 'STATUS' + targeting = 'TARGETING' + + class DataSource: + calypso = 'CALYPSO' + tao = 'TAO' + tao_ad_account = 'TAO_AD_ACCOUNT' + tao_ad_status = 'TAO_AD_STATUS' + + _field_types = { + 'actor_id': 'string', + 'actor_name': 'string', + 'application_id': 'string', + 'application_name': 'string', + 'date_time_in_timezone': 'string', + 'event_time': 'datetime', + 'event_type': 'EventType', + 'extra_data': 'string', + 'object_id': 'string', + 'object_name': 'string', + 'object_type': 'string', + 'translated_event_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['EventType'] = AdActivity.EventType.__dict__.values() + field_enum_info['Category'] = AdActivity.Category.__dict__.values() + field_enum_info['DataSource'] = AdActivity.DataSource.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetbody.py b/tap_facebook/facebook_business/adobjects/adassetbody.py new file mode 100644 index 0000000..02beba0 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetcalltoactiontype.py b/tap_facebook/facebook_business/adobjects/adassetcalltoactiontype.py new file mode 100644 index 0000000..11a7905 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py b/tap_facebook/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py new file mode 100644 index 0000000..5ea7ade --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetdescription.py b/tap_facebook/facebook_business/adobjects/adassetdescription.py new file mode 100644 index 0000000..b824e97 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetfeedadditionaldata.py b/tap_facebook/facebook_business/adobjects/adassetfeedadditionaldata.py new file mode 100644 index 0000000..95b3779 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetfeedspec.py b/tap_facebook/facebook_business/adobjects/adassetfeedspec.py new file mode 100644 index 0000000..6091700 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspec.py @@ -0,0 +1,158 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdAssetFeedSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpec, self).__init__() + self._isAdAssetFeedSpec = True + self._api = api + + class Field(AbstractObject.Field): + ad_formats = 'ad_formats' + additional_data = 'additional_data' + app_product_page_id = 'app_product_page_id' + asset_customization_rules = 'asset_customization_rules' + autotranslate = 'autotranslate' + bodies = 'bodies' + call_to_action_types = 'call_to_action_types' + call_to_actions = 'call_to_actions' + captions = 'captions' + carousels = 'carousels' + descriptions = 'descriptions' + events = 'events' + groups = 'groups' + images = 'images' + link_urls = 'link_urls' + message_extensions = 'message_extensions' + onsite_destinations = 'onsite_destinations' + optimization_type = 'optimization_type' + reasons_to_shop = 'reasons_to_shop' + shops_bundle = 'shops_bundle' + titles = 'titles' + videos = 'videos' + + class CallToActionTypes: + add_to_cart = 'ADD_TO_CART' + apply_now = 'APPLY_NOW' + audio_call = 'AUDIO_CALL' + book_now = 'BOOK_NOW' + book_travel = 'BOOK_TRAVEL' + buy = 'BUY' + buy_now = 'BUY_NOW' + buy_tickets = 'BUY_TICKETS' + call = 'CALL' + call_me = 'CALL_ME' + call_now = 'CALL_NOW' + confirm = 'CONFIRM' + contact = 'CONTACT' + contact_us = 'CONTACT_US' + donate = 'DONATE' + donate_now = 'DONATE_NOW' + download = 'DOWNLOAD' + event_rsvp = 'EVENT_RSVP' + find_a_group = 'FIND_A_GROUP' + find_your_groups = 'FIND_YOUR_GROUPS' + follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' + follow_page = 'FOLLOW_PAGE' + follow_user = 'FOLLOW_USER' + get_directions = 'GET_DIRECTIONS' + get_offer = 'GET_OFFER' + get_offer_view = 'GET_OFFER_VIEW' + get_promotions = 'GET_PROMOTIONS' + get_quote = 'GET_QUOTE' + get_showtimes = 'GET_SHOWTIMES' + get_started = 'GET_STARTED' + 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' + message_page = 'MESSAGE_PAGE' + mobile_download = 'MOBILE_DOWNLOAD' + no_button = 'NO_BUTTON' + open_instant_app = 'OPEN_INSTANT_APP' + open_link = 'OPEN_LINK' + order_now = 'ORDER_NOW' + pay_to_access = 'PAY_TO_ACCESS' + play_game = 'PLAY_GAME' + play_game_on_facebook = 'PLAY_GAME_ON_FACEBOOK' + purchase_gift_cards = 'PURCHASE_GIFT_CARDS' + raise_money = 'RAISE_MONEY' + record_now = 'RECORD_NOW' + refer_friends = 'REFER_FRIENDS' + request_time = 'REQUEST_TIME' + say_thanks = 'SAY_THANKS' + see_more = 'SEE_MORE' + sell_now = 'SELL_NOW' + send_a_gift = 'SEND_A_GIFT' + send_gift_money = 'SEND_GIFT_MONEY' + send_updates = 'SEND_UPDATES' + share = 'SHARE' + shop_now = 'SHOP_NOW' + sign_up = 'SIGN_UP' + sotto_subscribe = 'SOTTO_SUBSCRIBE' + start_order = 'START_ORDER' + subscribe = 'SUBSCRIBE' + swipe_up_product = 'SWIPE_UP_PRODUCT' + swipe_up_shop = 'SWIPE_UP_SHOP' + update_app = 'UPDATE_APP' + use_app = 'USE_APP' + use_mobile_app = 'USE_MOBILE_APP' + video_annotation = 'VIDEO_ANNOTATION' + video_call = 'VIDEO_CALL' + visit_pages_feed = 'VISIT_PAGES_FEED' + watch_more = 'WATCH_MORE' + watch_video = 'WATCH_VIDEO' + whatsapp_message = 'WHATSAPP_MESSAGE' + woodhenge_support = 'WOODHENGE_SUPPORT' + + _field_types = { + 'ad_formats': 'list', + 'additional_data': 'AdAssetFeedAdditionalData', + 'app_product_page_id': 'string', + 'asset_customization_rules': 'list', + 'autotranslate': 'list', + 'bodies': 'list', + 'call_to_action_types': 'list', + 'call_to_actions': 'list', + 'captions': 'list', + 'carousels': 'list', + 'descriptions': 'list', + 'events': 'list', + 'groups': 'list', + 'images': 'list', + 'link_urls': 'list', + 'message_extensions': 'list', + 'onsite_destinations': 'list', + 'optimization_type': 'string', + 'reasons_to_shop': 'bool', + 'shops_bundle': 'bool', + 'titles': 'list', + 'videos': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['CallToActionTypes'] = AdAssetFeedSpec.CallToActionTypes.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py new file mode 100644 index 0000000..42dd02e --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetfeedspecassetlabel.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecassetlabel.py new file mode 100644 index 0000000..1e22ee4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspecassetlabel.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 AdAssetFeedSpecAssetLabel( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetFeedSpecAssetLabel = True + super(AdAssetFeedSpecAssetLabel, 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/tap_facebook/facebook_business/adobjects/adassetfeedspecbody.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecbody.py new file mode 100644 index 0000000..eed5bc7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspecbody.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 AdAssetFeedSpecBody( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecBody, self).__init__() + self._isAdAssetFeedSpecBody = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + text = 'text' + url_tags = 'url_tags' + + _field_types = { + 'adlabels': 'list', + 'text': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspeccalltoaction.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeccalltoaction.py new file mode 100644 index 0000000..25b07ec --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetfeedspeccaption.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeccaption.py new file mode 100644 index 0000000..4545c68 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspeccaption.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 AdAssetFeedSpecCaption( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecCaption, self).__init__() + self._isAdAssetFeedSpecCaption = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + text = 'text' + url_tags = 'url_tags' + + _field_types = { + 'adlabels': 'list', + 'text': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspeccarousel.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeccarousel.py new file mode 100644 index 0000000..d46b446 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py new file mode 100644 index 0000000..b839436 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetfeedspecdescription.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecdescription.py new file mode 100644 index 0000000..9c5a09c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspecdescription.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 AdAssetFeedSpecDescription( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecDescription, self).__init__() + self._isAdAssetFeedSpecDescription = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + text = 'text' + url_tags = 'url_tags' + + _field_types = { + 'adlabels': 'list', + 'text': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspecevents.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecevents.py new file mode 100644 index 0000000..0b8a360 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetfeedspecgrouprule.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecgrouprule.py new file mode 100644 index 0000000..dd749d5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspecgrouprule.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 AdAssetFeedSpecGroupRule( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecGroupRule, self).__init__() + self._isAdAssetFeedSpecGroupRule = True + self._api = api + + class Field(AbstractObject.Field): + body_label = 'body_label' + caption_label = 'caption_label' + description_label = 'description_label' + image_label = 'image_label' + link_url_label = 'link_url_label' + title_label = 'title_label' + video_label = 'video_label' + + _field_types = { + 'body_label': 'AdAssetFeedSpecAssetLabel', + 'caption_label': 'AdAssetFeedSpecAssetLabel', + 'description_label': 'AdAssetFeedSpecAssetLabel', + 'image_label': 'AdAssetFeedSpecAssetLabel', + 'link_url_label': 'AdAssetFeedSpecAssetLabel', + 'title_label': 'AdAssetFeedSpecAssetLabel', + 'video_label': 'AdAssetFeedSpecAssetLabel', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspecimage.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecimage.py new file mode 100644 index 0000000..6f5f627 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspecimage.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 AdAssetFeedSpecImage( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecImage, self).__init__() + self._isAdAssetFeedSpecImage = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + hash = 'hash' + image_crops = 'image_crops' + url = 'url' + url_tags = 'url_tags' + + _field_types = { + 'adlabels': 'list', + 'hash': 'string', + 'image_crops': 'AdsImageCrops', + 'url': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspeclinkurl.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeclinkurl.py new file mode 100644 index 0000000..c27e7df --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspeclinkurl.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 AdAssetFeedSpecLinkURL( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecLinkURL, self).__init__() + self._isAdAssetFeedSpecLinkURL = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + carousel_see_more_url = 'carousel_see_more_url' + deeplink_url = 'deeplink_url' + display_url = 'display_url' + url_tags = 'url_tags' + website_url = 'website_url' + + _field_types = { + 'adlabels': 'list', + 'carousel_see_more_url': 'string', + 'deeplink_url': 'string', + 'display_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/tap_facebook/facebook_business/adobjects/adassetfeedspectitle.py b/tap_facebook/facebook_business/adobjects/adassetfeedspectitle.py new file mode 100644 index 0000000..3498277 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspectitle.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 AdAssetFeedSpecTitle( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecTitle, self).__init__() + self._isAdAssetFeedSpecTitle = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + text = 'text' + url_tags = 'url_tags' + + _field_types = { + 'adlabels': 'list', + 'text': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspecvideo.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecvideo.py new file mode 100644 index 0000000..8ba34b0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adassetfeedspecvideo.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 AdAssetFeedSpecVideo( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecVideo, self).__init__() + self._isAdAssetFeedSpecVideo = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + caption_ids = 'caption_ids' + thumbnail_hash = 'thumbnail_hash' + thumbnail_url = 'thumbnail_url' + url_tags = 'url_tags' + video_id = 'video_id' + + _field_types = { + 'adlabels': 'list', + 'caption_ids': 'list', + 'thumbnail_hash': 'string', + 'thumbnail_url': 'string', + 'url_tags': 'string', + 'video_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adassetimage.py b/tap_facebook/facebook_business/adobjects/adassetimage.py new file mode 100644 index 0000000..bae05d3 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetlinkurl.py b/tap_facebook/facebook_business/adobjects/adassetlinkurl.py new file mode 100644 index 0000000..5638937 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetmessageextensions.py b/tap_facebook/facebook_business/adobjects/adassetmessageextensions.py new file mode 100644 index 0000000..a3ea877 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetonsitedestinations.py b/tap_facebook/facebook_business/adobjects/adassetonsitedestinations.py new file mode 100644 index 0000000..2aa7681 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassettargetruletargeting.py b/tap_facebook/facebook_business/adobjects/adassettargetruletargeting.py new file mode 100644 index 0000000..9848beb --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassettitle.py b/tap_facebook/facebook_business/adobjects/adassettitle.py new file mode 100644 index 0000000..60a855d --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adassetvideo.py b/tap_facebook/facebook_business/adobjects/adassetvideo.py new file mode 100644 index 0000000..547a508 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adasyncrequest.py b/tap_facebook/facebook_business/adobjects/adasyncrequest.py new file mode 100644 index 0000000..410a0f7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adasyncrequest.py @@ -0,0 +1,132 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdAsyncRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAsyncRequest = True + super(AdAsyncRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + async_request_set = 'async_request_set' + created_time = 'created_time' + id = 'id' + input = 'input' + result = 'result' + scope_object_id = 'scope_object_id' + status = 'status' + type = 'type' + updated_time = 'updated_time' + + class Statuses: + canceled = 'CANCELED' + canceled_dependency = 'CANCELED_DEPENDENCY' + error = 'ERROR' + error_conflicts = 'ERROR_CONFLICTS' + error_dependency = 'ERROR_DEPENDENCY' + initial = 'INITIAL' + in_progress = 'IN_PROGRESS' + pending_dependency = 'PENDING_DEPENDENCY' + process_by_ad_async_engine = 'PROCESS_BY_AD_ASYNC_ENGINE' + process_by_event_processor = 'PROCESS_BY_EVENT_PROCESSOR' + success = 'SUCCESS' + user_canceled = 'USER_CANCELED' + user_canceled_dependency = 'USER_CANCELED_DEPENDENCY' + + 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=AdAsyncRequest, + 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_request_set': 'AdAsyncRequestSet', + 'created_time': 'datetime', + 'id': 'string', + 'input': 'map', + 'result': 'map', + 'scope_object_id': 'string', + 'status': 'string', + 'type': 'string', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Statuses'] = AdAsyncRequest.Statuses.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adasyncrequestset.py b/tap_facebook/facebook_business/adobjects/adasyncrequestset.py new file mode 100644 index 0000000..f655194 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adasyncrequestset.py @@ -0,0 +1,214 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdAsyncRequestSet( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAsyncRequestSet = True + super(AdAsyncRequestSet, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + canceled_count = 'canceled_count' + created_time = 'created_time' + error_count = 'error_count' + id = 'id' + in_progress_count = 'in_progress_count' + initial_count = 'initial_count' + is_completed = 'is_completed' + name = 'name' + notification_mode = 'notification_mode' + notification_result = 'notification_result' + notification_status = 'notification_status' + notification_uri = 'notification_uri' + owner_id = 'owner_id' + success_count = 'success_count' + total_count = 'total_count' + updated_time = 'updated_time' + ad_specs = 'ad_specs' + + class NotificationMode: + off = 'OFF' + on_complete = 'ON_COMPLETE' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'asyncadrequestsets' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_async_ad_request_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 + if batch 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=AdAsyncRequestSet, + 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 = { + 'name': 'string', + 'notification_mode': 'notification_mode_enum', + 'notification_uri': 'string', + } + enums = { + 'notification_mode_enum': AdAsyncRequestSet.NotificationMode.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAsyncRequestSet, + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adasyncrequest import AdAsyncRequest + param_types = { + 'statuses': 'list', + } + enums = { + 'statuses_enum': AdAsyncRequest.Statuses.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAsyncRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAsyncRequest, 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 = { + 'canceled_count': 'int', + 'created_time': 'datetime', + 'error_count': 'int', + 'id': 'string', + 'in_progress_count': 'int', + 'initial_count': 'unsigned int', + 'is_completed': 'bool', + 'name': 'string', + 'notification_mode': 'NotificationMode', + 'notification_result': 'AdAsyncRequestSetNotificationResult', + 'notification_status': 'string', + 'notification_uri': 'string', + 'owner_id': 'string', + 'success_count': 'int', + 'total_count': 'unsigned int', + 'updated_time': 'datetime', + 'ad_specs': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['NotificationMode'] = AdAsyncRequestSet.NotificationMode.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adasyncrequestsetnotificationresult.py b/tap_facebook/facebook_business/adobjects/adasyncrequestsetnotificationresult.py new file mode 100644 index 0000000..75bdcae --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adasyncrequestsetnotificationresult.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 AdAsyncRequestSetNotificationResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAsyncRequestSetNotificationResult, self).__init__() + self._isAdAsyncRequestSetNotificationResult = True + self._api = api + + class Field(AbstractObject.Field): + response = 'response' + status = 'status' + + _field_types = { + 'response': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adbidadjustments.py b/tap_facebook/facebook_business/adobjects/adbidadjustments.py new file mode 100644 index 0000000..a8d3e2f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adbidadjustments.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 AdBidAdjustments( + AbstractObject, +): + + def __init__(self, api=None): + super(AdBidAdjustments, self).__init__() + self._isAdBidAdjustments = True + self._api = api + + class Field(AbstractObject.Field): + age_range = 'age_range' + page_types = 'page_types' + user_groups = 'user_groups' + + _field_types = { + 'age_range': 'map', + 'page_types': 'Object', + 'user_groups': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcampaignbidconstraint.py b/tap_facebook/facebook_business/adobjects/adcampaignbidconstraint.py new file mode 100644 index 0000000..6090e8b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcampaignbidconstraint.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 AdCampaignBidConstraint( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignBidConstraint, self).__init__() + self._isAdCampaignBidConstraint = True + self._api = api + + class Field(AbstractObject.Field): + roas_average_floor = 'roas_average_floor' + + _field_types = { + 'roas_average_floor': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcampaigndeliveryestimate.py b/tap_facebook/facebook_business/adobjects/adcampaigndeliveryestimate.py new file mode 100644 index 0000000..7f47755 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcampaigndeliveryestimate.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 AdCampaignDeliveryEstimate( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignDeliveryEstimate, self).__init__() + self._isAdCampaignDeliveryEstimate = True + self._api = api + + class Field(AbstractObject.Field): + daily_outcomes_curve = 'daily_outcomes_curve' + estimate_dau = 'estimate_dau' + estimate_mau_lower_bound = 'estimate_mau_lower_bound' + estimate_mau_upper_bound = 'estimate_mau_upper_bound' + estimate_ready = 'estimate_ready' + targeting_optimization_types = 'targeting_optimization_types' + + 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' + 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 = { + 'daily_outcomes_curve': 'list', + 'estimate_dau': 'int', + 'estimate_mau_lower_bound': 'int', + 'estimate_mau_upper_bound': 'int', + 'estimate_ready': 'bool', + 'targeting_optimization_types': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['OptimizationGoal'] = AdCampaignDeliveryEstimate.OptimizationGoal.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py b/tap_facebook/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py new file mode 100644 index 0000000..dbcb8cd --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.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 AdCampaignDeliveryStatsUnsupportedReasons( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignDeliveryStatsUnsupportedReasons, self).__init__() + self._isAdCampaignDeliveryStatsUnsupportedReasons = True + self._api = api + + class Field(AbstractObject.Field): + reason_data = 'reason_data' + reason_type = 'reason_type' + + _field_types = { + 'reason_data': 'list>', + 'reason_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py b/tap_facebook/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py new file mode 100644 index 0000000..2186a7d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcampaignfrequencycontrolspecs.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 AdCampaignFrequencyControlSpecs( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignFrequencyControlSpecs, self).__init__() + self._isAdCampaignFrequencyControlSpecs = True + self._api = api + + class Field(AbstractObject.Field): + event = 'event' + interval_days = 'interval_days' + max_frequency = 'max_frequency' + + _field_types = { + 'event': 'string', + 'interval_days': 'unsigned int', + 'max_frequency': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcampaignissuesinfo.py b/tap_facebook/facebook_business/adobjects/adcampaignissuesinfo.py new file mode 100644 index 0000000..657184b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcampaignissuesinfo.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 AdCampaignIssuesInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignIssuesInfo, self).__init__() + self._isAdCampaignIssuesInfo = True + self._api = api + + class Field(AbstractObject.Field): + error_code = 'error_code' + error_message = 'error_message' + error_summary = 'error_summary' + error_type = 'error_type' + level = 'level' + + _field_types = { + 'error_code': 'int', + 'error_message': 'string', + 'error_summary': 'string', + 'error_type': 'string', + 'level': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcampaignlearningstageinfo.py b/tap_facebook/facebook_business/adobjects/adcampaignlearningstageinfo.py new file mode 100644 index 0000000..fef9b44 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcampaignlearningstageinfo.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 AdCampaignLearningStageInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignLearningStageInfo, self).__init__() + self._isAdCampaignLearningStageInfo = True + self._api = api + + class Field(AbstractObject.Field): + attribution_windows = 'attribution_windows' + conversions = 'conversions' + last_sig_edit_ts = 'last_sig_edit_ts' + status = 'status' + + _field_types = { + 'attribution_windows': 'list', + 'conversions': 'unsigned int', + 'last_sig_edit_ts': 'int', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcampaignoptimizationevent.py b/tap_facebook/facebook_business/adobjects/adcampaignoptimizationevent.py new file mode 100644 index 0000000..7ad4748 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcampaignoptimizationevent.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 AdCampaignOptimizationEvent( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignOptimizationEvent, self).__init__() + self._isAdCampaignOptimizationEvent = True + self._api = api + + class Field(AbstractObject.Field): + custom_conversion_id = 'custom_conversion_id' + event_sequence = 'event_sequence' + event_type = 'event_type' + + _field_types = { + 'custom_conversion_id': 'string', + 'event_sequence': 'unsigned int', + 'event_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcampaignpacedbidinfo.py b/tap_facebook/facebook_business/adobjects/adcampaignpacedbidinfo.py new file mode 100644 index 0000000..15e70df --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcampaignpacedbidinfo.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 AdCampaignPacedBidInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignPacedBidInfo, self).__init__() + self._isAdCampaignPacedBidInfo = True + self._api = api + + class Field(AbstractObject.Field): + bidding_status = 'bidding_status' + + _field_types = { + 'bidding_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreative.py b/tap_facebook/facebook_business/adobjects/adcreative.py new file mode 100644 index 0000000..1aa9580 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreative.py @@ -0,0 +1,541 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.mixins import HasAdLabels + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdCreative( + AbstractCrudObject, + HasAdLabels, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdCreative = True + super(AdCreative, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + actor_id = 'actor_id' + adlabels = 'adlabels' + applink_treatment = 'applink_treatment' + asset_feed_spec = 'asset_feed_spec' + authorization_category = 'authorization_category' + auto_update = 'auto_update' + body = 'body' + branded_content = 'branded_content' + branded_content_sponsor_page_id = 'branded_content_sponsor_page_id' + bundle_folder_id = 'bundle_folder_id' + call_to_action_type = 'call_to_action_type' + categorization_criteria = 'categorization_criteria' + category_media_source = 'category_media_source' + collaborative_ads_lsb_image_bank_id = 'collaborative_ads_lsb_image_bank_id' + 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' + effective_authorization_category = 'effective_authorization_category' + effective_instagram_media_id = 'effective_instagram_media_id' + effective_instagram_story_id = 'effective_instagram_story_id' + effective_object_story_id = 'effective_object_story_id' + enable_direct_install = 'enable_direct_install' + enable_launch_instant_app = 'enable_launch_instant_app' + facebook_branded_content = 'facebook_branded_content' + id = 'id' + image_crops = 'image_crops' + image_hash = 'image_hash' + image_url = 'image_url' + instagram_actor_id = 'instagram_actor_id' + instagram_branded_content = 'instagram_branded_content' + instagram_permalink_url = 'instagram_permalink_url' + instagram_story_id = 'instagram_story_id' + instagram_user_id = 'instagram_user_id' + interactive_components_spec = 'interactive_components_spec' + link_deep_link_url = 'link_deep_link_url' + 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' + object_story_id = 'object_story_id' + object_story_spec = 'object_story_spec' + object_type = 'object_type' + object_url = 'object_url' + omnichannel_link_spec = 'omnichannel_link_spec' + 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' + portrait_customizations = 'portrait_customizations' + product_set_id = 'product_set_id' + recommender_settings = 'recommender_settings' + source_instagram_media_id = 'source_instagram_media_id' + status = 'status' + template_url = 'template_url' + template_url_spec = 'template_url_spec' + thumbnail_id = 'thumbnail_id' + thumbnail_url = 'thumbnail_url' + title = 'title' + url_tags = 'url_tags' + use_page_actor_override = 'use_page_actor_override' + video_id = 'video_id' + call_to_action = 'call_to_action' + image_file = 'image_file' + is_dco_internal = 'is_dco_internal' + + class CallToActionType: + add_to_cart = 'ADD_TO_CART' + apply_now = 'APPLY_NOW' + audio_call = 'AUDIO_CALL' + book_now = 'BOOK_NOW' + book_travel = 'BOOK_TRAVEL' + buy = 'BUY' + buy_now = 'BUY_NOW' + buy_tickets = 'BUY_TICKETS' + call = 'CALL' + call_me = 'CALL_ME' + call_now = 'CALL_NOW' + confirm = 'CONFIRM' + contact = 'CONTACT' + contact_us = 'CONTACT_US' + donate = 'DONATE' + donate_now = 'DONATE_NOW' + download = 'DOWNLOAD' + event_rsvp = 'EVENT_RSVP' + find_a_group = 'FIND_A_GROUP' + find_your_groups = 'FIND_YOUR_GROUPS' + follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' + follow_page = 'FOLLOW_PAGE' + follow_user = 'FOLLOW_USER' + get_directions = 'GET_DIRECTIONS' + get_offer = 'GET_OFFER' + get_offer_view = 'GET_OFFER_VIEW' + get_promotions = 'GET_PROMOTIONS' + get_quote = 'GET_QUOTE' + get_showtimes = 'GET_SHOWTIMES' + get_started = 'GET_STARTED' + 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' + message_page = 'MESSAGE_PAGE' + mobile_download = 'MOBILE_DOWNLOAD' + no_button = 'NO_BUTTON' + open_instant_app = 'OPEN_INSTANT_APP' + open_link = 'OPEN_LINK' + order_now = 'ORDER_NOW' + pay_to_access = 'PAY_TO_ACCESS' + play_game = 'PLAY_GAME' + play_game_on_facebook = 'PLAY_GAME_ON_FACEBOOK' + purchase_gift_cards = 'PURCHASE_GIFT_CARDS' + raise_money = 'RAISE_MONEY' + record_now = 'RECORD_NOW' + refer_friends = 'REFER_FRIENDS' + request_time = 'REQUEST_TIME' + say_thanks = 'SAY_THANKS' + see_more = 'SEE_MORE' + sell_now = 'SELL_NOW' + send_a_gift = 'SEND_A_GIFT' + send_gift_money = 'SEND_GIFT_MONEY' + send_updates = 'SEND_UPDATES' + share = 'SHARE' + shop_now = 'SHOP_NOW' + sign_up = 'SIGN_UP' + sotto_subscribe = 'SOTTO_SUBSCRIBE' + start_order = 'START_ORDER' + subscribe = 'SUBSCRIBE' + swipe_up_product = 'SWIPE_UP_PRODUCT' + swipe_up_shop = 'SWIPE_UP_SHOP' + update_app = 'UPDATE_APP' + use_app = 'USE_APP' + use_mobile_app = 'USE_MOBILE_APP' + video_annotation = 'VIDEO_ANNOTATION' + video_call = 'VIDEO_CALL' + visit_pages_feed = 'VISIT_PAGES_FEED' + watch_more = 'WATCH_MORE' + watch_video = 'WATCH_VIDEO' + whatsapp_message = 'WHATSAPP_MESSAGE' + woodhenge_support = 'WOODHENGE_SUPPORT' + + class ObjectType: + application = 'APPLICATION' + domain = 'DOMAIN' + event = 'EVENT' + invalid = 'INVALID' + offer = 'OFFER' + page = 'PAGE' + photo = 'PHOTO' + post_deleted = 'POST_DELETED' + privacy_check_fail = 'PRIVACY_CHECK_FAIL' + share = 'SHARE' + status = 'STATUS' + store_item = 'STORE_ITEM' + video = 'VIDEO' + + class Status: + active = 'ACTIVE' + deleted = 'DELETED' + in_process = 'IN_PROCESS' + with_issues = 'WITH_ISSUES' + + class ApplinkTreatment: + automatic = 'automatic' + deeplink_with_appstore_fallback = 'deeplink_with_appstore_fallback' + deeplink_with_web_fallback = 'deeplink_with_web_fallback' + web_only = 'web_only' + + class AuthorizationCategory: + none = 'NONE' + political = 'POLITICAL' + political_with_digitally_created_media = 'POLITICAL_WITH_DIGITALLY_CREATED_MEDIA' + + class CategorizationCriteria: + brand = 'brand' + category = 'category' + product_type = 'product_type' + + class CategoryMediaSource: + category = 'CATEGORY' + mixed = 'MIXED' + products_collage = 'PRODUCTS_COLLAGE' + products_slideshow = 'PRODUCTS_SLIDESHOW' + + class DynamicAdVoice: + dynamic = 'DYNAMIC' + story_owner = 'STORY_OWNER' + + class Operator: + all = 'ALL' + any = 'ANY' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adcreatives' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad_creative(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 = { + 'account_id': 'string', + 'adlabels': 'list', + 'name': 'string', + 'status': 'status_enum', + } + enums = { + 'status_enum': AdCreative.Status.__dict__.values(), + } + 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 = { + 'thumbnail_height': 'unsigned int', + 'thumbnail_width': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + 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 = { + 'account_id': 'string', + 'adlabels': 'list', + 'name': 'string', + 'status': 'status_enum', + } + enums = { + 'status_enum': AdCreative.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'adlabels': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adlabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCreative, 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_creative_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.') + from facebook_business.adobjects.adcreativeinsights import AdCreativeInsights + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/creative_insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreativeInsights, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCreativeInsights, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adpreview import AdPreview + param_types = { + 'ad_format': 'ad_format_enum', + 'creative_feature': 'creative_feature_enum', + 'dynamic_asset_label': 'string', + 'dynamic_creative_spec': 'Object', + 'dynamic_customization': 'Object', + 'end_date': 'datetime', + 'height': 'unsigned int', + 'locale': 'string', + 'place_page_id': 'int', + 'post': 'Object', + 'product_item_ids': 'list', + 'render_type': 'render_type_enum', + 'start_date': 'datetime', + 'width': 'unsigned int', + } + enums = { + 'ad_format_enum': AdPreview.AdFormat.__dict__.values(), + 'creative_feature_enum': AdPreview.CreativeFeature.__dict__.values(), + 'render_type_enum': AdPreview.RenderType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/previews', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdPreview, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdPreview, 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', + 'actor_id': 'string', + 'adlabels': 'list', + 'applink_treatment': 'string', + 'asset_feed_spec': 'AdAssetFeedSpec', + 'authorization_category': 'string', + 'auto_update': 'bool', + 'body': 'string', + 'branded_content': 'AdCreativeBrandedContentAds', + 'branded_content_sponsor_page_id': 'string', + 'bundle_folder_id': 'string', + 'call_to_action_type': 'CallToActionType', + 'categorization_criteria': 'string', + 'category_media_source': 'string', + 'collaborative_ads_lsb_image_bank_id': 'string', + 'creative_sourcing_spec': 'AdCreativeSourcingSpec', + 'degrees_of_freedom_spec': 'AdCreativeDegreesOfFreedomSpec', + 'destination_set_id': 'string', + 'dynamic_ad_voice': 'string', + 'effective_authorization_category': 'string', + 'effective_instagram_media_id': 'string', + 'effective_instagram_story_id': 'string', + 'effective_object_story_id': 'string', + 'enable_direct_install': 'bool', + 'enable_launch_instant_app': 'bool', + 'facebook_branded_content': 'AdCreativeFacebookBrandedContent', + 'id': 'string', + 'image_crops': 'AdsImageCrops', + 'image_hash': 'string', + 'image_url': 'string', + 'instagram_actor_id': 'string', + 'instagram_branded_content': 'AdCreativeInstagramBrandedContent', + 'instagram_permalink_url': 'string', + 'instagram_story_id': 'string', + 'instagram_user_id': 'string', + 'interactive_components_spec': 'AdCreativeInteractiveComponentsSpec', + 'link_deep_link_url': 'string', + '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', + 'object_story_id': 'string', + 'object_story_spec': 'AdCreativeObjectStorySpec', + 'object_type': 'ObjectType', + 'object_url': 'string', + 'omnichannel_link_spec': 'AdCreativeOmnichannelLinkSpec', + 'photo_album_source_object_story_id': 'string', + 'place_page_set_id': 'string', + 'platform_customizations': 'AdCreativePlatformCustomization', + 'playable_asset_id': 'string', + 'portrait_customizations': 'AdCreativePortraitCustomizations', + 'product_set_id': 'string', + 'recommender_settings': 'AdCreativeRecommenderSettings', + 'source_instagram_media_id': 'string', + 'status': 'Status', + 'template_url': 'string', + 'template_url_spec': 'AdCreativeTemplateURLSpec', + 'thumbnail_id': 'string', + 'thumbnail_url': 'string', + 'title': 'string', + 'url_tags': 'string', + 'use_page_actor_override': 'bool', + 'video_id': 'string', + 'call_to_action': 'Object', + 'image_file': 'string', + 'is_dco_internal': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['CallToActionType'] = AdCreative.CallToActionType.__dict__.values() + field_enum_info['ObjectType'] = AdCreative.ObjectType.__dict__.values() + field_enum_info['Status'] = AdCreative.Status.__dict__.values() + field_enum_info['ApplinkTreatment'] = AdCreative.ApplinkTreatment.__dict__.values() + field_enum_info['AuthorizationCategory'] = AdCreative.AuthorizationCategory.__dict__.values() + field_enum_info['CategorizationCriteria'] = AdCreative.CategorizationCriteria.__dict__.values() + field_enum_info['CategoryMediaSource'] = AdCreative.CategoryMediaSource.__dict__.values() + field_enum_info['DynamicAdVoice'] = AdCreative.DynamicAdVoice.__dict__.values() + field_enum_info['Operator'] = AdCreative.Operator.__dict__.values() + return field_enum_info + + +def _setitem_trigger(self, key, value): + if key == 'id': + self._data['creative_id'] = self['id'] diff --git a/tap_facebook/facebook_business/adobjects/adcreativeaddisclaimer.py b/tap_facebook/facebook_business/adobjects/adcreativeaddisclaimer.py new file mode 100644 index 0000000..6eeec19 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeaddisclaimer.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 AdCreativeAdDisclaimer( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeAdDisclaimer, self).__init__() + self._isAdCreativeAdDisclaimer = True + self._api = api + + class Field(AbstractObject.Field): + text = 'text' + title = 'title' + url = 'url' + + _field_types = { + 'text': 'string', + 'title': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentads.py b/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentads.py new file mode 100644 index 0000000..22366ad --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentads.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 AdCreativeBrandedContentAds( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeBrandedContentAds, self).__init__() + self._isAdCreativeBrandedContentAds = True + self._api = api + + class Field(AbstractObject.Field): + ad_format = 'ad_format' + creator_ad_permission_type = 'creator_ad_permission_type' + 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', + 'creator_ad_permission_type': 'string', + 'instagram_boost_post_access_token': 'string', + 'is_mca_internal': 'bool', + 'partners': 'list', + 'promoted_page_id': 'string', + 'ui_version': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentadspartners.py b/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentadspartners.py new file mode 100644 index 0000000..d0b7d2c --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py b/tap_facebook/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py new file mode 100644 index 0000000..7307ae9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativecollectionthumbnailinfo.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 AdCreativeCollectionThumbnailInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeCollectionThumbnailInfo, self).__init__() + self._isAdCreativeCollectionThumbnailInfo = True + self._api = api + + class Field(AbstractObject.Field): + element_child_index = 'element_child_index' + element_crops = 'element_crops' + element_id = 'element_id' + + _field_types = { + 'element_child_index': 'int', + 'element_crops': 'AdsImageCrops', + 'element_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativedegreesoffreedomspec.py b/tap_facebook/facebook_business/adobjects/adcreativedegreesoffreedomspec.py new file mode 100644 index 0000000..51559d6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativedegreesoffreedomspec.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 AdCreativeDegreesOfFreedomSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeDegreesOfFreedomSpec, self).__init__() + self._isAdCreativeDegreesOfFreedomSpec = True + self._api = api + + class Field(AbstractObject.Field): + ad_handle_type = 'ad_handle_type' + creative_features_spec = 'creative_features_spec' + degrees_of_freedom_type = 'degrees_of_freedom_type' + image_transformation_types = 'image_transformation_types' + multi_media_transformation_type = 'multi_media_transformation_type' + stories_transformation_types = 'stories_transformation_types' + text_transformation_types = 'text_transformation_types' + video_transformation_types = 'video_transformation_types' + + _field_types = { + 'ad_handle_type': 'string', + 'creative_features_spec': 'AdCreativeFeaturesSpec', + 'degrees_of_freedom_type': 'string', + 'image_transformation_types': 'list', + 'multi_media_transformation_type': 'string', + 'stories_transformation_types': 'list', + 'text_transformation_types': 'list', + 'video_transformation_types': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativefacebookbrandedcontent.py b/tap_facebook/facebook_business/adobjects/adcreativefacebookbrandedcontent.py new file mode 100644 index 0000000..c042871 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativefacebookbrandedcontent.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 AdCreativeFacebookBrandedContent( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeFacebookBrandedContent, self).__init__() + self._isAdCreativeFacebookBrandedContent = True + self._api = api + + class Field(AbstractObject.Field): + shared_to_sponsor_status = 'shared_to_sponsor_status' + sponsor_page_id = 'sponsor_page_id' + sponsor_relationship = 'sponsor_relationship' + + _field_types = { + 'shared_to_sponsor_status': 'string', + 'sponsor_page_id': 'string', + 'sponsor_relationship': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativefeaturedetails.py b/tap_facebook/facebook_business/adobjects/adcreativefeaturedetails.py new file mode 100644 index 0000000..bf7ccce --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adcreativefeaturesspec.py b/tap_facebook/facebook_business/adobjects/adcreativefeaturesspec.py new file mode 100644 index 0000000..cf53985 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativefeaturesspec.py @@ -0,0 +1,89 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us 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): + advantage_plus_creative = 'advantage_plus_creative' + audio = 'audio' + carousel_to_video = 'carousel_to_video' + cv_transformation = 'cv_transformation' + description_automation = 'description_automation' + dha_optimization = 'dha_optimization' + ig_glados_feed = 'ig_glados_feed' + image_auto_crop = 'image_auto_crop' + image_background_gen = 'image_background_gen' + 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' + 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_highlight = 'video_highlight' + + _field_types = { + 'advantage_plus_creative': 'AdCreativeFeatureDetails', + 'audio': 'AdCreativeFeatureDetails', + 'carousel_to_video': 'AdCreativeFeatureDetails', + 'cv_transformation': 'AdCreativeFeatureDetails', + 'description_automation': 'AdCreativeFeatureDetails', + 'dha_optimization': 'AdCreativeFeatureDetails', + 'ig_glados_feed': 'AdCreativeFeatureDetails', + 'image_auto_crop': 'AdCreativeFeatureDetails', + 'image_background_gen': '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', + 'standard_enhancements': 'AdCreativeFeatureDetails', + 'standard_enhancements_catalog': 'AdCreativeFeatureDetails', + 'text_generation': 'AdCreativeFeatureDetails', + 'text_optimizations': 'AdCreativeFeatureDetails', + 'video_auto_crop': 'AdCreativeFeatureDetails', + 'video_highlight': 'AdCreativeFeatureDetails', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativeinsights.py b/tap_facebook/facebook_business/adobjects/adcreativeinsights.py new file mode 100644 index 0000000..1faf288 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeinsights.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 AdCreativeInsights( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeInsights, self).__init__() + self._isAdCreativeInsights = True + self._api = api + + class Field(AbstractObject.Field): + aesthetics = 'aesthetics' + + _field_types = { + 'aesthetics': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py b/tap_facebook/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py new file mode 100644 index 0000000..fe469dc --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeinstagrambrandedcontent.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 AdCreativeInstagramBrandedContent( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeInstagramBrandedContent, self).__init__() + self._isAdCreativeInstagramBrandedContent = True + self._api = api + + class Field(AbstractObject.Field): + sponsor_id = 'sponsor_id' + + _field_types = { + 'sponsor_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py b/tap_facebook/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py new file mode 100644 index 0000000..fa60a74 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeinteractivecomponentsspec.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 AdCreativeInteractiveComponentsSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeInteractiveComponentsSpec, self).__init__() + self._isAdCreativeInteractiveComponentsSpec = True + self._api = api + + class Field(AbstractObject.Field): + child_attachments = 'child_attachments' + components = 'components' + + _field_types = { + 'child_attachments': 'list', + 'components': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdata.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdata.py new file mode 100644 index 0000000..6075357 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdata.py @@ -0,0 +1,111 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdCreativeLinkData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkData, self).__init__() + self._isAdCreativeLinkData = True + self._api = api + + class Field(AbstractObject.Field): + ad_context = 'ad_context' + 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' + caption = 'caption' + child_attachments = 'child_attachments' + collection_thumbnails = 'collection_thumbnails' + customization_rules_spec = 'customization_rules_spec' + description = 'description' + event_id = 'event_id' + force_single_link = 'force_single_link' + format_option = 'format_option' + image_crops = 'image_crops' + image_hash = 'image_hash' + image_layer_specs = 'image_layer_specs' + image_overlay_spec = 'image_overlay_spec' + link = 'link' + message = 'message' + multi_share_end_card = 'multi_share_end_card' + multi_share_optimized = 'multi_share_optimized' + name = 'name' + offer_id = 'offer_id' + page_welcome_message = 'page_welcome_message' + picture = 'picture' + post_click_configuration = 'post_click_configuration' + preferred_image_tags = 'preferred_image_tags' + retailer_item_ids = 'retailer_item_ids' + show_multiple_images = 'show_multiple_images' + static_fallback_spec = 'static_fallback_spec' + use_flexible_image_aspect_ratio = 'use_flexible_image_aspect_ratio' + + 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' + single_image = 'single_image' + + _field_types = { + 'ad_context': 'string', + 'additional_image_index': 'int', + 'app_link_spec': 'AdCreativeLinkDataAppLinkSpec', + 'attachment_style': 'string', + 'automated_product_tags': 'bool', + 'branded_content_shared_to_sponsor_status': 'string', + 'branded_content_sponsor_page_id': 'string', + 'call_to_action': 'AdCreativeLinkDataCallToAction', + 'caption': 'string', + 'child_attachments': 'list', + 'collection_thumbnails': 'list', + 'customization_rules_spec': 'list', + 'description': 'string', + 'event_id': 'string', + 'force_single_link': 'bool', + 'format_option': 'FormatOption', + 'image_crops': 'AdsImageCrops', + 'image_hash': 'string', + 'image_layer_specs': 'list', + 'image_overlay_spec': 'AdCreativeLinkDataImageOverlaySpec', + 'link': 'string', + 'message': 'string', + 'multi_share_end_card': 'bool', + 'multi_share_optimized': 'bool', + 'name': 'string', + 'offer_id': 'string', + 'page_welcome_message': 'string', + 'picture': 'string', + 'post_click_configuration': 'AdCreativePostClickConfiguration', + 'preferred_image_tags': 'list', + 'retailer_item_ids': 'list', + 'show_multiple_images': 'bool', + 'static_fallback_spec': 'AdCreativeStaticFallbackSpec', + 'use_flexible_image_aspect_ratio': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['FormatOption'] = AdCreativeLinkData.FormatOption.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdataapplinkspec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdataapplinkspec.py new file mode 100644 index 0000000..0f47bcb --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdataapplinkspec.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 AdCreativeLinkDataAppLinkSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataAppLinkSpec, self).__init__() + self._isAdCreativeLinkDataAppLinkSpec = True + self._api = api + + class Field(AbstractObject.Field): + android = 'android' + ios = 'ios' + ipad = 'ipad' + iphone = 'iphone' + + _field_types = { + 'android': 'list', + 'ios': 'list', + 'ipad': 'list', + 'iphone': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoaction.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoaction.py new file mode 100644 index 0000000..2a9a7b8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoaction.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdCreativeLinkDataCallToAction( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataCallToAction, self).__init__() + self._isAdCreativeLinkDataCallToAction = True + self._api = api + + class Field(AbstractObject.Field): + type = 'type' + value = 'value' + + class Type: + add_to_cart = 'ADD_TO_CART' + apply_now = 'APPLY_NOW' + audio_call = 'AUDIO_CALL' + book_now = 'BOOK_NOW' + book_travel = 'BOOK_TRAVEL' + buy = 'BUY' + buy_now = 'BUY_NOW' + buy_tickets = 'BUY_TICKETS' + call = 'CALL' + call_me = 'CALL_ME' + call_now = 'CALL_NOW' + confirm = 'CONFIRM' + contact = 'CONTACT' + contact_us = 'CONTACT_US' + donate = 'DONATE' + donate_now = 'DONATE_NOW' + download = 'DOWNLOAD' + event_rsvp = 'EVENT_RSVP' + find_a_group = 'FIND_A_GROUP' + find_your_groups = 'FIND_YOUR_GROUPS' + follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' + follow_page = 'FOLLOW_PAGE' + follow_user = 'FOLLOW_USER' + get_directions = 'GET_DIRECTIONS' + get_offer = 'GET_OFFER' + get_offer_view = 'GET_OFFER_VIEW' + get_promotions = 'GET_PROMOTIONS' + get_quote = 'GET_QUOTE' + get_showtimes = 'GET_SHOWTIMES' + get_started = 'GET_STARTED' + 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' + message_page = 'MESSAGE_PAGE' + mobile_download = 'MOBILE_DOWNLOAD' + no_button = 'NO_BUTTON' + open_instant_app = 'OPEN_INSTANT_APP' + open_link = 'OPEN_LINK' + order_now = 'ORDER_NOW' + pay_to_access = 'PAY_TO_ACCESS' + play_game = 'PLAY_GAME' + play_game_on_facebook = 'PLAY_GAME_ON_FACEBOOK' + purchase_gift_cards = 'PURCHASE_GIFT_CARDS' + raise_money = 'RAISE_MONEY' + record_now = 'RECORD_NOW' + refer_friends = 'REFER_FRIENDS' + request_time = 'REQUEST_TIME' + say_thanks = 'SAY_THANKS' + see_more = 'SEE_MORE' + sell_now = 'SELL_NOW' + send_a_gift = 'SEND_A_GIFT' + send_gift_money = 'SEND_GIFT_MONEY' + send_updates = 'SEND_UPDATES' + share = 'SHARE' + shop_now = 'SHOP_NOW' + sign_up = 'SIGN_UP' + sotto_subscribe = 'SOTTO_SUBSCRIBE' + start_order = 'START_ORDER' + subscribe = 'SUBSCRIBE' + swipe_up_product = 'SWIPE_UP_PRODUCT' + swipe_up_shop = 'SWIPE_UP_SHOP' + update_app = 'UPDATE_APP' + use_app = 'USE_APP' + use_mobile_app = 'USE_MOBILE_APP' + video_annotation = 'VIDEO_ANNOTATION' + video_call = 'VIDEO_CALL' + visit_pages_feed = 'VISIT_PAGES_FEED' + watch_more = 'WATCH_MORE' + watch_video = 'WATCH_VIDEO' + whatsapp_message = 'WHATSAPP_MESSAGE' + woodhenge_support = 'WOODHENGE_SUPPORT' + + _field_types = { + 'type': 'Type', + 'value': 'AdCreativeLinkDataCallToActionValue', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Type'] = AdCreativeLinkDataCallToAction.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py new file mode 100644 index 0000000..c4f8325 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py @@ -0,0 +1,57 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdCreativeLinkDataCallToActionValue( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataCallToActionValue, self).__init__() + self._isAdCreativeLinkDataCallToActionValue = True + self._api = api + + class Field(AbstractObject.Field): + app_destination = 'app_destination' + app_link = 'app_link' + application = 'application' + event_id = 'event_id' + lead_gen_form_id = 'lead_gen_form_id' + link = 'link' + link_caption = 'link_caption' + link_format = 'link_format' + page = 'page' + product_link = 'product_link' + whatsapp_number = 'whatsapp_number' + + _field_types = { + 'app_destination': 'string', + 'app_link': 'string', + 'application': 'string', + 'event_id': 'string', + 'lead_gen_form_id': 'string', + 'link': 'string', + 'link_caption': 'string', + 'link_format': 'string', + 'page': 'string', + 'product_link': 'string', + 'whatsapp_number': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatachildattachment.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatachildattachment.py new file mode 100644 index 0000000..a664cd7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdatachildattachment.py @@ -0,0 +1,57 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdCreativeLinkDataChildAttachment( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataChildAttachment, self).__init__() + self._isAdCreativeLinkDataChildAttachment = True + self._api = api + + class Field(AbstractObject.Field): + call_to_action = 'call_to_action' + caption = 'caption' + description = 'description' + image_crops = 'image_crops' + image_hash = 'image_hash' + link = 'link' + name = 'name' + picture = 'picture' + place_data = 'place_data' + static_card = 'static_card' + video_id = 'video_id' + + _field_types = { + 'call_to_action': 'AdCreativeLinkDataCallToAction', + 'caption': 'string', + 'description': 'string', + 'image_crops': 'AdsImageCrops', + 'image_hash': 'string', + 'link': 'string', + 'name': 'string', + 'picture': 'string', + 'place_data': 'AdCreativePlaceData', + 'static_card': 'bool', + 'video_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py new file mode 100644 index 0000000..cbc9f3d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py @@ -0,0 +1,113 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdCreativeLinkDataImageLayerSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataImageLayerSpec, self).__init__() + self._isAdCreativeLinkDataImageLayerSpec = True + self._api = api + + class Field(AbstractObject.Field): + blending_mode = 'blending_mode' + content = 'content' + frame_image_hash = 'frame_image_hash' + frame_source = 'frame_source' + image_source = 'image_source' + layer_type = 'layer_type' + opacity = 'opacity' + overlay_position = 'overlay_position' + overlay_shape = 'overlay_shape' + scale = 'scale' + shape_color = 'shape_color' + text_color = 'text_color' + text_font = 'text_font' + + class BlendingMode: + lighten = 'lighten' + multiply = 'multiply' + normal = 'normal' + + class FrameSource: + custom = 'custom' + + class ImageSource: + catalog = 'catalog' + + class LayerType: + frame_overlay = 'frame_overlay' + image = 'image' + text_overlay = 'text_overlay' + + class OverlayPosition: + bottom = 'bottom' + bottom_left = 'bottom_left' + bottom_right = 'bottom_right' + center = 'center' + left = 'left' + right = 'right' + top = 'top' + top_left = 'top_left' + top_right = 'top_right' + + class OverlayShape: + circle = 'circle' + none = 'none' + pill = 'pill' + rectangle = 'rectangle' + triangle = 'triangle' + + class TextFont: + 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' + open_sans_condensed_bold = 'open_sans_condensed_bold' + pt_serif_bold = 'pt_serif_bold' + roboto_condensed_regular = 'roboto_condensed_regular' + roboto_medium = 'roboto_medium' + + _field_types = { + 'blending_mode': 'BlendingMode', + 'content': 'Object', + 'frame_image_hash': 'string', + 'frame_source': 'FrameSource', + 'image_source': 'ImageSource', + 'layer_type': 'LayerType', + 'opacity': 'int', + 'overlay_position': 'OverlayPosition', + 'overlay_shape': 'OverlayShape', + 'scale': 'int', + 'shape_color': 'string', + 'text_color': 'string', + 'text_font': 'TextFont', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BlendingMode'] = AdCreativeLinkDataImageLayerSpec.BlendingMode.__dict__.values() + field_enum_info['FrameSource'] = AdCreativeLinkDataImageLayerSpec.FrameSource.__dict__.values() + field_enum_info['ImageSource'] = AdCreativeLinkDataImageLayerSpec.ImageSource.__dict__.values() + field_enum_info['LayerType'] = AdCreativeLinkDataImageLayerSpec.LayerType.__dict__.values() + field_enum_info['OverlayPosition'] = AdCreativeLinkDataImageLayerSpec.OverlayPosition.__dict__.values() + field_enum_info['OverlayShape'] = AdCreativeLinkDataImageLayerSpec.OverlayShape.__dict__.values() + field_enum_info['TextFont'] = AdCreativeLinkDataImageLayerSpec.TextFont.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py new file mode 100644 index 0000000..024ec68 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdCreativeLinkDataImageOverlaySpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataImageOverlaySpec, self).__init__() + self._isAdCreativeLinkDataImageOverlaySpec = True + self._api = api + + class Field(AbstractObject.Field): + custom_text_type = 'custom_text_type' + float_with_margin = 'float_with_margin' + overlay_template = 'overlay_template' + position = 'position' + text_font = 'text_font' + text_template_tags = 'text_template_tags' + text_type = 'text_type' + theme_color = 'theme_color' + + class CustomTextType: + free_shipping = 'free_shipping' + popular = 'popular' + + class OverlayTemplate: + circle_with_text = 'circle_with_text' + pill_with_text = 'pill_with_text' + triangle_with_text = 'triangle_with_text' + + class Position: + bottom_left = 'bottom_left' + bottom_right = 'bottom_right' + top_left = 'top_left' + top_right = 'top_right' + + class TextFont: + droid_serif_regular = 'droid_serif_regular' + dynads_hybrid_bold = 'dynads_hybrid_bold' + lato_regular = 'lato_regular' + noto_sans_regular = 'noto_sans_regular' + nunito_sans_bold = 'nunito_sans_bold' + open_sans_bold = 'open_sans_bold' + open_sans_condensed_bold = 'open_sans_condensed_bold' + pt_serif_bold = 'pt_serif_bold' + roboto_condensed_regular = 'roboto_condensed_regular' + roboto_medium = 'roboto_medium' + + class TextType: + automated_personalize = 'automated_personalize' + custom = 'custom' + disclaimer = 'disclaimer' + from_price = 'from_price' + guest_rating = 'guest_rating' + percentage_off = 'percentage_off' + price = 'price' + star_rating = 'star_rating' + strikethrough_price = 'strikethrough_price' + sustainable = 'sustainable' + + class ThemeColor: + background_000000_text_ffffff = 'background_000000_text_ffffff' + background_0090ff_text_ffffff = 'background_0090ff_text_ffffff' + background_00af4c_text_ffffff = 'background_00af4c_text_ffffff' + background_595959_text_ffffff = 'background_595959_text_ffffff' + background_755dde_text_ffffff = 'background_755dde_text_ffffff' + background_e50900_text_ffffff = 'background_e50900_text_ffffff' + background_f23474_text_ffffff = 'background_f23474_text_ffffff' + background_f78400_text_ffffff = 'background_f78400_text_ffffff' + background_ffffff_text_000000 = 'background_ffffff_text_000000' + background_ffffff_text_007ad0 = 'background_ffffff_text_007ad0' + background_ffffff_text_009c2a = 'background_ffffff_text_009c2a' + background_ffffff_text_646464 = 'background_ffffff_text_646464' + background_ffffff_text_755dde = 'background_ffffff_text_755dde' + background_ffffff_text_c91b00 = 'background_ffffff_text_c91b00' + background_ffffff_text_f23474 = 'background_ffffff_text_f23474' + background_ffffff_text_f78400 = 'background_ffffff_text_f78400' + + _field_types = { + 'custom_text_type': 'CustomTextType', + 'float_with_margin': 'bool', + 'overlay_template': 'OverlayTemplate', + 'position': 'Position', + 'text_font': 'TextFont', + 'text_template_tags': 'list', + 'text_type': 'TextType', + 'theme_color': 'ThemeColor', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['CustomTextType'] = AdCreativeLinkDataImageOverlaySpec.CustomTextType.__dict__.values() + field_enum_info['OverlayTemplate'] = AdCreativeLinkDataImageOverlaySpec.OverlayTemplate.__dict__.values() + field_enum_info['Position'] = AdCreativeLinkDataImageOverlaySpec.Position.__dict__.values() + field_enum_info['TextFont'] = AdCreativeLinkDataImageOverlaySpec.TextFont.__dict__.values() + field_enum_info['TextType'] = AdCreativeLinkDataImageOverlaySpec.TextType.__dict__.values() + field_enum_info['ThemeColor'] = AdCreativeLinkDataImageOverlaySpec.ThemeColor.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py new file mode 100644 index 0000000..3b51399 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.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 AdCreativeLinkDataSponsorshipInfoSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataSponsorshipInfoSpec, self).__init__() + self._isAdCreativeLinkDataSponsorshipInfoSpec = True + self._api = api + + class Field(AbstractObject.Field): + sponsor_image_url = 'sponsor_image_url' + sponsor_name = 'sponsor_name' + + _field_types = { + 'sponsor_image_url': 'string', + 'sponsor_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py new file mode 100644 index 0000000..0a3c196 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.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 AdCreativeLinkDataTemplateVideoSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataTemplateVideoSpec, self).__init__() + self._isAdCreativeLinkDataTemplateVideoSpec = True + self._api = api + + class Field(AbstractObject.Field): + categorization_criteria = 'categorization_criteria' + customization = 'customization' + template_id = 'template_id' + + _field_types = { + 'categorization_criteria': 'string', + 'customization': 'list>', + 'template_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativeobjectstoryspec.py b/tap_facebook/facebook_business/adobjects/adcreativeobjectstoryspec.py new file mode 100644 index 0000000..38c2d17 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeobjectstoryspec.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 AdCreativeObjectStorySpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeObjectStorySpec, self).__init__() + self._isAdCreativeObjectStorySpec = True + self._api = api + + class Field(AbstractObject.Field): + instagram_actor_id = 'instagram_actor_id' + link_data = 'link_data' + page_id = 'page_id' + photo_data = 'photo_data' + template_data = 'template_data' + text_data = 'text_data' + video_data = 'video_data' + + _field_types = { + 'instagram_actor_id': 'string', + 'link_data': 'AdCreativeLinkData', + 'page_id': 'string', + 'photo_data': 'AdCreativePhotoData', + 'template_data': 'AdCreativeLinkData', + 'text_data': 'AdCreativeTextData', + 'video_data': 'AdCreativeVideoData', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativeomnichannellinkspec.py b/tap_facebook/facebook_business/adobjects/adcreativeomnichannellinkspec.py new file mode 100644 index 0000000..7046d48 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeomnichannellinkspec.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 AdCreativeOmnichannelLinkSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeOmnichannelLinkSpec, self).__init__() + self._isAdCreativeOmnichannelLinkSpec = True + self._api = api + + class Field(AbstractObject.Field): + app = 'app' + web = 'web' + + _field_types = { + 'app': 'Object', + 'web': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativephotodata.py b/tap_facebook/facebook_business/adobjects/adcreativephotodata.py new file mode 100644 index 0000000..882e572 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativephotodata.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 AdCreativePhotoData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativePhotoData, self).__init__() + self._isAdCreativePhotoData = True + self._api = api + + class Field(AbstractObject.Field): + branded_content_shared_to_sponsor_status = 'branded_content_shared_to_sponsor_status' + branded_content_sponsor_page_id = 'branded_content_sponsor_page_id' + caption = 'caption' + image_hash = 'image_hash' + page_welcome_message = 'page_welcome_message' + url = 'url' + + _field_types = { + 'branded_content_shared_to_sponsor_status': 'string', + 'branded_content_sponsor_page_id': 'string', + 'caption': 'string', + 'image_hash': 'string', + 'page_welcome_message': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativephotodatamediaelements.py b/tap_facebook/facebook_business/adobjects/adcreativephotodatamediaelements.py new file mode 100644 index 0000000..2f123dd --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativephotodatamediaelements.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 AdCreativePhotoDataMediaElements( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativePhotoDataMediaElements, self).__init__() + self._isAdCreativePhotoDataMediaElements = 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/tap_facebook/facebook_business/adobjects/adcreativeplacedata.py b/tap_facebook/facebook_business/adobjects/adcreativeplacedata.py new file mode 100644 index 0000000..2a98e13 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeplacedata.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 AdCreativePlaceData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativePlaceData, self).__init__() + self._isAdCreativePlaceData = True + self._api = api + + class Field(AbstractObject.Field): + address_string = 'address_string' + label = 'label' + latitude = 'latitude' + location_source_id = 'location_source_id' + longitude = 'longitude' + type = 'type' + + _field_types = { + 'address_string': 'string', + 'label': 'string', + 'latitude': 'float', + 'location_source_id': 'string', + 'longitude': 'float', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativeplatformcustomization.py b/tap_facebook/facebook_business/adobjects/adcreativeplatformcustomization.py new file mode 100644 index 0000000..34f1d35 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeplatformcustomization.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 AdCreativePlatformCustomization( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativePlatformCustomization, self).__init__() + self._isAdCreativePlatformCustomization = True + self._api = api + + class Field(AbstractObject.Field): + instagram = 'instagram' + + _field_types = { + 'instagram': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativeportraitcustomizations.py b/tap_facebook/facebook_business/adobjects/adcreativeportraitcustomizations.py new file mode 100644 index 0000000..1e6d150 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativeportraitcustomizations.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 AdCreativePortraitCustomizations( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativePortraitCustomizations, self).__init__() + self._isAdCreativePortraitCustomizations = True + self._api = api + + class Field(AbstractObject.Field): + carousel_delivery_mode = 'carousel_delivery_mode' + specifications = 'specifications' + + _field_types = { + 'carousel_delivery_mode': 'string', + 'specifications': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativepostclickconfiguration.py b/tap_facebook/facebook_business/adobjects/adcreativepostclickconfiguration.py new file mode 100644 index 0000000..937e520 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativepostclickconfiguration.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 AdCreativePostClickConfiguration( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativePostClickConfiguration, self).__init__() + self._isAdCreativePostClickConfiguration = True + self._api = api + + class Field(AbstractObject.Field): + post_click_item_description = 'post_click_item_description' + post_click_item_headline = 'post_click_item_headline' + + _field_types = { + 'post_click_item_description': 'string', + 'post_click_item_headline': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativepromotionmetadataspec.py b/tap_facebook/facebook_business/adobjects/adcreativepromotionmetadataspec.py new file mode 100644 index 0000000..36b73bd --- /dev/null +++ b/tap_facebook/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': 'datetime', + 'id': 'string', + 'promotion_source': 'string', + 'promotion_type': 'string', + 'promotion_value': 'float', + 'required_code': 'string', + 'start_date': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativerecommendersettings.py b/tap_facebook/facebook_business/adobjects/adcreativerecommendersettings.py new file mode 100644 index 0000000..2eb3e1f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativerecommendersettings.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 AdCreativeRecommenderSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeRecommenderSettings, self).__init__() + self._isAdCreativeRecommenderSettings = True + self._api = api + + class Field(AbstractObject.Field): + preferred_events = 'preferred_events' + product_sales_channel = 'product_sales_channel' + + _field_types = { + 'preferred_events': 'list', + 'product_sales_channel': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativesitelinksspec.py b/tap_facebook/facebook_business/adobjects/adcreativesitelinksspec.py new file mode 100644 index 0000000..1c9db27 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/adcreativesourcingspec.py b/tap_facebook/facebook_business/adobjects/adcreativesourcingspec.py new file mode 100644 index 0000000..1bc965e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativesourcingspec.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 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' + + _field_types = { + 'associated_product_set_id': 'string', + 'promotion_metadata_spec': 'list', + 'site_links_spec': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativestaticfallbackspec.py b/tap_facebook/facebook_business/adobjects/adcreativestaticfallbackspec.py new file mode 100644 index 0000000..a23e4ba --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativestaticfallbackspec.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 AdCreativeStaticFallbackSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeStaticFallbackSpec, self).__init__() + self._isAdCreativeStaticFallbackSpec = True + self._api = api + + class Field(AbstractObject.Field): + call_to_action = 'call_to_action' + description = 'description' + image_hash = 'image_hash' + link = 'link' + message = 'message' + name = 'name' + + _field_types = { + 'call_to_action': 'AdCreativeLinkDataCallToAction', + 'description': 'string', + 'image_hash': 'string', + 'link': 'string', + 'message': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativetemplateurlspec.py b/tap_facebook/facebook_business/adobjects/adcreativetemplateurlspec.py new file mode 100644 index 0000000..6fe93a2 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativetemplateurlspec.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 AdCreativeTemplateURLSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeTemplateURLSpec, self).__init__() + self._isAdCreativeTemplateURLSpec = True + self._api = api + + class Field(AbstractObject.Field): + android = 'android' + config = 'config' + ios = 'ios' + ipad = 'ipad' + iphone = 'iphone' + web = 'web' + windows_phone = 'windows_phone' + + _field_types = { + 'android': 'Object', + 'config': 'Object', + 'ios': 'Object', + 'ipad': 'Object', + 'iphone': 'Object', + 'web': 'Object', + 'windows_phone': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativetextdata.py b/tap_facebook/facebook_business/adobjects/adcreativetextdata.py new file mode 100644 index 0000000..7e9fb22 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativetextdata.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 AdCreativeTextData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeTextData, self).__init__() + self._isAdCreativeTextData = True + self._api = api + + class Field(AbstractObject.Field): + message = 'message' + + _field_types = { + 'message': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcreativevideodata.py b/tap_facebook/facebook_business/adobjects/adcreativevideodata.py new file mode 100644 index 0000000..05493d3 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcreativevideodata.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 AdCreativeVideoData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeVideoData, self).__init__() + self._isAdCreativeVideoData = True + self._api = api + + class Field(AbstractObject.Field): + additional_image_index = 'additional_image_index' + 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' + collection_thumbnails = 'collection_thumbnails' + customization_rules_spec = 'customization_rules_spec' + image_hash = 'image_hash' + image_url = 'image_url' + link_description = 'link_description' + message = 'message' + offer_id = 'offer_id' + page_welcome_message = 'page_welcome_message' + post_click_configuration = 'post_click_configuration' + retailer_item_ids = 'retailer_item_ids' + targeting = 'targeting' + title = 'title' + video_id = 'video_id' + + _field_types = { + 'additional_image_index': 'int', + 'branded_content_shared_to_sponsor_status': 'string', + 'branded_content_sponsor_page_id': 'string', + 'call_to_action': 'AdCreativeLinkDataCallToAction', + 'collection_thumbnails': 'list', + 'customization_rules_spec': 'list', + 'image_hash': 'string', + 'image_url': 'string', + 'link_description': 'string', + 'message': 'string', + 'offer_id': 'string', + 'page_welcome_message': 'string', + 'post_click_configuration': 'AdCreativePostClickConfiguration', + 'retailer_item_ids': 'list', + 'targeting': 'Targeting', + 'title': 'string', + 'video_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adcustomizationrulespec.py b/tap_facebook/facebook_business/adobjects/adcustomizationrulespec.py new file mode 100644 index 0000000..c81de8a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adcustomizationrulespec.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 AdCustomizationRuleSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCustomizationRuleSpec, self).__init__() + self._isAdCustomizationRuleSpec = True + self._api = api + + class Field(AbstractObject.Field): + caption = 'caption' + customization_spec = 'customization_spec' + description = 'description' + image_hash = 'image_hash' + link = 'link' + message = 'message' + name = 'name' + priority = 'priority' + template_url_spec = 'template_url_spec' + video_id = 'video_id' + + _field_types = { + 'caption': 'string', + 'customization_spec': 'Object', + 'description': 'string', + 'image_hash': 'string', + 'link': 'string', + 'message': 'string', + 'name': 'string', + 'priority': 'int', + 'template_url_spec': 'AdCreativeTemplateURLSpec', + 'video_id': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/addynamiccreative.py b/tap_facebook/facebook_business/adobjects/addynamiccreative.py new file mode 100644 index 0000000..585241d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/addynamiccreative.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 AdDynamicCreative( + AbstractObject, +): + + def __init__(self, api=None): + super(AdDynamicCreative, self).__init__() + self._isAdDynamicCreative = True + self._api = api + + class Field(AbstractObject.Field): + preview_url = 'preview_url' + + _field_types = { + 'preview_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adentitytargetspend.py b/tap_facebook/facebook_business/adobjects/adentitytargetspend.py new file mode 100644 index 0000000..4ce69b6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adentitytargetspend.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 AdEntityTargetSpend( + AbstractObject, +): + + def __init__(self, api=None): + super(AdEntityTargetSpend, self).__init__() + self._isAdEntityTargetSpend = True + self._api = api + + class Field(AbstractObject.Field): + amount = 'amount' + has_error = 'has_error' + is_accurate = 'is_accurate' + is_prorated = 'is_prorated' + is_updating = 'is_updating' + + _field_types = { + 'amount': 'string', + 'has_error': 'bool', + 'is_accurate': 'bool', + 'is_prorated': 'bool', + 'is_updating': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adgroupissuesinfo.py b/tap_facebook/facebook_business/adobjects/adgroupissuesinfo.py new file mode 100644 index 0000000..32bd11a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adgroupissuesinfo.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 AdgroupIssuesInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(AdgroupIssuesInfo, self).__init__() + self._isAdgroupIssuesInfo = True + self._api = api + + class Field(AbstractObject.Field): + error_code = 'error_code' + error_message = 'error_message' + error_summary = 'error_summary' + error_type = 'error_type' + level = 'level' + + _field_types = { + 'error_code': 'int', + 'error_message': 'string', + 'error_summary': 'string', + 'error_type': 'string', + 'level': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adgroupmetadata.py b/tap_facebook/facebook_business/adobjects/adgroupmetadata.py new file mode 100644 index 0000000..2734e0a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adgroupmetadata.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 AdgroupMetadata( + AbstractObject, +): + + def __init__(self, api=None): + super(AdgroupMetadata, self).__init__() + self._isAdgroupMetadata = True + self._api = api + + class Field(AbstractObject.Field): + ad_standard_enhancements_edit_source = 'ad_standard_enhancements_edit_source' + adgroup_creation_source = 'adgroup_creation_source' + adgroup_edit_source = 'adgroup_edit_source' + carousel_style = 'carousel_style' + carousel_with_static_card_style = 'carousel_with_static_card_style' + + _field_types = { + 'ad_standard_enhancements_edit_source': 'int', + 'adgroup_creation_source': 'string', + 'adgroup_edit_source': 'string', + 'carousel_style': 'string', + 'carousel_with_static_card_style': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py b/tap_facebook/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py new file mode 100644 index 0000000..99b8209 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdgroupPlacementSpecificReviewFeedback( + AbstractObject, +): + + def __init__(self, api=None): + super(AdgroupPlacementSpecificReviewFeedback, self).__init__() + self._isAdgroupPlacementSpecificReviewFeedback = True + self._api = api + + class Field(AbstractObject.Field): + account_admin = 'account_admin' + ad = 'ad' + ads_conversion_experiences = 'ads_conversion_experiences' + b2c = 'b2c' + b2c_commerce_unified = 'b2c_commerce_unified' + bsg = 'bsg' + city_community = 'city_community' + commerce = 'commerce' + compromise = 'compromise' + daily_deals = 'daily_deals' + daily_deals_legacy = 'daily_deals_legacy' + dpa = 'dpa' + dri_copyright = 'dri_copyright' + dri_counterfeit = 'dri_counterfeit' + facebook = 'facebook' + facebook_pages_live_shopping = 'facebook_pages_live_shopping' + independent_work = 'independent_work' + instagram = 'instagram' + instagram_shop = 'instagram_shop' + job_search = 'job_search' + lead_gen_honeypot = 'lead_gen_honeypot' + marketplace = 'marketplace' + marketplace_home_rentals = 'marketplace_home_rentals' + marketplace_home_sales = 'marketplace_home_sales' + marketplace_motors = 'marketplace_motors' + marketplace_shops = 'marketplace_shops' + max_review_placements = 'max_review_placements' + neighborhoods = 'neighborhoods' + page_admin = 'page_admin' + product = 'product' + product_service = 'product_service' + profile = 'profile' + seller = 'seller' + shops = 'shops' + traffic_quality = 'traffic_quality' + unified_commerce_content = 'unified_commerce_content' + whatsapp = 'whatsapp' + + _field_types = { + 'account_admin': 'map', + 'ad': 'map', + 'ads_conversion_experiences': 'map', + 'b2c': 'map', + 'b2c_commerce_unified': 'map', + 'bsg': 'map', + 'city_community': 'map', + 'commerce': 'map', + 'compromise': 'map', + 'daily_deals': 'map', + 'daily_deals_legacy': 'map', + 'dpa': 'map', + 'dri_copyright': 'map', + 'dri_counterfeit': 'map', + 'facebook': 'map', + 'facebook_pages_live_shopping': 'map', + 'independent_work': 'map', + 'instagram': 'map', + 'instagram_shop': 'map', + 'job_search': 'map', + 'lead_gen_honeypot': 'map', + 'marketplace': 'map', + 'marketplace_home_rentals': 'map', + 'marketplace_home_sales': 'map', + 'marketplace_motors': 'map', + 'marketplace_shops': 'map', + 'max_review_placements': 'map', + 'neighborhoods': 'map', + 'page_admin': 'map', + 'product': 'map', + 'product_service': 'map', + 'profile': 'map', + 'seller': 'map', + 'shops': 'map', + 'traffic_quality': 'map', + 'unified_commerce_content': 'map', + 'whatsapp': 'map', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adgroupreviewfeedback.py b/tap_facebook/facebook_business/adobjects/adgroupreviewfeedback.py new file mode 100644 index 0000000..aa6dfe0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adgroupreviewfeedback.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 AdgroupReviewFeedback( + AbstractObject, +): + + def __init__(self, api=None): + super(AdgroupReviewFeedback, self).__init__() + self._isAdgroupReviewFeedback = True + self._api = api + + class Field(AbstractObject.Field): + field_global = 'global' + placement_specific = 'placement_specific' + + _field_types = { + 'global': 'map', + 'placement_specific': 'AdgroupPlacementSpecificReviewFeedback', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adimage.py b/tap_facebook/facebook_business/adobjects/adimage.py new file mode 100644 index 0000000..27db9dd --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adimage.py @@ -0,0 +1,126 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.adobjects.helpers.adimagemixin import AdImageMixin + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdImage( + AdImageMixin, + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdImage = True + super(AdImage, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + created_time = 'created_time' + creatives = 'creatives' + hash = 'hash' + height = 'height' + id = 'id' + is_associated_creatives_in_adgroups = 'is_associated_creatives_in_adgroups' + name = 'name' + original_height = 'original_height' + original_width = 'original_width' + owner_business = 'owner_business' + permalink_url = 'permalink_url' + status = 'status' + updated_time = 'updated_time' + url = 'url' + url_128 = 'url_128' + width = 'width' + bytes = 'bytes' + copy_from = 'copy_from' + filename = 'filename' + + class Status: + active = 'ACTIVE' + deleted = 'DELETED' + internal = 'INTERNAL' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adimages' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad_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 + if batch 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=AdImage, + 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', + 'created_time': 'datetime', + 'creatives': 'list', + 'hash': 'string', + 'height': 'unsigned int', + 'id': 'string', + 'is_associated_creatives_in_adgroups': 'bool', + 'name': 'string', + 'original_height': 'unsigned int', + 'original_width': 'unsigned int', + 'owner_business': 'Business', + 'permalink_url': 'string', + 'status': 'Status', + 'updated_time': 'datetime', + 'url': 'string', + 'url_128': 'string', + 'width': 'unsigned int', + 'bytes': 'string', + 'copy_from': 'Object', + 'filename': 'file' + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = AdImage.Status.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adkeywords.py b/tap_facebook/facebook_business/adobjects/adkeywords.py new file mode 100644 index 0000000..ac578b6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adkeywords.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 AdKeywords( + AbstractObject, +): + + def __init__(self, api=None): + super(AdKeywords, self).__init__() + self._isAdKeywords = True + self._api = api + + class Field(AbstractObject.Field): + brands = 'brands' + product_categories = 'product_categories' + product_names = 'product_names' + search_terms = 'search_terms' + + _field_types = { + 'brands': 'list', + 'product_categories': 'list', + 'product_names': 'list', + 'search_terms': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adlabel.py b/tap_facebook/facebook_business/adobjects/adlabel.py new file mode 100644 index 0000000..fb59331 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adlabel.py @@ -0,0 +1,273 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdLabel( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdLabel = True + super(AdLabel, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account = 'account' + created_time = 'created_time' + id = 'id' + name = 'name' + updated_time = 'updated_time' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adlabels' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad_label(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 + if batch 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=AdLabel, + 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 = { + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdLabel, + 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_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.adcreative import AdCreative + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adcreatives', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCreative, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.ad import Ad + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_ad_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.adset import AdSet + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.campaign import Campaign + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/campaigns', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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': 'AdAccount', + 'created_time': 'datetime', + 'id': 'string', + 'name': 'string', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/admonetizationproperty.py b/tap_facebook/facebook_business/adobjects/admonetizationproperty.py new file mode 100644 index 0000000..a69a3d9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/admonetizationproperty.py @@ -0,0 +1,194 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdMonetizationProperty( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdMonetizationProperty = True + super(AdMonetizationProperty, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + owner_business = 'owner_business' + 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=AdMonetizationProperty, + 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_network_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.') + from facebook_business.adobjects.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult + param_types = { + 'aggregation_period': 'aggregation_period_enum', + 'breakdowns': 'list', + 'filters': 'list', + 'limit': 'unsigned int', + 'metrics': 'list', + 'ordering_column': 'ordering_column_enum', + 'ordering_type': 'ordering_type_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), + 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), + 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), + 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), + 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adnetworkanalytics', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdNetworkAnalyticsSyncQueryResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdNetworkAnalyticsSyncQueryResult, 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_ad_network_analytic(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult + param_types = { + 'aggregation_period': 'aggregation_period_enum', + 'breakdowns': 'list', + 'filters': 'list', + 'limit': 'int', + 'metrics': 'list', + 'ordering_column': 'ordering_column_enum', + 'ordering_type': 'ordering_type_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), + 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), + 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), + 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), + 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adnetworkanalytics', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdMonetizationProperty, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdMonetizationProperty, 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_ad_network_analytics_results(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adnetworkanalyticsasyncqueryresult import AdNetworkAnalyticsAsyncQueryResult + param_types = { + 'query_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adnetworkanalytics_results', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdNetworkAnalyticsAsyncQueryResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdNetworkAnalyticsAsyncQueryResult, 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 = { + 'owner_business': 'Business', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py b/tap_facebook/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py new file mode 100644 index 0000000..7fd82e3 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.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 AdNetworkAnalyticsAsyncQueryResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AdNetworkAnalyticsAsyncQueryResult, self).__init__() + self._isAdNetworkAnalyticsAsyncQueryResult = True + self._api = api + + class Field(AbstractObject.Field): + data = 'data' + error = 'error' + omitted_results = 'omitted_results' + query_id = 'query_id' + results = 'results' + status = 'status' + + _field_types = { + 'data': 'Object', + 'error': 'Object', + 'omitted_results': 'list', + 'query_id': 'string', + 'results': 'list', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py b/tap_facebook/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py new file mode 100644 index 0000000..d39b37f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdNetworkAnalyticsSyncQueryResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AdNetworkAnalyticsSyncQueryResult, self).__init__() + self._isAdNetworkAnalyticsSyncQueryResult = True + self._api = api + + class Field(AbstractObject.Field): + omitted_results = 'omitted_results' + query_id = 'query_id' + results = 'results' + + class AggregationPeriod: + day = 'DAY' + total = 'TOTAL' + + class Breakdowns: + ad_server_campaign_id = 'AD_SERVER_CAMPAIGN_ID' + ad_space = 'AD_SPACE' + age = 'AGE' + app = 'APP' + clicked_view_tag = 'CLICKED_VIEW_TAG' + country = 'COUNTRY' + deal = 'DEAL' + deal_ad = 'DEAL_AD' + deal_page = 'DEAL_PAGE' + delivery_method = 'DELIVERY_METHOD' + display_format = 'DISPLAY_FORMAT' + fail_reason = 'FAIL_REASON' + gender = 'GENDER' + instant_article_id = 'INSTANT_ARTICLE_ID' + instant_article_page_id = 'INSTANT_ARTICLE_PAGE_ID' + is_deal_backfill = 'IS_DEAL_BACKFILL' + placement = 'PLACEMENT' + placement_name = 'PLACEMENT_NAME' + platform = 'PLATFORM' + property = 'PROPERTY' + sdk_version = 'SDK_VERSION' + + class Metrics: + fb_ad_network_bidding_bid_rate = 'FB_AD_NETWORK_BIDDING_BID_RATE' + fb_ad_network_bidding_request = 'FB_AD_NETWORK_BIDDING_REQUEST' + fb_ad_network_bidding_response = 'FB_AD_NETWORK_BIDDING_RESPONSE' + fb_ad_network_bidding_revenue = 'FB_AD_NETWORK_BIDDING_REVENUE' + fb_ad_network_bidding_win_rate = 'FB_AD_NETWORK_BIDDING_WIN_RATE' + fb_ad_network_click = 'FB_AD_NETWORK_CLICK' + fb_ad_network_cpm = 'FB_AD_NETWORK_CPM' + fb_ad_network_ctr = 'FB_AD_NETWORK_CTR' + fb_ad_network_filled_request = 'FB_AD_NETWORK_FILLED_REQUEST' + fb_ad_network_fill_rate = 'FB_AD_NETWORK_FILL_RATE' + fb_ad_network_imp = 'FB_AD_NETWORK_IMP' + fb_ad_network_impression_rate = 'FB_AD_NETWORK_IMPRESSION_RATE' + fb_ad_network_request = 'FB_AD_NETWORK_REQUEST' + fb_ad_network_revenue = 'FB_AD_NETWORK_REVENUE' + fb_ad_network_show_rate = 'FB_AD_NETWORK_SHOW_RATE' + fb_ad_network_video_guarantee_revenue = 'FB_AD_NETWORK_VIDEO_GUARANTEE_REVENUE' + fb_ad_network_video_mrc = 'FB_AD_NETWORK_VIDEO_MRC' + fb_ad_network_video_mrc_rate = 'FB_AD_NETWORK_VIDEO_MRC_RATE' + fb_ad_network_video_view = 'FB_AD_NETWORK_VIDEO_VIEW' + fb_ad_network_video_view_rate = 'FB_AD_NETWORK_VIDEO_VIEW_RATE' + + class OrderingColumn: + metric = 'METRIC' + time = 'TIME' + value = 'VALUE' + + class OrderingType: + ascending = 'ASCENDING' + descending = 'DESCENDING' + + _field_types = { + 'omitted_results': 'list', + 'query_id': 'string', + 'results': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['AggregationPeriod'] = AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values() + field_enum_info['Breakdowns'] = AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values() + field_enum_info['Metrics'] = AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values() + field_enum_info['OrderingColumn'] = AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values() + field_enum_info['OrderingType'] = AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adplacement.py b/tap_facebook/facebook_business/adobjects/adplacement.py new file mode 100644 index 0000000..e232685 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adplacement.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 AdPlacement( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdPlacement = True + super(AdPlacement, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + bundle_id = 'bundle_id' + display_format = 'display_format' + external_placement_id = 'external_placement_id' + google_display_format = 'google_display_format' + id = 'id' + name = 'name' + placement_group = 'placement_group' + platform = 'platform' + 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=AdPlacement, + 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 = { + 'bundle_id': 'string', + 'display_format': 'string', + 'external_placement_id': 'string', + 'google_display_format': 'string', + 'id': 'string', + 'name': 'string', + 'placement_group': 'Object', + 'platform': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adplacepageset.py b/tap_facebook/facebook_business/adobjects/adplacepageset.py new file mode 100644 index 0000000..4d52a0e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adplacepageset.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 AdPlacePageSet( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdPlacePageSet = True + super(AdPlacePageSet, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + id = 'id' + location_types = 'location_types' + name = 'name' + pages_count = 'pages_count' + parent_page = 'parent_page' + targeted_area_type = 'targeted_area_type' + + class LocationTypes: + home = 'home' + recent = 'recent' + + class TargetedAreaType: + custom_radius = 'CUSTOM_RADIUS' + marketing_area = 'MARKETING_AREA' + none = 'NONE' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'ad_place_page_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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad_place_page_set(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=AdPlacePageSet, + 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', + 'id': 'string', + 'location_types': 'list', + 'name': 'string', + 'pages_count': 'int', + 'parent_page': 'Page', + 'targeted_area_type': 'TargetedAreaType', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['LocationTypes'] = AdPlacePageSet.LocationTypes.__dict__.values() + field_enum_info['TargetedAreaType'] = AdPlacePageSet.TargetedAreaType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adplacepagesetmetadata.py b/tap_facebook/facebook_business/adobjects/adplacepagesetmetadata.py new file mode 100644 index 0000000..8f51ee6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adplacepagesetmetadata.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 AdPlacePageSetMetadata( + AbstractObject, +): + + def __init__(self, api=None): + super(AdPlacePageSetMetadata, self).__init__() + self._isAdPlacePageSetMetadata = True + self._api = api + + class Field(AbstractObject.Field): + audience = 'audience' + custom = 'custom' + extra_data = 'extra_data' + fixed_radius = 'fixed_radius' + + _field_types = { + 'audience': 'Object', + 'custom': 'Object', + 'extra_data': 'string', + 'fixed_radius': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adpreview.py b/tap_facebook/facebook_business/adobjects/adpreview.py new file mode 100644 index 0000000..0eb2e5c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adpreview.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.helpers.adpreviewmixin import AdPreviewMixin + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdPreview( + AdPreviewMixin, + AbstractObject, +): + + def __init__(self, api=None): + super(AdPreview, self).__init__() + self._isAdPreview = True + self._api = api + + class Field(AbstractObject.Field): + body = 'body' + transformation_spec = 'transformation_spec' + + class AdFormat: + audience_network_instream_video = 'AUDIENCE_NETWORK_INSTREAM_VIDEO' + audience_network_instream_video_mobile = 'AUDIENCE_NETWORK_INSTREAM_VIDEO_MOBILE' + audience_network_outstream_video = 'AUDIENCE_NETWORK_OUTSTREAM_VIDEO' + 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_reels_banner = 'FACEBOOK_REELS_BANNER' + facebook_reels_banner_desktop = 'FACEBOOK_REELS_BANNER_DESKTOP' + facebook_reels_mobile = 'FACEBOOK_REELS_MOBILE' + facebook_reels_postloop = 'FACEBOOK_REELS_POSTLOOP' + facebook_reels_sticker = 'FACEBOOK_REELS_STICKER' + facebook_story_mobile = 'FACEBOOK_STORY_MOBILE' + facebook_story_sticker_mobile = 'FACEBOOK_STORY_STICKER_MOBILE' + instagram_explore_contextual = 'INSTAGRAM_EXPLORE_CONTEXTUAL' + instagram_explore_grid_home = 'INSTAGRAM_EXPLORE_GRID_HOME' + 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_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_immersive_mobile = 'INSTREAM_BANNER_IMMERSIVE_MOBILE' + instream_banner_mobile = 'INSTREAM_BANNER_MOBILE' + instream_video_desktop = 'INSTREAM_VIDEO_DESKTOP' + 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' + marketplace_mobile = 'MARKETPLACE_MOBILE' + messenger_mobile_inbox_media = 'MESSENGER_MOBILE_INBOX_MEDIA' + messenger_mobile_story_media = 'MESSENGER_MOBILE_STORY_MEDIA' + mobile_banner = 'MOBILE_BANNER' + mobile_feed_basic = 'MOBILE_FEED_BASIC' + 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_desktop = 'SUGGESTED_VIDEO_DESKTOP' + 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' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'previews' + + _field_types = { + 'body': 'string', + 'transformation_spec': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['AdFormat'] = AdPreview.AdFormat.__dict__.values() + field_enum_info['CreativeFeature'] = AdPreview.CreativeFeature.__dict__.values() + field_enum_info['RenderType'] = AdPreview.RenderType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adpromotedobject.py b/tap_facebook/facebook_business/adobjects/adpromotedobject.py new file mode 100644 index 0000000..e4e70e2 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adpromotedobject.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 AdPromotedObject( + AbstractObject, +): + + def __init__(self, api=None): + super(AdPromotedObject, self).__init__() + self._isAdPromotedObject = True + self._api = api + + class Field(AbstractObject.Field): + application_id = 'application_id' + conversion_goal_id = 'conversion_goal_id' + custom_conversion_id = 'custom_conversion_id' + custom_event_str = 'custom_event_str' + custom_event_type = 'custom_event_type' + event_id = 'event_id' + fundraiser_campaign_id = 'fundraiser_campaign_id' + mcme_conversion_id = 'mcme_conversion_id' + 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' + pixel_id = 'pixel_id' + pixel_rule = 'pixel_rule' + place_page_set = 'place_page_set' + 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' + customize_product = 'CUSTOMIZE_PRODUCT' + d2_retention = 'D2_RETENTION' + d7_retention = 'D7_RETENTION' + donate = 'DONATE' + find_location = 'FIND_LOCATION' + initiated_checkout = 'INITIATED_CHECKOUT' + lead = 'LEAD' + level_achieved = 'LEVEL_ACHIEVED' + listing_interaction = 'LISTING_INTERACTION' + messaging_conversation_started_7d = 'MESSAGING_CONVERSATION_STARTED_7D' + other = 'OTHER' + purchase = 'PURCHASE' + rate = 'RATE' + schedule = 'SCHEDULE' + search = 'SEARCH' + service_booking_request = 'SERVICE_BOOKING_REQUEST' + spent_credits = 'SPENT_CREDITS' + start_trial = 'START_TRIAL' + submit_application = 'SUBMIT_APPLICATION' + subscribe = 'SUBSCRIBE' + tutorial_completion = 'TUTORIAL_COMPLETION' + + _field_types = { + 'application_id': 'string', + 'conversion_goal_id': 'string', + 'custom_conversion_id': 'string', + 'custom_event_str': 'string', + 'custom_event_type': 'CustomEventType', + 'event_id': 'string', + 'fundraiser_campaign_id': 'string', + 'mcme_conversion_id': 'string', + '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', + 'pixel_id': 'string', + 'pixel_rule': 'string', + 'place_page_set': 'AdPlacePageSet', + '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): + field_enum_info = {} + field_enum_info['CustomEventType'] = AdPromotedObject.CustomEventType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adrecommendation.py b/tap_facebook/facebook_business/adobjects/adrecommendation.py new file mode 100644 index 0000000..40ba29c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adrecommendation.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 AdRecommendation( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRecommendation, self).__init__() + self._isAdRecommendation = True + self._api = api + + class Field(AbstractObject.Field): + blame_field = 'blame_field' + code = 'code' + confidence = 'confidence' + importance = 'importance' + message = 'message' + recommendation_data = 'recommendation_data' + title = 'title' + + class Confidence: + high = 'HIGH' + low = 'LOW' + medium = 'MEDIUM' + + class Importance: + high = 'HIGH' + low = 'LOW' + medium = 'MEDIUM' + + _field_types = { + 'blame_field': 'string', + 'code': 'int', + 'confidence': 'Confidence', + 'importance': 'Importance', + 'message': 'string', + 'recommendation_data': 'AdRecommendationData', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Confidence'] = AdRecommendation.Confidence.__dict__.values() + field_enum_info['Importance'] = AdRecommendation.Importance.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adrecommendationdata.py b/tap_facebook/facebook_business/adobjects/adrecommendationdata.py new file mode 100644 index 0000000..c5caf6c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adrecommendationdata.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 AdRecommendationData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRecommendationData, self).__init__() + self._isAdRecommendationData = 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/tap_facebook/facebook_business/adobjects/adreportrun.py b/tap_facebook/facebook_business/adobjects/adreportrun.py new file mode 100644 index 0000000..a000c69 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adreportrun.py @@ -0,0 +1,182 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.adobjects.helpers.adreportrunmixin import AdReportRunMixin + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdReportRun( + AdReportRunMixin, + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdReportRun = True + super(AdReportRun, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + async_percent_completion = 'async_percent_completion' + async_status = 'async_status' + date_start = 'date_start' + date_stop = 'date_stop' + emails = 'emails' + friendly_name = 'friendly_name' + id = 'id' + is_bookmarked = 'is_bookmarked' + is_running = 'is_running' + schedule_id = 'schedule_id' + time_completed = 'time_completed' + time_ref = 'time_ref' + action_attribution_windows = 'action_attribution_windows' + action_breakdowns = 'action_breakdowns' + action_report_time = 'action_report_time' + breakdowns = 'breakdowns' + date_preset = 'date_preset' + default_summary = 'default_summary' + export_columns = 'export_columns' + export_format = 'export_format' + export_name = 'export_name' + fields = 'fields' + filtering = 'filtering' + level = 'level' + product_id_limit = 'product_id_limit' + sort = 'sort' + summary = 'summary' + summary_action_breakdowns = 'summary_action_breakdowns' + time_increment = 'time_increment' + time_range = 'time_range' + time_ranges = 'time_ranges' + use_account_attribution_setting = 'use_account_attribution_setting' + use_unified_attribution_setting = 'use_unified_attribution_setting' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'insights' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).get_insights_async(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=AdReportRun, + 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.adsinsights import AdsInsights + if is_async: + return self.get_insights_async(fields, params, batch, success, failure, pending) + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsInsights, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsInsights, 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 = { + 'account_id': 'string', + 'async_percent_completion': 'unsigned int', + 'async_status': 'string', + 'date_start': 'string', + 'date_stop': 'string', + 'emails': 'list', + 'friendly_name': 'string', + 'id': 'string', + 'is_bookmarked': 'bool', + 'is_running': 'bool', + 'schedule_id': 'string', + 'time_completed': 'unsigned int', + 'time_ref': 'unsigned int', + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'ActionReportTime', + 'breakdowns': 'list', + 'date_preset': 'DatePreset', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'Level', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adrule.py b/tap_facebook/facebook_business/adobjects/adrule.py new file mode 100644 index 0000000..daf180c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adrule.py @@ -0,0 +1,300 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdRule( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdRule = True + super(AdRule, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + created_by = 'created_by' + created_time = 'created_time' + evaluation_spec = 'evaluation_spec' + execution_spec = 'execution_spec' + id = 'id' + name = 'name' + schedule_spec = 'schedule_spec' + status = 'status' + updated_time = 'updated_time' + ui_creation_source = 'ui_creation_source' + + class Status: + deleted = 'DELETED' + disabled = 'DISABLED' + enabled = 'ENABLED' + has_issues = 'HAS_ISSUES' + + class UiCreationSource: + am_account_overview_recommendations = 'AM_ACCOUNT_OVERVIEW_RECOMMENDATIONS' + am_activity_history_table = 'AM_ACTIVITY_HISTORY_TABLE' + am_ad_object_name_card = 'AM_AD_OBJECT_NAME_CARD' + am_amfe_l3_recommendation = 'AM_AMFE_L3_RECOMMENDATION' + am_autoflow_guidance_card = 'AM_AUTOFLOW_GUIDANCE_CARD' + am_auto_apply_widget = 'AM_AUTO_APPLY_WIDGET' + am_editor_card = 'AM_EDITOR_CARD' + am_info_card = 'AM_INFO_CARD' + am_name_cell_dropdown = 'AM_NAME_CELL_DROPDOWN' + am_optimization_tip_guidance_card = 'AM_OPTIMIZATION_TIP_GUIDANCE_CARD' + am_performance_summary = 'AM_PERFORMANCE_SUMMARY' + 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' + pe_info_card = 'PE_INFO_CARD' + pe_toolbar_create_rule_dropdown = 'PE_TOOLBAR_CREATE_RULE_DROPDOWN' + rules_management_page_action_dropdown = 'RULES_MANAGEMENT_PAGE_ACTION_DROPDOWN' + rules_management_page_rule_group = 'RULES_MANAGEMENT_PAGE_RULE_GROUP' + rules_management_page_rule_name = 'RULES_MANAGEMENT_PAGE_RULE_NAME' + rules_management_page_top_nav = 'RULES_MANAGEMENT_PAGE_TOP_NAV' + rules_view_active_rules_dialog = 'RULES_VIEW_ACTIVE_RULES_DIALOG' + rule_creation_success_dialog = 'RULE_CREATION_SUCCESS_DIALOG' + rule_syd_redirect = 'RULE_SYD_REDIRECT' + rule_templates_dialog = 'RULE_TEMPLATES_DIALOG' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adrules_library' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad_rules_library(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 + if batch 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=AdRule, + 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 = { + 'evaluation_spec': 'Object', + 'execution_spec': 'Object', + 'name': 'string', + 'schedule_spec': 'Object', + 'status': 'status_enum', + } + enums = { + 'status_enum': AdRule.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdRule, + 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_execute(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/execute', + 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_history(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adrulehistory import AdRuleHistory + param_types = { + 'action': 'action_enum', + 'hide_no_changes': 'bool', + 'object_id': 'string', + } + enums = { + 'action_enum': AdRuleHistory.Action.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/history', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdRuleHistory, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdRuleHistory, 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_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/preview', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdRule, 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', + 'created_by': 'User', + 'created_time': 'datetime', + 'evaluation_spec': 'AdRuleEvaluationSpec', + 'execution_spec': 'AdRuleExecutionSpec', + 'id': 'string', + 'name': 'string', + 'schedule_spec': 'AdRuleScheduleSpec', + 'status': 'string', + 'updated_time': 'datetime', + 'ui_creation_source': 'UiCreationSource', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = AdRule.Status.__dict__.values() + field_enum_info['UiCreationSource'] = AdRule.UiCreationSource.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adruleevaluationspec.py b/tap_facebook/facebook_business/adobjects/adruleevaluationspec.py new file mode 100644 index 0000000..c0356a8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adruleevaluationspec.py @@ -0,0 +1,81 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdRuleEvaluationSpec( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdRuleEvaluationSpec = True + super(AdRuleEvaluationSpec, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + evaluation_type = 'evaluation_type' + filters = 'filters' + trigger = 'trigger' + id = 'id' + + class EvaluationType: + schedule = 'SCHEDULE' + trigger = 'TRIGGER' + + 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=AdRuleEvaluationSpec, + 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 = { + 'evaluation_type': 'EvaluationType', + 'filters': 'list', + 'trigger': 'AdRuleTrigger', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['EvaluationType'] = AdRuleEvaluationSpec.EvaluationType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adruleexecutionoptions.py b/tap_facebook/facebook_business/adobjects/adruleexecutionoptions.py new file mode 100644 index 0000000..48bbaef --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adruleexecutionoptions.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdRuleExecutionOptions( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRuleExecutionOptions, self).__init__() + self._isAdRuleExecutionOptions = True + self._api = api + + class Field(AbstractObject.Field): + field = 'field' + operator = 'operator' + value = 'value' + + class Operator: + equal = 'EQUAL' + value_in = 'IN' + + _field_types = { + 'field': 'string', + 'operator': 'Operator', + 'value': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Operator'] = AdRuleExecutionOptions.Operator.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adruleexecutionspec.py b/tap_facebook/facebook_business/adobjects/adruleexecutionspec.py new file mode 100644 index 0000000..be4366b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adruleexecutionspec.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 AdRuleExecutionSpec( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdRuleExecutionSpec = True + super(AdRuleExecutionSpec, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + execution_options = 'execution_options' + execution_type = 'execution_type' + id = 'id' + + class ExecutionType: + add_interest_relaxation = 'ADD_INTEREST_RELAXATION' + add_questionnaire_interests = 'ADD_QUESTIONNAIRE_INTERESTS' + audience_consolidation = 'AUDIENCE_CONSOLIDATION' + audience_consolidation_ask_first = 'AUDIENCE_CONSOLIDATION_ASK_FIRST' + change_bid = 'CHANGE_BID' + change_budget = 'CHANGE_BUDGET' + change_campaign_budget = 'CHANGE_CAMPAIGN_BUDGET' + dco = 'DCO' + increase_radius = 'INCREASE_RADIUS' + notification = 'NOTIFICATION' + pause = 'PAUSE' + ping_endpoint = 'PING_ENDPOINT' + rebalance_budget = 'REBALANCE_BUDGET' + rotate = 'ROTATE' + unpause = 'UNPAUSE' + update_creative = 'UPDATE_CREATIVE' + update_lax_budget = 'UPDATE_LAX_BUDGET' + update_lax_duration = 'UPDATE_LAX_DURATION' + + 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=AdRuleExecutionSpec, + 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 = { + 'execution_options': 'list', + 'execution_type': 'ExecutionType', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ExecutionType'] = AdRuleExecutionSpec.ExecutionType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adrulefilters.py b/tap_facebook/facebook_business/adobjects/adrulefilters.py new file mode 100644 index 0000000..7313a8a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adrulefilters.py @@ -0,0 +1,57 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdRuleFilters( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRuleFilters, self).__init__() + self._isAdRuleFilters = True + self._api = api + + class Field(AbstractObject.Field): + field = 'field' + operator = 'operator' + value = 'value' + + class Operator: + all = 'ALL' + any = 'ANY' + contain = 'CONTAIN' + equal = 'EQUAL' + greater_than = 'GREATER_THAN' + value_in = 'IN' + in_range = 'IN_RANGE' + less_than = 'LESS_THAN' + none = 'NONE' + not_contain = 'NOT_CONTAIN' + not_equal = 'NOT_EQUAL' + not_in = 'NOT_IN' + not_in_range = 'NOT_IN_RANGE' + + _field_types = { + 'field': 'string', + 'operator': 'Operator', + 'value': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Operator'] = AdRuleFilters.Operator.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adrulehistory.py b/tap_facebook/facebook_business/adobjects/adrulehistory.py new file mode 100644 index 0000000..4caef42 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adrulehistory.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 AdRuleHistory( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRuleHistory, self).__init__() + self._isAdRuleHistory = True + self._api = api + + class Field(AbstractObject.Field): + evaluation_spec = 'evaluation_spec' + exception_code = 'exception_code' + exception_message = 'exception_message' + execution_spec = 'execution_spec' + is_manual = 'is_manual' + results = 'results' + schedule_spec = 'schedule_spec' + timestamp = 'timestamp' + + class Action: + budget_not_redistributed = 'BUDGET_NOT_REDISTRIBUTED' + changed_bid = 'CHANGED_BID' + changed_budget = 'CHANGED_BUDGET' + email = 'EMAIL' + 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_semantic_based_audience_expansion = 'ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION' + endpoint_pinged = 'ENDPOINT_PINGED' + error = 'ERROR' + facebook_notification_sent = 'FACEBOOK_NOTIFICATION_SENT' + message_sent = 'MESSAGE_SENT' + not_changed = 'NOT_CHANGED' + paused = 'PAUSED' + unpaused = 'UNPAUSED' + + _field_types = { + 'evaluation_spec': 'AdRuleEvaluationSpec', + 'exception_code': 'int', + 'exception_message': 'string', + 'execution_spec': 'AdRuleExecutionSpec', + 'is_manual': 'bool', + 'results': 'list', + 'schedule_spec': 'AdRuleScheduleSpec', + 'timestamp': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Action'] = AdRuleHistory.Action.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adrulehistoryresult.py b/tap_facebook/facebook_business/adobjects/adrulehistoryresult.py new file mode 100644 index 0000000..f18db77 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adrulehistoryresult.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 AdRuleHistoryResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRuleHistoryResult, self).__init__() + self._isAdRuleHistoryResult = True + self._api = api + + class Field(AbstractObject.Field): + actions = 'actions' + object_id = 'object_id' + object_type = 'object_type' + + class ObjectType: + ad = 'AD' + adset = 'ADSET' + campaign = 'CAMPAIGN' + + _field_types = { + 'actions': 'list', + 'object_id': 'string', + 'object_type': 'ObjectType', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ObjectType'] = AdRuleHistoryResult.ObjectType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adrulehistoryresultaction.py b/tap_facebook/facebook_business/adobjects/adrulehistoryresultaction.py new file mode 100644 index 0000000..86c3d4d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adrulehistoryresultaction.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 AdRuleHistoryResultAction( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRuleHistoryResultAction, self).__init__() + self._isAdRuleHistoryResultAction = True + self._api = api + + class Field(AbstractObject.Field): + action = 'action' + field = 'field' + new_value = 'new_value' + old_value = 'old_value' + + _field_types = { + 'action': 'string', + 'field': 'string', + 'new_value': 'string', + 'old_value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adruleschedule.py b/tap_facebook/facebook_business/adobjects/adruleschedule.py new file mode 100644 index 0000000..71e6fbf --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adruleschedule.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 AdRuleSchedule( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRuleSchedule, self).__init__() + self._isAdRuleSchedule = True + self._api = api + + class Field(AbstractObject.Field): + days = 'days' + end_minute = 'end_minute' + start_minute = 'start_minute' + + _field_types = { + 'days': 'list', + 'end_minute': 'int', + 'start_minute': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adruleschedulespec.py b/tap_facebook/facebook_business/adobjects/adruleschedulespec.py new file mode 100644 index 0000000..6796c2f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adruleschedulespec.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 AdRuleScheduleSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRuleScheduleSpec, self).__init__() + self._isAdRuleScheduleSpec = True + self._api = api + + class Field(AbstractObject.Field): + schedule = 'schedule' + schedule_type = 'schedule_type' + + _field_types = { + 'schedule': 'list', + 'schedule_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adruletrigger.py b/tap_facebook/facebook_business/adobjects/adruletrigger.py new file mode 100644 index 0000000..f1ada13 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adruletrigger.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 AdRuleTrigger( + AbstractObject, +): + + def __init__(self, api=None): + super(AdRuleTrigger, self).__init__() + self._isAdRuleTrigger = True + self._api = api + + class Field(AbstractObject.Field): + field = 'field' + operator = 'operator' + type = 'type' + value = 'value' + + class Operator: + all = 'ALL' + any = 'ANY' + contain = 'CONTAIN' + equal = 'EQUAL' + greater_than = 'GREATER_THAN' + value_in = 'IN' + in_range = 'IN_RANGE' + less_than = 'LESS_THAN' + none = 'NONE' + not_contain = 'NOT_CONTAIN' + not_equal = 'NOT_EQUAL' + not_in = 'NOT_IN' + not_in_range = 'NOT_IN_RANGE' + + class Type: + delivery_insights_change = 'DELIVERY_INSIGHTS_CHANGE' + metadata_creation = 'METADATA_CREATION' + metadata_update = 'METADATA_UPDATE' + stats_change = 'STATS_CHANGE' + stats_milestone = 'STATS_MILESTONE' + + _field_types = { + 'field': 'string', + 'operator': 'Operator', + 'type': 'Type', + 'value': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Operator'] = AdRuleTrigger.Operator.__dict__.values() + field_enum_info['Type'] = AdRuleTrigger.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adsactionstats.py b/tap_facebook/facebook_business/adobjects/adsactionstats.py new file mode 100644 index 0000000..89d6911 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adsactionstats.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 AdsActionStats( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsActionStats, self).__init__() + self._isAdsActionStats = True + self._api = api + + class Field(AbstractObject.Field): + field_1d_click = '1d_click' + field_1d_ev = '1d_ev' + field_1d_view = '1d_view' + field_28d_click = '28d_click' + field_28d_view = '28d_view' + field_7d_click = '7d_click' + field_7d_view = '7d_view' + 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': 'string', + '1d_ev': 'string', + '1d_view': 'string', + '28d_click': 'string', + '28d_view': 'string', + '7d_click': 'string', + '7d_view': 'string', + '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': 'string', + 'inline': 'string', + '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 + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adset.py b/tap_facebook/facebook_business/adobjects/adset.py new file mode 100644 index 0000000..735bf36 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adset.py @@ -0,0 +1,1103 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.mixins import HasAdLabels +from facebook_business.mixins import CanValidate + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdSet( + AbstractCrudObject, + HasAdLabels, + CanValidate, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdSet = True + super(AdSet, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + adlabels = 'adlabels' + adset_schedule = 'adset_schedule' + asset_feed_id = 'asset_feed_id' + attribution_spec = 'attribution_spec' + bid_adjustments = 'bid_adjustments' + bid_amount = 'bid_amount' + bid_constraints = 'bid_constraints' + bid_info = 'bid_info' + bid_strategy = 'bid_strategy' + 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' + created_time = 'created_time' + creative_sequence = 'creative_sequence' + daily_budget = 'daily_budget' + daily_min_spend_target = 'daily_min_spend_target' + daily_spend_cap = 'daily_spend_cap' + destination_type = 'destination_type' + dsa_beneficiary = 'dsa_beneficiary' + dsa_payor = 'dsa_payor' + effective_status = 'effective_status' + end_time = 'end_time' + existing_customer_budget_percentage = 'existing_customer_budget_percentage' + frequency_control_specs = 'frequency_control_specs' + 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' + lifetime_budget = 'lifetime_budget' + lifetime_imps = 'lifetime_imps' + lifetime_min_spend_target = 'lifetime_min_spend_target' + lifetime_spend_cap = 'lifetime_spend_cap' + multi_optimization_goal_weight = 'multi_optimization_goal_weight' + name = 'name' + optimization_goal = 'optimization_goal' + optimization_sub_event = 'optimization_sub_event' + pacing_type = 'pacing_type' + promoted_object = 'promoted_object' + recommendations = 'recommendations' + recurring_budget_semantics = 'recurring_budget_semantics' + review_feedback = 'review_feedback' + rf_prediction_id = 'rf_prediction_id' + source_adset = 'source_adset' + source_adset_id = 'source_adset_id' + start_time = 'start_time' + status = 'status' + targeting = 'targeting' + targeting_optimization_types = 'targeting_optimization_types' + time_based_ad_rotation_id_blocks = 'time_based_ad_rotation_id_blocks' + time_based_ad_rotation_intervals = 'time_based_ad_rotation_intervals' + updated_time = 'updated_time' + use_new_app_click = 'use_new_app_click' + campaign_spec = 'campaign_spec' + daily_imps = 'daily_imps' + date_format = 'date_format' + execution_options = 'execution_options' + line_number = 'line_number' + rb_prediction_id = 'rb_prediction_id' + time_start = 'time_start' + time_stop = 'time_stop' + topline_id = 'topline_id' + tune_for_category = 'tune_for_category' + + 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' + clicks = 'CLICKS' + impressions = 'IMPRESSIONS' + link_clicks = 'LINK_CLICKS' + listing_interaction = 'LISTING_INTERACTION' + none = 'NONE' + offer_claims = 'OFFER_CLAIMS' + page_likes = 'PAGE_LIKES' + post_engagement = 'POST_ENGAGEMENT' + purchase = 'PURCHASE' + thruplay = 'THRUPLAY' + + class ConfiguredStatus: + active = 'ACTIVE' + archived = 'ARCHIVED' + deleted = 'DELETED' + paused = 'PAUSED' + + class EffectiveStatus: + active = 'ACTIVE' + archived = 'ARCHIVED' + campaign_paused = 'CAMPAIGN_PAUSED' + deleted = 'DELETED' + in_process = 'IN_PROCESS' + paused = 'PAUSED' + with_issues = 'WITH_ISSUES' + + 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' + 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' + + class Status: + active = 'ACTIVE' + archived = 'ARCHIVED' + deleted = 'DELETED' + 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' + + class DestinationType: + app = 'APP' + applinks_automatic = 'APPLINKS_AUTOMATIC' + facebook = 'FACEBOOK' + instagram_direct = 'INSTAGRAM_DIRECT' + 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' + on_ad = 'ON_AD' + on_event = 'ON_EVENT' + on_page = 'ON_PAGE' + on_post = 'ON_POST' + on_video = 'ON_VIDEO' + shop_automatic = 'SHOP_AUTOMATIC' + undefined = 'UNDEFINED' + website = 'WEBSITE' + whatsapp = 'WHATSAPP' + + class ExecutionOptions: + include_recommendations = 'include_recommendations' + validate_only = 'validate_only' + + class FullFunnelExplorationMode: + extended_exploration = 'EXTENDED_EXPLORATION' + limited_exploration = 'LIMITED_EXPLORATION' + none_exploration = 'NONE_EXPLORATION' + + class MultiOptimizationGoalWeight: + balanced = 'BALANCED' + prefer_event = 'PREFER_EVENT' + prefer_install = 'PREFER_INSTALL' + undefined = 'UNDEFINED' + + class OptimizationSubEvent: + none = 'NONE' + travel_intent = 'TRAVEL_INTENT' + travel_intent_bucket_01 = 'TRAVEL_INTENT_BUCKET_01' + travel_intent_bucket_02 = 'TRAVEL_INTENT_BUCKET_02' + travel_intent_bucket_03 = 'TRAVEL_INTENT_BUCKET_03' + travel_intent_bucket_04 = 'TRAVEL_INTENT_BUCKET_04' + travel_intent_bucket_05 = 'TRAVEL_INTENT_BUCKET_05' + travel_intent_no_destination_intent = 'TRAVEL_INTENT_NO_DESTINATION_INTENT' + trip_consideration = 'TRIP_CONSIDERATION' + video_sound_on = 'VIDEO_SOUND_ON' + + class TuneForCategory: + credit = 'CREDIT' + employment = 'EMPLOYMENT' + housing = 'HOUSING' + issues_elections_politics = 'ISSUES_ELECTIONS_POLITICS' + none = 'NONE' + online_gambling_and_gaming = 'ONLINE_GAMBLING_AND_GAMING' + + class Operator: + all = 'ALL' + any = 'ANY' + + class StatusOption: + active = 'ACTIVE' + inherited_from_source = 'INHERITED_FROM_SOURCE' + paused = 'PAUSED' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adsets' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad_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 + if batch 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 = { + 'am_call_tags': 'map', + 'date_preset': 'date_preset_enum', + 'from_adtable': 'bool', + 'time_range': 'map', + } + enums = { + 'date_preset_enum': [ + 'data_maximum', + 'last_14d', + 'last_28d', + 'last_30d', + 'last_3d', + 'last_7d', + 'last_90d', + 'last_month', + 'last_quarter', + 'last_week_mon_sun', + 'last_week_sun_sat', + 'last_year', + 'maximum', + 'this_month', + 'this_quarter', + 'this_week_mon_today', + 'this_week_sun_today', + 'this_year', + 'today', + 'yesterday', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + 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 = { + 'account_id': 'string', + 'adlabels': 'list', + 'adset_schedule': 'list', + 'attribution_spec': 'list', + 'bid_adjustments': 'Object', + 'bid_amount': 'int', + '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', + 'daily_imps': 'unsigned int', + 'daily_min_spend_target': 'unsigned int', + 'daily_spend_cap': 'unsigned int', + 'date_format': 'string', + 'destination_type': 'destination_type_enum', + 'dsa_beneficiary': 'string', + 'dsa_payor': 'string', + 'end_time': 'datetime', + 'execution_options': 'list', + 'existing_customer_budget_percentage': 'unsigned int', + 'full_funnel_exploration_mode': 'full_funnel_exploration_mode_enum', + 'lifetime_budget': 'unsigned int', + 'lifetime_imps': 'unsigned int', + 'lifetime_min_spend_target': 'unsigned int', + 'lifetime_spend_cap': 'unsigned int', + 'multi_optimization_goal_weight': 'multi_optimization_goal_weight_enum', + 'name': 'string', + 'optimization_goal': 'optimization_goal_enum', + 'optimization_sub_event': 'optimization_sub_event_enum', + 'pacing_type': 'list', + 'promoted_object': 'Object', + 'rb_prediction_id': 'string', + 'rf_prediction_id': 'string', + 'start_time': 'datetime', + 'status': 'status_enum', + 'targeting': 'Targeting', + 'time_based_ad_rotation_id_blocks': 'list>', + 'time_based_ad_rotation_intervals': 'list', + 'time_start': 'datetime', + 'time_stop': 'datetime', + 'tune_for_category': 'tune_for_category_enum', + } + enums = { + 'bid_strategy_enum': AdSet.BidStrategy.__dict__.values(), + 'billing_event_enum': AdSet.BillingEvent.__dict__.values(), + 'destination_type_enum': AdSet.DestinationType.__dict__.values(), + 'execution_options_enum': AdSet.ExecutionOptions.__dict__.values(), + 'full_funnel_exploration_mode_enum': AdSet.FullFunnelExplorationMode.__dict__.values(), + 'multi_optimization_goal_weight_enum': AdSet.MultiOptimizationGoalWeight.__dict__.values(), + 'optimization_goal_enum': AdSet.OptimizationGoal.__dict__.values(), + 'optimization_sub_event_enum': AdSet.OptimizationSubEvent.__dict__.values(), + 'status_enum': AdSet.Status.__dict__.values(), + 'tune_for_category_enum': AdSet.TuneForCategory.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + 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_activities(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adactivity import AdActivity + param_types = { + 'after': 'string', + 'business_id': 'string', + 'category': 'category_enum', + 'limit': 'int', + 'since': 'datetime', + 'uid': 'int', + 'until': 'datetime', + } + enums = { + 'category_enum': AdActivity.Category.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/activities', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdActivity, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdActivity, 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_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudy import AdStudy + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ad_studies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_ad_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.adcreative import AdCreative + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adcreatives', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreative, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCreative, 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_ad_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'adlabels': 'list', + 'execution_options': 'list', + } + enums = { + 'execution_options_enum': AdSet.ExecutionOptions.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/adlabels', + 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'adlabels': 'list', + 'execution_options': 'list', + } + enums = { + 'execution_options_enum': AdSet.ExecutionOptions.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adlabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_ad_rules_governed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adrule import AdRule + param_types = { + 'pass_evaluation': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adrules_governed', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdRule, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.ad import Ad + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'time_range': 'map', + 'updated_since': 'int', + } + enums = { + 'date_preset_enum': Ad.DatePreset.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_async_ad_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adasyncrequest import AdAsyncRequest + param_types = { + 'statuses': 'list', + } + enums = { + 'statuses_enum': AdAsyncRequest.Statuses.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/asyncadrequests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAsyncRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAsyncRequest, 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'is_completed': 'bool', + 'time_range': 'map', + } + enums = { + 'date_preset_enum': AdSet.DatePreset.__dict__.values(), + 'effective_status_enum': AdSet.EffectiveStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/copies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_copy(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'campaign_id': 'string', + 'create_dco_adset': 'bool', + 'deep_copy': 'bool', + 'end_time': 'datetime', + 'rename_options': 'Object', + 'start_time': 'datetime', + 'status_option': 'status_option_enum', + } + enums = { + 'status_option_enum': AdSet.StatusOption.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/copies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_delivery_estimate(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adcampaigndeliveryestimate import AdCampaignDeliveryEstimate + param_types = { + 'optimization_goal': 'optimization_goal_enum', + 'promoted_object': 'Object', + 'targeting_spec': 'Targeting', + } + enums = { + 'optimization_goal_enum': AdCampaignDeliveryEstimate.OptimizationGoal.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/delivery_estimate', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCampaignDeliveryEstimate, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdCampaignDeliveryEstimate, 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_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.adsinsights import AdsInsights + if is_async: + return self.get_insights_async(fields, params, batch, success, failure, pending) + param_types = { + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'action_report_time_enum', + 'breakdowns': 'list', + 'date_preset': 'date_preset_enum', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'level_enum', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + enums = { + 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), + 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), + 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), + 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), + 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), + 'level_enum': AdsInsights.Level.__dict__.values(), + 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsInsights, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsInsights, 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() + + def get_insights_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adreportrun import AdReportRun + from facebook_business.adobjects.adsinsights import AdsInsights + param_types = { + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'action_report_time_enum', + 'breakdowns': 'list', + 'date_preset': 'date_preset_enum', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'level_enum', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + enums = { + 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), + 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), + 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), + 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), + 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), + 'level_enum': AdsInsights.Level.__dict__.values(), + 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), + } + + if fields is not None: + params['fields'] = params.get('fields') if params.get('fields') is not None else list() + params['fields'].extend(field for field in fields if field not in params['fields']) + + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdReportRun, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdReportRun, api=self._api), + include_summary=False, + ) + request.add_params(params) + + if batch is 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_targeting_sentence_lines(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.targetingsentenceline import TargetingSentenceLine + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/targetingsentencelines', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=TargetingSentenceLine, + api_type='EDGE', + response_parser=ObjectParser(target_class=TargetingSentenceLine, 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', + 'adlabels': 'list', + 'adset_schedule': 'list', + 'asset_feed_id': 'string', + 'attribution_spec': 'list', + 'bid_adjustments': 'AdBidAdjustments', + 'bid_amount': 'unsigned int', + 'bid_constraints': 'AdCampaignBidConstraint', + 'bid_info': 'map', + 'bid_strategy': 'BidStrategy', + 'billing_event': 'BillingEvent', + 'budget_remaining': 'string', + 'campaign': 'Campaign', + 'campaign_active_time': 'string', + 'campaign_attribution': 'string', + 'campaign_id': 'string', + 'configured_status': 'ConfiguredStatus', + 'created_time': 'datetime', + 'creative_sequence': 'list', + 'daily_budget': 'string', + 'daily_min_spend_target': 'string', + 'daily_spend_cap': 'string', + 'destination_type': 'string', + 'dsa_beneficiary': 'string', + 'dsa_payor': 'string', + 'effective_status': 'EffectiveStatus', + 'end_time': 'datetime', + 'existing_customer_budget_percentage': 'unsigned int', + 'frequency_control_specs': 'list', + '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', + 'lifetime_budget': 'string', + 'lifetime_imps': 'int', + 'lifetime_min_spend_target': 'string', + 'lifetime_spend_cap': 'string', + 'multi_optimization_goal_weight': 'string', + 'name': 'string', + 'optimization_goal': 'OptimizationGoal', + 'optimization_sub_event': 'string', + 'pacing_type': 'list', + 'promoted_object': 'AdPromotedObject', + 'recommendations': 'list', + 'recurring_budget_semantics': 'bool', + 'review_feedback': 'string', + 'rf_prediction_id': 'string', + 'source_adset': 'AdSet', + 'source_adset_id': 'string', + 'start_time': 'datetime', + 'status': 'Status', + 'targeting': 'Targeting', + 'targeting_optimization_types': 'list>', + 'time_based_ad_rotation_id_blocks': 'list>', + 'time_based_ad_rotation_intervals': 'list', + 'updated_time': 'datetime', + 'use_new_app_click': 'bool', + 'campaign_spec': 'Object', + 'daily_imps': 'unsigned int', + 'date_format': 'string', + 'execution_options': 'list', + 'line_number': 'unsigned int', + 'rb_prediction_id': 'string', + 'time_start': 'datetime', + 'time_stop': 'datetime', + 'topline_id': 'string', + 'tune_for_category': 'TuneForCategory', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BidStrategy'] = AdSet.BidStrategy.__dict__.values() + field_enum_info['BillingEvent'] = AdSet.BillingEvent.__dict__.values() + field_enum_info['ConfiguredStatus'] = AdSet.ConfiguredStatus.__dict__.values() + field_enum_info['EffectiveStatus'] = AdSet.EffectiveStatus.__dict__.values() + field_enum_info['OptimizationGoal'] = AdSet.OptimizationGoal.__dict__.values() + field_enum_info['Status'] = AdSet.Status.__dict__.values() + field_enum_info['DatePreset'] = AdSet.DatePreset.__dict__.values() + field_enum_info['DestinationType'] = AdSet.DestinationType.__dict__.values() + field_enum_info['ExecutionOptions'] = AdSet.ExecutionOptions.__dict__.values() + 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['TuneForCategory'] = AdSet.TuneForCategory.__dict__.values() + field_enum_info['Operator'] = AdSet.Operator.__dict__.values() + field_enum_info['StatusOption'] = AdSet.StatusOption.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adshistogramstats.py b/tap_facebook/facebook_business/adobjects/adshistogramstats.py new file mode 100644 index 0000000..ad5c6a3 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adshistogramstats.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 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_ev = '1d_ev' + field_1d_view = '1d_view' + field_28d_click = '28d_click' + field_28d_view = '28d_view' + field_7d_click = '7d_click' + field_7d_view = '7d_view' + 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_ev': 'list', + '1d_view': 'list', + '28d_click': 'list', + '28d_view': 'list', + '7d_click': 'list', + '7d_view': '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/tap_facebook/facebook_business/adobjects/adsimagecrops.py b/tap_facebook/facebook_business/adobjects/adsimagecrops.py new file mode 100644 index 0000000..d2135fc --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adsimagecrops.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 AdsImageCrops( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsImageCrops, self).__init__() + self._isAdsImageCrops = True + self._api = api + + class Field(AbstractObject.Field): + field_100x100 = '100x100' + field_100x72 = '100x72' + field_191x100 = '191x100' + field_400x150 = '400x150' + field_400x500 = '400x500' + field_600x360 = '600x360' + field_90x160 = '90x160' + + _field_types = { + '100x100': 'list', + '100x72': 'list', + '191x100': 'list', + '400x150': 'list', + '400x500': 'list', + '600x360': 'list', + '90x160': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adsinsights.py b/tap_facebook/facebook_business/adobjects/adsinsights.py new file mode 100644 index 0000000..ced5893 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adsinsights.py @@ -0,0 +1,449 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license 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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class AdsInsights( + AdsInsightsMixin, + AbstractObject, +): + + def __init__(self, api=None): + super(AdsInsights, self).__init__() + self._isAdsInsights = True + self._api = api + + class Field(AbstractObject.Field): + account_currency = 'account_currency' + account_id = 'account_id' + account_name = 'account_name' + action_values = 'action_values' + actions = 'actions' + ad_click_actions = 'ad_click_actions' + ad_id = 'ad_id' + ad_impression_actions = 'ad_impression_actions' + ad_name = 'ad_name' + adset_end = 'adset_end' + adset_id = 'adset_id' + adset_name = 'adset_name' + adset_start = 'adset_start' + age_targeting = 'age_targeting' + attribution_setting = 'attribution_setting' + auction_bid = 'auction_bid' + auction_competitiveness = 'auction_competitiveness' + auction_max_competitor_bid = 'auction_max_competitor_bid' + buying_type = 'buying_type' + campaign_id = 'campaign_id' + campaign_name = 'campaign_name' + canvas_avg_view_percent = 'canvas_avg_view_percent' + canvas_avg_view_time = 'canvas_avg_view_time' + catalog_segment_actions = 'catalog_segment_actions' + catalog_segment_value = 'catalog_segment_value' + catalog_segment_value_mobile_purchase_roas = 'catalog_segment_value_mobile_purchase_roas' + catalog_segment_value_omni_purchase_roas = 'catalog_segment_value_omni_purchase_roas' + catalog_segment_value_website_purchase_roas = 'catalog_segment_value_website_purchase_roas' + clicks = 'clicks' + conversion_lead_rate = 'conversion_lead_rate' + conversion_rate_ranking = 'conversion_rate_ranking' + conversion_values = 'conversion_values' + conversions = 'conversions' + converted_product_quantity = 'converted_product_quantity' + converted_product_value = 'converted_product_value' + cost_per_15_sec_video_view = 'cost_per_15_sec_video_view' + cost_per_2_sec_continuous_video_view = 'cost_per_2_sec_continuous_video_view' + cost_per_action_type = 'cost_per_action_type' + cost_per_ad_click = 'cost_per_ad_click' + cost_per_conversion = 'cost_per_conversion' + cost_per_conversion_lead = 'cost_per_conversion_lead' + cost_per_dda_countby_convs = 'cost_per_dda_countby_convs' + cost_per_estimated_ad_recallers = 'cost_per_estimated_ad_recallers' + cost_per_inline_link_click = 'cost_per_inline_link_click' + cost_per_inline_post_engagement = 'cost_per_inline_post_engagement' + cost_per_one_thousand_ad_impression = 'cost_per_one_thousand_ad_impression' + cost_per_outbound_click = 'cost_per_outbound_click' + cost_per_thruplay = 'cost_per_thruplay' + cost_per_unique_action_type = 'cost_per_unique_action_type' + cost_per_unique_click = 'cost_per_unique_click' + cost_per_unique_conversion = 'cost_per_unique_conversion' + cost_per_unique_inline_link_click = 'cost_per_unique_inline_link_click' + cost_per_unique_outbound_click = 'cost_per_unique_outbound_click' + cpc = 'cpc' + cpm = 'cpm' + cpp = 'cpp' + created_time = 'created_time' + creative_media_type = 'creative_media_type' + ctr = 'ctr' + date_start = 'date_start' + date_stop = 'date_stop' + dda_countby_convs = 'dda_countby_convs' + dda_results = 'dda_results' + engagement_rate_ranking = 'engagement_rate_ranking' + estimated_ad_recall_rate = 'estimated_ad_recall_rate' + estimated_ad_recall_rate_lower_bound = 'estimated_ad_recall_rate_lower_bound' + estimated_ad_recall_rate_upper_bound = 'estimated_ad_recall_rate_upper_bound' + estimated_ad_recallers = 'estimated_ad_recallers' + estimated_ad_recallers_lower_bound = 'estimated_ad_recallers_lower_bound' + estimated_ad_recallers_upper_bound = 'estimated_ad_recallers_upper_bound' + frequency = 'frequency' + full_view_impressions = 'full_view_impressions' + full_view_reach = 'full_view_reach' + gender_targeting = 'gender_targeting' + impressions = 'impressions' + inline_link_click_ctr = 'inline_link_click_ctr' + inline_link_clicks = 'inline_link_clicks' + inline_post_engagement = 'inline_post_engagement' + instagram_upcoming_event_reminders_set = 'instagram_upcoming_event_reminders_set' + instant_experience_clicks_to_open = 'instant_experience_clicks_to_open' + instant_experience_clicks_to_start = 'instant_experience_clicks_to_start' + instant_experience_outbound_clicks = 'instant_experience_outbound_clicks' + 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' + optimization_goal = 'optimization_goal' + outbound_clicks = 'outbound_clicks' + outbound_clicks_ctr = 'outbound_clicks_ctr' + place_page_name = 'place_page_name' + purchase_roas = 'purchase_roas' + qualifying_question_qualify_answer_rate = 'qualifying_question_qualify_answer_rate' + quality_ranking = 'quality_ranking' + reach = 'reach' + social_spend = 'social_spend' + spend = 'spend' + total_postbacks = 'total_postbacks' + total_postbacks_detailed = 'total_postbacks_detailed' + total_postbacks_detailed_v4 = 'total_postbacks_detailed_v4' + unique_actions = 'unique_actions' + unique_clicks = 'unique_clicks' + unique_conversions = 'unique_conversions' + unique_ctr = 'unique_ctr' + unique_inline_link_click_ctr = 'unique_inline_link_click_ctr' + unique_inline_link_clicks = 'unique_inline_link_clicks' + unique_link_clicks_ctr = 'unique_link_clicks_ctr' + unique_outbound_clicks = 'unique_outbound_clicks' + unique_outbound_clicks_ctr = 'unique_outbound_clicks_ctr' + unique_video_continuous_2_sec_watched_actions = 'unique_video_continuous_2_sec_watched_actions' + unique_video_view_15_sec = 'unique_video_view_15_sec' + updated_time = 'updated_time' + video_15_sec_watched_actions = 'video_15_sec_watched_actions' + video_30_sec_watched_actions = 'video_30_sec_watched_actions' + video_avg_time_watched_actions = 'video_avg_time_watched_actions' + video_continuous_2_sec_watched_actions = 'video_continuous_2_sec_watched_actions' + video_p100_watched_actions = 'video_p100_watched_actions' + video_p25_watched_actions = 'video_p25_watched_actions' + video_p50_watched_actions = 'video_p50_watched_actions' + video_p75_watched_actions = 'video_p75_watched_actions' + video_p95_watched_actions = 'video_p95_watched_actions' + video_play_actions = 'video_play_actions' + video_play_curve_actions = 'video_play_curve_actions' + video_play_retention_0_to_15s_actions = 'video_play_retention_0_to_15s_actions' + video_play_retention_20_to_60s_actions = 'video_play_retention_20_to_60s_actions' + video_play_retention_graph_actions = 'video_play_retention_graph_actions' + video_thruplay_watched_actions = 'video_thruplay_watched_actions' + video_time_watched_actions = 'video_time_watched_actions' + website_ctr = 'website_ctr' + website_purchase_roas = 'website_purchase_roas' + wish_bid = 'wish_bid' + + 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' + skan_view = 'skan_view' + + class ActionBreakdowns: + 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_destination = 'action_destination' + action_device = 'action_device' + action_reaction = 'action_reaction' + action_target_id = 'action_target_id' + 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' + impression = 'impression' + mixed = 'mixed' + + class Breakdowns: + ad_format_asset = 'ad_format_asset' + age = 'age' + app_id = 'app_id' + 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' + dma = 'dma' + fidelity_type = 'fidelity_type' + frequency_value = 'frequency_value' + gender = 'gender' + hourly_stats_aggregated_by_advertiser_time_zone = 'hourly_stats_aggregated_by_advertiser_time_zone' + hourly_stats_aggregated_by_audience_time_zone = 'hourly_stats_aggregated_by_audience_time_zone' + hsid = 'hsid' + 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' + postback_sequence_index = 'postback_sequence_index' + product_id = 'product_id' + publisher_platform = 'publisher_platform' + redownload = 'redownload' + region = 'region' + 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' + video_asset = 'video_asset' + + 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' + + class Level: + account = 'account' + ad = 'ad' + adset = 'adset' + campaign = 'campaign' + + class SummaryActionBreakdowns: + 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_destination = 'action_destination' + action_device = 'action_device' + action_reaction = 'action_reaction' + action_target_id = 'action_target_id' + 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 + def get_endpoint(cls): + return 'insights' + + _field_types = { + 'account_currency': 'string', + 'account_id': 'string', + 'account_name': 'string', + 'action_values': 'list', + 'actions': 'list', + 'ad_click_actions': 'list', + 'ad_id': 'string', + 'ad_impression_actions': 'list', + 'ad_name': 'string', + 'adset_end': 'string', + 'adset_id': 'string', + 'adset_name': 'string', + 'adset_start': 'string', + 'age_targeting': 'string', + 'attribution_setting': 'string', + 'auction_bid': 'string', + 'auction_competitiveness': 'string', + 'auction_max_competitor_bid': 'string', + 'buying_type': 'string', + 'campaign_id': 'string', + 'campaign_name': 'string', + 'canvas_avg_view_percent': 'string', + 'canvas_avg_view_time': 'string', + 'catalog_segment_actions': 'list', + 'catalog_segment_value': 'list', + 'catalog_segment_value_mobile_purchase_roas': 'list', + 'catalog_segment_value_omni_purchase_roas': 'list', + 'catalog_segment_value_website_purchase_roas': 'list', + 'clicks': 'string', + 'conversion_lead_rate': 'string', + 'conversion_rate_ranking': 'string', + 'conversion_values': 'list', + 'conversions': 'list', + 'converted_product_quantity': 'list', + 'converted_product_value': 'list', + 'cost_per_15_sec_video_view': 'list', + 'cost_per_2_sec_continuous_video_view': 'list', + 'cost_per_action_type': 'list', + 'cost_per_ad_click': 'list', + 'cost_per_conversion': 'list', + 'cost_per_conversion_lead': 'string', + 'cost_per_dda_countby_convs': 'string', + 'cost_per_estimated_ad_recallers': 'string', + 'cost_per_inline_link_click': 'string', + 'cost_per_inline_post_engagement': 'string', + 'cost_per_one_thousand_ad_impression': 'list', + 'cost_per_outbound_click': 'list', + 'cost_per_thruplay': 'list', + 'cost_per_unique_action_type': 'list', + 'cost_per_unique_click': 'string', + 'cost_per_unique_conversion': 'list', + 'cost_per_unique_inline_link_click': 'string', + 'cost_per_unique_outbound_click': 'list', + 'cpc': 'string', + 'cpm': 'string', + 'cpp': 'string', + 'created_time': 'string', + 'creative_media_type': 'string', + 'ctr': 'string', + 'date_start': 'string', + 'date_stop': 'string', + 'dda_countby_convs': 'string', + 'dda_results': 'list', + 'engagement_rate_ranking': 'string', + 'estimated_ad_recall_rate': 'string', + 'estimated_ad_recall_rate_lower_bound': 'string', + 'estimated_ad_recall_rate_upper_bound': 'string', + 'estimated_ad_recallers': 'string', + 'estimated_ad_recallers_lower_bound': 'string', + 'estimated_ad_recallers_upper_bound': 'string', + 'frequency': 'string', + 'full_view_impressions': 'string', + 'full_view_reach': 'string', + 'gender_targeting': 'string', + 'impressions': 'string', + 'inline_link_click_ctr': 'string', + 'inline_link_clicks': 'string', + 'inline_post_engagement': 'string', + 'instagram_upcoming_event_reminders_set': 'string', + 'instant_experience_clicks_to_open': 'string', + 'instant_experience_clicks_to_start': 'string', + 'instant_experience_outbound_clicks': 'list', + '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', + 'optimization_goal': 'string', + 'outbound_clicks': 'list', + 'outbound_clicks_ctr': 'list', + 'place_page_name': 'string', + 'purchase_roas': 'list', + 'qualifying_question_qualify_answer_rate': 'string', + 'quality_ranking': 'string', + 'reach': 'string', + 'social_spend': 'string', + 'spend': 'string', + 'total_postbacks': 'string', + 'total_postbacks_detailed': 'list', + 'total_postbacks_detailed_v4': 'list', + 'unique_actions': 'list', + 'unique_clicks': 'string', + 'unique_conversions': 'list', + 'unique_ctr': 'string', + 'unique_inline_link_click_ctr': 'string', + 'unique_inline_link_clicks': 'string', + 'unique_link_clicks_ctr': 'string', + 'unique_outbound_clicks': 'list', + 'unique_outbound_clicks_ctr': 'list', + 'unique_video_continuous_2_sec_watched_actions': 'list', + 'unique_video_view_15_sec': 'list', + 'updated_time': 'string', + 'video_15_sec_watched_actions': 'list', + 'video_30_sec_watched_actions': 'list', + 'video_avg_time_watched_actions': 'list', + 'video_continuous_2_sec_watched_actions': 'list', + 'video_p100_watched_actions': 'list', + 'video_p25_watched_actions': 'list', + 'video_p50_watched_actions': 'list', + '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_thruplay_watched_actions': 'list', + 'video_time_watched_actions': 'list', + 'website_ctr': 'list', + 'website_purchase_roas': 'list', + 'wish_bid': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ActionAttributionWindows'] = AdsInsights.ActionAttributionWindows.__dict__.values() + field_enum_info['ActionBreakdowns'] = AdsInsights.ActionBreakdowns.__dict__.values() + field_enum_info['ActionReportTime'] = AdsInsights.ActionReportTime.__dict__.values() + field_enum_info['Breakdowns'] = AdsInsights.Breakdowns.__dict__.values() + field_enum_info['DatePreset'] = AdsInsights.DatePreset.__dict__.values() + field_enum_info['Level'] = AdsInsights.Level.__dict__.values() + field_enum_info['SummaryActionBreakdowns'] = AdsInsights.SummaryActionBreakdowns.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py b/tap_facebook/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py new file mode 100644 index 0000000..3c47058 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.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 AdsOptimalDeliveryGrowthOpportunity( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsOptimalDeliveryGrowthOpportunity, self).__init__() + self._isAdsOptimalDeliveryGrowthOpportunity = True + self._api = api + + class Field(AbstractObject.Field): + child_metadata = 'child_metadata' + metadata = 'metadata' + optimization_type = 'optimization_type' + + _field_types = { + 'child_metadata': 'list>', + 'metadata': 'Object', + 'optimization_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adspixel.py b/tap_facebook/facebook_business/adobjects/adspixel.py new file mode 100644 index 0000000..5829c34 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adspixel.py @@ -0,0 +1,748 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdsPixel( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsPixel = True + super(AdsPixel, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + automatic_matching_fields = 'automatic_matching_fields' + can_proxy = 'can_proxy' + code = 'code' + config = 'config' + creation_time = 'creation_time' + creator = 'creator' + data_use_setting = 'data_use_setting' + description = 'description' + duplicate_entries = 'duplicate_entries' + enable_auto_assign_to_accounts = 'enable_auto_assign_to_accounts' + enable_automatic_matching = 'enable_automatic_matching' + event_stats = 'event_stats' + event_time_max = 'event_time_max' + event_time_min = 'event_time_min' + first_party_cookie_status = 'first_party_cookie_status' + id = 'id' + is_consolidated_container = 'is_consolidated_container' + is_created_by_business = 'is_created_by_business' + is_crm = 'is_crm' + 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' + match_rate_approx = 'match_rate_approx' + matched_entries = 'matched_entries' + name = 'name' + 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: + last_fired_time = 'LAST_FIRED_TIME' + name = 'NAME' + + class AutomaticMatchingFields: + country = 'country' + ct = 'ct' + db = 'db' + em = 'em' + external_id = 'external_id' + fn = 'fn' + ge = 'ge' + ln = 'ln' + ph = 'ph' + st = 'st' + zp = 'zp' + + class DataUseSetting: + advertising_and_analytics = 'ADVERTISING_AND_ANALYTICS' + analytics_only = 'ANALYTICS_ONLY' + empty = 'EMPTY' + + class FirstPartyCookieStatus: + empty = 'EMPTY' + first_party_cookie_disabled = 'FIRST_PARTY_COOKIE_DISABLED' + first_party_cookie_enabled = 'FIRST_PARTY_COOKIE_ENABLED' + + class Tasks: + aa_analyze = 'AA_ANALYZE' + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + edit = 'EDIT' + upload = 'UPLOAD' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adspixels' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ads_pixel(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=AdsPixel, + 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 = { + 'automatic_matching_fields': 'list', + 'data_use_setting': 'data_use_setting_enum', + 'enable_automatic_matching': 'bool', + 'first_party_cookie_status': 'first_party_cookie_status_enum', + 'name': 'string', + 'server_events_business_ids': 'list', + } + enums = { + 'automatic_matching_fields_enum': AdsPixel.AutomaticMatchingFields.__dict__.values(), + 'data_use_setting_enum': AdsPixel.DataUseSetting.__dict__.values(), + 'first_party_cookie_status_enum': AdsPixel.FirstPartyCookieStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsPixel, + 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 = { + 'business': 'string', + } + 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() + + 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): + 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='/agencies', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.assigneduser import AssignedUser + param_types = { + 'business': 'string', + } + 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() + + def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'tasks': 'list', + 'user': 'int', + } + enums = { + 'tasks_enum': AdsPixel.Tasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/assigned_users', + 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_da_checks(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.dacheck import DACheck + param_types = { + 'checks': 'list', + 'connection_method': 'connection_method_enum', + } + enums = { + 'connection_method_enum': DACheck.ConnectionMethod.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/da_checks', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DACheck, + api_type='EDGE', + response_parser=ObjectParser(target_class=DACheck, 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_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.') + param_types = { + 'data': 'list', + 'namespace_id': 'string', + 'partner_agent': 'string', + 'platforms': 'list', + 'progress': 'Object', + 'test_event_code': 'string', + 'trace': 'unsigned int', + 'upload_id': 'string', + 'upload_source': 'string', + 'upload_tag': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.offlineconversiondatasetupload import OfflineConversionDataSetUpload + param_types = { + 'end_time': 'datetime', + 'order': 'order_enum', + 'sort_by': 'sort_by_enum', + 'start_time': 'datetime', + 'upload_tag': 'string', + } + enums = { + 'order_enum': OfflineConversionDataSetUpload.Order.__dict__.values(), + 'sort_by_enum': OfflineConversionDataSetUpload.SortBy.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/offline_event_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 get_open_bridge_configurations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.openbridgeconfiguration import OpenBridgeConfiguration + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/openbridge_configurations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OpenBridgeConfiguration, + api_type='EDGE', + response_parser=ObjectParser(target_class=OpenBridgeConfiguration, 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_shadow_traffic_helper(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/shadowtraffichelper', + 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_shared_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.') + param_types = { + 'account_id': 'string', + 'business': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/shared_accounts', + 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_shared_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 = { + 'business': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/shared_accounts', + 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 create_shared_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', + 'business': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/shared_accounts', + 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_shared_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.') + from facebook_business.adobjects.business import Business + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/shared_agencies', + 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_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.adspixelstatsresult import AdsPixelStatsResult + param_types = { + 'aggregation': 'aggregation_enum', + 'end_time': 'datetime', + 'event': 'string', + 'event_source': 'string', + 'start_time': 'datetime', + } + enums = { + 'aggregation_enum': AdsPixelStatsResult.Aggregation.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/stats', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsPixelStatsResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsPixelStatsResult, 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_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', + 'code': 'string', + 'config': 'string', + 'creation_time': 'datetime', + 'creator': 'User', + 'data_use_setting': 'string', + 'description': 'string', + 'duplicate_entries': 'int', + 'enable_auto_assign_to_accounts': 'bool', + 'enable_automatic_matching': 'bool', + 'event_stats': 'string', + 'event_time_max': 'int', + 'event_time_min': 'int', + 'first_party_cookie_status': 'string', + 'id': 'string', + 'is_consolidated_container': 'bool', + 'is_created_by_business': 'bool', + 'is_crm': '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', + 'match_rate_approx': 'int', + 'matched_entries': 'int', + 'name': 'string', + 'owner_ad_account': 'AdAccount', + 'owner_business': 'Business', + 'usage': 'OfflineConversionDataSetUsage', + 'user_access_expire_time': 'datetime', + 'valid_entries': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['SortBy'] = AdsPixel.SortBy.__dict__.values() + 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['Tasks'] = AdsPixel.Tasks.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adspixelstats.py b/tap_facebook/facebook_business/adobjects/adspixelstats.py new file mode 100644 index 0000000..6d1acf2 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adspixelstats.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 AdsPixelStats( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelStats, self).__init__() + self._isAdsPixelStats = True + self._api = api + + class Field(AbstractObject.Field): + count = 'count' + diagnostics_hourly_last_timestamp = 'diagnostics_hourly_last_timestamp' + event = 'event' + value = 'value' + + _field_types = { + 'count': 'int', + 'diagnostics_hourly_last_timestamp': 'datetime', + 'event': 'string', + 'value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adspixelstatsresult.py b/tap_facebook/facebook_business/adobjects/adspixelstatsresult.py new file mode 100644 index 0000000..6e8499a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adspixelstatsresult.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 AdsPixelStatsResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelStatsResult, self).__init__() + self._isAdsPixelStatsResult = True + self._api = api + + class Field(AbstractObject.Field): + aggregation = 'aggregation' + data = 'data' + start_time = 'start_time' + + class Aggregation: + browser_type = 'browser_type' + custom_data_field = 'custom_data_field' + device_os = 'device_os' + device_type = 'device_type' + event = 'event' + event_detection_method = 'event_detection_method' + event_processing_results = 'event_processing_results' + event_source = 'event_source' + event_total_counts = 'event_total_counts' + event_value_count = 'event_value_count' + had_pii = 'had_pii' + host = 'host' + match_keys = 'match_keys' + pixel_fire = 'pixel_fire' + url = 'url' + url_by_rule = 'url_by_rule' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'stats' + + _field_types = { + 'aggregation': 'string', + 'data': 'list', + 'start_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Aggregation'] = AdsPixelStatsResult.Aggregation.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adstudy.py b/tap_facebook/facebook_business/adobjects/adstudy.py new file mode 100644 index 0000000..a58172c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adstudy.py @@ -0,0 +1,363 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdStudy( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdStudy = True + super(AdStudy, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + canceled_time = 'canceled_time' + client_business = 'client_business' + cooldown_start_time = 'cooldown_start_time' + created_by = 'created_by' + created_time = 'created_time' + description = 'description' + end_time = 'end_time' + id = 'id' + measurement_contact = 'measurement_contact' + name = 'name' + observation_end_time = 'observation_end_time' + results_first_available_date = 'results_first_available_date' + sales_contact = 'sales_contact' + start_time = 'start_time' + type = 'type' + updated_by = 'updated_by' + updated_time = 'updated_time' + cells = 'cells' + confidence_level = 'confidence_level' + objectives = 'objectives' + viewers = 'viewers' + + class Type: + continuous_lift_config = 'CONTINUOUS_LIFT_CONFIG' + geo_lift = 'GEO_LIFT' + lift = 'LIFT' + split_test = 'SPLIT_TEST' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'ad_studies' + + # @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_ad_study(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 + if batch 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=AdStudy, + 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 = { + 'cells': 'list', + 'client_business': 'string', + 'confidence_level': 'float', + 'cooldown_start_time': 'int', + 'description': 'string', + 'end_time': 'int', + 'name': 'string', + 'objectives': 'list', + 'observation_end_time': 'int', + 'start_time': 'int', + 'type': 'type_enum', + 'viewers': 'list', + } + enums = { + 'type_enum': AdStudy.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + 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_cells(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudycell import AdStudyCell + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/cells', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudyCell, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudyCell, 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_check_point(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'checkpoint_data': 'string', + 'checkpoint_name': 'string', + 'component': 'string', + 'instance_id': 'string', + 'run_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/checkpoint', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_instances(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.privateliftstudyinstance import PrivateLiftStudyInstance + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/instances', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PrivateLiftStudyInstance, + api_type='EDGE', + response_parser=ObjectParser(target_class=PrivateLiftStudyInstance, 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_instance(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.privateliftstudyinstance import PrivateLiftStudyInstance + param_types = { + 'breakdown_key': 'map', + 'run_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/instances', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PrivateLiftStudyInstance, + api_type='EDGE', + response_parser=ObjectParser(target_class=PrivateLiftStudyInstance, 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_objectives(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudyobjective import AdStudyObjective + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/objectives', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudyObjective, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudyObjective, 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', + 'canceled_time': 'datetime', + 'client_business': 'Business', + 'cooldown_start_time': 'datetime', + 'created_by': 'User', + 'created_time': 'datetime', + 'description': 'string', + 'end_time': 'datetime', + 'id': 'string', + 'measurement_contact': 'User', + 'name': 'string', + 'observation_end_time': 'datetime', + 'results_first_available_date': 'string', + 'sales_contact': 'User', + 'start_time': 'datetime', + 'type': 'string', + 'updated_by': 'User', + 'updated_time': 'datetime', + 'cells': 'list', + 'confidence_level': 'float', + 'objectives': 'list', + 'viewers': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Type'] = AdStudy.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adstudycell.py b/tap_facebook/facebook_business/adobjects/adstudycell.py new file mode 100644 index 0000000..1685810 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adstudycell.py @@ -0,0 +1,229 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdStudyCell( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdStudyCell = True + super(AdStudyCell, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_entities_count = 'ad_entities_count' + control_percentage = 'control_percentage' + id = 'id' + name = 'name' + treatment_percentage = 'treatment_percentage' + + class CreationTemplate: + automatic_placements = 'AUTOMATIC_PLACEMENTS' + brand_awareness = 'BRAND_AWARENESS' + facebook = 'FACEBOOK' + facebook_audience_network = 'FACEBOOK_AUDIENCE_NETWORK' + facebook_instagram = 'FACEBOOK_INSTAGRAM' + facebook_news_feed = 'FACEBOOK_NEWS_FEED' + facebook_news_feed_in_stream_video = 'FACEBOOK_NEWS_FEED_IN_STREAM_VIDEO' + high_frequency = 'HIGH_FREQUENCY' + instagram = 'INSTAGRAM' + in_stream_video = 'IN_STREAM_VIDEO' + low_frequency = 'LOW_FREQUENCY' + medium_frequency = 'MEDIUM_FREQUENCY' + mobile_optimized_video = 'MOBILE_OPTIMIZED_VIDEO' + page_post_engagement = 'PAGE_POST_ENGAGEMENT' + reach = 'REACH' + tv_commercial = 'TV_COMMERCIAL' + tv_facebook = 'TV_FACEBOOK' + video_view_optimization = 'VIDEO_VIEW_OPTIMIZATION' + + 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=AdStudyCell, + 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 = { + 'adaccounts': 'list', + 'adsets': 'list', + 'campaigns': 'list', + 'creation_template': 'creation_template_enum', + 'description': 'string', + 'name': 'string', + } + enums = { + 'creation_template_enum': AdStudyCell.CreationTemplate.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudyCell, + 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() + + def get_ad_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.adset import AdSet + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.campaign import Campaign + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/campaigns', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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_entities_count': 'unsigned int', + 'control_percentage': 'float', + 'id': 'string', + 'name': 'string', + 'treatment_percentage': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['CreationTemplate'] = AdStudyCell.CreationTemplate.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adstudyobjective.py b/tap_facebook/facebook_business/adobjects/adstudyobjective.py new file mode 100644 index 0000000..8857560 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adstudyobjective.py @@ -0,0 +1,360 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdStudyObjective( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdStudyObjective = True + super(AdStudyObjective, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + is_primary = 'is_primary' + last_updated_results = 'last_updated_results' + name = 'name' + results = 'results' + type = 'type' + + class Type: + brand = 'BRAND' + brandlift = 'BRANDLIFT' + conversions = 'CONVERSIONS' + ftl = 'FTL' + mae = 'MAE' + mai = 'MAI' + mpc_conversion = 'MPC_CONVERSION' + nonsales = 'NONSALES' + partner = 'PARTNER' + sales = 'SALES' + telco = 'TELCO' + + 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 = { + 'breakdowns': 'list', + 'ds': 'string', + } + enums = { + 'breakdowns_enum': [ + 'age', + 'cell_id', + 'country', + 'gender', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudyObjective, + 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 = { + 'adspixels': 'list', + 'applications': 'list', + 'customconversions': 'list', + 'is_primary': 'bool', + 'name': 'string', + 'offline_conversion_data_sets': 'list', + 'offsite_datasets': 'list', + 'product_catalogs': 'list', + 'product_sets': 'list', + 'type': 'type_enum', + } + enums = { + 'type_enum': AdStudyObjective.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudyObjective, + 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_ads_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/adspixels', + 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_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='/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_brand_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.brandrequest import BrandRequest + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/brand_requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BrandRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=BrandRequest, 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customconversion import CustomConversion + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/customconversions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversion, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomConversion, 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 get_partner_private_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/partner_private_studies', + 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_partner_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.partnerstudy import PartnerStudy + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/partnerstudies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PartnerStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=PartnerStudy, 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', + 'is_primary': 'bool', + 'last_updated_results': 'string', + 'name': 'string', + 'results': 'list', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Type'] = AdStudyObjective.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adstudyobjectiveid.py b/tap_facebook/facebook_business/adobjects/adstudyobjectiveid.py new file mode 100644 index 0000000..cccc982 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adstudyobjectiveid.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 AdStudyObjectiveID( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdStudyObjectiveID = True + super(AdStudyObjectiveID, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + event_names = 'event_names' + id = 'id' + type = 'type' + + _field_types = { + 'event_names': 'list', + 'id': 'string', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py b/tap_facebook/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py new file mode 100644 index 0000000..9ef9ece --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.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 AdStudyObjectiveOffsiteDatasets( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdStudyObjectiveOffsiteDatasets = True + super(AdStudyObjectiveOffsiteDatasets, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + event_names = 'event_names' + id = 'id' + + _field_types = { + 'event_names': 'list', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/advideo.py b/tap_facebook/facebook_business/adobjects/advideo.py new file mode 100644 index 0000000..59b35fa --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/advideo.py @@ -0,0 +1,1354 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AdVideo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdVideo = True + super(AdVideo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_breaks = 'ad_breaks' + admin_creator = 'admin_creator' + audio_isrc = 'audio_isrc' + backdated_time = 'backdated_time' + backdated_time_granularity = 'backdated_time_granularity' + 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' + description = 'description' + embed_html = 'embed_html' + embeddable = 'embeddable' + event = 'event' + expiration = 'expiration' + format = 'format' + field_from = 'from' + icon = 'icon' + id = 'id' + is_crosspost_video = 'is_crosspost_video' + is_crossposting_eligible = 'is_crossposting_eligible' + is_episode = 'is_episode' + is_instagram_eligible = 'is_instagram_eligible' + is_reference_only = 'is_reference_only' + length = 'length' + live_audience_count = 'live_audience_count' + live_status = 'live_status' + music_video_copyright = 'music_video_copyright' + 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' + published = 'published' + scheduled_publish_time = 'scheduled_publish_time' + source = 'source' + spherical = 'spherical' + status = 'status' + title = 'title' + 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' + audio_story_wave_animation_handle = 'audio_story_wave_animation_handle' + chunk_session_id = 'chunk_session_id' + composer_entry_picker = 'composer_entry_picker' + composer_entry_point = 'composer_entry_point' + composer_entry_time = 'composer_entry_time' + composer_session_events_log = 'composer_session_events_log' + composer_session_id = 'composer_session_id' + composer_source_surface = 'composer_source_surface' + composer_type = 'composer_type' + container_type = 'container_type' + creative_tools = 'creative_tools' + end_offset = 'end_offset' + fbuploader_video_file_chunk = 'fbuploader_video_file_chunk' + file_size = 'file_size' + file_url = 'file_url' + fisheye_video_cropped = 'fisheye_video_cropped' + formatting = 'formatting' + fov = 'fov' + front_z_rotation = 'front_z_rotation' + fun_fact_prompt_id = 'fun_fact_prompt_id' + fun_fact_toastee_id = 'fun_fact_toastee_id' + guide = 'guide' + guide_enabled = 'guide_enabled' + holiday_card = 'holiday_card' + initial_heading = 'initial_heading' + initial_pitch = 'initial_pitch' + instant_game_entry_point_data = 'instant_game_entry_point_data' + is_boost_intended = 'is_boost_intended' + is_group_linking_post = 'is_group_linking_post' + is_voice_clip = 'is_voice_clip' + location_source_id = 'location_source_id' + name = 'name' + offer_like_post_id = 'offer_like_post_id' + og_action_type_id = 'og_action_type_id' + og_icon_id = 'og_icon_id' + og_object_id = 'og_object_id' + og_phrase = 'og_phrase' + og_suggestion_mechanism = 'og_suggestion_mechanism' + 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' + source_instagram_media_id = 'source_instagram_media_id' + start_offset = 'start_offset' + swap_mode = 'swap_mode' + text_format_metadata = 'text_format_metadata' + throwback_camera_roll_media = 'throwback_camera_roll_media' + thumb = 'thumb' + time_since_original_post = 'time_since_original_post' + transcode_setting_properties = 'transcode_setting_properties' + unpublished_content_type = 'unpublished_content_type' + upload_phase = 'upload_phase' + upload_session_id = 'upload_session_id' + upload_setting_properties = 'upload_setting_properties' + video_file_chunk = 'video_file_chunk' + 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' + + class ContainerType: + aco_autoextracted_video = 'ACO_AUTOEXTRACTED_VIDEO' + aco_video_variation = 'ACO_VIDEO_VARIATION' + ads_ai_generated = 'ADS_AI_GENERATED' + ad_break_preview = 'AD_BREAK_PREVIEW' + ad_derivative = 'AD_DERIVATIVE' + ad_library_watermark = 'AD_LIBRARY_WATERMARK' + age_up = 'AGE_UP' + album_multimedia_post = 'ALBUM_MULTIMEDIA_POST' + aloha_call_video = 'ALOHA_CALL_VIDEO' + aloha_superframe = 'ALOHA_SUPERFRAME' + app_rereview_screencast = 'APP_REREVIEW_SCREENCAST' + app_review_screencast = 'APP_REVIEW_SCREENCAST' + asset_manager = 'ASSET_MANAGER' + audio_brief = 'AUDIO_BRIEF' + audio_broadcast = 'AUDIO_BROADCAST' + audio_comment = 'AUDIO_COMMENT' + broadcast = 'BROADCAST' + bulletin_article_audio = 'BULLETIN_ARTICLE_AUDIO' + canvas = 'CANVAS' + cfc_video = 'CFC_VIDEO' + cms_media_manager = 'CMS_MEDIA_MANAGER' + contained_post_attachment = 'CONTAINED_POST_ATTACHMENT' + 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' + dim_sum = 'DIM_SUM' + directed_post_attachment = 'DIRECTED_POST_ATTACHMENT' + direct_inbox = 'DIRECT_INBOX' + direct_inbox_reaction = 'DIRECT_INBOX_REACTION' + drops_shopping_event_page = 'DROPS_SHOPPING_EVENT_PAGE' + dynamic_item_display_bundle = 'DYNAMIC_ITEM_DISPLAY_BUNDLE' + dynamic_item_video = 'DYNAMIC_ITEM_VIDEO' + dynamic_template_video = 'DYNAMIC_TEMPLATE_VIDEO' + event_cover_video = 'EVENT_COVER_VIDEO' + event_tour = 'EVENT_TOUR' + facecast_dvr = 'FACECAST_DVR' + fb_avatar_animated_satp = 'FB_AVATAR_ANIMATED_SATP' + fb_collectible_video = 'FB_COLLECTIBLE_VIDEO' + fb_shorts = 'FB_SHORTS' + 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' + fb_shorts_remix_post = 'FB_SHORTS_REMIX_POST' + fundraiser_cover_video = 'FUNDRAISER_COVER_VIDEO' + game_clip = 'GAME_CLIP' + gemstone = 'GEMSTONE' + gif_to_video = 'GIF_TO_VIDEO' + goodwill_anniversary_deprecated = 'GOODWILL_ANNIVERSARY_DEPRECATED' + goodwill_anniversary_promotion_deprecated = 'GOODWILL_ANNIVERSARY_PROMOTION_DEPRECATED' + goodwill_video_contained_share = 'GOODWILL_VIDEO_CONTAINED_SHARE' + goodwill_video_promotion = 'GOODWILL_VIDEO_PROMOTION' + goodwill_video_share = 'GOODWILL_VIDEO_SHARE' + goodwill_video_token_required = 'GOODWILL_VIDEO_TOKEN_REQUIRED' + group_post = 'GROUP_POST' + hack_tv = 'HACK_TV' + heuristic_cluster_video = 'HEURISTIC_CLUSTER_VIDEO' + highlight_clip_video = 'HIGHLIGHT_CLIP_VIDEO' + huddle_broadcast = 'HUDDLE_BROADCAST' + ig_reels_xpv = 'IG_REELS_XPV' + ig_stories_reader = 'IG_STORIES_READER' + injectable = 'INJECTABLE' + inspiration_video = 'INSPIRATION_VIDEO' + 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' + learn = 'LEARN' + legacy = 'LEGACY' + legacy_contained_post_broadcast = 'LEGACY_CONTAINED_POST_BROADCAST' + live_audio_room_broadcast = 'LIVE_AUDIO_ROOM_BROADCAST' + live_clip_preview = 'LIVE_CLIP_PREVIEW' + live_clip_workchat = 'LIVE_CLIP_WORKCHAT' + live_creative_kit_video = 'LIVE_CREATIVE_KIT_VIDEO' + live_photo = 'LIVE_PHOTO' + look_now_deprecated = 'LOOK_NOW_DEPRECATED' + marketplace_listing_video = 'MARKETPLACE_LISTING_VIDEO' + marketplace_pre_recorded_video = 'MARKETPLACE_PRE_RECORDED_VIDEO' + messenger_watch_together = 'MESSENGER_WATCH_TOGETHER' + moments_video = 'MOMENTS_VIDEO' + music_clip = 'MUSIC_CLIP' + 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' + new_contained_post_broadcast = 'NEW_CONTAINED_POST_BROADCAST' + no_story = 'NO_STORY' + no_story_with_entpost = 'NO_STORY_WITH_ENTPOST' + npe_collab_copyright_check = 'NPE_COLLAB_COPYRIGHT_CHECK' + oculus_creator_portal = 'OCULUS_CREATOR_PORTAL' + oculus_venues_broadcast = 'OCULUS_VENUES_BROADCAST' + offers_video = 'OFFERS_VIDEO' + pages_cover_video = 'PAGES_COVER_VIDEO' + page_review_screencast = 'PAGE_REVIEW_SCREENCAST' + page_slideshow_video = 'PAGE_SLIDESHOW_VIDEO' + paid_content_preview = 'PAID_CONTENT_PREVIEW' + paid_content_video = 'PAID_CONTENT_VIDEO' + paid_content_video__post = 'PAID_CONTENT_VIDEO__POST' + paper_document_audio = 'PAPER_DOCUMENT_AUDIO' + paper_document_video = 'PAPER_DOCUMENT_VIDEO' + pixelcloud = 'PIXELCLOUD' + podcast_highlight = 'PODCAST_HIGHLIGHT' + podcast_ml_preview = 'PODCAST_ML_PREVIEW' + podcast_ml_preview_no_newsfeed_story = 'PODCAST_ML_PREVIEW_NO_NEWSFEED_STORY' + podcast_rss = 'PODCAST_RSS' + podcast_rss_ephemeral = 'PODCAST_RSS_EPHEMERAL' + podcast_rss_no_newsfeed_story = 'PODCAST_RSS_NO_NEWSFEED_STORY' + podcast_voices = 'PODCAST_VOICES' + podcast_voices_no_newsfeed_story = 'PODCAST_VOICES_NO_NEWSFEED_STORY' + premiere_source = 'PREMIERE_SOURCE' + premium_music_video_clip = 'PREMIUM_MUSIC_VIDEO_CLIP' + premium_music_video_cropped_clip = 'PREMIUM_MUSIC_VIDEO_CROPPED_CLIP' + premium_music_video_no_newsfeed_story = 'PREMIUM_MUSIC_VIDEO_NO_NEWSFEED_STORY' + premium_music_video_with_newsfeed_story = 'PREMIUM_MUSIC_VIDEO_WITH_NEWSFEED_STORY' + private_gallery_video = 'PRIVATE_GALLERY_VIDEO' + product_video = 'PRODUCT_VIDEO' + profile_cover_video = 'PROFILE_COVER_VIDEO' + 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' + say_thanks_deprecated = 'SAY_THANKS_DEPRECATED' + showreel_native_dummy_video = 'SHOWREEL_NATIVE_DUMMY_VIDEO' + slideshow_animoto = 'SLIDESHOW_ANIMOTO' + slideshow_shakr = 'SLIDESHOW_SHAKR' + slideshow_variation_video = 'SLIDESHOW_VARIATION_VIDEO' + 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' + storyline_with_external_music = 'STORYLINE_WITH_EXTERNAL_MUSIC' + story_archive_video = 'STORY_ARCHIVE_VIDEO' + story_card_template = 'STORY_CARD_TEMPLATE' + stream_highlights_video = 'STREAM_HIGHLIGHTS_VIDEO' + tarot_digest = 'TAROT_DIGEST' + 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' + video_composition_variation = 'VIDEO_COMPOSITION_VARIATION' + video_creative_editor_autogen_ad_video = 'VIDEO_CREATIVE_EDITOR_AUTOGEN_AD_VIDEO' + video_superres = 'VIDEO_SUPERRES' + voices_article_video = 'VOICES_ARTICLE_VIDEO' + vu_generated_video = 'VU_GENERATED_VIDEO' + woodhenge = 'WOODHENGE' + work_knowledge_video = 'WORK_KNOWLEDGE_VIDEO' + your_day = 'YOUR_DAY' + + class ContentCategory: + beauty_fashion = 'BEAUTY_FASHION' + business = 'BUSINESS' + cars_trucks = 'CARS_TRUCKS' + comedy = 'COMEDY' + cute_animals = 'CUTE_ANIMALS' + entertainment = 'ENTERTAINMENT' + family = 'FAMILY' + food_health = 'FOOD_HEALTH' + home = 'HOME' + lifestyle = 'LIFESTYLE' + music = 'MUSIC' + news = 'NEWS' + other = 'OTHER' + politics = 'POLITICS' + science = 'SCIENCE' + sports = 'SPORTS' + technology = 'TECHNOLOGY' + video_gaming = 'VIDEO_GAMING' + + class Formatting: + markdown = 'MARKDOWN' + plaintext = 'PLAINTEXT' + + class OriginalProjectionType: + cubemap = 'cubemap' + equirectangular = 'equirectangular' + half_equirectangular = 'half_equirectangular' + + class SwapMode: + replace = 'replace' + + class UnpublishedContentType: + ads_post = 'ADS_POST' + draft = 'DRAFT' + inline_created = 'INLINE_CREATED' + published = 'PUBLISHED' + reviewable_branded_content = 'REVIEWABLE_BRANDED_CONTENT' + scheduled = 'SCHEDULED' + scheduled_recurring = 'SCHEDULED_RECURRING' + + class UploadPhase: + cancel = 'cancel' + finish = 'finish' + 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' + + class VideoState: + draft = 'DRAFT' + published = 'PUBLISHED' + scheduled = 'SCHEDULED' + + class BackdatedTimeGranularity: + day = 'day' + hour = 'hour' + min = 'min' + month = 'month' + none = 'none' + year = 'year' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'advideos' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad_video(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 + if batch 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=AdVideo, + 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_breaks': 'list', + 'allow_bm_crossposting': 'bool', + 'allow_crossposting_for_pages': 'list', + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'call_to_action': 'Object', + 'content_category': 'content_category_enum', + 'content_tags': 'list', + 'custom_labels': 'list', + 'description': 'string', + 'direct_share_status': 'unsigned int', + 'embeddable': 'bool', + 'expiration': 'Object', + 'expire_now': 'bool', + 'increment_play_count': 'bool', + 'name': 'string', + 'preferred_thumbnail_id': 'string', + 'privacy': 'string', + 'publish_to_news_feed': 'bool', + 'publish_to_videos_tab': 'bool', + 'published': 'bool', + 'scheduled_publish_time': 'unsigned int', + 'social_actions': 'bool', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'tags': 'list', + 'target': 'string', + 'universal_video_id': 'string', + } + enums = { + 'backdated_time_granularity_enum': AdVideo.BackdatedTimeGranularity.__dict__.values(), + 'content_category_enum': AdVideo.ContentCategory.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdVideo, + 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_captions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/captions', + 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_caption(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'captions_file': 'file', + 'default_locale': 'string', + 'locales_to_delete': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/captions', + 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) + + if batch is 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_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/collaborators', + 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_collaborator(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'target_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/collaborators', + 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) + + if batch is 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.comment import Comment + param_types = { + 'filter': 'filter_enum', + 'live_filter': 'live_filter_enum', + 'order': 'order_enum', + 'since': 'datetime', + } + enums = { + 'filter_enum': Comment.Filter.__dict__.values(), + 'live_filter_enum': Comment.LiveFilter.__dict__.values(), + '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() + + 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.comment import Comment + param_types = { + 'attachment_id': 'string', + 'attachment_share_url': 'string', + 'attachment_url': 'string', + 'comment_privacy_value': 'comment_privacy_value_enum', + 'facepile_mentioned_ids': 'list', + 'feedback_source': 'string', + 'is_offline': 'bool', + 'message': 'string', + 'nectar_module': 'string', + 'object_id': 'string', + 'parent_comment_id': 'Object', + 'text': 'string', + 'tracking': 'string', + } + enums = { + 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + 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() + + def get_crosspost_shared_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.') + from facebook_business.adobjects.page import Page + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/crosspost_shared_pages', + 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 create_gaming_clip_create(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'duration_seconds': 'float', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/gaming_clip_create', + 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) + + if batch is 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_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=AdVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdVideo, 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_poll_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/poll_settings', + 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_polls(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.videopoll import VideoPoll + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/polls', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoPoll, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoPoll, 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_poll(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.videopoll import VideoPoll + param_types = { + 'close_after_voting': 'bool', + 'correct_option': 'unsigned int', + 'default_open': 'bool', + 'options': 'list', + 'question': 'string', + 'show_gradient': 'bool', + 'show_results': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/polls', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoPoll, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoPoll, 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_sponsor_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/sponsor_tags', + 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_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/tags', + 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_tag(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'tag_uid': 'int', + 'uid': 'int', + 'vid': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/tags', + 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) + + if batch is 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_thumbnails(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.videothumbnail import VideoThumbnail + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/thumbnails', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoThumbnail, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoThumbnail, 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_thumbnail(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_preferred': 'bool', + 'source': 'file', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/thumbnails', + 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) + + if batch is 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_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.') + from facebook_business.adobjects.insightsresult import InsightsResult + param_types = { + 'metric': 'list', + 'period': 'period_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'period_enum': InsightsResult.Period.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/video_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), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is 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_breaks': 'list', + 'admin_creator': 'User', + 'audio_isrc': 'Object', + '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', + 'description': 'string', + 'embed_html': 'Object', + 'embeddable': 'bool', + 'event': 'Event', + 'expiration': 'Object', + 'format': 'list', + 'from': 'Object', + 'icon': 'string', + 'id': 'string', + 'is_crosspost_video': 'bool', + 'is_crossposting_eligible': 'bool', + 'is_episode': 'bool', + 'is_instagram_eligible': 'bool', + 'is_reference_only': 'bool', + 'length': 'float', + 'live_audience_count': 'unsigned int', + 'live_status': 'string', + 'music_video_copyright': 'MusicVideoCopyright', + 'permalink_url': 'string', + 'picture': 'string', + 'place': 'Place', + 'post_id': 'string', + 'post_views': 'unsigned int', + 'premiere_living_room_status': 'string', + 'privacy': 'Privacy', + 'published': 'bool', + 'scheduled_publish_time': 'datetime', + 'source': 'string', + 'spherical': 'bool', + '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', + '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': 'ContainerType', + 'creative_tools': 'string', + 'end_offset': 'unsigned int', + 'fbuploader_video_file_chunk': 'string', + 'file_size': 'unsigned int', + 'file_url': 'string', + 'fisheye_video_cropped': 'bool', + 'formatting': 'Formatting', + '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', + 'name': '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': 'OriginalProjectionType', + 'publish_event_id': 'unsigned int', + 'react_mode_metadata': 'string', + 'referenced_sticker_id': 'string', + 'replace_video_id': 'string', + 'slideshow_spec': 'map', + 'source_instagram_media_id': 'string', + 'start_offset': 'unsigned int', + 'swap_mode': 'SwapMode', + 'text_format_metadata': 'string', + 'throwback_camera_roll_media': 'string', + 'thumb': 'file', + 'time_since_original_post': 'unsigned int', + 'transcode_setting_properties': 'string', + 'unpublished_content_type': 'UnpublishedContentType', + 'upload_phase': 'UploadPhase', + 'upload_session_id': 'string', + 'upload_setting_properties': 'string', + 'video_file_chunk': 'string', + '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 + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ContainerType'] = AdVideo.ContainerType.__dict__.values() + field_enum_info['ContentCategory'] = AdVideo.ContentCategory.__dict__.values() + field_enum_info['Formatting'] = AdVideo.Formatting.__dict__.values() + field_enum_info['OriginalProjectionType'] = AdVideo.OriginalProjectionType.__dict__.values() + 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() + return field_enum_info + + + def remote_create( + self, + batch=None, + failure=None, + params=None, + success=None, + ): + """ + Uploads filepath and creates the AdVideo object from it. + It has same arguments as AbstractCrudObject.remote_create except it + does not have the files argument but requires the 'filepath' property + to be defined. + """ + from facebook_business.exceptions import FacebookBadObjectError + from facebook_business.video_uploader import ( + VideoUploader, + VideoUploadRequest, + ) + + if (self.Field.slideshow_spec in self and + self[self.Field.slideshow_spec] is not None): + request = VideoUploadRequest(self.get_api_assured()) + request.setParams(params={'slideshow_spec': { + 'images_urls': self[self.Field.slideshow_spec]['images_urls'], + 'duration_ms': self[self.Field.slideshow_spec]['duration_ms'], + 'transition_ms': self[self.Field.slideshow_spec]['transition_ms'], + }}) + response = request.send((self.get_parent_id_assured(), 'advideos')).json() + elif not (self.Field.filepath in self): + raise FacebookBadObjectError( + "AdVideo requires a filepath or slideshow_spec to be defined.", + ) + else: + video_uploader = VideoUploader() + response = video_uploader.upload(self) + self._set_data(response) + return response + + def waitUntilEncodingReady(self, interval=30, timeout=600): + from facebook_business.video_uploader import VideoEncodingStatusChecker + from facebook_business.exceptions import FacebookError + + if 'id' not in self: + raise FacebookError( + 'Invalid Video ID', + ) + VideoEncodingStatusChecker.waitUntilReady( + self.get_api_assured(), + self['id'], + interval, + timeout, + ) diff --git a/tap_facebook/facebook_business/adobjects/agencyclientdeclaration.py b/tap_facebook/facebook_business/adobjects/agencyclientdeclaration.py new file mode 100644 index 0000000..06ff215 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/agencyclientdeclaration.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 AgencyClientDeclaration( + AbstractObject, +): + + def __init__(self, api=None): + super(AgencyClientDeclaration, self).__init__() + self._isAgencyClientDeclaration = True + self._api = api + + class Field(AbstractObject.Field): + agency_representing_client = 'agency_representing_client' + client_based_in_france = 'client_based_in_france' + client_city = 'client_city' + client_country_code = 'client_country_code' + client_email_address = 'client_email_address' + client_name = 'client_name' + client_postal_code = 'client_postal_code' + client_province = 'client_province' + client_street = 'client_street' + client_street2 = 'client_street2' + has_written_mandate_from_advertiser = 'has_written_mandate_from_advertiser' + is_client_paying_invoices = 'is_client_paying_invoices' + + _field_types = { + 'agency_representing_client': 'unsigned int', + 'client_based_in_france': 'unsigned int', + 'client_city': 'string', + 'client_country_code': 'string', + 'client_email_address': 'string', + 'client_name': 'string', + 'client_postal_code': 'string', + 'client_province': 'string', + 'client_street': 'string', + 'client_street2': 'string', + 'has_written_mandate_from_advertiser': 'unsigned int', + 'is_client_paying_invoices': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/agerange.py b/tap_facebook/facebook_business/adobjects/agerange.py new file mode 100644 index 0000000..59dfe8e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/agerange.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 AgeRange( + AbstractObject, +): + + def __init__(self, api=None): + super(AgeRange, self).__init__() + self._isAgeRange = True + self._api = api + + class Field(AbstractObject.Field): + max = 'max' + min = 'min' + + _field_types = { + 'max': 'unsigned int', + 'min': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/album.py b/tap_facebook/facebook_business/adobjects/album.py new file mode 100644 index 0000000..f7de684 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/album.py @@ -0,0 +1,410 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Album( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAlbum = True + super(Album, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + backdated_time = 'backdated_time' + backdated_time_granularity = 'backdated_time_granularity' + can_backdate = 'can_backdate' + can_upload = 'can_upload' + count = 'count' + cover_photo = 'cover_photo' + created_time = 'created_time' + description = 'description' + edit_link = 'edit_link' + event = 'event' + field_from = 'from' + id = 'id' + is_user_facing = 'is_user_facing' + link = 'link' + location = 'location' + modified_major = 'modified_major' + name = 'name' + photo_count = 'photo_count' + place = 'place' + privacy = 'privacy' + type = 'type' + updated_time = 'updated_time' + video_count = 'video_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=Album, + 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.comment import Comment + param_types = { + 'filter': 'filter_enum', + 'live_filter': 'live_filter_enum', + 'order': 'order_enum', + 'since': 'datetime', + } + enums = { + 'filter_enum': Comment.Filter.__dict__.values(), + 'live_filter_enum': Comment.LiveFilter.__dict__.values(), + '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() + + 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.comment import Comment + param_types = { + 'attachment_id': 'string', + 'attachment_share_url': 'string', + 'attachment_url': 'string', + 'comment_privacy_value': 'comment_privacy_value_enum', + 'facepile_mentioned_ids': 'list', + 'feedback_source': 'string', + 'is_offline': 'bool', + 'message': 'string', + 'nectar_module': 'string', + 'object_id': 'string', + 'parent_comment_id': 'Object', + 'text': 'string', + 'tracking': 'string', + } + enums = { + 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + 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() + + def get_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_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=Album, + api_type='EDGE', + response_parser=ObjectParser(target_class=Album, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.photo import Photo + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/photos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Photo, + api_type='EDGE', + response_parser=ObjectParser(target_class=Photo, 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_photo(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.photo import Photo + param_types = { + 'aid': 'string', + 'allow_spherical_photo': 'bool', + 'alt_text_custom': 'string', + 'android_key_hash': 'string', + 'application_id': 'string', + 'attempt': 'unsigned int', + 'audience_exp': 'bool', + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'caption': 'string', + 'composer_session_id': 'string', + 'direct_share_status': 'unsigned int', + 'feed_targeting': 'Object', + 'filter_type': 'unsigned int', + 'full_res_is_coming_later': 'bool', + 'initial_view_heading_override_degrees': 'unsigned int', + 'initial_view_pitch_override_degrees': 'unsigned int', + 'initial_view_vertical_fov_override_degrees': 'unsigned int', + 'ios_bundle_id': 'string', + 'is_explicit_location': 'bool', + 'is_explicit_place': 'bool', + 'manual_privacy': 'bool', + 'message': 'string', + 'name': 'string', + 'no_story': 'bool', + 'offline_id': 'unsigned int', + 'og_action_type_id': 'string', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'place': 'Object', + 'privacy': 'string', + 'profile_id': 'int', + 'proxied_app_id': 'string', + 'published': 'bool', + 'qn': 'string', + 'spherical_metadata': 'map', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'tags': 'list', + 'target_id': 'int', + 'targeting': 'Object', + 'time_since_original_post': 'unsigned int', + 'uid': 'int', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'url': 'string', + 'user_selected_tags': 'bool', + 'vault_image_id': 'string', + } + enums = { + 'backdated_time_granularity_enum': Photo.BackdatedTimeGranularity.__dict__.values(), + 'unpublished_content_type_enum': Photo.UnpublishedContentType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/photos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Photo, + api_type='EDGE', + response_parser=ObjectParser(target_class=Photo, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profilepicturesource import ProfilePictureSource + param_types = { + 'redirect': 'bool', + 'type': 'type_enum', + } + enums = { + 'type_enum': ProfilePictureSource.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/picture', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProfilePictureSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProfilePictureSource, 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 = { + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'string', + 'can_backdate': 'bool', + 'can_upload': 'bool', + 'count': 'unsigned int', + 'cover_photo': 'Photo', + 'created_time': 'datetime', + 'description': 'string', + 'edit_link': 'string', + 'event': 'Event', + 'from': 'Object', + 'id': 'string', + 'is_user_facing': 'bool', + 'link': 'string', + 'location': 'string', + 'modified_major': 'datetime', + 'name': 'string', + 'photo_count': 'unsigned int', + 'place': 'Place', + 'privacy': 'string', + 'type': 'string', + 'updated_time': 'datetime', + 'video_count': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/analyticssegment.py b/tap_facebook/facebook_business/adobjects/analyticssegment.py new file mode 100644 index 0000000..641c1d7 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/androidapplink.py b/tap_facebook/facebook_business/adobjects/androidapplink.py new file mode 100644 index 0000000..279a141 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/androidapplink.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 AndroidAppLink( + AbstractObject, +): + + def __init__(self, api=None): + super(AndroidAppLink, self).__init__() + self._isAndroidAppLink = True + self._api = api + + class Field(AbstractObject.Field): + app_name = 'app_name' + field_class = 'class' + package = 'package' + url = 'url' + + _field_types = { + 'app_name': 'string', + 'class': 'string', + 'package': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/application.py b/tap_facebook/facebook_business/adobjects/application.py new file mode 100644 index 0000000..37acf2a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/application.py @@ -0,0 +1,2315 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Application( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isApplication = True + super(Application, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + aam_rules = 'aam_rules' + an_ad_space_limit = 'an_ad_space_limit' + an_platforms = 'an_platforms' + android_key_hash = 'android_key_hash' + android_sdk_error_categories = 'android_sdk_error_categories' + app_domains = 'app_domains' + app_events_config = 'app_events_config' + app_events_feature_bitmask = 'app_events_feature_bitmask' + app_events_session_timeout = 'app_events_session_timeout' + app_install_tracked = 'app_install_tracked' + app_name = 'app_name' + app_signals_binding_ios = 'app_signals_binding_ios' + app_type = 'app_type' + auth_dialog_data_help_url = 'auth_dialog_data_help_url' + auth_dialog_headline = 'auth_dialog_headline' + auth_dialog_perms_explanation = 'auth_dialog_perms_explanation' + auth_referral_default_activity_privacy = 'auth_referral_default_activity_privacy' + auth_referral_enabled = 'auth_referral_enabled' + auth_referral_extended_perms = 'auth_referral_extended_perms' + auth_referral_friend_perms = 'auth_referral_friend_perms' + auth_referral_response_type = 'auth_referral_response_type' + auth_referral_user_perms = 'auth_referral_user_perms' + 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' + canvas_url = 'canvas_url' + category = 'category' + client_config = 'client_config' + company = 'company' + configured_ios_sso = 'configured_ios_sso' + contact_email = 'contact_email' + created_time = 'created_time' + creator_uid = 'creator_uid' + daily_active_users = 'daily_active_users' + daily_active_users_rank = 'daily_active_users_rank' + deauth_callback_url = 'deauth_callback_url' + default_share_mode = 'default_share_mode' + description = 'description' + financial_id = 'financial_id' + gdpv4_chrome_custom_tabs_enabled = 'gdpv4_chrome_custom_tabs_enabled' + gdpv4_enabled = 'gdpv4_enabled' + gdpv4_nux_content = 'gdpv4_nux_content' + gdpv4_nux_enabled = 'gdpv4_nux_enabled' + has_messenger_product = 'has_messenger_product' + hosting_url = 'hosting_url' + icon_url = 'icon_url' + id = 'id' + ios_bundle_id = 'ios_bundle_id' + ios_sdk_dialog_flows = 'ios_sdk_dialog_flows' + ios_sdk_error_categories = 'ios_sdk_error_categories' + ios_sfvc_attr = 'ios_sfvc_attr' + ios_supports_native_proxy_auth_flow = 'ios_supports_native_proxy_auth_flow' + ios_supports_system_auth = 'ios_supports_system_auth' + ipad_app_store_id = 'ipad_app_store_id' + iphone_app_store_id = 'iphone_app_store_id' + latest_sdk_version = 'latest_sdk_version' + link = 'link' + logging_token = 'logging_token' + logo_url = 'logo_url' + migrations = 'migrations' + mobile_profile_section_url = 'mobile_profile_section_url' + mobile_web_url = 'mobile_web_url' + monthly_active_users = 'monthly_active_users' + monthly_active_users_rank = 'monthly_active_users_rank' + name = 'name' + namespace = 'namespace' + object_store_urls = 'object_store_urls' + owner_business = 'owner_business' + page_tab_default_name = 'page_tab_default_name' + page_tab_url = 'page_tab_url' + photo_url = 'photo_url' + 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' + restrictive_data_filter_rules = 'restrictive_data_filter_rules' + sdk_update_message = 'sdk_update_message' + seamless_login = 'seamless_login' + secure_canvas_url = 'secure_canvas_url' + secure_page_tab_url = 'secure_page_tab_url' + server_ip_whitelist = 'server_ip_whitelist' + smart_login_bookmark_icon_url = 'smart_login_bookmark_icon_url' + smart_login_menu_icon_url = 'smart_login_menu_icon_url' + social_discovery = 'social_discovery' + subcategory = 'subcategory' + suggested_events_setting = 'suggested_events_setting' + supported_platforms = 'supported_platforms' + supports_apprequests_fast_app_switch = 'supports_apprequests_fast_app_switch' + supports_attribution = 'supports_attribution' + supports_implicit_sdk_logging = 'supports_implicit_sdk_logging' + suppress_native_ios_gdp = 'suppress_native_ios_gdp' + terms_of_service_url = 'terms_of_service_url' + url_scheme_suffix = 'url_scheme_suffix' + user_support_email = 'user_support_email' + user_support_url = 'user_support_url' + website_url = 'website_url' + weekly_active_users = 'weekly_active_users' + + class SupportedPlatforms: + amazon = 'AMAZON' + android = 'ANDROID' + canvas = 'CANVAS' + gameroom = 'GAMEROOM' + instant_game = 'INSTANT_GAME' + ipad = 'IPAD' + iphone = 'IPHONE' + mobile_web = 'MOBILE_WEB' + oculus = 'OCULUS' + samsung = 'SAMSUNG' + supplementary_images = 'SUPPLEMENTARY_IMAGES' + web = 'WEB' + windows = 'WINDOWS' + xiaomi = 'XIAOMI' + + class AnPlatforms: + android = 'ANDROID' + desktop = 'DESKTOP' + galaxy = 'GALAXY' + instant_articles = 'INSTANT_ARTICLES' + ios = 'IOS' + mobile_web = 'MOBILE_WEB' + oculus = 'OCULUS' + unknown = 'UNKNOWN' + xiaomi = 'XIAOMI' + + class Platform: + android = 'ANDROID' + ios = 'IOS' + + class RequestType: + app_indexing = 'APP_INDEXING' + button_sampling = 'BUTTON_SAMPLING' + plugin = 'PLUGIN' + + class MutationMethod: + add = 'ADD' + delete = 'DELETE' + replace = 'REPLACE' + + class PostMethod: + codeless = 'CODELESS' + eymt = 'EYMT' + + class LoggingSource: + detection = 'DETECTION' + messenger_bot = 'MESSENGER_BOT' + + class LoggingTarget: + app = 'APP' + app_and_page = 'APP_AND_PAGE' + page = 'PAGE' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adnetwork_applications' + + # @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_ad_network_application(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 = { + 'advertiser_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Application, + 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 = { + 'allow_cycle_app_secret': 'bool', + 'an_platforms': 'list', + 'app_domains': 'list', + 'app_name': 'string', + 'app_type': 'bool', + 'auth_dialog_headline': 'string', + 'auth_dialog_perms_explanation': 'string', + 'auth_referral_default_activity_privacy': 'string', + 'auth_referral_enabled': 'bool', + 'auth_referral_extended_perms': 'list', + 'auth_referral_friend_perms': 'list', + 'auth_referral_response_type': 'string', + 'auth_referral_user_perms': 'list', + 'canvas_fluid_height': 'bool', + 'canvas_fluid_width': 'bool', + 'canvas_url': 'string', + 'contact_email': 'string', + 'deauth_callback_url': 'string', + 'mobile_web_url': 'string', + 'namespace': 'string', + 'page_tab_default_name': 'string', + 'privacy_policy_url': 'string', + 'restrictions': 'string', + 'secure_canvas_url': 'string', + 'secure_page_tab_url': 'string', + 'server_ip_whitelist': 'list', + 'terms_of_service_url': 'string', + 'url_scheme_suffix': 'string', + 'user_support_email': 'string', + 'user_support_url': 'string', + 'website_url': 'string', + } + enums = { + 'an_platforms_enum': Application.AnPlatforms.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Application, + 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_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.') + param_types = { + 'type': 'type_enum', + 'uid': 'int', + } + enums = { + 'type_enum': [ + 'test-users', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/accounts', + 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_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.') + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': [ + 'test-users', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/accounts', + 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_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 = { + 'installed': 'bool', + 'minor': 'bool', + 'name': 'string', + 'owner_access_token': 'string', + 'permissions': 'list', + 'type': 'type_enum', + 'uid': 'int', + } + enums = { + 'type_enum': [ + 'test-users', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/accounts', + 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_activity(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'advertiser_id': 'string', + 'advertiser_tracking_enabled': 'bool', + 'anon_id': 'string', + 'app_user_id': 'string', + 'application_tracking_enabled': 'bool', + 'attribution': 'string', + 'auto_publish': 'bool', + 'bundle_id': 'string', + 'bundle_short_version': 'string', + 'bundle_version': 'string', + 'campaign_ids': 'string', + 'click_id': 'string', + 'consider_views': 'bool', + 'custom_events': 'list', + 'custom_events_file': 'file', + 'data_processing_options': 'list', + 'data_processing_options_country': 'unsigned int', + 'data_processing_options_state': 'unsigned int', + 'device_token': 'string', + 'event': 'event_enum', + 'extinfo': 'Object', + 'include_dwell_data': 'bool', + 'include_video_data': 'bool', + 'install_referrer': 'string', + 'install_timestamp': 'unsigned int', + 'installer_package': 'string', + 'limited_data_use': 'bool', + 'migration_bundle': 'string', + 'page_id': 'unsigned int', + 'page_scoped_user_id': 'unsigned int', + 'receipt_data': 'string', + 'ud': 'map', + 'url_schemes': 'list', + 'user_id': 'string', + 'user_id_type': 'user_id_type_enum', + 'vendor_id': 'string', + 'windows_attribution_id': 'string', + } + enums = { + 'event_enum': [ + 'CUSTOM_APP_EVENTS', + 'DEFERRED_APP_LINK', + 'MOBILE_APP_INSTALL', + ], + 'user_id_type_enum': [ + 'INSTANT_GAMES_PLAYER_ID', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/activities', + 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_ad_placement_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ad_placement_groups', + 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_ad_network_placements(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adplacement import AdPlacement + param_types = { + 'request_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adnetwork_placements', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdPlacement, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdPlacement, 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_ad_network_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.') + from facebook_business.adobjects.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult + param_types = { + 'aggregation_period': 'aggregation_period_enum', + 'breakdowns': 'list', + 'filters': 'list', + 'limit': 'unsigned int', + 'metrics': 'list', + 'ordering_column': 'ordering_column_enum', + 'ordering_type': 'ordering_type_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), + 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), + 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), + 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), + 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adnetworkanalytics', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdNetworkAnalyticsSyncQueryResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdNetworkAnalyticsSyncQueryResult, 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_ad_network_analytic(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult + param_types = { + 'aggregation_period': 'aggregation_period_enum', + 'breakdowns': 'list', + 'filters': 'list', + 'limit': 'int', + 'metrics': 'list', + 'ordering_column': 'ordering_column_enum', + 'ordering_type': 'ordering_type_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), + 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), + 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), + 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), + 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adnetworkanalytics', + 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_ad_network_analytics_results(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adnetworkanalyticsasyncqueryresult import AdNetworkAnalyticsAsyncQueryResult + param_types = { + 'query_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adnetworkanalytics_results', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdNetworkAnalyticsAsyncQueryResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdNetworkAnalyticsAsyncQueryResult, 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_aem_attribution(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'advertiser_ids': 'list', + 'fb_content_data': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/aem_attribution', + 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_aem_conversion_configs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'advertiser_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/aem_conversion_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_aem_conversion_filter(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'catalog_id': 'string', + 'fb_content_ids': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/aem_conversion_filter', + 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_aem_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'aem_conversions': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/aem_conversions', + 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_aem_skan_readiness(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'app_id': 'int', + 'is_aem_ready': 'bool', + 'is_app_aem_install_ready': 'bool', + 'is_app_aem_ready': 'bool', + 'is_skan_ready': 'bool', + 'message': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/aem_skan_readiness', + 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): + 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='/agencies', + 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_aggregate_revenue(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'ecpms': 'list', + 'query_ids': 'list', + 'request_id': 'string', + 'sync_api': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/aggregate_revenue', + 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_android_dialog_configs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/android_dialog_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_app_capi_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/app_capi_settings', + 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_app_event_types(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/app_event_types', + 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_app_indexing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'app_version': 'string', + 'device_session_id': 'string', + 'extra_info': 'string', + 'platform': 'platform_enum', + 'request_type': 'request_type_enum', + 'tree': 'map', + } + enums = { + 'platform_enum': Application.Platform.__dict__.values(), + 'request_type_enum': Application.RequestType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/app_indexing', + 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 create_app_indexing_session(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'device_session_id': 'string', + 'extinfo': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/app_indexing_session', + 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_app_installed_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.group import Group + param_types = { + 'group_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/app_installed_groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + api_type='EDGE', + response_parser=ObjectParser(target_class=Group, 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_app_push_device_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 = { + 'device_id': 'string', + 'device_token': 'string', + 'platform': 'platform_enum', + } + enums = { + 'platform_enum': Application.Platform.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/app_push_device_token', + 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_app_assets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/appassets', + 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_asset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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': 'file', + 'comment': 'string', + 'type': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/assets', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adaccount import AdAccount + param_types = { + 'business': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/authorized_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() + + def get_button_auto_detection_device_selection(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'device_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/button_auto_detection_device_selection', + 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_cloudbridge_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/cloudbridge_settings', + 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_codeless_event_mapping(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'mappings': 'list', + 'mutation_method': 'mutation_method_enum', + 'platform': 'platform_enum', + 'post_method': 'post_method_enum', + } + enums = { + 'mutation_method_enum': Application.MutationMethod.__dict__.values(), + 'platform_enum': Application.Platform.__dict__.values(), + 'post_method_enum': Application.PostMethod.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/codeless_event_mappings', + 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_da_checks(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.dacheck import DACheck + param_types = { + 'checks': 'list', + 'connection_method': 'connection_method_enum', + } + enums = { + 'connection_method_enum': DACheck.ConnectionMethod.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/da_checks', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DACheck, + api_type='EDGE', + response_parser=ObjectParser(target_class=DACheck, 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): + 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', + } + enums = { + 'type_enum': Event.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/events', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Event, + api_type='EDGE', + response_parser=ObjectParser(target_class=Event, 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_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='/iap_purchases', + 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_insights_push_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights_push_schedule', + 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_ios_dialog_configs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/ios_dialog_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_linked_dataset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/linked_dataset', + 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_mmp_auditing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'advertiser_id': 'string', + 'attribution': 'string', + 'attribution_model': 'string', + 'auditing_token': 'string', + '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', + 'fb_click_time': 'unsigned int', + 'fb_view_time': 'unsigned int', + 'is_fb': 'bool', + 'used_install_referrer': 'bool', + 'view_attr_window': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/mmp_auditing', + 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_mobile_sdk_gk(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'device_id': 'string', + 'extinfo': 'Object', + 'os_version': 'string', + 'platform': 'platform_enum', + 'sdk_version': 'string', + } + enums = { + 'platform_enum': [ + 'ANDROID', + 'IOS', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/mobile_sdk_gk', + 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_monetized_digital_store_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/monetized_digital_store_objects', + 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_monetized_digital_store_object(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'content_id': 'string', + 'store': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/monetized_digital_store_objects', + 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_object_types(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/object_types', + 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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'flash': 'bool', + 'unity': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/occludespopups', + 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_page_activity(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'advertiser_tracking_enabled': 'bool', + 'application_tracking_enabled': 'bool', + 'custom_events': 'list', + 'logging_source': 'logging_source_enum', + 'logging_target': 'logging_target_enum', + 'page_id': 'unsigned int', + 'page_scoped_user_id': 'unsigned int', + } + enums = { + 'logging_source_enum': Application.LoggingSource.__dict__.values(), + 'logging_target_enum': Application.LoggingTarget.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/page_activities', + 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 create_payment_currency(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'currency_url': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/payment_currencies', + 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_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.') + param_types = { + 'android_key_hash': 'string', + 'ios_bundle_id': 'string', + 'permission': 'list', + 'proxied_app_id': 'int', + 'status': 'list', + } + enums = { + 'status_enum': [ + 'live', + 'unapproved', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/permissions', + 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'product_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/products', + 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_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 = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/purchases', + 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_roles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/roles', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/subscribed_domains', + 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_subscribed_domain(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'subscribe': 'list', + 'unsubscribe': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/subscribed_domains', + 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_subscribed_domains_phishing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/subscribed_domains_phishing', + 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_subscribed_domains_phishing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'subscribe': 'list', + 'unsubscribe': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/subscribed_domains_phishing', + 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 delete_subscriptions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + 'object': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/subscriptions', + 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_subscription(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'callback_url': 'string', + 'fields': 'list', + 'include_values': 'bool', + 'object': 'string', + 'verify_token': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/subscriptions', + 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_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.') + param_types = { + 'file_length': 'unsigned int', + 'file_name': 'Object', + 'file_type': 'Object', + 'session_type': 'session_type_enum', + } + enums = { + 'session_type_enum': [ + 'attachment', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/uploads', + 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', + 'an_platforms': 'list', + 'android_key_hash': 'list', + 'android_sdk_error_categories': 'list', + 'app_domains': 'list', + 'app_events_config': 'Object', + 'app_events_feature_bitmask': 'unsigned int', + 'app_events_session_timeout': 'unsigned int', + 'app_install_tracked': 'bool', + 'app_name': 'string', + 'app_signals_binding_ios': 'list', + 'app_type': 'unsigned int', + 'auth_dialog_data_help_url': 'string', + 'auth_dialog_headline': 'string', + 'auth_dialog_perms_explanation': 'string', + 'auth_referral_default_activity_privacy': 'string', + 'auth_referral_enabled': 'unsigned int', + 'auth_referral_extended_perms': 'list', + 'auth_referral_friend_perms': 'list', + 'auth_referral_response_type': 'string', + 'auth_referral_user_perms': 'list', + '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', + 'canvas_url': 'string', + 'category': 'string', + 'client_config': 'map', + 'company': 'string', + 'configured_ios_sso': 'bool', + 'contact_email': 'string', + 'created_time': 'datetime', + 'creator_uid': 'string', + 'daily_active_users': 'string', + 'daily_active_users_rank': 'unsigned int', + 'deauth_callback_url': 'string', + 'default_share_mode': 'string', + 'description': 'string', + 'financial_id': 'string', + 'gdpv4_chrome_custom_tabs_enabled': 'bool', + 'gdpv4_enabled': 'bool', + 'gdpv4_nux_content': 'string', + 'gdpv4_nux_enabled': 'bool', + 'has_messenger_product': 'bool', + 'hosting_url': 'string', + 'icon_url': 'string', + 'id': 'string', + 'ios_bundle_id': 'list', + 'ios_sdk_dialog_flows': 'Object', + 'ios_sdk_error_categories': 'list', + 'ios_sfvc_attr': 'bool', + 'ios_supports_native_proxy_auth_flow': 'bool', + 'ios_supports_system_auth': 'bool', + 'ipad_app_store_id': 'string', + 'iphone_app_store_id': 'string', + 'latest_sdk_version': 'Object', + 'link': 'string', + 'logging_token': 'string', + 'logo_url': 'string', + 'migrations': 'map', + 'mobile_profile_section_url': 'string', + 'mobile_web_url': 'string', + 'monthly_active_users': 'string', + 'monthly_active_users_rank': 'unsigned int', + 'name': 'string', + 'namespace': 'string', + 'object_store_urls': 'Object', + 'owner_business': 'Business', + 'page_tab_default_name': 'string', + 'page_tab_url': 'string', + 'photo_url': 'string', + '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', + 'restrictive_data_filter_rules': 'string', + 'sdk_update_message': 'string', + 'seamless_login': 'int', + 'secure_canvas_url': 'string', + 'secure_page_tab_url': 'string', + 'server_ip_whitelist': 'string', + 'smart_login_bookmark_icon_url': 'string', + 'smart_login_menu_icon_url': 'string', + 'social_discovery': 'unsigned int', + 'subcategory': 'string', + 'suggested_events_setting': 'string', + 'supported_platforms': 'list', + 'supports_apprequests_fast_app_switch': 'Object', + 'supports_attribution': 'bool', + 'supports_implicit_sdk_logging': 'bool', + 'suppress_native_ios_gdp': 'bool', + 'terms_of_service_url': 'string', + 'url_scheme_suffix': 'string', + 'user_support_email': 'string', + 'user_support_url': 'string', + 'website_url': 'string', + 'weekly_active_users': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['SupportedPlatforms'] = Application.SupportedPlatforms.__dict__.values() + field_enum_info['AnPlatforms'] = Application.AnPlatforms.__dict__.values() + field_enum_info['Platform'] = Application.Platform.__dict__.values() + field_enum_info['RequestType'] = Application.RequestType.__dict__.values() + field_enum_info['MutationMethod'] = Application.MutationMethod.__dict__.values() + field_enum_info['PostMethod'] = Application.PostMethod.__dict__.values() + field_enum_info['LoggingSource'] = Application.LoggingSource.__dict__.values() + field_enum_info['LoggingTarget'] = Application.LoggingTarget.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/apprequest.py b/tap_facebook/facebook_business/adobjects/apprequest.py new file mode 100644 index 0000000..810cc61 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/apprequest.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 +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 AppRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAppRequest = True + super(AppRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + action_type = 'action_type' + application = 'application' + created_time = 'created_time' + data = 'data' + field_from = 'from' + id = 'id' + message = 'message' + object = 'object' + to = 'to' + + 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 = { + 'ids': 'list', + } + 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=AppRequest, + 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_type': 'string', + 'application': 'Application', + 'created_time': 'datetime', + 'data': 'string', + 'from': 'Object', + 'id': 'string', + 'message': 'string', + 'object': 'Object', + 'to': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/apprequestformerrecipient.py b/tap_facebook/facebook_business/adobjects/apprequestformerrecipient.py new file mode 100644 index 0000000..9cabe83 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/apprequestformerrecipient.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 AppRequestFormerRecipient( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAppRequestFormerRecipient = True + super(AppRequestFormerRecipient, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + recipient_id = 'recipient_id' + + _field_types = { + 'id': 'string', + 'recipient_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/assigneduser.py b/tap_facebook/facebook_business/adobjects/assigneduser.py new file mode 100644 index 0000000..04fde57 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/assigneduser.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 AssignedUser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAssignedUser = True + super(AssignedUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + id = 'id' + name = 'name' + user_type = 'user_type' + + _field_types = { + 'business': 'Business', + 'id': 'string', + 'name': 'string', + 'user_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/asyncrequest.py b/tap_facebook/facebook_business/adobjects/asyncrequest.py new file mode 100644 index 0000000..1db67e6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/asyncrequest.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 +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 AsyncRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAsyncRequest = True + super(AsyncRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + result = 'result' + status = 'status' + type = 'type' + + class Status: + error = 'ERROR' + executing = 'EXECUTING' + finished = 'FINISHED' + initialized = 'INITIALIZED' + + class Type: + async_adgroup_creation = 'ASYNC_ADGROUP_CREATION' + batch_api = 'BATCH_API' + drafts = 'DRAFTS' + + _field_types = { + 'id': 'int', + 'result': 'string', + 'status': 'int', + 'type': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = AsyncRequest.Status.__dict__.values() + field_enum_info['Type'] = AsyncRequest.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/asyncsession.py b/tap_facebook/facebook_business/adobjects/asyncsession.py new file mode 100644 index 0000000..01c84eb --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/asyncsession.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 AsyncSession( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAsyncSession = True + super(AsyncSession, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + app = 'app' + complete_time = 'complete_time' + error_code = 'error_code' + exception = 'exception' + id = 'id' + method = 'method' + name = 'name' + page = 'page' + percent_completed = 'percent_completed' + platform_version = 'platform_version' + result = 'result' + start_time = 'start_time' + status = 'status' + uri = '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=AsyncSession, + 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': 'Application', + 'complete_time': 'datetime', + 'error_code': 'int', + 'exception': 'string', + 'id': 'string', + 'method': 'string', + 'name': 'string', + 'page': 'Page', + 'percent_completed': 'int', + 'platform_version': 'string', + 'result': 'string', + 'start_time': 'datetime', + 'status': 'string', + 'uri': 'string', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/attributionspec.py b/tap_facebook/facebook_business/adobjects/attributionspec.py new file mode 100644 index 0000000..1d4c409 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/attributionspec.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 AttributionSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AttributionSpec, self).__init__() + self._isAttributionSpec = True + self._api = api + + class Field(AbstractObject.Field): + event_type = 'event_type' + window_days = 'window_days' + + _field_types = { + 'event_type': 'string', + 'window_days': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/audiencepermissionforactions.py b/tap_facebook/facebook_business/adobjects/audiencepermissionforactions.py new file mode 100644 index 0000000..93db153 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/audiencepermissionforactions.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 AudiencePermissionForActions( + AbstractObject, +): + + def __init__(self, api=None): + super(AudiencePermissionForActions, self).__init__() + self._isAudiencePermissionForActions = True + self._api = api + + class Field(AbstractObject.Field): + can_edit = 'can_edit' + can_see_insight = 'can_see_insight' + can_share = 'can_share' + subtype_supports_lookalike = 'subtype_supports_lookalike' + supports_recipient_lookalike = 'supports_recipient_lookalike' + + _field_types = { + 'can_edit': 'bool', + 'can_see_insight': 'bool', + 'can_share': 'bool', + 'subtype_supports_lookalike': 'bool', + 'supports_recipient_lookalike': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/audiocopyright.py b/tap_facebook/facebook_business/adobjects/audiocopyright.py new file mode 100644 index 0000000..e22f705 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/audiocopyright.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 AudioCopyright( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAudioCopyright = True + super(AudioCopyright, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + displayed_matches_count = 'displayed_matches_count' + id = 'id' + in_conflict = 'in_conflict' + isrc = 'isrc' + match_rule = 'match_rule' + ownership_countries = 'ownership_countries' + reference_file_status = 'reference_file_status' + ridge_monitoring_status = 'ridge_monitoring_status' + tags = 'tags' + update_time = 'update_time' + whitelisted_fb_users = 'whitelisted_fb_users' + whitelisted_ig_users = 'whitelisted_ig_users' + + 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=AudioCopyright, + 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_update_records(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/update_records', + 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 = { + 'creation_time': 'datetime', + 'displayed_matches_count': 'int', + 'id': 'string', + 'in_conflict': 'bool', + 'isrc': 'string', + 'match_rule': 'VideoCopyrightRule', + 'ownership_countries': 'list', + 'reference_file_status': 'string', + 'ridge_monitoring_status': 'string', + 'tags': 'list', + 'update_time': 'datetime', + 'whitelisted_fb_users': 'list', + 'whitelisted_ig_users': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/automotivemodel.py b/tap_facebook/facebook_business/adobjects/automotivemodel.py new file mode 100644 index 0000000..9879083 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/automotivemodel.py @@ -0,0 +1,234 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 AutomotiveModel( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAutomotiveModel = True + super(AutomotiveModel, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + applinks = 'applinks' + automotive_model_id = 'automotive_model_id' + availability = 'availability' + body_style = 'body_style' + category_specific_fields = 'category_specific_fields' + currency = 'currency' + custom_label_0 = 'custom_label_0' + description = 'description' + drivetrain = 'drivetrain' + exterior_color = 'exterior_color' + finance_description = 'finance_description' + finance_type = 'finance_type' + fuel_type = 'fuel_type' + generation = 'generation' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + interior_color = 'interior_color' + interior_upholstery = 'interior_upholstery' + make = 'make' + model = 'model' + price = 'price' + sanitized_images = 'sanitized_images' + title = 'title' + transmission = 'transmission' + trim = 'trim' + unit_price = 'unit_price' + url = 'url' + visibility = 'visibility' + year = 'year' + + 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=AutomotiveModel, + 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.') + 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=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_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 = { + 'applinks': 'CatalogItemAppLinks', + 'automotive_model_id': 'string', + 'availability': 'string', + 'body_style': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'currency': 'string', + 'custom_label_0': 'string', + 'description': 'string', + 'drivetrain': 'string', + 'exterior_color': 'string', + 'finance_description': 'string', + 'finance_type': 'string', + 'fuel_type': 'string', + 'generation': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'interior_color': 'string', + 'interior_upholstery': 'string', + 'make': 'string', + 'model': 'string', + 'price': 'string', + 'sanitized_images': 'list', + 'title': 'string', + 'transmission': 'string', + 'trim': 'string', + 'unit_price': 'Object', + 'url': 'string', + 'visibility': 'Visibility', + 'year': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = AutomotiveModel.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = AutomotiveModel.Visibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/avatar.py b/tap_facebook/facebook_business/adobjects/avatar.py new file mode 100644 index 0000000..fc62b6c --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/avatarprofilepicture.py b/tap_facebook/facebook_business/adobjects/avatarprofilepicture.py new file mode 100644 index 0000000..a6b2b9b --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/brandedcontentshadowigmediaid.py b/tap_facebook/facebook_business/adobjects/brandedcontentshadowigmediaid.py new file mode 100644 index 0000000..1889814 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/brandedcontentshadowigmediaid.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 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' + id = 'id' + owner_id = 'owner_id' + permalink = 'permalink' + + _field_types = { + 'eligibility_errors': 'list', + 'id': 'string', + 'owner_id': 'string', + 'permalink': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/brandedcontentshadowiguserid.py b/tap_facebook/facebook_business/adobjects/brandedcontentshadowiguserid.py new file mode 100644 index 0000000..8373a76 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/brandrequest.py b/tap_facebook/facebook_business/adobjects/brandrequest.py new file mode 100644 index 0000000..d6e2299 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/brandrequest.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 +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 BrandRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBrandRequest = True + super(BrandRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_countries = 'ad_countries' + additional_contacts = 'additional_contacts' + approval_level = 'approval_level' + cells = 'cells' + countries = 'countries' + deny_reason = 'deny_reason' + end_time = 'end_time' + estimated_reach = 'estimated_reach' + id = 'id' + is_multicell = 'is_multicell' + locale = 'locale' + max_age = 'max_age' + min_age = 'min_age' + questions = 'questions' + region = 'region' + request_status = 'request_status' + review_date = 'review_date' + start_time = 'start_time' + status = 'status' + submit_date = 'submit_date' + total_budget = 'total_budget' + + 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=BrandRequest, + 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_countries': 'list', + 'additional_contacts': 'list', + 'approval_level': 'unsigned int', + 'cells': 'list', + 'countries': 'list', + 'deny_reason': 'string', + 'end_time': 'datetime', + 'estimated_reach': 'unsigned int', + 'id': 'string', + 'is_multicell': 'bool', + 'locale': 'string', + 'max_age': 'unsigned int', + 'min_age': 'unsigned int', + 'questions': 'list', + 'region': 'string', + 'request_status': 'string', + 'review_date': 'datetime', + 'start_time': 'datetime', + 'status': 'string', + 'submit_date': 'datetime', + 'total_budget': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/brandsafetyblocklistusage.py b/tap_facebook/facebook_business/adobjects/brandsafetyblocklistusage.py new file mode 100644 index 0000000..fef0d72 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/brandsafetyblocklistusage.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 BrandSafetyBlockListUsage( + AbstractObject, +): + + def __init__(self, api=None): + super(BrandSafetyBlockListUsage, self).__init__() + self._isBrandSafetyBlockListUsage = True + self._api = api + + class Field(AbstractObject.Field): + current_usage = 'current_usage' + new_usage = 'new_usage' + platform = 'platform' + position = 'position' + threshold = 'threshold' + + _field_types = { + 'current_usage': 'int', + 'new_usage': 'int', + 'platform': 'string', + 'position': 'string', + 'threshold': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/broadtargetingcategories.py b/tap_facebook/facebook_business/adobjects/broadtargetingcategories.py new file mode 100644 index 0000000..aa1b1aa --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/broadtargetingcategories.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 +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 BroadTargetingCategories( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBroadTargetingCategories = True + super(BroadTargetingCategories, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + category_description = 'category_description' + id = 'id' + name = 'name' + parent_category = 'parent_category' + path = 'path' + size_lower_bound = 'size_lower_bound' + size_upper_bound = 'size_upper_bound' + source = 'source' + type = 'type' + type_name = 'type_name' + untranslated_name = 'untranslated_name' + untranslated_parent_name = 'untranslated_parent_name' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'broadtargetingcategories' + + _field_types = { + 'category_description': 'string', + 'id': 'string', + 'name': 'string', + 'parent_category': 'string', + 'path': 'list', + 'size_lower_bound': 'int', + 'size_upper_bound': 'int', + 'source': 'string', + 'type': 'int', + 'type_name': 'string', + 'untranslated_name': 'string', + 'untranslated_parent_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/business.py b/tap_facebook/facebook_business/adobjects/business.py new file mode 100644 index 0000000..18f6803 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/business.py @@ -0,0 +1,3981 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.adobjects.helpers.businessmixin import BusinessMixin + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class Business( + BusinessMixin, + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusiness = True + super(Business, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + block_offline_analytics = 'block_offline_analytics' + collaborative_ads_managed_partner_business_info = 'collaborative_ads_managed_partner_business_info' + collaborative_ads_managed_partner_eligibility = 'collaborative_ads_managed_partner_eligibility' + collaborative_ads_partner_premium_options = 'collaborative_ads_partner_premium_options' + created_by = 'created_by' + created_time = 'created_time' + extended_updated_time = 'extended_updated_time' + id = 'id' + is_hidden = 'is_hidden' + link = 'link' + name = 'name' + payment_account_id = 'payment_account_id' + primary_page = 'primary_page' + profile_picture_uri = 'profile_picture_uri' + timezone_id = 'timezone_id' + 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' + + class TwoFactorType: + admin_required = 'admin_required' + all_required = 'all_required' + none = 'none' + + class Vertical: + advertising = 'ADVERTISING' + automotive = 'AUTOMOTIVE' + consumer_packaged_goods = 'CONSUMER_PACKAGED_GOODS' + ecommerce = 'ECOMMERCE' + education = 'EDUCATION' + energy_and_utilities = 'ENERGY_AND_UTILITIES' + entertainment_and_media = 'ENTERTAINMENT_AND_MEDIA' + financial_services = 'FINANCIAL_SERVICES' + gaming = 'GAMING' + government_and_politics = 'GOVERNMENT_AND_POLITICS' + health = 'HEALTH' + luxury = 'LUXURY' + marketing = 'MARKETING' + non_profit = 'NON_PROFIT' + not_set = 'NOT_SET' + organizations_and_associations = 'ORGANIZATIONS_AND_ASSOCIATIONS' + other = 'OTHER' + professional_services = 'PROFESSIONAL_SERVICES' + restaurant = 'RESTAURANT' + retail = 'RETAIL' + technology = 'TECHNOLOGY' + telecom = 'TELECOM' + travel = 'TRAVEL' + + class PermittedTasks: + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + cashier_role = 'CASHIER_ROLE' + create_content = 'CREATE_CONTENT' + manage = 'MANAGE' + manage_jobs = 'MANAGE_JOBS' + manage_leads = 'MANAGE_LEADS' + messaging = 'MESSAGING' + moderate = 'MODERATE' + moderate_community = 'MODERATE_COMMUNITY' + pages_messaging = 'PAGES_MESSAGING' + pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' + profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' + profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' + profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' + profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' + profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' + profile_plus_manage = 'PROFILE_PLUS_MANAGE' + profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' + profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' + profile_plus_moderate = 'PROFILE_PLUS_MODERATE' + profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' + profile_plus_revenue = 'PROFILE_PLUS_REVENUE' + read_page_mailboxes = 'READ_PAGE_MAILBOXES' + view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' + + class SurveyBusinessType: + advertiser = 'ADVERTISER' + agency = 'AGENCY' + app_developer = 'APP_DEVELOPER' + publisher = 'PUBLISHER' + + class PagePermittedTasks: + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + cashier_role = 'CASHIER_ROLE' + create_content = 'CREATE_CONTENT' + manage = 'MANAGE' + manage_jobs = 'MANAGE_JOBS' + manage_leads = 'MANAGE_LEADS' + messaging = 'MESSAGING' + moderate = 'MODERATE' + moderate_community = 'MODERATE_COMMUNITY' + pages_messaging = 'PAGES_MESSAGING' + pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' + profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' + profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' + profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' + profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' + profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' + profile_plus_manage = 'PROFILE_PLUS_MANAGE' + profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' + profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' + profile_plus_moderate = 'PROFILE_PLUS_MODERATE' + profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' + profile_plus_revenue = 'PROFILE_PLUS_REVENUE' + read_page_mailboxes = 'READ_PAGE_MAILBOXES' + view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' + + class SubverticalV2: + accounting_and_tax = 'ACCOUNTING_AND_TAX' + activities_and_leisure = 'ACTIVITIES_AND_LEISURE' + air = 'AIR' + apparel_and_accessories = 'APPAREL_AND_ACCESSORIES' + arts_and_heritage_and_education = 'ARTS_AND_HERITAGE_AND_EDUCATION' + ar_or_vr_gaming = 'AR_OR_VR_GAMING' + audio_streaming = 'AUDIO_STREAMING' + auto = 'AUTO' + auto_insurance = 'AUTO_INSURANCE' + auto_rental = 'AUTO_RENTAL' + baby = 'BABY' + ballot_initiative_or_referendum = 'BALLOT_INITIATIVE_OR_REFERENDUM' + beauty = 'BEAUTY' + beauty_and_fashion = 'BEAUTY_AND_FASHION' + beer_and_wine_and_liquor_and_malt_beverages = 'BEER_AND_WINE_AND_LIQUOR_AND_MALT_BEVERAGES' + bookstores = 'BOOKSTORES' + broadcast_television = 'BROADCAST_TELEVISION' + business_consultants = 'BUSINESS_CONSULTANTS' + buying_agency = 'BUYING_AGENCY' + cable_and_satellite = 'CABLE_AND_SATELLITE' + cable_television = 'CABLE_TELEVISION' + call_center_and_messaging_services = 'CALL_CENTER_AND_MESSAGING_SERVICES' + candidate_or_politician = 'CANDIDATE_OR_POLITICIAN' + career = 'CAREER' + career_and_tech = 'CAREER_AND_TECH' + casual_dining = 'CASUAL_DINING' + chronic_conditions_and_medical_causes = 'CHRONIC_CONDITIONS_AND_MEDICAL_CAUSES' + civic_influencers = 'CIVIC_INFLUENCERS' + clinical_trials = 'CLINICAL_TRIALS' + coffee = 'COFFEE' + computer_and_software_and_hardware = 'COMPUTER_AND_SOFTWARE_AND_HARDWARE' + console_and_cross_platform_gaming = 'CONSOLE_AND_CROSS_PLATFORM_GAMING' + consulting = 'CONSULTING' + consumer_electronics = 'CONSUMER_ELECTRONICS' + counseling_and_psychotherapy = 'COUNSELING_AND_PSYCHOTHERAPY' + creative_agency = 'CREATIVE_AGENCY' + credit_and_financing_and_mortages = 'CREDIT_AND_FINANCING_AND_MORTAGES' + cruises_and_marine = 'CRUISES_AND_MARINE' + culture_and_lifestyle = 'CULTURE_AND_LIFESTYLE' + data_analytics_and_data_management = 'DATA_ANALYTICS_AND_DATA_MANAGEMENT' + dating_and_technology_apps = 'DATING_AND_TECHNOLOGY_APPS' + department_store = 'DEPARTMENT_STORE' + desktop_software = 'DESKTOP_SOFTWARE' + dieting_and_fitness_programs = 'DIETING_AND_FITNESS_PROGRAMS' + digital_native_education_or_training = 'DIGITAL_NATIVE_EDUCATION_OR_TRAINING' + drinking_places = 'DRINKING_PLACES' + education_resources = 'EDUCATION_RESOURCES' + ed_tech = 'ED_TECH' + elearning_and_massive_online_open_courses = 'ELEARNING_AND_MASSIVE_ONLINE_OPEN_COURSES' + election_commission = 'ELECTION_COMMISSION' + electronics_and_appliances = 'ELECTRONICS_AND_APPLIANCES' + engineering_and_design = 'ENGINEERING_AND_DESIGN' + environment_and_animal_welfare = 'ENVIRONMENT_AND_ANIMAL_WELFARE' + esports = 'ESPORTS' + events = 'EVENTS' + farming_and_ranching = 'FARMING_AND_RANCHING' + file_storage_and_cloud_and_data_services = 'FILE_STORAGE_AND_CLOUD_AND_DATA_SERVICES' + finance = 'FINANCE' + fin_tech = 'FIN_TECH' + fishing_and_hunting_and_forestry_and_logging = 'FISHING_AND_HUNTING_AND_FORESTRY_AND_LOGGING' + fitness = 'FITNESS' + food = 'FOOD' + footwear = 'FOOTWEAR' + for_profit_colleges_and_universities = 'FOR_PROFIT_COLLEGES_AND_UNIVERSITIES' + full_service_agency = 'FULL_SERVICE_AGENCY' + government_controlled_entity = 'GOVERNMENT_CONTROLLED_ENTITY' + government_department_or_agency = 'GOVERNMENT_DEPARTMENT_OR_AGENCY' + government_official = 'GOVERNMENT_OFFICIAL' + government_owned_media = 'GOVERNMENT_OWNED_MEDIA' + grocery_and_drug_and_convenience = 'GROCERY_AND_DRUG_AND_CONVENIENCE' + head_of_state = 'HEAD_OF_STATE' + health_insurance = 'HEALTH_INSURANCE' + health_systems_and_practitioners = 'HEALTH_SYSTEMS_AND_PRACTITIONERS' + health_tech = 'HEALTH_TECH' + home_and_furniture_and_office = 'HOME_AND_FURNITURE_AND_OFFICE' + home_improvement = 'HOME_IMPROVEMENT' + home_insurance = 'HOME_INSURANCE' + home_tech = 'HOME_TECH' + hotel_and_accomodation = 'HOTEL_AND_ACCOMODATION' + household_goods_durable = 'HOUSEHOLD_GOODS_DURABLE' + household_goods_non_durable = 'HOUSEHOLD_GOODS_NON_DURABLE' + hr_and_financial_management = 'HR_AND_FINANCIAL_MANAGEMENT' + humanitarian_or_disaster_relief = 'HUMANITARIAN_OR_DISASTER_RELIEF' + independent_expenditure_group = 'INDEPENDENT_EXPENDITURE_GROUP' + insurance_tech = 'INSURANCE_TECH' + international_organizaton = 'INTERNATIONAL_ORGANIZATON' + investment_bank_and_brokerage = 'INVESTMENT_BANK_AND_BROKERAGE' + issue_advocacy = 'ISSUE_ADVOCACY' + legal = 'LEGAL' + life_insurance = 'LIFE_INSURANCE' + logistics_and_transportation_and_fleet_management = 'LOGISTICS_AND_TRANSPORTATION_AND_FLEET_MANAGEMENT' + manufacturing = 'MANUFACTURING' + medical_devices_and_supplies_and_equipment = 'MEDICAL_DEVICES_AND_SUPPLIES_AND_EQUIPMENT' + medspa_and_elective_surgeries_and_alternative_medicine = 'MEDSPA_AND_ELECTIVE_SURGERIES_AND_ALTERNATIVE_MEDICINE' + mining_and_quarrying = 'MINING_AND_QUARRYING' + mobile_gaming = 'MOBILE_GAMING' + movies = 'MOVIES' + museums_and_parks_and_libraries = 'MUSEUMS_AND_PARKS_AND_LIBRARIES' + music = 'MUSIC' + network_security_products = 'NETWORK_SECURITY_PRODUCTS' + news_and_current_events = 'NEWS_AND_CURRENT_EVENTS' + non_prescription = 'NON_PRESCRIPTION' + not_for_profit_colleges_and_universities = 'NOT_FOR_PROFIT_COLLEGES_AND_UNIVERSITIES' + office = 'OFFICE' + office_or_business_supplies = 'OFFICE_OR_BUSINESS_SUPPLIES' + oil_and_gas_and_consumable_fuel = 'OIL_AND_GAS_AND_CONSUMABLE_FUEL' + online_only_publications = 'ONLINE_ONLY_PUBLICATIONS' + package_or_freight_delivery = 'PACKAGE_OR_FREIGHT_DELIVERY' + party_independent_expenditure_group_us = 'PARTY_INDEPENDENT_EXPENDITURE_GROUP_US' + payment_processing_and_gateway_solutions = 'PAYMENT_PROCESSING_AND_GATEWAY_SOLUTIONS' + pc_gaming = 'PC_GAMING' + people = 'PEOPLE' + personal_care = 'PERSONAL_CARE' + pet = 'PET' + photography_and_filming_services = 'PHOTOGRAPHY_AND_FILMING_SERVICES' + pizza = 'PIZZA' + planning_agency = 'PLANNING_AGENCY' + political_party_or_committee = 'POLITICAL_PARTY_OR_COMMITTEE' + prescription = 'PRESCRIPTION' + professional_associations = 'PROFESSIONAL_ASSOCIATIONS' + property_and_casualty = 'PROPERTY_AND_CASUALTY' + quick_service = 'QUICK_SERVICE' + radio = 'RADIO' + railroads = 'RAILROADS' + real_estate = 'REAL_ESTATE' + real_money_gaming = 'REAL_MONEY_GAMING' + recreational = 'RECREATIONAL' + religious = 'RELIGIOUS' + reseller = 'RESELLER' + residential_and_long_term_care_facilities_and_outpatient_care_centers = 'RESIDENTIAL_AND_LONG_TERM_CARE_FACILITIES_AND_OUTPATIENT_CARE_CENTERS' + retail_and_credit_union_and_commercial_bank = 'RETAIL_AND_CREDIT_UNION_AND_COMMERCIAL_BANK' + ride_sharing_or_taxi_services = 'RIDE_SHARING_OR_TAXI_SERVICES' + safety_services = 'SAFETY_SERVICES' + scholarly = 'SCHOLARLY' + school_and_early_children_edcation = 'SCHOOL_AND_EARLY_CHILDREN_EDCATION' + social_media = 'SOCIAL_MEDIA' + software_as_a_service = 'SOFTWARE_AS_A_SERVICE' + sporting = 'SPORTING' + sporting_and_outdoor = 'SPORTING_AND_OUTDOOR' + sports = 'SPORTS' + superstores = 'SUPERSTORES' + t1_automotive_manufacturer = 'T1_AUTOMOTIVE_MANUFACTURER' + t1_motorcycle = 'T1_MOTORCYCLE' + t2_dealer_associations = 'T2_DEALER_ASSOCIATIONS' + t3_auto_agency = 'T3_AUTO_AGENCY' + t3_auto_resellers = 'T3_AUTO_RESELLERS' + t3_dealer_groups = 'T3_DEALER_GROUPS' + t3_franchise_dealer = 'T3_FRANCHISE_DEALER' + t3_independent_dealer = 'T3_INDEPENDENT_DEALER' + t3_parts_and_services = 'T3_PARTS_AND_SERVICES' + t3_portals = 'T3_PORTALS' + telecommunications_equipment_and_accessories = 'TELECOMMUNICATIONS_EQUIPMENT_AND_ACCESSORIES' + telephone_service_providers_and_carriers = 'TELEPHONE_SERVICE_PROVIDERS_AND_CARRIERS' + ticketing = 'TICKETING' + tobacco = 'TOBACCO' + tourism_and_travel_services = 'TOURISM_AND_TRAVEL_SERVICES' + tourism_board = 'TOURISM_BOARD' + toy_and_hobby = 'TOY_AND_HOBBY' + trade_school = 'TRADE_SCHOOL' + travel_agencies_and_guides_and_otas = 'TRAVEL_AGENCIES_AND_GUIDES_AND_OTAS' + utilities_and_energy_equipment_and_services = 'UTILITIES_AND_ENERGY_EQUIPMENT_AND_SERVICES' + veterinary_clinics_and_services = 'VETERINARY_CLINICS_AND_SERVICES' + video_streaming = 'VIDEO_STREAMING' + virtual_services = 'VIRTUAL_SERVICES' + vitamins_or_wellness = 'VITAMINS_OR_WELLNESS' + warehousing_and_storage = 'WAREHOUSING_AND_STORAGE' + water_and_soft_drink_and_baverage = 'WATER_AND_SOFT_DRINK_AND_BAVERAGE' + website_designers_or_graphic_designers = 'WEBSITE_DESIGNERS_OR_GRAPHIC_DESIGNERS' + wholesale = 'WHOLESALE' + wireless_services = 'WIRELESS_SERVICES' + + class VerticalV2: + advertising_and_marketing = 'ADVERTISING_AND_MARKETING' + agriculture = 'AGRICULTURE' + automotive = 'AUTOMOTIVE' + banking_and_credit_cards = 'BANKING_AND_CREDIT_CARDS' + business_to_business = 'BUSINESS_TO_BUSINESS' + consumer_packaged_goods = 'CONSUMER_PACKAGED_GOODS' + ecommerce = 'ECOMMERCE' + education = 'EDUCATION' + energy_and_natural_resources_and_utilities = 'ENERGY_AND_NATURAL_RESOURCES_AND_UTILITIES' + entertainment_and_media = 'ENTERTAINMENT_AND_MEDIA' + gaming = 'GAMING' + government = 'GOVERNMENT' + healthcare_and_pharmaceuticals_and_biotech = 'HEALTHCARE_AND_PHARMACEUTICALS_AND_BIOTECH' + insurance = 'INSURANCE' + non_profit = 'NON_PROFIT' + organizations_and_associations = 'ORGANIZATIONS_AND_ASSOCIATIONS' + politics = 'POLITICS' + professional_services = 'PROFESSIONAL_SERVICES' + publishing = 'PUBLISHING' + restaurants = 'RESTAURANTS' + retail = 'RETAIL' + technology = 'TECHNOLOGY' + telecom = 'TELECOM' + travel = 'TRAVEL' + + class ActionSource: + physical_store = 'PHYSICAL_STORE' + website = 'WEBSITE' + + 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=Business, + 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 = { + 'entry_point': 'string', + 'name': 'string', + 'primary_page': 'string', + 'timezone_id': 'unsigned int', + 'two_factor_type': 'two_factor_type_enum', + 'vertical': 'vertical_enum', + } + enums = { + 'two_factor_type_enum': Business.TwoFactorType.__dict__.values(), + 'vertical_enum': Business.Vertical.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Business, + 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_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 = { + 'app_id': 'string', + 'fbe_external_business_id': 'string', + 'scope': 'list', + 'system_user_name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/access_token', + 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 delete_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.') + param_types = { + 'adaccount_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/ad_accounts', + 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_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudy import AdStudy + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ad_studies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_ad_study(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudy import AdStudy + param_types = { + 'cells': 'list', + 'client_business': 'string', + 'confidence_level': 'float', + 'cooldown_start_time': 'int', + 'description': 'string', + 'end_time': 'int', + 'name': 'string', + 'objectives': 'list', + 'observation_end_time': 'int', + 'start_time': 'int', + 'type': 'type_enum', + 'viewers': 'list', + } + enums = { + 'type_enum': AdStudy.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/ad_studies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_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.') + from facebook_business.adobjects.adaccount import AdAccount + param_types = { + 'ad_account_created_from_bm_flag': 'bool', + 'currency': 'string', + 'end_advertiser': 'Object', + 'funding_id': 'string', + 'invoice': 'bool', + 'invoice_group_id': 'string', + 'invoicing_emails': 'list', + 'io': 'bool', + 'media_agency': 'string', + 'name': 'string', + 'partner': 'string', + 'po_number': 'string', + 'timezone_id': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adaccount', + 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 create_add_phone_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 = { + 'phone_number': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/add_phone_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_ad_network_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.application import Application + param_types = { + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adnetwork_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_ad_network_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.') + from facebook_business.adobjects.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult + param_types = { + 'aggregation_period': 'aggregation_period_enum', + 'breakdowns': 'list', + 'filters': 'list', + 'limit': 'unsigned int', + 'metrics': 'list', + 'ordering_column': 'ordering_column_enum', + 'ordering_type': 'ordering_type_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), + 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), + 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), + 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), + 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adnetworkanalytics', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdNetworkAnalyticsSyncQueryResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdNetworkAnalyticsSyncQueryResult, 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_ad_network_analytic(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult + param_types = { + 'aggregation_period': 'aggregation_period_enum', + 'breakdowns': 'list', + 'filters': 'list', + 'limit': 'int', + 'metrics': 'list', + 'ordering_column': 'ordering_column_enum', + 'ordering_type': 'ordering_type_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), + 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), + 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), + 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), + 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adnetworkanalytics', + 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_ad_network_analytics_results(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adnetworkanalyticsasyncqueryresult import AdNetworkAnalyticsAsyncQueryResult + param_types = { + 'query_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adnetworkanalytics_results', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdNetworkAnalyticsAsyncQueryResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdNetworkAnalyticsAsyncQueryResult, 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.') + param_types = { + 'filtering': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads_reporting_mmm_reports', + 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_schedulers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/ads_reporting_mmm_schedulers', + 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_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'id_filter': 'string', + 'name_filter': 'string', + 'sort_by': 'sort_by_enum', + } + enums = { + 'sort_by_enum': AdsPixel.SortBy.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adspixels', + 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_ads_pixel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'is_crm': 'bool', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adspixels', + 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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/agencies', + 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_an_placements(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adplacement import AdPlacement + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/an_placements', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdPlacement, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdPlacement, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'publisher_urls_file': 'file', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/block_list_drafts', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessassetgroup import BusinessAssetGroup + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/business_asset_groups', + 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 get_business_invoices(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.omegacustomertrx import OmegaCustomerTrx + param_types = { + 'end_date': 'string', + 'invoice_id': 'string', + 'issue_end_date': 'string', + 'issue_start_date': 'string', + 'root_id': 'unsigned int', + 'start_date': 'string', + 'type': 'type_enum', + } + enums = { + 'type_enum': OmegaCustomerTrx.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/business_invoices', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OmegaCustomerTrx, + api_type='EDGE', + response_parser=ObjectParser(target_class=OmegaCustomerTrx, 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_business_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.businessuser import BusinessUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/business_users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessUser, 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_business_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.businessuser import BusinessUser + param_types = { + 'email': 'string', + 'role': 'role_enum', + } + enums = { + 'role_enum': BusinessUser.Role.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/business_users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessUser, 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_business_projects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/businessprojects', + 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_claim_custom_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customconversion import CustomConversion + param_types = { + 'custom_conversion_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/claim_custom_conversions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversion, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomConversion, 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_client_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 = { + 'search_query': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/client_ad_accounts', + 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_client_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.') + from facebook_business.adobjects.application import Application + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/client_apps', + 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 create_client_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.') + param_types = { + 'app_id': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/client_apps', + 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_client_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/client_offsite_signal_container_business_objects', + 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_client_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.') + from facebook_business.adobjects.page import Page + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/client_pages', + 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 create_client_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.') + param_types = { + 'page_id': 'int', + 'permitted_tasks': 'list', + } + enums = { + 'permitted_tasks_enum': Business.PermittedTasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/client_pages', + 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_client_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/client_pixels', + 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_client_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/client_product_catalogs', + 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() + + def get_client_whats_app_business_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.whatsappbusinessaccount import WhatsAppBusinessAccount + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/client_whatsapp_business_accounts', + 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 delete_clients(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/clients', + 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_clients(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/clients', + 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_collaborative_ads_collaboration_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.cpascollaborationrequest import CPASCollaborationRequest + param_types = { + 'status': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/collaborative_ads_collaboration_requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASCollaborationRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=CPASCollaborationRequest, 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_collaborative_ads_collaboration_request(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.cpascollaborationrequest import CPASCollaborationRequest + param_types = { + 'brands': 'list', + 'contact_email': 'string', + 'contact_first_name': 'string', + 'contact_last_name': 'string', + 'phone_number': 'string', + 'receiver_business': 'string', + 'requester_agency_or_brand': 'requester_agency_or_brand_enum', + 'sender_client_business': 'string', + } + enums = { + 'requester_agency_or_brand_enum': CPASCollaborationRequest.RequesterAgencyOrBrand.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/collaborative_ads_collaboration_requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASCollaborationRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=CPASCollaborationRequest, 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_collaborative_ads_suggested_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.cpasadvertiserpartnershiprecommendation import CPASAdvertiserPartnershipRecommendation + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/collaborative_ads_suggested_partners', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASAdvertiserPartnershipRecommendation, + api_type='EDGE', + response_parser=ObjectParser(target_class=CPASAdvertiserPartnershipRecommendation, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.commercemerchantsettings import CommerceMerchantSettings + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/commerce_merchant_settings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceMerchantSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceMerchantSettings, 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_cpas_business_setup_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.') + from facebook_business.adobjects.cpasbusinesssetupconfig import CPASBusinessSetupConfig + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/cpas_business_setup_config', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASBusinessSetupConfig, + api_type='EDGE', + response_parser=ObjectParser(target_class=CPASBusinessSetupConfig, 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_cpas_business_setup_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.') + from facebook_business.adobjects.cpasbusinesssetupconfig import CPASBusinessSetupConfig + param_types = { + 'accepted_collab_ads_tos': 'bool', + 'ad_accounts': 'list', + 'business_capabilities_status': 'map', + 'capabilities_compliance_status': 'map', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/cpas_business_setup_config', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASBusinessSetupConfig, + api_type='EDGE', + response_parser=ObjectParser(target_class=CPASBusinessSetupConfig, 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_cpas_merchant_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.') + from facebook_business.adobjects.cpasmerchantconfig import CPASMerchantConfig + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/cpas_merchant_config', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASMerchantConfig, + api_type='EDGE', + response_parser=ObjectParser(target_class=CPASMerchantConfig, 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.creditcard import CreditCard + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/creditcards', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CreditCard, + api_type='EDGE', + response_parser=ObjectParser(target_class=CreditCard, 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_custom_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customconversion import CustomConversion + param_types = { + 'advanced_rule': 'string', + 'custom_event_type': 'custom_event_type_enum', + 'default_conversion_value': 'float', + 'description': 'string', + 'event_source_id': 'string', + 'name': 'string', + 'rule': 'string', + } + enums = { + 'custom_event_type_enum': CustomConversion.CustomEventType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/customconversions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversion, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomConversion, 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_draft_negative_keyword_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.') + param_types = { + 'negative_keyword_list_file': 'file', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/draft_negative_keyword_lists', + 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_event_source_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.eventsourcegroup import EventSourceGroup + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/event_source_groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventSourceGroup, + api_type='EDGE', + response_parser=ObjectParser(target_class=EventSourceGroup, 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_event_source_group(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.eventsourcegroup import EventSourceGroup + param_types = { + 'event_sources': 'list', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/event_source_groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventSourceGroup, + api_type='EDGE', + response_parser=ObjectParser(target_class=EventSourceGroup, 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_extended_credit_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.') + param_types = { + 'only_show_pending': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/extendedcreditapplications', + 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_extended_credits(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.extendedcredit import ExtendedCredit + param_types = { + 'order_by_is_owned_credential': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/extendedcredits', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExtendedCredit, + api_type='EDGE', + response_parser=ObjectParser(target_class=ExtendedCredit, 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessassetsharingagreement import BusinessAssetSharingAgreement + param_types = { + 'recipient_id': 'string', + 'request_status': 'request_status_enum', + } + enums = { + 'request_status_enum': BusinessAssetSharingAgreement.RequestStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/initiated_audience_sharing_requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessAssetSharingAgreement, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessAssetSharingAgreement, 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_instagram_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.') + param_types = { + 'instagram_account': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/instagram_accounts', + 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_instagram_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.instagramuser import InstagramUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/instagram_accounts', + 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_instagram_business_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.iguser import IGUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/instagram_business_accounts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGUser, 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_managed_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.') + param_types = { + 'existing_client_business_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/managed_businesses', + 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_managed_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.') + param_types = { + 'child_business_external_id': 'string', + 'existing_client_business_id': 'string', + 'name': 'string', + 'sales_rep_email': 'string', + 'survey_business_type': 'survey_business_type_enum', + 'survey_num_assets': 'unsigned int', + 'survey_num_people': 'unsigned int', + 'timezone_id': 'unsigned int', + 'vertical': 'vertical_enum', + } + enums = { + 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), + 'vertical_enum': Business.Vertical.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/managed_businesses', + 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_managed_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.') + param_types = { + 'active_ad_account_id': 'string', + 'active_page_id': 'int', + 'partner_facebook_page_url': 'string', + 'partner_registration_countries': 'list', + 'seller_email_address': 'string', + 'seller_external_website_url': 'string', + 'template': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/managed_partner_business_setup', + 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 delete_managed_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.') + param_types = { + 'child_business_external_id': 'string', + 'child_business_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/managed_partner_businesses', + 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_managed_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.') + param_types = { + 'ad_account_currency': 'string', + 'catalog_id': 'string', + 'child_business_external_id': 'string', + 'credit_limit': 'unsigned int', + 'line_of_credit_id': 'string', + 'name': 'string', + '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', + 'vertical': 'vertical_enum', + } + enums = { + 'partition_type_enum': [ + 'AUTH', + 'FIXED', + 'FIXED_WITHOUT_PARTITION', + ], + 'survey_business_type_enum': [ + 'ADVERTISER', + 'AGENCY', + 'APP_DEVELOPER', + 'PUBLISHER', + ], + 'vertical_enum': [ + 'ADVERTISING', + 'AUTOMOTIVE', + 'CONSUMER_PACKAGED_GOODS', + 'ECOMMERCE', + 'EDUCATION', + 'ENERGY_AND_UTILITIES', + 'ENTERTAINMENT_AND_MEDIA', + 'FINANCIAL_SERVICES', + 'GAMING', + 'GOVERNMENT_AND_POLITICS', + 'HEALTH', + 'LUXURY', + 'MARKETING', + 'NON_PROFIT', + 'NOT_SET', + 'ORGANIZATIONS_AND_ASSOCIATIONS', + 'OTHER', + 'PROFESSIONAL_SERVICES', + 'RESTAURANT', + 'RETAIL', + 'TECHNOLOGY', + 'TELECOM', + 'TRAVEL', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/managed_partner_businesses', + 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_negative_keyword_lists(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/negative_keyword_lists', + 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_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), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is 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_open_bridge_configurations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.openbridgeconfiguration import OpenBridgeConfiguration + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/openbridge_configurations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OpenBridgeConfiguration, + api_type='EDGE', + response_parser=ObjectParser(target_class=OpenBridgeConfiguration, 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_open_bridge_configuration(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.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', + 'pixel_id': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/openbridge_configurations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OpenBridgeConfiguration, + api_type='EDGE', + response_parser=ObjectParser(target_class=OpenBridgeConfiguration, 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_owned_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 = { + 'search_query': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owned_ad_accounts', + 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 create_owned_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 = { + 'adaccount_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/owned_ad_accounts', + 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_owned_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.') + from facebook_business.adobjects.application import Application + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owned_apps', + 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 create_owned_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.') + param_types = { + 'app_id': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/owned_apps', + 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 delete_owned_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.') + param_types = { + 'client_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/owned_businesses', + 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_owned_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.') + param_types = { + 'child_business_external_id': 'string', + 'client_user_id': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owned_businesses', + 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_owned_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.') + param_types = { + 'child_business_external_id': 'string', + 'name': 'string', + 'page_permitted_tasks': 'list', + 'sales_rep_email': 'string', + 'shared_page_id': 'string', + 'survey_business_type': 'survey_business_type_enum', + 'survey_num_assets': 'unsigned int', + 'survey_num_people': 'unsigned int', + 'timezone_id': 'unsigned int', + 'vertical': 'vertical_enum', + } + enums = { + 'page_permitted_tasks_enum': Business.PagePermittedTasks.__dict__.values(), + 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), + 'vertical_enum': Business.Vertical.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/owned_businesses', + 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_owned_instagram_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.instagramuser import InstagramUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owned_instagram_accounts', + 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_owned_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owned_offsite_signal_container_business_objects', + 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_owned_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.') + from facebook_business.adobjects.page import Page + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owned_pages', + 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 create_owned_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.') + param_types = { + 'code': 'string', + 'entry_point': 'string', + 'page_id': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/owned_pages', + 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_owned_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/owned_pixels', + 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_owned_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owned_product_catalogs', + 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() + + def create_owned_product_catalog(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.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', + 'destination_catalog_settings': 'map', + 'flight_catalog_settings': 'map', + 'name': 'string', + 'parent_catalog_id': 'string', + 'partner_integration': 'map', + 'store_catalog_settings': 'map', + 'vertical': 'vertical_enum', + } + enums = { + 'additional_vertical_option_enum': ProductCatalog.AdditionalVerticalOption.__dict__.values(), + 'vertical_enum': ProductCatalog.Vertical.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/owned_product_catalogs', + 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() + + def get_owned_whats_app_business_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.whatsappbusinessaccount import WhatsAppBusinessAccount + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owned_whatsapp_business_accounts', + 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 delete_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.') + param_types = { + 'page_id': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/pages', + 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_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.') + 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=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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'catalog_segment_id': 'string', + 'enable_basket_insight': 'bool', + 'enable_extended_audience_retargeting': 'bool', + 'partner_business_id': 'string', + 'retailer_custom_audience_config': 'map', + 'vendor_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/partner_premium_options', + 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_pending_client_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.businessadaccountrequest import BusinessAdAccountRequest + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pending_client_ad_accounts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessAdAccountRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessAdAccountRequest, 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_pending_client_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.') + from facebook_business.adobjects.businessapplicationrequest import BusinessApplicationRequest + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pending_client_apps', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessApplicationRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessApplicationRequest, 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_pending_client_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.') + from facebook_business.adobjects.businesspagerequest import BusinessPageRequest + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pending_client_pages', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessPageRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessPageRequest, 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_pending_owned_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.businessadaccountrequest import BusinessAdAccountRequest + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pending_owned_ad_accounts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessAdAccountRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessAdAccountRequest, 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_pending_owned_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.') + from facebook_business.adobjects.businesspagerequest import BusinessPageRequest + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pending_owned_pages', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessPageRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessPageRequest, 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_pending_shared_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pending_shared_offsite_signal_container_business_objects', + 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_pending_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.businessrolerequest import BusinessRoleRequest + param_types = { + 'email': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pending_users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessRoleRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessRoleRequest, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profilepicturesource import ProfilePictureSource + param_types = { + 'height': 'int', + 'redirect': 'bool', + 'type': 'type_enum', + 'width': 'int', + } + enums = { + 'type_enum': ProfilePictureSource.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/picture', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProfilePictureSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProfilePictureSource, 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_pixel_to(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/pixel_tos', + 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_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.') + from facebook_business.adobjects.whatsappbusinesspreverifiedphonenumber import WhatsAppBusinessPreVerifiedPhoneNumber + param_types = { + 'code_verification_status': 'code_verification_status_enum', + 'phone_number': 'string', + } + enums = { + 'code_verification_status_enum': WhatsAppBusinessPreVerifiedPhoneNumber.CodeVerificationStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/preverified_numbers', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WhatsAppBusinessPreVerifiedPhoneNumber, + api_type='EDGE', + response_parser=ObjectParser(target_class=WhatsAppBusinessPreVerifiedPhoneNumber, 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_received_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessassetsharingagreement import BusinessAssetSharingAgreement + param_types = { + 'initiator_id': 'string', + 'request_status': 'request_status_enum', + } + enums = { + 'request_status_enum': BusinessAssetSharingAgreement.RequestStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/received_audience_sharing_requests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessAssetSharingAgreement, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessAssetSharingAgreement, 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_managed_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.') + param_types = { + 'credit_line_id': 'string', + 'marketplace_business_id': 'string', + 'subvertical_v2': 'subvertical_v2_enum', + 'vendor_id': 'string', + 'vertical_v2': 'vertical_v2_enum', + } + enums = { + 'subvertical_v2_enum': Business.SubverticalV2.__dict__.values(), + 'vertical_v2_enum': Business.VerticalV2.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/setup_managed_partner_adaccounts', + 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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.systemuser import SystemUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/system_users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=SystemUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=SystemUser, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.systemuser import SystemUser + param_types = { + 'name': 'string', + 'role': 'role_enum', + 'system_user_id': 'int', + } + enums = { + 'role_enum': SystemUser.Role.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/system_users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=SystemUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=SystemUser, 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_third_party_measurement_report_dataset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/third_party_measurement_report_dataset', + 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_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', + 'adaptive_type': 'string', + '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', + 'react_mode_metadata': 'string', + '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) + + if batch is 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_offline_analytics': 'bool', + 'collaborative_ads_managed_partner_business_info': 'ManagedPartnerBusiness', + 'collaborative_ads_managed_partner_eligibility': 'BusinessManagedPartnerEligibility', + 'collaborative_ads_partner_premium_options': 'BusinessPartnerPremiumOptions', + 'created_by': 'Object', + 'created_time': 'datetime', + 'extended_updated_time': 'datetime', + 'id': 'string', + 'is_hidden': 'bool', + 'link': 'string', + 'name': 'string', + 'payment_account_id': 'string', + 'primary_page': 'Page', + 'profile_picture_uri': 'string', + 'timezone_id': 'unsigned int', + 'two_factor_type': 'string', + 'updated_by': 'Object', + 'updated_time': 'datetime', + 'user_access_expire_time': 'datetime', + 'verification_status': 'string', + 'vertical': 'string', + 'vertical_id': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['TwoFactorType'] = Business.TwoFactorType.__dict__.values() + 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['PagePermittedTasks'] = Business.PagePermittedTasks.__dict__.values() + field_enum_info['SubverticalV2'] = Business.SubverticalV2.__dict__.values() + field_enum_info['VerticalV2'] = Business.VerticalV2.__dict__.values() + field_enum_info['ActionSource'] = Business.ActionSource.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businessadaccountrequest.py b/tap_facebook/facebook_business/adobjects/businessadaccountrequest.py new file mode 100644 index 0000000..bf95511 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessadaccountrequest.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 BusinessAdAccountRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessAdAccountRequest = True + super(BusinessAdAccountRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account = 'ad_account' + id = 'id' + + _field_types = { + 'ad_account': 'AdAccount', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businessapplicationrequest.py b/tap_facebook/facebook_business/adobjects/businessapplicationrequest.py new file mode 100644 index 0000000..ffa916d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessapplicationrequest.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 BusinessApplicationRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessApplicationRequest = True + super(BusinessApplicationRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + application = 'application' + id = 'id' + + _field_types = { + 'application': 'Application', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businessassetgroup.py b/tap_facebook/facebook_business/adobjects/businessassetgroup.py new file mode 100644 index 0000000..c36a4a9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessassetgroup.py @@ -0,0 +1,1003 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 BusinessAssetGroup( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessAssetGroup = True + super(BusinessAssetGroup, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + owner_business = 'owner_business' + + class AdaccountTasks: + aa_analyze = 'AA_ANALYZE' + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + draft = 'DRAFT' + manage = 'MANAGE' + + class OfflineConversionDataSetTasks: + aa_analyze = 'AA_ANALYZE' + advertise = 'ADVERTISE' + manage = 'MANAGE' + upload = 'UPLOAD' + view = 'VIEW' + + class PageTasks: + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + cashier_role = 'CASHIER_ROLE' + create_content = 'CREATE_CONTENT' + manage = 'MANAGE' + manage_jobs = 'MANAGE_JOBS' + manage_leads = 'MANAGE_LEADS' + messaging = 'MESSAGING' + moderate = 'MODERATE' + moderate_community = 'MODERATE_COMMUNITY' + pages_messaging = 'PAGES_MESSAGING' + pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' + profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' + profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' + profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' + profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' + profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' + profile_plus_manage = 'PROFILE_PLUS_MANAGE' + profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' + profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' + profile_plus_moderate = 'PROFILE_PLUS_MODERATE' + profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' + profile_plus_revenue = 'PROFILE_PLUS_REVENUE' + read_page_mailboxes = 'READ_PAGE_MAILBOXES' + view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' + + class PixelTasks: + aa_analyze = 'AA_ANALYZE' + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + edit = 'EDIT' + upload = 'UPLOAD' + + 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=BusinessAssetGroup, + 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 = { + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessAssetGroup, + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'user': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/assigned_users', + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.assigneduser import AssignedUser + param_types = { + 'business': 'string', + } + 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() + + def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'adaccount_tasks': 'list', + 'offline_conversion_data_set_tasks': 'list', + 'page_tasks': 'list', + 'pixel_tasks': 'list', + 'user': 'int', + } + enums = { + 'adaccount_tasks_enum': BusinessAssetGroup.AdaccountTasks.__dict__.values(), + 'offline_conversion_data_set_tasks_enum': BusinessAssetGroup.OfflineConversionDataSetTasks.__dict__.values(), + 'page_tasks_enum': BusinessAssetGroup.PageTasks.__dict__.values(), + 'pixel_tasks_enum': BusinessAssetGroup.PixelTasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/assigned_users', + 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_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.') + param_types = { + 'asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/contained_adaccounts', + 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_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='/contained_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() + + def create_contained_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 = { + 'asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/contained_adaccounts', + 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_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.') + param_types = { + 'asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/contained_applications', + 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_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='/contained_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 create_contained_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.') + param_types = { + 'asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/contained_applications', + 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_custom_conversions', + 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customconversion import CustomConversion + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/contained_custom_conversions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversion, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomConversion, 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_custom_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_custom_conversions', + 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_instagram_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.') + param_types = { + 'asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/contained_instagram_accounts', + 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_instagram_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.instagramuser import InstagramUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/contained_instagram_accounts', + 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 create_contained_instagram_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 = { + 'asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/contained_instagram_accounts', + 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_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): + 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_pages', + 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_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.') + from facebook_business.adobjects.page import Page + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/contained_pages', + 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 create_contained_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.') + param_types = { + 'asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/contained_pages', + 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_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_pixels', + 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_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/contained_pixels', + 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_contained_pixel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_pixels', + 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_product_catalogs', + 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/contained_product_catalogs', + 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() + + def create_contained_product_catalog(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_product_catalogs', + 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() + + _field_types = { + 'id': 'string', + 'name': 'string', + 'owner_business': 'Business', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['AdaccountTasks'] = BusinessAssetGroup.AdaccountTasks.__dict__.values() + field_enum_info['OfflineConversionDataSetTasks'] = BusinessAssetGroup.OfflineConversionDataSetTasks.__dict__.values() + field_enum_info['PageTasks'] = BusinessAssetGroup.PageTasks.__dict__.values() + field_enum_info['PixelTasks'] = BusinessAssetGroup.PixelTasks.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businessassetsharingagreement.py b/tap_facebook/facebook_business/adobjects/businessassetsharingagreement.py new file mode 100644 index 0000000..6381f7f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessassetsharingagreement.py @@ -0,0 +1,121 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 BusinessAssetSharingAgreement( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessAssetSharingAgreement = True + super(BusinessAssetSharingAgreement, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + initiator = 'initiator' + recipient = 'recipient' + relationship_type = 'relationship_type' + request_status = 'request_status' + request_type = 'request_type' + + 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=BusinessAssetSharingAgreement, + 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 = { + 'request_response': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessAssetSharingAgreement, + 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', + 'initiator': 'Business', + 'recipient': 'Business', + 'relationship_type': 'list', + 'request_status': 'string', + 'request_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['RequestStatus'] = BusinessAssetSharingAgreement.RequestStatus.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businesscreativefolder.py b/tap_facebook/facebook_business/adobjects/businesscreativefolder.py new file mode 100644 index 0000000..d17d76c --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/businessimage.py b/tap_facebook/facebook_business/adobjects/businessimage.py new file mode 100644 index 0000000..6885113 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessimage.py @@ -0,0 +1,132 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 BusinessImage( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessImage = True + super(BusinessImage, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + creation_time = 'creation_time' + hash = 'hash' + height = 'height' + id = 'id' + media_library_url = 'media_library_url' + name = 'name' + 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 + if batch 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=BusinessImage, + 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', + 'hash': 'string', + 'height': 'int', + 'id': 'string', + 'media_library_url': 'string', + 'name': 'string', + '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/tap_facebook/facebook_business/adobjects/businessmanagedpartnereligibility.py b/tap_facebook/facebook_business/adobjects/businessmanagedpartnereligibility.py new file mode 100644 index 0000000..f51971c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessmanagedpartnereligibility.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 BusinessManagedPartnerEligibility( + AbstractObject, +): + + def __init__(self, api=None): + super(BusinessManagedPartnerEligibility, self).__init__() + self._isBusinessManagedPartnerEligibility = True + self._api = api + + class Field(AbstractObject.Field): + is_eligible = 'is_eligible' + reason_code = 'reason_code' + reason_description = 'reason_description' + + _field_types = { + 'is_eligible': 'bool', + 'reason_code': 'string', + 'reason_description': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py b/tap_facebook/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py new file mode 100644 index 0000000..bd7b22f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessownedobjectonbehalfofrequest.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 BusinessOwnedObjectOnBehalfOfRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessOwnedObjectOnBehalfOfRequest = True + super(BusinessOwnedObjectOnBehalfOfRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business_owned_object = 'business_owned_object' + id = 'id' + receiving_business = 'receiving_business' + requesting_business = 'requesting_business' + status = 'status' + + class Status: + 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=BusinessOwnedObjectOnBehalfOfRequest, + 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_owned_object': 'string', + 'id': 'string', + 'receiving_business': 'Business', + 'requesting_business': 'Business', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = BusinessOwnedObjectOnBehalfOfRequest.Status.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businesspagerequest.py b/tap_facebook/facebook_business/adobjects/businesspagerequest.py new file mode 100644 index 0000000..4d87741 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businesspagerequest.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 BusinessPageRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessPageRequest = True + super(BusinessPageRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + page = 'page' + + _field_types = { + 'id': 'string', + 'page': 'Page', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businesspartnerpremiumoptions.py b/tap_facebook/facebook_business/adobjects/businesspartnerpremiumoptions.py new file mode 100644 index 0000000..f64ff8e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businesspartnerpremiumoptions.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 BusinessPartnerPremiumOptions( + AbstractObject, +): + + def __init__(self, api=None): + super(BusinessPartnerPremiumOptions, self).__init__() + self._isBusinessPartnerPremiumOptions = True + self._api = api + + class Field(AbstractObject.Field): + enable_basket_insight = 'enable_basket_insight' + enable_extended_audience_retargeting = 'enable_extended_audience_retargeting' + retailer_custom_audience_config = 'retailer_custom_audience_config' + + _field_types = { + 'enable_basket_insight': 'bool', + 'enable_extended_audience_retargeting': 'bool', + 'retailer_custom_audience_config': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businessrolerequest.py b/tap_facebook/facebook_business/adobjects/businessrolerequest.py new file mode 100644 index 0000000..249111f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessrolerequest.py @@ -0,0 +1,176 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 BusinessRoleRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessRoleRequest = True + super(BusinessRoleRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + created_by = 'created_by' + created_time = 'created_time' + email = 'email' + expiration_time = 'expiration_time' + expiry_time = 'expiry_time' + finance_role = 'finance_role' + id = 'id' + invite_link = 'invite_link' + ip_role = 'ip_role' + owner = 'owner' + role = 'role' + status = 'status' + updated_by = 'updated_by' + updated_time = 'updated_time' + + class Role: + admin = 'ADMIN' + ads_rights_reviewer = 'ADS_RIGHTS_REVIEWER' + value_default = 'DEFAULT' + developer = 'DEVELOPER' + employee = 'EMPLOYEE' + finance_analyst = 'FINANCE_ANALYST' + finance_edit = 'FINANCE_EDIT' + finance_editor = 'FINANCE_EDITOR' + finance_view = 'FINANCE_VIEW' + manage = 'MANAGE' + partner_center_admin = 'PARTNER_CENTER_ADMIN' + partner_center_analyst = 'PARTNER_CENTER_ANALYST' + partner_center_education = 'PARTNER_CENTER_EDUCATION' + partner_center_marketing = 'PARTNER_CENTER_MARKETING' + partner_center_operations = 'PARTNER_CENTER_OPERATIONS' + + 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=BusinessRoleRequest, + 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 = { + 'role': 'role_enum', + } + enums = { + 'role_enum': BusinessRoleRequest.Role.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessRoleRequest, + 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_by': 'Object', + 'created_time': 'datetime', + 'email': 'string', + 'expiration_time': 'datetime', + 'expiry_time': 'datetime', + 'finance_role': 'string', + 'id': 'string', + 'invite_link': 'string', + 'ip_role': 'string', + 'owner': 'Business', + 'role': 'string', + 'status': 'string', + 'updated_by': 'Object', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Role'] = BusinessRoleRequest.Role.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businessuser.py b/tap_facebook/facebook_business/adobjects/businessuser.py new file mode 100644 index 0000000..fd302ec --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/businessuser.py @@ -0,0 +1,319 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 BusinessUser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessUser = True + super(BusinessUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + business_role_request = 'business_role_request' + email = 'email' + finance_permission = 'finance_permission' + first_name = 'first_name' + id = 'id' + ip_permission = 'ip_permission' + last_name = 'last_name' + marked_for_removal = 'marked_for_removal' + name = 'name' + pending_email = 'pending_email' + role = 'role' + title = 'title' + two_fac_status = 'two_fac_status' + + class Role: + admin = 'ADMIN' + ads_rights_reviewer = 'ADS_RIGHTS_REVIEWER' + value_default = 'DEFAULT' + developer = 'DEVELOPER' + employee = 'EMPLOYEE' + finance_analyst = 'FINANCE_ANALYST' + finance_edit = 'FINANCE_EDIT' + finance_editor = 'FINANCE_EDITOR' + finance_view = 'FINANCE_VIEW' + manage = 'MANAGE' + partner_center_admin = 'PARTNER_CENTER_ADMIN' + partner_center_analyst = 'PARTNER_CENTER_ANALYST' + partner_center_education = 'PARTNER_CENTER_EDUCATION' + partner_center_marketing = 'PARTNER_CENTER_MARKETING' + partner_center_operations = 'PARTNER_CENTER_OPERATIONS' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'business_users' + + # @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_business_user(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 + if batch 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=BusinessUser, + 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 = { + 'clear_pending_email': 'bool', + 'email': 'string', + 'first_name': 'string', + 'last_name': 'string', + 'pending_email': 'string', + 'role': 'role_enum', + 'skip_verification_email': 'bool', + 'title': 'string', + } + enums = { + 'role_enum': BusinessUser.Role.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessUser, + 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_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='/assigned_ad_accounts', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessassetgroup import BusinessAssetGroup + param_types = { + 'contained_asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_business_asset_groups', + 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 get_assigned_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.') + from facebook_business.adobjects.page import Page + param_types = { + 'pages': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_pages', + 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_assigned_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_product_catalogs', + 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 = { + 'business': 'Business', + 'business_role_request': 'BusinessRoleRequest', + 'email': 'string', + 'finance_permission': 'string', + 'first_name': 'string', + 'id': 'string', + 'ip_permission': 'string', + 'last_name': 'string', + 'marked_for_removal': 'bool', + 'name': 'string', + 'pending_email': 'string', + 'role': 'string', + 'title': 'string', + 'two_fac_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Role'] = BusinessUser.Role.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/businessvideo.py b/tap_facebook/facebook_business/adobjects/businessvideo.py new file mode 100644 index 0000000..29c4c37 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/campaign.py b/tap_facebook/facebook_business/adobjects/campaign.py new file mode 100644 index 0000000..ca56877 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/campaign.py @@ -0,0 +1,1058 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.mixins import HasAdLabels +from facebook_business.mixins import CanValidate + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class Campaign( + AbstractCrudObject, + HasAdLabels, + CanValidate, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCampaign = True + super(Campaign, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + adlabels = 'adlabels' + bid_strategy = 'bid_strategy' + boosted_object_id = 'boosted_object_id' + brand_lift_studies = 'brand_lift_studies' + 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' + created_time = 'created_time' + daily_budget = 'daily_budget' + 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' + lifetime_budget = 'lifetime_budget' + name = 'name' + objective = 'objective' + pacing_type = 'pacing_type' + primary_attribution = 'primary_attribution' + promoted_object = 'promoted_object' + recommendations = 'recommendations' + smart_promotion_type = 'smart_promotion_type' + source_campaign = 'source_campaign' + source_campaign_id = 'source_campaign_id' + special_ad_categories = 'special_ad_categories' + special_ad_category = 'special_ad_category' + special_ad_category_country = 'special_ad_category_country' + spend_cap = 'spend_cap' + start_time = 'start_time' + status = 'status' + stop_time = 'stop_time' + topline_id = 'topline_id' + updated_time = 'updated_time' + adbatch = 'adbatch' + execution_options = 'execution_options' + iterative_split_test_configs = 'iterative_split_test_configs' + + 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' + archived = 'ARCHIVED' + deleted = 'DELETED' + paused = 'PAUSED' + + class EffectiveStatus: + active = 'ACTIVE' + archived = 'ARCHIVED' + deleted = 'DELETED' + in_process = 'IN_PROCESS' + paused = 'PAUSED' + with_issues = 'WITH_ISSUES' + + class Status: + active = 'ACTIVE' + archived = 'ARCHIVED' + deleted = 'DELETED' + 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' + + class ExecutionOptions: + include_recommendations = 'include_recommendations' + validate_only = 'validate_only' + + class Objective: + app_installs = 'APP_INSTALLS' + brand_awareness = 'BRAND_AWARENESS' + conversions = 'CONVERSIONS' + 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' + + class SmartPromotionType: + guided_creation = 'GUIDED_CREATION' + smart_app_promotion = 'SMART_APP_PROMOTION' + + class SpecialAdCategories: + credit = 'CREDIT' + employment = 'EMPLOYMENT' + housing = 'HOUSING' + issues_elections_politics = 'ISSUES_ELECTIONS_POLITICS' + none = 'NONE' + online_gambling_and_gaming = 'ONLINE_GAMBLING_AND_GAMING' + + class SpecialAdCategoryCountry: + ad = 'AD' + ae = 'AE' + af = 'AF' + ag = 'AG' + ai = 'AI' + al = 'AL' + am = 'AM' + an = 'AN' + ao = 'AO' + aq = 'AQ' + ar = 'AR' + value_as = 'AS' + at = 'AT' + au = 'AU' + aw = 'AW' + ax = 'AX' + az = 'AZ' + ba = 'BA' + bb = 'BB' + bd = 'BD' + be = 'BE' + bf = 'BF' + bg = 'BG' + bh = 'BH' + bi = 'BI' + bj = 'BJ' + bl = 'BL' + bm = 'BM' + bn = 'BN' + bo = 'BO' + bq = 'BQ' + br = 'BR' + bs = 'BS' + bt = 'BT' + bv = 'BV' + bw = 'BW' + by = 'BY' + bz = 'BZ' + ca = 'CA' + cc = 'CC' + cd = 'CD' + cf = 'CF' + cg = 'CG' + ch = 'CH' + ci = 'CI' + ck = 'CK' + cl = 'CL' + cm = 'CM' + cn = 'CN' + co = 'CO' + cr = 'CR' + cu = 'CU' + cv = 'CV' + cw = 'CW' + cx = 'CX' + cy = 'CY' + cz = 'CZ' + de = 'DE' + dj = 'DJ' + dk = 'DK' + dm = 'DM' + do = 'DO' + dz = 'DZ' + ec = 'EC' + ee = 'EE' + eg = 'EG' + eh = 'EH' + er = 'ER' + es = 'ES' + et = 'ET' + fi = 'FI' + fj = 'FJ' + fk = 'FK' + fm = 'FM' + fo = 'FO' + fr = 'FR' + ga = 'GA' + gb = 'GB' + gd = 'GD' + ge = 'GE' + gf = 'GF' + gg = 'GG' + gh = 'GH' + gi = 'GI' + gl = 'GL' + gm = 'GM' + gn = 'GN' + gp = 'GP' + gq = 'GQ' + gr = 'GR' + gs = 'GS' + gt = 'GT' + gu = 'GU' + gw = 'GW' + gy = 'GY' + hk = 'HK' + hm = 'HM' + hn = 'HN' + hr = 'HR' + ht = 'HT' + hu = 'HU' + id = 'ID' + ie = 'IE' + il = 'IL' + im = 'IM' + value_in = 'IN' + io = 'IO' + iq = 'IQ' + ir = 'IR' + value_is = 'IS' + it = 'IT' + je = 'JE' + jm = 'JM' + jo = 'JO' + jp = 'JP' + ke = 'KE' + kg = 'KG' + kh = 'KH' + ki = 'KI' + km = 'KM' + kn = 'KN' + kp = 'KP' + kr = 'KR' + kw = 'KW' + ky = 'KY' + kz = 'KZ' + la = 'LA' + lb = 'LB' + lc = 'LC' + li = 'LI' + lk = 'LK' + lr = 'LR' + ls = 'LS' + lt = 'LT' + lu = 'LU' + lv = 'LV' + ly = 'LY' + ma = 'MA' + mc = 'MC' + md = 'MD' + me = 'ME' + mf = 'MF' + mg = 'MG' + mh = 'MH' + mk = 'MK' + ml = 'ML' + mm = 'MM' + mn = 'MN' + mo = 'MO' + mp = 'MP' + mq = 'MQ' + mr = 'MR' + ms = 'MS' + mt = 'MT' + mu = 'MU' + mv = 'MV' + mw = 'MW' + mx = 'MX' + my = 'MY' + mz = 'MZ' + na = 'NA' + nc = 'NC' + ne = 'NE' + nf = 'NF' + ng = 'NG' + ni = 'NI' + nl = 'NL' + no = 'NO' + np = 'NP' + nr = 'NR' + nu = 'NU' + nz = 'NZ' + om = 'OM' + pa = 'PA' + pe = 'PE' + pf = 'PF' + pg = 'PG' + ph = 'PH' + pk = 'PK' + pl = 'PL' + pm = 'PM' + pn = 'PN' + pr = 'PR' + ps = 'PS' + pt = 'PT' + pw = 'PW' + py = 'PY' + qa = 'QA' + re = 'RE' + ro = 'RO' + rs = 'RS' + ru = 'RU' + rw = 'RW' + sa = 'SA' + sb = 'SB' + sc = 'SC' + sd = 'SD' + se = 'SE' + sg = 'SG' + sh = 'SH' + si = 'SI' + sj = 'SJ' + sk = 'SK' + sl = 'SL' + sm = 'SM' + sn = 'SN' + so = 'SO' + sr = 'SR' + ss = 'SS' + st = 'ST' + sv = 'SV' + sx = 'SX' + sy = 'SY' + sz = 'SZ' + tc = 'TC' + td = 'TD' + tf = 'TF' + tg = 'TG' + th = 'TH' + tj = 'TJ' + tk = 'TK' + tl = 'TL' + tm = 'TM' + tn = 'TN' + to = 'TO' + tr = 'TR' + tt = 'TT' + tv = 'TV' + tw = 'TW' + tz = 'TZ' + ua = 'UA' + ug = 'UG' + um = 'UM' + us = 'US' + uy = 'UY' + uz = 'UZ' + va = 'VA' + vc = 'VC' + ve = 'VE' + vg = 'VG' + vi = 'VI' + vn = 'VN' + vu = 'VU' + wf = 'WF' + ws = 'WS' + xk = 'XK' + ye = 'YE' + yt = 'YT' + za = 'ZA' + zm = 'ZM' + zw = 'ZW' + + class Operator: + all = 'ALL' + any = 'ANY' + + class SpecialAdCategory: + credit = 'CREDIT' + employment = 'EMPLOYMENT' + housing = 'HOUSING' + issues_elections_politics = 'ISSUES_ELECTIONS_POLITICS' + none = 'NONE' + online_gambling_and_gaming = 'ONLINE_GAMBLING_AND_GAMING' + + class StatusOption: + active = 'ACTIVE' + inherited_from_source = 'INHERITED_FROM_SOURCE' + paused = 'PAUSED' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'campaigns' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_campaign(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 + if batch 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 = { + 'am_call_tags': 'map', + 'date_preset': 'date_preset_enum', + 'from_adtable': 'bool', + 'time_range': 'map', + } + enums = { + 'date_preset_enum': [ + 'data_maximum', + 'last_14d', + 'last_28d', + 'last_30d', + 'last_3d', + 'last_7d', + 'last_90d', + 'last_month', + 'last_quarter', + 'last_week_mon_sun', + 'last_week_sun_sat', + 'last_year', + 'maximum', + 'this_month', + 'this_quarter', + 'this_week_mon_today', + 'this_week_sun_today', + 'this_year', + 'today', + 'yesterday', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + 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 = { + 'adlabels': 'list', + 'adset_bid_amounts': 'map', + 'adset_budgets': 'list', + 'bid_strategy': 'bid_strategy_enum', + 'budget_rebalance_flag': 'bool', + 'daily_budget': 'unsigned int', + 'execution_options': 'list', + 'is_skadnetwork_attribution': 'bool', + 'iterative_split_test_configs': 'list', + 'lifetime_budget': 'unsigned int', + 'name': 'string', + 'objective': 'objective_enum', + 'pacing_type': 'list', + 'promoted_object': 'Object', + 'smart_promotion_type': 'smart_promotion_type_enum', + 'special_ad_categories': 'list', + 'special_ad_category': 'special_ad_category_enum', + 'special_ad_category_country': 'list', + 'spend_cap': 'unsigned int', + 'start_time': 'datetime', + 'status': 'status_enum', + 'stop_time': 'datetime', + } + enums = { + 'bid_strategy_enum': Campaign.BidStrategy.__dict__.values(), + 'execution_options_enum': Campaign.ExecutionOptions.__dict__.values(), + 'objective_enum': Campaign.Objective.__dict__.values(), + 'smart_promotion_type_enum': Campaign.SmartPromotionType.__dict__.values(), + 'special_ad_categories_enum': Campaign.SpecialAdCategories.__dict__.values(), + 'special_ad_category_enum': Campaign.SpecialAdCategory.__dict__.values(), + 'special_ad_category_country_enum': Campaign.SpecialAdCategoryCountry.__dict__.values(), + 'status_enum': Campaign.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + 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_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudy import AdStudy + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ad_studies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'adlabels': 'list', + 'execution_options': 'list', + } + enums = { + 'execution_options_enum': Campaign.ExecutionOptions.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adlabels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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_ad_rules_governed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adrule import AdRule + param_types = { + 'pass_evaluation': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adrules_governed', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdRule, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.ad import Ad + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'time_range': 'map', + 'updated_since': 'int', + } + enums = { + 'date_preset_enum': Ad.DatePreset.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_ad_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.adset import AdSet + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'is_completed': 'bool', + 'time_range': 'map', + } + enums = { + 'date_preset_enum': AdSet.DatePreset.__dict__.values(), + 'effective_status_enum': AdSet.EffectiveStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adsets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdSet, 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'date_preset': 'date_preset_enum', + 'effective_status': 'list', + 'is_completed': 'bool', + 'time_range': 'map', + } + enums = { + 'date_preset_enum': Campaign.DatePreset.__dict__.values(), + 'effective_status_enum': Campaign.EffectiveStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/copies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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_copy(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'deep_copy': 'bool', + 'end_time': 'datetime', + 'rename_options': 'Object', + 'start_time': 'datetime', + 'status_option': 'status_option_enum', + } + enums = { + 'status_option_enum': Campaign.StatusOption.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/copies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Campaign, + api_type='EDGE', + response_parser=ObjectParser(target_class=Campaign, 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_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.adsinsights import AdsInsights + if is_async: + return self.get_insights_async(fields, params, batch, success, failure, pending) + param_types = { + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'action_report_time_enum', + 'breakdowns': 'list', + 'date_preset': 'date_preset_enum', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'level_enum', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + enums = { + 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), + 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), + 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), + 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), + 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), + 'level_enum': AdsInsights.Level.__dict__.values(), + 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsInsights, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsInsights, 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() + + def get_insights_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adreportrun import AdReportRun + from facebook_business.adobjects.adsinsights import AdsInsights + param_types = { + 'action_attribution_windows': 'list', + 'action_breakdowns': 'list', + 'action_report_time': 'action_report_time_enum', + 'breakdowns': 'list', + 'date_preset': 'date_preset_enum', + 'default_summary': 'bool', + 'export_columns': 'list', + 'export_format': 'string', + 'export_name': 'string', + 'fields': 'list', + 'filtering': 'list', + 'level': 'level_enum', + 'product_id_limit': 'int', + 'sort': 'list', + 'summary': 'list', + 'summary_action_breakdowns': 'list', + 'time_increment': 'string', + 'time_range': 'map', + 'time_ranges': 'list', + 'use_account_attribution_setting': 'bool', + 'use_unified_attribution_setting': 'bool', + } + enums = { + 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), + 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), + 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), + 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), + 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), + 'level_enum': AdsInsights.Level.__dict__.values(), + 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), + } + + if fields is not None: + params['fields'] = params.get('fields') if params.get('fields') is not None else list() + params['fields'].extend(field for field in fields if field not in params['fields']) + + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdReportRun, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdReportRun, api=self._api), + include_summary=False, + ) + request.add_params(params) + + if batch is 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', + 'adlabels': 'list', + 'bid_strategy': 'BidStrategy', + 'boosted_object_id': 'string', + 'brand_lift_studies': 'list', + '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', + 'created_time': 'datetime', + 'daily_budget': 'string', + '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', + 'lifetime_budget': 'string', + 'name': 'string', + 'objective': 'string', + 'pacing_type': 'list', + 'primary_attribution': 'string', + 'promoted_object': 'AdPromotedObject', + 'recommendations': 'list', + 'smart_promotion_type': 'string', + 'source_campaign': 'Campaign', + 'source_campaign_id': 'string', + 'special_ad_categories': 'list', + 'special_ad_category': 'string', + 'special_ad_category_country': 'list', + 'spend_cap': 'string', + 'start_time': 'datetime', + 'status': 'Status', + 'stop_time': 'datetime', + 'topline_id': 'string', + 'updated_time': 'datetime', + 'adbatch': 'list', + 'execution_options': 'list', + 'iterative_split_test_configs': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BidStrategy'] = Campaign.BidStrategy.__dict__.values() + field_enum_info['ConfiguredStatus'] = Campaign.ConfiguredStatus.__dict__.values() + field_enum_info['EffectiveStatus'] = Campaign.EffectiveStatus.__dict__.values() + field_enum_info['Status'] = Campaign.Status.__dict__.values() + field_enum_info['DatePreset'] = Campaign.DatePreset.__dict__.values() + field_enum_info['ExecutionOptions'] = Campaign.ExecutionOptions.__dict__.values() + field_enum_info['Objective'] = Campaign.Objective.__dict__.values() + field_enum_info['SmartPromotionType'] = Campaign.SmartPromotionType.__dict__.values() + field_enum_info['SpecialAdCategories'] = Campaign.SpecialAdCategories.__dict__.values() + field_enum_info['SpecialAdCategoryCountry'] = Campaign.SpecialAdCategoryCountry.__dict__.values() + field_enum_info['Operator'] = Campaign.Operator.__dict__.values() + field_enum_info['SpecialAdCategory'] = Campaign.SpecialAdCategory.__dict__.values() + field_enum_info['StatusOption'] = Campaign.StatusOption.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/campaigngroupbrandconfiguration.py b/tap_facebook/facebook_business/adobjects/campaigngroupbrandconfiguration.py new file mode 100644 index 0000000..1222b37 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/campaigngroupbrandconfiguration.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 CampaignGroupBrandConfiguration( + AbstractObject, +): + + def __init__(self, api=None): + super(CampaignGroupBrandConfiguration, self).__init__() + self._isCampaignGroupBrandConfiguration = True + self._api = api + + class Field(AbstractObject.Field): + brand_product_name = 'brand_product_name' + locale = 'locale' + vertical = 'vertical' + + _field_types = { + 'brand_product_name': 'string', + 'locale': 'string', + 'vertical': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py b/tap_facebook/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py new file mode 100644 index 0000000..5810147 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.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 CampaignGroupCollaborativeAdsPartnerInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(CampaignGroupCollaborativeAdsPartnerInfo, self).__init__() + self._isCampaignGroupCollaborativeAdsPartnerInfo = 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/tap_facebook/facebook_business/adobjects/canvas.py b/tap_facebook/facebook_business/adobjects/canvas.py new file mode 100644 index 0000000..041456f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/canvas.py @@ -0,0 +1,222 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Canvas( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCanvas = True + super(Canvas, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + background_color = 'background_color' + body_elements = 'body_elements' + business_id = 'business_id' + canvas_link = 'canvas_link' + collection_hero_image = 'collection_hero_image' + collection_hero_video = 'collection_hero_video' + collection_thumbnails = 'collection_thumbnails' + dynamic_setting = 'dynamic_setting' + element_payload = 'element_payload' + elements = 'elements' + fb_body_elements = 'fb_body_elements' + id = 'id' + is_hidden = 'is_hidden' + is_published = 'is_published' + last_editor = 'last_editor' + linked_documents = 'linked_documents' + name = 'name' + owner = 'owner' + property_list = 'property_list' + source_template = 'source_template' + store_url = 'store_url' + style_list = 'style_list' + tags = 'tags' + ui_property_list = 'ui_property_list' + unused_body_elements = 'unused_body_elements' + update_time = 'update_time' + use_retailer_item_ids = 'use_retailer_item_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=Canvas, + 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 = { + 'background_color': 'string', + 'body_element_ids': 'list', + 'enable_swipe_to_open': 'bool', + 'is_hidden': 'bool', + 'is_published': 'bool', + 'name': 'string', + 'source_template_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Canvas, + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.textwithentities import TextWithEntities + param_types = { + 'user_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/previews', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=TextWithEntities, + api_type='EDGE', + response_parser=ObjectParser(target_class=TextWithEntities, 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 = { + 'background_color': 'string', + 'body_elements': 'list', + 'business_id': 'string', + 'canvas_link': 'string', + 'collection_hero_image': 'Photo', + 'collection_hero_video': 'AdVideo', + 'collection_thumbnails': 'list', + 'dynamic_setting': 'CanvasDynamicSetting', + 'element_payload': 'string', + 'elements': 'list', + 'fb_body_elements': 'list', + 'id': 'string', + 'is_hidden': 'bool', + 'is_published': 'bool', + 'last_editor': 'User', + 'linked_documents': 'list', + 'name': 'string', + 'owner': 'Page', + 'property_list': 'list', + 'source_template': 'Object', + 'store_url': 'string', + 'style_list': 'list', + 'tags': 'list', + 'ui_property_list': 'list', + 'unused_body_elements': 'list', + 'update_time': 'int', + 'use_retailer_item_ids': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/canvasadsettings.py b/tap_facebook/facebook_business/adobjects/canvasadsettings.py new file mode 100644 index 0000000..75ad368 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/canvasadsettings.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 CanvasAdSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(CanvasAdSettings, self).__init__() + self._isCanvasAdSettings = True + self._api = api + + class Field(AbstractObject.Field): + is_canvas_collection_eligible = 'is_canvas_collection_eligible' + lead_form_created_time = 'lead_form_created_time' + lead_form_name = 'lead_form_name' + lead_gen_form_id = 'lead_gen_form_id' + leads_count = 'leads_count' + product_set_id = 'product_set_id' + use_retailer_item_ids = 'use_retailer_item_ids' + + _field_types = { + 'is_canvas_collection_eligible': 'bool', + 'lead_form_created_time': 'unsigned int', + 'lead_form_name': 'string', + 'lead_gen_form_id': 'string', + 'leads_count': 'int', + 'product_set_id': 'string', + 'use_retailer_item_ids': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/canvasbodyelement.py b/tap_facebook/facebook_business/adobjects/canvasbodyelement.py new file mode 100644 index 0000000..66c1466 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/canvasbodyelement.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 CanvasBodyElement( + AbstractObject, +): + + def __init__(self, api=None): + super(CanvasBodyElement, self).__init__() + self._isCanvasBodyElement = True + self._api = api + + class Field(AbstractObject.Field): + element = 'element' + + _field_types = { + 'element': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/canvascollectionthumbnail.py b/tap_facebook/facebook_business/adobjects/canvascollectionthumbnail.py new file mode 100644 index 0000000..25b6be7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/canvascollectionthumbnail.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 CanvasCollectionThumbnail( + AbstractObject, +): + + def __init__(self, api=None): + super(CanvasCollectionThumbnail, self).__init__() + self._isCanvasCollectionThumbnail = True + self._api = api + + class Field(AbstractObject.Field): + element_child_index = 'element_child_index' + element_id = 'element_id' + photo = 'photo' + + _field_types = { + 'element_child_index': 'int', + 'element_id': 'string', + 'photo': 'Photo', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/canvasdynamicsetting.py b/tap_facebook/facebook_business/adobjects/canvasdynamicsetting.py new file mode 100644 index 0000000..791b9d6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/canvasdynamicsetting.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 CanvasDynamicSetting( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCanvasDynamicSetting = True + super(CanvasDynamicSetting, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + child_documents = 'child_documents' + product_set_id = 'product_set_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=CanvasDynamicSetting, + 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 = { + 'child_documents': 'list', + 'product_set_id': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/canvaspreview.py b/tap_facebook/facebook_business/adobjects/canvaspreview.py new file mode 100644 index 0000000..2ddfe45 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/catalogbasedtargeting.py b/tap_facebook/facebook_business/adobjects/catalogbasedtargeting.py new file mode 100644 index 0000000..043f710 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/catalogbasedtargeting.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 CatalogBasedTargeting( + AbstractObject, +): + + def __init__(self, api=None): + super(CatalogBasedTargeting, self).__init__() + self._isCatalogBasedTargeting = True + self._api = api + + class Field(AbstractObject.Field): + geo_targeting_type = 'geo_targeting_type' + + _field_types = { + 'geo_targeting_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/catalogitemappealstatus.py b/tap_facebook/facebook_business/adobjects/catalogitemappealstatus.py new file mode 100644 index 0000000..6f67a42 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/catalogitemappealstatus.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 CatalogItemAppealStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(CatalogItemAppealStatus, self).__init__() + self._isCatalogItemAppealStatus = True + self._api = api + + class Field(AbstractObject.Field): + handle = 'handle' + item_id = 'item_id' + status = 'status' + use_cases = 'use_cases' + + 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' + 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 = { + 'handle': 'string', + 'item_id': 'int', + 'status': 'Status', + 'use_cases': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = CatalogItemAppealStatus.Status.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/catalogitemapplinks.py b/tap_facebook/facebook_business/adobjects/catalogitemapplinks.py new file mode 100644 index 0000000..8be06f4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/catalogitemapplinks.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 CatalogItemAppLinks( + AbstractObject, +): + + def __init__(self, api=None): + super(CatalogItemAppLinks, self).__init__() + self._isCatalogItemAppLinks = True + self._api = api + + class Field(AbstractObject.Field): + android = 'android' + ios = 'ios' + ipad = 'ipad' + iphone = 'iphone' + web = 'web' + windows = 'windows' + windows_phone = 'windows_phone' + windows_universal = 'windows_universal' + + _field_types = { + 'android': 'list', + '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/tap_facebook/facebook_business/adobjects/catalogitemchannelstointegritystatus.py b/tap_facebook/facebook_business/adobjects/catalogitemchannelstointegritystatus.py new file mode 100644 index 0000000..4f436ad --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/catalogitemchannelstointegritystatus.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 CatalogItemChannelsToIntegrityStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(CatalogItemChannelsToIntegrityStatus, self).__init__() + self._isCatalogItemChannelsToIntegrityStatus = True + self._api = api + + class Field(AbstractObject.Field): + channels = 'channels' + rejection_information = 'rejection_information' + + _field_types = { + 'channels': 'list', + 'rejection_information': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py b/tap_facebook/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py new file mode 100644 index 0000000..afdc083 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/catalogsegmentallmatchcountlaser.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 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/tap_facebook/facebook_business/adobjects/catalogsubverticallist.py b/tap_facebook/facebook_business/adobjects/catalogsubverticallist.py new file mode 100644 index 0000000..04b78ac --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/catalogsubverticallist.py @@ -0,0 +1,141 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class CatalogSubVerticalList( + AbstractObject, +): + + def __init__(self, api=None): + super(CatalogSubVerticalList, self).__init__() + self._isCatalogSubVerticalList = True + self._api = api + + class Field(AbstractObject.Field): + appliances = 'appliances' + baby_feeding = 'baby_feeding' + baby_transport = 'baby_transport' + beauty = 'beauty' + bedding = 'bedding' + cameras = 'cameras' + cameras_and_photos = 'cameras_and_photos' + cell_phones_and_smart_watches = 'cell_phones_and_smart_watches' + cleaning_supplies = 'cleaning_supplies' + clo_offer = 'clo_offer' + clothing = 'clothing' + clothing_accessories = 'clothing_accessories' + computer_components = 'computer_components' + computers_and_tablets = 'computers_and_tablets' + computers_laptops_and_tablets = 'computers_laptops_and_tablets' + diapering_and_potty_training = 'diapering_and_potty_training' + digital_product_offer = 'digital_product_offer' + electronic_accessories_and_cables = 'electronic_accessories_and_cables' + electronics_accessories = 'electronics_accessories' + furniture = 'furniture' + health = 'health' + home = 'home' + home_goods = 'home_goods' + household_and_cleaning_supplies = 'household_and_cleaning_supplies' + jewelry = 'jewelry' + large_appliances = 'large_appliances' + local_service_business_item = 'local_service_business_item' + local_service_business_restaurant = 'local_service_business_restaurant' + loyalty_offer = 'loyalty_offer' + nursery = 'nursery' + printers_and_scanners = 'printers_and_scanners' + printers_scanners_and_fax_machines = 'printers_scanners_and_fax_machines' + product_discount = 'product_discount' + projectors = 'projectors' + shoes = 'shoes' + shoes_and_footwear = 'shoes_and_footwear' + software = 'software' + televisions_and_monitors = 'televisions_and_monitors' + test_child_sub_vertical = 'test_child_sub_vertical' + test_grand_child_sub_vertical = 'test_grand_child_sub_vertical' + test_sub_vertical = 'test_sub_vertical' + test_sub_vertical_alias = 'test_sub_vertical_alias' + test_sub_vertical_data_object = 'test_sub_vertical_data_object' + third_party_electronics = 'third_party_electronics' + third_party_toys_and_games = 'third_party_toys_and_games' + toys = 'toys' + toys_and_games = 'toys_and_games' + tvs_and_monitors = 'tvs_and_monitors' + vehicle_manufacturer = 'vehicle_manufacturer' + video_game_consoles_and_video_games = 'video_game_consoles_and_video_games' + video_games_and_consoles = 'video_games_and_consoles' + video_projectors = 'video_projectors' + watches = 'watches' + + _field_types = { + 'appliances': 'Object', + 'baby_feeding': 'Object', + 'baby_transport': 'Object', + 'beauty': 'Object', + 'bedding': 'Object', + 'cameras': 'Object', + 'cameras_and_photos': 'Object', + 'cell_phones_and_smart_watches': 'Object', + 'cleaning_supplies': 'Object', + 'clo_offer': 'Object', + 'clothing': 'Object', + 'clothing_accessories': 'Object', + 'computer_components': 'Object', + 'computers_and_tablets': 'Object', + 'computers_laptops_and_tablets': 'Object', + 'diapering_and_potty_training': 'Object', + 'digital_product_offer': 'Object', + 'electronic_accessories_and_cables': 'Object', + 'electronics_accessories': 'Object', + 'furniture': 'Object', + 'health': 'Object', + 'home': 'Object', + 'home_goods': 'Object', + 'household_and_cleaning_supplies': 'Object', + 'jewelry': 'Object', + 'large_appliances': 'Object', + 'local_service_business_item': 'Object', + 'local_service_business_restaurant': 'Object', + 'loyalty_offer': 'Object', + 'nursery': 'Object', + 'printers_and_scanners': 'Object', + 'printers_scanners_and_fax_machines': 'Object', + 'product_discount': 'Object', + 'projectors': 'Object', + 'shoes': 'Object', + 'shoes_and_footwear': 'Object', + 'software': 'Object', + 'televisions_and_monitors': 'Object', + 'test_child_sub_vertical': 'Object', + 'test_grand_child_sub_vertical': 'Object', + 'test_sub_vertical': 'Object', + 'test_sub_vertical_alias': 'Object', + 'test_sub_vertical_data_object': 'Object', + 'third_party_electronics': 'Object', + 'third_party_toys_and_games': 'Object', + 'toys': 'Object', + 'toys_and_games': 'Object', + 'tvs_and_monitors': 'Object', + 'vehicle_manufacturer': 'Object', + 'video_game_consoles_and_video_games': 'Object', + 'video_games_and_consoles': 'Object', + 'video_projectors': 'Object', + 'watches': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/chatplugin.py b/tap_facebook/facebook_business/adobjects/chatplugin.py new file mode 100644 index 0000000..dc28f74 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/chatplugin.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 ChatPlugin( + AbstractObject, +): + + def __init__(self, api=None): + super(ChatPlugin, self).__init__() + self._isChatPlugin = True + self._api = api + + class Field(AbstractObject.Field): + alignment = 'alignment' + desktop_bottom_spacing = 'desktop_bottom_spacing' + desktop_side_spacing = 'desktop_side_spacing' + entry_point_icon = 'entry_point_icon' + entry_point_label = 'entry_point_label' + greeting_dialog_display = 'greeting_dialog_display' + guest_chat_mode = 'guest_chat_mode' + mobile_bottom_spacing = 'mobile_bottom_spacing' + mobile_chat_display = 'mobile_chat_display' + mobile_side_spacing = 'mobile_side_spacing' + theme_color = 'theme_color' + welcome_screen_greeting = 'welcome_screen_greeting' + + _field_types = { + 'alignment': 'string', + 'desktop_bottom_spacing': 'string', + 'desktop_side_spacing': 'string', + 'entry_point_icon': 'string', + 'entry_point_label': 'string', + 'greeting_dialog_display': 'string', + 'guest_chat_mode': 'string', + 'mobile_bottom_spacing': 'string', + 'mobile_chat_display': 'string', + 'mobile_side_spacing': 'string', + 'theme_color': 'string', + 'welcome_screen_greeting': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/checkbatchrequeststatus.py b/tap_facebook/facebook_business/adobjects/checkbatchrequeststatus.py new file mode 100644 index 0000000..a9c62c6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/checkbatchrequeststatus.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 CheckBatchRequestStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(CheckBatchRequestStatus, self).__init__() + self._isCheckBatchRequestStatus = True + self._api = api + + class Field(AbstractObject.Field): + errors = 'errors' + errors_total_count = 'errors_total_count' + handle = 'handle' + ids_of_invalid_requests = 'ids_of_invalid_requests' + status = 'status' + warnings = 'warnings' + warnings_total_count = 'warnings_total_count' + + class ErrorPriority: + high = 'HIGH' + low = 'LOW' + medium = 'MEDIUM' + + _field_types = { + 'errors': 'list', + 'errors_total_count': 'int', + 'handle': 'string', + 'ids_of_invalid_requests': 'list', + 'status': 'string', + 'warnings': 'list', + 'warnings_total_count': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ErrorPriority'] = CheckBatchRequestStatus.ErrorPriority.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/childevent.py b/tap_facebook/facebook_business/adobjects/childevent.py new file mode 100644 index 0000000..fc7a671 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/childevent.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 ChildEvent( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isChildEvent = True + super(ChildEvent, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + end_time = 'end_time' + id = 'id' + start_time = 'start_time' + ticket_uri = 'ticket_uri' + + _field_types = { + 'end_time': 'string', + 'id': 'string', + 'start_time': 'string', + 'ticket_uri': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/clicktrackingtag.py b/tap_facebook/facebook_business/adobjects/clicktrackingtag.py new file mode 100644 index 0000000..6660123 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/clicktrackingtag.py @@ -0,0 +1,33 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This 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 + +class ClickTrackingTag(AbstractCrudObject): + + class Field(object): + add_template_param = 'add_template_param' + ad_id = 'ad_id' + id = 'id' + url = 'url' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'trackingtag' + + def get_node_path(self): + return ( + self.get_parent_id_assured(), + self.get_endpoint() + ) + + def remote_delete(self, params=None): + return self.get_api_assured().call( + 'DELETE', + self.get_node_path(), + params=params, + ) diff --git a/tap_facebook/facebook_business/adobjects/cloudgame.py b/tap_facebook/facebook_business/adobjects/cloudgame.py new file mode 100644 index 0000000..35d2abf --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/cloudgame.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 CloudGame( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCloudGame = True + super(CloudGame, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + owner = 'owner' + playable_ad_file_size = 'playable_ad_file_size' + playable_ad_orientation = 'playable_ad_orientation' + playable_ad_package_name = 'playable_ad_package_name' + playable_ad_reject_reason = 'playable_ad_reject_reason' + playable_ad_status = 'playable_ad_status' + playable_ad_upload_time = 'playable_ad_upload_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=CloudGame, + 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', + 'owner': 'Profile', + 'playable_ad_file_size': 'unsigned int', + 'playable_ad_orientation': 'string', + 'playable_ad_package_name': 'string', + 'playable_ad_reject_reason': 'string', + 'playable_ad_status': 'string', + 'playable_ad_upload_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py b/tap_facebook/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py new file mode 100644 index 0000000..bd20701 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/collaborativeadspartnerinfolistitem.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 CollaborativeAdsPartnerInfoListItem( + AbstractObject, +): + + def __init__(self, api=None): + super(CollaborativeAdsPartnerInfoListItem, self).__init__() + self._isCollaborativeAdsPartnerInfoListItem = 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/tap_facebook/facebook_business/adobjects/collaborativeadssharesettings.py b/tap_facebook/facebook_business/adobjects/collaborativeadssharesettings.py new file mode 100644 index 0000000..7f3172d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/collaborativeadssharesettings.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 CollaborativeAdsShareSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCollaborativeAdsShareSettings = True + super(CollaborativeAdsShareSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + agency_business = 'agency_business' + id = 'id' + product_catalog_proxy_id = 'product_catalog_proxy_id' + utm_campaign = 'utm_campaign' + utm_medium = 'utm_medium' + utm_source = 'utm_source' + + 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=CollaborativeAdsShareSettings, + 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 = { + 'agency_business': 'Business', + 'id': 'string', + 'product_catalog_proxy_id': 'string', + 'utm_campaign': 'string', + 'utm_medium': 'string', + 'utm_source': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/comment.py b/tap_facebook/facebook_business/adobjects/comment.py new file mode 100644 index 0000000..0167f90 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/comment.py @@ -0,0 +1,419 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Comment( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isComment = True + super(Comment, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + admin_creator = 'admin_creator' + application = 'application' + attachment = 'attachment' + can_comment = 'can_comment' + can_hide = 'can_hide' + can_like = 'can_like' + can_remove = 'can_remove' + can_reply_privately = 'can_reply_privately' + comment_count = 'comment_count' + created_time = 'created_time' + field_from = 'from' + id = 'id' + is_hidden = 'is_hidden' + is_private = 'is_private' + like_count = 'like_count' + live_broadcast_timestamp = 'live_broadcast_timestamp' + message = 'message' + message_tags = 'message_tags' + object = 'object' + parent = 'parent' + permalink_url = 'permalink_url' + private_reply_conversation = 'private_reply_conversation' + user_likes = 'user_likes' + + class CommentPrivacyValue: + declined_by_admin_assistant = 'DECLINED_BY_ADMIN_ASSISTANT' + default_privacy = 'DEFAULT_PRIVACY' + friends_and_post_owner = 'FRIENDS_AND_POST_OWNER' + friends_only = 'FRIENDS_ONLY' + graphql_multiple_value_hack_do_not_use = 'GRAPHQL_MULTIPLE_VALUE_HACK_DO_NOT_USE' + owner_or_commenter = 'OWNER_OR_COMMENTER' + pending_approval = 'PENDING_APPROVAL' + removed_by_admin_assistant = 'REMOVED_BY_ADMIN_ASSISTANT' + side_conversation = 'SIDE_CONVERSATION' + side_conversation_and_post_owner = 'SIDE_CONVERSATION_AND_POST_OWNER' + spotlight_tab = 'SPOTLIGHT_TAB' + + class Filter: + stream = 'stream' + toplevel = 'toplevel' + + 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): + 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=Comment, + 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 = { + 'attachment_id': 'string', + 'attachment_share_url': 'string', + 'attachment_url': 'string', + 'is_hidden': 'bool', + 'message': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Comment, + 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.') + param_types = { + 'filter': 'filter_enum', + 'live_filter': 'live_filter_enum', + 'order': 'order_enum', + 'since': 'datetime', + } + enums = { + 'filter_enum': Comment.Filter.__dict__.values(), + 'live_filter_enum': Comment.LiveFilter.__dict__.values(), + '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() + + 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.') + param_types = { + 'attachment_id': 'string', + 'attachment_share_url': 'string', + 'attachment_url': 'string', + 'comment_privacy_value': 'comment_privacy_value_enum', + 'facepile_mentioned_ids': 'list', + 'feedback_source': 'string', + 'is_offline': 'bool', + 'message': 'string', + 'nectar_module': 'string', + 'object_id': 'string', + 'parent_comment_id': 'Object', + 'text': 'string', + 'tracking': 'string', + } + enums = { + 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + 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() + + def delete_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + 'tracking': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/likes', + 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_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', + 'tracking': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/likes', + 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() + + def get_reactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': Profile.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/reactions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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 = { + 'admin_creator': 'User', + 'application': 'Application', + 'attachment': 'Object', + 'can_comment': 'bool', + 'can_hide': 'bool', + 'can_like': 'bool', + 'can_remove': 'bool', + 'can_reply_privately': 'bool', + 'comment_count': 'unsigned int', + 'created_time': 'datetime', + 'from': 'Object', + 'id': 'string', + 'is_hidden': 'bool', + 'is_private': 'bool', + 'like_count': 'unsigned int', + 'live_broadcast_timestamp': 'unsigned int', + 'message': 'string', + 'message_tags': 'list', + 'object': 'Object', + 'parent': 'Comment', + 'permalink_url': 'string', + 'private_reply_conversation': 'Object', + 'user_likes': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + 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/tap_facebook/facebook_business/adobjects/commercemerchantsettings.py b/tap_facebook/facebook_business/adobjects/commercemerchantsettings.py new file mode 100644 index 0000000..d71f526 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/commercemerchantsettings.py @@ -0,0 +1,612 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 CommerceMerchantSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCommerceMerchantSettings = True + super(CommerceMerchantSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + braintree_merchant_id = 'braintree_merchant_id' + checkout_message = 'checkout_message' + 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 + if batch 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=CommerceMerchantSettings, + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'idempotency_key': 'string', + 'orders': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/acknowledge_orders', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceMerchantSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceMerchantSettings, 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_orders(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.commerceorder import CommerceOrder + param_types = { + 'filters': 'list', + 'state': 'list', + 'updated_after': 'datetime', + 'updated_before': 'datetime', + } + enums = { + 'filters_enum': CommerceOrder.Filters.__dict__.values(), + 'state_enum': CommerceOrder.State.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/commerce_orders', + 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() + + def get_commerce_payouts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.commercepayout import CommercePayout + param_types = { + 'end_time': 'datetime', + 'start_time': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/commerce_payouts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommercePayout, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommercePayout, 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_transactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.commerceordertransactiondetail import CommerceOrderTransactionDetail + param_types = { + 'end_time': 'datetime', + 'payout_reference_id': 'string', + 'start_time': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/commerce_transactions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceOrderTransactionDetail, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceOrderTransactionDetail, 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): + from facebook_business.utils import api_utils + if batch 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='/order_management_apps', + 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 create_order_management_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/order_management_apps', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceMerchantSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceMerchantSettings, 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_catalogs', + 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() + + def get_returns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_created': 'datetime', + 'merchant_return_id': 'string', + 'start_time_created': 'datetime', + 'statuses': 'list', + } + enums = { + 'statuses_enum': [ + 'APPROVED', + 'DISAPPROVED', + 'MERCHANT_MARKED_COMPLETED', + 'REFUNDED', + 'REQUESTED', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/returns', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.commercemerchantsettingssetupstatus import CommerceMerchantSettingsSetupStatus + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/setup_status', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceMerchantSettingsSetupStatus, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceMerchantSettingsSetupStatus, 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_shipping_profiles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'reference_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/shipping_profiles', + 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_shipping_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 = { + 'handling_time': 'map', + 'is_default': 'bool', + 'is_default_shipping_profile': 'bool', + 'name': 'string', + 'reference_id': 'string', + 'shipping_destinations': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/shipping_profiles', + 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_shops(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.shop import Shop + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/shops', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Shop, + api_type='EDGE', + response_parser=ObjectParser(target_class=Shop, 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_tax_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/tax_settings', + 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_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', + '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): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/commercemerchantsettingssetupstatus.py b/tap_facebook/facebook_business/adobjects/commercemerchantsettingssetupstatus.py new file mode 100644 index 0000000..99e4209 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/commercemerchantsettingssetupstatus.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 CommerceMerchantSettingsSetupStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(CommerceMerchantSettingsSetupStatus, self).__init__() + self._isCommerceMerchantSettingsSetupStatus = True + self._api = api + + class Field(AbstractObject.Field): + deals_setup = 'deals_setup' + marketplace_approval_status = 'marketplace_approval_status' + marketplace_approval_status_details = 'marketplace_approval_status_details' + payment_setup = 'payment_setup' + review_status = 'review_status' + shop_setup = 'shop_setup' + + _field_types = { + 'deals_setup': 'string', + 'marketplace_approval_status': 'string', + 'marketplace_approval_status_details': 'Object', + 'payment_setup': 'string', + 'review_status': 'Object', + 'shop_setup': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/commerceorder.py b/tap_facebook/facebook_business/adobjects/commerceorder.py new file mode 100644 index 0000000..5c48c87 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/commerceorder.py @@ -0,0 +1,620 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 CommerceOrder( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCommerceOrder = True + super(CommerceOrder, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + buyer_details = 'buyer_details' + channel = 'channel' + created = 'created' + estimated_payment_details = 'estimated_payment_details' + id = 'id' + is_group_buy = 'is_group_buy' + is_test_order = 'is_test_order' + last_updated = 'last_updated' + merchant_order_id = 'merchant_order_id' + order_status = 'order_status' + selected_shipping_option = 'selected_shipping_option' + ship_by_date = 'ship_by_date' + shipping_address = 'shipping_address' + + class Filters: + has_cancellations = 'HAS_CANCELLATIONS' + has_fulfillments = 'HAS_FULFILLMENTS' + has_refunds = 'HAS_REFUNDS' + no_cancellations = 'NO_CANCELLATIONS' + no_refunds = 'NO_REFUNDS' + no_shipments = 'NO_SHIPMENTS' + + class State: + completed = 'COMPLETED' + created = 'CREATED' + fb_processing = 'FB_PROCESSING' + in_progress = 'IN_PROGRESS' + + class ReasonCode: + buyers_remorse = 'BUYERS_REMORSE' + damaged_goods = 'DAMAGED_GOODS' + facebook_initiated = 'FACEBOOK_INITIATED' + not_as_described = 'NOT_AS_DESCRIBED' + quality_issue = 'QUALITY_ISSUE' + refund_compromised = 'REFUND_COMPROMISED' + refund_for_return = 'REFUND_FOR_RETURN' + refund_reason_other = 'REFUND_REASON_OTHER' + refund_sfi_fake = 'REFUND_SFI_FAKE' + refund_sfi_real = 'REFUND_SFI_REAL' + wrong_item = 'WRONG_ITEM' + + 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=CommerceOrder, + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'idempotency_key': 'string', + 'merchant_order_reference': 'string', + 'return_error_response': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/acknowledge_order', + 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() + + def get_cancellations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/cancellations', + 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_cancellation(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_reason': 'map', + 'idempotency_key': 'string', + 'items': 'list', + 'restock_items': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/cancellations', + 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() + + def create_fulfill_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'idempotency_key': 'string', + 'items': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/fulfill_order', + 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() + + def get_items(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/items', + 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_payments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/payments', + 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_promotion_details(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/promotion_details', + 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_promotions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/promotions', + 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_refunds(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/refunds', + 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_refund(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + 'reason_code': 'reason_code_enum', + 'reason_text': 'string', + 'return_id': 'string', + 'shipping': 'map', + } + enums = { + 'reason_code_enum': CommerceOrder.ReasonCode.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/refunds', + 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() + + def get_returns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'merchant_return_id': 'string', + 'statuses': 'list', + } + enums = { + 'statuses_enum': [ + 'APPROVED', + 'DISAPPROVED', + 'MERCHANT_MARKED_COMPLETED', + 'REFUNDED', + 'REQUESTED', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/returns', + 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_return(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'items': 'list', + 'merchant_return_id': 'string', + 'return_message': 'string', + 'update': 'map', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/returns', + 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() + + def get_shipments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/shipments', + 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_shipment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'external_redemption_link': 'string', + 'external_shipment_id': 'string', + 'fulfillment': 'map', + 'idempotency_key': 'string', + 'items': 'list', + 'merchant_order_reference': 'string', + 'shipment_origin_postal_code': 'string', + 'shipping_tax_details': 'map', + 'should_use_default_fulfillment_location': 'bool', + 'tracking_info': 'map', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/shipments', + 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() + + def create_update_shipment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'external_shipment_id': 'string', + 'fulfillment_id': 'string', + 'idempotency_key': 'string', + 'shipment_id': 'string', + 'tracking_info': 'map', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/update_shipment', + 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', + 'created': 'string', + 'estimated_payment_details': 'Object', + 'id': 'string', + 'is_group_buy': 'bool', + 'is_test_order': 'bool', + 'last_updated': 'string', + 'merchant_order_id': 'string', + 'order_status': 'Object', + 'selected_shipping_option': 'Object', + 'ship_by_date': 'string', + 'shipping_address': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Filters'] = CommerceOrder.Filters.__dict__.values() + field_enum_info['State'] = CommerceOrder.State.__dict__.values() + field_enum_info['ReasonCode'] = CommerceOrder.ReasonCode.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/commerceordertransactiondetail.py b/tap_facebook/facebook_business/adobjects/commerceordertransactiondetail.py new file mode 100644 index 0000000..b179496 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/commerceordertransactiondetail.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 CommerceOrderTransactionDetail( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCommerceOrderTransactionDetail = True + super(CommerceOrderTransactionDetail, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + net_payment_amount = 'net_payment_amount' + order_details = 'order_details' + payout_reference_id = 'payout_reference_id' + processing_fee = 'processing_fee' + tax_rate = 'tax_rate' + transaction_date = 'transaction_date' + transaction_type = 'transaction_type' + transfer_id = 'transfer_id' + id = 'id' + + def get_items(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/items', + 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_tax_details(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/tax_details', + 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 = { + 'net_payment_amount': 'Object', + 'order_details': 'CommerceOrder', + 'payout_reference_id': 'string', + 'processing_fee': 'Object', + 'tax_rate': 'string', + 'transaction_date': 'string', + 'transaction_type': 'string', + 'transfer_id': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/commercepayout.py b/tap_facebook/facebook_business/adobjects/commercepayout.py new file mode 100644 index 0000000..e55bd75 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/commercepayout.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 CommercePayout( + AbstractObject, +): + + def __init__(self, api=None): + super(CommercePayout, self).__init__() + self._isCommercePayout = True + self._api = api + + class Field(AbstractObject.Field): + amount = 'amount' + payout_date = 'payout_date' + payout_reference_id = 'payout_reference_id' + status = 'status' + transfer_id = 'transfer_id' + + _field_types = { + 'amount': 'Object', + 'payout_date': 'string', + 'payout_reference_id': 'string', + 'status': 'string', + 'transfer_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/commercesettings.py b/tap_facebook/facebook_business/adobjects/commercesettings.py new file mode 100644 index 0000000..88727d8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/commercesettings.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 CommerceSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(CommerceSettings, self).__init__() + self._isCommerceSettings = True + self._api = api + + class Field(AbstractObject.Field): + inventory = 'inventory' + total_inventory = 'total_inventory' + + _field_types = { + 'inventory': 'int', + 'total_inventory': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/connectionstargeting.py b/tap_facebook/facebook_business/adobjects/connectionstargeting.py new file mode 100644 index 0000000..cc3b9ca --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/connectionstargeting.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 ConnectionsTargeting( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isConnectionsTargeting = True + super(ConnectionsTargeting, 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/tap_facebook/facebook_business/adobjects/contentpublishinglimitresponse.py b/tap_facebook/facebook_business/adobjects/contentpublishinglimitresponse.py new file mode 100644 index 0000000..bdcabfe --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/contextualbundlingspec.py b/tap_facebook/facebook_business/adobjects/contextualbundlingspec.py new file mode 100644 index 0000000..a52ab3d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/contextualbundlingspec.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 ContextualBundlingSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(ContextualBundlingSpec, self).__init__() + self._isContextualBundlingSpec = True + self._api = api + + class Field(AbstractObject.Field): + status = 'status' + + _field_types = { + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/conversionactionquery.py b/tap_facebook/facebook_business/adobjects/conversionactionquery.py new file mode 100644 index 0000000..2086083 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/conversionactionquery.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 ConversionActionQuery( + AbstractObject, +): + + def __init__(self, api=None): + super(ConversionActionQuery, self).__init__() + self._isConversionActionQuery = True + self._api = api + + class Field(AbstractObject.Field): + field_action_type = 'action.type' + application = 'application' + conversion_id = 'conversion_id' + creative = 'creative' + dataset = 'dataset' + event = 'event' + field_event_creator = 'event.creator' + event_type = 'event_type' + fb_pixel = 'fb_pixel' + fb_pixel_event = 'fb_pixel_event' + leadgen = 'leadgen' + object = 'object' + field_object_domain = 'object.domain' + offer = 'offer' + field_offer_creator = 'offer.creator' + offsite_pixel = 'offsite_pixel' + page = 'page' + field_page_parent = 'page.parent' + post = 'post' + field_post_object = 'post.object' + field_post_object_wall = 'post.object.wall' + field_post_wall = 'post.wall' + question = 'question' + field_question_creator = 'question.creator' + response = 'response' + subtype = 'subtype' + + _field_types = { + 'action.type': 'list', + 'application': 'list', + 'conversion_id': 'list', + 'creative': 'list', + 'dataset': 'list', + 'event': 'list', + 'event.creator': 'list', + 'event_type': 'list', + 'fb_pixel': 'list', + 'fb_pixel_event': 'list', + 'leadgen': 'list', + 'object': 'list', + 'object.domain': 'list', + 'offer': 'list', + 'offer.creator': 'list', + 'offsite_pixel': 'list', + 'page': 'list', + 'page.parent': 'list', + 'post': 'list', + 'post.object': 'list', + 'post.object.wall': 'list', + 'post.wall': 'list', + 'question': 'list', + 'question.creator': 'list', + 'response': 'list', + 'subtype': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/copyrightreferencecontainer.py b/tap_facebook/facebook_business/adobjects/copyrightreferencecontainer.py new file mode 100644 index 0000000..6b2b158 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/copyrightreferencecontainer.py @@ -0,0 +1,62 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 CopyrightReferenceContainer( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCopyrightReferenceContainer = True + super(CopyrightReferenceContainer, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + content_type = 'content_type' + copyright_creation_time = 'copyright_creation_time' + download_hd_url = 'download_hd_url' + duration_in_sec = 'duration_in_sec' + id = 'id' + iswc = 'iswc' + metadata = 'metadata' + published_time = 'published_time' + thumbnail_url = 'thumbnail_url' + title = 'title' + universal_content_id = 'universal_content_id' + writer_names = 'writer_names' + + _field_types = { + 'content_type': 'string', + 'copyright_creation_time': 'datetime', + 'download_hd_url': 'string', + 'duration_in_sec': 'float', + 'id': 'string', + 'iswc': 'string', + 'metadata': 'Object', + 'published_time': 'datetime', + 'thumbnail_url': 'string', + 'title': 'string', + 'universal_content_id': 'string', + 'writer_names': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/coverphoto.py b/tap_facebook/facebook_business/adobjects/coverphoto.py new file mode 100644 index 0000000..bb2e0c0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/coverphoto.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 CoverPhoto( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCoverPhoto = True + super(CoverPhoto, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + cover_id = 'cover_id' + id = 'id' + offset_x = 'offset_x' + offset_y = 'offset_y' + source = 'source' + + _field_types = { + 'cover_id': 'string', + 'id': 'string', + 'offset_x': 'float', + 'offset_y': 'float', + 'source': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py b/tap_facebook/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py new file mode 100644 index 0000000..5013daf --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.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 CPASAdvertiserPartnershipRecommendation( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASAdvertiserPartnershipRecommendation = True + super(CPASAdvertiserPartnershipRecommendation, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + advertiser_business_id = 'advertiser_business_id' + brand_business_id = 'brand_business_id' + brands = 'brands' + countries = 'countries' + id = 'id' + merchant_business_id = 'merchant_business_id' + merchant_categories = 'merchant_categories' + status = 'status' + status_reason = 'status_reason' + + 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=CPASAdvertiserPartnershipRecommendation, + 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 = { + 'advertiser_business_id': 'string', + 'brand_business_id': 'string', + 'brands': 'list', + 'countries': 'list', + 'id': 'string', + 'merchant_business_id': 'string', + 'merchant_categories': 'list', + 'status': 'string', + 'status_reason': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/cpasbusinesssetupconfig.py b/tap_facebook/facebook_business/adobjects/cpasbusinesssetupconfig.py new file mode 100644 index 0000000..6f71ddc --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/cpasbusinesssetupconfig.py @@ -0,0 +1,121 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 CPASBusinessSetupConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASBusinessSetupConfig = True + super(CPASBusinessSetupConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + accepted_collab_ads_tos = 'accepted_collab_ads_tos' + business = 'business' + business_capabilities_status = 'business_capabilities_status' + capabilities_compliance_status = 'capabilities_compliance_status' + id = 'id' + ad_accounts = 'ad_accounts' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'cpas_business_setup_config' + + # @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_cpas_business_setup_config(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=CPASBusinessSetupConfig, + 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='/ad_accounts', + 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 = { + 'accepted_collab_ads_tos': 'bool', + 'business': 'Business', + 'business_capabilities_status': 'list>', + 'capabilities_compliance_status': 'list>', + 'id': 'string', + 'ad_accounts': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/cpascollaborationrequest.py b/tap_facebook/facebook_business/adobjects/cpascollaborationrequest.py new file mode 100644 index 0000000..463a3d1 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/cpascollaborationrequest.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 CPASCollaborationRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASCollaborationRequest = True + super(CPASCollaborationRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + brands = 'brands' + contact_email = 'contact_email' + contact_first_name = 'contact_first_name' + contact_last_name = 'contact_last_name' + id = 'id' + phone_number = 'phone_number' + receiver_business = 'receiver_business' + requester_agency_or_brand = 'requester_agency_or_brand' + sender_client_business = 'sender_client_business' + status = 'status' + + class RequesterAgencyOrBrand: + agency = 'AGENCY' + brand = 'BRAND' + merchant = 'MERCHANT' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'collaborative_ads_collaboration_requests' + + # @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_collaborative_ads_collaboration_request(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=CPASCollaborationRequest, + 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 = { + 'brands': 'list', + 'contact_email': 'string', + 'contact_first_name': 'string', + 'contact_last_name': 'string', + 'id': 'string', + 'phone_number': 'string', + 'receiver_business': 'Business', + 'requester_agency_or_brand': 'string', + 'sender_client_business': 'Business', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['RequesterAgencyOrBrand'] = CPASCollaborationRequest.RequesterAgencyOrBrand.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/cpasmerchantconfig.py b/tap_facebook/facebook_business/adobjects/cpasmerchantconfig.py new file mode 100644 index 0000000..2f171f5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/cpasmerchantconfig.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 CPASMerchantConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASMerchantConfig = True + super(CPASMerchantConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + accepted_tos = 'accepted_tos' + beta_features = 'beta_features' + business_outcomes_status = 'business_outcomes_status' + id = 'id' + is_test_merchant = 'is_test_merchant' + outcomes_compliance_status = 'outcomes_compliance_status' + qualified_to_onboard = 'qualified_to_onboard' + + 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=CPASMerchantConfig, + 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 = { + 'accepted_tos': 'bool', + 'beta_features': 'list', + 'business_outcomes_status': 'list>', + 'id': 'string', + 'is_test_merchant': 'bool', + 'outcomes_compliance_status': 'list>', + 'qualified_to_onboard': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/creativehistory.py b/tap_facebook/facebook_business/adobjects/creativehistory.py new file mode 100644 index 0000000..b49d6e9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/creativehistory.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 CreativeHistory( + AbstractObject, +): + + def __init__(self, api=None): + super(CreativeHistory, self).__init__() + self._isCreativeHistory = True + self._api = api + + class Field(AbstractObject.Field): + creative_fingerprint = 'creative_fingerprint' + time_ranges = 'time_ranges' + + _field_types = { + 'creative_fingerprint': 'int', + 'time_ranges': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/creditcard.py b/tap_facebook/facebook_business/adobjects/creditcard.py new file mode 100644 index 0000000..78ad74e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/creditcard.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 +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 CreditCard( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCreditCard = True + super(CreditCard, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + billing_address = 'billing_address' + card_cobadging = 'card_cobadging' + card_holder_name = 'card_holder_name' + card_type = 'card_type' + credential_id = 'credential_id' + default_receiving_method_products = 'default_receiving_method_products' + expiry_month = 'expiry_month' + expiry_year = 'expiry_year' + id = 'id' + is_cvv_tricky_bin = 'is_cvv_tricky_bin' + is_enabled = 'is_enabled' + is_last_used = 'is_last_used' + is_network_tokenized_in_india = 'is_network_tokenized_in_india' + is_soft_disabled = 'is_soft_disabled' + is_user_verified = 'is_user_verified' + is_zip_verified = 'is_zip_verified' + last4 = 'last4' + readable_card_type = 'readable_card_type' + time_created = 'time_created' + time_created_ts = 'time_created_ts' + type = '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=CreditCard, + 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_address': 'Object', + 'card_cobadging': 'string', + 'card_holder_name': 'string', + 'card_type': 'string', + 'credential_id': 'int', + 'default_receiving_method_products': 'list', + 'expiry_month': 'string', + 'expiry_year': 'string', + 'id': 'string', + 'is_cvv_tricky_bin': 'bool', + 'is_enabled': 'bool', + 'is_last_used': 'bool', + 'is_network_tokenized_in_india': 'bool', + 'is_soft_disabled': 'bool', + 'is_user_verified': 'bool', + 'is_zip_verified': 'bool', + 'last4': 'string', + 'readable_card_type': 'string', + 'time_created': 'datetime', + 'time_created_ts': 'int', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/creditpartitionactionoptions.py b/tap_facebook/facebook_business/adobjects/creditpartitionactionoptions.py new file mode 100644 index 0000000..93433d9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/creditpartitionactionoptions.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 CreditPartitionActionOptions( + AbstractObject, +): + + def __init__(self, api=None): + super(CreditPartitionActionOptions, self).__init__() + self._isCreditPartitionActionOptions = True + self._api = api + + class Field(AbstractObject.Field): + liability_type = 'liability_type' + partition_type = 'partition_type' + send_bill_to = 'send_bill_to' + + _field_types = { + 'liability_type': 'Object', + 'partition_type': 'Object', + 'send_bill_to': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/crmaddress.py b/tap_facebook/facebook_business/adobjects/crmaddress.py new file mode 100644 index 0000000..5dbf23c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/crmaddress.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 CRMAddress( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCRMAddress = True + super(CRMAddress, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + city = 'city' + cnpj_tax_id = 'cnpj_tax_id' + country = 'country' + id = 'id' + postal_code = 'postal_code' + registration_label = 'registration_label' + registration_number = 'registration_number' + state = 'state' + street1 = 'street1' + street2 = 'street2' + street3 = 'street3' + street4 = 'street4' + validation_status = 'validation_status' + vat_tax_id = 'vat_tax_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=CRMAddress, + 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 = { + 'city': 'string', + 'cnpj_tax_id': 'string', + 'country': 'string', + 'id': 'string', + 'postal_code': 'string', + 'registration_label': 'string', + 'registration_number': 'string', + 'state': 'string', + 'street1': 'string', + 'street2': 'string', + 'street3': 'string', + 'street4': 'string', + 'validation_status': 'string', + 'vat_tax_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py b/tap_facebook/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py new file mode 100644 index 0000000..581d04c --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/currency.py b/tap_facebook/facebook_business/adobjects/currency.py new file mode 100644 index 0000000..ba6070c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/currency.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 Currency( + AbstractObject, +): + + def __init__(self, api=None): + super(Currency, self).__init__() + self._isCurrency = True + self._api = api + + class Field(AbstractObject.Field): + currency_offset = 'currency_offset' + usd_exchange = 'usd_exchange' + usd_exchange_inverse = 'usd_exchange_inverse' + user_currency = 'user_currency' + + _field_types = { + 'currency_offset': 'unsigned int', + 'usd_exchange': 'float', + 'usd_exchange_inverse': 'float', + 'user_currency': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/currencyamount.py b/tap_facebook/facebook_business/adobjects/currencyamount.py new file mode 100644 index 0000000..5fdb4b6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/currencyamount.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 CurrencyAmount( + AbstractObject, +): + + def __init__(self, api=None): + super(CurrencyAmount, self).__init__() + self._isCurrencyAmount = True + self._api = api + + class Field(AbstractObject.Field): + amount = 'amount' + amount_in_hundredths = 'amount_in_hundredths' + currency = 'currency' + offsetted_amount = 'offsetted_amount' + + _field_types = { + 'amount': 'string', + 'amount_in_hundredths': 'string', + 'currency': 'string', + 'offsetted_amount': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customaudience.py b/tap_facebook/facebook_business/adobjects/customaudience.py new file mode 100644 index 0000000..aa5355f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudience.py @@ -0,0 +1,703 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.adobjects.helpers.customaudiencemixin import CustomAudienceMixin + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class CustomAudience( + CustomAudienceMixin, + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCustomAudience = True + super(CustomAudience, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + approximate_count_lower_bound = 'approximate_count_lower_bound' + approximate_count_upper_bound = 'approximate_count_upper_bound' + customer_file_source = 'customer_file_source' + data_source = 'data_source' + data_source_types = 'data_source_types' + datafile_custom_audience_uploading_status = 'datafile_custom_audience_uploading_status' + delete_time = 'delete_time' + delivery_status = 'delivery_status' + description = 'description' + excluded_custom_audiences = 'excluded_custom_audiences' + external_event_source = 'external_event_source' + household_audience = 'household_audience' + id = 'id' + included_custom_audiences = 'included_custom_audiences' + is_household = 'is_household' + is_snapshot = 'is_snapshot' + is_value_based = 'is_value_based' + lookalike_audience_ids = 'lookalike_audience_ids' + lookalike_spec = 'lookalike_spec' + name = 'name' + operation_status = 'operation_status' + opt_out_link = 'opt_out_link' + owner_business = 'owner_business' + page_deletion_marked_delete_time = 'page_deletion_marked_delete_time' + permission_for_actions = 'permission_for_actions' + pixel_id = 'pixel_id' + regulated_audience_spec = 'regulated_audience_spec' + retention_days = 'retention_days' + rev_share_policy_id = 'rev_share_policy_id' + rule = 'rule' + rule_aggregation = 'rule_aggregation' + rule_v2 = 'rule_v2' + seed_audience = 'seed_audience' + sharing_status = 'sharing_status' + subtype = 'subtype' + time_content_updated = 'time_content_updated' + time_created = 'time_created' + time_updated = 'time_updated' + allowed_domains = 'allowed_domains' + associated_audience_id = 'associated_audience_id' + claim_objective = 'claim_objective' + content_type = 'content_type' + countries = 'countries' + creation_params = 'creation_params' + dataset_id = 'dataset_id' + enable_fetch_or_create = 'enable_fetch_or_create' + event_source_group = 'event_source_group' + event_sources = 'event_sources' + exclusions = 'exclusions' + inclusions = 'inclusions' + list_of_accounts = 'list_of_accounts' + origin_audience_id = 'origin_audience_id' + parent_audience_id = 'parent_audience_id' + partner_reference_key = 'partner_reference_key' + prefill = 'prefill' + 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' + collaborative_ads = 'COLLABORATIVE_ADS' + home_listing = 'HOME_LISTING' + media_title = 'MEDIA_TITLE' + product = 'PRODUCT' + travel = 'TRAVEL' + vehicle = 'VEHICLE' + vehicle_offer = 'VEHICLE_OFFER' + + class ContentType: + automotive_model = 'AUTOMOTIVE_MODEL' + destination = 'DESTINATION' + flight = 'FLIGHT' + 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' + vehicle = 'VEHICLE' + vehicle_offer = 'VEHICLE_OFFER' + + class CustomerFileSource: + both_user_and_partner_provided = 'BOTH_USER_AND_PARTNER_PROVIDED' + partner_provided_only = 'PARTNER_PROVIDED_ONLY' + user_provided_only = 'USER_PROVIDED_ONLY' + + class Subtype: + app = 'APP' + bag_of_accounts = 'BAG_OF_ACCOUNTS' + bidding = 'BIDDING' + claim = 'CLAIM' + custom = 'CUSTOM' + engagement = 'ENGAGEMENT' + fox = 'FOX' + lookalike = 'LOOKALIKE' + managed = 'MANAGED' + measurement = 'MEASUREMENT' + offline_conversion = 'OFFLINE_CONVERSION' + partner = 'PARTNER' + primary = 'PRIMARY' + regulated_categories_audience = 'REGULATED_CATEGORIES_AUDIENCE' + study_rule_audience = 'STUDY_RULE_AUDIENCE' + subscriber_segment = 'SUBSCRIBER_SEGMENT' + video = 'VIDEO' + website = 'WEBSITE' + + class ActionSource: + physical_store = 'PHYSICAL_STORE' + website = 'WEBSITE' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'customaudiences' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_custom_audience(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 + if batch 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_account_id': 'string', + 'target_countries': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomAudience, + 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 = { + 'allowed_domains': 'list', + 'claim_objective': 'claim_objective_enum', + 'content_type': 'content_type_enum', + 'countries': 'string', + 'customer_file_source': 'customer_file_source_enum', + 'description': 'string', + 'enable_fetch_or_create': 'bool', + 'event_source_group': 'string', + 'event_sources': 'list', + 'exclusions': 'list', + 'inclusions': 'list', + 'lookalike_spec': 'string', + 'name': 'string', + 'opt_out_link': 'string', + 'parent_audience_id': 'unsigned int', + 'product_set_id': 'string', + 'retention_days': 'unsigned int', + 'rev_share_policy_id': 'unsigned int', + 'rule': 'string', + 'rule_aggregation': 'string', + 'tags': 'list', + 'use_in_campaigns': 'bool', + } + enums = { + 'claim_objective_enum': CustomAudience.ClaimObjective.__dict__.values(), + 'content_type_enum': CustomAudience.ContentType.__dict__.values(), + 'customer_file_source_enum': CustomAudience.CustomerFileSource.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomAudience, + 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_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.') + param_types = { + 'adaccounts': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/adaccounts', + 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_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 = { + 'permissions': 'string', + } + 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() + + 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 = { + 'adaccounts': 'list', + 'permissions': 'string', + 'relationship_type': 'list', + 'replace': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/adaccounts', + 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_ads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.ad import Ad + param_types = { + 'effective_status': 'list', + 'status': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Ad, + api_type='EDGE', + response_parser=ObjectParser(target_class=Ad, 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.customaudiencesession import CustomAudienceSession + param_types = { + 'session_id': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/sessions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomAudienceSession, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomAudienceSession, 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_shared_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.') + from facebook_business.adobjects.customaudiencesharedaccountinfo import CustomAudiencesharedAccountInfo + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/shared_account_info', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomAudiencesharedAccountInfo, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomAudiencesharedAccountInfo, 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_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.') + param_types = { + 'namespace': 'string', + 'payload': 'Object', + 'session': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/users', + 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_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'namespace': 'string', + 'payload': 'Object', + 'session': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/users', + 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 create_users_replace(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'namespace': 'string', + 'payload': 'Object', + 'session': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/usersreplace', + 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() + + _field_types = { + 'account_id': 'string', + 'approximate_count_lower_bound': 'int', + 'approximate_count_upper_bound': 'int', + 'customer_file_source': 'string', + 'data_source': 'CustomAudienceDataSource', + 'data_source_types': 'string', + 'datafile_custom_audience_uploading_status': 'string', + 'delete_time': 'int', + 'delivery_status': 'CustomAudienceStatus', + 'description': 'string', + 'excluded_custom_audiences': 'list', + 'external_event_source': 'AdsPixel', + 'household_audience': 'int', + 'id': 'string', + 'included_custom_audiences': 'list', + 'is_household': 'bool', + 'is_snapshot': 'bool', + 'is_value_based': 'bool', + 'lookalike_audience_ids': 'list', + 'lookalike_spec': 'LookalikeSpec', + 'name': 'string', + 'operation_status': 'CustomAudienceStatus', + 'opt_out_link': 'string', + 'owner_business': 'Business', + 'page_deletion_marked_delete_time': 'int', + 'permission_for_actions': 'AudiencePermissionForActions', + 'pixel_id': 'string', + 'regulated_audience_spec': 'LookalikeSpec', + 'retention_days': 'int', + 'rev_share_policy_id': 'unsigned int', + 'rule': 'string', + 'rule_aggregation': 'string', + 'rule_v2': 'string', + 'seed_audience': 'int', + 'sharing_status': 'CustomAudienceSharingStatus', + 'subtype': 'string', + 'time_content_updated': 'unsigned int', + 'time_created': 'unsigned int', + 'time_updated': 'unsigned int', + 'allowed_domains': 'list', + 'associated_audience_id': 'unsigned int', + 'claim_objective': 'ClaimObjective', + 'content_type': 'ContentType', + 'countries': 'string', + 'creation_params': 'map', + 'dataset_id': 'string', + 'enable_fetch_or_create': 'bool', + 'event_source_group': 'string', + 'event_sources': 'list', + 'exclusions': 'list', + 'inclusions': 'list', + 'list_of_accounts': 'list', + 'origin_audience_id': 'string', + 'parent_audience_id': 'unsigned int', + 'partner_reference_key': 'string', + 'prefill': 'bool', + '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): + field_enum_info = {} + field_enum_info['ClaimObjective'] = CustomAudience.ClaimObjective.__dict__.values() + field_enum_info['ContentType'] = CustomAudience.ContentType.__dict__.values() + field_enum_info['CustomerFileSource'] = CustomAudience.CustomerFileSource.__dict__.values() + field_enum_info['Subtype'] = CustomAudience.Subtype.__dict__.values() + field_enum_info['ActionSource'] = CustomAudience.ActionSource.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customaudienceadaccount.py b/tap_facebook/facebook_business/adobjects/customaudienceadaccount.py new file mode 100644 index 0000000..ab10e99 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudienceadaccount.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 CustomAudienceAdAccount( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCustomAudienceAdAccount = True + super(CustomAudienceAdAccount, 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/tap_facebook/facebook_business/adobjects/customaudiencedatasource.py b/tap_facebook/facebook_business/adobjects/customaudiencedatasource.py new file mode 100644 index 0000000..19afe6a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudiencedatasource.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class CustomAudienceDataSource( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudienceDataSource, self).__init__() + self._isCustomAudienceDataSource = True + self._api = api + + class Field(AbstractObject.Field): + creation_params = 'creation_params' + sub_type = 'sub_type' + type = 'type' + + class SubType: + anything = 'ANYTHING' + app_users = 'APP_USERS' + ar_effects_events = 'AR_EFFECTS_EVENTS' + ar_experience_events = 'AR_EXPERIENCE_EVENTS' + campaign_conversions = 'CAMPAIGN_CONVERSIONS' + combination_custom_audience_users = 'COMBINATION_CUSTOM_AUDIENCE_USERS' + constant_contacts_email_hashes = 'CONSTANT_CONTACTS_EMAIL_HASHES' + contact_importer = 'CONTACT_IMPORTER' + conversion_pixel_hits = 'CONVERSION_PIXEL_HITS' + copy_paste_email_hashes = 'COPY_PASTE_EMAIL_HASHES' + custom_audience_users = 'CUSTOM_AUDIENCE_USERS' + custom_data_targeting = 'CUSTOM_DATA_TARGETING' + data_file = 'DATA_FILE' + dynamic_rule = 'DYNAMIC_RULE' + engagement_event_users = 'ENGAGEMENT_EVENT_USERS' + expanded_audience = 'EXPANDED_AUDIENCE' + external_ids = 'EXTERNAL_IDS' + external_ids_mix = 'EXTERNAL_IDS_MIX' + facebook_wifi_events = 'FACEBOOK_WIFI_EVENTS' + fb_event_signals = 'FB_EVENT_SIGNALS' + fb_pixel_hits = 'FB_PIXEL_HITS' + hashes = 'HASHES' + hashes_or_user_ids = 'HASHES_OR_USER_IDS' + household_expansion = 'HOUSEHOLD_EXPANSION' + ig_business_events = 'IG_BUSINESS_EVENTS' + ig_promoted_post = 'IG_PROMOTED_POST' + 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' + mobile_app_events = 'MOBILE_APP_EVENTS' + multicountry_combination = 'MULTICOUNTRY_COMBINATION' + multi_data_events = 'MULTI_DATA_EVENTS' + multi_event_source = 'MULTI_EVENT_SOURCE' + multi_hashes = 'MULTI_HASHES' + nothing = 'NOTHING' + offline_event_users = 'OFFLINE_EVENT_USERS' + page_fans = 'PAGE_FANS' + page_smart_audience = 'PAGE_SMART_AUDIENCE' + partner_category_users = 'PARTNER_CATEGORY_USERS' + place_visits = 'PLACE_VISITS' + platform = 'PLATFORM' + platform_users = 'PLATFORM_USERS' + seed_list = 'SEED_LIST' + signal_source = 'SIGNAL_SOURCE' + smart_audience = 'SMART_AUDIENCE' + store_visit_events = 'STORE_VISIT_EVENTS' + subscriber_list = 'SUBSCRIBER_LIST' + s_expr = 'S_EXPR' + tokens = 'TOKENS' + user_ids = 'USER_IDS' + video_events = 'VIDEO_EVENTS' + video_event_users = 'VIDEO_EVENT_USERS' + 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' + copy_paste = 'COPY_PASTE' + event_based = 'EVENT_BASED' + file_imported = 'FILE_IMPORTED' + household_audience = 'HOUSEHOLD_AUDIENCE' + seed_based = 'SEED_BASED' + third_party_imported = 'THIRD_PARTY_IMPORTED' + unknown = 'UNKNOWN' + + _field_types = { + 'creation_params': 'string', + 'sub_type': 'SubType', + 'type': 'Type', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['SubType'] = CustomAudienceDataSource.SubType.__dict__.values() + field_enum_info['Type'] = CustomAudienceDataSource.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customaudiencegroup.py b/tap_facebook/facebook_business/adobjects/customaudiencegroup.py new file mode 100644 index 0000000..5f36692 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudiencegroup.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 CustomAudienceGroup( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudienceGroup, self).__init__() + self._isCustomAudienceGroup = True + self._api = api + + class Field(AbstractObject.Field): + audience_type_param_name = 'audience_type_param_name' + existing_customer_tag = 'existing_customer_tag' + new_customer_tag = 'new_customer_tag' + + _field_types = { + 'audience_type_param_name': 'string', + 'existing_customer_tag': 'string', + 'new_customer_tag': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customaudiencesalts.py b/tap_facebook/facebook_business/adobjects/customaudiencesalts.py new file mode 100644 index 0000000..7d4b6bb --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/customaudiencesession.py b/tap_facebook/facebook_business/adobjects/customaudiencesession.py new file mode 100644 index 0000000..3b7198e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudiencesession.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 CustomAudienceSession( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudienceSession, self).__init__() + self._isCustomAudienceSession = True + self._api = api + + class Field(AbstractObject.Field): + end_time = 'end_time' + num_invalid_entries = 'num_invalid_entries' + num_matched = 'num_matched' + num_received = 'num_received' + progress = 'progress' + session_id = 'session_id' + stage = 'stage' + start_time = 'start_time' + + _field_types = { + 'end_time': 'string', + 'num_invalid_entries': 'string', + 'num_matched': 'string', + 'num_received': 'string', + 'progress': 'string', + 'session_id': 'string', + 'stage': 'string', + 'start_time': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customaudiencesharedaccountinfo.py b/tap_facebook/facebook_business/adobjects/customaudiencesharedaccountinfo.py new file mode 100644 index 0000000..221e919 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudiencesharedaccountinfo.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 CustomAudiencesharedAccountInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudiencesharedAccountInfo, self).__init__() + self._isCustomAudiencesharedAccountInfo = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + account_name = 'account_name' + business_id = 'business_id' + business_name = 'business_name' + sharing_status = 'sharing_status' + + _field_types = { + 'account_id': 'string', + 'account_name': 'string', + 'business_id': 'string', + 'business_name': 'string', + 'sharing_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customaudiencesharingstatus.py b/tap_facebook/facebook_business/adobjects/customaudiencesharingstatus.py new file mode 100644 index 0000000..b6f9cb4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudiencesharingstatus.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 CustomAudienceSharingStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudienceSharingStatus, self).__init__() + self._isCustomAudienceSharingStatus = True + self._api = api + + class Field(AbstractObject.Field): + sharing_relationship_id = 'sharing_relationship_id' + status = 'status' + + _field_types = { + 'sharing_relationship_id': 'unsigned int', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customaudiencestatus.py b/tap_facebook/facebook_business/adobjects/customaudiencestatus.py new file mode 100644 index 0000000..2408ab3 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudiencestatus.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 CustomAudienceStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudienceStatus, self).__init__() + self._isCustomAudienceStatus = True + self._api = api + + class Field(AbstractObject.Field): + code = 'code' + description = 'description' + + _field_types = { + 'code': 'unsigned int', + 'description': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customaudiencestos.py b/tap_facebook/facebook_business/adobjects/customaudiencestos.py new file mode 100644 index 0000000..a70f4fa --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customaudiencestos.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 CustomAudiencesTOS( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCustomAudiencesTOS = True + super(CustomAudiencesTOS, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + content = 'content' + id = 'id' + type = 'type' + + _field_types = { + 'content': 'string', + 'id': 'string', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customconversion.py b/tap_facebook/facebook_business/adobjects/customconversion.py new file mode 100644 index 0000000..bc17888 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customconversion.py @@ -0,0 +1,243 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 CustomConversion( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCustomConversion = True + super(CustomConversion, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + aggregation_rule = 'aggregation_rule' + business = 'business' + creation_time = 'creation_time' + custom_event_type = 'custom_event_type' + data_sources = 'data_sources' + default_conversion_value = 'default_conversion_value' + description = 'description' + event_source_type = 'event_source_type' + first_fired_time = 'first_fired_time' + id = 'id' + is_archived = 'is_archived' + is_unavailable = 'is_unavailable' + last_fired_time = 'last_fired_time' + name = 'name' + offline_conversion_data_set = 'offline_conversion_data_set' + pixel = 'pixel' + retention_days = 'retention_days' + rule = 'rule' + advanced_rule = 'advanced_rule' + event_source_id = 'event_source_id' + custom_conversion_id = 'custom_conversion_id' + + class CustomEventType: + add_payment_info = 'ADD_PAYMENT_INFO' + add_to_cart = 'ADD_TO_CART' + add_to_wishlist = 'ADD_TO_WISHLIST' + complete_registration = 'COMPLETE_REGISTRATION' + contact = 'CONTACT' + content_view = 'CONTENT_VIEW' + customize_product = 'CUSTOMIZE_PRODUCT' + donate = 'DONATE' + facebook_selected = 'FACEBOOK_SELECTED' + find_location = 'FIND_LOCATION' + initiated_checkout = 'INITIATED_CHECKOUT' + lead = 'LEAD' + listing_interaction = 'LISTING_INTERACTION' + other = 'OTHER' + purchase = 'PURCHASE' + schedule = 'SCHEDULE' + search = 'SEARCH' + start_trial = 'START_TRIAL' + submit_application = 'SUBMIT_APPLICATION' + subscribe = 'SUBSCRIBE' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'customconversions' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_custom_conversion(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 + if batch 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=CustomConversion, + 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 = { + 'default_conversion_value': 'float', + 'description': 'string', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversion, + 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_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.customconversionstatsresult import CustomConversionStatsResult + param_types = { + 'aggregation': 'aggregation_enum', + 'end_time': 'datetime', + 'start_time': 'datetime', + } + enums = { + 'aggregation_enum': CustomConversionStatsResult.Aggregation.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/stats', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversionStatsResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomConversionStatsResult, 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', + 'aggregation_rule': 'string', + 'business': 'Business', + 'creation_time': 'datetime', + 'custom_event_type': 'CustomEventType', + 'data_sources': 'list', + 'default_conversion_value': 'int', + 'description': 'string', + 'event_source_type': 'string', + 'first_fired_time': 'datetime', + 'id': 'string', + 'is_archived': 'bool', + 'is_unavailable': 'bool', + 'last_fired_time': 'datetime', + 'name': 'string', + 'offline_conversion_data_set': 'OfflineConversionDataSet', + 'pixel': 'AdsPixel', + 'retention_days': 'unsigned int', + 'rule': 'string', + 'advanced_rule': 'string', + 'event_source_id': 'string', + 'custom_conversion_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['CustomEventType'] = CustomConversion.CustomEventType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customconversionstatsresult.py b/tap_facebook/facebook_business/adobjects/customconversionstatsresult.py new file mode 100644 index 0000000..585b693 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customconversionstatsresult.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 CustomConversionStatsResult( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomConversionStatsResult, self).__init__() + self._isCustomConversionStatsResult = True + self._api = api + + class Field(AbstractObject.Field): + aggregation = 'aggregation' + data = 'data' + timestamp = 'timestamp' + + class Aggregation: + count = 'count' + device_type = 'device_type' + host = 'host' + pixel_fire = 'pixel_fire' + unmatched_count = 'unmatched_count' + unmatched_usd_amount = 'unmatched_usd_amount' + url = 'url' + usd_amount = 'usd_amount' + + _field_types = { + 'aggregation': 'Aggregation', + 'data': 'list', + 'timestamp': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Aggregation'] = CustomConversionStatsResult.Aggregation.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/customusersettings.py b/tap_facebook/facebook_business/adobjects/customusersettings.py new file mode 100644 index 0000000..4c40e98 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/customusersettings.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 CustomUserSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomUserSettings, self).__init__() + self._isCustomUserSettings = True + self._api = api + + class Field(AbstractObject.Field): + page_level_persistent_menu = 'page_level_persistent_menu' + user_level_persistent_menu = 'user_level_persistent_menu' + + _field_types = { + 'page_level_persistent_menu': 'list', + 'user_level_persistent_menu': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/dacheck.py b/tap_facebook/facebook_business/adobjects/dacheck.py new file mode 100644 index 0000000..665bb3a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/dacheck.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class DACheck( + AbstractObject, +): + + def __init__(self, api=None): + super(DACheck, self).__init__() + self._isDACheck = True + self._api = api + + class Field(AbstractObject.Field): + action_uri = 'action_uri' + description = 'description' + key = 'key' + result = 'result' + title = 'title' + user_message = 'user_message' + + class ConnectionMethod: + all = 'ALL' + app = 'APP' + browser = 'BROWSER' + server = 'SERVER' + + _field_types = { + 'action_uri': 'string', + 'description': 'string', + 'key': 'string', + 'result': 'string', + 'title': 'string', + 'user_message': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ConnectionMethod'] = DACheck.ConnectionMethod.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/dataset.py b/tap_facebook/facebook_business/adobjects/dataset.py new file mode 100644 index 0000000..8cfd46c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/dataset.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 Dataset( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDataset = True + super(Dataset, 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/tap_facebook/facebook_business/adobjects/daypart.py b/tap_facebook/facebook_business/adobjects/daypart.py new file mode 100644 index 0000000..8ed1824 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/daypart.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 DayPart( + AbstractObject, +): + + def __init__(self, api=None): + super(DayPart, self).__init__() + self._isDayPart = 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/tap_facebook/facebook_business/adobjects/deliverycheck.py b/tap_facebook/facebook_business/adobjects/deliverycheck.py new file mode 100644 index 0000000..637cefc --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/deliverycheck.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 DeliveryCheck( + AbstractObject, +): + + def __init__(self, api=None): + super(DeliveryCheck, self).__init__() + self._isDeliveryCheck = True + self._api = api + + class Field(AbstractObject.Field): + check_name = 'check_name' + description = 'description' + extra_info = 'extra_info' + summary = 'summary' + + _field_types = { + 'check_name': 'string', + 'description': 'string', + 'extra_info': 'DeliveryCheckExtraInfo', + 'summary': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/deliverycheckextrainfo.py b/tap_facebook/facebook_business/adobjects/deliverycheckextrainfo.py new file mode 100644 index 0000000..bcfa040 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/deliverycheckextrainfo.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 DeliveryCheckExtraInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(DeliveryCheckExtraInfo, self).__init__() + self._isDeliveryCheckExtraInfo = True + self._api = api + + class Field(AbstractObject.Field): + adgroup_ids = 'adgroup_ids' + campaign_ids = 'campaign_ids' + countries = 'countries' + + _field_types = { + 'adgroup_ids': 'list', + 'campaign_ids': 'list', + 'countries': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/deliverywindow.py b/tap_facebook/facebook_business/adobjects/deliverywindow.py new file mode 100644 index 0000000..f6d8542 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/deliverywindow.py @@ -0,0 +1,542 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 DeliveryWindow( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDeliveryWindow = True + super(DeliveryWindow, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad = 'ad' + ae = 'ae' + af = 'af' + ag = 'ag' + ai = 'ai' + al = 'al' + all = 'all' + am = 'am' + an = 'an' + ao = 'ao' + aq = 'aq' + ar = 'ar' + field_as = 'as' + at = 'at' + au = 'au' + aw = 'aw' + ax = 'ax' + az = 'az' + ba = 'ba' + bb = 'bb' + bd = 'bd' + be = 'be' + bf = 'bf' + bg = 'bg' + bh = 'bh' + bi = 'bi' + bj = 'bj' + bl = 'bl' + bm = 'bm' + bn = 'bn' + bo = 'bo' + bq = 'bq' + br = 'br' + bs = 'bs' + bt = 'bt' + bv = 'bv' + bw = 'bw' + by = 'by' + bz = 'bz' + ca = 'ca' + cc = 'cc' + cd = 'cd' + cf = 'cf' + cg = 'cg' + ch = 'ch' + ci = 'ci' + ck = 'ck' + cl = 'cl' + cm = 'cm' + cn = 'cn' + co = 'co' + cr = 'cr' + cu = 'cu' + cv = 'cv' + cw = 'cw' + cx = 'cx' + cy = 'cy' + cz = 'cz' + de = 'de' + dj = 'dj' + dk = 'dk' + dm = 'dm' + do = 'do' + dz = 'dz' + ec = 'ec' + ee = 'ee' + eg = 'eg' + eh = 'eh' + er = 'er' + es = 'es' + et = 'et' + fi = 'fi' + fj = 'fj' + fk = 'fk' + fm = 'fm' + fo = 'fo' + fr = 'fr' + ga = 'ga' + gb = 'gb' + gd = 'gd' + ge = 'ge' + gf = 'gf' + gg = 'gg' + gh = 'gh' + gi = 'gi' + gl = 'gl' + gm = 'gm' + gn = 'gn' + gp = 'gp' + gq = 'gq' + gr = 'gr' + gs = 'gs' + gt = 'gt' + gu = 'gu' + gw = 'gw' + gy = 'gy' + hk = 'hk' + hm = 'hm' + hn = 'hn' + hr = 'hr' + ht = 'ht' + hu = 'hu' + id = 'id' + ie = 'ie' + il = 'il' + im = 'im' + field_in = 'in' + io = 'io' + iq = 'iq' + ir = 'ir' + field_is = 'is' + it = 'it' + je = 'je' + jm = 'jm' + jo = 'jo' + jp = 'jp' + ke = 'ke' + kg = 'kg' + kh = 'kh' + ki = 'ki' + km = 'km' + kn = 'kn' + kp = 'kp' + kr = 'kr' + kw = 'kw' + ky = 'ky' + kz = 'kz' + la = 'la' + lb = 'lb' + lc = 'lc' + li = 'li' + lk = 'lk' + lr = 'lr' + ls = 'ls' + lt = 'lt' + lu = 'lu' + lv = 'lv' + ly = 'ly' + ma = 'ma' + mc = 'mc' + md = 'md' + me = 'me' + mf = 'mf' + mg = 'mg' + mh = 'mh' + mk = 'mk' + ml = 'ml' + mm = 'mm' + mn = 'mn' + mo = 'mo' + mp = 'mp' + mq = 'mq' + mr = 'mr' + ms = 'ms' + mt = 'mt' + mu = 'mu' + mv = 'mv' + mw = 'mw' + mx = 'mx' + my = 'my' + mz = 'mz' + na = 'na' + nc = 'nc' + ne = 'ne' + nf = 'nf' + ng = 'ng' + ni = 'ni' + nl = 'nl' + no = 'no' + np = 'np' + nr = 'nr' + nu = 'nu' + nz = 'nz' + om = 'om' + pa = 'pa' + pe = 'pe' + pf = 'pf' + pg = 'pg' + ph = 'ph' + pk = 'pk' + pl = 'pl' + pm = 'pm' + pn = 'pn' + pr = 'pr' + ps = 'ps' + pt = 'pt' + pw = 'pw' + py = 'py' + qa = 'qa' + re = 're' + ro = 'ro' + rs = 'rs' + ru = 'ru' + rw = 'rw' + sa = 'sa' + sb = 'sb' + sc = 'sc' + sd = 'sd' + se = 'se' + sg = 'sg' + sh = 'sh' + si = 'si' + sj = 'sj' + sk = 'sk' + sl = 'sl' + sm = 'sm' + sn = 'sn' + so = 'so' + sr = 'sr' + ss = 'ss' + st = 'st' + sv = 'sv' + sx = 'sx' + sy = 'sy' + sz = 'sz' + tc = 'tc' + td = 'td' + tf = 'tf' + tg = 'tg' + th = 'th' + tj = 'tj' + tk = 'tk' + tl = 'tl' + tm = 'tm' + tn = 'tn' + to = 'to' + tr = 'tr' + tt = 'tt' + tv = 'tv' + tw = 'tw' + tz = 'tz' + ua = 'ua' + ug = 'ug' + um = 'um' + us = 'us' + uy = 'uy' + uz = 'uz' + va = 'va' + vc = 'vc' + ve = 've' + vg = 'vg' + vi = 'vi' + vn = 'vn' + vu = 'vu' + wf = 'wf' + ws = 'ws' + xk = 'xk' + ye = 'ye' + yt = 'yt' + za = 'za' + zm = 'zm' + zw = 'zw' + + _field_types = { + 'ad': 'int', + 'ae': 'int', + 'af': 'int', + 'ag': 'int', + 'ai': 'int', + 'al': 'int', + 'all': 'int', + 'am': 'int', + 'an': 'int', + 'ao': 'int', + 'aq': 'int', + 'ar': 'int', + 'as': 'int', + 'at': 'int', + 'au': 'int', + 'aw': 'int', + 'ax': 'int', + 'az': 'int', + 'ba': 'int', + 'bb': 'int', + 'bd': 'int', + 'be': 'int', + 'bf': 'int', + 'bg': 'int', + 'bh': 'int', + 'bi': 'int', + 'bj': 'int', + 'bl': 'int', + 'bm': 'int', + 'bn': 'int', + 'bo': 'int', + 'bq': 'int', + 'br': 'int', + 'bs': 'int', + 'bt': 'int', + 'bv': 'int', + 'bw': 'int', + 'by': 'int', + 'bz': 'int', + 'ca': 'int', + 'cc': 'int', + 'cd': 'int', + 'cf': 'int', + 'cg': 'int', + 'ch': 'int', + 'ci': 'int', + 'ck': 'int', + 'cl': 'int', + 'cm': 'int', + 'cn': 'int', + 'co': 'int', + 'cr': 'int', + 'cu': 'int', + 'cv': 'int', + 'cw': 'int', + 'cx': 'int', + 'cy': 'int', + 'cz': 'int', + 'de': 'int', + 'dj': 'int', + 'dk': 'int', + 'dm': 'int', + 'do': 'int', + 'dz': 'int', + 'ec': 'int', + 'ee': 'int', + 'eg': 'int', + 'eh': 'int', + 'er': 'int', + 'es': 'int', + 'et': 'int', + 'fi': 'int', + 'fj': 'int', + 'fk': 'int', + 'fm': 'int', + 'fo': 'int', + 'fr': 'int', + 'ga': 'int', + 'gb': 'int', + 'gd': 'int', + 'ge': 'int', + 'gf': 'int', + 'gg': 'int', + 'gh': 'int', + 'gi': 'int', + 'gl': 'int', + 'gm': 'int', + 'gn': 'int', + 'gp': 'int', + 'gq': 'int', + 'gr': 'int', + 'gs': 'int', + 'gt': 'int', + 'gu': 'int', + 'gw': 'int', + 'gy': 'int', + 'hk': 'int', + 'hm': 'int', + 'hn': 'int', + 'hr': 'int', + 'ht': 'int', + 'hu': 'int', + 'id': 'int', + 'ie': 'int', + 'il': 'int', + 'im': 'int', + 'in': 'int', + 'io': 'int', + 'iq': 'int', + 'ir': 'int', + 'is': 'int', + 'it': 'int', + 'je': 'int', + 'jm': 'int', + 'jo': 'int', + 'jp': 'int', + 'ke': 'int', + 'kg': 'int', + 'kh': 'int', + 'ki': 'int', + 'km': 'int', + 'kn': 'int', + 'kp': 'int', + 'kr': 'int', + 'kw': 'int', + 'ky': 'int', + 'kz': 'int', + 'la': 'int', + 'lb': 'int', + 'lc': 'int', + 'li': 'int', + 'lk': 'int', + 'lr': 'int', + 'ls': 'int', + 'lt': 'int', + 'lu': 'int', + 'lv': 'int', + 'ly': 'int', + 'ma': 'int', + 'mc': 'int', + 'md': 'int', + 'me': 'int', + 'mf': 'int', + 'mg': 'int', + 'mh': 'int', + 'mk': 'int', + 'ml': 'int', + 'mm': 'int', + 'mn': 'int', + 'mo': 'int', + 'mp': 'int', + 'mq': 'int', + 'mr': 'int', + 'ms': 'int', + 'mt': 'int', + 'mu': 'int', + 'mv': 'int', + 'mw': 'int', + 'mx': 'int', + 'my': 'int', + 'mz': 'int', + 'na': 'int', + 'nc': 'int', + 'ne': 'int', + 'nf': 'int', + 'ng': 'int', + 'ni': 'int', + 'nl': 'int', + 'no': 'int', + 'np': 'int', + 'nr': 'int', + 'nu': 'int', + 'nz': 'int', + 'om': 'int', + 'pa': 'int', + 'pe': 'int', + 'pf': 'int', + 'pg': 'int', + 'ph': 'int', + 'pk': 'int', + 'pl': 'int', + 'pm': 'int', + 'pn': 'int', + 'pr': 'int', + 'ps': 'int', + 'pt': 'int', + 'pw': 'int', + 'py': 'int', + 'qa': 'int', + 're': 'int', + 'ro': 'int', + 'rs': 'int', + 'ru': 'int', + 'rw': 'int', + 'sa': 'int', + 'sb': 'int', + 'sc': 'int', + 'sd': 'int', + 'se': 'int', + 'sg': 'int', + 'sh': 'int', + 'si': 'int', + 'sj': 'int', + 'sk': 'int', + 'sl': 'int', + 'sm': 'int', + 'sn': 'int', + 'so': 'int', + 'sr': 'int', + 'ss': 'int', + 'st': 'int', + 'sv': 'int', + 'sx': 'int', + 'sy': 'int', + 'sz': 'int', + 'tc': 'int', + 'td': 'int', + 'tf': 'int', + 'tg': 'int', + 'th': 'int', + 'tj': 'int', + 'tk': 'int', + 'tl': 'int', + 'tm': 'int', + 'tn': 'int', + 'to': 'int', + 'tr': 'int', + 'tt': 'int', + 'tv': 'int', + 'tw': 'int', + 'tz': 'int', + 'ua': 'int', + 'ug': 'int', + 'um': 'int', + 'us': 'int', + 'uy': 'int', + 'uz': 'int', + 'va': 'int', + 'vc': 'int', + 've': 'int', + 'vg': 'int', + 'vi': 'int', + 'vn': 'int', + 'vu': 'int', + 'wf': 'int', + 'ws': 'int', + 'xk': 'int', + 'ye': 'int', + 'yt': 'int', + 'za': 'int', + 'zm': 'int', + 'zw': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/destination.py b/tap_facebook/facebook_business/adobjects/destination.py new file mode 100644 index 0000000..c95c7ac --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/destination.py @@ -0,0 +1,208 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Destination( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDestination = True + super(Destination, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + address = 'address' + applinks = 'applinks' + category_specific_fields = 'category_specific_fields' + currency = 'currency' + description = 'description' + destination_id = 'destination_id' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + name = 'name' + price = 'price' + price_change = 'price_change' + sanitized_images = 'sanitized_images' + types = 'types' + unit_price = 'unit_price' + 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=Destination, + 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.') + 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=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_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 = { + 'address': 'string', + 'applinks': 'CatalogItemAppLinks', + 'category_specific_fields': 'CatalogSubVerticalList', + 'currency': 'string', + 'description': 'string', + 'destination_id': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'name': 'string', + 'price': 'string', + 'price_change': 'string', + 'sanitized_images': 'list', + 'types': 'list', + 'unit_price': 'Object', + 'url': 'string', + 'visibility': 'Visibility', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = Destination.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = Destination.Visibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/dynamicpostchildattachment.py b/tap_facebook/facebook_business/adobjects/dynamicpostchildattachment.py new file mode 100644 index 0000000..cfd34b9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/dynamicpostchildattachment.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 DynamicPostChildAttachment( + AbstractObject, +): + + def __init__(self, api=None): + super(DynamicPostChildAttachment, self).__init__() + self._isDynamicPostChildAttachment = True + self._api = api + + class Field(AbstractObject.Field): + description = 'description' + image_url = 'image_url' + link = 'link' + place_id = 'place_id' + product_id = 'product_id' + title = 'title' + + _field_types = { + 'description': 'string', + 'image_url': 'string', + 'link': 'string', + 'place_id': 'string', + 'product_id': 'string', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/dynamicpriceconfigbydate.py b/tap_facebook/facebook_business/adobjects/dynamicpriceconfigbydate.py new file mode 100644 index 0000000..694b982 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/dynamicpriceconfigbydate.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 DynamicPriceConfigByDate( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDynamicPriceConfigByDate = True + super(DynamicPriceConfigByDate, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + checkin_date = 'checkin_date' + prices = 'prices' + prices_pretty = 'prices_pretty' + 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=DynamicPriceConfigByDate, + 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 = { + 'checkin_date': 'string', + 'prices': 'string', + 'prices_pretty': 'list', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/dynamicvideometadata.py b/tap_facebook/facebook_business/adobjects/dynamicvideometadata.py new file mode 100644 index 0000000..849ccb2 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/engagement.py b/tap_facebook/facebook_business/adobjects/engagement.py new file mode 100644 index 0000000..e96347e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/engagement.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 Engagement( + AbstractObject, +): + + def __init__(self, api=None): + super(Engagement, self).__init__() + self._isEngagement = True + self._api = api + + class Field(AbstractObject.Field): + count = 'count' + count_string = 'count_string' + count_string_with_like = 'count_string_with_like' + count_string_without_like = 'count_string_without_like' + social_sentence = 'social_sentence' + social_sentence_with_like = 'social_sentence_with_like' + social_sentence_without_like = 'social_sentence_without_like' + + _field_types = { + 'count': 'unsigned int', + 'count_string': 'string', + 'count_string_with_like': 'string', + 'count_string_without_like': 'string', + 'social_sentence': 'string', + 'social_sentence_with_like': 'string', + 'social_sentence_without_like': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/entityattextrange.py b/tap_facebook/facebook_business/adobjects/entityattextrange.py new file mode 100644 index 0000000..0b2700e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/entityattextrange.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 EntityAtTextRange( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEntityAtTextRange = True + super(EntityAtTextRange, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + length = 'length' + name = 'name' + object = 'object' + offset = 'offset' + type = 'type' + + class Type: + application = 'application' + event = 'event' + group = 'group' + page = 'page' + user = 'user' + + _field_types = { + 'id': 'string', + 'length': 'unsigned int', + 'name': 'string', + 'object': 'Profile', + 'offset': 'unsigned int', + 'type': 'Type', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Type'] = EntityAtTextRange.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/event.py b/tap_facebook/facebook_business/adobjects/event.py new file mode 100644 index 0000000..ced539d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/event.py @@ -0,0 +1,528 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Event( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEvent = True + super(Event, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + attending_count = 'attending_count' + can_guests_invite = 'can_guests_invite' + category = 'category' + cover = 'cover' + created_time = 'created_time' + declined_count = 'declined_count' + description = 'description' + discount_code_enabled = 'discount_code_enabled' + end_time = 'end_time' + event_times = 'event_times' + guest_list_enabled = 'guest_list_enabled' + id = 'id' + interested_count = 'interested_count' + is_canceled = 'is_canceled' + is_draft = 'is_draft' + is_online = 'is_online' + is_page_owned = 'is_page_owned' + maybe_count = 'maybe_count' + name = 'name' + noreply_count = 'noreply_count' + online_event_format = 'online_event_format' + online_event_third_party_url = 'online_event_third_party_url' + owner = 'owner' + parent_group = 'parent_group' + place = 'place' + registration_setting = 'registration_setting' + scheduled_publish_time = 'scheduled_publish_time' + start_time = 'start_time' + ticket_setting = 'ticket_setting' + ticket_uri = 'ticket_uri' + ticket_uri_start_sales_time = 'ticket_uri_start_sales_time' + ticketing_privacy_uri = 'ticketing_privacy_uri' + ticketing_terms_uri = 'ticketing_terms_uri' + timezone = 'timezone' + type = 'type' + updated_time = 'updated_time' + + class Category: + classic_literature = 'CLASSIC_LITERATURE' + comedy = 'COMEDY' + crafts = 'CRAFTS' + dance = 'DANCE' + drinks = 'DRINKS' + fitness_and_workouts = 'FITNESS_AND_WORKOUTS' + foods = 'FOODS' + games = 'GAMES' + gardening = 'GARDENING' + healthy_living_and_self_care = 'HEALTHY_LIVING_AND_SELF_CARE' + health_and_medical = 'HEALTH_AND_MEDICAL' + home_and_garden = 'HOME_AND_GARDEN' + music_and_audio = 'MUSIC_AND_AUDIO' + parties = 'PARTIES' + professional_networking = 'PROFESSIONAL_NETWORKING' + religions = 'RELIGIONS' + shopping_event = 'SHOPPING_EVENT' + social_issues = 'SOCIAL_ISSUES' + sports = 'SPORTS' + theater = 'THEATER' + tv_and_movies = 'TV_AND_MOVIES' + visual_arts = 'VISUAL_ARTS' + + class OnlineEventFormat: + fb_live = 'fb_live' + messenger_room = 'messenger_room' + none = 'none' + other = 'other' + third_party = 'third_party' + + class Type: + community = 'community' + friends = 'friends' + group = 'group' + private = 'private' + public = 'public' + work_company = 'work_company' + + class EventStateFilter: + canceled = 'canceled' + draft = 'draft' + published = 'published' + scheduled_draft_for_publication = 'scheduled_draft_for_publication' + + class TimeFilter: + past = 'past' + upcoming = 'upcoming' + + 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=Event, + 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.nullnode import NullNode + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/comments', + 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 get_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/feed', + 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 get_live_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): + 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='/live_videos', + 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_live_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.livevideo import LiveVideo + param_types = { + 'content_tags': 'list', + 'description': 'string', + 'enable_backup_ingest': 'bool', + 'encoding_settings': 'string', + 'event_params': 'Object', + 'fisheye_video_cropped': 'bool', + 'front_z_rotation': 'float', + 'is_audio_only': 'bool', + 'is_spherical': 'bool', + 'original_fov': 'unsigned int', + 'privacy': 'string', + 'projection': 'projection_enum', + 'published': 'bool', + 'schedule_custom_profile_image': 'file', + 'spatial_audio_format': 'spatial_audio_format_enum', + 'status': 'status_enum', + 'stereoscopic_mode': 'stereoscopic_mode_enum', + 'stop_on_delete_stream': 'bool', + 'stream_type': 'stream_type_enum', + 'title': 'string', + } + enums = { + 'projection_enum': LiveVideo.Projection.__dict__.values(), + 'spatial_audio_format_enum': LiveVideo.SpatialAudioFormat.__dict__.values(), + 'status_enum': LiveVideo.Status.__dict__.values(), + 'stereoscopic_mode_enum': LiveVideo.StereoscopicMode.__dict__.values(), + 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/live_videos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideo, 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): + 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='/photos', + 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 get_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/picture', + 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 get_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.') + from facebook_business.adobjects.nullnode import NullNode + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/posts', + 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 get_roles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/roles', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_ticket_tiers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/ticket_tiers', + 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): + 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='/videos', + 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() + + _field_types = { + 'attending_count': 'int', + 'can_guests_invite': 'bool', + 'category': 'Category', + 'cover': 'CoverPhoto', + 'created_time': 'datetime', + 'declined_count': 'int', + 'description': 'string', + 'discount_code_enabled': 'bool', + 'end_time': 'string', + 'event_times': 'list', + 'guest_list_enabled': 'bool', + 'id': 'string', + 'interested_count': 'int', + 'is_canceled': 'bool', + 'is_draft': 'bool', + 'is_online': 'bool', + 'is_page_owned': 'bool', + 'maybe_count': 'int', + 'name': 'string', + 'noreply_count': 'int', + 'online_event_format': 'OnlineEventFormat', + 'online_event_third_party_url': 'string', + 'owner': 'Object', + 'parent_group': 'Group', + 'place': 'Place', + 'registration_setting': 'Object', + 'scheduled_publish_time': 'string', + 'start_time': 'string', + 'ticket_setting': 'Object', + 'ticket_uri': 'string', + 'ticket_uri_start_sales_time': 'string', + 'ticketing_privacy_uri': 'string', + 'ticketing_terms_uri': 'string', + 'timezone': 'string', + 'type': 'Type', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Category'] = Event.Category.__dict__.values() + field_enum_info['OnlineEventFormat'] = Event.OnlineEventFormat.__dict__.values() + field_enum_info['Type'] = Event.Type.__dict__.values() + field_enum_info['EventStateFilter'] = Event.EventStateFilter.__dict__.values() + field_enum_info['TimeFilter'] = Event.TimeFilter.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/eventsourcegroup.py b/tap_facebook/facebook_business/adobjects/eventsourcegroup.py new file mode 100644 index 0000000..6bc6d59 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/eventsourcegroup.py @@ -0,0 +1,182 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 EventSourceGroup( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEventSourceGroup = True + super(EventSourceGroup, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + event_sources = 'event_sources' + id = 'id' + name = 'name' + owner_business = 'owner_business' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'event_source_groups' + + # @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_event_source_group(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=EventSourceGroup, + 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 = { + 'event_sources': 'list', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventSourceGroup, + 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_shared_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='/shared_accounts', + 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 create_shared_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 = { + 'accounts': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/shared_accounts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventSourceGroup, + api_type='EDGE', + response_parser=ObjectParser(target_class=EventSourceGroup, 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', + 'event_sources': 'list', + 'id': 'string', + 'name': 'string', + 'owner_business': 'Business', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/experience.py b/tap_facebook/facebook_business/adobjects/experience.py new file mode 100644 index 0000000..872d6e9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/experience.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 Experience( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExperience = True + super(Experience, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + field_from = 'from' + id = 'id' + name = 'name' + field_with = 'with' + + _field_types = { + 'description': 'string', + 'from': 'Object', + 'id': 'string', + 'name': 'string', + 'with': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/extendedcredit.py b/tap_facebook/facebook_business/adobjects/extendedcredit.py new file mode 100644 index 0000000..f931012 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/extendedcredit.py @@ -0,0 +1,273 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ExtendedCredit( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExtendedCredit = True + super(ExtendedCredit, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + allocated_amount = 'allocated_amount' + balance = 'balance' + credit_available = 'credit_available' + credit_type = 'credit_type' + id = 'id' + is_access_revoked = 'is_access_revoked' + is_automated_experience = 'is_automated_experience' + legal_entity_name = 'legal_entity_name' + liable_address = 'liable_address' + liable_biz_name = 'liable_biz_name' + max_balance = 'max_balance' + online_max_balance = 'online_max_balance' + owner_business = 'owner_business' + owner_business_name = 'owner_business_name' + partition_from = 'partition_from' + receiving_credit_allocation_config = 'receiving_credit_allocation_config' + send_bill_to_address = 'send_bill_to_address' + send_bill_to_biz_name = 'send_bill_to_biz_name' + sold_to_address = 'sold_to_address' + + 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=ExtendedCredit, + 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_extended_credit_invoice_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.extendedcreditinvoicegroup import ExtendedCreditInvoiceGroup + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/extended_credit_invoice_groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExtendedCreditInvoiceGroup, + api_type='EDGE', + response_parser=ObjectParser(target_class=ExtendedCreditInvoiceGroup, 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_extended_credit_invoice_group(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.extendedcreditinvoicegroup import ExtendedCreditInvoiceGroup + param_types = { + 'emails': 'list', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/extended_credit_invoice_groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExtendedCreditInvoiceGroup, + api_type='EDGE', + response_parser=ObjectParser(target_class=ExtendedCreditInvoiceGroup, 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_owning_credit_allocation_configs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.extendedcreditallocationconfig import ExtendedCreditAllocationConfig + param_types = { + 'receiving_business_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/owning_credit_allocation_configs', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExtendedCreditAllocationConfig, + api_type='EDGE', + response_parser=ObjectParser(target_class=ExtendedCreditAllocationConfig, 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_owning_credit_allocation_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.') + from facebook_business.adobjects.extendedcreditallocationconfig import ExtendedCreditAllocationConfig + param_types = { + 'amount': 'Object', + 'liability_type': 'liability_type_enum', + 'partition_type': 'partition_type_enum', + 'receiving_business_id': 'string', + 'send_bill_to': 'send_bill_to_enum', + } + enums = { + 'liability_type_enum': ExtendedCreditAllocationConfig.LiabilityType.__dict__.values(), + 'partition_type_enum': ExtendedCreditAllocationConfig.PartitionType.__dict__.values(), + 'send_bill_to_enum': ExtendedCreditAllocationConfig.SendBillTo.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/owning_credit_allocation_configs', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExtendedCreditAllocationConfig, + api_type='EDGE', + response_parser=ObjectParser(target_class=ExtendedCreditAllocationConfig, 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_whatsapp_credit_sharing_and_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.') + param_types = { + 'waba_currency': 'string', + 'waba_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/whatsapp_credit_sharing_and_attach', + 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 = { + 'allocated_amount': 'CurrencyAmount', + 'balance': 'CurrencyAmount', + 'credit_available': 'CurrencyAmount', + 'credit_type': 'string', + 'id': 'string', + 'is_access_revoked': 'bool', + 'is_automated_experience': 'bool', + 'legal_entity_name': 'string', + 'liable_address': 'CRMAddress', + 'liable_biz_name': 'string', + 'max_balance': 'CurrencyAmount', + 'online_max_balance': 'CurrencyAmount', + 'owner_business': 'Business', + 'owner_business_name': 'string', + 'partition_from': 'string', + 'receiving_credit_allocation_config': 'ExtendedCreditAllocationConfig', + 'send_bill_to_address': 'CRMAddress', + 'send_bill_to_biz_name': 'string', + 'sold_to_address': 'CRMAddress', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/extendedcreditallocationconfig.py b/tap_facebook/facebook_business/adobjects/extendedcreditallocationconfig.py new file mode 100644 index 0000000..e640bd0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/extendedcreditallocationconfig.py @@ -0,0 +1,166 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ExtendedCreditAllocationConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExtendedCreditAllocationConfig = True + super(ExtendedCreditAllocationConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + currency_amount = 'currency_amount' + id = 'id' + liability_type = 'liability_type' + owning_business = 'owning_business' + owning_credential = 'owning_credential' + partition_type = 'partition_type' + receiving_business = 'receiving_business' + receiving_credential = 'receiving_credential' + request_status = 'request_status' + send_bill_to = 'send_bill_to' + + class LiabilityType: + msa = 'MSA' + normal = 'Normal' + sequential = 'Sequential' + + class PartitionType: + auth = 'AUTH' + fixed = 'FIXED' + fixed_without_partition = 'FIXED_WITHOUT_PARTITION' + + class SendBillTo: + advertiser = 'Advertiser' + agency = 'Agency' + + 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=ExtendedCreditAllocationConfig, + 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 = { + 'amount': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExtendedCreditAllocationConfig, + 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_amount': 'CurrencyAmount', + 'id': 'string', + 'liability_type': 'string', + 'owning_business': 'Business', + 'owning_credential': 'ExtendedCredit', + 'partition_type': 'string', + 'receiving_business': 'Business', + 'receiving_credential': 'ExtendedCredit', + 'request_status': 'string', + 'send_bill_to': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['LiabilityType'] = ExtendedCreditAllocationConfig.LiabilityType.__dict__.values() + field_enum_info['PartitionType'] = ExtendedCreditAllocationConfig.PartitionType.__dict__.values() + field_enum_info['SendBillTo'] = ExtendedCreditAllocationConfig.SendBillTo.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/extendedcreditinvoicegroup.py b/tap_facebook/facebook_business/adobjects/extendedcreditinvoicegroup.py new file mode 100644 index 0000000..cbb6493 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/extendedcreditinvoicegroup.py @@ -0,0 +1,242 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ExtendedCreditInvoiceGroup( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExtendedCreditInvoiceGroup = True + super(ExtendedCreditInvoiceGroup, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + auto_enroll = 'auto_enroll' + bill_to_address = 'bill_to_address' + customer_po_number = 'customer_po_number' + email = 'email' + emails = 'emails' + id = 'id' + liable_address = 'liable_address' + name = 'name' + sold_to_address = 'sold_to_address' + + 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=ExtendedCreditInvoiceGroup, + 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 = { + 'emails': 'list', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExtendedCreditInvoiceGroup, + 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_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.') + param_types = { + 'ad_account_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/ad_accounts', + 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_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='/ad_accounts', + 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 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.') + from facebook_business.adobjects.adaccount import AdAccount + param_types = { + 'ad_account_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/ad_accounts', + 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 = { + 'auto_enroll': 'bool', + 'bill_to_address': 'CRMAddress', + 'customer_po_number': 'string', + 'email': 'Object', + 'emails': 'list', + 'id': 'string', + 'liable_address': 'CRMAddress', + 'name': 'string', + 'sold_to_address': 'CRMAddress', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/externaleventsource.py b/tap_facebook/facebook_business/adobjects/externaleventsource.py new file mode 100644 index 0000000..ca0c984 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/externaleventsource.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 +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 ExternalEventSource( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExternalEventSource = True + super(ExternalEventSource, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + source_type = 'source_type' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'external_event_sources' + + _field_types = { + 'id': 'string', + 'name': 'string', + 'source_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/fameexportconfig.py b/tap_facebook/facebook_business/adobjects/fameexportconfig.py new file mode 100644 index 0000000..977c443 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/fameexportconfig.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 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/tap_facebook/facebook_business/adobjects/flexibletargeting.py b/tap_facebook/facebook_business/adobjects/flexibletargeting.py new file mode 100644 index 0000000..89cb680 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/flexibletargeting.py @@ -0,0 +1,91 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class FlexibleTargeting( + AbstractObject, +): + + def __init__(self, api=None): + super(FlexibleTargeting, self).__init__() + self._isFlexibleTargeting = True + self._api = api + + class Field(AbstractObject.Field): + behaviors = 'behaviors' + college_years = 'college_years' + connections = 'connections' + custom_audiences = 'custom_audiences' + education_majors = 'education_majors' + education_schools = 'education_schools' + education_statuses = 'education_statuses' + ethnic_affinity = 'ethnic_affinity' + family_statuses = 'family_statuses' + friends_of_connections = 'friends_of_connections' + generation = 'generation' + home_ownership = 'home_ownership' + home_type = 'home_type' + home_value = 'home_value' + household_composition = 'household_composition' + income = 'income' + industries = 'industries' + interested_in = 'interested_in' + interests = 'interests' + life_events = 'life_events' + moms = 'moms' + net_worth = 'net_worth' + office_type = 'office_type' + politics = 'politics' + relationship_statuses = 'relationship_statuses' + user_adclusters = 'user_adclusters' + work_employers = 'work_employers' + work_positions = 'work_positions' + + _field_types = { + 'behaviors': 'list', + 'college_years': 'list', + 'connections': 'list', + 'custom_audiences': 'list', + 'education_majors': 'list', + 'education_schools': 'list', + 'education_statuses': 'list', + 'ethnic_affinity': 'list', + 'family_statuses': 'list', + 'friends_of_connections': 'list', + 'generation': 'list', + 'home_ownership': 'list', + 'home_type': 'list', + 'home_value': 'list', + 'household_composition': 'list', + 'income': 'list', + 'industries': 'list', + 'interested_in': 'list', + 'interests': 'list', + 'life_events': 'list', + 'moms': 'list', + 'net_worth': 'list', + 'office_type': 'list', + 'politics': 'list', + 'relationship_statuses': 'list', + 'user_adclusters': 'list', + 'work_employers': 'list', + 'work_positions': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/flight.py b/tap_facebook/facebook_business/adobjects/flight.py new file mode 100644 index 0000000..0072291 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/flight.py @@ -0,0 +1,251 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Flight( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFlight = True + super(Flight, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + applinks = 'applinks' + category_specific_fields = 'category_specific_fields' + currency = 'currency' + description = 'description' + destination_airport = 'destination_airport' + destination_city = 'destination_city' + flight_id = 'flight_id' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + oneway_currency = 'oneway_currency' + oneway_price = 'oneway_price' + origin_airport = 'origin_airport' + origin_city = 'origin_city' + price = 'price' + sanitized_images = 'sanitized_images' + unit_price = 'unit_price' + 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=Flight, + 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 = { + 'currency': 'string', + 'description': 'string', + 'destination_airport': 'string', + 'destination_city': 'string', + 'images': 'list', + 'origin_airport': 'string', + 'origin_city': 'string', + 'price': 'unsigned int', + 'url': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Flight, + 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.') + 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=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_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 = { + 'applinks': 'CatalogItemAppLinks', + 'category_specific_fields': 'CatalogSubVerticalList', + 'currency': 'string', + 'description': 'string', + 'destination_airport': 'string', + 'destination_city': 'string', + 'flight_id': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'oneway_currency': 'string', + 'oneway_price': 'string', + 'origin_airport': 'string', + 'origin_city': 'string', + 'price': 'string', + 'sanitized_images': 'list', + 'unit_price': 'Object', + 'url': 'string', + 'visibility': 'Visibility', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = Flight.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = Flight.Visibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/fundingsourcedetails.py b/tap_facebook/facebook_business/adobjects/fundingsourcedetails.py new file mode 100644 index 0000000..8509f02 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/fundingsourcedetails.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 FundingSourceDetails( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFundingSourceDetails = True + super(FundingSourceDetails, self).__init__(fbid, parent_id, api) + + 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', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/fundingsourcedetailscoupon.py b/tap_facebook/facebook_business/adobjects/fundingsourcedetailscoupon.py new file mode 100644 index 0000000..fc18926 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/fundingsourcedetailscoupon.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 FundingSourceDetailsCoupon( + AbstractObject, +): + + def __init__(self, api=None): + super(FundingSourceDetailsCoupon, self).__init__() + self._isFundingSourceDetailsCoupon = True + self._api = api + + 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', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/fundraiserpersontocharity.py b/tap_facebook/facebook_business/adobjects/fundraiserpersontocharity.py new file mode 100644 index 0000000..5c56fde --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/fundraiserpersontocharity.py @@ -0,0 +1,280 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 FundraiserPersonToCharity( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFundraiserPersonToCharity = True + super(FundraiserPersonToCharity, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + amount_raised = 'amount_raised' + charity_id = 'charity_id' + currency = 'currency' + description = 'description' + donations_count = 'donations_count' + donors_count = 'donors_count' + end_time = 'end_time' + external_amount_raised = 'external_amount_raised' + external_donations_count = 'external_donations_count' + external_donors_count = 'external_donors_count' + external_event_name = 'external_event_name' + external_event_start_time = 'external_event_start_time' + external_event_uri = 'external_event_uri' + external_fundraiser_uri = 'external_fundraiser_uri' + external_id = 'external_id' + goal_amount = 'goal_amount' + id = 'id' + internal_amount_raised = 'internal_amount_raised' + internal_donations_count = 'internal_donations_count' + internal_donors_count = 'internal_donors_count' + name = 'name' + uri = 'uri' + + class FundraiserType: + person_for_charity = 'person_for_charity' + + 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=FundraiserPersonToCharity, + 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 = { + 'description': 'string', + 'end_time': 'datetime', + 'external_event_name': 'string', + 'external_event_start_time': 'datetime', + 'external_event_uri': 'string', + 'external_fundraiser_uri': 'string', + 'external_id': 'string', + 'goal_amount': 'unsigned int', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FundraiserPersonToCharity, + 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_donations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/donations', + 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_end_fundraiser(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/end_fundraiser', + 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_external_donations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/external_donations', + 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_external_donation(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'amount_received': 'unsigned int', + 'currency': 'string', + 'donation_id_hash': 'string', + 'donation_time': 'unsigned int', + 'donor_id_hash': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/external_donations', + 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 = { + 'amount_raised': 'int', + 'charity_id': 'string', + 'currency': 'string', + 'description': 'string', + 'donations_count': 'int', + 'donors_count': 'int', + 'end_time': 'datetime', + 'external_amount_raised': 'int', + 'external_donations_count': 'int', + 'external_donors_count': 'int', + 'external_event_name': 'string', + 'external_event_start_time': 'datetime', + 'external_event_uri': 'string', + 'external_fundraiser_uri': 'string', + 'external_id': 'string', + 'goal_amount': 'int', + 'id': 'string', + 'internal_amount_raised': 'int', + 'internal_donations_count': 'int', + 'internal_donors_count': 'int', + 'name': 'string', + 'uri': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['FundraiserType'] = FundraiserPersonToCharity.FundraiserType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/group.py b/tap_facebook/facebook_business/adobjects/group.py new file mode 100644 index 0000000..52b9475 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/group.py @@ -0,0 +1,1175 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Group( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isGroup = True + super(Group, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + archived = 'archived' + cover = 'cover' + created_time = 'created_time' + description = 'description' + email = 'email' + icon = 'icon' + id = 'id' + install = 'install' + link = 'link' + member_count = 'member_count' + member_request_count = 'member_request_count' + name = 'name' + parent = 'parent' + permissions = 'permissions' + privacy = 'privacy' + purpose = 'purpose' + subdomain = 'subdomain' + updated_time = 'updated_time' + venue = 'venue' + + class JoinSetting: + admin_only = 'ADMIN_ONLY' + anyone = 'ANYONE' + none = 'NONE' + + class PostPermissions: + admin_only = 'ADMIN_ONLY' + anyone = 'ANYONE' + none = 'NONE' + + class Purpose: + casual = 'CASUAL' + coworkers = 'COWORKERS' + custom = 'CUSTOM' + for_sale = 'FOR_SALE' + for_work = 'FOR_WORK' + game = 'GAME' + health_support = 'HEALTH_SUPPORT' + jobs = 'JOBS' + learning = 'LEARNING' + none = 'NONE' + parenting = 'PARENTING' + streamer = 'STREAMER' + work_announcement = 'WORK_ANNOUNCEMENT' + work_demo_group = 'WORK_DEMO_GROUP' + work_discussion = 'WORK_DISCUSSION' + work_ephemeral = 'WORK_EPHEMERAL' + work_feedback = 'WORK_FEEDBACK' + work_for_sale = 'WORK_FOR_SALE' + work_garden = 'WORK_GARDEN' + work_integrity = 'WORK_INTEGRITY' + work_learning = 'WORK_LEARNING' + work_mentorship = 'WORK_MENTORSHIP' + work_multi_company = 'WORK_MULTI_COMPANY' + work_recruiting = 'WORK_RECRUITING' + work_social = 'WORK_SOCIAL' + work_stages = 'WORK_STAGES' + work_team = 'WORK_TEAM' + work_teamwork = 'WORK_TEAMWORK' + + class GroupType: + casual = 'CASUAL' + coworkers = 'COWORKERS' + custom = 'CUSTOM' + for_sale = 'FOR_SALE' + for_work = 'FOR_WORK' + game = 'GAME' + health_support = 'HEALTH_SUPPORT' + jobs = 'JOBS' + learning = 'LEARNING' + none = 'NONE' + parenting = 'PARENTING' + streamer = 'STREAMER' + work_announcement = 'WORK_ANNOUNCEMENT' + work_demo_group = 'WORK_DEMO_GROUP' + work_discussion = 'WORK_DISCUSSION' + work_ephemeral = 'WORK_EPHEMERAL' + work_feedback = 'WORK_FEEDBACK' + work_for_sale = 'WORK_FOR_SALE' + work_garden = 'WORK_GARDEN' + work_integrity = 'WORK_INTEGRITY' + work_learning = 'WORK_LEARNING' + work_mentorship = 'WORK_MENTORSHIP' + work_multi_company = 'WORK_MULTI_COMPANY' + work_recruiting = 'WORK_RECRUITING' + work_social = 'WORK_SOCIAL' + work_stages = 'WORK_STAGES' + work_team = 'WORK_TEAM' + work_teamwork = 'WORK_TEAMWORK' + + 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 = { + 'icon_size': 'icon_size_enum', + } + enums = { + 'icon_size_enum': [ + '16', + '34', + '50', + '68', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + 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 = { + 'cover': 'string', + 'cover_url': 'string', + 'description': 'string', + 'focus_x': 'float', + 'focus_y': 'float', + 'group_icon': 'string', + 'is_official_group': 'bool', + 'join_setting': 'join_setting_enum', + 'name': 'string', + 'no_feed_story': 'bool', + 'offset_y': 'int', + 'post_permissions': 'post_permissions_enum', + 'post_requires_admin_approval': 'bool', + 'privacy': 'string', + 'purpose': 'purpose_enum', + 'update_view_time': 'bool', + } + enums = { + 'join_setting_enum': Group.JoinSetting.__dict__.values(), + 'post_permissions_enum': Group.PostPermissions.__dict__.values(), + 'purpose_enum': Group.Purpose.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + 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_admins(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'uid': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/admins', + 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_admin(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'uid': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/admins', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + api_type='EDGE', + response_parser=ObjectParser(target_class=Group, 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_albums(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.album import Album + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/albums', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Album, + api_type='EDGE', + response_parser=ObjectParser(target_class=Album, 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_album(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.album import Album + param_types = { + 'contributors': 'list', + 'description': 'string', + 'is_default': 'bool', + 'location': 'string', + 'make_shared_album': 'bool', + 'message': 'string', + 'name': 'string', + 'place': 'Object', + 'privacy': 'string', + 'session_id': 'string', + 'tags': 'list', + 'visible': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/albums', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Album, + api_type='EDGE', + response_parser=ObjectParser(target_class=Album, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/docs', + 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_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.event import Event + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/events', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Event, + api_type='EDGE', + response_parser=ObjectParser(target_class=Event, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.post import Post + param_types = { + 'include_hidden': 'bool', + 'q': 'string', + 'show_expired': 'bool', + 'since': 'datetime', + 'until': 'datetime', + 'with': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/feed', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + api_type='EDGE', + response_parser=ObjectParser(target_class=Post, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.post import Post + param_types = { + 'actions': 'Object', + 'adaptive_type': 'string', + 'album_id': 'string', + 'android_key_hash': 'string', + 'animated_effect_id': 'unsigned int', + 'application_id': 'string', + 'asked_fun_fact_prompt_id': 'unsigned int', + 'asset3d_id': 'unsigned int', + 'associated_id': 'string', + 'attach_place_suggestion': 'bool', + 'attached_media': 'list', + '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', + 'child_attachments': 'list', + 'client_mutation_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', + 'connection_class': 'string', + 'content_attachment': 'string', + 'coordinates': 'Object', + 'cta_link': 'string', + 'cta_type': 'string', + 'description': 'string', + 'direct_share_status': 'unsigned int', + 'expanded_height': 'unsigned int', + 'expanded_width': 'unsigned int', + 'feed_targeting': 'Object', + 'formatting': 'formatting_enum', + 'fun_fact_prompt_id': 'unsigned int', + 'fun_fact_toastee_id': 'unsigned int', + 'height': 'unsigned int', + 'holiday_card': 'string', + 'home_checkin_city_id': 'Object', + 'image_crops': 'map', + 'implicit_with_tags': 'list', + 'instant_game_entry_point_data': 'string', + 'ios_bundle_id': 'string', + 'is_backout_draft': 'bool', + 'is_boost_intended': 'bool', + 'is_explicit_location': 'bool', + 'is_explicit_share': 'bool', + 'is_group_linking_post': 'bool', + 'is_photo_container': 'bool', + 'link': 'string', + 'location_source_id': 'string', + 'manual_privacy': 'bool', + 'message': 'string', + 'multi_share_end_card': 'bool', + 'multi_share_optimized': 'bool', + 'name': 'string', + 'nectar_module': 'string', + 'object_attachment': 'string', + 'offer_like_post_id': 'unsigned int', + 'og_action_type_id': 'string', + 'og_hide_object_attachment': 'bool', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'page_recommendation': 'string', + 'picture': 'string', + 'place': 'Object', + 'place_attachment_setting': 'place_attachment_setting_enum', + 'place_list': 'string', + 'place_list_data': 'list', + 'post_surfaces_blacklist': 'list', + 'posting_to_redspace': 'posting_to_redspace_enum', + 'privacy': 'string', + 'prompt_id': 'string', + 'prompt_tracking_string': 'string', + 'properties': 'Object', + 'proxied_app_id': 'string', + 'publish_event_id': 'unsigned int', + 'published': 'bool', + 'quote': 'string', + 'react_mode_metadata': 'string', + 'ref': 'list', + 'referenceable_image_ids': 'list', + 'referral_id': 'string', + 'scheduled_publish_time': 'datetime', + 'source': 'string', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'suggested_place_id': 'Object', + 'tags': 'list', + 'target_surface': 'target_surface_enum', + 'targeting': 'Object', + 'text_format_metadata': 'string', + 'text_format_preset_id': 'string', + 'text_only_place': 'string', + 'throwback_camera_roll_media': 'string', + 'thumbnail': 'file', + 'time_since_original_post': 'unsigned int', + 'title': 'string', + 'tracking_info': 'string', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'user_selected_tags': 'bool', + 'video_start_time_ms': 'unsigned int', + 'viewer_coordinates': 'Object', + 'width': 'unsigned int', + } + enums = { + 'backdated_time_granularity_enum': Post.BackdatedTimeGranularity.__dict__.values(), + 'formatting_enum': Post.Formatting.__dict__.values(), + 'place_attachment_setting_enum': Post.PlaceAttachmentSetting.__dict__.values(), + 'post_surfaces_blacklist_enum': Post.PostSurfacesBlacklist.__dict__.values(), + 'posting_to_redspace_enum': Post.PostingToRedspace.__dict__.values(), + 'target_surface_enum': Post.TargetSurface.__dict__.values(), + 'unpublished_content_type_enum': Post.UnpublishedContentType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/feed', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + api_type='EDGE', + response_parser=ObjectParser(target_class=Post, 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_files(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/files', + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + api_type='EDGE', + response_parser=ObjectParser(target_class=Group, 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_group(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'admin': 'int', + 'description': 'string', + 'group_icon_id': 'string', + 'group_type': 'group_type_enum', + 'join_setting': 'join_setting_enum', + 'name': 'string', + 'parent_id': 'string', + 'post_permissions': 'post_permissions_enum', + 'post_requires_admin_approval': 'bool', + 'privacy': 'string', + 'ref': 'string', + } + enums = { + 'group_type_enum': Group.GroupType.__dict__.values(), + 'join_setting_enum': Group.JoinSetting.__dict__.values(), + 'post_permissions_enum': Group.PostPermissions.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + api_type='EDGE', + response_parser=ObjectParser(target_class=Group, 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_live_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.livevideo import LiveVideo + param_types = { + 'broadcast_status': 'list', + 'source': 'source_enum', + } + enums = { + 'broadcast_status_enum': LiveVideo.BroadcastStatus.__dict__.values(), + 'source_enum': LiveVideo.Source.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/live_videos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideo, 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_live_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.livevideo import LiveVideo + param_types = { + 'content_tags': 'list', + 'description': 'string', + 'enable_backup_ingest': 'bool', + 'encoding_settings': 'string', + 'event_params': 'Object', + 'fisheye_video_cropped': 'bool', + 'front_z_rotation': 'float', + 'is_audio_only': 'bool', + 'is_spherical': 'bool', + 'original_fov': 'unsigned int', + 'privacy': 'string', + 'projection': 'projection_enum', + 'published': 'bool', + 'schedule_custom_profile_image': 'file', + 'spatial_audio_format': 'spatial_audio_format_enum', + 'status': 'status_enum', + 'stereoscopic_mode': 'stereoscopic_mode_enum', + 'stop_on_delete_stream': 'bool', + 'stream_type': 'stream_type_enum', + 'title': 'string', + } + enums = { + 'projection_enum': LiveVideo.Projection.__dict__.values(), + 'spatial_audio_format_enum': LiveVideo.SpatialAudioFormat.__dict__.values(), + 'status_enum': LiveVideo.Status.__dict__.values(), + 'stereoscopic_mode_enum': LiveVideo.StereoscopicMode.__dict__.values(), + 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/live_videos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideo, 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_members(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'email': 'string', + 'member': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/members', + 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_member(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'email': 'string', + 'from': 'int', + 'member': 'int', + 'rate': 'unsigned int', + 'source': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/members', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + api_type='EDGE', + response_parser=ObjectParser(target_class=Group, 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_opted_in_members(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/opted_in_members', + 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() + + def create_photo(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.photo import Photo + param_types = { + 'aid': 'string', + 'allow_spherical_photo': 'bool', + 'alt_text_custom': 'string', + 'android_key_hash': 'string', + 'application_id': 'string', + 'attempt': 'unsigned int', + 'audience_exp': 'bool', + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'caption': 'string', + 'composer_session_id': 'string', + 'direct_share_status': 'unsigned int', + 'feed_targeting': 'Object', + 'filter_type': 'unsigned int', + 'full_res_is_coming_later': 'bool', + 'initial_view_heading_override_degrees': 'unsigned int', + 'initial_view_pitch_override_degrees': 'unsigned int', + 'initial_view_vertical_fov_override_degrees': 'unsigned int', + 'ios_bundle_id': 'string', + 'is_explicit_location': 'bool', + 'is_explicit_place': 'bool', + 'manual_privacy': 'bool', + 'message': 'string', + 'name': 'string', + 'no_story': 'bool', + 'offline_id': 'unsigned int', + 'og_action_type_id': 'string', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'place': 'Object', + 'privacy': 'string', + 'profile_id': 'int', + 'proxied_app_id': 'string', + 'published': 'bool', + 'qn': 'string', + 'spherical_metadata': 'map', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'tags': 'list', + 'target_id': 'int', + 'targeting': 'Object', + 'time_since_original_post': 'unsigned int', + 'uid': 'int', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'url': 'string', + 'user_selected_tags': 'bool', + 'vault_image_id': 'string', + } + enums = { + 'backdated_time_granularity_enum': Photo.BackdatedTimeGranularity.__dict__.values(), + 'unpublished_content_type_enum': Photo.UnpublishedContentType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/photos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Photo, + api_type='EDGE', + response_parser=ObjectParser(target_class=Photo, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profilepicturesource import ProfilePictureSource + param_types = { + 'height': 'int', + 'redirect': 'bool', + 'type': 'type_enum', + 'width': 'int', + } + enums = { + 'type_enum': ProfilePictureSource.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/picture', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProfilePictureSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProfilePictureSource, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.advideo import AdVideo + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': AdVideo.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + 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) + + if batch is 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 = { + 'adaptive_type': 'string', + 'animated_effect_id': 'unsigned int', + 'application_id': 'string', + 'asked_fun_fact_prompt_id': 'unsigned int', + 'audio_story_wave_animation_handle': '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_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_explicit_share': 'bool', + 'is_group_linking_post': 'bool', + 'is_voice_clip': 'bool', + 'location_source_id': 'string', + 'manual_privacy': 'bool', + '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', + 'published': 'bool', + 'react_mode_metadata': 'string', + 'referenced_sticker_id': 'string', + 'replace_video_id': 'string', + 'scheduled_publish_time': 'unsigned int', + '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', + '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(), + } + 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) + + if batch is 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 = { + 'archived': 'bool', + 'cover': 'CoverPhoto', + 'created_time': 'datetime', + 'description': 'string', + 'email': 'string', + 'icon': 'string', + 'id': 'string', + 'install': 'Object', + 'link': 'string', + 'member_count': 'unsigned int', + 'member_request_count': 'unsigned int', + 'name': 'string', + 'parent': 'Object', + 'permissions': 'list', + 'privacy': 'string', + 'purpose': 'string', + 'subdomain': 'string', + 'updated_time': 'datetime', + 'venue': 'Location', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['JoinSetting'] = Group.JoinSetting.__dict__.values() + field_enum_info['PostPermissions'] = Group.PostPermissions.__dict__.values() + field_enum_info['Purpose'] = Group.Purpose.__dict__.values() + field_enum_info['GroupType'] = Group.GroupType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/hasleadaccess.py b/tap_facebook/facebook_business/adobjects/hasleadaccess.py new file mode 100644 index 0000000..5d8a6c4 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/helpers/__init__.py b/tap_facebook/facebook_business/adobjects/helpers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tap_facebook/facebook_business/adobjects/helpers/adaccountmixin.py b/tap_facebook/facebook_business/adobjects/helpers/adaccountmixin.py new file mode 100644 index 0000000..f891465 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/adaccountmixin.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 import agencyclientdeclaration + +class AdAccountMixin: + class AccountStatus(object): + active = 1 + disabled = 2 + in_grace_period = 9 + pending_closure = 100 + pending_review = 7 + temporarily_unavailable = 101 + unsettled = 3 + + class AgencyClientDeclaration(agencyclientdeclaration.AgencyClientDeclaration.Field): + pass + + class Capabilities(object): + bulk_account = 'BULK_ACCOUNT' + can_use_reach_and_frequency = 'CAN_USE_REACH_AND_FREQUENCY' + direct_sales = 'DIRECT_SALES' + view_tags = 'VIEW_TAGS' + + class TaxIdStatus(object): + account_is_personal = 5 + offline_vat_validation_failed = 4 + unknown = 0 + vat_information_required = 3 + vat_not_required = 1 + + @classmethod + def get_my_account(cls, api=None): + from facebook_business.adobjects.adaccountuser import AdAccountUser + """Returns first AdAccount associated with 'me' given api instance.""" + # Setup user and read the object from the server + me = AdAccountUser(fbid='me', api=api) + + # Get first account connected to the user + return me.edge_object(cls) + + def opt_out_user_from_targeting(self, + schema, + users, + is_raw=False, + app_ids=None, + pre_hashed=None): + from facebook_business.adobjects.customaudience import CustomAudience + """Opts out users from being targeted by this ad account. + + Args: + schema: A CustomAudience.Schema value + users: a list of identites that follow the schema given + + Returns: + Return FacebookResponse object + """ + return self.get_api_assured().call( + 'DELETE', + (self.get_id_assured(), 'usersofanyaudience'), + params=CustomAudience.format_params(schema, + users, + is_raw, + app_ids, + pre_hashed), + ) diff --git a/tap_facebook/facebook_business/adobjects/helpers/adaccountusermixin.py b/tap_facebook/facebook_business/adobjects/helpers/adaccountusermixin.py new file mode 100644 index 0000000..6021ded --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/adaccountusermixin.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.adaccount import AdAccount +from facebook_business.adobjects.page import Page +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +class AdAccountUserMixin: + + class Field(object): + id = 'id' + name = 'name' + permissions = 'permissions' + role = 'role' + class Permission(object): + account_admin = 1 + admanager_read = 2 + admanager_write = 3 + billing_read = 4 + billing_write = 5 + reports = 7 + + class Role(object): + administrator = 1001 + analyst = 1003 + manager = 1002 + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'users' + + def get_ad_accounts(self, fields=None, params=None): + """Returns iterator over AdAccounts associated with this user.""" + return self.iterate_edge(AdAccount, fields, params, endpoint='adaccounts') + + def get_ad_account(self, fields=None, params=None): + """Returns first AdAccount associated with this user.""" + return self.edge_object(AdAccount, fields, params) + + def get_pages(self, fields=None, params=None): + """Returns iterator over Pages's associated with this user.""" + return self.iterate_edge(Page, fields, params) diff --git a/tap_facebook/facebook_business/adobjects/helpers/adimagemixin.py b/tap_facebook/facebook_business/adobjects/helpers/adimagemixin.py new file mode 100644 index 0000000..4269224 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/adimagemixin.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.adaccount import AdAccount +from facebook_business.api import FacebookAdsApi +from facebook_business.exceptions import FacebookBadObjectError +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject + +class AdImageMixin: + @classmethod + def remote_create_from_zip(cls, filename, parent_id, api=None): + api = api or FacebookAdsApi.get_default_api() + with open(filename, 'rb') as open_file: + response = api.call( + 'POST', + (parent_id, cls.get_endpoint()), + files={filename: open_file}, + ) + data = response.json() + + objs = [] + for image_filename in data['images']: + image = cls(parent_id=parent_id) + image.update(data['images'][image_filename]) + image[cls.Field.id] = '%s:%s' % ( + parent_id[4:], + data['images'][image_filename][cls.Field.hash], + ) + objs.append(image) + + return objs + + def get_node_path(self): + return (self.get_parent_id_assured(), self.get_endpoint()) + + def _set_data(self, data): + """ + `data` may have a different structure depending if you're creating + new AdImages or iterating over existing ones using something like + AdAccount.get_ad_images(). + While reading existing images, _set_data from AbstractCrudObject + handles everything correctly, but we need to treat the + remote_create case. + remote_create sample response: + { + "images": { + "8cf726a44ab7008c5cc6b4ebd2491234": { + "hash":"8cf726a44ab7008c5cc6b4ebd2491234", + "url":"https://fbcdn-photos-a.akamaihd.net/..." + } + } + } + Sample response when calling act_/adimages, used internally + by AdAccount.get_ad_images(): + { + "data": [ + { + "hash": "181b88e3cdf6464af7ed52fe488fe559", + "id": "1739564149602806:181b88e3cdf6464af7ed52fe488fe559" + } + ], + "paging": { + "cursors": { + "before": "MTczOTU2NDE0OTYwMjgwNjoxODFiODh==", + "after": "MTczOTU2NDE0OTYwMjgwNjoxODFiODhl==" + } + } + } + """ + + if 'images' not in data: + return AbstractCrudObject._set_data(self, data) + + _, data = data['images'].popitem() + + for key in map(str, data): + self._data[key] = data[key] + + # clear history due to the update + self._changes.pop(key, None) + + self._data[self.Field.id] = '%s:%s' % ( + self.get_parent_id_assured()[4:], + self[self.Field.hash], + ) + + return self + + def remote_create( + self, + batch=None, + failure=None, + files=None, + params=None, + success=None, + api_version=None, + ): + """Uploads filename and creates the AdImage object from it. + It has same arguments as AbstractCrudObject.remote_create except it + does not have the files argument but requires the 'filename' property + to be defined. + """ + if not self[self.Field.filename]: + raise FacebookBadObjectError( + "AdImage required a filename to be defined.", + ) + filename = self[self.Field.filename] + with open(filename, 'rb') as open_file: + return_val = AbstractCrudObject.remote_create( + self, + files={filename: open_file}, + batch=batch, + failure=failure, + params=params, + success=success, + api_version=api_version, + ) + return return_val + + def get_hash(self): + """Returns the image hash to which AdCreative's can refer.""" + return self[self.Field.hash] + + def remote_read( + self, + batch=None, + failure=None, + fields=None, + params=None, + success=None, + api_version=None, + ): + if self[self.__class__.Field.id]: + _, image_hash = self[self.__class__.Field.id].split(':') + account = AdAccount(fbid=self.get_parent_id_assured()) + params = { + 'hashes': [ + image_hash, + ], + } + images = account.get_ad_images(fields=fields, params=params) + if images: + self._set_data(images[0]._data) diff --git a/tap_facebook/facebook_business/adobjects/helpers/adpreviewmixin.py b/tap_facebook/facebook_business/adobjects/helpers/adpreviewmixin.py new file mode 100644 index 0000000..b292d1f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/adpreviewmixin.py @@ -0,0 +1,10 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 AdPreviewMixin: + def get_html(self): + """Returns the preview html.""" + return self[self.Field.body] diff --git a/tap_facebook/facebook_business/adobjects/helpers/adreportrunmixin.py b/tap_facebook/facebook_business/adobjects/helpers/adreportrunmixin.py new file mode 100644 index 0000000..c9a70ab --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/adreportrunmixin.py @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 AdReportRunMixin: + + def get_result(self, fields=None, params=None): + """ + Gets the final result from an async job + Accepts params such as limit + """ + return self.get_insights(fields=fields, params=params) + + def __nonzero__(self): + return self[self.Field.async_percent_completion] == 100 + + def _setitem_trigger(self, key, value): + if key == 'report_run_id': + self._data['id'] = self['report_run_id'] diff --git a/tap_facebook/facebook_business/adobjects/helpers/adsinsightsmixin.py b/tap_facebook/facebook_business/adobjects/helpers/adsinsightsmixin.py new file mode 100644 index 0000000..2eab923 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/adsinsightsmixin.py @@ -0,0 +1,28 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 AdsInsightsMixin: + + class Increment(object): + monthly = 'monthly' + all_days = 'all_days' + + class Operator(object): + all = 'ALL' + any = 'ANY' + contain = 'CONTAIN' + equal = 'EQUAL' + greater_than = 'GREATER_THAN' + greater_than_or_equal = 'GREATER_THAN_OR_EQUAL' + in_ = 'IN' + in_range = 'IN_RANGE' + less_than = 'LESS_THAN' + less_than_or_equal = 'LESS_THAN_OR_EQUAL' + none = 'NONE' + not_contain = 'NOT_CONTAIN' + not_equal = 'NOT_EQUAL' + not_in = 'NOT_IN' + not_in_range = 'NOT_IN_RANGE' diff --git a/tap_facebook/facebook_business/adobjects/helpers/businessmixin.py b/tap_facebook/facebook_business/adobjects/helpers/businessmixin.py new file mode 100644 index 0000000..bd2bc93 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/businessmixin.py @@ -0,0 +1,18 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This 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 + +class BusinessMixin: + + def get_insights(self, fields=None, params=None, is_async=False): + return self.iterate_edge_async( + AdsInsights, + fields, + params, + is_async, + include_summary=False, + ) diff --git a/tap_facebook/facebook_business/adobjects/helpers/customaudiencemixin.py b/tap_facebook/facebook_business/adobjects/helpers/customaudiencemixin.py new file mode 100644 index 0000000..b34946b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/customaudiencemixin.py @@ -0,0 +1,257 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# 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 + +import hashlib +import six +import re + +class CustomAudienceMixin: + + class Schema(object): + uid = 'UID' + email_hash = 'EMAIL_SHA256' + phone_hash = 'PHONE_SHA256' + mobile_advertiser_id = 'MOBILE_ADVERTISER_ID' + + class MultiKeySchema(object): + extern_id = 'EXTERN_ID' + email = 'EMAIL' + phone = 'PHONE' + gen = 'GEN' + doby = 'DOBY' + dobm = 'DOBM' + dobd = 'DOBD' + ln = 'LN' + fn = 'FN' + fi = 'FI' + ct = 'CT' + st = 'ST' + zip = 'ZIP' + madid = 'MADID' + country = 'COUNTRY' + appuid = 'APPUID' + + @classmethod + def format_params(cls, + schema, + users, + is_raw=False, + app_ids=None, + pre_hashed=None, + session=None): + hashed_users = [] + if schema in (cls.Schema.phone_hash, + cls.Schema.email_hash, + cls.Schema.mobile_advertiser_id): + for user in users: + if schema == cls.Schema.email_hash: + user = user.strip(" \t\r\n\0\x0B.").lower() + if isinstance(user, six.text_type) and not(pre_hashed) and schema != cls.Schema.mobile_advertiser_id: + user = user.encode('utf8') # required for hashlib + # for mobile_advertiser_id, don't hash it + if pre_hashed or schema == cls.Schema.mobile_advertiser_id: + hashed_users.append(user) + else: + hashed_users.append(hashlib.sha256(user).hexdigest()) + elif isinstance(schema, list): + # SDK will support only single PII + if not is_raw: + raise FacebookBadObjectError( + "Please send single PIIs i.e. is_raw should be true. " + + "The combining of the keys will be done internally.", + ) + # users is array of array + for user in users: + if len(schema) != len(user): + raise FacebookBadObjectError( + "Number of keys in each list in the data should " + + "match the number of keys specified in scheme", + ) + break + + # If the keys are already hashed then send as it is + if pre_hashed: + hashed_users.append(user) + else: + counter = 0 + hashed_user = [] + for key in user: + key = key.strip(" \t\r\n\0\x0B.").lower() + key = cls.normalize_key(schema[counter], + str(key)) + if schema[counter] != \ + cls.Schema.MultiKeySchema.extern_id: + if isinstance(key, six.text_type): + key = key.encode('utf8') + key = hashlib.sha256(key).hexdigest() + counter = counter + 1 + hashed_user.append(key) + hashed_users.append(hashed_user) + + payload = { + 'schema': schema, + 'is_raw': is_raw, + 'data': hashed_users or users, + } + + if schema == cls.Schema.uid: + if not app_ids: + raise FacebookBadObjectError( + "Custom Audiences with type " + cls.Schema.uid + + "require at least one app_id", + ) + + if app_ids: + payload['app_ids'] = app_ids + + params = { + 'payload': payload, + } + if session: + params['session'] = session + return params + + @classmethod + def normalize_key(cls, key_name, key_value=None): + """ + Normalize the value based on the key + """ + if key_value is None: + return key_value + + if(key_name == cls.Schema.MultiKeySchema.extern_id or + key_name == cls.Schema.MultiKeySchema.email or + key_name == cls.Schema.MultiKeySchema.madid or + key_name == cls.Schema.MultiKeySchema.appuid): + return key_value + + if(key_name == cls.Schema.MultiKeySchema.phone): + key_value = re.sub(r'[^0-9]', '', key_value) + return key_value + + if(key_name == cls.Schema.MultiKeySchema.gen): + key_value = key_value.strip()[:1] + return key_value + + if(key_name == cls.Schema.MultiKeySchema.doby): + key_value = re.sub(r'[^0-9]', '', key_value) + return key_value + + if(key_name == cls.Schema.MultiKeySchema.dobm or + key_name == cls.Schema.MultiKeySchema.dobd): + + key_value = re.sub(r'[^0-9]', '', key_value) + if len(key_value) == 1: + key_value = '0' + key_value + return key_value + + if(key_name == cls.Schema.MultiKeySchema.ln or + key_name == cls.Schema.MultiKeySchema.fn or + key_name == cls.Schema.MultiKeySchema.ct or + key_name == cls.Schema.MultiKeySchema.fi or + key_name == cls.Schema.MultiKeySchema.st): + key_value = re.sub(r'[^a-zA-Z]', '', key_value) + return key_value + + if(key_name == cls.Schema.MultiKeySchema.zip): + key_value = re.split('-', key_value)[0] + return key_value + + if(key_name == cls.Schema.MultiKeySchema.country): + key_value = re.sub(r'[^a-zA-Z]', '', key_value)[:2] + return key_value + + def add_users(self, + schema, + users, + is_raw=False, + app_ids=None, + pre_hashed=None, + session=None): + """Adds users to this CustomAudience. + + Args: + schema: A CustomAudience.Schema value specifying the type of values + in the users list. + users: A list of identities respecting the schema specified. + + Returns: + The FacebookResponse object. + """ + return self.get_api_assured().call( + 'POST', + (self.get_id_assured(), 'users'), + params=self.format_params( + schema, + users, + is_raw, + app_ids, + pre_hashed, + session, + ), + ) + + def remove_users(self, + schema, + users, + is_raw=False, + app_ids=None, + pre_hashed=None, + session=None): + """Deletes users from this CustomAudience. + + Args: + schema: A CustomAudience.Schema value specifying the type of values + in the users list. + users: A list of identities respecting the schema specified. + + Returns: + The FacebookResponse object. + """ + return self.get_api_assured().call( + 'DELETE', + (self.get_id_assured(), 'users'), + params=self.format_params( + schema, + users, + is_raw, + app_ids, + pre_hashed, + session, + ), + ) + + def share_audience(self, account_ids): + """Shares this CustomAudience with the specified account_ids. + + Args: + account_ids: A list of account ids. + + Returns: + The FacebookResponse object. + """ + return self.get_api_assured().call( + 'POST', + (self.get_id_assured(), 'adaccounts'), + params={'adaccounts': account_ids}, + ) + + def unshare_audience(self, account_ids): + """Unshares this CustomAudience with the specified account_ids. + + Args: + account_ids: A list of account ids. + + Returns: + The FacebookResponse object. + """ + return self.get_api_assured().call( + 'DELETE', + (self.get_id_assured(), 'adaccounts'), + params={'adaccounts': account_ids}, + ) diff --git a/tap_facebook/facebook_business/adobjects/helpers/productcatalogmixin.py b/tap_facebook/facebook_business/adobjects/helpers/productcatalogmixin.py new file mode 100644 index 0000000..77f7f58 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/productcatalogmixin.py @@ -0,0 +1,128 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 +from facebook_business.session import FacebookSession +from facebook_business.exceptions import FacebookError + +class ProductCatalogMixin: + + class Role(object): + admin = 'ADMIN' + + class Availability(object): + available_for_order = 'available for order' + in_stock = 'in stock' + out_of_stock = 'out of stock' + preorder = 'preorder' + + class AgeGroup(object): + adult = 'adult' + infant = 'infant' + kids = 'kids' + newborn = 'newborn' + toddler = 'toddler' + + class Gender(object): + men = 'men' + women = 'women' + unisex = 'unisex' + + class Condition(object): + new = 'new' + refurbished = 'refurbished' + used = 'used' + + def add_user(self, user, role): + params = { + 'user': user, + 'role': role, + } + return self.get_api_assured().call( + 'POST', + (self.get_id_assured(), 'userpermissions'), + params=params, + ) + + def remove_user(self, user): + params = { + 'user': user, + } + return self.get_api_assured().call( + 'DELETE', + (self.get_id_assured(), 'userpermissions'), + params=params, + ) + + def add_external_event_sources(self, pixel_ids): + params = { + 'external_event_sources': pixel_ids, + } + return self.get_api_assured().call( + 'POST', + (self.get_id_assured(), 'external_event_sources'), + params=params, + ) + + def remove_external_event_sources(self, pixel_ids): + params = { + 'external_event_sources': pixel_ids, + } + return self.get_api_assured().call( + 'DELETE', + (self.get_id_assured(), 'external_event_sources'), + params=params, + ) + + def update_product(self, retailer_id, **kwargs): + """Updates a product stored in a product catalog + + Args: + retailer_id: product id from product feed. g:price tag in Google + Shopping feed + kwargs: key-value pairs to update on the object, being key the + field name and value the updated value + + Returns: + The FacebookResponse object. + """ + if not kwargs: + raise FacebookError( + """No fields to update provided. Example: + catalog = ProductCatalog('catalog_id') + catalog.update_product( + retailer_id, + price=100, + availability=Product.Availability.out_of_stock + ) + """, + ) + + product_endpoint = ':'.join(( + 'catalog', + self.get_id_assured(), + self.b64_encoded_id(retailer_id), + )) + + url = '/'.join(( + FacebookSession.GRAPH, + FacebookAdsApi.API_VERSION, + product_endpoint, + )) + + return self.get_api_assured().call( + 'POST', + url, + params=kwargs, + ) + + def b64_encoded_id(self, retailer_id): + # # we need a byte string for base64.b64encode argument + b64_id = base64.urlsafe_b64encode(retailer_id.encode('utf8')) + + # and we need a str to join with other url snippets + return b64_id.decode('utf8') diff --git a/tap_facebook/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py b/tap_facebook/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py new file mode 100644 index 0000000..b73c0f8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.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. + +class ReachFrequencyPredictionMixin: + def reserve( + self, + prediction_to_release=None, + reach=None, + budget=None, + impression=None, + ): + params = { + self.Field.prediction_id: self.get_id_assured(), + self.Field.prediction_id_to_release: prediction_to_release, + self.Field.budget: budget, + self.Field.reach: reach, + self.Field.impression: impression, + self.Field.action: self.Action.reserve, + } + # Filter out None values. + params = {k: v for k, v in params.items() if v is not None} + + response = self.get_api_assured().call( + 'POST', + (self.get_parent_id_assured(), self.get_endpoint()), + params=params, + ) + + return self.__class__(response.body(), self.get_parent_id_assured()) + + def cancel(self): + params = { + self.Field.prediction_id: self.get_id_assured(), + self.Field.action: self.Action.cancel, + } + self.get_api_assured().call( + 'POST', + (self.get_parent_id_assured(), self.get_endpoint()), + params=params, + ) + return self diff --git a/tap_facebook/facebook_business/adobjects/highdemandperiod.py b/tap_facebook/facebook_business/adobjects/highdemandperiod.py new file mode 100644 index 0000000..e4c4e8f --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py b/tap_facebook/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py new file mode 100644 index 0000000..369b1dc --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/homelisting.py b/tap_facebook/facebook_business/adobjects/homelisting.py new file mode 100644 index 0000000..2096480 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/homelisting.py @@ -0,0 +1,350 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 HomeListing( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isHomeListing = True + super(HomeListing, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ac_type = 'ac_type' + additional_fees_description = 'additional_fees_description' + address = 'address' + agent_company = 'agent_company' + agent_email = 'agent_email' + agent_fb_page_id = 'agent_fb_page_id' + agent_name = 'agent_name' + agent_phone = 'agent_phone' + applinks = 'applinks' + area_size = 'area_size' + area_unit = 'area_unit' + availability = 'availability' + category_specific_fields = 'category_specific_fields' + co_2_emission_rating_eu = 'co_2_emission_rating_eu' + currency = 'currency' + days_on_market = 'days_on_market' + description = 'description' + energy_rating_eu = 'energy_rating_eu' + furnish_type = 'furnish_type' + group_id = 'group_id' + heating_type = 'heating_type' + home_listing_id = 'home_listing_id' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + laundry_type = 'laundry_type' + listing_type = 'listing_type' + max_currency = 'max_currency' + max_price = 'max_price' + min_currency = 'min_currency' + min_price = 'min_price' + name = 'name' + num_baths = 'num_baths' + num_beds = 'num_beds' + num_rooms = 'num_rooms' + num_units = 'num_units' + parking_type = 'parking_type' + partner_verification = 'partner_verification' + pet_policy = 'pet_policy' + price = 'price' + property_type = 'property_type' + sanitized_images = 'sanitized_images' + unit_price = 'unit_price' + url = 'url' + visibility = 'visibility' + year_built = 'year_built' + + 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' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'home_listings' + + # @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_home_listing(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 + if batch 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=HomeListing, + 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 = { + 'address': 'Object', + 'availability': 'string', + 'currency': 'string', + 'description': 'string', + 'images': 'list', + 'listing_type': 'string', + 'name': 'string', + 'num_baths': 'float', + 'num_beds': 'float', + 'num_units': 'float', + 'price': 'float', + 'property_type': 'string', + 'url': 'string', + 'year_built': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HomeListing, + 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.') + 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=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_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 = { + 'ac_type': 'string', + 'additional_fees_description': 'string', + 'address': 'Object', + 'agent_company': 'string', + 'agent_email': 'string', + 'agent_fb_page_id': 'Page', + 'agent_name': 'string', + 'agent_phone': 'string', + 'applinks': 'CatalogItemAppLinks', + 'area_size': 'unsigned int', + 'area_unit': 'string', + 'availability': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'co_2_emission_rating_eu': 'Object', + 'currency': 'string', + 'days_on_market': 'unsigned int', + 'description': 'string', + 'energy_rating_eu': 'Object', + 'furnish_type': 'string', + 'group_id': 'string', + 'heating_type': 'string', + 'home_listing_id': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'laundry_type': 'string', + 'listing_type': 'string', + 'max_currency': 'string', + 'max_price': 'string', + 'min_currency': 'string', + 'min_price': 'string', + 'name': 'string', + 'num_baths': 'float', + 'num_beds': 'float', + 'num_rooms': 'float', + 'num_units': 'unsigned int', + 'parking_type': 'string', + 'partner_verification': 'string', + 'pet_policy': 'string', + 'price': 'string', + 'property_type': 'string', + 'sanitized_images': 'list', + 'unit_price': 'Object', + 'url': 'string', + 'visibility': 'Visibility', + 'year_built': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = HomeListing.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = HomeListing.Visibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/hotel.py b/tap_facebook/facebook_business/adobjects/hotel.py new file mode 100644 index 0000000..0f77917 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/hotel.py @@ -0,0 +1,335 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Hotel( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isHotel = True + super(Hotel, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + address = 'address' + applinks = 'applinks' + brand = 'brand' + category = 'category' + category_specific_fields = 'category_specific_fields' + currency = 'currency' + description = 'description' + guest_ratings = 'guest_ratings' + hotel_id = 'hotel_id' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + lowest_base_price = 'lowest_base_price' + loyalty_program = 'loyalty_program' + margin_level = 'margin_level' + name = 'name' + phone = 'phone' + sale_price = 'sale_price' + sanitized_images = 'sanitized_images' + star_rating = 'star_rating' + unit_price = 'unit_price' + url = 'url' + visibility = 'visibility' + base_price = 'base_price' + + 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' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'hotels' + + # @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_hotel(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 + if batch 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=Hotel, + 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 = { + 'address': 'Object', + 'applinks': 'Object', + 'base_price': 'unsigned int', + 'brand': 'string', + 'currency': 'string', + 'description': 'string', + 'guest_ratings': 'list', + 'images': 'list', + 'name': 'string', + 'phone': 'string', + 'star_rating': 'float', + 'url': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Hotel, + 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.') + 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=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_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_hotel_rooms(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.hotelroom import HotelRoom + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/hotel_rooms', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HotelRoom, + api_type='EDGE', + response_parser=ObjectParser(target_class=HotelRoom, 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 = { + 'address': 'string', + 'applinks': 'CatalogItemAppLinks', + 'brand': 'string', + 'category': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'currency': 'string', + 'description': 'string', + 'guest_ratings': 'string', + 'hotel_id': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'lowest_base_price': 'string', + 'loyalty_program': 'string', + 'margin_level': 'unsigned int', + 'name': 'string', + 'phone': 'string', + 'sale_price': 'string', + 'sanitized_images': 'list', + 'star_rating': 'float', + 'unit_price': 'Object', + 'url': 'string', + 'visibility': 'Visibility', + 'base_price': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = Hotel.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = Hotel.Visibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/hotelroom.py b/tap_facebook/facebook_business/adobjects/hotelroom.py new file mode 100644 index 0000000..976e627 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/hotelroom.py @@ -0,0 +1,121 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 HotelRoom( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isHotelRoom = True + super(HotelRoom, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + applinks = 'applinks' + base_price = 'base_price' + currency = 'currency' + description = 'description' + id = 'id' + images = 'images' + margin_level = 'margin_level' + name = 'name' + room_id = 'room_id' + sale_price = 'sale_price' + 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=HotelRoom, + 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_pricing_variables(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.dynamicpriceconfigbydate import DynamicPriceConfigByDate + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pricing_variables', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DynamicPriceConfigByDate, + api_type='EDGE', + response_parser=ObjectParser(target_class=DynamicPriceConfigByDate, 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', + 'base_price': 'string', + 'currency': 'string', + 'description': 'string', + 'id': 'string', + 'images': 'list', + 'margin_level': 'string', + 'name': 'string', + 'room_id': 'string', + 'sale_price': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/idname.py b/tap_facebook/facebook_business/adobjects/idname.py new file mode 100644 index 0000000..050ec09 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/idname.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 IDName( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIDName = True + super(IDName, 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/tap_facebook/facebook_business/adobjects/igbcadspermission.py b/tap_facebook/facebook_business/adobjects/igbcadspermission.py new file mode 100644 index 0000000..2a6a502 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/igbcadspermission.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 IGBCAdsPermission( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGBCAdsPermission = True + super(IGBCAdsPermission, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + permission_type = 'permission_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=IGBCAdsPermission, + 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', + 'permission_type': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/igcomment.py b/tap_facebook/facebook_business/adobjects/igcomment.py new file mode 100644 index 0000000..04f46fe --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/igcomment.py @@ -0,0 +1,210 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 IGComment( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGComment = True + super(IGComment, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + field_from = 'from' + hidden = 'hidden' + id = 'id' + like_count = 'like_count' + media = 'media' + parent_id = 'parent_id' + text = 'text' + timestamp = 'timestamp' + user = 'user' + 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 = { + } + 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=IGComment, + 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 = { + 'hide': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGComment, + 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=IGComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGComment, 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 = { + 'message': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/replies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGComment, 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 = { + 'from': 'IGCommentFromUser', + 'hidden': 'bool', + 'id': 'string', + 'like_count': 'int', + 'media': 'IGMedia', + 'parent_id': 'string', + 'text': 'string', + 'timestamp': 'datetime', + 'user': 'IGUser', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/igcommentfromuser.py b/tap_facebook/facebook_business/adobjects/igcommentfromuser.py new file mode 100644 index 0000000..e6ff45c --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/igmedia.py b/tap_facebook/facebook_business/adobjects/igmedia.py new file mode 100644 index 0000000..3960756 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/igmedia.py @@ -0,0 +1,461 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 IGMedia( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGMedia = True + super(IGMedia, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + caption = 'caption' + comments_count = 'comments_count' + copyright_check_information = 'copyright_check_information' + id = 'id' + ig_id = 'ig_id' + is_comment_enabled = 'is_comment_enabled' + 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 = { + 'primary_fb_page_id': 'string', + 'primary_ig_user_id': 'string', + 'secondary_fb_page_id': 'string', + 'secondary_ig_user_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGMedia, + 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 = { + 'comment_enabled': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGMedia, + 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_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): + 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=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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igcomment import IGComment + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/comments', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGComment, 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.igcomment import IGComment + param_types = { + 'message': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/comments', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGComment, 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_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.instagraminsightsresult import InstagramInsightsResult + if is_async: + return self.get_insights_async(fields, params, batch, success, failure, pending) + param_types = { + 'breakdown': 'list', + 'metric': 'list', + 'period': 'list', + } + enums = { + 'breakdown_enum': InstagramInsightsResult.Breakdown.__dict__.values(), + 'metric_enum': InstagramInsightsResult.Metric.__dict__.values(), + 'period_enum': InstagramInsightsResult.Period.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramInsightsResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramInsightsResult, 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() + + def delete_product_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'child_index': 'unsigned int', + 'deleted_tags': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/product_tags', + 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_product_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.shadowigmediaproducttags import ShadowIGMediaProductTags + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_tags', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ShadowIGMediaProductTags, + api_type='EDGE', + response_parser=ObjectParser(target_class=ShadowIGMediaProductTags, 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_product_tag(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.shadowigmediaproducttags import ShadowIGMediaProductTags + param_types = { + 'child_index': 'unsigned int', + 'updated_tags': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/product_tags', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ShadowIGMediaProductTags, + api_type='EDGE', + response_parser=ObjectParser(target_class=ShadowIGMediaProductTags, 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', + 'comments_count': 'int', + 'copyright_check_information': 'IGVideoCopyrightCheckMatchesInformation', + 'id': 'string', + 'ig_id': 'string', + 'is_comment_enabled': 'bool', + 'is_shared_to_feed': 'bool', + 'like_count': 'int', + 'media_product_type': 'string', + 'media_type': 'string', + 'media_url': 'string', + 'owner': 'IGUser', + '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/tap_facebook/facebook_business/adobjects/igshoppingproductappeal.py b/tap_facebook/facebook_business/adobjects/igshoppingproductappeal.py new file mode 100644 index 0000000..12f1878 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/igshoppingreviewstatus.py b/tap_facebook/facebook_business/adobjects/igshoppingreviewstatus.py new file mode 100644 index 0000000..c311e66 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py b/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py new file mode 100644 index 0000000..d8acdd6 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py b/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py new file mode 100644 index 0000000..ba780e2 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/iguser.py b/tap_facebook/facebook_business/adobjects/iguser.py new file mode 100644 index 0000000..60437d9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/iguser.py @@ -0,0 +1,833 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 IGUser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGUser = True + super(IGUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + biography = 'biography' + business_discovery = 'business_discovery' + followers_count = 'followers_count' + follows_count = 'follows_count' + id = 'id' + ig_id = 'ig_id' + media_count = 'media_count' + mentioned_comment = 'mentioned_comment' + mentioned_media = 'mentioned_media' + name = 'name' + owner_business = 'owner_business' + profile_picture_url = 'profile_picture_url' + shopping_product_tag_eligibility = 'shopping_product_tag_eligibility' + shopping_review_status = 'shopping_review_status' + username = 'username' + website = 'website' + + 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 = { + 'adgroup_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGUser, + 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_available_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + 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', + '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), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is 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_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', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/catalog_product_search', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ShadowIGUserCatalogProductSearch, + api_type='EDGE', + response_parser=ObjectParser(target_class=ShadowIGUserCatalogProductSearch, 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_content_publishing_limit(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/content_publishing_limit', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ContentPublishingLimitResponse, + api_type='EDGE', + 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_dataset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.dataset import Dataset + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/dataset', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Dataset, + api_type='EDGE', + response_parser=ObjectParser(target_class=Dataset, 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_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.instagraminsightsresult import InstagramInsightsResult + if is_async: + return self.get_insights_async(fields, params, batch, success, failure, pending) + param_types = { + 'breakdown': 'list', + 'metric': 'list', + 'metric_type': 'metric_type_enum', + 'period': 'list', + 'since': 'datetime', + 'timeframe': 'timeframe_enum', + 'until': 'datetime', + } + enums = { + 'breakdown_enum': InstagramInsightsResult.Breakdown.__dict__.values(), + 'metric_enum': InstagramInsightsResult.Metric.__dict__.values(), + 'metric_type_enum': InstagramInsightsResult.MetricType.__dict__.values(), + 'period_enum': InstagramInsightsResult.Period.__dict__.values(), + 'timeframe_enum': InstagramInsightsResult.Timeframe.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramInsightsResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramInsightsResult, 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() + + 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.') + from facebook_business.adobjects.igmedia import IGMedia + param_types = { + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/live_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_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 = { + '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=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 create_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 = { + 'audio_name': 'string', + 'caption': 'string', + 'children': 'list', + 'collaborators': 'list', + 'cover_url': 'string', + 'image_url': 'string', + 'is_carousel_item': 'bool', + 'location_id': 'string', + 'media_type': 'string', + 'product_tags': 'list', + 'share_to_feed': 'bool', + 'thumb_offset': 'string', + 'upload_type': 'string', + 'user_tags': 'list', + 'video_url': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/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 create_media_publish(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'creation_id': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/media_publish', + 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 create_mention(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'comment_id': 'string', + 'media_id': 'string', + 'message': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/mentions', + 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_notification_message_tokens(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.userpageonetimeoptintokensettings import UserPageOneTimeOptInTokenSettings + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/notification_message_tokens', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UserPageOneTimeOptInTokenSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=UserPageOneTimeOptInTokenSettings, 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_product_appeal(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_appeal', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGShoppingProductAppeal, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGShoppingProductAppeal, 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_product_appeal(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/product_appeal', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGShoppingProductAppeal, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGShoppingProductAppeal, 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_recently_searched_hashtags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/recently_searched_hashtags', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ShadowIGHashtag, + api_type='EDGE', + response_parser=ObjectParser(target_class=ShadowIGHashtag, 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.') + from facebook_business.adobjects.igmedia import IGMedia + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/stories', + 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_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/tags', + 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 = { + 'biography': 'string', + 'business_discovery': 'IGUser', + 'followers_count': 'int', + 'follows_count': 'int', + 'id': 'string', + 'ig_id': 'int', + 'media_count': 'int', + 'mentioned_comment': 'IGComment', + 'mentioned_media': 'IGMedia', + 'name': 'string', + 'owner_business': 'Business', + 'profile_picture_url': 'string', + 'shopping_product_tag_eligibility': 'bool', + 'shopping_review_status': 'string', + 'username': 'string', + 'website': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py b/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py new file mode 100644 index 0000000..64c478e --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckstatus.py b/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckstatus.py new file mode 100644 index 0000000..a40f635 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/imagecopyright.py b/tap_facebook/facebook_business/adobjects/imagecopyright.py new file mode 100644 index 0000000..f039911 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/imagecopyright.py @@ -0,0 +1,391 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ImageCopyright( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isImageCopyright = True + super(ImageCopyright, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + artist = 'artist' + copyright_monitoring_status = 'copyright_monitoring_status' + creation_time = 'creation_time' + creator = 'creator' + custom_id = 'custom_id' + description = 'description' + filename = 'filename' + id = 'id' + image = 'image' + matches_count = 'matches_count' + original_content_creation_date = 'original_content_creation_date' + ownership_countries = 'ownership_countries' + tags = 'tags' + title = 'title' + update_time = 'update_time' + + class GeoOwnership: + ad = 'AD' + ae = 'AE' + af = 'AF' + ag = 'AG' + ai = 'AI' + al = 'AL' + am = 'AM' + an = 'AN' + ao = 'AO' + aq = 'AQ' + ar = 'AR' + value_as = 'AS' + at = 'AT' + au = 'AU' + aw = 'AW' + ax = 'AX' + az = 'AZ' + ba = 'BA' + bb = 'BB' + bd = 'BD' + be = 'BE' + bf = 'BF' + bg = 'BG' + bh = 'BH' + bi = 'BI' + bj = 'BJ' + bl = 'BL' + bm = 'BM' + bn = 'BN' + bo = 'BO' + bq = 'BQ' + br = 'BR' + bs = 'BS' + bt = 'BT' + bv = 'BV' + bw = 'BW' + by = 'BY' + bz = 'BZ' + ca = 'CA' + cc = 'CC' + cd = 'CD' + cf = 'CF' + cg = 'CG' + ch = 'CH' + ci = 'CI' + ck = 'CK' + cl = 'CL' + cm = 'CM' + cn = 'CN' + co = 'CO' + cr = 'CR' + cu = 'CU' + cv = 'CV' + cw = 'CW' + cx = 'CX' + cy = 'CY' + cz = 'CZ' + de = 'DE' + dj = 'DJ' + dk = 'DK' + dm = 'DM' + do = 'DO' + dz = 'DZ' + ec = 'EC' + ee = 'EE' + eg = 'EG' + eh = 'EH' + er = 'ER' + es = 'ES' + et = 'ET' + fi = 'FI' + fj = 'FJ' + fk = 'FK' + fm = 'FM' + fo = 'FO' + fr = 'FR' + ga = 'GA' + gb = 'GB' + gd = 'GD' + ge = 'GE' + gf = 'GF' + gg = 'GG' + gh = 'GH' + gi = 'GI' + gl = 'GL' + gm = 'GM' + gn = 'GN' + gp = 'GP' + gq = 'GQ' + gr = 'GR' + gs = 'GS' + gt = 'GT' + gu = 'GU' + gw = 'GW' + gy = 'GY' + hk = 'HK' + hm = 'HM' + hn = 'HN' + hr = 'HR' + ht = 'HT' + hu = 'HU' + id = 'ID' + ie = 'IE' + il = 'IL' + im = 'IM' + value_in = 'IN' + io = 'IO' + iq = 'IQ' + ir = 'IR' + value_is = 'IS' + it = 'IT' + je = 'JE' + jm = 'JM' + jo = 'JO' + jp = 'JP' + ke = 'KE' + kg = 'KG' + kh = 'KH' + ki = 'KI' + km = 'KM' + kn = 'KN' + kp = 'KP' + kr = 'KR' + kw = 'KW' + ky = 'KY' + kz = 'KZ' + la = 'LA' + lb = 'LB' + lc = 'LC' + li = 'LI' + lk = 'LK' + lr = 'LR' + ls = 'LS' + lt = 'LT' + lu = 'LU' + lv = 'LV' + ly = 'LY' + ma = 'MA' + mc = 'MC' + md = 'MD' + me = 'ME' + mf = 'MF' + mg = 'MG' + mh = 'MH' + mk = 'MK' + ml = 'ML' + mm = 'MM' + mn = 'MN' + mo = 'MO' + mp = 'MP' + mq = 'MQ' + mr = 'MR' + ms = 'MS' + mt = 'MT' + mu = 'MU' + mv = 'MV' + mw = 'MW' + mx = 'MX' + my = 'MY' + mz = 'MZ' + na = 'NA' + nc = 'NC' + ne = 'NE' + nf = 'NF' + ng = 'NG' + ni = 'NI' + nl = 'NL' + no = 'NO' + np = 'NP' + nr = 'NR' + nu = 'NU' + nz = 'NZ' + om = 'OM' + pa = 'PA' + pe = 'PE' + pf = 'PF' + pg = 'PG' + ph = 'PH' + pk = 'PK' + pl = 'PL' + pm = 'PM' + pn = 'PN' + pr = 'PR' + ps = 'PS' + pt = 'PT' + pw = 'PW' + py = 'PY' + qa = 'QA' + re = 'RE' + ro = 'RO' + rs = 'RS' + ru = 'RU' + rw = 'RW' + sa = 'SA' + sb = 'SB' + sc = 'SC' + sd = 'SD' + se = 'SE' + sg = 'SG' + sh = 'SH' + si = 'SI' + sj = 'SJ' + sk = 'SK' + sl = 'SL' + sm = 'SM' + sn = 'SN' + so = 'SO' + sr = 'SR' + ss = 'SS' + st = 'ST' + sv = 'SV' + sx = 'SX' + sy = 'SY' + sz = 'SZ' + tc = 'TC' + td = 'TD' + tf = 'TF' + tg = 'TG' + th = 'TH' + tj = 'TJ' + tk = 'TK' + tl = 'TL' + tm = 'TM' + tn = 'TN' + to = 'TO' + tp = 'TP' + tr = 'TR' + tt = 'TT' + tv = 'TV' + tw = 'TW' + tz = 'TZ' + ua = 'UA' + ug = 'UG' + um = 'UM' + us = 'US' + uy = 'UY' + uz = 'UZ' + va = 'VA' + vc = 'VC' + ve = 'VE' + vg = 'VG' + vi = 'VI' + vn = 'VN' + vu = 'VU' + wf = 'WF' + ws = 'WS' + xk = 'XK' + ye = 'YE' + yt = 'YT' + za = 'ZA' + zm = 'ZM' + zw = 'ZW' + + 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=ImageCopyright, + 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 = { + 'artist': 'string', + 'creator': 'string', + 'custom_id': 'string', + 'description': 'string', + 'geo_ownership': 'list', + 'original_content_creation_date': 'unsigned int', + 'title': 'string', + } + enums = { + 'geo_ownership_enum': ImageCopyright.GeoOwnership.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ImageCopyright, + 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 = { + 'artist': 'string', + 'copyright_monitoring_status': 'string', + 'creation_time': 'datetime', + 'creator': 'string', + 'custom_id': 'string', + 'description': 'string', + 'filename': 'string', + 'id': 'string', + 'image': 'Photo', + 'matches_count': 'unsigned int', + 'original_content_creation_date': 'datetime', + 'ownership_countries': 'VideoCopyrightGeoGate', + 'tags': 'list', + 'title': 'string', + 'update_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['GeoOwnership'] = ImageCopyright.GeoOwnership.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/insightsresult.py b/tap_facebook/facebook_business/adobjects/insightsresult.py new file mode 100644 index 0000000..722a359 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/insightsresult.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 InsightsResult( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isInsightsResult = True + super(InsightsResult, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + description_from_api_doc = 'description_from_api_doc' + id = 'id' + name = 'name' + period = 'period' + title = 'title' + values = 'values' + + 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' + + class Period: + day = 'day' + days_28 = 'days_28' + lifetime = 'lifetime' + month = 'month' + total_over_range = 'total_over_range' + week = 'week' + + _field_types = { + 'description': 'string', + 'description_from_api_doc': 'string', + 'id': 'string', + 'name': 'string', + 'period': 'string', + 'title': 'string', + '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() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/insightsvalue.py b/tap_facebook/facebook_business/adobjects/insightsvalue.py new file mode 100644 index 0000000..5b28043 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/instagramcarousel.py b/tap_facebook/facebook_business/adobjects/instagramcarousel.py new file mode 100644 index 0000000..62b89ab --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/instagramcomment.py b/tap_facebook/facebook_business/adobjects/instagramcomment.py new file mode 100644 index 0000000..035d973 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/instagraminsightsresult.py b/tap_facebook/facebook_business/adobjects/instagraminsightsresult.py new file mode 100644 index 0000000..2ddd6c2 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/instagraminsightsresult.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 InstagramInsightsResult( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isInstagramInsightsResult = True + super(InstagramInsightsResult, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + id = 'id' + name = 'name' + period = 'period' + title = 'title' + total_value = 'total_value' + values = 'values' + + class Breakdown: + action_type = 'action_type' + follow_type = 'follow_type' + story_navigation_action_type = 'story_navigation_action_type' + surface_type = 'surface_type' + + class Metric: + 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' + plays = 'plays' + profile_activity = 'profile_activity' + profile_visits = 'profile_visits' + reach = 'reach' + replies = 'replies' + saved = 'saved' + shares = 'shares' + taps_back = 'taps_back' + taps_forward = 'taps_forward' + total_interactions = 'total_interactions' + video_views = 'video_views' + + class Period: + day = 'day' + days_28 = 'days_28' + lifetime = 'lifetime' + month = 'month' + total_over_range = 'total_over_range' + week = 'week' + + class MetricType: + value_default = 'default' + time_series = 'time_series' + total_value = 'total_value' + + class Timeframe: + last_14_days = 'last_14_days' + last_30_days = 'last_30_days' + last_90_days = 'last_90_days' + prev_month = 'prev_month' + this_month = 'this_month' + this_week = 'this_week' + + _field_types = { + 'description': 'string', + 'id': 'string', + 'name': 'string', + 'period': 'string', + 'title': 'string', + 'total_value': 'Object', + 'values': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Breakdown'] = InstagramInsightsResult.Breakdown.__dict__.values() + field_enum_info['Metric'] = InstagramInsightsResult.Metric.__dict__.values() + field_enum_info['Period'] = InstagramInsightsResult.Period.__dict__.values() + field_enum_info['MetricType'] = InstagramInsightsResult.MetricType.__dict__.values() + field_enum_info['Timeframe'] = InstagramInsightsResult.Timeframe.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/instagraminsightsvalue.py b/tap_facebook/facebook_business/adobjects/instagraminsightsvalue.py new file mode 100644 index 0000000..b066b8a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/instagraminsightsvalue.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 InstagramInsightsValue( + AbstractObject, +): + + def __init__(self, api=None): + super(InstagramInsightsValue, self).__init__() + self._isInstagramInsightsValue = True + self._api = api + + class Field(AbstractObject.Field): + end_time = 'end_time' + value = 'value' + + _field_types = { + 'end_time': 'datetime', + 'value': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/instagrammedia.py b/tap_facebook/facebook_business/adobjects/instagrammedia.py new file mode 100644 index 0000000..e8b8e5e --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py b/tap_facebook/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py new file mode 100644 index 0000000..6bd83e6 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/instagramuser.py b/tap_facebook/facebook_business/adobjects/instagramuser.py new file mode 100644 index 0000000..9d85898 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/instagramuser.py @@ -0,0 +1,246 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 InstagramUser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isInstagramUser = True + super(InstagramUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + follow_count = 'follow_count' + followed_by_count = 'followed_by_count' + has_profile_picture = 'has_profile_picture' + id = 'id' + is_private = 'is_private' + is_published = 'is_published' + media_count = 'media_count' + mini_shop_storefront = 'mini_shop_storefront' + owner_business = 'owner_business' + profile_pic = 'profile_pic' + 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 = { + 'adgroup_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramUser, + 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_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.') + from facebook_business.adobjects.business import Business + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/agencies', + 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_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.') + 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=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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adaccount import AdAccount + param_types = { + 'business': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/authorized_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() + + def create_authorized_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', + 'business': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/authorized_adaccounts', + 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_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.') + 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=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 = { + 'follow_count': 'int', + 'followed_by_count': 'int', + 'has_profile_picture': 'bool', + 'id': 'string', + 'is_private': 'bool', + 'is_published': 'bool', + 'media_count': 'int', + 'mini_shop_storefront': 'Shop', + 'owner_business': 'Business', + 'profile_pic': 'string', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/instagramvideometadata.py b/tap_facebook/facebook_business/adobjects/instagramvideometadata.py new file mode 100644 index 0000000..7c6b393 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/iosapplink.py b/tap_facebook/facebook_business/adobjects/iosapplink.py new file mode 100644 index 0000000..d1276ce --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/iosapplink.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 IosAppLink( + AbstractObject, +): + + def __init__(self, api=None): + super(IosAppLink, self).__init__() + self._isIosAppLink = True + self._api = api + + class Field(AbstractObject.Field): + app_name = 'app_name' + app_store_id = 'app_store_id' + url = 'url' + + _field_types = { + 'app_name': 'string', + 'app_store_id': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/jobopening.py b/tap_facebook/facebook_business/adobjects/jobopening.py new file mode 100644 index 0000000..b364d59 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/jobopening.py @@ -0,0 +1,148 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 JobOpening( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isJobOpening = True + super(JobOpening, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + address = 'address' + application_callback_url = 'application_callback_url' + created_time = 'created_time' + description = 'description' + errors = 'errors' + external_company_facebook_url = 'external_company_facebook_url' + external_company_full_address = 'external_company_full_address' + external_company_id = 'external_company_id' + external_company_name = 'external_company_name' + external_id = 'external_id' + id = 'id' + job_status = 'job_status' + latitude = 'latitude' + longitude = 'longitude' + offsite_application_url = 'offsite_application_url' + page = 'page' + photo = 'photo' + platform_review_status = 'platform_review_status' + post = 'post' + remote_type = 'remote_type' + review_rejection_reasons = 'review_rejection_reasons' + title = 'title' + type = 'type' + + class JobStatus: + closed = 'CLOSED' + draft = 'DRAFT' + open = 'OPEN' + provisional = 'PROVISIONAL' + + class PlatformReviewStatus: + approved = 'APPROVED' + pending = 'PENDING' + rejected = 'REJECTED' + + class ReviewRejectionReasons: + adult_content = 'ADULT_CONTENT' + discrimination = 'DISCRIMINATION' + drugs = 'DRUGS' + generic_default = 'GENERIC_DEFAULT' + illegal = 'ILLEGAL' + impersonation = 'IMPERSONATION' + misleading = 'MISLEADING' + multilevel_marketing = 'MULTILEVEL_MARKETING' + personal_info = 'PERSONAL_INFO' + sexual = 'SEXUAL' + + class Type: + contract = 'CONTRACT' + full_time = 'FULL_TIME' + internship = 'INTERNSHIP' + part_time = 'PART_TIME' + volunteer = 'VOLUNTEER' + + 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=JobOpening, + 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 = { + 'address': 'string', + 'application_callback_url': 'string', + 'created_time': 'datetime', + 'description': 'string', + 'errors': 'list', + 'external_company_facebook_url': 'string', + 'external_company_full_address': 'string', + 'external_company_id': 'string', + 'external_company_name': 'string', + 'external_id': 'string', + 'id': 'string', + 'job_status': 'JobStatus', + 'latitude': 'float', + 'longitude': 'float', + 'offsite_application_url': 'string', + 'page': 'Page', + 'photo': 'Photo', + 'platform_review_status': 'PlatformReviewStatus', + 'post': 'Post', + 'remote_type': 'string', + 'review_rejection_reasons': 'list', + 'title': 'string', + 'type': 'Type', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['JobStatus'] = JobOpening.JobStatus.__dict__.values() + field_enum_info['PlatformReviewStatus'] = JobOpening.PlatformReviewStatus.__dict__.values() + field_enum_info['ReviewRejectionReasons'] = JobOpening.ReviewRejectionReasons.__dict__.values() + field_enum_info['Type'] = JobOpening.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/keyvalue.py b/tap_facebook/facebook_business/adobjects/keyvalue.py new file mode 100644 index 0000000..18e4990 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/keyvalue.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 KeyValue( + AbstractObject, +): + + def __init__(self, api=None): + super(KeyValue, self).__init__() + self._isKeyValue = True + self._api = api + + class Field(AbstractObject.Field): + key = 'key' + value = 'value' + + _field_types = { + 'key': 'string', + 'value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/lead.py b/tap_facebook/facebook_business/adobjects/lead.py new file mode 100644 index 0000000..546d122 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/lead.py @@ -0,0 +1,141 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Lead( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLead = True + super(Lead, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_id = 'ad_id' + ad_name = 'ad_name' + adset_id = 'adset_id' + adset_name = 'adset_name' + campaign_id = 'campaign_id' + campaign_name = 'campaign_name' + created_time = 'created_time' + custom_disclaimer_responses = 'custom_disclaimer_responses' + field_data = 'field_data' + form_id = 'form_id' + home_listing = 'home_listing' + id = 'id' + is_organic = 'is_organic' + partner_name = 'partner_name' + platform = 'platform' + post = 'post' + post_submission_check_result = 'post_submission_check_result' + retailer_item_id = 'retailer_item_id' + vehicle = 'vehicle' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'leads' + + 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=Lead, + 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_name': 'string', + 'adset_id': 'string', + 'adset_name': 'string', + 'campaign_id': 'string', + 'campaign_name': 'string', + 'created_time': 'datetime', + 'custom_disclaimer_responses': 'list', + 'field_data': 'list', + 'form_id': 'string', + 'home_listing': 'HomeListing', + 'id': 'string', + 'is_organic': 'bool', + 'partner_name': 'string', + 'platform': 'string', + 'post': 'Link', + 'post_submission_check_result': 'LeadGenPostSubmissionCheckResult', + 'retailer_item_id': 'string', + 'vehicle': 'Vehicle', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgenappointmentbookinginfo.py b/tap_facebook/facebook_business/adobjects/leadgenappointmentbookinginfo.py new file mode 100644 index 0000000..714bfd4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/leadgenappointmentbookinginfo.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 LeadGenAppointmentBookingInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenAppointmentBookingInfo, self).__init__() + self._isLeadGenAppointmentBookingInfo = True + self._api = api + + class Field(AbstractObject.Field): + advertiser_timezone_offset = 'advertiser_timezone_offset' + appointment_durations = 'appointment_durations' + appointment_slots_by_day = 'appointment_slots_by_day' + + _field_types = { + 'advertiser_timezone_offset': 'string', + 'appointment_durations': 'list', + 'appointment_slots_by_day': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgenappointmentslotsbyday.py b/tap_facebook/facebook_business/adobjects/leadgenappointmentslotsbyday.py new file mode 100644 index 0000000..59b0f6d --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgenappointmenttimeslot.py b/tap_facebook/facebook_business/adobjects/leadgenappointmenttimeslot.py new file mode 100644 index 0000000..2027248 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py b/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py new file mode 100644 index 0000000..6c26843 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.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 LeadGenConditionalQuestionsGroupChoices( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenConditionalQuestionsGroupChoices, self).__init__() + self._isLeadGenConditionalQuestionsGroupChoices = True + self._api = api + + class Field(AbstractObject.Field): + customized_token = 'customized_token' + next_question_choices = 'next_question_choices' + value = 'value' + + _field_types = { + 'customized_token': 'string', + 'next_question_choices': 'list', + 'value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py b/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py new file mode 100644 index 0000000..0013477 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.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 LeadGenConditionalQuestionsGroupQuestions( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenConditionalQuestionsGroupQuestions, self).__init__() + self._isLeadGenConditionalQuestionsGroupQuestions = True + self._api = api + + class Field(AbstractObject.Field): + field_key = 'field_key' + input_type = 'input_type' + name = 'name' + + _field_types = { + 'field_key': 'string', + 'input_type': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgencontextcard.py b/tap_facebook/facebook_business/adobjects/leadgencontextcard.py new file mode 100644 index 0000000..0ee3d8f --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimer.py b/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimer.py new file mode 100644 index 0000000..6632f15 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimerbody.py b/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimerbody.py new file mode 100644 index 0000000..53c2e85 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgendraftquestion.py b/tap_facebook/facebook_business/adobjects/leadgendraftquestion.py new file mode 100644 index 0000000..dca6f0e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/leadgendraftquestion.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 LeadGenDraftQuestion( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenDraftQuestion, self).__init__() + self._isLeadGenDraftQuestion = True + self._api = api + + class Field(AbstractObject.Field): + conditional_questions_choices = 'conditional_questions_choices' + conditional_questions_group_id = 'conditional_questions_group_id' + dependent_conditional_questions = 'dependent_conditional_questions' + inline_context = 'inline_context' + key = 'key' + label = 'label' + options = 'options' + type = 'type' + + _field_types = { + 'conditional_questions_choices': 'list', + 'conditional_questions_group_id': 'string', + 'dependent_conditional_questions': 'list', + 'inline_context': 'string', + 'key': 'string', + 'label': 'string', + 'options': 'list', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgenform.py b/tap_facebook/facebook_business/adobjects/leadgenform.py new file mode 100644 index 0000000..4b3c22c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/leadgenform.py @@ -0,0 +1,288 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 LeadgenForm( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadgenForm = True + super(LeadgenForm, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + allow_organic_lead = 'allow_organic_lead' + block_display_for_non_targeted_viewer = 'block_display_for_non_targeted_viewer' + context_card = 'context_card' + created_time = 'created_time' + creator = 'creator' + expired_leads_count = 'expired_leads_count' + follow_up_action_text = 'follow_up_action_text' + follow_up_action_url = 'follow_up_action_url' + id = 'id' + is_optimized_for_quality = 'is_optimized_for_quality' + leads_count = 'leads_count' + legal_content = 'legal_content' + locale = 'locale' + name = 'name' + organic_leads_count = 'organic_leads_count' + page = 'page' + page_id = 'page_id' + privacy_policy_url = 'privacy_policy_url' + question_page_custom_headline = 'question_page_custom_headline' + questions = 'questions' + status = 'status' + thank_you_page = 'thank_you_page' + tracking_parameters = 'tracking_parameters' + + class Status: + active = 'ACTIVE' + archived = 'ARCHIVED' + deleted = 'DELETED' + draft = 'DRAFT' + + class Locale: + ar_ar = 'AR_AR' + cs_cz = 'CS_CZ' + da_dk = 'DA_DK' + de_de = 'DE_DE' + el_gr = 'EL_GR' + en_gb = 'EN_GB' + en_us = 'EN_US' + es_es = 'ES_ES' + es_la = 'ES_LA' + fi_fi = 'FI_FI' + fr_fr = 'FR_FR' + he_il = 'HE_IL' + hi_in = 'HI_IN' + hu_hu = 'HU_HU' + id_id = 'ID_ID' + it_it = 'IT_IT' + ja_jp = 'JA_JP' + ko_kr = 'KO_KR' + nb_no = 'NB_NO' + nl_nl = 'NL_NL' + pl_pl = 'PL_PL' + pt_br = 'PT_BR' + pt_pt = 'PT_PT' + ro_ro = 'RO_RO' + ru_ru = 'RU_RU' + sv_se = 'SV_SE' + th_th = 'TH_TH' + tr_tr = 'TR_TR' + vi_vn = 'VI_VN' + zh_cn = 'ZH_CN' + zh_hk = 'ZH_HK' + zh_tw = 'ZH_TW' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'leadgen_forms' + + 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=LeadgenForm, + 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 = { + 'status': 'status_enum', + } + enums = { + 'status_enum': LeadgenForm.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LeadgenForm, + 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_leads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.lead import Lead + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/leads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Lead, + api_type='EDGE', + response_parser=ObjectParser(target_class=Lead, 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_test_leads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.lead import Lead + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/test_leads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Lead, + api_type='EDGE', + response_parser=ObjectParser(target_class=Lead, 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_test_lead(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.lead import Lead + param_types = { + 'custom_disclaimer_responses': 'list', + 'field_data': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/test_leads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Lead, + api_type='EDGE', + response_parser=ObjectParser(target_class=Lead, 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 = { + 'allow_organic_lead': 'bool', + 'block_display_for_non_targeted_viewer': 'bool', + 'context_card': 'LeadGenContextCard', + 'created_time': 'datetime', + 'creator': 'User', + 'expired_leads_count': 'unsigned int', + 'follow_up_action_text': 'string', + 'follow_up_action_url': 'string', + 'id': 'string', + 'is_optimized_for_quality': 'bool', + 'leads_count': 'unsigned int', + 'legal_content': 'LeadGenLegalContent', + 'locale': 'string', + 'name': 'string', + 'organic_leads_count': 'unsigned int', + 'page': 'Page', + 'page_id': 'string', + 'privacy_policy_url': 'string', + 'question_page_custom_headline': 'string', + 'questions': 'list', + 'status': 'string', + 'thank_you_page': 'LeadGenThankYouPage', + 'tracking_parameters': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = LeadgenForm.Status.__dict__.values() + field_enum_info['Locale'] = LeadgenForm.Locale.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgenlegalcontent.py b/tap_facebook/facebook_business/adobjects/leadgenlegalcontent.py new file mode 100644 index 0000000..1ca4bec --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgenlegalcontentcheckbox.py b/tap_facebook/facebook_business/adobjects/leadgenlegalcontentcheckbox.py new file mode 100644 index 0000000..1b41e69 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py b/tap_facebook/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py new file mode 100644 index 0000000..e2f850c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/leadgenpostsubmissioncheckresult.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 LeadGenPostSubmissionCheckResult( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenPostSubmissionCheckResult, self).__init__() + self._isLeadGenPostSubmissionCheckResult = True + self._api = api + + class Field(AbstractObject.Field): + api_call_result = 'api_call_result' + api_error_message = 'api_error_message' + shown_thank_you_page = 'shown_thank_you_page' + + _field_types = { + 'api_call_result': 'string', + 'api_error_message': 'string', + 'shown_thank_you_page': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgenprivacypolicy.py b/tap_facebook/facebook_business/adobjects/leadgenprivacypolicy.py new file mode 100644 index 0000000..2a8ad4a --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgenquestion.py b/tap_facebook/facebook_business/adobjects/leadgenquestion.py new file mode 100644 index 0000000..ea55476 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/leadgenquestion.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 LeadGenQuestion( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenQuestion = True + super(LeadGenQuestion, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + conditional_questions_choices = 'conditional_questions_choices' + conditional_questions_group_id = 'conditional_questions_group_id' + dependent_conditional_questions = 'dependent_conditional_questions' + id = 'id' + inline_context = 'inline_context' + key = 'key' + label = 'label' + options = 'options' + type = 'type' + + _field_types = { + 'conditional_questions_choices': 'list', + 'conditional_questions_group_id': 'string', + 'dependent_conditional_questions': 'list', + 'id': 'string', + 'inline_context': 'string', + 'key': 'string', + 'label': 'string', + 'options': 'list', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgenquestionoption.py b/tap_facebook/facebook_business/adobjects/leadgenquestionoption.py new file mode 100644 index 0000000..913295d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/leadgenquestionoption.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 LeadGenQuestionOption( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenQuestionOption, self).__init__() + self._isLeadGenQuestionOption = True + self._api = api + + class Field(AbstractObject.Field): + key = 'key' + value = 'value' + + _field_types = { + 'key': 'string', + 'value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/leadgenthankyoupage.py b/tap_facebook/facebook_business/adobjects/leadgenthankyoupage.py new file mode 100644 index 0000000..8598d02 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/leadgenurlentityatranges.py b/tap_facebook/facebook_business/adobjects/leadgenurlentityatranges.py new file mode 100644 index 0000000..b9e1efc --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/lifeevent.py b/tap_facebook/facebook_business/adobjects/lifeevent.py new file mode 100644 index 0000000..397158a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/lifeevent.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 LifeEvent( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLifeEvent = True + super(LifeEvent, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + end_time = 'end_time' + field_from = 'from' + id = 'id' + is_hidden = 'is_hidden' + start_time = 'start_time' + title = 'title' + 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=LifeEvent, + 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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 = { + 'description': 'string', + 'end_time': 'datetime', + 'from': 'Page', + 'id': 'string', + 'is_hidden': 'bool', + 'start_time': 'datetime', + 'title': 'string', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/link.py b/tap_facebook/facebook_business/adobjects/link.py new file mode 100644 index 0000000..46dbe5c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/link.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 Link( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLink = True + super(Link, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + caption = 'caption' + created_time = 'created_time' + description = 'description' + field_from = 'from' + icon = 'icon' + id = 'id' + link = 'link' + message = 'message' + multi_share_optimized = 'multi_share_optimized' + name = 'name' + privacy = 'privacy' + via = 'via' + + 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=Link, + 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_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.comment import Comment + param_types = { + 'attachment_id': 'string', + 'attachment_share_url': 'string', + 'attachment_url': 'string', + 'comment_privacy_value': 'comment_privacy_value_enum', + 'facepile_mentioned_ids': 'list', + 'feedback_source': 'string', + 'is_offline': 'bool', + 'message': 'string', + 'nectar_module': 'string', + 'object_id': 'string', + 'parent_comment_id': 'Object', + 'text': 'string', + 'tracking': 'string', + } + enums = { + 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + 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() + + def get_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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', + 'created_time': 'datetime', + 'description': 'string', + 'from': 'Object', + 'icon': 'string', + 'id': 'string', + 'link': 'string', + 'message': 'string', + 'multi_share_optimized': 'bool', + 'name': 'string', + 'privacy': 'Privacy', + 'via': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/livevideo.py b/tap_facebook/facebook_business/adobjects/livevideo.py new file mode 100644 index 0000000..b62255b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/livevideo.py @@ -0,0 +1,577 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 LiveVideo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLiveVideo = True + super(LiveVideo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_break_config = 'ad_break_config' + ad_break_failure_reason = 'ad_break_failure_reason' + broadcast_start_time = 'broadcast_start_time' + copyright = 'copyright' + creation_time = 'creation_time' + dash_ingest_url = 'dash_ingest_url' + dash_preview_url = 'dash_preview_url' + description = 'description' + embed_html = 'embed_html' + field_from = 'from' + id = 'id' + ingest_streams = 'ingest_streams' + is_manual_mode = 'is_manual_mode' + is_reference_only = 'is_reference_only' + live_views = 'live_views' + overlay_url = 'overlay_url' + permalink_url = 'permalink_url' + planned_start_time = 'planned_start_time' + recommended_encoder_settings = 'recommended_encoder_settings' + seconds_left = 'seconds_left' + secure_stream_url = 'secure_stream_url' + status = 'status' + stream_url = 'stream_url' + targeting = 'targeting' + title = 'title' + total_views = 'total_views' + video = 'video' + + class Projection: + cubemap = 'CUBEMAP' + equirectangular = 'EQUIRECTANGULAR' + half_equirectangular = 'HALF_EQUIRECTANGULAR' + + class SpatialAudioFormat: + ambix_4 = 'ambiX_4' + + class Status: + live_now = 'LIVE_NOW' + scheduled_canceled = 'SCHEDULED_CANCELED' + scheduled_live = 'SCHEDULED_LIVE' + scheduled_unpublished = 'SCHEDULED_UNPUBLISHED' + unpublished = 'UNPUBLISHED' + + class StereoscopicMode: + left_right = 'LEFT_RIGHT' + mono = 'MONO' + top_bottom = 'TOP_BOTTOM' + + class StreamType: + ambient = 'AMBIENT' + regular = 'REGULAR' + + class BroadcastStatus: + live = 'LIVE' + live_stopped = 'LIVE_STOPPED' + processing = 'PROCESSING' + scheduled_canceled = 'SCHEDULED_CANCELED' + scheduled_expired = 'SCHEDULED_EXPIRED' + scheduled_live = 'SCHEDULED_LIVE' + scheduled_unpublished = 'SCHEDULED_UNPUBLISHED' + unpublished = 'UNPUBLISHED' + vod = 'VOD' + + class Source: + owner = 'owner' + target = 'target' + + class LiveCommentModerationSetting: + value_default = 'DEFAULT' + discussion = 'DISCUSSION' + followed = 'FOLLOWED' + follower = 'FOLLOWER' + no_hyperlink = 'NO_HYPERLINK' + protected_mode = 'PROTECTED_MODE' + restricted = 'RESTRICTED' + slow = 'SLOW' + supporter = 'SUPPORTER' + tagged = 'TAGGED' + + class PersistentStreamKeyStatus: + disable = 'DISABLE' + enable = 'ENABLE' + regenerate = 'REGENERATE' + + 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 = { + 'target_token': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + 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 = { + 'allow_bm_crossposting': 'bool', + 'content_tags': 'list', + 'cross_share_to_group_ids': 'list', + 'crossposting_actions': 'list', + 'custom_labels': 'list', + 'description': 'string', + 'direct_share_status': 'unsigned int', + 'embeddable': 'bool', + 'end_live_video': 'bool', + 'event_params': 'Object', + 'is_audio_only': 'bool', + 'is_manual_mode': 'bool', + 'live_comment_moderation_setting': 'list', + 'master_ingest_stream_id': 'string', + 'og_icon_id': 'string', + 'og_phrase': 'string', + 'persistent_stream_key_status': 'persistent_stream_key_status_enum', + 'place': 'Object', + 'planned_start_time': 'datetime', + 'privacy': 'string', + 'published': 'bool', + 'schedule_custom_profile_image': 'file', + 'schedule_feed_background_image': 'file', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'status': 'status_enum', + 'stream_type': 'stream_type_enum', + 'tags': 'list', + 'targeting': 'Object', + 'title': 'string', + } + enums = { + 'live_comment_moderation_setting_enum': LiveVideo.LiveCommentModerationSetting.__dict__.values(), + 'persistent_stream_key_status_enum': LiveVideo.PersistentStreamKeyStatus.__dict__.values(), + 'status_enum': LiveVideo.Status.__dict__.values(), + 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + 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_blocked_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 = { + 'uid': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/blocked_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() + + 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 = { + 'filter': 'filter_enum', + 'live_filter': 'live_filter_enum', + 'order': 'order_enum', + 'since': 'datetime', + } + enums = { + 'filter_enum': Comment.Filter.__dict__.values(), + 'live_filter_enum': Comment.LiveFilter.__dict__.values(), + '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() + + def get_crosspost_shared_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.') + from facebook_business.adobjects.page import Page + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/crosspost_shared_pages', + 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_crossposted_broadcasts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/crossposted_broadcasts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideo, 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_errors(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.livevideoerror import LiveVideoError + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/errors', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideoError, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideoError, 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_input_stream(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.livevideoinputstream import LiveVideoInputStream + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/input_streams', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideoInputStream, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideoInputStream, 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_polls(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.videopoll import VideoPoll + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/polls', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoPoll, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoPoll, 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_poll(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.videopoll import VideoPoll + param_types = { + 'close_after_voting': 'bool', + 'correct_option': 'unsigned int', + 'default_open': 'bool', + 'options': 'list', + 'question': 'string', + 'show_gradient': 'bool', + 'show_results': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/polls', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoPoll, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoPoll, 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_reactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': Profile.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/reactions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_break_config': 'LiveVideoAdBreakConfig', + 'ad_break_failure_reason': 'string', + 'broadcast_start_time': 'datetime', + 'copyright': 'VideoCopyright', + 'creation_time': 'datetime', + 'dash_ingest_url': 'string', + 'dash_preview_url': 'string', + 'description': 'string', + 'embed_html': 'Object', + 'from': 'Object', + 'id': 'string', + 'ingest_streams': 'list', + 'is_manual_mode': 'bool', + 'is_reference_only': 'bool', + 'live_views': 'unsigned int', + 'overlay_url': 'string', + 'permalink_url': 'string', + 'planned_start_time': 'datetime', + 'recommended_encoder_settings': 'LiveVideoRecommendedEncoderSettings', + 'seconds_left': 'int', + 'secure_stream_url': 'string', + 'status': 'string', + 'stream_url': 'string', + 'targeting': 'LiveVideoTargeting', + 'title': 'string', + 'total_views': 'string', + 'video': 'AdVideo', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Projection'] = LiveVideo.Projection.__dict__.values() + field_enum_info['SpatialAudioFormat'] = LiveVideo.SpatialAudioFormat.__dict__.values() + field_enum_info['Status'] = LiveVideo.Status.__dict__.values() + field_enum_info['StereoscopicMode'] = LiveVideo.StereoscopicMode.__dict__.values() + field_enum_info['StreamType'] = LiveVideo.StreamType.__dict__.values() + field_enum_info['BroadcastStatus'] = LiveVideo.BroadcastStatus.__dict__.values() + field_enum_info['Source'] = LiveVideo.Source.__dict__.values() + field_enum_info['LiveCommentModerationSetting'] = LiveVideo.LiveCommentModerationSetting.__dict__.values() + field_enum_info['PersistentStreamKeyStatus'] = LiveVideo.PersistentStreamKeyStatus.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/livevideoadbreakconfig.py b/tap_facebook/facebook_business/adobjects/livevideoadbreakconfig.py new file mode 100644 index 0000000..01893bb --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/livevideoadbreakconfig.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 LiveVideoAdBreakConfig( + AbstractObject, +): + + def __init__(self, api=None): + super(LiveVideoAdBreakConfig, self).__init__() + self._isLiveVideoAdBreakConfig = True + self._api = api + + class Field(AbstractObject.Field): + default_ad_break_duration = 'default_ad_break_duration' + failure_reason_polling_interval = 'failure_reason_polling_interval' + first_break_eligible_secs = 'first_break_eligible_secs' + guide_url = 'guide_url' + is_eligible_to_onboard = 'is_eligible_to_onboard' + is_enabled = 'is_enabled' + onboarding_url = 'onboarding_url' + preparing_duration = 'preparing_duration' + time_between_ad_breaks_secs = 'time_between_ad_breaks_secs' + viewer_count_threshold = 'viewer_count_threshold' + + _field_types = { + 'default_ad_break_duration': 'unsigned int', + 'failure_reason_polling_interval': 'unsigned int', + 'first_break_eligible_secs': 'unsigned int', + 'guide_url': 'string', + 'is_eligible_to_onboard': 'bool', + 'is_enabled': 'bool', + 'onboarding_url': 'string', + 'preparing_duration': 'unsigned int', + 'time_between_ad_breaks_secs': 'unsigned int', + 'viewer_count_threshold': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/livevideoerror.py b/tap_facebook/facebook_business/adobjects/livevideoerror.py new file mode 100644 index 0000000..aa053bf --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/livevideoerror.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 LiveVideoError( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLiveVideoError = True + super(LiveVideoError, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + error_code = 'error_code' + error_message = 'error_message' + error_type = 'error_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=LiveVideoError, + 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', + 'error_code': 'int', + 'error_message': 'string', + 'error_type': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/livevideoinputstream.py b/tap_facebook/facebook_business/adobjects/livevideoinputstream.py new file mode 100644 index 0000000..64c8f98 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/livevideoinputstream.py @@ -0,0 +1,85 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 LiveVideoInputStream( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLiveVideoInputStream = True + super(LiveVideoInputStream, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + dash_ingest_url = 'dash_ingest_url' + dash_preview_url = 'dash_preview_url' + id = 'id' + is_master = 'is_master' + secure_stream_url = 'secure_stream_url' + stream_health = 'stream_health' + stream_id = 'stream_id' + stream_url = 'stream_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 = { + 'target_token': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideoInputStream, + 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 = { + 'dash_ingest_url': 'string', + 'dash_preview_url': 'string', + 'id': 'string', + 'is_master': 'bool', + 'secure_stream_url': 'string', + 'stream_health': 'Object', + 'stream_id': 'string', + 'stream_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/livevideorecommendedencodersettings.py b/tap_facebook/facebook_business/adobjects/livevideorecommendedencodersettings.py new file mode 100644 index 0000000..fa7d490 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/livevideorecommendedencodersettings.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 LiveVideoRecommendedEncoderSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(LiveVideoRecommendedEncoderSettings, self).__init__() + self._isLiveVideoRecommendedEncoderSettings = True + self._api = api + + class Field(AbstractObject.Field): + audio_codec_settings = 'audio_codec_settings' + streaming_protocol = 'streaming_protocol' + video_codec_settings = 'video_codec_settings' + + _field_types = { + 'audio_codec_settings': 'Object', + 'streaming_protocol': 'string', + 'video_codec_settings': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/livevideotargeting.py b/tap_facebook/facebook_business/adobjects/livevideotargeting.py new file mode 100644 index 0000000..5df48e7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/livevideotargeting.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 LiveVideoTargeting( + AbstractObject, +): + + def __init__(self, api=None): + super(LiveVideoTargeting, self).__init__() + self._isLiveVideoTargeting = True + self._api = api + + class Field(AbstractObject.Field): + age_max = 'age_max' + age_min = 'age_min' + excluded_countries = 'excluded_countries' + geo_locations = 'geo_locations' + + _field_types = { + 'age_max': 'unsigned int', + 'age_min': 'unsigned int', + 'excluded_countries': 'list', + 'geo_locations': 'TargetingGeoLocation', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/localservicebusiness.py b/tap_facebook/facebook_business/adobjects/localservicebusiness.py new file mode 100644 index 0000000..eb5ed88 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/localservicebusiness.py @@ -0,0 +1,212 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 LocalServiceBusiness( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLocalServiceBusiness = True + super(LocalServiceBusiness, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + address = 'address' + applinks = 'applinks' + availability = 'availability' + brand = 'brand' + category = 'category' + category_specific_fields = 'category_specific_fields' + condition = 'condition' + cuisine_type = 'cuisine_type' + currency = 'currency' + custom_label_0 = 'custom_label_0' + custom_label_1 = 'custom_label_1' + custom_label_2 = 'custom_label_2' + custom_label_3 = 'custom_label_3' + custom_label_4 = 'custom_label_4' + custom_number_0 = 'custom_number_0' + custom_number_1 = 'custom_number_1' + custom_number_2 = 'custom_number_2' + custom_number_3 = 'custom_number_3' + custom_number_4 = 'custom_number_4' + description = 'description' + expiration_date = 'expiration_date' + gtin = 'gtin' + 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' + title = 'title' + unit_price = 'unit_price' + url = 'url' + vendor_id = 'vendor_id' + visibility = 'visibility' + + 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' + + class Condition: + pc_cpo = 'PC_CPO' + pc_new = 'PC_NEW' + pc_open_box_new = 'PC_OPEN_BOX_NEW' + pc_refurbished = 'PC_REFURBISHED' + pc_used = 'PC_USED' + pc_used_fair = 'PC_USED_FAIR' + pc_used_good = 'PC_USED_GOOD' + pc_used_like_new = 'PC_USED_LIKE_NEW' + + 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=LocalServiceBusiness, + 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 = { + 'address': 'Object', + 'applinks': 'CatalogItemAppLinks', + 'availability': 'Availability', + 'brand': 'string', + 'category': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'condition': 'Condition', + 'cuisine_type': 'string', + 'currency': 'string', + 'custom_label_0': 'string', + 'custom_label_1': 'string', + 'custom_label_2': 'string', + 'custom_label_3': 'string', + 'custom_label_4': 'string', + 'custom_number_0': 'unsigned int', + 'custom_number_1': 'unsigned int', + 'custom_number_2': 'unsigned int', + 'custom_number_3': 'unsigned int', + 'custom_number_4': 'unsigned int', + 'description': 'string', + 'expiration_date': 'string', + 'gtin': 'string', + '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', + 'title': 'string', + 'unit_price': 'Object', + 'url': 'string', + 'vendor_id': 'string', + 'visibility': 'Visibility', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Availability'] = LocalServiceBusiness.Availability.__dict__.values() + field_enum_info['Condition'] = LocalServiceBusiness.Condition.__dict__.values() + field_enum_info['ImageFetchStatus'] = LocalServiceBusiness.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = LocalServiceBusiness.Visibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/location.py b/tap_facebook/facebook_business/adobjects/location.py new file mode 100644 index 0000000..fe4a461 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/location.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 Location( + AbstractObject, +): + + def __init__(self, api=None): + super(Location, self).__init__() + self._isLocation = True + self._api = api + + class Field(AbstractObject.Field): + city = 'city' + city_id = 'city_id' + country = 'country' + country_code = 'country_code' + latitude = 'latitude' + located_in = 'located_in' + longitude = 'longitude' + name = 'name' + region = 'region' + region_id = 'region_id' + state = 'state' + street = 'street' + zip = 'zip' + + _field_types = { + 'city': 'string', + 'city_id': 'unsigned int', + 'country': 'string', + 'country_code': 'string', + 'latitude': 'float', + 'located_in': 'string', + 'longitude': 'float', + 'name': 'string', + 'region': 'string', + 'region_id': 'unsigned int', + 'state': 'string', + 'street': 'string', + 'zip': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/lookalikespec.py b/tap_facebook/facebook_business/adobjects/lookalikespec.py new file mode 100644 index 0000000..9e6b8a6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/lookalikespec.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 LookalikeSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(LookalikeSpec, self).__init__() + self._isLookalikeSpec = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + is_financial_service = 'is_financial_service' + origin = 'origin' + origin_event_name = 'origin_event_name' + origin_event_source_name = 'origin_event_source_name' + origin_event_source_type = 'origin_event_source_type' + product_set_name = 'product_set_name' + ratio = 'ratio' + starting_ratio = 'starting_ratio' + target_countries = 'target_countries' + target_country_names = 'target_country_names' + type = 'type' + + _field_types = { + 'country': 'string', + 'is_financial_service': 'bool', + 'origin': 'list', + 'origin_event_name': 'string', + 'origin_event_source_name': 'string', + 'origin_event_source_type': 'string', + 'product_set_name': 'string', + 'ratio': 'float', + 'starting_ratio': 'float', + 'target_countries': 'list', + 'target_country_names': 'list', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/mailingaddress.py b/tap_facebook/facebook_business/adobjects/mailingaddress.py new file mode 100644 index 0000000..d6c00b2 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/mailingaddress.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 MailingAddress( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMailingAddress = True + super(MailingAddress, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + city = 'city' + city_page = 'city_page' + country = 'country' + id = 'id' + postal_code = 'postal_code' + region = 'region' + street1 = 'street1' + street2 = 'street2' + + 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=MailingAddress, + 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 = { + 'city': 'string', + 'city_page': 'Page', + 'country': 'string', + 'id': 'string', + 'postal_code': 'string', + 'region': 'string', + 'street1': 'string', + 'street2': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/managedpartnerbusiness.py b/tap_facebook/facebook_business/adobjects/managedpartnerbusiness.py new file mode 100644 index 0000000..19bea08 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/managedpartnerbusiness.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 ManagedPartnerBusiness( + AbstractObject, +): + + def __init__(self, api=None): + super(ManagedPartnerBusiness, self).__init__() + self._isManagedPartnerBusiness = True + self._api = api + + class Field(AbstractObject.Field): + ad_account = 'ad_account' + catalog_segment = 'catalog_segment' + extended_credit = 'extended_credit' + page = 'page' + seller_business_info = 'seller_business_info' + seller_business_status = 'seller_business_status' + template = 'template' + + _field_types = { + 'ad_account': 'AdAccount', + 'catalog_segment': 'ProductCatalog', + 'extended_credit': 'ManagedPartnerExtendedCredit', + 'page': 'Page', + 'seller_business_info': 'Object', + 'seller_business_status': 'string', + 'template': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/managedpartnerextendedcredit.py b/tap_facebook/facebook_business/adobjects/managedpartnerextendedcredit.py new file mode 100644 index 0000000..ddbaf7b --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/mediafingerprint.py b/tap_facebook/facebook_business/adobjects/mediafingerprint.py new file mode 100644 index 0000000..eca48c2 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/mediafingerprint.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 MediaFingerprint( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMediaFingerprint = True + super(MediaFingerprint, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + duration_in_sec = 'duration_in_sec' + fingerprint_content_type = 'fingerprint_content_type' + fingerprint_type = 'fingerprint_type' + id = 'id' + metadata = 'metadata' + title = 'title' + universal_content_id = 'universal_content_id' + + class FingerprintContentType: + am_songtrack = 'AM_SONGTRACK' + episode = 'EPISODE' + movie = 'MOVIE' + other = 'OTHER' + songtrack = 'SONGTRACK' + + 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=MediaFingerprint, + 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 = { + 'metadata': 'list', + 'source': 'file', + 'title': 'string', + 'universal_content_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MediaFingerprint, + 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 = { + 'duration_in_sec': 'float', + 'fingerprint_content_type': 'string', + 'fingerprint_type': 'string', + 'id': 'string', + 'metadata': 'Object', + 'title': 'string', + 'universal_content_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['FingerprintContentType'] = MediaFingerprint.FingerprintContentType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/mediatitle.py b/tap_facebook/facebook_business/adobjects/mediatitle.py new file mode 100644 index 0000000..c0de7e5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/mediatitle.py @@ -0,0 +1,295 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 MediaTitle( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMediaTitle = True + super(MediaTitle, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + applinks = 'applinks' + category_specific_fields = 'category_specific_fields' + content_category = 'content_category' + currency = 'currency' + description = 'description' + fb_page_alias = 'fb_page_alias' + fb_page_id = 'fb_page_id' + genres = 'genres' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + kg_fb_id = 'kg_fb_id' + media_title_id = 'media_title_id' + price = 'price' + sanitized_images = 'sanitized_images' + title = 'title' + title_display_name = 'title_display_name' + unit_price = 'unit_price' + url = 'url' + visibility = 'visibility' + wiki_data_item = 'wiki_data_item' + + 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' + + class ContentCategory: + movie = 'MOVIE' + music = 'MUSIC' + tv_show = 'TV_SHOW' + + 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=MediaTitle, + 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 = { + 'applinks': 'Object', + 'content_category': 'content_category_enum', + 'currency': 'string', + 'description': 'string', + 'fb_page_id': 'string', + 'genres': 'list', + 'images': 'list', + 'kg_fb_id': 'string', + 'price': 'unsigned int', + 'title': 'string', + 'title_display_name': 'string', + 'url': 'string', + } + enums = { + 'content_category_enum': MediaTitle.ContentCategory.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MediaTitle, + 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.') + 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=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_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 = { + 'applinks': 'CatalogItemAppLinks', + 'category_specific_fields': 'CatalogSubVerticalList', + 'content_category': 'string', + 'currency': 'string', + 'description': 'string', + 'fb_page_alias': 'string', + 'fb_page_id': 'Page', + 'genres': 'list', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'kg_fb_id': 'string', + 'media_title_id': 'string', + 'price': 'string', + 'sanitized_images': 'list', + 'title': 'string', + 'title_display_name': 'string', + 'unit_price': 'Object', + 'url': 'string', + 'visibility': 'Visibility', + 'wiki_data_item': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = MediaTitle.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = MediaTitle.Visibility.__dict__.values() + field_enum_info['ContentCategory'] = MediaTitle.ContentCategory.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/messagingfeaturereview.py b/tap_facebook/facebook_business/adobjects/messagingfeaturereview.py new file mode 100644 index 0000000..9889591 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/messagingfeaturereview.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 MessagingFeatureReview( + AbstractObject, +): + + def __init__(self, api=None): + super(MessagingFeatureReview, self).__init__() + self._isMessagingFeatureReview = True + self._api = api + + class Field(AbstractObject.Field): + feature = 'feature' + status = 'status' + + _field_types = { + 'feature': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/messagingfeaturestatus.py b/tap_facebook/facebook_business/adobjects/messagingfeaturestatus.py new file mode 100644 index 0000000..195627b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/messagingfeaturestatus.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 MessagingFeatureStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(MessagingFeatureStatus, self).__init__() + self._isMessagingFeatureStatus = True + self._api = api + + 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): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/messengeradspartialautomatedsteplist.py b/tap_facebook/facebook_business/adobjects/messengeradspartialautomatedsteplist.py new file mode 100644 index 0000000..80cfe12 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/messengerprofile.py b/tap_facebook/facebook_business/adobjects/messengerprofile.py new file mode 100644 index 0000000..b38bb26 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/messengerprofile.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 MessengerProfile( + AbstractObject, +): + + def __init__(self, api=None): + super(MessengerProfile, self).__init__() + self._isMessengerProfile = True + self._api = api + + class Field(AbstractObject.Field): + account_linking_url = 'account_linking_url' + commands = 'commands' + get_started = 'get_started' + greeting = 'greeting' + ice_breakers = 'ice_breakers' + payment_settings = 'payment_settings' + persistent_menu = 'persistent_menu' + subject_to_new_eu_privacy_rules = 'subject_to_new_eu_privacy_rules' + target_audience = 'target_audience' + whitelisted_domains = 'whitelisted_domains' + + _field_types = { + 'account_linking_url': 'string', + 'commands': 'list', + 'get_started': 'Object', + 'greeting': 'list', + 'ice_breakers': 'list', + 'payment_settings': 'Object', + 'persistent_menu': 'list', + 'subject_to_new_eu_privacy_rules': 'bool', + 'target_audience': 'Object', + 'whitelisted_domains': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/minimumbudget.py b/tap_facebook/facebook_business/adobjects/minimumbudget.py new file mode 100644 index 0000000..accd5ae --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/minimumbudget.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class MinimumBudget( + AbstractObject, +): + + def __init__(self, api=None): + super(MinimumBudget, self).__init__() + self._isMinimumBudget = True + self._api = api + + class Field(AbstractObject.Field): + currency = 'currency' + min_daily_budget_high_freq = 'min_daily_budget_high_freq' + min_daily_budget_imp = 'min_daily_budget_imp' + min_daily_budget_low_freq = 'min_daily_budget_low_freq' + min_daily_budget_video_views = 'min_daily_budget_video_views' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'minimum_budgets' + + _field_types = { + 'currency': 'string', + 'min_daily_budget_high_freq': 'int', + 'min_daily_budget_imp': 'int', + 'min_daily_budget_low_freq': 'int', + 'min_daily_budget_video_views': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/musicvideocopyright.py b/tap_facebook/facebook_business/adobjects/musicvideocopyright.py new file mode 100644 index 0000000..07f2bbd --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/musicvideocopyright.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 MusicVideoCopyright( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMusicVideoCopyright = True + super(MusicVideoCopyright, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + displayed_matches_count = 'displayed_matches_count' + id = 'id' + in_conflict = 'in_conflict' + isrc = 'isrc' + match_rule = 'match_rule' + ownership_countries = 'ownership_countries' + reference_file_status = 'reference_file_status' + ridge_monitoring_status = 'ridge_monitoring_status' + tags = 'tags' + update_time = 'update_time' + video_asset = 'video_asset' + whitelisted_fb_users = 'whitelisted_fb_users' + whitelisted_ig_users = 'whitelisted_ig_users' + + 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=MusicVideoCopyright, + 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', + 'displayed_matches_count': 'int', + 'id': 'string', + 'in_conflict': 'bool', + 'isrc': 'string', + 'match_rule': 'VideoCopyrightRule', + 'ownership_countries': 'list', + 'reference_file_status': 'string', + 'ridge_monitoring_status': 'string', + 'tags': 'list', + 'update_time': 'datetime', + 'video_asset': 'CopyrightReferenceContainer', + 'whitelisted_fb_users': 'list', + 'whitelisted_ig_users': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/nullnode.py b/tap_facebook/facebook_business/adobjects/nullnode.py new file mode 100644 index 0000000..93662da --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/nullnode.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 NullNode( + AbstractObject, +): + + def __init__(self, api=None): + super(NullNode, self).__init__() + self._isNullNode = 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/tap_facebook/facebook_business/adobjects/objectparser.py b/tap_facebook/facebook_business/adobjects/objectparser.py new file mode 100644 index 0000000..d8466f5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/objectparser.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.exceptions import ( + FacebookBadObjectError, +) +from facebook_business.adobjects.abstractobject import AbstractObject + + +class ObjectParser: + """ + Parser for API response + """ + + def __init__( + self, + api=None, + target_class=None, + reuse_object=None, + custom_parse_method=None, + ): + """ Initialize an ObjectParser. + To Initialize, you need to provide either a reuse_object, target_class, + or an custom_parse_method. + Args: + api: FacebookAdsApi object. + target_class (optional): The expected return object type. + reuse_object (optional): Reuse existing object to populate response. + custom_parse_method (optional): Custom parsing method. + """ + if not any([target_class, reuse_object is not None, custom_parse_method]): + raise FacebookBadObjectError( + 'Must specify either target class calling object' + + 'or custom parse method for parser') + self._reuse_object = reuse_object + self._target_class = target_class + self._custom_parse_method = custom_parse_method + self._api = api + + 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() + + 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, + target_class) + else: + raise FacebookBadObjectError( + 'Must specify either target class calling object' + + 'or custom parse method for parser') + + def parse_multiple(self, response): + if 'data' in response and isinstance(response['data'], list): + ret = [] + if isinstance(response['data'], list): + for json_obj in response['data']: + ret.append(self.parse_single(json_obj)) + else: + ret.append(self.parse_single(response['data'])) + else: + data = response['data'] if 'data' in response else response + ret = [AbstractObject.create_object(self._api, data, + self._target_class)] + + return ret diff --git a/tap_facebook/facebook_business/adobjects/offlineconversiondataset.py b/tap_facebook/facebook_business/adobjects/offlineconversiondataset.py new file mode 100644 index 0000000..8816587 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/offlineconversiondataset.py @@ -0,0 +1,665 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 OfflineConversionDataSet( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOfflineConversionDataSet = True + super(OfflineConversionDataSet, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + automatic_matching_fields = 'automatic_matching_fields' + business = 'business' + can_proxy = 'can_proxy' + config = 'config' + creation_time = 'creation_time' + creator = 'creator' + data_use_setting = 'data_use_setting' + description = 'description' + duplicate_entries = 'duplicate_entries' + enable_auto_assign_to_accounts = 'enable_auto_assign_to_accounts' + enable_automatic_matching = 'enable_automatic_matching' + event_stats = 'event_stats' + event_time_max = 'event_time_max' + event_time_min = 'event_time_min' + first_party_cookie_status = 'first_party_cookie_status' + id = 'id' + is_consolidated_container = 'is_consolidated_container' + is_created_by_business = 'is_created_by_business' + is_crm = 'is_crm' + 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' + match_rate_approx = 'match_rate_approx' + matched_entries = 'matched_entries' + name = 'name' + owner_ad_account = 'owner_ad_account' + 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 + if batch 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=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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adaccount import AdAccount + param_types = { + 'business': 'string', + } + 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() + + 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): + 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='/agencies', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.customaudience import CustomAudience + param_types = { + 'action_source': 'action_source_enum', + 'ad_account': 'string', + } + enums = { + 'action_source_enum': CustomAudience.ActionSource.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/audiences', + 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.customconversion import CustomConversion + param_types = { + 'ad_account': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/customconversions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomConversion, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomConversion, 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_server_events_permitted_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.') + from facebook_business.adobjects.business import Business + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/server_events_permitted_business', + 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_shared_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 = { + 'action_source': 'action_source_enum', + 'business': 'string', + } + enums = { + 'action_source_enum': AdAccount.ActionSource.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/shared_accounts', + 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_shared_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.') + from facebook_business.adobjects.business import Business + param_types = { + 'action_source': 'action_source_enum', + } + enums = { + 'action_source_enum': Business.ActionSource.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/shared_agencies', + 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_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.') + param_types = { + 'aggr_time': 'aggr_time_enum', + 'end': 'int', + 'granularity': 'granularity_enum', + 'skip_empty_values': 'bool', + 'start': 'int', + 'user_timezone_id': 'unsigned int', + } + enums = { + 'aggr_time_enum': [ + 'event_time', + 'upload_time', + ], + 'granularity_enum': [ + 'daily', + 'hourly', + 'six_hourly', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/stats', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.offlineconversiondatasetupload import OfflineConversionDataSetUpload + param_types = { + 'end_time': 'datetime', + 'order': 'order_enum', + 'sort_by': 'sort_by_enum', + 'start_time': 'datetime', + 'upload_tag': 'string', + } + enums = { + 'order_enum': OfflineConversionDataSetUpload.Order.__dict__.values(), + 'sort_by_enum': OfflineConversionDataSetUpload.SortBy.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + 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_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', + 'can_proxy': 'bool', + 'config': 'string', + 'creation_time': 'datetime', + 'creator': 'User', + 'data_use_setting': 'string', + 'description': 'string', + 'duplicate_entries': 'int', + 'enable_auto_assign_to_accounts': 'bool', + 'enable_automatic_matching': 'bool', + 'event_stats': 'string', + 'event_time_max': 'int', + 'event_time_min': 'int', + 'first_party_cookie_status': 'string', + 'id': 'string', + 'is_consolidated_container': 'bool', + 'is_created_by_business': 'bool', + 'is_crm': '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', + 'match_rate_approx': 'int', + 'matched_entries': 'int', + 'name': 'string', + 'owner_ad_account': 'AdAccount', + '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/tap_facebook/facebook_business/adobjects/offlineconversiondatasetpermissions.py b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetpermissions.py new file mode 100644 index 0000000..0463f56 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetpermissions.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 OfflineConversionDataSetPermissions( + AbstractObject, +): + + def __init__(self, api=None): + super(OfflineConversionDataSetPermissions, self).__init__() + self._isOfflineConversionDataSetPermissions = True + self._api = api + + class Field(AbstractObject.Field): + can_edit = 'can_edit' + can_edit_or_upload = 'can_edit_or_upload' + can_upload = 'can_upload' + should_block_vanilla_business_employee_access = 'should_block_vanilla_business_employee_access' + + _field_types = { + 'can_edit': 'bool', + 'can_edit_or_upload': 'bool', + 'can_upload': 'bool', + 'should_block_vanilla_business_employee_access': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/offlineconversiondatasetupload.py b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetupload.py new file mode 100644 index 0000000..57132d3 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetupload.py @@ -0,0 +1,171 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 OfflineConversionDataSetUpload( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOfflineConversionDataSetUpload = True + super(OfflineConversionDataSetUpload, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + api_calls = 'api_calls' + creation_time = 'creation_time' + duplicate_entries = 'duplicate_entries' + event_stats = 'event_stats' + event_time_max = 'event_time_max' + event_time_min = 'event_time_min' + first_upload_time = 'first_upload_time' + id = 'id' + is_excluded_for_lift = 'is_excluded_for_lift' + last_upload_time = 'last_upload_time' + match_rate_approx = 'match_rate_approx' + matched_entries = 'matched_entries' + upload_tag = 'upload_tag' + valid_entries = 'valid_entries' + + class Order: + ascending = 'ASCENDING' + descending = 'DESCENDING' + + class SortBy: + api_calls = 'API_CALLS' + creation_time = 'CREATION_TIME' + event_time_max = 'EVENT_TIME_MAX' + event_time_min = 'EVENT_TIME_MIN' + first_upload_time = 'FIRST_UPLOAD_TIME' + is_excluded_for_lift = 'IS_EXCLUDED_FOR_LIFT' + last_upload_time = 'LAST_UPLOAD_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=OfflineConversionDataSetUpload, + 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_progress(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/progress', + 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_pull_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pull_sessions', + 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 = { + 'api_calls': 'int', + 'creation_time': 'int', + 'duplicate_entries': 'int', + 'event_stats': 'string', + 'event_time_max': 'int', + 'event_time_min': 'int', + 'first_upload_time': 'int', + 'id': 'string', + 'is_excluded_for_lift': 'bool', + 'last_upload_time': 'int', + 'match_rate_approx': 'int', + 'matched_entries': 'int', + 'upload_tag': 'string', + 'valid_entries': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Order'] = OfflineConversionDataSetUpload.Order.__dict__.values() + field_enum_info['SortBy'] = OfflineConversionDataSetUpload.SortBy.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/offlineconversiondatasetusage.py b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetusage.py new file mode 100644 index 0000000..ee0f483 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetusage.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 OfflineConversionDataSetUsage( + AbstractObject, +): + + def __init__(self, api=None): + super(OfflineConversionDataSetUsage, self).__init__() + self._isOfflineConversionDataSetUsage = True + self._api = api + + class Field(AbstractObject.Field): + num_lift_studies = 'num_lift_studies' + + _field_types = { + 'num_lift_studies': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/offsitepixel.py b/tap_facebook/facebook_business/adobjects/offsitepixel.py new file mode 100644 index 0000000..89e8030 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/offsitepixel.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 OffsitePixel( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOffsitePixel = True + super(OffsitePixel, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creator = 'creator' + id = 'id' + js_pixel = 'js_pixel' + last_firing_time = 'last_firing_time' + name = 'name' + tag = 'tag' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'offsitepixels' + + 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 = { + 'value': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OffsitePixel, + 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 = { + 'creator': 'string', + 'id': 'string', + 'js_pixel': 'string', + 'last_firing_time': 'datetime', + 'name': 'string', + 'tag': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/omegacustomertrx.py b/tap_facebook/facebook_business/adobjects/omegacustomertrx.py new file mode 100644 index 0000000..a91c7de --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/omegacustomertrx.py @@ -0,0 +1,143 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 OmegaCustomerTrx( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOmegaCustomerTrx = True + super(OmegaCustomerTrx, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account_ids = 'ad_account_ids' + advertiser_name = 'advertiser_name' + amount = 'amount' + amount_due = 'amount_due' + billed_amount_details = 'billed_amount_details' + billing_period = 'billing_period' + cdn_download_uri = 'cdn_download_uri' + currency = 'currency' + download_uri = 'download_uri' + due_date = 'due_date' + entity = 'entity' + id = 'id' + invoice_date = 'invoice_date' + invoice_id = 'invoice_id' + invoice_type = 'invoice_type' + liability_type = 'liability_type' + payment_status = 'payment_status' + payment_term = 'payment_term' + type = 'type' + + class Type: + cm = 'CM' + dm = 'DM' + inv = 'INV' + pro_forma = 'PRO_FORMA' + + 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=OmegaCustomerTrx, + 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/campaigns', + 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_ids': 'list', + 'advertiser_name': 'string', + 'amount': 'string', + 'amount_due': 'CurrencyAmount', + 'billed_amount_details': 'Object', + 'billing_period': 'string', + 'cdn_download_uri': 'string', + 'currency': 'string', + 'download_uri': 'string', + 'due_date': 'datetime', + 'entity': 'string', + 'id': 'string', + 'invoice_date': 'datetime', + 'invoice_id': 'string', + 'invoice_type': 'string', + 'liability_type': 'string', + 'payment_status': 'string', + 'payment_term': 'string', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Type'] = OmegaCustomerTrx.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/openbridgeconfiguration.py b/tap_facebook/facebook_business/adobjects/openbridgeconfiguration.py new file mode 100644 index 0000000..8b28389 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/openbridgeconfiguration.py @@ -0,0 +1,163 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 OpenBridgeConfiguration( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOpenBridgeConfiguration = True + 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' + pixel_id = 'pixel_id' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'openbridge_configurations' + + # @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_open_bridge_configuration(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 + if batch 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=OpenBridgeConfiguration, + 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 = { + 'access_key': 'string', + 'active': 'bool', + 'endpoint': 'string', + 'fallback_domain': 'string', + 'fallback_domain_enabled': 'bool', + 'host_business_id': 'unsigned int', + 'host_external_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OpenBridgeConfiguration, + 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_key': 'string', + 'active': 'bool', + 'endpoint': 'string', + 'fallback_domain': 'string', + 'fallback_domain_enabled': 'bool', + 'host_business_id': 'string', + 'host_external_id': 'string', + 'id': 'string', + 'pixel_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/opengraphcontext.py b/tap_facebook/facebook_business/adobjects/opengraphcontext.py new file mode 100644 index 0000000..f864f21 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/opengraphcontext.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 OpenGraphContext( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOpenGraphContext = True + super(OpenGraphContext, 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=OpenGraphContext, + 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/tap_facebook/facebook_business/adobjects/outcomepredictionpoint.py b/tap_facebook/facebook_business/adobjects/outcomepredictionpoint.py new file mode 100644 index 0000000..f47f6fc --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/outcomepredictionpoint.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 OutcomePredictionPoint( + AbstractObject, +): + + def __init__(self, api=None): + super(OutcomePredictionPoint, self).__init__() + self._isOutcomePredictionPoint = True + self._api = api + + class Field(AbstractObject.Field): + actions = 'actions' + impressions = 'impressions' + reach = 'reach' + spend = 'spend' + + _field_types = { + 'actions': 'float', + 'impressions': 'float', + 'reach': 'float', + 'spend': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/page.py b/tap_facebook/facebook_business/adobjects/page.py new file mode 100644 index 0000000..b476ff3 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/page.py @@ -0,0 +1,5273 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Page( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPage = True + super(Page, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + about = 'about' + access_token = 'access_token' + ad_campaign = 'ad_campaign' + affiliation = 'affiliation' + 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' + best_page = 'best_page' + bio = 'bio' + birthday = 'birthday' + booking_agent = 'booking_agent' + breaking_news_usage = 'breaking_news_usage' + built = 'built' + business = 'business' + can_checkin = 'can_checkin' + can_post = 'can_post' + category = 'category' + category_list = 'category_list' + checkins = 'checkins' + company_overview = 'company_overview' + connected_instagram_account = 'connected_instagram_account' + connected_page_backed_instagram_account = 'connected_page_backed_instagram_account' + contact_address = 'contact_address' + copyright_whitelisted_ig_partners = 'copyright_whitelisted_ig_partners' + country_page_likes = 'country_page_likes' + cover = 'cover' + culinary_team = 'culinary_team' + current_location = 'current_location' + delivery_and_pickup_option_info = 'delivery_and_pickup_option_info' + description = 'description' + description_html = 'description_html' + differently_open_offerings = 'differently_open_offerings' + 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' + featured_video = 'featured_video' + features = 'features' + followers_count = 'followers_count' + food_styles = 'food_styles' + founded = 'founded' + general_info = 'general_info' + general_manager = 'general_manager' + genre = 'genre' + 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' + hometown = 'hometown' + hours = 'hours' + id = 'id' + impressum = 'impressum' + influences = 'influences' + instagram_business_account = 'instagram_business_account' + is_always_open = 'is_always_open' + 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' + is_permanently_closed = 'is_permanently_closed' + is_published = 'is_published' + is_unclaimed = 'is_unclaimed' + is_verified = 'is_verified' + is_webhooks_subscribed = 'is_webhooks_subscribed' + keywords = 'keywords' + leadgen_tos_acceptance_time = 'leadgen_tos_acceptance_time' + leadgen_tos_accepted = 'leadgen_tos_accepted' + leadgen_tos_accepting_user = 'leadgen_tos_accepting_user' + link = 'link' + location = 'location' + members = 'members' + merchant_id = 'merchant_id' + merchant_review_status = 'merchant_review_status' + messaging_feature_status = 'messaging_feature_status' + messenger_ads_default_icebreakers = 'messenger_ads_default_icebreakers' + 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' + mission = 'mission' + mpg = 'mpg' + name = 'name' + name_with_location_descriptor = 'name_with_location_descriptor' + network = 'network' + new_like_count = 'new_like_count' + offer_eligible = 'offer_eligible' + overall_star_rating = 'overall_star_rating' + owner_business = 'owner_business' + page_token = 'page_token' + parent_page = 'parent_page' + parking = 'parking' + payment_options = 'payment_options' + personal_info = 'personal_info' + personal_interests = 'personal_interests' + pharma_safety_info = 'pharma_safety_info' + phone = 'phone' + pickup_options = 'pickup_options' + place_type = 'place_type' + plot_outline = 'plot_outline' + preferred_audience = 'preferred_audience' + press_contact = 'press_contact' + price_range = 'price_range' + privacy_info_url = 'privacy_info_url' + produced_by = 'produced_by' + products = 'products' + promotion_eligible = 'promotion_eligible' + promotion_ineligible_reason = 'promotion_ineligible_reason' + public_transit = 'public_transit' + rating_count = 'rating_count' + recipient = 'recipient' + record_label = 'record_label' + release_date = 'release_date' + restaurant_services = 'restaurant_services' + restaurant_specialties = 'restaurant_specialties' + schedule = 'schedule' + screenplay_by = 'screenplay_by' + season = 'season' + single_line_address = 'single_line_address' + starring = 'starring' + start_info = 'start_info' + store_code = 'store_code' + store_location_descriptor = 'store_location_descriptor' + store_number = 'store_number' + studio = 'studio' + supports_donate_button_in_live_video = 'supports_donate_button_in_live_video' + talking_about_count = 'talking_about_count' + temporary_status = 'temporary_status' + 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' + website = 'website' + were_here_count = 'were_here_count' + whatsapp_number = 'whatsapp_number' + written_by = 'written_by' + + class Attire: + casual = 'Casual' + dressy = 'Dressy' + unspecified = 'Unspecified' + + class FoodStyles: + afghani = 'Afghani' + american_new_ = 'American (New)' + american_traditional_ = 'American (Traditional)' + asian_fusion = 'Asian Fusion' + barbeque = 'Barbeque' + brazilian = 'Brazilian' + breakfast = 'Breakfast' + british = 'British' + brunch = 'Brunch' + buffets = 'Buffets' + burgers = 'Burgers' + burmese = 'Burmese' + cajun_creole = 'Cajun/Creole' + caribbean = 'Caribbean' + chinese = 'Chinese' + creperies = 'Creperies' + cuban = 'Cuban' + delis = 'Delis' + diners = 'Diners' + ethiopian = 'Ethiopian' + fast_food = 'Fast Food' + filipino = 'Filipino' + fondue = 'Fondue' + food_stands = 'Food Stands' + french = 'French' + german = 'German' + greek_and_mediterranean = 'Greek and Mediterranean' + hawaiian = 'Hawaiian' + himalayan_nepalese = 'Himalayan/Nepalese' + hot_dogs = 'Hot Dogs' + indian_pakistani = 'Indian/Pakistani' + irish = 'Irish' + italian = 'Italian' + japanese = 'Japanese' + korean = 'Korean' + latin_american = 'Latin American' + mexican = 'Mexican' + middle_eastern = 'Middle Eastern' + moroccan = 'Moroccan' + pizza = 'Pizza' + russian = 'Russian' + sandwiches = 'Sandwiches' + seafood = 'Seafood' + singaporean = 'Singaporean' + soul_food = 'Soul Food' + southern = 'Southern' + spanish_basque = 'Spanish/Basque' + steakhouses = 'Steakhouses' + sushi_bars = 'Sushi Bars' + taiwanese = 'Taiwanese' + tapas_bars = 'Tapas Bars' + tex_mex = 'Tex-Mex' + thai = 'Thai' + turkish = 'Turkish' + vegan = 'Vegan' + vegetarian = 'Vegetarian' + vietnamese = 'Vietnamese' + + class PickupOptions: + curbside = 'CURBSIDE' + in_store = 'IN_STORE' + other = 'OTHER' + + class TemporaryStatus: + differently_open = 'DIFFERENTLY_OPEN' + no_data = 'NO_DATA' + operating_as_usual = 'OPERATING_AS_USUAL' + temporarily_closed = 'TEMPORARILY_CLOSED' + + class PermittedTasks: + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + cashier_role = 'CASHIER_ROLE' + create_content = 'CREATE_CONTENT' + manage = 'MANAGE' + manage_jobs = 'MANAGE_JOBS' + manage_leads = 'MANAGE_LEADS' + messaging = 'MESSAGING' + moderate = 'MODERATE' + moderate_community = 'MODERATE_COMMUNITY' + pages_messaging = 'PAGES_MESSAGING' + pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' + profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' + profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' + profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' + profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' + profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' + profile_plus_manage = 'PROFILE_PLUS_MANAGE' + profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' + profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' + profile_plus_moderate = 'PROFILE_PLUS_MODERATE' + profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' + profile_plus_revenue = 'PROFILE_PLUS_REVENUE' + read_page_mailboxes = 'READ_PAGE_MAILBOXES' + view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' + + class Tasks: + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + cashier_role = 'CASHIER_ROLE' + create_content = 'CREATE_CONTENT' + manage = 'MANAGE' + manage_jobs = 'MANAGE_JOBS' + manage_leads = 'MANAGE_LEADS' + messaging = 'MESSAGING' + moderate = 'MODERATE' + moderate_community = 'MODERATE_COMMUNITY' + pages_messaging = 'PAGES_MESSAGING' + pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' + profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' + profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' + profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' + profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' + profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' + profile_plus_manage = 'PROFILE_PLUS_MANAGE' + profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' + profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' + profile_plus_moderate = 'PROFILE_PLUS_MODERATE' + profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' + profile_plus_revenue = 'PROFILE_PLUS_REVENUE' + read_page_mailboxes = 'READ_PAGE_MAILBOXES' + view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' + + class Alignment: + left = 'LEFT' + right = 'RIGHT' + + class EntryPointIcon: + chat_angular_icon = 'CHAT_ANGULAR_ICON' + chat_round_icon = 'CHAT_ROUND_ICON' + messenger_icon = 'MESSENGER_ICON' + none = 'NONE' + + class EntryPointLabel: + ask_us = 'ASK_US' + chat = 'CHAT' + help = 'HELP' + none = 'NONE' + + class GreetingDialogDisplay: + hide = 'HIDE' + show = 'SHOW' + welcome_message = 'WELCOME_MESSAGE' + + class GuestChatMode: + disabled = 'DISABLED' + enabled = 'ENABLED' + + class MobileChatDisplay: + app_switch = 'APP_SWITCH' + chat_tab = 'CHAT_TAB' + + class BackdatedTimeGranularity: + day = 'day' + hour = 'hour' + min = 'min' + month = 'month' + none = 'none' + year = 'year' + + class Formatting: + markdown = 'MARKDOWN' + plaintext = 'PLAINTEXT' + + class PlaceAttachmentSetting: + value_1 = '1' + value_2 = '2' + + class PostSurfacesBlacklist: + value_1 = '1' + value_2 = '2' + value_3 = '3' + value_4 = '4' + value_5 = '5' + + class PostingToRedspace: + disabled = 'disabled' + enabled = 'enabled' + + class TargetSurface: + story = 'STORY' + timeline = 'TIMELINE' + + class UnpublishedContentType: + ads_post = 'ADS_POST' + draft = 'DRAFT' + inline_created = 'INLINE_CREATED' + published = 'PUBLISHED' + reviewable_branded_content = 'REVIEWABLE_BRANDED_CONTENT' + scheduled = 'SCHEDULED' + scheduled_recurring = 'SCHEDULED_RECURRING' + + class MessagingType: + message_tag = 'MESSAGE_TAG' + response = 'RESPONSE' + update = 'UPDATE' + + class NotificationType: + no_push = 'NO_PUSH' + regular = 'REGULAR' + silent_push = 'SILENT_PUSH' + + class SenderAction: + mark_seen = 'MARK_SEEN' + react = 'REACT' + typing_off = 'TYPING_OFF' + typing_on = 'TYPING_ON' + unreact = 'UNREACT' + + class SuggestionAction: + accept = 'ACCEPT' + dismiss = 'DISMISS' + impression = 'IMPRESSION' + + class Platform: + instagram = 'INSTAGRAM' + messenger = 'MESSENGER' + + class Model: + arabic = 'ARABIC' + chinese = 'CHINESE' + croatian = 'CROATIAN' + custom = 'CUSTOM' + danish = 'DANISH' + dutch = 'DUTCH' + english = 'ENGLISH' + french_standard = 'FRENCH_STANDARD' + georgian = 'GEORGIAN' + german_standard = 'GERMAN_STANDARD' + greek = 'GREEK' + hebrew = 'HEBREW' + hungarian = 'HUNGARIAN' + irish = 'IRISH' + italian_standard = 'ITALIAN_STANDARD' + korean = 'KOREAN' + norwegian_bokmal = 'NORWEGIAN_BOKMAL' + polish = 'POLISH' + portuguese = 'PORTUGUESE' + romanian = 'ROMANIAN' + spanish = 'SPANISH' + swedish = 'SWEDISH' + vietnamese = 'VIETNAMESE' + + class DeveloperAction: + enable_followup_message = 'ENABLE_FOLLOWUP_MESSAGE' + + class SubscribedFields: + affiliation = 'affiliation' + attire = 'attire' + awards = 'awards' + bio = 'bio' + birthday = 'birthday' + calls = 'calls' + category = 'category' + checkins = 'checkins' + company_overview = 'company_overview' + conversations = 'conversations' + culinary_team = 'culinary_team' + current_location = 'current_location' + description = 'description' + email = 'email' + feature_access_list = 'feature_access_list' + feed = 'feed' + founded = 'founded' + general_info = 'general_info' + general_manager = 'general_manager' + group_feed = 'group_feed' + hometown = 'hometown' + hours = 'hours' + 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' + invoice_access_onboarding_status_active = 'invoice_access_onboarding_status_active' + leadgen = 'leadgen' + leadgen_fat = 'leadgen_fat' + live_videos = 'live_videos' + local_delivery = 'local_delivery' + location = 'location' + mcom_invoice_change = 'mcom_invoice_change' + members = 'members' + mention = 'mention' + merchant_review = 'merchant_review' + 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' + messages = 'messages' + messaging_account_linking = 'messaging_account_linking' + messaging_appointments = 'messaging_appointments' + messaging_checkout_updates = 'messaging_checkout_updates' + messaging_customer_information = 'messaging_customer_information' + messaging_direct_sends = 'messaging_direct_sends' + messaging_fblogin_account_linking = 'messaging_fblogin_account_linking' + 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' + messaging_policy_enforcement = 'messaging_policy_enforcement' + messaging_postbacks = 'messaging_postbacks' + messaging_pre_checkouts = 'messaging_pre_checkouts' + 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' + picture = 'picture' + price_range = 'price_range' + product_review = 'product_review' + products = 'products' + public_transit = 'public_transit' + publisher_subscriptions = 'publisher_subscriptions' + ratings = 'ratings' + registration = 'registration' + send_cart = 'send_cart' + standby = 'standby' + user_action = 'user_action' + video_text_question_responses = 'video_text_question_responses' + 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): + return '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 = { + 'account_linking_token': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Page, + 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 = { + 'about': 'string', + 'accept_crossposting_handshake': 'list', + 'allow_spherical_photo': 'bool', + 'attire': 'attire_enum', + 'begin_crossposting_handshake': 'list', + 'bio': 'string', + 'category_list': 'list', + 'company_overview': 'string', + 'contact_address': 'Object', + 'cover': 'string', + 'culinary_team': 'string', + 'delivery_and_pickup_option_info': 'list', + 'description': 'string', + 'differently_open_offerings': 'map', + 'directed_by': 'string', + 'displayed_message_response_time': 'string', + 'emails': 'list', + 'focus_x': 'float', + 'focus_y': 'float', + 'food_styles': 'list', + 'general_info': 'string', + 'general_manager': 'string', + 'genre': 'string', + 'hours': 'map', + 'ignore_coordinate_warnings': 'bool', + 'impressum': 'string', + 'is_always_open': 'bool', + 'is_permanently_closed': 'bool', + 'is_published': 'bool', + 'is_webhooks_subscribed': 'bool', + 'location': 'Object', + 'menu': 'string', + 'mission': 'string', + 'no_feed_story': 'bool', + 'no_notification': 'bool', + 'offset_x': 'int', + 'offset_y': 'int', + 'parking': 'map', + 'payment_options': 'map', + 'phone': 'string', + 'pickup_options': 'list', + 'plot_outline': 'string', + 'price_range': 'string', + 'public_transit': 'string', + 'restaurant_services': 'map', + 'restaurant_specialties': 'map', + 'scrape': 'bool', + 'service_details': 'string', + 'spherical_metadata': 'map', + 'start_info': 'Object', + 'store_location_descriptor': 'string', + 'temporary_status': 'temporary_status_enum', + 'website': 'string', + 'zoom_scale_x': 'float', + 'zoom_scale_y': 'float', + } + enums = { + 'attire_enum': Page.Attire.__dict__.values(), + 'food_styles_enum': Page.FoodStyles.__dict__.values(), + 'pickup_options_enum': Page.PickupOptions.__dict__.values(), + 'temporary_status_enum': Page.TemporaryStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Page, + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'idempotency_key': 'string', + 'orders': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/acknowledge_orders', + 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_ads_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.') + from facebook_business.adobjects.pagepost import PagePost + param_types = { + 'exclude_dynamic_ads': 'bool', + 'include_inline_create': 'bool', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ads_posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePost, 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_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): + 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='/agencies', + 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_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': Page.PermittedTasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/agencies', + 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_albums(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.album import Album + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/albums', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Album, + api_type='EDGE', + response_parser=ObjectParser(target_class=Album, 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_ar_experience(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/ar_experience', + 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_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.') + param_types = { + 'user': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/assigned_users', + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.assigneduser import AssignedUser + param_types = { + 'business': 'string', + } + 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() + + def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'tasks': 'list', + 'user': 'int', + } + enums = { + 'tasks_enum': Page.Tasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/assigned_users', + 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_blocked(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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': 'string', + 'psid': 'int', + 'uid': 'int', + 'user': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/blocked', + 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_blocked(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + 'uid': 'int', + 'user': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/blocked', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_blocked(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + 'psid': 'list', + 'uid': 'list', + 'user': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/blocked', + 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_business_datum(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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', + 'partner_agent': 'string', + 'processing_type': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/business_data', + 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_business_projects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='GET', + endpoint='/businessprojects', + 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_call_to_actions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.pagecalltoaction import PageCallToAction + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/call_to_actions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageCallToAction, + api_type='EDGE', + response_parser=ObjectParser(target_class=PageCallToAction, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.canvasbodyelement import CanvasBodyElement + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/canvas_elements', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CanvasBodyElement, + api_type='EDGE', + response_parser=ObjectParser(target_class=CanvasBodyElement, 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_canvas_element(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.canvasbodyelement import CanvasBodyElement + param_types = { + 'canvas_button': 'Object', + 'canvas_carousel': 'Object', + 'canvas_footer': 'Object', + 'canvas_header': 'Object', + 'canvas_lead_form': 'Object', + 'canvas_photo': 'Object', + 'canvas_product_list': 'Object', + 'canvas_product_set': 'Object', + 'canvas_store_locator': 'Object', + 'canvas_template_video': 'Object', + 'canvas_text': 'Object', + 'canvas_video': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/canvas_elements', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CanvasBodyElement, + api_type='EDGE', + response_parser=ObjectParser(target_class=CanvasBodyElement, 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_canvases(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.canvas import Canvas + param_types = { + 'is_hidden': 'bool', + 'is_published': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/canvases', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Canvas, + api_type='EDGE', + response_parser=ObjectParser(target_class=Canvas, 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_canvase(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.canvas import Canvas + param_types = { + 'background_color': 'string', + 'body_element_ids': 'list', + 'enable_swipe_to_open': 'bool', + 'is_hidden': 'bool', + 'is_published': 'bool', + 'name': 'string', + 'source_template_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/canvases', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Canvas, + api_type='EDGE', + response_parser=ObjectParser(target_class=Canvas, 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_chat_plugin(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.chatplugin import ChatPlugin + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/chat_plugin', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ChatPlugin, + api_type='EDGE', + response_parser=ObjectParser(target_class=ChatPlugin, 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_chat_plugin(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'alignment': 'alignment_enum', + 'desktop_bottom_spacing': 'unsigned int', + 'desktop_side_spacing': 'unsigned int', + 'entry_point_icon': 'entry_point_icon_enum', + 'entry_point_label': 'entry_point_label_enum', + 'greeting_dialog_display': 'greeting_dialog_display_enum', + 'guest_chat_mode': 'guest_chat_mode_enum', + 'mobile_bottom_spacing': 'unsigned int', + 'mobile_chat_display': 'mobile_chat_display_enum', + 'mobile_side_spacing': 'unsigned int', + 'theme_color': 'string', + 'welcome_screen_greeting': 'string', + } + enums = { + 'alignment_enum': Page.Alignment.__dict__.values(), + 'entry_point_icon_enum': Page.EntryPointIcon.__dict__.values(), + 'entry_point_label_enum': Page.EntryPointLabel.__dict__.values(), + 'greeting_dialog_display_enum': Page.GreetingDialogDisplay.__dict__.values(), + 'guest_chat_mode_enum': Page.GuestChatMode.__dict__.values(), + 'mobile_chat_display_enum': Page.MobileChatDisplay.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/chat_plugin', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.commercemerchantsettings import CommerceMerchantSettings + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/commerce_merchant_settings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceMerchantSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceMerchantSettings, 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_orders(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.commerceorder import CommerceOrder + param_types = { + 'filters': 'list', + 'state': 'list', + 'updated_after': 'datetime', + 'updated_before': 'datetime', + } + enums = { + 'filters_enum': CommerceOrder.Filters.__dict__.values(), + 'state_enum': CommerceOrder.State.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/commerce_orders', + 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() + + def get_commerce_payouts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.commercepayout import CommercePayout + param_types = { + 'end_time': 'datetime', + 'start_time': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/commerce_payouts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommercePayout, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommercePayout, 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_transactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.commerceordertransactiondetail import CommerceOrderTransactionDetail + param_types = { + 'end_time': 'datetime', + 'payout_reference_id': 'string', + 'start_time': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/commerce_transactions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceOrderTransactionDetail, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceOrderTransactionDetail, 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_conversations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.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'], + method='GET', + endpoint='/conversations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UnifiedThread, + api_type='EDGE', + response_parser=ObjectParser(target_class=UnifiedThread, 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_copyright_manual_claim(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_reason': 'action_reason_enum', + 'countries': 'Object', + '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', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/copyright_manual_claims', + 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_crosspost_whitelisted_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/crosspost_whitelisted_pages', + 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_custom_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.pageusermessagethreadlabel import PageUserMessageThreadLabel + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/custom_labels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageUserMessageThreadLabel, + api_type='EDGE', + response_parser=ObjectParser(target_class=PageUserMessageThreadLabel, 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_custom_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.pageusermessagethreadlabel import PageUserMessageThreadLabel + param_types = { + 'name': 'string', + 'page_label_name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/custom_labels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageUserMessageThreadLabel, + api_type='EDGE', + response_parser=ObjectParser(target_class=PageUserMessageThreadLabel, 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_custom_user_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.') + param_types = { + 'params': 'list', + 'psid': 'string', + } + enums = { + 'params_enum': [ + 'PERSISTENT_MENU', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/custom_user_settings', + 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_custom_user_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.customusersettings import CustomUserSettings + param_types = { + 'psid': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/custom_user_settings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomUserSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomUserSettings, 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_custom_user_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 = { + 'persistent_menu': 'list', + 'psid': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/custom_user_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_dataset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.dataset import Dataset + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/dataset', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Dataset, + api_type='EDGE', + response_parser=ObjectParser(target_class=Dataset, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.event import Event + param_types = { + 'event_state_filter': 'list', + 'include_canceled': 'bool', + 'time_filter': 'time_filter_enum', + 'type': 'type_enum', + } + enums = { + 'event_state_filter_enum': Event.EventStateFilter.__dict__.values(), + 'time_filter_enum': Event.TimeFilter.__dict__.values(), + 'type_enum': Event.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/events', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Event, + api_type='EDGE', + response_parser=ObjectParser(target_class=Event, 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_extend_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'duration': 'unsigned int', + 'recipient': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/extend_thread_control', + 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_fantasy_games(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/fantasy_games', + 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.pagepost import PagePost + param_types = { + 'include_hidden': 'bool', + 'limit': 'unsigned int', + 'show_expired': 'bool', + 'with': 'with_enum', + } + enums = { + 'with_enum': PagePost.With.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/feed', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePost, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'actions': 'Object', + 'adaptive_type': 'string', + 'album_id': 'string', + 'android_key_hash': 'string', + 'animated_effect_id': 'unsigned int', + 'application_id': 'string', + 'asked_fun_fact_prompt_id': 'unsigned int', + 'asset3d_id': 'unsigned int', + 'associated_id': 'string', + 'attach_place_suggestion': 'bool', + 'attached_media': 'list', + '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', + 'child_attachments': 'list', + 'client_mutation_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', + 'connection_class': 'string', + 'content_attachment': 'string', + 'coordinates': 'Object', + 'cta_link': 'string', + 'cta_type': 'string', + 'description': 'string', + 'direct_share_status': 'unsigned int', + 'enforce_link_ownership': 'bool', + 'expanded_height': 'unsigned int', + 'expanded_width': 'unsigned int', + 'feed_targeting': 'Object', + 'formatting': 'formatting_enum', + 'fun_fact_prompt_id': 'unsigned int', + 'fun_fact_toastee_id': 'unsigned int', + 'height': 'unsigned int', + 'holiday_card': 'string', + 'home_checkin_city_id': 'Object', + 'image_crops': 'map', + 'implicit_with_tags': 'list', + 'instant_game_entry_point_data': 'string', + 'ios_bundle_id': 'string', + 'is_backout_draft': 'bool', + 'is_boost_intended': 'bool', + 'is_explicit_location': 'bool', + 'is_explicit_share': 'bool', + 'is_group_linking_post': 'bool', + 'is_photo_container': 'bool', + 'link': 'string', + 'location_source_id': 'string', + 'manual_privacy': 'bool', + 'message': 'string', + 'multi_share_end_card': 'bool', + 'multi_share_optimized': 'bool', + 'name': 'string', + 'nectar_module': 'string', + 'object_attachment': 'string', + 'offer_like_post_id': 'unsigned int', + 'og_action_type_id': 'string', + 'og_hide_object_attachment': 'bool', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'page_recommendation': 'string', + 'picture': 'string', + 'place': 'Object', + 'place_attachment_setting': 'place_attachment_setting_enum', + 'place_list': 'string', + 'place_list_data': 'list', + 'post_surfaces_blacklist': 'list', + 'posting_to_redspace': 'posting_to_redspace_enum', + 'privacy': 'string', + 'prompt_id': 'string', + 'prompt_tracking_string': 'string', + 'properties': 'Object', + 'proxied_app_id': 'string', + 'publish_event_id': 'unsigned int', + 'published': 'bool', + 'quote': 'string', + 'react_mode_metadata': 'string', + 'ref': 'list', + 'referenceable_image_ids': 'list', + 'referral_id': 'string', + 'scheduled_publish_time': 'datetime', + 'source': 'string', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'suggested_place_id': 'Object', + 'tags': 'list', + 'target_surface': 'target_surface_enum', + 'targeting': 'Object', + 'text_format_metadata': 'string', + 'text_format_preset_id': 'string', + 'text_only_place': 'string', + 'throwback_camera_roll_media': 'string', + 'thumbnail': 'file', + 'time_since_original_post': 'unsigned int', + 'title': 'string', + 'tracking_info': 'string', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'user_selected_tags': 'bool', + 'video_start_time_ms': 'unsigned int', + 'viewer_coordinates': 'Object', + 'width': 'unsigned int', + } + enums = { + 'backdated_time_granularity_enum': Page.BackdatedTimeGranularity.__dict__.values(), + 'formatting_enum': Page.Formatting.__dict__.values(), + 'place_attachment_setting_enum': Page.PlaceAttachmentSetting.__dict__.values(), + 'post_surfaces_blacklist_enum': Page.PostSurfacesBlacklist.__dict__.values(), + 'posting_to_redspace_enum': Page.PostingToRedspace.__dict__.values(), + 'target_surface_enum': Page.TargetSurface.__dict__.values(), + 'unpublished_content_type_enum': Page.UnpublishedContentType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/feed', + 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_global_brand_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='/global_brand_children', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.group import Group + param_types = { + 'admin_only': 'bool', + 'parent': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + api_type='EDGE', + response_parser=ObjectParser(target_class=Group, 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_image_copyrights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.imagecopyright import ImageCopyright + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/image_copyrights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ImageCopyright, + api_type='EDGE', + response_parser=ObjectParser(target_class=ImageCopyright, 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_image_copyright(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.imagecopyright import ImageCopyright + param_types = { + 'artist': 'string', + 'attribution_link': 'string', + 'creator': 'string', + 'custom_id': 'string', + 'description': 'string', + 'filename': 'string', + 'geo_ownership': 'list', + 'original_content_creation_date': 'unsigned int', + 'reference_photo': 'string', + 'title': 'string', + } + enums = { + 'geo_ownership_enum': ImageCopyright.GeoOwnership.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/image_copyrights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ImageCopyright, + api_type='EDGE', + response_parser=ObjectParser(target_class=ImageCopyright, 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_indexed_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.advideo import AdVideo + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/indexed_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) + + if batch is 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 = { + 'breakdown': 'list', + 'date_preset': 'date_preset_enum', + 'metric': 'list', + 'period': 'period_enum', + 'show_description_from_api_doc': 'bool', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'date_preset_enum': InsightsResult.DatePreset.__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() + + def get_instagram_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.instagramuser import InstagramUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/instagram_accounts', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.leadgenform import LeadgenForm + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/leadgen_forms', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LeadgenForm, + api_type='EDGE', + response_parser=ObjectParser(target_class=LeadgenForm, 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_lead_gen_form(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.leadgenform import LeadgenForm + param_types = { + 'allow_organic_lead_retrieval': 'bool', + 'block_display_for_non_targeted_viewer': 'bool', + 'context_card': 'Object', + 'cover_photo': 'file', + 'custom_disclaimer': 'Object', + 'follow_up_action_url': 'string', + 'is_for_canvas': 'bool', + 'is_optimized_for_quality': 'bool', + 'locale': 'locale_enum', + 'name': 'string', + 'privacy_policy': 'Object', + 'question_page_custom_headline': 'string', + 'questions': 'list', + 'thank_you_page': 'Object', + 'tracking_parameters': 'map', + } + enums = { + 'locale_enum': LeadgenForm.Locale.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/leadgen_forms', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LeadgenForm, + api_type='EDGE', + response_parser=ObjectParser(target_class=LeadgenForm, 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'target_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + 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_live_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.livevideo import LiveVideo + param_types = { + 'broadcast_status': 'list', + 'source': 'source_enum', + } + enums = { + 'broadcast_status_enum': LiveVideo.BroadcastStatus.__dict__.values(), + 'source_enum': LiveVideo.Source.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/live_videos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideo, 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_live_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.livevideo import LiveVideo + param_types = { + 'content_tags': 'list', + 'crossposting_actions': 'list', + 'custom_labels': 'list', + 'description': 'string', + 'enable_backup_ingest': 'bool', + 'encoding_settings': 'string', + 'event_params': 'Object', + 'fisheye_video_cropped': 'bool', + 'front_z_rotation': 'float', + 'game_show': 'map', + 'is_audio_only': 'bool', + 'is_spherical': 'bool', + 'original_fov': 'unsigned int', + 'privacy': 'string', + 'projection': 'projection_enum', + 'published': 'bool', + 'schedule_custom_profile_image': 'file', + 'spatial_audio_format': 'spatial_audio_format_enum', + 'status': 'status_enum', + 'stereoscopic_mode': 'stereoscopic_mode_enum', + 'stop_on_delete_stream': 'bool', + 'stream_type': 'stream_type_enum', + 'targeting': 'Object', + 'title': 'string', + } + enums = { + 'projection_enum': LiveVideo.Projection.__dict__.values(), + 'spatial_audio_format_enum': LiveVideo.SpatialAudioFormat.__dict__.values(), + 'status_enum': LiveVideo.Status.__dict__.values(), + 'stereoscopic_mode_enum': LiveVideo.StereoscopicMode.__dict__.values(), + 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/live_videos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideo, 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_locations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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_ids': 'list', + 'store_numbers': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/locations', + 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_locations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/locations', + 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 create_location(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'always_open': 'bool', + 'delivery_and_pickup_option_info': 'list', + 'differently_open_offerings': 'map', + 'hours': 'map', + 'ignore_warnings': 'bool', + 'location': 'Object', + 'location_page_id': 'string', + 'old_store_number': 'unsigned int', + 'page_username': 'string', + 'permanently_closed': 'bool', + 'phone': 'string', + 'pickup_options': 'list', + 'place_topics': 'list', + 'price_range': 'string', + 'store_code': 'string', + 'store_location_descriptor': 'string', + 'store_name': 'string', + 'store_number': 'unsigned int', + 'temporary_status': 'temporary_status_enum', + 'website': 'string', + } + enums = { + 'pickup_options_enum': Page.PickupOptions.__dict__.values(), + 'temporary_status_enum': Page.TemporaryStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/locations', + 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_media_fingerprints(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.mediafingerprint import MediaFingerprint + param_types = { + 'universal_content_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/media_fingerprints', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MediaFingerprint, + api_type='EDGE', + response_parser=ObjectParser(target_class=MediaFingerprint, 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_media_fingerprint(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.mediafingerprint import MediaFingerprint + param_types = { + 'fingerprint_content_type': 'fingerprint_content_type_enum', + 'metadata': 'list', + 'source': 'string', + 'title': 'string', + 'universal_content_id': 'string', + } + enums = { + 'fingerprint_content_type_enum': MediaFingerprint.FingerprintContentType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/media_fingerprints', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MediaFingerprint, + api_type='EDGE', + response_parser=ObjectParser(target_class=MediaFingerprint, 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_message_attachment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'message': 'Object', + 'platform': 'platform_enum', + } + enums = { + 'platform_enum': [ + 'INSTAGRAM', + 'MESSENGER', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/message_attachments', + 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_message(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'message': 'Object', + 'messaging_type': 'messaging_type_enum', + 'notification_type': 'notification_type_enum', + 'payload': 'string', + 'persona_id': 'string', + 'recipient': 'Object', + 'sender_action': 'sender_action_enum', + 'suggestion_action': 'suggestion_action_enum', + 'tag': 'Object', + 'thread_control': 'Object', + } + enums = { + 'messaging_type_enum': Page.MessagingType.__dict__.values(), + 'notification_type_enum': Page.NotificationType.__dict__.values(), + 'sender_action_enum': Page.SenderAction.__dict__.values(), + 'suggestion_action_enum': Page.SuggestionAction.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/messages', + 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_messaging_feature_review(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.messagingfeaturereview import MessagingFeatureReview + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/messaging_feature_review', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MessagingFeatureReview, + api_type='EDGE', + response_parser=ObjectParser(target_class=MessagingFeatureReview, 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_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): + 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_form(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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(), + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/messenger_profile', + 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_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.') + from facebook_business.adobjects.messengerprofile import MessengerProfile + param_types = { + 'platform': 'platform_enum', + } + enums = { + 'platform_enum': Page.Platform.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/messenger_profile', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MessengerProfile, + api_type='EDGE', + response_parser=ObjectParser(target_class=MessengerProfile, 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_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 = { + 'account_linking_url': 'string', + 'commands': 'list', + 'description': 'list', + 'get_started': 'Object', + 'greeting': 'list', + 'ice_breakers': 'list', + 'payment_settings': 'Object', + 'persistent_menu': 'list', + 'platform': 'platform_enum', + 'target_audience': 'Object', + 'title': 'list', + 'whitelisted_domains': 'list', + } + enums = { + 'platform_enum': Page.Platform.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/messenger_profile', + 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 create_nlp_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 = { + 'api_version': 'Object', + 'custom_token': 'string', + 'model': 'model_enum', + 'n_best': 'unsigned int', + 'nlp_enabled': 'bool', + 'other_language_support': 'map', + 'verbose': 'bool', + } + enums = { + 'model_enum': Page.Model.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/nlp_configs', + 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_notification_message_tokens(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.userpageonetimeoptintokensettings import UserPageOneTimeOptInTokenSettings + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/notification_message_tokens', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UserPageOneTimeOptInTokenSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=UserPageOneTimeOptInTokenSettings, 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_notification_messages_dev_support(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'developer_action': 'developer_action_enum', + 'recipient': 'Object', + } + enums = { + 'developer_action_enum': Page.DeveloperAction.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/notification_messages_dev_support', + 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_page_backed_instagram_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.instagramuser import InstagramUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/page_backed_instagram_accounts', + 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 create_page_backed_instagram_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.') + from facebook_business.adobjects.instagramuser import InstagramUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/page_backed_instagram_accounts', + 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 create_page_whatsapp_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.') + param_types = { + 'verification_code': 'string', + 'whatsapp_number': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/page_whatsapp_number_verification', + 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 create_pass_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'metadata': 'string', + 'recipient': 'Object', + 'target_app_id': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/pass_thread_control', + 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 create_pass_thread_metadatum(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'metadata': 'string', + 'recipient': 'Object', + 'target_app_id': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/pass_thread_metadata', + 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_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.') + from facebook_business.adobjects.persona import Persona + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/personas', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Persona, + api_type='EDGE', + response_parser=ObjectParser(target_class=Persona, 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_persona(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.persona import Persona + param_types = { + 'name': 'string', + 'profile_picture_url': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/personas', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Persona, + api_type='EDGE', + response_parser=ObjectParser(target_class=Persona, 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.photo import Photo + param_types = { + 'biz_tag_id': 'unsigned int', + 'business_id': 'string', + 'type': 'type_enum', + } + enums = { + 'type_enum': Photo.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/photos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Photo, + api_type='EDGE', + response_parser=ObjectParser(target_class=Photo, 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_photo(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.photo import Photo + param_types = { + 'aid': 'string', + 'allow_spherical_photo': 'bool', + 'alt_text_custom': 'string', + 'android_key_hash': 'string', + 'application_id': 'string', + 'attempt': 'unsigned int', + 'audience_exp': 'bool', + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'caption': 'string', + 'composer_session_id': 'string', + 'direct_share_status': 'unsigned int', + 'feed_targeting': 'Object', + 'filter_type': 'unsigned int', + 'full_res_is_coming_later': 'bool', + 'initial_view_heading_override_degrees': 'unsigned int', + 'initial_view_pitch_override_degrees': 'unsigned int', + 'initial_view_vertical_fov_override_degrees': 'unsigned int', + 'ios_bundle_id': 'string', + 'is_explicit_location': 'bool', + 'is_explicit_place': 'bool', + 'location_source_id': 'string', + 'manual_privacy': 'bool', + 'message': 'string', + 'name': 'string', + 'nectar_module': 'string', + 'no_story': 'bool', + 'offline_id': 'unsigned int', + 'og_action_type_id': 'string', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'parent_media_id': 'unsigned int', + 'place': 'Object', + 'privacy': 'string', + 'profile_id': 'int', + 'proxied_app_id': 'string', + 'published': 'bool', + 'qn': 'string', + 'scheduled_publish_time': 'unsigned int', + 'spherical_metadata': 'map', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'tags': 'list', + 'target_id': 'int', + 'targeting': 'Object', + 'temporary': 'bool', + 'time_since_original_post': 'unsigned int', + 'uid': 'int', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'url': 'string', + 'user_selected_tags': 'bool', + 'vault_image_id': 'string', + } + enums = { + 'backdated_time_granularity_enum': Photo.BackdatedTimeGranularity.__dict__.values(), + 'unpublished_content_type_enum': Photo.UnpublishedContentType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/photos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Photo, + api_type='EDGE', + response_parser=ObjectParser(target_class=Photo, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profilepicturesource import ProfilePictureSource + param_types = { + 'height': 'int', + 'redirect': 'bool', + 'type': 'type_enum', + 'width': 'int', + } + enums = { + 'type_enum': ProfilePictureSource.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/picture', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProfilePictureSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProfilePictureSource, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profilepicturesource import ProfilePictureSource + param_types = { + 'android_key_hash': 'string', + 'burn_media_effect': 'bool', + 'caption': 'string', + 'composer_session_id': 'string', + 'frame_entrypoint': 'string', + 'has_umg': 'bool', + 'height': 'unsigned int', + 'ios_bundle_id': 'string', + 'media_effect_ids': 'list', + 'media_effect_source_object_id': 'int', + 'msqrd_mask_id': 'string', + 'photo': 'string', + 'picture': 'string', + 'profile_pic_method': 'string', + 'profile_pic_source': 'string', + 'proxied_app_id': 'int', + 'qn': 'string', + 'reuse': 'bool', + 'scaled_crop_rect': 'Object', + 'set_profile_photo_shield': 'string', + 'sticker_id': 'int', + 'sticker_source_object_id': 'int', + 'suppress_stories': 'bool', + 'width': 'unsigned int', + 'x': 'unsigned int', + 'y': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/picture', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProfilePictureSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProfilePictureSource, 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_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.') + from facebook_business.adobjects.pagepost import PagePost + param_types = { + 'include_hidden': 'bool', + 'limit': 'unsigned int', + 'q': 'string', + 'show_expired': 'bool', + 'with': 'with_enum', + } + enums = { + 'with_enum': PagePost.With.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePost, 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_catalogs', + 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() + + def get_published_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.') + from facebook_business.adobjects.pagepost import PagePost + param_types = { + 'include_hidden': 'bool', + 'limit': 'unsigned int', + 'show_expired': 'bool', + 'with': 'with_enum', + } + enums = { + 'with_enum': PagePost.With.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/published_posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePost, 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_ratings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.recommendation import Recommendation + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ratings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Recommendation, + api_type='EDGE', + response_parser=ObjectParser(target_class=Recommendation, 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_release_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'recipient': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/release_thread_control', + 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 create_request_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'metadata': 'string', + 'recipient': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/request_thread_control', + 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_roles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'include_deactivated': 'bool', + 'uid': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/roles', + 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() + + def get_rtb_dynamic_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.') + from facebook_business.adobjects.rtbdynamicpost import RTBDynamicPost + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/rtb_dynamic_posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=RTBDynamicPost, + api_type='EDGE', + response_parser=ObjectParser(target_class=RTBDynamicPost, 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_scheduled_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.') + from facebook_business.adobjects.pagepost import PagePost + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/scheduled_posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePost, 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_secondary_receivers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'platform': 'platform_enum', + } + enums = { + 'platform_enum': Application.Platform.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/secondary_receivers', + 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_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.pagesettings import PageSettings + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/settings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=PageSettings, 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_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 = { + 'option': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/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_shop_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.commercemerchantsettingssetupstatus import CommerceMerchantSettingsSetupStatus + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/shop_setup_status', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceMerchantSettingsSetupStatus, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceMerchantSettingsSetupStatus, 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.') + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/subscribed_apps', + 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_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.') + from facebook_business.adobjects.application import Application + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/subscribed_apps', + 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 create_subscribed_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.') + param_types = { + 'subscribed_fields': 'list', + } + enums = { + 'subscribed_fields_enum': Page.SubscribedFields.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/subscribed_apps', + 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_tabs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.tab import Tab + param_types = { + 'tab': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/tabs', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Tab, + api_type='EDGE', + response_parser=ObjectParser(target_class=Tab, 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_tagged(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.pagepost import PagePost + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/tagged', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePost, 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_take_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'metadata': 'string', + 'recipient': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/take_thread_control', + 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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.pagethreadowner import PageThreadOwner + param_types = { + 'recipient': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/thread_owner', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageThreadOwner, + api_type='EDGE', + response_parser=ObjectParser(target_class=PageThreadOwner, 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_threads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.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'], + method='GET', + endpoint='/threads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UnifiedThread, + api_type='EDGE', + response_parser=ObjectParser(target_class=UnifiedThread, 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_unlink_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 = { + 'psid': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/unlink_accounts', + 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_video_copyright_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.videocopyrightrule import VideoCopyrightRule + param_types = { + 'selected_rule_id': 'string', + 'source': 'source_enum', + } + enums = { + 'source_enum': VideoCopyrightRule.Source.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/video_copyright_rules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoCopyrightRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoCopyrightRule, 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_copyright_rule(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.videocopyrightrule import VideoCopyrightRule + param_types = { + 'condition_groups': 'list', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/video_copyright_rules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoCopyrightRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoCopyrightRule, 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_copyright(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.videocopyright import VideoCopyright + param_types = { + 'attribution_id': 'string', + 'content_category': 'content_category_enum', + 'copyright_content_id': 'string', + 'excluded_ownership_countries': 'list', + 'excluded_ownership_segments': 'list', + 'is_reference_disabled': 'bool', + 'is_reference_video': 'bool', + 'monitoring_type': 'monitoring_type_enum', + 'ownership_countries': 'list', + 'rule_id': 'string', + 'tags': 'list', + 'whitelisted_ids': 'list', + 'whitelisted_ig_user_ids': 'list', + } + enums = { + 'content_category_enum': VideoCopyright.ContentCategory.__dict__.values(), + 'monitoring_type_enum': VideoCopyright.MonitoringType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/video_copyrights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoCopyright, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoCopyright, 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_video_lists(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.videolist import VideoList + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/video_lists', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoList, + api_type='EDGE', + response_parser=ObjectParser(target_class=VideoList, 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_video_reels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/video_reels', + 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) + + if batch is 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_reel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + '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': AdVideo.UploadPhase.__dict__.values(), + 'video_state_enum': AdVideo.VideoState.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/video_reels', + 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) + + if batch is 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.advideo import AdVideo + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': AdVideo.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + 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) + + if batch is 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_breaks': 'list', + 'adaptive_type': 'string', + 'animated_effect_id': 'unsigned int', + 'application_id': 'string', + 'asked_fun_fact_prompt_id': 'unsigned int', + 'audio_story_wave_animation_handle': 'string', + 'backdated_post': 'list', + 'call_to_action': 'Object', + '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', + 'content_tags': 'list', + 'creative_tools': 'string', + 'crossposted_video_id': 'string', + 'custom_labels': 'list', + 'description': 'string', + 'direct_share_status': 'unsigned int', + 'embeddable': 'bool', + 'end_offset': 'unsigned int', + 'expiration': 'Object', + 'fbuploader_video_file_chunk': 'string', + 'feed_targeting': 'Object', + '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_explicit_share': 'bool', + 'is_group_linking_post': 'bool', + 'is_voice_clip': 'bool', + 'location_source_id': 'string', + 'manual_privacy': 'bool', + 'multilingual_data': 'list', + 'no_story': 'bool', + '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', + 'published': 'bool', + 'react_mode_metadata': 'string', + 'reference_only': 'bool', + 'referenced_sticker_id': 'string', + 'replace_video_id': 'string', + 'scheduled_publish_time': 'unsigned int', + 'secret': 'bool', + 'slideshow_spec': 'map', + 'social_actions': 'bool', + 'source': 'string', + 'source_instagram_media_id': 'string', + 'specified_dialect': 'string', + 'spherical': 'bool', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'start_offset': 'unsigned int', + 'swap_mode': 'swap_mode_enum', + 'targeting': 'Object', + 'text_format_metadata': 'string', + 'throwback_camera_roll_media': 'string', + 'thumb': 'file', + 'time_since_original_post': 'unsigned int', + 'title': 'string', + 'transcode_setting_properties': 'string', + 'universal_video_id': 'string', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'upload_phase': 'upload_phase_enum', + 'upload_session_id': 'string', + 'upload_setting_properties': 'string', + 'video_asset_id': 'string', + '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(), + } + 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) + + if batch is 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_visitor_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.') + from facebook_business.adobjects.pagepost import PagePost + param_types = { + 'include_hidden': 'bool', + 'limit': 'unsigned int', + 'show_expired': 'bool', + 'with': 'with_enum', + } + enums = { + 'with_enum': PagePost.With.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/visitor_posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePost, 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_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 = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + 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), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is 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 = { + 'about': 'string', + 'access_token': 'string', + 'ad_campaign': 'AdSet', + 'affiliation': 'string', + 'app_id': 'string', + 'artists_we_like': 'string', + 'attire': 'string', + 'available_promo_offer_ids': 'list>>>', + 'awards': 'string', + 'band_interests': 'string', + 'band_members': 'string', + 'best_page': 'Page', + 'bio': 'string', + 'birthday': 'string', + 'booking_agent': 'string', + 'breaking_news_usage': 'Object', + 'built': 'string', + 'business': 'Object', + 'can_checkin': 'bool', + 'can_post': 'bool', + 'category': 'string', + 'category_list': 'list', + 'checkins': 'unsigned int', + 'company_overview': 'string', + 'connected_instagram_account': 'IGUser', + 'connected_page_backed_instagram_account': 'IGUser', + 'contact_address': 'MailingAddress', + 'copyright_whitelisted_ig_partners': 'list', + 'country_page_likes': 'unsigned int', + 'cover': 'CoverPhoto', + 'culinary_team': 'string', + 'current_location': 'string', + 'delivery_and_pickup_option_info': 'list', + 'description': 'string', + 'description_html': 'string', + 'differently_open_offerings': 'list>', + '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', + 'featured_video': 'AdVideo', + 'features': 'string', + 'followers_count': 'unsigned int', + 'food_styles': 'list', + 'founded': 'string', + 'general_info': 'string', + 'general_manager': 'string', + 'genre': 'string', + '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', + 'hometown': 'string', + 'hours': 'map', + 'id': 'string', + 'impressum': 'string', + 'influences': 'string', + 'instagram_business_account': 'IGUser', + 'is_always_open': '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', + 'is_permanently_closed': 'bool', + 'is_published': 'bool', + 'is_unclaimed': 'bool', + 'is_verified': 'bool', + 'is_webhooks_subscribed': 'bool', + 'keywords': 'Object', + 'leadgen_tos_acceptance_time': 'datetime', + 'leadgen_tos_accepted': 'bool', + 'leadgen_tos_accepting_user': 'User', + 'link': 'string', + 'location': 'Location', + 'members': 'string', + 'merchant_id': 'string', + 'merchant_review_status': 'string', + 'messaging_feature_status': 'MessagingFeatureStatus', + 'messenger_ads_default_icebreakers': 'list', + 'messenger_ads_default_quick_replies': 'list', + 'messenger_ads_quick_replies_type': 'string', + 'mini_shop_storefront': 'Shop', + 'mission': 'string', + 'mpg': 'string', + 'name': 'string', + 'name_with_location_descriptor': 'string', + 'network': 'string', + 'new_like_count': 'unsigned int', + 'offer_eligible': 'bool', + 'overall_star_rating': 'float', + 'owner_business': 'Business', + 'page_token': 'string', + 'parent_page': 'Page', + 'parking': 'PageParking', + 'payment_options': 'PagePaymentOptions', + 'personal_info': 'string', + 'personal_interests': 'string', + 'pharma_safety_info': 'string', + 'phone': 'string', + 'pickup_options': 'list', + 'place_type': 'string', + 'plot_outline': 'string', + 'preferred_audience': 'Targeting', + 'press_contact': 'string', + 'price_range': 'string', + 'privacy_info_url': 'string', + 'produced_by': 'string', + 'products': 'string', + 'promotion_eligible': 'bool', + 'promotion_ineligible_reason': 'string', + 'public_transit': 'string', + 'rating_count': 'unsigned int', + 'recipient': 'string', + 'record_label': 'string', + 'release_date': 'string', + 'restaurant_services': 'PageRestaurantServices', + 'restaurant_specialties': 'PageRestaurantSpecialties', + 'schedule': 'string', + 'screenplay_by': 'string', + 'season': 'string', + 'single_line_address': 'string', + 'starring': 'string', + 'start_info': 'PageStartInfo', + 'store_code': 'string', + 'store_location_descriptor': 'string', + 'store_number': 'unsigned int', + 'studio': 'string', + 'supports_donate_button_in_live_video': 'bool', + 'talking_about_count': 'unsigned int', + 'temporary_status': 'string', + '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', + 'website': 'string', + 'were_here_count': 'unsigned int', + 'whatsapp_number': 'string', + 'written_by': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Attire'] = Page.Attire.__dict__.values() + field_enum_info['FoodStyles'] = Page.FoodStyles.__dict__.values() + field_enum_info['PickupOptions'] = Page.PickupOptions.__dict__.values() + field_enum_info['TemporaryStatus'] = Page.TemporaryStatus.__dict__.values() + field_enum_info['PermittedTasks'] = Page.PermittedTasks.__dict__.values() + field_enum_info['Tasks'] = Page.Tasks.__dict__.values() + field_enum_info['Alignment'] = Page.Alignment.__dict__.values() + field_enum_info['EntryPointIcon'] = Page.EntryPointIcon.__dict__.values() + field_enum_info['EntryPointLabel'] = Page.EntryPointLabel.__dict__.values() + field_enum_info['GreetingDialogDisplay'] = Page.GreetingDialogDisplay.__dict__.values() + 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['Formatting'] = Page.Formatting.__dict__.values() + field_enum_info['PlaceAttachmentSetting'] = Page.PlaceAttachmentSetting.__dict__.values() + field_enum_info['PostSurfacesBlacklist'] = Page.PostSurfacesBlacklist.__dict__.values() + field_enum_info['PostingToRedspace'] = Page.PostingToRedspace.__dict__.values() + field_enum_info['TargetSurface'] = Page.TargetSurface.__dict__.values() + field_enum_info['UnpublishedContentType'] = Page.UnpublishedContentType.__dict__.values() + field_enum_info['MessagingType'] = Page.MessagingType.__dict__.values() + field_enum_info['NotificationType'] = Page.NotificationType.__dict__.values() + field_enum_info['SenderAction'] = Page.SenderAction.__dict__.values() + field_enum_info['SuggestionAction'] = Page.SuggestionAction.__dict__.values() + field_enum_info['Platform'] = Page.Platform.__dict__.values() + 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/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblock.py b/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblock.py new file mode 100644 index 0000000..1f40064 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py b/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py new file mode 100644 index 0000000..f75f61a --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py b/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py new file mode 100644 index 0000000..a0dcf3f --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/pagecalltoaction.py b/tap_facebook/facebook_business/adobjects/pagecalltoaction.py new file mode 100644 index 0000000..e207dd5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagecalltoaction.py @@ -0,0 +1,265 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 PageCallToAction( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageCallToAction = True + super(PageCallToAction, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + android_app = 'android_app' + android_deeplink = 'android_deeplink' + android_destination_type = 'android_destination_type' + android_package_name = 'android_package_name' + android_url = 'android_url' + created_time = 'created_time' + email_address = 'email_address' + field_from = 'from' + id = 'id' + intl_number_with_plus = 'intl_number_with_plus' + iphone_app = 'iphone_app' + iphone_deeplink = 'iphone_deeplink' + iphone_destination_type = 'iphone_destination_type' + iphone_url = 'iphone_url' + status = 'status' + type = 'type' + updated_time = 'updated_time' + web_destination_type = 'web_destination_type' + web_url = 'web_url' + + class AndroidDestinationType: + app_deeplink = 'APP_DEEPLINK' + become_a_volunteer = 'BECOME_A_VOLUNTEER' + email = 'EMAIL' + facebook_app = 'FACEBOOK_APP' + follow = 'FOLLOW' + marketplace_inventory_page = 'MARKETPLACE_INVENTORY_PAGE' + menu_on_facebook = 'MENU_ON_FACEBOOK' + messenger = 'MESSENGER' + mini_shop = 'MINI_SHOP' + mobile_center = 'MOBILE_CENTER' + none = 'NONE' + phone_call = 'PHONE_CALL' + shop_on_facebook = 'SHOP_ON_FACEBOOK' + website = 'WEBSITE' + + class IphoneDestinationType: + app_deeplink = 'APP_DEEPLINK' + become_a_volunteer = 'BECOME_A_VOLUNTEER' + email = 'EMAIL' + facebook_app = 'FACEBOOK_APP' + follow = 'FOLLOW' + marketplace_inventory_page = 'MARKETPLACE_INVENTORY_PAGE' + menu_on_facebook = 'MENU_ON_FACEBOOK' + messenger = 'MESSENGER' + mini_shop = 'MINI_SHOP' + none = 'NONE' + phone_call = 'PHONE_CALL' + shop_on_facebook = 'SHOP_ON_FACEBOOK' + website = 'WEBSITE' + + class Type: + become_a_volunteer = 'BECOME_A_VOLUNTEER' + book_appointment = 'BOOK_APPOINTMENT' + book_now = 'BOOK_NOW' + buy_tickets = 'BUY_TICKETS' + call_now = 'CALL_NOW' + charity_donate = 'CHARITY_DONATE' + contact_us = 'CONTACT_US' + donate_now = 'DONATE_NOW' + email = 'EMAIL' + follow_page = 'FOLLOW_PAGE' + get_directions = 'GET_DIRECTIONS' + get_offer = 'GET_OFFER' + get_offer_view = 'GET_OFFER_VIEW' + interested = 'INTERESTED' + learn_more = 'LEARN_MORE' + listen = 'LISTEN' + local_dev_platform = 'LOCAL_DEV_PLATFORM' + message = 'MESSAGE' + mobile_center = 'MOBILE_CENTER' + open_app = 'OPEN_APP' + order_food = 'ORDER_FOOD' + play_music = 'PLAY_MUSIC' + play_now = 'PLAY_NOW' + purchase_gift_cards = 'PURCHASE_GIFT_CARDS' + request_appointment = 'REQUEST_APPOINTMENT' + request_quote = 'REQUEST_QUOTE' + shop_now = 'SHOP_NOW' + shop_on_facebook = 'SHOP_ON_FACEBOOK' + sign_up = 'SIGN_UP' + view_inventory = 'VIEW_INVENTORY' + view_menu = 'VIEW_MENU' + view_shop = 'VIEW_SHOP' + visit_group = 'VISIT_GROUP' + watch_now = 'WATCH_NOW' + woodhenge_support = 'WOODHENGE_SUPPORT' + + class WebDestinationType: + become_a_volunteer = 'BECOME_A_VOLUNTEER' + become_supporter = 'BECOME_SUPPORTER' + email = 'EMAIL' + follow = 'FOLLOW' + messenger = 'MESSENGER' + mobile_center = 'MOBILE_CENTER' + none = 'NONE' + shop_on_facebook = 'SHOP_ON_FACEBOOK' + website = 'WEBSITE' + + 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=PageCallToAction, + 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 = { + 'android_app_id': 'int', + 'android_destination_type': 'android_destination_type_enum', + 'android_package_name': 'string', + 'android_url': 'string', + 'email_address': 'string', + 'intl_number_with_plus': 'string', + 'iphone_app_id': 'int', + 'iphone_destination_type': 'iphone_destination_type_enum', + 'iphone_url': 'string', + 'type': 'type_enum', + 'web_destination_type': 'web_destination_type_enum', + 'web_url': 'string', + } + enums = { + 'android_destination_type_enum': PageCallToAction.AndroidDestinationType.__dict__.values(), + 'iphone_destination_type_enum': PageCallToAction.IphoneDestinationType.__dict__.values(), + 'type_enum': PageCallToAction.Type.__dict__.values(), + 'web_destination_type_enum': PageCallToAction.WebDestinationType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageCallToAction, + 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_app': 'Application', + 'android_deeplink': 'string', + 'android_destination_type': 'string', + 'android_package_name': 'string', + 'android_url': 'string', + 'created_time': 'datetime', + 'email_address': 'string', + 'from': 'Page', + 'id': 'string', + 'intl_number_with_plus': 'string', + 'iphone_app': 'Application', + 'iphone_deeplink': 'string', + 'iphone_destination_type': 'string', + 'iphone_url': 'string', + 'status': 'string', + 'type': 'string', + 'updated_time': 'datetime', + 'web_destination_type': 'string', + 'web_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['AndroidDestinationType'] = PageCallToAction.AndroidDestinationType.__dict__.values() + field_enum_info['IphoneDestinationType'] = PageCallToAction.IphoneDestinationType.__dict__.values() + field_enum_info['Type'] = PageCallToAction.Type.__dict__.values() + field_enum_info['WebDestinationType'] = PageCallToAction.WebDestinationType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagecategory.py b/tap_facebook/facebook_business/adobjects/pagecategory.py new file mode 100644 index 0000000..5c884f2 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagecategory.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 PageCategory( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageCategory = True + super(PageCategory, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + api_enum = 'api_enum' + fb_page_categories = 'fb_page_categories' + id = 'id' + name = 'name' + + _field_types = { + 'api_enum': 'string', + 'fb_page_categories': 'list', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagechangeproposal.py b/tap_facebook/facebook_business/adobjects/pagechangeproposal.py new file mode 100644 index 0000000..dd3df51 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagechangeproposal.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 PageChangeProposal( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageChangeProposal = True + super(PageChangeProposal, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + acceptance_status = 'acceptance_status' + category = 'category' + current_value = 'current_value' + id = 'id' + proposed_value = 'proposed_value' + upcoming_change_info = 'upcoming_change_info' + + _field_types = { + 'acceptance_status': 'string', + 'category': 'string', + 'current_value': 'string', + 'id': 'string', + 'proposed_value': 'string', + 'upcoming_change_info': 'PageUpcomingChange', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagecommerceeligibility.py b/tap_facebook/facebook_business/adobjects/pagecommerceeligibility.py new file mode 100644 index 0000000..b83bcb6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagecommerceeligibility.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 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 + + diff --git a/tap_facebook/facebook_business/adobjects/pageparking.py b/tap_facebook/facebook_business/adobjects/pageparking.py new file mode 100644 index 0000000..625a75b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pageparking.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 PageParking( + AbstractObject, +): + + def __init__(self, api=None): + super(PageParking, self).__init__() + self._isPageParking = True + self._api = api + + class Field(AbstractObject.Field): + lot = 'lot' + street = 'street' + valet = 'valet' + + _field_types = { + 'lot': 'unsigned int', + 'street': 'unsigned int', + 'valet': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagepaymentoptions.py b/tap_facebook/facebook_business/adobjects/pagepaymentoptions.py new file mode 100644 index 0000000..46a4738 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagepaymentoptions.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 PagePaymentOptions( + AbstractObject, +): + + def __init__(self, api=None): + super(PagePaymentOptions, self).__init__() + self._isPagePaymentOptions = True + self._api = api + + class Field(AbstractObject.Field): + amex = 'amex' + cash_only = 'cash_only' + discover = 'discover' + mastercard = 'mastercard' + visa = 'visa' + + _field_types = { + 'amex': 'unsigned int', + 'cash_only': 'unsigned int', + 'discover': 'unsigned int', + 'mastercard': 'unsigned int', + 'visa': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagepost.py b/tap_facebook/facebook_business/adobjects/pagepost.py new file mode 100644 index 0000000..8012fc6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagepost.py @@ -0,0 +1,703 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 PagePost( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPagePost = True + super(PagePost, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + actions = 'actions' + admin_creator = 'admin_creator' + allowed_advertising_objectives = 'allowed_advertising_objectives' + application = 'application' + backdated_time = 'backdated_time' + call_to_action = 'call_to_action' + can_reply_privately = 'can_reply_privately' + child_attachments = 'child_attachments' + comments_mirroring_domain = 'comments_mirroring_domain' + coordinates = 'coordinates' + created_time = 'created_time' + event = 'event' + expanded_height = 'expanded_height' + expanded_width = 'expanded_width' + feed_targeting = 'feed_targeting' + field_from = 'from' + full_picture = 'full_picture' + height = 'height' + icon = 'icon' + id = 'id' + instagram_eligibility = 'instagram_eligibility' + is_app_share = 'is_app_share' + is_eligible_for_promotion = 'is_eligible_for_promotion' + is_expired = 'is_expired' + is_hidden = 'is_hidden' + is_inline_created = 'is_inline_created' + is_instagram_eligible = 'is_instagram_eligible' + is_popular = 'is_popular' + is_published = 'is_published' + is_spherical = 'is_spherical' + message = 'message' + message_tags = 'message_tags' + multi_share_end_card = 'multi_share_end_card' + multi_share_optimized = 'multi_share_optimized' + parent_id = 'parent_id' + permalink_url = 'permalink_url' + picture = 'picture' + place = 'place' + privacy = 'privacy' + promotable_id = 'promotable_id' + promotion_status = 'promotion_status' + properties = 'properties' + scheduled_publish_time = 'scheduled_publish_time' + shares = 'shares' + status_type = 'status_type' + story = 'story' + story_tags = 'story_tags' + subscribed = 'subscribed' + target = 'target' + targeting = 'targeting' + timeline_visibility = 'timeline_visibility' + updated_time = 'updated_time' + via = 'via' + video_buying_eligibility = 'video_buying_eligibility' + width = 'width' + + class With: + location = 'LOCATION' + + class BackdatedTimeGranularity: + day = 'day' + hour = 'hour' + min = 'min' + month = 'month' + none = 'none' + year = 'year' + + class FeedStoryVisibility: + hidden = 'hidden' + visible = 'visible' + + class TimelineVisibility: + forced_allow = 'forced_allow' + hidden = 'hidden' + normal = 'normal' + + 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 = { + 'primary_fb_page_id': 'string', + 'primary_ig_user_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + 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 = { + 'attached_media': 'list', + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'composer_session_id': 'string', + 'direct_share_status': 'unsigned int', + 'explicitly_added_mentionee_ids': 'list', + 'feed_story_visibility': 'feed_story_visibility_enum', + 'is_explicit_location': 'bool', + 'is_hidden': 'bool', + 'is_pinned': 'bool', + 'is_published': 'bool', + 'message': 'string', + 'og_action_type_id': 'string', + 'og_hide_object_attachment': 'bool', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'place': 'Object', + 'privacy': 'string', + 'product_item': 'Object', + 'scheduled_publish_time': 'unsigned int', + 'should_sync_product_edit': 'bool', + 'source_type': 'string', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'tags': 'list', + 'text_format_preset_id': 'string', + 'timeline_visibility': 'timeline_visibility_enum', + 'tracking': 'string', + } + enums = { + 'backdated_time_granularity_enum': PagePost.BackdatedTimeGranularity.__dict__.values(), + 'feed_story_visibility_enum': PagePost.FeedStoryVisibility.__dict__.values(), + 'timeline_visibility_enum': PagePost.TimelineVisibility.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + 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_attachments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/attachments', + 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_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 = { + 'filter': 'filter_enum', + 'live_filter': 'live_filter_enum', + 'order': 'order_enum', + 'since': 'datetime', + } + enums = { + 'filter_enum': Comment.Filter.__dict__.values(), + 'live_filter_enum': Comment.LiveFilter.__dict__.values(), + '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() + + 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.comment import Comment + param_types = { + 'attachment_id': 'string', + 'attachment_share_url': 'string', + 'attachment_url': 'string', + 'comment': 'string', + 'comment_privacy_value': 'comment_privacy_value_enum', + 'feedback_source': 'string', + 'message': 'string', + 'nectar_module': 'string', + 'parent_comment_id': 'Object', + 'post_id': 'string', + 'tracking': 'string', + } + enums = { + 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + 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() + + def get_dynamic_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.') + from facebook_business.adobjects.rtbdynamicpost import RTBDynamicPost + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/dynamic_posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=RTBDynamicPost, + api_type='EDGE', + response_parser=ObjectParser(target_class=RTBDynamicPost, 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_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 = { + 'date_preset': 'date_preset_enum', + 'metric': 'list', + 'period': 'period_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'date_preset_enum': InsightsResult.DatePreset.__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() + + def delete_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'nectar_module': 'string', + 'tracking': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/likes', + 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_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', + 'tracking': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePost, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePost, 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_reactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': Profile.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/reactions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_shared_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.') + from facebook_business.adobjects.post import Post + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/sharedposts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + api_type='EDGE', + response_parser=ObjectParser(target_class=Post, 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_sponsor_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/sponsor_tags', + 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_to(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/to', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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 = { + 'actions': 'list', + 'admin_creator': 'Object', + 'allowed_advertising_objectives': 'list', + 'application': 'Application', + 'backdated_time': 'datetime', + 'call_to_action': 'Object', + 'can_reply_privately': 'bool', + 'child_attachments': 'list', + 'comments_mirroring_domain': 'string', + 'coordinates': 'Object', + 'created_time': 'datetime', + 'event': 'Event', + 'expanded_height': 'unsigned int', + 'expanded_width': 'unsigned int', + 'feed_targeting': 'Object', + 'from': 'Object', + 'full_picture': 'string', + 'height': 'unsigned int', + 'icon': 'string', + 'id': 'string', + 'instagram_eligibility': 'string', + 'is_app_share': 'bool', + 'is_eligible_for_promotion': 'bool', + 'is_expired': 'bool', + 'is_hidden': 'bool', + 'is_inline_created': 'bool', + 'is_instagram_eligible': 'bool', + 'is_popular': 'bool', + 'is_published': 'bool', + 'is_spherical': 'bool', + 'message': 'string', + 'message_tags': 'list', + 'multi_share_end_card': 'bool', + 'multi_share_optimized': 'bool', + 'parent_id': 'string', + 'permalink_url': 'string', + 'picture': 'string', + 'place': 'Place', + 'privacy': 'Privacy', + 'promotable_id': 'string', + 'promotion_status': 'string', + 'properties': 'list', + 'scheduled_publish_time': 'float', + 'shares': 'Object', + 'status_type': 'string', + 'story': 'string', + 'story_tags': 'list', + 'subscribed': 'bool', + 'target': 'Profile', + 'targeting': 'Object', + 'timeline_visibility': 'string', + 'updated_time': 'datetime', + 'via': 'Object', + 'video_buying_eligibility': 'list', + 'width': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['With'] = PagePost.With.__dict__.values() + field_enum_info['BackdatedTimeGranularity'] = PagePost.BackdatedTimeGranularity.__dict__.values() + field_enum_info['FeedStoryVisibility'] = PagePost.FeedStoryVisibility.__dict__.values() + field_enum_info['TimelineVisibility'] = PagePost.TimelineVisibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagepostexperiment.py b/tap_facebook/facebook_business/adobjects/pagepostexperiment.py new file mode 100644 index 0000000..efff1ba --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagepostexperiment.py @@ -0,0 +1,174 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 PagePostExperiment( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPagePostExperiment = True + super(PagePostExperiment, self).__init__(fbid, parent_id, api) + + 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' + optimization_goal = 'optimization_goal' + publish_status = 'publish_status' + publish_time = 'publish_time' + 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): + 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=PagePostExperiment, + 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_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', + 'optimization_goal': 'string', + 'publish_status': 'string', + 'publish_time': 'datetime', + 'scheduled_experiment_timestamp': 'datetime', + 'updated_time': 'datetime', + } + @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/tap_facebook/facebook_business/adobjects/pagerestaurantservices.py b/tap_facebook/facebook_business/adobjects/pagerestaurantservices.py new file mode 100644 index 0000000..28cd05b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagerestaurantservices.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 PageRestaurantServices( + AbstractObject, +): + + def __init__(self, api=None): + super(PageRestaurantServices, self).__init__() + self._isPageRestaurantServices = True + self._api = api + + class Field(AbstractObject.Field): + catering = 'catering' + delivery = 'delivery' + groups = 'groups' + kids = 'kids' + outdoor = 'outdoor' + pickup = 'pickup' + reserve = 'reserve' + takeout = 'takeout' + waiter = 'waiter' + walkins = 'walkins' + + _field_types = { + 'catering': 'bool', + 'delivery': 'bool', + 'groups': 'bool', + 'kids': 'bool', + 'outdoor': 'bool', + 'pickup': 'bool', + 'reserve': 'bool', + 'takeout': 'bool', + 'waiter': 'bool', + 'walkins': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagerestaurantspecialties.py b/tap_facebook/facebook_business/adobjects/pagerestaurantspecialties.py new file mode 100644 index 0000000..9fd4536 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagerestaurantspecialties.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 PageRestaurantSpecialties( + AbstractObject, +): + + def __init__(self, api=None): + super(PageRestaurantSpecialties, self).__init__() + self._isPageRestaurantSpecialties = True + self._api = api + + class Field(AbstractObject.Field): + breakfast = 'breakfast' + coffee = 'coffee' + dinner = 'dinner' + drinks = 'drinks' + lunch = 'lunch' + + _field_types = { + 'breakfast': 'unsigned int', + 'coffee': 'unsigned int', + 'dinner': 'unsigned int', + 'drinks': 'unsigned int', + 'lunch': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagesavedfilter.py b/tap_facebook/facebook_business/adobjects/pagesavedfilter.py new file mode 100644 index 0000000..cdfbac5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagesavedfilter.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 PageSavedFilter( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageSavedFilter = True + super(PageSavedFilter, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + display_name = 'display_name' + filters = 'filters' + id = 'id' + page_id = 'page_id' + section = 'section' + 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=PageSavedFilter, + 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 = { + 'display_name': 'string', + 'filters': 'list', + 'id': 'string', + 'page_id': 'string', + 'section': 'string', + 'time_created': 'int', + 'time_updated': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagesettings.py b/tap_facebook/facebook_business/adobjects/pagesettings.py new file mode 100644 index 0000000..16fdc0e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagesettings.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 PageSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(PageSettings, self).__init__() + self._isPageSettings = True + self._api = api + + class Field(AbstractObject.Field): + setting = 'setting' + value = 'value' + + _field_types = { + 'setting': 'string', + 'value': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagestartinfo.py b/tap_facebook/facebook_business/adobjects/pagestartinfo.py new file mode 100644 index 0000000..327af91 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagestartinfo.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 PageStartInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(PageStartInfo, self).__init__() + self._isPageStartInfo = True + self._api = api + + class Field(AbstractObject.Field): + date = 'date' + type = 'type' + + _field_types = { + 'date': 'Object', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pagethreadowner.py b/tap_facebook/facebook_business/adobjects/pagethreadowner.py new file mode 100644 index 0000000..6ccb770 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pagethreadowner.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 PageThreadOwner( + AbstractObject, +): + + def __init__(self, api=None): + super(PageThreadOwner, self).__init__() + self._isPageThreadOwner = True + self._api = api + + class Field(AbstractObject.Field): + thread_owner = 'thread_owner' + + _field_types = { + 'thread_owner': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pageupcomingchange.py b/tap_facebook/facebook_business/adobjects/pageupcomingchange.py new file mode 100644 index 0000000..1229194 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pageupcomingchange.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 PageUpcomingChange( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageUpcomingChange = True + super(PageUpcomingChange, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + change_type = 'change_type' + effective_time = 'effective_time' + id = 'id' + page = 'page' + proposal = 'proposal' + timer_status = 'timer_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=PageUpcomingChange, + 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 = { + 'change_type': 'string', + 'effective_time': 'datetime', + 'id': 'string', + 'page': 'Page', + 'proposal': 'PageChangeProposal', + 'timer_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/pageusermessagethreadlabel.py b/tap_facebook/facebook_business/adobjects/pageusermessagethreadlabel.py new file mode 100644 index 0000000..a05391b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/pageusermessagethreadlabel.py @@ -0,0 +1,164 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 PageUserMessageThreadLabel( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageUserMessageThreadLabel = True + super(PageUserMessageThreadLabel, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + page_label_name = 'page_label_name' + + 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=PageUserMessageThreadLabel, + 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_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/label', + 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_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/label', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageUserMessageThreadLabel, + api_type='EDGE', + response_parser=ObjectParser(target_class=PageUserMessageThreadLabel, 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', + 'page_label_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/partnerstudy.py b/tap_facebook/facebook_business/adobjects/partnerstudy.py new file mode 100644 index 0000000..1397142 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/partnerstudy.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 PartnerStudy( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPartnerStudy = True + super(PartnerStudy, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + additional_info = 'additional_info' + brand = 'brand' + client_name = 'client_name' + emails = 'emails' + id = 'id' + input_ids = 'input_ids' + is_export = 'is_export' + lift_study = 'lift_study' + location = 'location' + match_file_ds = 'match_file_ds' + name = 'name' + partner_defined_id = 'partner_defined_id' + partner_household_graph_dataset_id = 'partner_household_graph_dataset_id' + status = 'status' + study_end_date = 'study_end_date' + study_start_date = 'study_start_date' + study_type = 'study_type' + submit_date = 'submit_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=PartnerStudy, + 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_info': 'string', + 'brand': 'string', + 'client_name': 'string', + 'emails': 'string', + 'id': 'string', + 'input_ids': 'list', + 'is_export': 'bool', + 'lift_study': 'AdStudy', + 'location': 'string', + 'match_file_ds': 'string', + 'name': 'string', + 'partner_defined_id': 'string', + 'partner_household_graph_dataset_id': 'string', + 'status': 'string', + 'study_end_date': 'datetime', + 'study_start_date': 'datetime', + 'study_type': 'string', + 'submit_date': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/paymentenginepayment.py b/tap_facebook/facebook_business/adobjects/paymentenginepayment.py new file mode 100644 index 0000000..d698e43 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/paymentenginepayment.py @@ -0,0 +1,180 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 PaymentEnginePayment( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPaymentEnginePayment = True + super(PaymentEnginePayment, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + actions = 'actions' + application = 'application' + country = 'country' + created_time = 'created_time' + disputes = 'disputes' + fraud_status = 'fraud_status' + fulfillment_status = 'fulfillment_status' + id = 'id' + is_from_ad = 'is_from_ad' + is_from_page_post = 'is_from_page_post' + items = 'items' + payout_foreign_exchange_rate = 'payout_foreign_exchange_rate' + phone_support_eligible = 'phone_support_eligible' + platform = 'platform' + refundable_amount = 'refundable_amount' + request_id = 'request_id' + tax = 'tax' + tax_country = 'tax_country' + test = 'test' + user = 'user' + + class Reason: + banned_user = 'BANNED_USER' + denied_refund = 'DENIED_REFUND' + granted_replacement_item = 'GRANTED_REPLACEMENT_ITEM' + + 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=PaymentEnginePayment, + 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_dispute(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'reason': 'reason_enum', + } + enums = { + 'reason_enum': PaymentEnginePayment.Reason.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/dispute', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PaymentEnginePayment, + api_type='EDGE', + response_parser=ObjectParser(target_class=PaymentEnginePayment, 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_refund(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'amount': 'float', + 'currency': 'string', + 'reason': 'reason_enum', + } + enums = { + 'reason_enum': PaymentEnginePayment.Reason.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/refunds', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PaymentEnginePayment, + api_type='EDGE', + response_parser=ObjectParser(target_class=PaymentEnginePayment, 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 = { + 'actions': 'list', + 'application': 'Application', + 'country': 'string', + 'created_time': 'datetime', + 'disputes': 'list', + 'fraud_status': 'string', + 'fulfillment_status': 'string', + 'id': 'string', + 'is_from_ad': 'bool', + 'is_from_page_post': 'bool', + 'items': 'list', + 'payout_foreign_exchange_rate': 'float', + 'phone_support_eligible': 'bool', + 'platform': 'string', + 'refundable_amount': 'CurrencyAmount', + 'request_id': 'string', + 'tax': 'string', + 'tax_country': 'string', + 'test': 'unsigned int', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Reason'] = PaymentEnginePayment.Reason.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/paymentpricepoints.py b/tap_facebook/facebook_business/adobjects/paymentpricepoints.py new file mode 100644 index 0000000..0ebfce9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/paymentpricepoints.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 PaymentPricepoints( + AbstractObject, +): + + def __init__(self, api=None): + super(PaymentPricepoints, self).__init__() + self._isPaymentPricepoints = True + self._api = api + + class Field(AbstractObject.Field): + mobile = 'mobile' + + _field_types = { + 'mobile': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/paymentsubscription.py b/tap_facebook/facebook_business/adobjects/paymentsubscription.py new file mode 100644 index 0000000..a2a72ec --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/paymentsubscription.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 PaymentSubscription( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPaymentSubscription = True + super(PaymentSubscription, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + amount = 'amount' + app_param_data = 'app_param_data' + application = 'application' + billing_period = 'billing_period' + canceled_reason = 'canceled_reason' + created_time = 'created_time' + currency = 'currency' + id = 'id' + last_payment = 'last_payment' + next_bill_time = 'next_bill_time' + next_period_amount = 'next_period_amount' + next_period_currency = 'next_period_currency' + next_period_product = 'next_period_product' + payment_status = 'payment_status' + pending_cancel = 'pending_cancel' + period_start_time = 'period_start_time' + product = 'product' + status = 'status' + test = 'test' + trial_amount = 'trial_amount' + trial_currency = 'trial_currency' + trial_expiry_time = 'trial_expiry_time' + updated_time = 'updated_time' + 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=PaymentSubscription, + 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 = { + 'amount': 'string', + 'app_param_data': 'string', + 'application': 'Application', + 'billing_period': 'string', + 'canceled_reason': 'string', + 'created_time': 'datetime', + 'currency': 'string', + 'id': 'string', + 'last_payment': 'PaymentEnginePayment', + 'next_bill_time': 'datetime', + 'next_period_amount': 'string', + 'next_period_currency': 'string', + 'next_period_product': 'string', + 'payment_status': 'string', + 'pending_cancel': 'bool', + 'period_start_time': 'datetime', + 'product': 'string', + 'status': 'string', + 'test': 'unsigned int', + 'trial_amount': 'string', + 'trial_currency': 'string', + 'trial_expiry_time': 'datetime', + 'updated_time': 'datetime', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/permission.py b/tap_facebook/facebook_business/adobjects/permission.py new file mode 100644 index 0000000..867bfd7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/permission.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 Permission( + AbstractObject, +): + + def __init__(self, api=None): + super(Permission, self).__init__() + self._isPermission = True + self._api = api + + class Field(AbstractObject.Field): + permission = 'permission' + status = 'status' + + class Status: + declined = 'declined' + expired = 'expired' + granted = 'granted' + + _field_types = { + 'permission': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = Permission.Status.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/persona.py b/tap_facebook/facebook_business/adobjects/persona.py new file mode 100644 index 0000000..6cbf5f4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/persona.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 Persona( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPersona = True + super(Persona, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + profile_picture_url = 'profile_picture_url' + + 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=Persona, + 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', + 'profile_picture_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/photo.py b/tap_facebook/facebook_business/adobjects/photo.py new file mode 100644 index 0000000..c09cb35 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/photo.py @@ -0,0 +1,397 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Photo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPhoto = True + super(Photo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + album = 'album' + alt_text = 'alt_text' + alt_text_custom = 'alt_text_custom' + backdated_time = 'backdated_time' + backdated_time_granularity = 'backdated_time_granularity' + can_backdate = 'can_backdate' + can_delete = 'can_delete' + can_tag = 'can_tag' + created_time = 'created_time' + event = 'event' + field_from = 'from' + height = 'height' + icon = 'icon' + id = 'id' + images = 'images' + link = 'link' + name = 'name' + name_tags = 'name_tags' + page_story_id = 'page_story_id' + picture = 'picture' + place = 'place' + position = 'position' + source = 'source' + target = 'target' + updated_time = 'updated_time' + webp_images = 'webp_images' + width = 'width' + + class BackdatedTimeGranularity: + day = 'day' + hour = 'hour' + min = 'min' + month = 'month' + none = 'none' + year = 'year' + + class UnpublishedContentType: + ads_post = 'ADS_POST' + draft = 'DRAFT' + inline_created = 'INLINE_CREATED' + published = 'PUBLISHED' + reviewable_branded_content = 'REVIEWABLE_BRANDED_CONTENT' + scheduled = 'SCHEDULED' + scheduled_recurring = 'SCHEDULED_RECURRING' + + class Type: + profile = 'profile' + tagged = 'tagged' + uploaded = 'uploaded' + + 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=Photo, + 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.comment import Comment + param_types = { + 'filter': 'filter_enum', + 'live_filter': 'live_filter_enum', + 'order': 'order_enum', + 'since': 'datetime', + } + enums = { + 'filter_enum': Comment.Filter.__dict__.values(), + 'live_filter_enum': Comment.LiveFilter.__dict__.values(), + '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() + + 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.comment import Comment + param_types = { + 'attachment_id': 'string', + 'attachment_share_url': 'string', + 'attachment_url': 'string', + 'comment_privacy_value': 'comment_privacy_value_enum', + 'facepile_mentioned_ids': 'list', + 'feedback_source': 'string', + 'is_offline': 'bool', + 'message': 'string', + 'nectar_module': 'string', + 'object_id': 'string', + 'parent_comment_id': 'Object', + 'text': 'string', + 'tracking': 'string', + } + enums = { + 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + 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() + + 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 = { + 'date_preset': 'date_preset_enum', + 'metric': 'list', + 'period': 'period_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'date_preset_enum': InsightsResult.DatePreset.__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() + + def get_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_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=Photo, + api_type='EDGE', + response_parser=ObjectParser(target_class=Photo, 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_sponsor_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/sponsor_tags', + 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 = { + 'album': 'Album', + 'alt_text': 'string', + 'alt_text_custom': 'string', + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'string', + 'can_backdate': 'bool', + 'can_delete': 'bool', + 'can_tag': 'bool', + 'created_time': 'datetime', + 'event': 'Event', + 'from': 'Object', + 'height': 'unsigned int', + 'icon': 'string', + 'id': 'string', + 'images': 'list', + 'link': 'string', + 'name': 'string', + 'name_tags': 'list', + 'page_story_id': 'string', + 'picture': 'string', + 'place': 'Place', + 'position': 'unsigned int', + 'source': 'string', + 'target': 'Profile', + 'updated_time': 'datetime', + 'webp_images': 'list', + 'width': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BackdatedTimeGranularity'] = Photo.BackdatedTimeGranularity.__dict__.values() + field_enum_info['UnpublishedContentType'] = Photo.UnpublishedContentType.__dict__.values() + field_enum_info['Type'] = Photo.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/place.py b/tap_facebook/facebook_business/adobjects/place.py new file mode 100644 index 0000000..1ba9ca8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/place.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 Place( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPlace = True + super(Place, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + location = 'location' + name = 'name' + overall_rating = 'overall_rating' + + 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=Place, + 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', + 'location': 'Location', + 'name': 'string', + 'overall_rating': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/placetopic.py b/tap_facebook/facebook_business/adobjects/placetopic.py new file mode 100644 index 0000000..1023cd9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/placetopic.py @@ -0,0 +1,91 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 PlaceTopic( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPlaceTopic = True + super(PlaceTopic, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + count = 'count' + has_children = 'has_children' + icon_url = 'icon_url' + id = 'id' + name = 'name' + parent_ids = 'parent_ids' + plural_name = 'plural_name' + top_subtopic_names = 'top_subtopic_names' + + 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 = { + 'icon_size': 'icon_size_enum', + } + enums = { + 'icon_size_enum': [ + '24', + '36', + '48', + '72', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PlaceTopic, + 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 = { + 'count': 'unsigned int', + 'has_children': 'bool', + 'icon_url': 'string', + 'id': 'string', + 'name': 'string', + 'parent_ids': 'list', + 'plural_name': 'string', + 'top_subtopic_names': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/platformimagesource.py b/tap_facebook/facebook_business/adobjects/platformimagesource.py new file mode 100644 index 0000000..3198891 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/platformimagesource.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 PlatformImageSource( + AbstractObject, +): + + def __init__(self, api=None): + super(PlatformImageSource, self).__init__() + self._isPlatformImageSource = True + self._api = api + + class Field(AbstractObject.Field): + height = 'height' + source = 'source' + width = 'width' + + _field_types = { + 'height': 'unsigned int', + 'source': 'string', + 'width': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/playablecontent.py b/tap_facebook/facebook_business/adobjects/playablecontent.py new file mode 100644 index 0000000..2ec60a9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/playablecontent.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 PlayableContent( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPlayableContent = True + super(PlayableContent, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + owner = 'owner' + app_id = 'app_id' + session_id = 'session_id' + source = 'source' + source_url = 'source_url' + source_zip = 'source_zip' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'adplayables' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_ad_playable(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=PlayableContent, + 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', + 'owner': 'Profile', + 'app_id': 'string', + 'session_id': 'string', + 'source': 'file', + 'source_url': 'string', + 'source_zip': 'file', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/post.py b/tap_facebook/facebook_business/adobjects/post.py new file mode 100644 index 0000000..2f371af --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/post.py @@ -0,0 +1,719 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Post( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPost = True + super(Post, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + actions = 'actions' + admin_creator = 'admin_creator' + allowed_advertising_objectives = 'allowed_advertising_objectives' + application = 'application' + backdated_time = 'backdated_time' + call_to_action = 'call_to_action' + can_reply_privately = 'can_reply_privately' + caption = 'caption' + child_attachments = 'child_attachments' + comments_mirroring_domain = 'comments_mirroring_domain' + coordinates = 'coordinates' + created_time = 'created_time' + description = 'description' + event = 'event' + expanded_height = 'expanded_height' + expanded_width = 'expanded_width' + feed_targeting = 'feed_targeting' + field_from = 'from' + full_picture = 'full_picture' + height = 'height' + icon = 'icon' + id = 'id' + instagram_eligibility = 'instagram_eligibility' + is_app_share = 'is_app_share' + is_eligible_for_promotion = 'is_eligible_for_promotion' + is_expired = 'is_expired' + is_hidden = 'is_hidden' + is_inline_created = 'is_inline_created' + is_instagram_eligible = 'is_instagram_eligible' + is_popular = 'is_popular' + is_published = 'is_published' + is_spherical = 'is_spherical' + link = 'link' + message = 'message' + message_tags = 'message_tags' + multi_share_end_card = 'multi_share_end_card' + multi_share_optimized = 'multi_share_optimized' + name = 'name' + object_id = 'object_id' + parent_id = 'parent_id' + permalink_url = 'permalink_url' + picture = 'picture' + place = 'place' + privacy = 'privacy' + promotable_id = 'promotable_id' + promotion_status = 'promotion_status' + properties = 'properties' + scheduled_publish_time = 'scheduled_publish_time' + shares = 'shares' + source = 'source' + status_type = 'status_type' + story = 'story' + story_tags = 'story_tags' + subscribed = 'subscribed' + target = 'target' + targeting = 'targeting' + timeline_visibility = 'timeline_visibility' + type = 'type' + updated_time = 'updated_time' + via = 'via' + video_buying_eligibility = 'video_buying_eligibility' + width = 'width' + + class BackdatedTimeGranularity: + day = 'day' + hour = 'hour' + min = 'min' + month = 'month' + none = 'none' + year = 'year' + + class Formatting: + markdown = 'MARKDOWN' + plaintext = 'PLAINTEXT' + + class PlaceAttachmentSetting: + value_1 = '1' + value_2 = '2' + + class PostSurfacesBlacklist: + value_1 = '1' + value_2 = '2' + value_3 = '3' + value_4 = '4' + value_5 = '5' + + class PostingToRedspace: + disabled = 'disabled' + enabled = 'enabled' + + class TargetSurface: + story = 'STORY' + timeline = 'TIMELINE' + + class UnpublishedContentType: + ads_post = 'ADS_POST' + draft = 'DRAFT' + inline_created = 'INLINE_CREATED' + published = 'PUBLISHED' + reviewable_branded_content = 'REVIEWABLE_BRANDED_CONTENT' + scheduled = 'SCHEDULED' + scheduled_recurring = 'SCHEDULED_RECURRING' + + class FeedStoryVisibility: + hidden = 'hidden' + visible = 'visible' + + class TimelineVisibility: + forced_allow = 'forced_allow' + hidden = 'hidden' + normal = 'normal' + + 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 = { + 'primary_fb_page_id': 'string', + 'primary_ig_user_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + 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 = { + 'attached_media': 'list', + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'composer_session_id': 'string', + 'direct_share_status': 'unsigned int', + 'explicitly_added_mentionee_ids': 'list', + 'feed_story_visibility': 'feed_story_visibility_enum', + 'is_explicit_location': 'bool', + 'is_hidden': 'bool', + 'is_pinned': 'bool', + 'is_published': 'bool', + 'message': 'string', + 'og_action_type_id': 'string', + 'og_hide_object_attachment': 'bool', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'place': 'Object', + 'privacy': 'string', + 'product_item': 'Object', + 'scheduled_publish_time': 'unsigned int', + 'should_sync_product_edit': 'bool', + 'source_type': 'string', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'tags': 'list', + 'text_format_preset_id': 'string', + 'timeline_visibility': 'timeline_visibility_enum', + 'tracking': 'string', + } + enums = { + 'backdated_time_granularity_enum': Post.BackdatedTimeGranularity.__dict__.values(), + 'feed_story_visibility_enum': Post.FeedStoryVisibility.__dict__.values(), + 'timeline_visibility_enum': Post.TimelineVisibility.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + 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_attachments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/attachments', + 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_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 = { + 'filter': 'filter_enum', + 'live_filter': 'live_filter_enum', + 'order': 'order_enum', + 'since': 'datetime', + } + enums = { + 'filter_enum': Comment.Filter.__dict__.values(), + 'live_filter_enum': Comment.LiveFilter.__dict__.values(), + '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() + + 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.comment import Comment + param_types = { + 'attachment_id': 'string', + 'attachment_share_url': 'string', + 'attachment_url': 'string', + 'comment': 'string', + 'comment_privacy_value': 'comment_privacy_value_enum', + 'feedback_source': 'string', + 'message': 'string', + 'nectar_module': 'string', + 'parent_comment_id': 'Object', + 'post_id': 'string', + 'tracking': 'string', + } + enums = { + 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + 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() + + def get_dynamic_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.') + from facebook_business.adobjects.rtbdynamicpost import RTBDynamicPost + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/dynamic_posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=RTBDynamicPost, + api_type='EDGE', + response_parser=ObjectParser(target_class=RTBDynamicPost, 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_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 = { + 'date_preset': 'date_preset_enum', + 'metric': 'list', + 'period': 'period_enum', + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + 'date_preset_enum': InsightsResult.DatePreset.__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() + + def delete_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'nectar_module': 'string', + 'tracking': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/likes', + 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_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', + 'tracking': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + api_type='EDGE', + response_parser=ObjectParser(target_class=Post, 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_reactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': Profile.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/reactions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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_shared_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/sharedposts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + api_type='EDGE', + response_parser=ObjectParser(target_class=Post, 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_sponsor_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/sponsor_tags', + 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_to(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/to', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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 = { + 'actions': 'list', + 'admin_creator': 'Object', + 'allowed_advertising_objectives': 'list', + 'application': 'Application', + 'backdated_time': 'datetime', + 'call_to_action': 'Object', + 'can_reply_privately': 'bool', + 'caption': 'string', + 'child_attachments': 'list', + 'comments_mirroring_domain': 'string', + 'coordinates': 'Object', + 'created_time': 'datetime', + 'description': 'string', + 'event': 'Event', + 'expanded_height': 'unsigned int', + 'expanded_width': 'unsigned int', + 'feed_targeting': 'Object', + 'from': 'Object', + 'full_picture': 'string', + 'height': 'unsigned int', + 'icon': 'string', + 'id': 'string', + 'instagram_eligibility': 'string', + 'is_app_share': 'bool', + 'is_eligible_for_promotion': 'bool', + 'is_expired': 'bool', + 'is_hidden': 'bool', + 'is_inline_created': 'bool', + 'is_instagram_eligible': 'bool', + 'is_popular': 'bool', + 'is_published': 'bool', + 'is_spherical': 'bool', + 'link': 'string', + 'message': 'string', + 'message_tags': 'list', + 'multi_share_end_card': 'bool', + 'multi_share_optimized': 'bool', + 'name': 'string', + 'object_id': 'string', + 'parent_id': 'string', + 'permalink_url': 'string', + 'picture': 'string', + 'place': 'Place', + 'privacy': 'Privacy', + 'promotable_id': 'string', + 'promotion_status': 'string', + 'properties': 'list', + 'scheduled_publish_time': 'float', + 'shares': 'Object', + 'source': 'string', + 'status_type': 'string', + 'story': 'string', + 'story_tags': 'list', + 'subscribed': 'bool', + 'target': 'Profile', + 'targeting': 'Object', + 'timeline_visibility': 'string', + 'type': 'string', + 'updated_time': 'datetime', + 'via': 'Object', + 'video_buying_eligibility': 'list', + 'width': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BackdatedTimeGranularity'] = Post.BackdatedTimeGranularity.__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() + field_enum_info['PostingToRedspace'] = Post.PostingToRedspace.__dict__.values() + field_enum_info['TargetSurface'] = Post.TargetSurface.__dict__.values() + field_enum_info['UnpublishedContentType'] = Post.UnpublishedContentType.__dict__.values() + field_enum_info['FeedStoryVisibility'] = Post.FeedStoryVisibility.__dict__.values() + field_enum_info['TimelineVisibility'] = Post.TimelineVisibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/privacy.py b/tap_facebook/facebook_business/adobjects/privacy.py new file mode 100644 index 0000000..8c49c50 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/privacy.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 Privacy( + AbstractObject, +): + + def __init__(self, api=None): + super(Privacy, self).__init__() + self._isPrivacy = True + self._api = api + + class Field(AbstractObject.Field): + allow = 'allow' + deny = 'deny' + description = 'description' + friends = 'friends' + networks = 'networks' + value = 'value' + + _field_types = { + 'allow': 'string', + 'deny': 'string', + 'description': 'string', + 'friends': 'string', + 'networks': 'string', + 'value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/privateliftstudyinstance.py b/tap_facebook/facebook_business/adobjects/privateliftstudyinstance.py new file mode 100644 index 0000000..ddc80b8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/privateliftstudyinstance.py @@ -0,0 +1,132 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 PrivateLiftStudyInstance( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPrivateLiftStudyInstance = True + super(PrivateLiftStudyInstance, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + breakdown_key = 'breakdown_key' + created_time = 'created_time' + feature_list = 'feature_list' + id = 'id' + issuer_certificate = 'issuer_certificate' + latest_status_update_time = 'latest_status_update_time' + run_id = 'run_id' + server_hostnames = 'server_hostnames' + server_ips = 'server_ips' + status = 'status' + tier = 'tier' + + class Operation: + aggregate = 'AGGREGATE' + cancel = 'CANCEL' + compute = 'COMPUTE' + id_match = 'ID_MATCH' + next = 'NEXT' + none = 'NONE' + + 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=PrivateLiftStudyInstance, + 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 = { + 'operation': 'operation_enum', + 'run_id': 'string', + } + enums = { + 'operation_enum': PrivateLiftStudyInstance.Operation.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PrivateLiftStudyInstance, + 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 = { + 'breakdown_key': 'string', + 'created_time': 'datetime', + 'feature_list': 'list', + 'id': 'string', + 'issuer_certificate': 'string', + 'latest_status_update_time': 'datetime', + 'run_id': 'string', + 'server_hostnames': 'list', + 'server_ips': 'list', + 'status': 'string', + 'tier': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Operation'] = PrivateLiftStudyInstance.Operation.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcatalog.py b/tap_facebook/facebook_business/adobjects/productcatalog.py new file mode 100644 index 0000000..20691dc --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcatalog.py @@ -0,0 +1,1982 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.adobjects.helpers.productcatalogmixin import ProductCatalogMixin + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class ProductCatalog( + ProductCatalogMixin, + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductCatalog = True + super(ProductCatalog, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account_to_collaborative_ads_share_settings = 'ad_account_to_collaborative_ads_share_settings' + agency_collaborative_ads_share_settings = 'agency_collaborative_ads_share_settings' + business = 'business' + catalog_store = 'catalog_store' + commerce_merchant_settings = 'commerce_merchant_settings' + creator_user = 'creator_user' + da_display_settings = 'da_display_settings' + default_image_url = 'default_image_url' + fallback_image_url = 'fallback_image_url' + 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' + flight_catalog_settings = 'flight_catalog_settings' + 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' + 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' + transactable_items = 'transactable_items' + vehicles = 'vehicles' + + class PermittedRoles: + admin = 'ADMIN' + 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' + + class Standard: + google = 'google' + + class ItemSubType: + appliances = 'APPLIANCES' + baby_feeding = 'BABY_FEEDING' + baby_transport = 'BABY_TRANSPORT' + beauty = 'BEAUTY' + bedding = 'BEDDING' + cameras = 'CAMERAS' + cell_phones_and_smart_watches = 'CELL_PHONES_AND_SMART_WATCHES' + cleaning_supplies = 'CLEANING_SUPPLIES' + clothing = 'CLOTHING' + clothing_accessories = 'CLOTHING_ACCESSORIES' + computers_and_tablets = 'COMPUTERS_AND_TABLETS' + diapering_and_potty_training = 'DIAPERING_AND_POTTY_TRAINING' + electronics_accessories = 'ELECTRONICS_ACCESSORIES' + furniture = 'FURNITURE' + health = 'HEALTH' + home_goods = 'HOME_GOODS' + jewelry = 'JEWELRY' + nursery = 'NURSERY' + printers_and_scanners = 'PRINTERS_AND_SCANNERS' + projectors = 'PROJECTORS' + shoes_and_footwear = 'SHOES_AND_FOOTWEAR' + software = 'SOFTWARE' + toys = 'TOYS' + tvs_and_monitors = 'TVS_AND_MONITORS' + video_game_consoles_and_video_games = 'VIDEO_GAME_CONSOLES_AND_VIDEO_GAMES' + watches = 'WATCHES' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'owned_product_catalogs' + + # @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_owned_product_catalog(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 = { + 'allow_delete_catalog_with_live_product_set': 'bool', + } + 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 = { + 'segment_use_cases': 'list', + } + enums = { + 'segment_use_cases_enum': [ + 'AFFILIATE_SELLER_STOREFRONT', + 'AFFILIATE_TAGGED_ONLY_DEPRECATED', + 'COLLAB_ADS', + 'COLLAB_ADS_FOR_MARKETPLACE_PARTNER', + 'COLLAB_ADS_SEGMENT_WITHOUT_SEGMENT_SYNCING', + 'CREATORS_AS_SELLERS', + 'DIGITAL_CIRCULARS', + 'FB_LIVE_SHOPPING', + 'IG_SHOPPING', + 'IG_SHOPPING_SUGGESTED_PRODUCTS', + 'MARKETPLACE_SHOPS', + 'TEST', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalog, + 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 = { + 'additional_vertical_option': 'additional_vertical_option_enum', + 'da_display_settings': 'Object', + 'default_image_url': 'string', + 'destination_catalog_settings': 'map', + 'fallback_image_url': 'string', + 'flight_catalog_settings': 'map', + 'name': 'string', + 'partner_integration': 'map', + 'store_catalog_settings': 'map', + } + enums = { + 'additional_vertical_option_enum': ProductCatalog.AdditionalVerticalOption.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalog, + 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_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): + 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='/agencies', + 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_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_roles': 'list', + 'permitted_tasks': 'list', + 'utm_settings': 'map', + } + enums = { + 'permitted_roles_enum': ProductCatalog.PermittedRoles.__dict__.values(), + 'permitted_tasks_enum': ProductCatalog.PermittedTasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/agencies', + 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() + + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'user': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/assigned_users', + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.assigneduser import AssignedUser + param_types = { + 'business': 'string', + } + 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() + + def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'tasks': 'list', + 'user': 'int', + } + enums = { + 'tasks_enum': ProductCatalog.Tasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/assigned_users', + 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() + + def get_automotive_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.') + from facebook_business.adobjects.automotivemodel import AutomotiveModel + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/automotive_models', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AutomotiveModel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AutomotiveModel, 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_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', + 'fbe_external_business_id': 'string', + 'requests': 'list', + 'version': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/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() + + def create_catalog_store(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.storecatalogsettings import StoreCatalogSettings + param_types = { + 'page': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/catalog_store', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=StoreCatalogSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=StoreCatalogSettings, 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_categories(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalogcategory import ProductCatalogCategory + param_types = { + 'categorization_criteria': 'categorization_criteria_enum', + 'filter': 'Object', + } + enums = { + 'categorization_criteria_enum': ProductCatalogCategory.CategorizationCriteria.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/categories', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalogCategory, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductCatalogCategory, 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_category(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalogcategory import ProductCatalogCategory + param_types = { + 'data': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/categories', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalogCategory, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductCatalogCategory, 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_check_batch_request_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.checkbatchrequeststatus import CheckBatchRequestStatus + param_types = { + 'error_priority': 'error_priority_enum', + 'handle': 'string', + 'load_ids_of_invalid_requests': 'bool', + } + enums = { + 'error_priority_enum': CheckBatchRequestStatus.ErrorPriority.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/check_batch_request_status', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CheckBatchRequestStatus, + api_type='EDGE', + response_parser=ObjectParser(target_class=CheckBatchRequestStatus, 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_collaborative_ads_event_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.catalogsegmentallmatchcountlaser import CatalogSegmentAllMatchCountLaser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/collaborative_ads_event_stats', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogSegmentAllMatchCountLaser, + api_type='EDGE', + response_parser=ObjectParser(target_class=CatalogSegmentAllMatchCountLaser, 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_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/collaborative_ads_lsb_image_bank', + 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_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 = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/collaborative_ads_share_settings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CollaborativeAdsShareSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=CollaborativeAdsShareSettings, 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_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.') + param_types = { + 'ad_group_id': 'unsigned int', + 'agency_business_id': 'unsigned int', + 'backup_image_urls': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/cpas_lsb_image_bank', + 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_data_sources(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalogdatasource import ProductCatalogDataSource + param_types = { + 'ingestion_source_type': 'ingestion_source_type_enum', + } + enums = { + 'ingestion_source_type_enum': ProductCatalogDataSource.IngestionSourceType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/data_sources', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalogDataSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductCatalogDataSource, 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_destinations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.destination import Destination + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/destinations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Destination, + api_type='EDGE', + response_parser=ObjectParser(target_class=Destination, 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_diagnostics(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalogdiagnosticgroup import ProductCatalogDiagnosticGroup + param_types = { + 'affected_channels': 'list', + 'affected_entities': 'list', + 'affected_features': 'list', + 'severities': 'list', + 'types': 'list', + } + enums = { + 'affected_channels_enum': ProductCatalogDiagnosticGroup.AffectedChannels.__dict__.values(), + 'affected_entities_enum': ProductCatalogDiagnosticGroup.AffectedEntities.__dict__.values(), + 'affected_features_enum': ProductCatalogDiagnosticGroup.AffectedFeatures.__dict__.values(), + 'severities_enum': ProductCatalogDiagnosticGroup.Severities.__dict__.values(), + 'types_enum': ProductCatalogDiagnosticGroup.Types.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/diagnostics', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalogDiagnosticGroup, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductCatalogDiagnosticGroup, 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_event_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.producteventstat import ProductEventStat + param_types = { + 'breakdowns': 'list', + } + enums = { + 'breakdowns_enum': ProductEventStat.Breakdowns.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/event_stats', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductEventStat, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductEventStat, 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_external_event_sources(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'external_event_sources': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/external_event_sources', + 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_external_event_sources(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.externaleventsource import ExternalEventSource + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/external_event_sources', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExternalEventSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ExternalEventSource, 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_external_event_source(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'external_event_sources': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/external_event_sources', + 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() + + def get_flights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.flight import Flight + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/flights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Flight, + api_type='EDGE', + response_parser=ObjectParser(target_class=Flight, 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_home_listings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.homelisting import HomeListing + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/home_listings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HomeListing, + api_type='EDGE', + response_parser=ObjectParser(target_class=HomeListing, 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_home_listing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.homelisting import HomeListing + param_types = { + 'address': 'Object', + 'availability': 'string', + 'currency': 'string', + 'description': 'string', + 'home_listing_id': 'string', + 'images': 'list', + 'listing_type': 'string', + 'name': 'string', + 'num_baths': 'float', + 'num_beds': 'float', + 'num_units': 'float', + 'price': 'float', + 'property_type': 'string', + 'url': 'string', + 'year_built': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/home_listings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HomeListing, + api_type='EDGE', + response_parser=ObjectParser(target_class=HomeListing, 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_hotel_rooms_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.') + from facebook_business.adobjects.productcataloghotelroomsbatch import ProductCatalogHotelRoomsBatch + param_types = { + 'handle': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/hotel_rooms_batch', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalogHotelRoomsBatch, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductCatalogHotelRoomsBatch, 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_hotel_rooms_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 = { + 'file': 'file', + 'password': 'string', + 'standard': 'standard_enum', + 'update_only': 'bool', + 'url': 'string', + 'username': 'string', + } + enums = { + 'standard_enum': ProductCatalog.Standard.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/hotel_rooms_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() + + def get_hotels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.hotel import Hotel + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/hotels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Hotel, + api_type='EDGE', + response_parser=ObjectParser(target_class=Hotel, 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_hotel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.hotel import Hotel + param_types = { + 'address': 'Object', + 'applinks': 'Object', + 'base_price': 'unsigned int', + 'brand': 'string', + 'currency': 'string', + 'description': 'string', + 'guest_ratings': 'list', + 'hotel_id': 'string', + 'images': 'list', + 'name': 'string', + 'phone': 'string', + 'star_rating': 'float', + 'url': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/hotels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Hotel, + api_type='EDGE', + response_parser=ObjectParser(target_class=Hotel, 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_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_sub_type': 'item_sub_type_enum', + 'item_type': 'string', + 'requests': 'map', + 'version': 'unsigned int', + } + enums = { + 'item_sub_type_enum': ProductCatalog.ItemSubType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/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() + + def create_localized_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', + 'requests': 'map', + 'version': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/localized_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() + + def get_pricing_variables_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.') + from facebook_business.adobjects.productcatalogpricingvariablesbatch import ProductCatalogPricingVariablesBatch + param_types = { + 'handle': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/pricing_variables_batch', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalogPricingVariablesBatch, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductCatalogPricingVariablesBatch, 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_pricing_variables_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 = { + 'file': 'file', + 'password': 'string', + 'standard': 'standard_enum', + 'update_only': 'bool', + 'url': 'string', + 'username': 'string', + } + enums = { + 'standard_enum': ProductCatalog.Standard.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/pricing_variables_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() + + def get_product_feeds(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productfeed import ProductFeed + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_feeds', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeed, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeed, 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_product_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productfeed import ProductFeed + param_types = { + 'country': 'string', + 'default_currency': 'string', + 'deletion_enabled': 'bool', + 'delimiter': 'delimiter_enum', + 'encoding': 'encoding_enum', + 'feed_type': 'feed_type_enum', + 'file_name': 'string', + 'ingestion_source_type': 'ingestion_source_type_enum', + 'item_sub_type': 'item_sub_type_enum', + 'migrated_from_feed_id': 'string', + 'name': 'string', + 'override_type': 'override_type_enum', + 'override_value': 'string', + 'primary_feed_ids': 'list', + 'quoted_fields_mode': 'quoted_fields_mode_enum', + 'rules': 'list', + 'schedule': 'string', + 'selected_override_fields': 'list', + 'update_schedule': 'string', + } + enums = { + 'delimiter_enum': ProductFeed.Delimiter.__dict__.values(), + 'encoding_enum': ProductFeed.Encoding.__dict__.values(), + 'feed_type_enum': ProductFeed.FeedType.__dict__.values(), + 'ingestion_source_type_enum': ProductFeed.IngestionSourceType.__dict__.values(), + 'item_sub_type_enum': ProductFeed.ItemSubType.__dict__.values(), + 'override_type_enum': ProductFeed.OverrideType.__dict__.values(), + 'quoted_fields_mode_enum': ProductFeed.QuotedFieldsMode.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/product_feeds', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeed, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeed, 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_product_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.productgroup import ProductGroup + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductGroup, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductGroup, 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_product_group(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productgroup import ProductGroup + param_types = { + 'retailer_id': 'string', + 'variants': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/product_groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductGroup, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductGroup, 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_product_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.productset import ProductSet + param_types = { + 'ancestor_id': 'string', + 'has_children': 'bool', + 'parent_id': 'string', + 'retailer_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_sets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductSet, 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_product_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.productset import ProductSet + param_types = { + 'filter': 'Object', + 'metadata': 'map', + 'name': 'string', + 'ordering_info': 'list', + 'publish_to_shops': 'list', + 'retailer_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/product_sets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductSet, 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_product_sets_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.') + from facebook_business.adobjects.productcatalogproductsetsbatch import ProductCatalogProductSetsBatch + param_types = { + 'handle': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_sets_batch', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalogProductSetsBatch, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductCatalogProductSetsBatch, 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productitem import ProductItem + param_types = { + 'bulk_pagination': 'bool', + 'error_priority': 'error_priority_enum', + 'error_type': 'error_type_enum', + 'filter': 'Object', + 'return_only_approved_products': 'bool', + } + enums = { + 'error_priority_enum': ProductItem.ErrorPriority.__dict__.values(), + 'error_type_enum': ProductItem.ErrorType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/products', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItem, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductItem, 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_product(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productitem import ProductItem + param_types = { + 'additional_image_urls': 'list', + 'additional_uploaded_image_ids': 'list', + 'additional_variant_attributes': 'map', + 'android_app_name': 'string', + 'android_class': 'string', + 'android_package': 'string', + 'android_url': 'string', + 'availability': 'availability_enum', + 'brand': 'string', + 'category': 'string', + 'category_specific_fields': 'map', + 'checkout_url': 'string', + 'color': 'string', + 'commerce_tax_category': 'commerce_tax_category_enum', + 'condition': 'condition_enum', + 'currency': 'string', + 'custom_data': 'map', + 'custom_label_0': 'string', + 'custom_label_1': 'string', + 'custom_label_2': 'string', + 'custom_label_3': 'string', + 'custom_label_4': 'string', + 'custom_number_0': 'unsigned int', + 'custom_number_1': 'unsigned int', + 'custom_number_2': 'unsigned int', + 'custom_number_3': 'unsigned int', + 'custom_number_4': 'unsigned int', + 'description': 'string', + 'expiration_date': 'string', + 'fb_product_category': 'string', + 'gender': 'gender_enum', + 'gtin': 'string', + 'image_url': 'string', + 'importer_address': 'map', + 'importer_name': 'string', + 'inventory': 'unsigned int', + 'ios_app_name': 'string', + 'ios_app_store_id': 'unsigned int', + 'ios_url': 'string', + 'ipad_app_name': 'string', + 'ipad_app_store_id': 'unsigned int', + 'ipad_url': 'string', + 'iphone_app_name': 'string', + 'iphone_app_store_id': 'unsigned int', + 'iphone_url': 'string', + 'launch_date': 'string', + 'manufacturer_info': 'string', + 'manufacturer_part_number': 'string', + 'marked_for_product_launch': 'marked_for_product_launch_enum', + 'material': 'string', + 'mobile_link': 'string', + 'name': 'string', + 'ordering_index': 'unsigned int', + 'origin_country': 'origin_country_enum', + 'pattern': 'string', + 'price': 'unsigned int', + 'product_type': 'string', + 'quantity_to_sell_on_facebook': 'unsigned int', + 'retailer_id': 'string', + 'retailer_product_group_id': 'string', + 'return_policy_days': 'unsigned int', + 'sale_price': 'unsigned int', + 'sale_price_end_date': 'datetime', + 'sale_price_start_date': 'datetime', + 'short_description': 'string', + 'size': 'string', + 'start_date': 'string', + 'url': 'string', + 'visibility': 'visibility_enum', + 'wa_compliance_category': 'wa_compliance_category_enum', + 'windows_phone_app_id': 'string', + 'windows_phone_app_name': 'string', + 'windows_phone_url': 'string', + } + enums = { + 'availability_enum': ProductItem.Availability.__dict__.values(), + 'commerce_tax_category_enum': ProductItem.CommerceTaxCategory.__dict__.values(), + 'condition_enum': ProductItem.Condition.__dict__.values(), + 'gender_enum': ProductItem.Gender.__dict__.values(), + 'marked_for_product_launch_enum': ProductItem.MarkedForProductLaunch.__dict__.values(), + 'origin_country_enum': ProductItem.OriginCountry.__dict__.values(), + 'visibility_enum': ProductItem.Visibility.__dict__.values(), + 'wa_compliance_category_enum': ProductItem.WaComplianceCategory.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/products', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItem, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductItem, 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_vehicle_offers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.vehicleoffer import VehicleOffer + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/vehicle_offers', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VehicleOffer, + api_type='EDGE', + response_parser=ObjectParser(target_class=VehicleOffer, 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_vehicles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.vehicle import Vehicle + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/vehicles', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Vehicle, + api_type='EDGE', + response_parser=ObjectParser(target_class=Vehicle, 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_vehicle(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.vehicle import Vehicle + param_types = { + 'address': 'map', + 'applinks': 'Object', + 'availability': 'availability_enum', + 'body_style': 'body_style_enum', + 'condition': 'condition_enum', + 'currency': 'string', + 'date_first_on_lot': 'string', + 'dealer_id': 'string', + 'dealer_name': 'string', + 'dealer_phone': 'string', + 'description': 'string', + 'drivetrain': 'drivetrain_enum', + 'exterior_color': 'string', + 'fb_page_id': 'string', + 'fuel_type': 'fuel_type_enum', + 'images': 'list', + 'interior_color': 'string', + 'make': 'string', + 'mileage': 'map', + 'model': 'string', + 'price': 'unsigned int', + 'state_of_vehicle': 'state_of_vehicle_enum', + 'title': 'string', + 'transmission': 'transmission_enum', + 'trim': 'string', + 'url': 'string', + 'vehicle_id': 'string', + 'vehicle_type': 'vehicle_type_enum', + 'vin': 'string', + 'year': 'unsigned int', + } + enums = { + 'availability_enum': Vehicle.Availability.__dict__.values(), + 'body_style_enum': Vehicle.BodyStyle.__dict__.values(), + 'condition_enum': Vehicle.Condition.__dict__.values(), + 'drivetrain_enum': Vehicle.Drivetrain.__dict__.values(), + 'fuel_type_enum': Vehicle.FuelType.__dict__.values(), + 'state_of_vehicle_enum': Vehicle.StateOfVehicle.__dict__.values(), + 'transmission_enum': Vehicle.Transmission.__dict__.values(), + 'vehicle_type_enum': Vehicle.VehicleType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/vehicles', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Vehicle, + api_type='EDGE', + response_parser=ObjectParser(target_class=Vehicle, 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', + 'business': 'Business', + 'catalog_store': 'StoreCatalogSettings', + 'commerce_merchant_settings': 'CommerceMerchantSettings', + 'creator_user': 'User', + 'da_display_settings': 'ProductCatalogImageSettings', + 'default_image_url': 'string', + 'fallback_image_url': 'list', + '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', + 'flight_catalog_settings': 'map', + 'parent_catalog_id': 'string', + 'partner_integration': 'map', + } + @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() + field_enum_info['Tasks'] = ProductCatalog.Tasks.__dict__.values() + field_enum_info['Standard'] = ProductCatalog.Standard.__dict__.values() + field_enum_info['ItemSubType'] = ProductCatalog.ItemSubType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcatalogcategory.py b/tap_facebook/facebook_business/adobjects/productcatalogcategory.py new file mode 100644 index 0000000..301b0e6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcatalogcategory.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 ProductCatalogCategory( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductCatalogCategory = True + super(ProductCatalogCategory, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + criteria_value = 'criteria_value' + description = 'description' + destination_uri = 'destination_uri' + image_url = 'image_url' + name = 'name' + num_items = 'num_items' + tokens = 'tokens' + data = 'data' + + class CategorizationCriteria: + brand = 'BRAND' + category = 'CATEGORY' + product_type = 'PRODUCT_TYPE' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'categories' + + # @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_category(fields, params, batch, success, failure, pending) + + _field_types = { + 'criteria_value': 'string', + 'description': 'string', + 'destination_uri': 'string', + 'image_url': 'string', + 'name': 'string', + 'num_items': 'int', + 'tokens': 'list>', + 'data': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['CategorizationCriteria'] = ProductCatalogCategory.CategorizationCriteria.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcatalogdatasource.py b/tap_facebook/facebook_business/adobjects/productcatalogdatasource.py new file mode 100644 index 0000000..2b0b307 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcatalogdatasource.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 ProductCatalogDataSource( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductCatalogDataSource = True + super(ProductCatalogDataSource, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + app_id = 'app_id' + id = 'id' + ingestion_source_type = 'ingestion_source_type' + name = 'name' + upload_type = 'upload_type' + + class IngestionSourceType: + all = 'ALL' + primary = 'PRIMARY' + supplementary = 'SUPPLEMENTARY' + + _field_types = { + 'app_id': 'string', + 'id': 'string', + 'ingestion_source_type': 'string', + 'name': 'string', + 'upload_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['IngestionSourceType'] = ProductCatalogDataSource.IngestionSourceType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcatalogdiagnosticgroup.py b/tap_facebook/facebook_business/adobjects/productcatalogdiagnosticgroup.py new file mode 100644 index 0000000..0fbc65d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcatalogdiagnosticgroup.py @@ -0,0 +1,127 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class ProductCatalogDiagnosticGroup( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogDiagnosticGroup, self).__init__() + self._isProductCatalogDiagnosticGroup = True + self._api = api + + class Field(AbstractObject.Field): + affected_channels = 'affected_channels' + affected_entity = 'affected_entity' + affected_features = 'affected_features' + diagnostics = 'diagnostics' + error_code = 'error_code' + number_of_affected_entities = 'number_of_affected_entities' + number_of_affected_items = 'number_of_affected_items' + severity = 'severity' + subtitle = 'subtitle' + title = 'title' + type = 'type' + + class AffectedChannels: + 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' + + class AffectedEntity: + product_catalog = 'product_catalog' + product_item = 'product_item' + product_set = 'product_set' + + class AffectedFeatures: + augmented_reality = 'augmented_reality' + checkout = 'checkout' + + class Severity: + must_fix = 'MUST_FIX' + opportunity = 'OPPORTUNITY' + + class Type: + ar_visibility_issues = 'AR_VISIBILITY_ISSUES' + attributes_invalid = 'ATTRIBUTES_INVALID' + attributes_missing = 'ATTRIBUTES_MISSING' + category = 'CATEGORY' + checkout = 'CHECKOUT' + da_visibility_issues = 'DA_VISIBILITY_ISSUES' + image_quality = 'IMAGE_QUALITY' + low_quality_title_and_description = 'LOW_QUALITY_TITLE_AND_DESCRIPTION' + policy_violation = 'POLICY_VIOLATION' + shops_visibility_issues = 'SHOPS_VISIBILITY_ISSUES' + + class AffectedEntities: + product_catalog = 'product_catalog' + product_item = 'product_item' + product_set = 'product_set' + + class Severities: + must_fix = 'MUST_FIX' + opportunity = 'OPPORTUNITY' + + class Types: + ar_visibility_issues = 'AR_VISIBILITY_ISSUES' + attributes_invalid = 'ATTRIBUTES_INVALID' + attributes_missing = 'ATTRIBUTES_MISSING' + category = 'CATEGORY' + checkout = 'CHECKOUT' + da_visibility_issues = 'DA_VISIBILITY_ISSUES' + image_quality = 'IMAGE_QUALITY' + low_quality_title_and_description = 'LOW_QUALITY_TITLE_AND_DESCRIPTION' + policy_violation = 'POLICY_VIOLATION' + shops_visibility_issues = 'SHOPS_VISIBILITY_ISSUES' + + _field_types = { + 'affected_channels': 'list', + 'affected_entity': 'AffectedEntity', + 'affected_features': 'list', + 'diagnostics': 'list', + 'error_code': 'int', + 'number_of_affected_entities': 'int', + 'number_of_affected_items': 'int', + 'severity': 'Severity', + 'subtitle': 'string', + 'title': 'string', + 'type': 'Type', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['AffectedChannels'] = ProductCatalogDiagnosticGroup.AffectedChannels.__dict__.values() + field_enum_info['AffectedEntity'] = ProductCatalogDiagnosticGroup.AffectedEntity.__dict__.values() + field_enum_info['AffectedFeatures'] = ProductCatalogDiagnosticGroup.AffectedFeatures.__dict__.values() + field_enum_info['Severity'] = ProductCatalogDiagnosticGroup.Severity.__dict__.values() + field_enum_info['Type'] = ProductCatalogDiagnosticGroup.Type.__dict__.values() + field_enum_info['AffectedEntities'] = ProductCatalogDiagnosticGroup.AffectedEntities.__dict__.values() + field_enum_info['Severities'] = ProductCatalogDiagnosticGroup.Severities.__dict__.values() + field_enum_info['Types'] = ProductCatalogDiagnosticGroup.Types.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcataloghotelroomsbatch.py b/tap_facebook/facebook_business/adobjects/productcataloghotelroomsbatch.py new file mode 100644 index 0000000..2c1a5b8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcataloghotelroomsbatch.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 ProductCatalogHotelRoomsBatch( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogHotelRoomsBatch, self).__init__() + self._isProductCatalogHotelRoomsBatch = True + self._api = api + + class Field(AbstractObject.Field): + errors = 'errors' + errors_total_count = 'errors_total_count' + handle = 'handle' + status = 'status' + + _field_types = { + 'errors': 'list', + 'errors_total_count': 'int', + 'handle': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcatalogimagesettings.py b/tap_facebook/facebook_business/adobjects/productcatalogimagesettings.py new file mode 100644 index 0000000..df420d4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcatalogimagesettings.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 ProductCatalogImageSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogImageSettings, self).__init__() + self._isProductCatalogImageSettings = True + self._api = api + + class Field(AbstractObject.Field): + carousel_ad = 'carousel_ad' + single_ad = 'single_ad' + + _field_types = { + 'carousel_ad': 'ProductCatalogImageSettingsOperation', + 'single_ad': 'ProductCatalogImageSettingsOperation', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcatalogimagesettingsoperation.py b/tap_facebook/facebook_business/adobjects/productcatalogimagesettingsoperation.py new file mode 100644 index 0000000..1aacbfa --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcatalogimagesettingsoperation.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 ProductCatalogImageSettingsOperation( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogImageSettingsOperation, self).__init__() + self._isProductCatalogImageSettingsOperation = True + self._api = api + + class Field(AbstractObject.Field): + transformation_type = 'transformation_type' + + _field_types = { + 'transformation_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcatalogpricingvariablesbatch.py b/tap_facebook/facebook_business/adobjects/productcatalogpricingvariablesbatch.py new file mode 100644 index 0000000..baff08e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcatalogpricingvariablesbatch.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 ProductCatalogPricingVariablesBatch( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogPricingVariablesBatch, self).__init__() + self._isProductCatalogPricingVariablesBatch = True + self._api = api + + class Field(AbstractObject.Field): + errors = 'errors' + errors_total_count = 'errors_total_count' + handle = 'handle' + status = 'status' + + _field_types = { + 'errors': 'list', + 'errors_total_count': 'int', + 'handle': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productcatalogproductsetsbatch.py b/tap_facebook/facebook_business/adobjects/productcatalogproductsetsbatch.py new file mode 100644 index 0000000..3e01a68 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productcatalogproductsetsbatch.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 ProductCatalogProductSetsBatch( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogProductSetsBatch, self).__init__() + self._isProductCatalogProductSetsBatch = True + self._api = api + + class Field(AbstractObject.Field): + errors = 'errors' + errors_total_count = 'errors_total_count' + handle = 'handle' + status = 'status' + + _field_types = { + 'errors': 'list', + 'errors_total_count': 'int', + 'handle': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/producteventstat.py b/tap_facebook/facebook_business/adobjects/producteventstat.py new file mode 100644 index 0000000..bc7d170 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/producteventstat.py @@ -0,0 +1,85 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class ProductEventStat( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductEventStat, self).__init__() + self._isProductEventStat = True + self._api = api + + class Field(AbstractObject.Field): + date_start = 'date_start' + date_stop = 'date_stop' + device_type = 'device_type' + event = 'event' + event_source = 'event_source' + total_content_ids_matched_other_catalogs = 'total_content_ids_matched_other_catalogs' + total_matched_content_ids = 'total_matched_content_ids' + total_unmatched_content_ids = 'total_unmatched_content_ids' + unique_content_ids_matched_other_catalogs = 'unique_content_ids_matched_other_catalogs' + unique_matched_content_ids = 'unique_matched_content_ids' + unique_unmatched_content_ids = 'unique_unmatched_content_ids' + + class DeviceType: + desktop = 'desktop' + mobile_android_phone = 'mobile_android_phone' + mobile_android_tablet = 'mobile_android_tablet' + mobile_ipad = 'mobile_ipad' + mobile_iphone = 'mobile_iphone' + mobile_ipod = 'mobile_ipod' + mobile_phone = 'mobile_phone' + mobile_tablet = 'mobile_tablet' + mobile_windows_phone = 'mobile_windows_phone' + unknown = 'unknown' + + class Event: + addtocart = 'AddToCart' + addtowishlist = 'AddToWishlist' + initiatecheckout = 'InitiateCheckout' + lead = 'Lead' + purchase = 'Purchase' + search = 'Search' + subscribe = 'Subscribe' + viewcontent = 'ViewContent' + + class Breakdowns: + device_type = 'DEVICE_TYPE' + + _field_types = { + 'date_start': 'string', + 'date_stop': 'string', + 'device_type': 'DeviceType', + 'event': 'Event', + 'event_source': 'ExternalEventSource', + 'total_content_ids_matched_other_catalogs': 'int', + 'total_matched_content_ids': 'int', + 'total_unmatched_content_ids': 'int', + 'unique_content_ids_matched_other_catalogs': 'int', + 'unique_matched_content_ids': 'int', + 'unique_unmatched_content_ids': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['DeviceType'] = ProductEventStat.DeviceType.__dict__.values() + field_enum_info['Event'] = ProductEventStat.Event.__dict__.values() + field_enum_info['Breakdowns'] = ProductEventStat.Breakdowns.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeed.py b/tap_facebook/facebook_business/adobjects/productfeed.py new file mode 100644 index 0000000..3b60ec5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeed.py @@ -0,0 +1,814 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ProductFeed( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductFeed = True + super(ProductFeed, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + country = 'country' + created_time = 'created_time' + default_currency = 'default_currency' + deletion_enabled = 'deletion_enabled' + delimiter = 'delimiter' + encoding = 'encoding' + file_name = 'file_name' + id = 'id' + ingestion_source_type = 'ingestion_source_type' + item_sub_type = 'item_sub_type' + latest_upload = 'latest_upload' + migrated_from_feed_id = 'migrated_from_feed_id' + name = 'name' + override_type = 'override_type' + primary_feeds = 'primary_feeds' + product_count = 'product_count' + quoted_fields_mode = 'quoted_fields_mode' + schedule = 'schedule' + supplementary_feeds = 'supplementary_feeds' + update_schedule = 'update_schedule' + feed_type = 'feed_type' + override_value = 'override_value' + primary_feed_ids = 'primary_feed_ids' + rules = 'rules' + selected_override_fields = 'selected_override_fields' + + class Delimiter: + autodetect = 'AUTODETECT' + bar = 'BAR' + comma = 'COMMA' + semicolon = 'SEMICOLON' + tab = 'TAB' + tilde = 'TILDE' + + class IngestionSourceType: + primary_feed = 'primary_feed' + supplementary_feed = 'supplementary_feed' + + class QuotedFieldsMode: + autodetect = 'AUTODETECT' + off = 'OFF' + on = 'ON' + + class Encoding: + autodetect = 'AUTODETECT' + latin1 = 'LATIN1' + utf16be = 'UTF16BE' + utf16le = 'UTF16LE' + utf32be = 'UTF32BE' + utf32le = 'UTF32LE' + utf8 = 'UTF8' + + class FeedType: + automotive_model = 'AUTOMOTIVE_MODEL' + destination = 'DESTINATION' + flight = 'FLIGHT' + home_listing = 'HOME_LISTING' + hotel = 'HOTEL' + hotel_room = 'HOTEL_ROOM' + local_inventory = 'LOCAL_INVENTORY' + media_title = 'MEDIA_TITLE' + offer = 'OFFER' + products = 'PRODUCTS' + transactable_items = 'TRANSACTABLE_ITEMS' + vehicles = 'VEHICLES' + vehicle_offer = 'VEHICLE_OFFER' + + class ItemSubType: + appliances = 'APPLIANCES' + baby_feeding = 'BABY_FEEDING' + baby_transport = 'BABY_TRANSPORT' + beauty = 'BEAUTY' + bedding = 'BEDDING' + cameras = 'CAMERAS' + cell_phones_and_smart_watches = 'CELL_PHONES_AND_SMART_WATCHES' + cleaning_supplies = 'CLEANING_SUPPLIES' + clothing = 'CLOTHING' + clothing_accessories = 'CLOTHING_ACCESSORIES' + computers_and_tablets = 'COMPUTERS_AND_TABLETS' + diapering_and_potty_training = 'DIAPERING_AND_POTTY_TRAINING' + electronics_accessories = 'ELECTRONICS_ACCESSORIES' + furniture = 'FURNITURE' + health = 'HEALTH' + home_goods = 'HOME_GOODS' + jewelry = 'JEWELRY' + nursery = 'NURSERY' + printers_and_scanners = 'PRINTERS_AND_SCANNERS' + projectors = 'PROJECTORS' + shoes_and_footwear = 'SHOES_AND_FOOTWEAR' + software = 'SOFTWARE' + toys = 'TOYS' + tvs_and_monitors = 'TVS_AND_MONITORS' + video_game_consoles_and_video_games = 'VIDEO_GAME_CONSOLES_AND_VIDEO_GAMES' + watches = 'WATCHES' + + class OverrideType: + batch_api_language_or_country = 'BATCH_API_LANGUAGE_OR_COUNTRY' + catalog_segment_customize_default = 'CATALOG_SEGMENT_CUSTOMIZE_DEFAULT' + country = 'COUNTRY' + 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 + def get_endpoint(cls): + return 'product_feeds' + + # @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_product_feed(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 + if batch 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=ProductFeed, + 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 = { + 'default_currency': 'string', + 'deletion_enabled': 'bool', + 'delimiter': 'delimiter_enum', + 'encoding': 'encoding_enum', + 'migrated_from_feed_id': 'string', + 'name': 'string', + 'quoted_fields_mode': 'quoted_fields_mode_enum', + 'schedule': 'string', + 'update_schedule': 'string', + } + enums = { + 'delimiter_enum': ProductFeed.Delimiter.__dict__.values(), + 'encoding_enum': ProductFeed.Encoding.__dict__.values(), + 'quoted_fields_mode_enum': ProductFeed.QuotedFieldsMode.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeed, + 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_automotive_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.') + from facebook_business.adobjects.automotivemodel import AutomotiveModel + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/automotive_models', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AutomotiveModel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AutomotiveModel, 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_destinations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.destination import Destination + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/destinations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Destination, + api_type='EDGE', + response_parser=ObjectParser(target_class=Destination, 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_flights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.flight import Flight + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/flights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Flight, + api_type='EDGE', + response_parser=ObjectParser(target_class=Flight, 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_home_listings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.homelisting import HomeListing + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/home_listings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HomeListing, + api_type='EDGE', + response_parser=ObjectParser(target_class=HomeListing, 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_hotels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.hotel import Hotel + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/hotels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Hotel, + api_type='EDGE', + response_parser=ObjectParser(target_class=Hotel, 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_titles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.mediatitle import MediaTitle + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/media_titles', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MediaTitle, + api_type='EDGE', + response_parser=ObjectParser(target_class=MediaTitle, 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productitem import ProductItem + param_types = { + 'bulk_pagination': 'bool', + 'error_priority': 'error_priority_enum', + 'error_type': 'error_type_enum', + 'filter': 'Object', + } + enums = { + 'error_priority_enum': ProductItem.ErrorPriority.__dict__.values(), + 'error_type_enum': ProductItem.ErrorType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/products', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItem, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductItem, 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_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.productfeedrule import ProductFeedRule + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/rules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedRule, 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_rule(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productfeedrule import ProductFeedRule + param_types = { + 'attribute': 'string', + 'params': 'map', + 'rule_type': 'rule_type_enum', + } + enums = { + 'rule_type_enum': ProductFeedRule.RuleType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/rules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedRule, 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_supplementary_feed_assoc(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'assoc_data': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/supplementary_feed_assocs', + 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_upload_schedules(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productfeedschedule import ProductFeedSchedule + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/upload_schedules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedSchedule, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedSchedule, 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_upload_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.') + param_types = { + 'upload_schedule': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/upload_schedules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeed, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeed, 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.productfeedupload import ProductFeedUpload + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/uploads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedUpload, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedUpload, 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_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.productfeedupload import ProductFeedUpload + param_types = { + 'fbe_external_business_id': 'string', + 'file': 'file', + 'password': 'string', + 'update_only': 'bool', + 'url': 'string', + 'username': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/uploads', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedUpload, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedUpload, 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_vehicle_offers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.vehicleoffer import VehicleOffer + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/vehicle_offers', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VehicleOffer, + api_type='EDGE', + response_parser=ObjectParser(target_class=VehicleOffer, 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_vehicles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.vehicle import Vehicle + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/vehicles', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Vehicle, + api_type='EDGE', + response_parser=ObjectParser(target_class=Vehicle, 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 = { + 'country': 'string', + 'created_time': 'datetime', + 'default_currency': 'string', + 'deletion_enabled': 'bool', + 'delimiter': 'Delimiter', + 'encoding': 'string', + 'file_name': 'string', + 'id': 'string', + 'ingestion_source_type': 'IngestionSourceType', + 'item_sub_type': 'string', + 'latest_upload': 'ProductFeedUpload', + 'migrated_from_feed_id': 'string', + 'name': 'string', + 'override_type': 'string', + 'primary_feeds': 'list', + 'product_count': 'int', + 'quoted_fields_mode': 'QuotedFieldsMode', + 'schedule': 'ProductFeedSchedule', + 'supplementary_feeds': 'list', + 'update_schedule': 'ProductFeedSchedule', + 'feed_type': 'FeedType', + 'override_value': 'string', + 'primary_feed_ids': 'list', + 'rules': 'list', + 'selected_override_fields': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Delimiter'] = ProductFeed.Delimiter.__dict__.values() + field_enum_info['IngestionSourceType'] = ProductFeed.IngestionSourceType.__dict__.values() + field_enum_info['QuotedFieldsMode'] = ProductFeed.QuotedFieldsMode.__dict__.values() + field_enum_info['Encoding'] = ProductFeed.Encoding.__dict__.values() + field_enum_info['FeedType'] = ProductFeed.FeedType.__dict__.values() + field_enum_info['ItemSubType'] = ProductFeed.ItemSubType.__dict__.values() + field_enum_info['OverrideType'] = ProductFeed.OverrideType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py b/tap_facebook/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py new file mode 100644 index 0000000..ed6bbca --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeedmissingfeeditemreplacement.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 ProductFeedMissingFeedItemReplacement( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductFeedMissingFeedItemReplacement, self).__init__() + self._isProductFeedMissingFeedItemReplacement = True + self._api = api + + class Field(AbstractObject.Field): + home_listing = 'home_listing' + product_item = 'product_item' + vehicle = 'vehicle' + + _field_types = { + 'home_listing': 'Object', + 'product_item': 'Object', + 'vehicle': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeedrule.py b/tap_facebook/facebook_business/adobjects/productfeedrule.py new file mode 100644 index 0000000..340d2c1 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeedrule.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 ProductFeedRule( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductFeedRule = True + super(ProductFeedRule, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + attribute = 'attribute' + id = 'id' + params = 'params' + rule_type = 'rule_type' + + class RuleType: + fallback_rule = 'fallback_rule' + letter_case_rule = 'letter_case_rule' + mapping_rule = 'mapping_rule' + regex_replace_rule = 'regex_replace_rule' + value_mapping_rule = 'value_mapping_rule' + + 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=ProductFeedRule, + 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 = { + 'params': 'map', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedRule, + 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 = { + 'attribute': 'string', + 'id': 'string', + 'params': 'list>', + 'rule_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['RuleType'] = ProductFeedRule.RuleType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeedrulesuggestion.py b/tap_facebook/facebook_business/adobjects/productfeedrulesuggestion.py new file mode 100644 index 0000000..509824b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeedrulesuggestion.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 ProductFeedRuleSuggestion( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductFeedRuleSuggestion, self).__init__() + self._isProductFeedRuleSuggestion = True + self._api = api + + class Field(AbstractObject.Field): + attribute = 'attribute' + params = 'params' + type = 'type' + + _field_types = { + 'attribute': 'string', + 'params': 'list>', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeedschedule.py b/tap_facebook/facebook_business/adobjects/productfeedschedule.py new file mode 100644 index 0000000..4ffde4f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeedschedule.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 ProductFeedSchedule( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductFeedSchedule = True + super(ProductFeedSchedule, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + day_of_month = 'day_of_month' + day_of_week = 'day_of_week' + hour = 'hour' + id = 'id' + interval = 'interval' + interval_count = 'interval_count' + minute = 'minute' + timezone = 'timezone' + url = 'url' + username = 'username' + + class Interval: + daily = 'DAILY' + hourly = 'HOURLY' + monthly = 'MONTHLY' + weekly = 'WEEKLY' + + 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=ProductFeedSchedule, + 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 = { + 'day_of_month': 'unsigned int', + 'day_of_week': 'string', + 'hour': 'unsigned int', + 'id': 'string', + 'interval': 'Interval', + 'interval_count': 'unsigned int', + 'minute': 'unsigned int', + 'timezone': 'string', + 'url': 'string', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Interval'] = ProductFeedSchedule.Interval.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeedupload.py b/tap_facebook/facebook_business/adobjects/productfeedupload.py new file mode 100644 index 0000000..c62ab11 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeedupload.py @@ -0,0 +1,170 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ProductFeedUpload( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductFeedUpload = True + super(ProductFeedUpload, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + end_time = 'end_time' + error_count = 'error_count' + error_report = 'error_report' + filename = 'filename' + id = 'id' + input_method = 'input_method' + num_deleted_items = 'num_deleted_items' + num_detected_items = 'num_detected_items' + num_invalid_items = 'num_invalid_items' + num_persisted_items = 'num_persisted_items' + start_time = 'start_time' + url = 'url' + warning_count = 'warning_count' + + class InputMethod: + google_sheets_fetch = 'Google Sheets Fetch' + manual_upload = 'Manual Upload' + reupload_last_file = 'Reupload Last File' + server_fetch = 'Server Fetch' + user_initiated_server_fetch = 'User initiated server fetch' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'uploads' + + 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=ProductFeedUpload, + 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_error_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/error_report', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedUpload, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedUpload, 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_errors(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productfeeduploaderror import ProductFeedUploadError + param_types = { + 'error_priority': 'error_priority_enum', + } + enums = { + 'error_priority_enum': ProductFeedUploadError.ErrorPriority.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/errors', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedUploadError, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedUploadError, 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 = { + 'end_time': 'datetime', + 'error_count': 'int', + 'error_report': 'ProductFeedUploadErrorReport', + 'filename': 'string', + 'id': 'string', + 'input_method': 'InputMethod', + 'num_deleted_items': 'int', + 'num_detected_items': 'int', + 'num_invalid_items': 'int', + 'num_persisted_items': 'int', + 'start_time': 'datetime', + 'url': 'string', + 'warning_count': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['InputMethod'] = ProductFeedUpload.InputMethod.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeeduploaderror.py b/tap_facebook/facebook_business/adobjects/productfeeduploaderror.py new file mode 100644 index 0000000..5e051b9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeeduploaderror.py @@ -0,0 +1,166 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ProductFeedUploadError( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductFeedUploadError = True + super(ProductFeedUploadError, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + affected_surfaces = 'affected_surfaces' + description = 'description' + error_type = 'error_type' + id = 'id' + severity = 'severity' + summary = 'summary' + total_count = 'total_count' + + class AffectedSurfaces: + dynamic_ads = 'Dynamic Ads' + marketplace = 'Marketplace' + us_marketplace = 'US Marketplace' + + class Severity: + fatal = 'fatal' + warning = 'warning' + + class ErrorPriority: + high = 'HIGH' + low = 'LOW' + medium = 'MEDIUM' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'errors' + + 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=ProductFeedUploadError, + 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_samples(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productfeeduploaderrorsample import ProductFeedUploadErrorSample + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/samples', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedUploadErrorSample, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedUploadErrorSample, 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_suggested_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.productfeedrulesuggestion import ProductFeedRuleSuggestion + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/suggested_rules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductFeedRuleSuggestion, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductFeedRuleSuggestion, 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 = { + 'affected_surfaces': 'list', + 'description': 'string', + 'error_type': 'string', + 'id': 'string', + 'severity': 'Severity', + 'summary': 'string', + 'total_count': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['AffectedSurfaces'] = ProductFeedUploadError.AffectedSurfaces.__dict__.values() + field_enum_info['Severity'] = ProductFeedUploadError.Severity.__dict__.values() + field_enum_info['ErrorPriority'] = ProductFeedUploadError.ErrorPriority.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeeduploaderrorreport.py b/tap_facebook/facebook_business/adobjects/productfeeduploaderrorreport.py new file mode 100644 index 0000000..2c9773f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeeduploaderrorreport.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 ProductFeedUploadErrorReport( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductFeedUploadErrorReport, self).__init__() + self._isProductFeedUploadErrorReport = True + self._api = api + + class Field(AbstractObject.Field): + file_handle = 'file_handle' + report_status = 'report_status' + + _field_types = { + 'file_handle': 'string', + 'report_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productfeeduploaderrorsample.py b/tap_facebook/facebook_business/adobjects/productfeeduploaderrorsample.py new file mode 100644 index 0000000..1c7720c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productfeeduploaderrorsample.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 ProductFeedUploadErrorSample( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductFeedUploadErrorSample = True + super(ProductFeedUploadErrorSample, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + retailer_id = 'retailer_id' + row_number = 'row_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=ProductFeedUploadErrorSample, + 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', + 'retailer_id': 'string', + 'row_number': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productgroup.py b/tap_facebook/facebook_business/adobjects/productgroup.py new file mode 100644 index 0000000..3ca88e6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productgroup.py @@ -0,0 +1,286 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ProductGroup( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductGroup = True + super(ProductGroup, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + product_catalog = 'product_catalog' + retailer_id = 'retailer_id' + variants = 'variants' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'product_groups' + + # @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_product_group(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 = { + 'deletion_method': 'deletion_method_enum', + } + enums = { + 'deletion_method_enum': [ + 'DELETE_ITEMS', + 'ONLY_IF_EMPTY', + ], + } + 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=ProductGroup, + 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 = { + 'default_product_id': 'string', + 'variants': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductGroup, + 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productitem import ProductItem + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/products', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItem, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductItem, 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_product(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productitem import ProductItem + param_types = { + 'additional_image_urls': 'list', + 'additional_variant_attributes': 'map', + 'android_app_name': 'string', + 'android_class': 'string', + 'android_package': 'string', + 'android_url': 'string', + 'availability': 'availability_enum', + 'brand': 'string', + 'category': 'string', + 'checkout_url': 'string', + 'color': 'string', + 'commerce_tax_category': 'commerce_tax_category_enum', + 'condition': 'condition_enum', + 'currency': 'string', + 'custom_data': 'map', + 'custom_label_0': 'string', + 'custom_label_1': 'string', + 'custom_label_2': 'string', + 'custom_label_3': 'string', + 'custom_label_4': 'string', + 'custom_number_0': 'unsigned int', + 'custom_number_1': 'unsigned int', + 'custom_number_2': 'unsigned int', + 'custom_number_3': 'unsigned int', + 'custom_number_4': 'unsigned int', + 'description': 'string', + 'expiration_date': 'string', + 'fb_product_category': 'string', + 'gender': 'gender_enum', + 'gtin': 'string', + 'image_url': 'string', + 'inventory': 'unsigned int', + 'ios_app_name': 'string', + 'ios_app_store_id': 'unsigned int', + 'ios_url': 'string', + 'ipad_app_name': 'string', + 'ipad_app_store_id': 'unsigned int', + 'ipad_url': 'string', + 'iphone_app_name': 'string', + 'iphone_app_store_id': 'unsigned int', + 'iphone_url': 'string', + 'launch_date': 'string', + 'manufacturer_part_number': 'string', + 'marked_for_product_launch': 'marked_for_product_launch_enum', + 'material': 'string', + 'mobile_link': 'string', + 'name': 'string', + 'ordering_index': 'unsigned int', + 'pattern': 'string', + 'price': 'unsigned int', + 'product_type': 'string', + 'quantity_to_sell_on_facebook': 'unsigned int', + 'retailer_id': 'string', + 'return_policy_days': 'unsigned int', + 'sale_price': 'unsigned int', + 'sale_price_end_date': 'datetime', + 'sale_price_start_date': 'datetime', + 'short_description': 'string', + 'size': 'string', + 'start_date': 'string', + 'url': 'string', + 'visibility': 'visibility_enum', + 'windows_phone_app_id': 'string', + 'windows_phone_app_name': 'string', + 'windows_phone_url': 'string', + } + enums = { + 'availability_enum': ProductItem.Availability.__dict__.values(), + 'commerce_tax_category_enum': ProductItem.CommerceTaxCategory.__dict__.values(), + 'condition_enum': ProductItem.Condition.__dict__.values(), + 'gender_enum': ProductItem.Gender.__dict__.values(), + 'marked_for_product_launch_enum': ProductItem.MarkedForProductLaunch.__dict__.values(), + 'visibility_enum': ProductItem.Visibility.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/products', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItem, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductItem, 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', + 'product_catalog': 'ProductCatalog', + 'retailer_id': 'string', + 'variants': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productimage.py b/tap_facebook/facebook_business/adobjects/productimage.py new file mode 100644 index 0000000..8c2c28a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productimage.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 ProductImage( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductImage = True + 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 + if batch 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=ProductImage, + 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 = { + 'height': 'int', + 'id': 'string', + 'image_url': 'string', + 'width': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productitem.py b/tap_facebook/facebook_business/adobjects/productitem.py new file mode 100644 index 0000000..df4c026 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productitem.py @@ -0,0 +1,1187 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ProductItem( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductItem = True + super(ProductItem, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + additional_image_cdn_urls = 'additional_image_cdn_urls' + additional_image_urls = 'additional_image_urls' + additional_variant_attributes = 'additional_variant_attributes' + age_group = 'age_group' + applinks = 'applinks' + availability = 'availability' + brand = 'brand' + capability_to_review_status = 'capability_to_review_status' + category = 'category' + category_specific_fields = 'category_specific_fields' + color = 'color' + commerce_insights = 'commerce_insights' + condition = 'condition' + currency = 'currency' + custom_data = 'custom_data' + custom_label_0 = 'custom_label_0' + custom_label_1 = 'custom_label_1' + custom_label_2 = 'custom_label_2' + custom_label_3 = 'custom_label_3' + custom_label_4 = 'custom_label_4' + custom_number_0 = 'custom_number_0' + custom_number_1 = 'custom_number_1' + custom_number_2 = 'custom_number_2' + custom_number_3 = 'custom_number_3' + custom_number_4 = 'custom_number_4' + description = 'description' + errors = 'errors' + expiration_date = 'expiration_date' + fb_product_category = 'fb_product_category' + gender = 'gender' + gtin = 'gtin' + id = 'id' + image_cdn_urls = 'image_cdn_urls' + image_fetch_status = 'image_fetch_status' + image_url = 'image_url' + images = 'images' + importer_address = 'importer_address' + importer_name = 'importer_name' + invalidation_errors = 'invalidation_errors' + inventory = 'inventory' + manufacturer_info = 'manufacturer_info' + manufacturer_part_number = 'manufacturer_part_number' + marked_for_product_launch = 'marked_for_product_launch' + material = 'material' + mobile_link = 'mobile_link' + name = 'name' + ordering_index = 'ordering_index' + origin_country = 'origin_country' + parent_product_id = 'parent_product_id' + pattern = 'pattern' + post_conversion_signal_based_enforcement_appeal_eligibility = 'post_conversion_signal_based_enforcement_appeal_eligibility' + price = 'price' + 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' + retailer_product_group_id = 'retailer_product_group_id' + review_rejection_reasons = 'review_rejection_reasons' + review_status = 'review_status' + sale_price = 'sale_price' + sale_price_end_date = 'sale_price_end_date' + sale_price_start_date = 'sale_price_start_date' + shipping_weight_unit = 'shipping_weight_unit' + shipping_weight_value = 'shipping_weight_value' + 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' + android_app_name = 'android_app_name' + android_class = 'android_class' + android_package = 'android_package' + android_url = 'android_url' + checkout_url = 'checkout_url' + commerce_tax_category = 'commerce_tax_category' + ios_app_name = 'ios_app_name' + ios_app_store_id = 'ios_app_store_id' + ios_url = 'ios_url' + ipad_app_name = 'ipad_app_name' + ipad_app_store_id = 'ipad_app_store_id' + ipad_url = 'ipad_url' + iphone_app_name = 'iphone_app_name' + iphone_app_store_id = 'iphone_app_store_id' + iphone_url = 'iphone_url' + launch_date = 'launch_date' + return_policy_days = 'return_policy_days' + windows_phone_app_id = 'windows_phone_app_id' + windows_phone_app_name = 'windows_phone_app_name' + windows_phone_url = 'windows_phone_url' + + class AgeGroup: + adult = 'adult' + all_ages = 'all ages' + infant = 'infant' + kids = 'kids' + newborn = 'newborn' + teen = 'teen' + toddler = 'toddler' + + 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' + + class Condition: + cpo = 'cpo' + new = 'new' + open_box_new = 'open_box_new' + refurbished = 'refurbished' + used = 'used' + used_fair = 'used_fair' + used_good = 'used_good' + used_like_new = 'used_like_new' + + class Gender: + female = 'female' + male = 'male' + unisex = 'unisex' + + class ImageFetchStatus: + direct_upload = 'DIRECT_UPLOAD' + fetched = 'FETCHED' + fetch_failed = 'FETCH_FAILED' + no_status = 'NO_STATUS' + outdated = 'OUTDATED' + partial_fetch = 'PARTIAL_FETCH' + + class ReviewStatus: + approved = 'approved' + outdated = 'outdated' + pending = 'pending' + rejected = 'rejected' + + class ShippingWeightUnit: + value_g = 'g' + kg = 'kg' + 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' + + class CommerceTaxCategory: + fb_animal = 'FB_ANIMAL' + fb_animal_supp = 'FB_ANIMAL_SUPP' + fb_aprl = 'FB_APRL' + fb_aprl_accessories = 'FB_APRL_ACCESSORIES' + fb_aprl_athl_unif = 'FB_APRL_ATHL_UNIF' + fb_aprl_cases = 'FB_APRL_CASES' + fb_aprl_clothing = 'FB_APRL_CLOTHING' + fb_aprl_costume = 'FB_APRL_COSTUME' + fb_aprl_cstm = 'FB_APRL_CSTM' + fb_aprl_formal = 'FB_APRL_FORMAL' + fb_aprl_handbag = 'FB_APRL_HANDBAG' + fb_aprl_jewelry = 'FB_APRL_JEWELRY' + fb_aprl_shoe = 'FB_APRL_SHOE' + fb_aprl_shoe_acc = 'FB_APRL_SHOE_ACC' + fb_aprl_swim = 'FB_APRL_SWIM' + fb_aprl_swim_chil = 'FB_APRL_SWIM_CHIL' + fb_aprl_swim_cvr = 'FB_APRL_SWIM_CVR' + fb_arts = 'FB_ARTS' + fb_arts_hobby = 'FB_ARTS_HOBBY' + fb_arts_party = 'FB_ARTS_PARTY' + fb_arts_party_gift_card = 'FB_ARTS_PARTY_GIFT_CARD' + fb_arts_ticket = 'FB_ARTS_TICKET' + fb_baby = 'FB_BABY' + fb_baby_bath = 'FB_BABY_BATH' + fb_baby_blanket = 'FB_BABY_BLANKET' + fb_baby_diaper = 'FB_BABY_DIAPER' + fb_baby_gift_set = 'FB_BABY_GIFT_SET' + fb_baby_health = 'FB_BABY_HEALTH' + fb_baby_nursing = 'FB_BABY_NURSING' + fb_baby_potty_trn = 'FB_BABY_POTTY_TRN' + fb_baby_safe = 'FB_BABY_SAFE' + fb_baby_toys = 'FB_BABY_TOYS' + fb_baby_transport = 'FB_BABY_TRANSPORT' + fb_baby_transport_acc = 'FB_BABY_TRANSPORT_ACC' + fb_bags = 'FB_BAGS' + fb_bags_bkpk = 'FB_BAGS_BKPK' + fb_bags_boxes = 'FB_BAGS_BOXES' + fb_bags_brfcs = 'FB_BAGS_BRFCS' + fb_bags_csmt_bag = 'FB_BAGS_CSMT_BAG' + fb_bags_dffl = 'FB_BAGS_DFFL' + fb_bags_dipr = 'FB_BAGS_DIPR' + fb_bags_fnny = 'FB_BAGS_FNNY' + fb_bags_grmt = 'FB_BAGS_GRMT' + fb_bags_lugg = 'FB_BAGS_LUGG' + fb_bags_lug_acc = 'FB_BAGS_LUG_ACC' + fb_bags_msgr = 'FB_BAGS_MSGR' + fb_bags_tote = 'FB_BAGS_TOTE' + fb_bags_trn_cas = 'FB_BAGS_TRN_CAS' + fb_bldg = 'FB_BLDG' + fb_bldg_acc = 'FB_BLDG_ACC' + fb_bldg_cnsmb = 'FB_BLDG_CNSMB' + fb_bldg_fence = 'FB_BLDG_FENCE' + fb_bldg_fuel_tnk = 'FB_BLDG_FUEL_TNK' + fb_bldg_ht_vnt = 'FB_BLDG_HT_VNT' + fb_bldg_lock = 'FB_BLDG_LOCK' + fb_bldg_matrl = 'FB_BLDG_MATRL' + fb_bldg_plmb = 'FB_BLDG_PLMB' + fb_bldg_pump = 'FB_BLDG_PUMP' + fb_bldg_pwrs = 'FB_BLDG_PWRS' + fb_bldg_str_tank = 'FB_BLDG_STR_TANK' + fb_bldg_s_eng = 'FB_BLDG_S_ENG' + fb_bldg_tl_acc = 'FB_BLDG_TL_ACC' + fb_bldg_tool = 'FB_BLDG_TOOL' + fb_busind = 'FB_BUSIND' + fb_busind_advertising = 'FB_BUSIND_ADVERTISING' + fb_busind_agriculture = 'FB_BUSIND_AGRICULTURE' + fb_busind_automation = 'FB_BUSIND_AUTOMATION' + fb_busind_heavy_mach = 'FB_BUSIND_HEAVY_MACH' + fb_busind_lab = 'FB_BUSIND_LAB' + fb_busind_medical = 'FB_BUSIND_MEDICAL' + fb_busind_retail = 'FB_BUSIND_RETAIL' + fb_busind_sanitary_ct = 'FB_BUSIND_SANITARY_CT' + fb_busind_sign = 'FB_BUSIND_SIGN' + fb_busind_storage = 'FB_BUSIND_STORAGE' + fb_busind_storage_acc = 'FB_BUSIND_STORAGE_ACC' + fb_busind_work_gear = 'FB_BUSIND_WORK_GEAR' + fb_camera_acc = 'FB_CAMERA_ACC' + fb_camera_camera = 'FB_CAMERA_CAMERA' + fb_camera_optic = 'FB_CAMERA_OPTIC' + fb_camera_optics = 'FB_CAMERA_OPTICS' + fb_camera_photo = 'FB_CAMERA_PHOTO' + fb_elec = 'FB_ELEC' + fb_elec_acc = 'FB_ELEC_ACC' + fb_elec_arcdade = 'FB_ELEC_ARCDADE' + fb_elec_audio = 'FB_ELEC_AUDIO' + fb_elec_circuit = 'FB_ELEC_CIRCUIT' + fb_elec_comm = 'FB_ELEC_COMM' + fb_elec_computer = 'FB_ELEC_COMPUTER' + fb_elec_gps_acc = 'FB_ELEC_GPS_ACC' + fb_elec_gps_nav = 'FB_ELEC_GPS_NAV' + fb_elec_gps_trk = 'FB_ELEC_GPS_TRK' + fb_elec_marine = 'FB_ELEC_MARINE' + fb_elec_network = 'FB_ELEC_NETWORK' + fb_elec_part = 'FB_ELEC_PART' + fb_elec_print = 'FB_ELEC_PRINT' + fb_elec_radar = 'FB_ELEC_RADAR' + fb_elec_sftwr = 'FB_ELEC_SFTWR' + fb_elec_speed_rdr = 'FB_ELEC_SPEED_RDR' + fb_elec_television = 'FB_ELEC_TELEVISION' + fb_elec_toll = 'FB_ELEC_TOLL' + fb_elec_video = 'FB_ELEC_VIDEO' + fb_elec_vid_gm_acc = 'FB_ELEC_VID_GM_ACC' + fb_elec_vid_gm_cnsl = 'FB_ELEC_VID_GM_CNSL' + fb_food = 'FB_FOOD' + fb_furn = 'FB_FURN' + fb_furn_baby = 'FB_FURN_BABY' + fb_furn_bench = 'FB_FURN_BENCH' + fb_furn_cart = 'FB_FURN_CART' + fb_furn_chair = 'FB_FURN_CHAIR' + fb_furn_chair_acc = 'FB_FURN_CHAIR_ACC' + fb_furn_divide = 'FB_FURN_DIVIDE' + fb_furn_divide_acc = 'FB_FURN_DIVIDE_ACC' + fb_furn_ent_ctr = 'FB_FURN_ENT_CTR' + fb_furn_futn = 'FB_FURN_FUTN' + fb_furn_futn_pad = 'FB_FURN_FUTN_PAD' + fb_furn_office = 'FB_FURN_OFFICE' + fb_furn_office_acc = 'FB_FURN_OFFICE_ACC' + fb_furn_otto = 'FB_FURN_OTTO' + fb_furn_outdoor = 'FB_FURN_OUTDOOR' + fb_furn_outdoor_acc = 'FB_FURN_OUTDOOR_ACC' + fb_furn_sets = 'FB_FURN_SETS' + fb_furn_shelve_acc = 'FB_FURN_SHELVE_ACC' + fb_furn_shlf = 'FB_FURN_SHLF' + fb_furn_sofa = 'FB_FURN_SOFA' + fb_furn_sofa_acc = 'FB_FURN_SOFA_ACC' + fb_furn_storage = 'FB_FURN_STORAGE' + fb_furn_tabl = 'FB_FURN_TABL' + fb_furn_tabl_acc = 'FB_FURN_TABL_ACC' + fb_generic_taxable = 'FB_GENERIC_TAXABLE' + fb_hlth = 'FB_HLTH' + fb_hlth_hlth = 'FB_HLTH_HLTH' + fb_hlth_jwl_cr = 'FB_HLTH_JWL_CR' + fb_hlth_lilp_blm = 'FB_HLTH_LILP_BLM' + fb_hlth_ltn_spf = 'FB_HLTH_LTN_SPF' + fb_hlth_prsl_cr = 'FB_HLTH_PRSL_CR' + fb_hlth_skn_cr = 'FB_HLTH_SKN_CR' + fb_hmgn = 'FB_HMGN' + fb_hmgn_bath = 'FB_HMGN_BATH' + fb_hmgn_dcor = 'FB_HMGN_DCOR' + fb_hmgn_emgy = 'FB_HMGN_EMGY' + fb_hmgn_fplc = 'FB_HMGN_FPLC' + fb_hmgn_fplc_acc = 'FB_HMGN_FPLC_ACC' + fb_hmgn_gs_sft = 'FB_HMGN_GS_SFT' + fb_hmgn_hs_acc = 'FB_HMGN_HS_ACC' + fb_hmgn_hs_app = 'FB_HMGN_HS_APP' + fb_hmgn_hs_spl = 'FB_HMGN_HS_SPL' + fb_hmgn_ktcn = 'FB_HMGN_KTCN' + fb_hmgn_lawn = 'FB_HMGN_LAWN' + fb_hmgn_lght = 'FB_HMGN_LGHT' + fb_hmgn_linn = 'FB_HMGN_LINN' + fb_hmgn_lt_acc = 'FB_HMGN_LT_ACC' + fb_hmgn_otdr = 'FB_HMGN_OTDR' + fb_hmgn_pool = 'FB_HMGN_POOL' + fb_hmgn_scty = 'FB_HMGN_SCTY' + fb_hmgn_smk_acc = 'FB_HMGN_SMK_ACC' + fb_hmgn_umbr = 'FB_HMGN_UMBR' + fb_hmgn_umbr_acc = 'FB_HMGN_UMBR_ACC' + fb_mdia = 'FB_MDIA' + fb_mdia_book = 'FB_MDIA_BOOK' + fb_mdia_dvds = 'FB_MDIA_DVDS' + fb_mdia_mag = 'FB_MDIA_MAG' + fb_mdia_manl = 'FB_MDIA_MANL' + fb_mdia_musc = 'FB_MDIA_MUSC' + fb_mdia_prj_pln = 'FB_MDIA_PRJ_PLN' + fb_mdia_sht_mus = 'FB_MDIA_SHT_MUS' + fb_offc = 'FB_OFFC' + fb_offc_bkac = 'FB_OFFC_BKAC' + fb_offc_crts = 'FB_OFFC_CRTS' + fb_offc_dskp = 'FB_OFFC_DSKP' + fb_offc_eqip = 'FB_OFFC_EQIP' + fb_offc_flng = 'FB_OFFC_FLNG' + fb_offc_gnrl = 'FB_OFFC_GNRL' + fb_offc_instm = 'FB_OFFC_INSTM' + fb_offc_lp_dsk = 'FB_OFFC_LP_DSK' + fb_offc_mats = 'FB_OFFC_MATS' + fb_offc_nm_plt = 'FB_OFFC_NM_PLT' + fb_offc_ppr_hndl = 'FB_OFFC_PPR_HNDL' + fb_offc_prsnt_spl = 'FB_OFFC_PRSNT_SPL' + fb_offc_sealr = 'FB_OFFC_SEALR' + fb_offc_ship_spl = 'FB_OFFC_SHIP_SPL' + fb_rlgn = 'FB_RLGN' + fb_rlgn_cmny = 'FB_RLGN_CMNY' + fb_rlgn_item = 'FB_RLGN_ITEM' + fb_rlgn_wedd = 'FB_RLGN_WEDD' + fb_sftwr = 'FB_SFTWR' + fb_sfwr_cmptr = 'FB_SFWR_CMPTR' + fb_sfwr_dgtl_gd = 'FB_SFWR_DGTL_GD' + fb_sfwr_game = 'FB_SFWR_GAME' + fb_shipping = 'FB_SHIPPING' + fb_spor = 'FB_SPOR' + fb_sport_athl = 'FB_SPORT_ATHL' + fb_sport_athl_clth = 'FB_SPORT_ATHL_CLTH' + fb_sport_athl_shoe = 'FB_SPORT_ATHL_SHOE' + fb_sport_athl_sprt = 'FB_SPORT_ATHL_SPRT' + fb_sport_exrcs = 'FB_SPORT_EXRCS' + fb_sport_indr_gm = 'FB_SPORT_INDR_GM' + fb_sport_otdr_gm = 'FB_SPORT_OTDR_GM' + fb_toys = 'FB_TOYS' + fb_toys_eqip = 'FB_TOYS_EQIP' + fb_toys_game = 'FB_TOYS_GAME' + fb_toys_pzzl = 'FB_TOYS_PZZL' + fb_toys_tmrs = 'FB_TOYS_TMRS' + fb_toys_toys = 'FB_TOYS_TOYS' + fb_vehi = 'FB_VEHI' + fb_vehi_part = 'FB_VEHI_PART' + + class ErrorPriority: + high = 'HIGH' + low = 'LOW' + medium = 'MEDIUM' + + class ErrorType: + address_blocklisted_in_market = 'ADDRESS_BLOCKLISTED_IN_MARKET' + ar_deleted_due_to_update = 'AR_DELETED_DUE_TO_UPDATE' + ar_policy_violated = 'AR_POLICY_VIOLATED' + available = 'AVAILABLE' + bad_quality_image = 'BAD_QUALITY_IMAGE' + biz_msg_ai_agent_disabled_by_user = 'BIZ_MSG_AI_AGENT_DISABLED_BY_USER' + cannot_edit_subscription_products = 'CANNOT_EDIT_SUBSCRIPTION_PRODUCTS' + checkout_disabled_by_user = 'CHECKOUT_DISABLED_BY_USER' + 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' + 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_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' + hidden_until_product_launch = 'HIDDEN_UNTIL_PRODUCT_LAUNCH' + 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' + image_fetch_failed_forbidden = 'IMAGE_FETCH_FAILED_FORBIDDEN' + image_fetch_failed_link_broken = 'IMAGE_FETCH_FAILED_LINK_BROKEN' + image_fetch_failed_timed_out = 'IMAGE_FETCH_FAILED_TIMED_OUT' + 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_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_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_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' + overlay_disclaimer_exceeded_max_length = 'OVERLAY_DISCLAIMER_EXCEEDED_MAX_LENGTH' + part_of_product_launch = 'PART_OF_PRODUCT_LAUNCH' + 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' + product_not_dominant_currency = 'PRODUCT_NOT_DOMINANT_CURRENCY' + product_out_of_stock = 'PRODUCT_OUT_OF_STOCK' + product_url_equals_domain = 'PRODUCT_URL_EQUALS_DOMAIN' + 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' + property_value_missing = 'PROPERTY_VALUE_MISSING' + property_value_missing_warning = 'PROPERTY_VALUE_MISSING_WARNING' + 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' + 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' + 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' + marked = 'marked' + not_marked = 'not_marked' + + class OriginCountry: + ad = 'AD' + ae = 'AE' + af = 'AF' + ag = 'AG' + ai = 'AI' + al = 'AL' + am = 'AM' + an = 'AN' + ao = 'AO' + aq = 'AQ' + ar = 'AR' + value_as = 'AS' + at = 'AT' + au = 'AU' + aw = 'AW' + ax = 'AX' + az = 'AZ' + ba = 'BA' + bb = 'BB' + bd = 'BD' + be = 'BE' + bf = 'BF' + bg = 'BG' + bh = 'BH' + bi = 'BI' + bj = 'BJ' + bl = 'BL' + bm = 'BM' + bn = 'BN' + bo = 'BO' + bq = 'BQ' + br = 'BR' + bs = 'BS' + bt = 'BT' + bv = 'BV' + bw = 'BW' + by = 'BY' + bz = 'BZ' + ca = 'CA' + cc = 'CC' + cd = 'CD' + cf = 'CF' + cg = 'CG' + ch = 'CH' + ci = 'CI' + ck = 'CK' + cl = 'CL' + cm = 'CM' + cn = 'CN' + co = 'CO' + cr = 'CR' + cu = 'CU' + cv = 'CV' + cw = 'CW' + cx = 'CX' + cy = 'CY' + cz = 'CZ' + de = 'DE' + dj = 'DJ' + dk = 'DK' + dm = 'DM' + do = 'DO' + dz = 'DZ' + ec = 'EC' + ee = 'EE' + eg = 'EG' + eh = 'EH' + er = 'ER' + es = 'ES' + et = 'ET' + fi = 'FI' + fj = 'FJ' + fk = 'FK' + fm = 'FM' + fo = 'FO' + fr = 'FR' + ga = 'GA' + gb = 'GB' + gd = 'GD' + ge = 'GE' + gf = 'GF' + gg = 'GG' + gh = 'GH' + gi = 'GI' + gl = 'GL' + gm = 'GM' + gn = 'GN' + gp = 'GP' + gq = 'GQ' + gr = 'GR' + gs = 'GS' + gt = 'GT' + gu = 'GU' + gw = 'GW' + gy = 'GY' + hk = 'HK' + hm = 'HM' + hn = 'HN' + hr = 'HR' + ht = 'HT' + hu = 'HU' + id = 'ID' + ie = 'IE' + il = 'IL' + im = 'IM' + value_in = 'IN' + io = 'IO' + iq = 'IQ' + ir = 'IR' + value_is = 'IS' + it = 'IT' + je = 'JE' + jm = 'JM' + jo = 'JO' + jp = 'JP' + ke = 'KE' + kg = 'KG' + kh = 'KH' + ki = 'KI' + km = 'KM' + kn = 'KN' + kp = 'KP' + kr = 'KR' + kw = 'KW' + ky = 'KY' + kz = 'KZ' + la = 'LA' + lb = 'LB' + lc = 'LC' + li = 'LI' + lk = 'LK' + lr = 'LR' + ls = 'LS' + lt = 'LT' + lu = 'LU' + lv = 'LV' + ly = 'LY' + ma = 'MA' + mc = 'MC' + md = 'MD' + me = 'ME' + mf = 'MF' + mg = 'MG' + mh = 'MH' + mk = 'MK' + ml = 'ML' + mm = 'MM' + mn = 'MN' + mo = 'MO' + mp = 'MP' + mq = 'MQ' + mr = 'MR' + ms = 'MS' + mt = 'MT' + mu = 'MU' + mv = 'MV' + mw = 'MW' + mx = 'MX' + my = 'MY' + mz = 'MZ' + na = 'NA' + nc = 'NC' + ne = 'NE' + nf = 'NF' + ng = 'NG' + ni = 'NI' + nl = 'NL' + no = 'NO' + np = 'NP' + nr = 'NR' + nu = 'NU' + nz = 'NZ' + om = 'OM' + pa = 'PA' + pe = 'PE' + pf = 'PF' + pg = 'PG' + ph = 'PH' + pk = 'PK' + pl = 'PL' + pm = 'PM' + pn = 'PN' + pr = 'PR' + ps = 'PS' + pt = 'PT' + pw = 'PW' + py = 'PY' + qa = 'QA' + re = 'RE' + ro = 'RO' + rs = 'RS' + ru = 'RU' + rw = 'RW' + sa = 'SA' + sb = 'SB' + sc = 'SC' + sd = 'SD' + se = 'SE' + sg = 'SG' + sh = 'SH' + si = 'SI' + sj = 'SJ' + sk = 'SK' + sl = 'SL' + sm = 'SM' + sn = 'SN' + so = 'SO' + sr = 'SR' + ss = 'SS' + st = 'ST' + sv = 'SV' + sx = 'SX' + sy = 'SY' + sz = 'SZ' + tc = 'TC' + td = 'TD' + tf = 'TF' + tg = 'TG' + th = 'TH' + tj = 'TJ' + tk = 'TK' + tl = 'TL' + tm = 'TM' + tn = 'TN' + to = 'TO' + tr = 'TR' + tt = 'TT' + tv = 'TV' + tw = 'TW' + tz = 'TZ' + ua = 'UA' + ug = 'UG' + um = 'UM' + us = 'US' + uy = 'UY' + uz = 'UZ' + va = 'VA' + vc = 'VC' + ve = 'VE' + vg = 'VG' + vi = 'VI' + vn = 'VN' + vu = 'VU' + wf = 'WF' + ws = 'WS' + xk = 'XK' + ye = 'YE' + yt = 'YT' + za = 'ZA' + zm = 'ZM' + zw = 'ZW' + + class WaComplianceCategory: + country_origin_exempt = 'COUNTRY_ORIGIN_EXEMPT' + value_default = 'DEFAULT' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'products' + + # @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_product(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 + if batch 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 = { + 'catalog_id': 'string', + 'image_height': 'unsigned int', + 'image_width': 'unsigned int', + 'override_country': 'string', + 'override_language': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItem, + 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 = { + 'additional_image_urls': 'list', + 'additional_uploaded_image_ids': 'list', + 'additional_variant_attributes': 'map', + 'android_app_name': 'string', + 'android_class': 'string', + 'android_package': 'string', + 'android_url': 'string', + 'availability': 'availability_enum', + 'brand': 'string', + 'category': 'string', + 'category_specific_fields': 'map', + 'checkout_url': 'string', + 'color': 'string', + 'commerce_tax_category': 'commerce_tax_category_enum', + 'condition': 'condition_enum', + 'currency': 'string', + 'custom_data': 'map', + 'custom_label_0': 'string', + 'custom_label_1': 'string', + 'custom_label_2': 'string', + 'custom_label_3': 'string', + 'custom_label_4': 'string', + 'custom_number_0': 'unsigned int', + 'custom_number_1': 'unsigned int', + 'custom_number_2': 'unsigned int', + 'custom_number_3': 'unsigned int', + 'custom_number_4': 'unsigned int', + 'description': 'string', + 'expiration_date': 'string', + 'fb_product_category': 'string', + 'gender': 'gender_enum', + 'gtin': 'string', + 'image_url': 'string', + 'importer_address': 'map', + 'importer_name': 'string', + 'inventory': 'unsigned int', + 'ios_app_name': 'string', + 'ios_app_store_id': 'unsigned int', + 'ios_url': 'string', + 'ipad_app_name': 'string', + 'ipad_app_store_id': 'unsigned int', + 'ipad_url': 'string', + 'iphone_app_name': 'string', + 'iphone_app_store_id': 'unsigned int', + 'iphone_url': 'string', + 'launch_date': 'string', + 'manufacturer_info': 'string', + 'manufacturer_part_number': 'string', + 'marked_for_product_launch': 'marked_for_product_launch_enum', + 'material': 'string', + 'mobile_link': 'string', + 'name': 'string', + 'ordering_index': 'unsigned int', + 'origin_country': 'origin_country_enum', + 'pattern': 'string', + 'price': 'unsigned int', + 'product_type': 'string', + 'quantity_to_sell_on_facebook': 'unsigned int', + 'retailer_id': 'string', + 'return_policy_days': 'unsigned int', + 'sale_price': 'unsigned int', + 'sale_price_end_date': 'datetime', + 'sale_price_start_date': 'datetime', + 'short_description': 'string', + 'size': 'string', + 'start_date': 'string', + 'url': 'string', + 'visibility': 'visibility_enum', + 'wa_compliance_category': 'wa_compliance_category_enum', + 'windows_phone_app_id': 'string', + 'windows_phone_app_name': 'string', + 'windows_phone_url': 'string', + } + enums = { + 'availability_enum': ProductItem.Availability.__dict__.values(), + 'commerce_tax_category_enum': ProductItem.CommerceTaxCategory.__dict__.values(), + 'condition_enum': ProductItem.Condition.__dict__.values(), + 'gender_enum': ProductItem.Gender.__dict__.values(), + 'marked_for_product_launch_enum': ProductItem.MarkedForProductLaunch.__dict__.values(), + 'origin_country_enum': ProductItem.OriginCountry.__dict__.values(), + 'visibility_enum': ProductItem.Visibility.__dict__.values(), + 'wa_compliance_category_enum': ProductItem.WaComplianceCategory.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItem, + 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() + + def get_product_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.productset import ProductSet + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_sets', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductSet, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductSet, 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 = { + 'additional_image_cdn_urls': 'list>>', + 'additional_image_urls': 'list', + 'additional_variant_attributes': 'list>', + 'age_group': 'AgeGroup', + 'applinks': 'CatalogItemAppLinks', + 'availability': 'Availability', + 'brand': 'string', + 'capability_to_review_status': 'list>', + 'category': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'color': 'string', + 'commerce_insights': 'ProductItemCommerceInsights', + 'condition': 'Condition', + 'currency': 'string', + 'custom_data': 'list>', + 'custom_label_0': 'string', + 'custom_label_1': 'string', + 'custom_label_2': 'string', + 'custom_label_3': 'string', + 'custom_label_4': 'string', + 'custom_number_0': 'string', + 'custom_number_1': 'string', + 'custom_number_2': 'string', + 'custom_number_3': 'string', + 'custom_number_4': 'string', + 'description': 'string', + 'errors': 'list', + 'expiration_date': 'string', + 'fb_product_category': 'string', + 'gender': 'Gender', + 'gtin': 'string', + 'id': 'string', + 'image_cdn_urls': 'list>', + 'image_fetch_status': 'ImageFetchStatus', + 'image_url': 'string', + 'images': 'list', + 'importer_address': 'ProductItemImporterAddress', + 'importer_name': 'string', + 'invalidation_errors': 'list', + 'inventory': 'int', + 'manufacturer_info': 'string', + 'manufacturer_part_number': 'string', + 'marked_for_product_launch': 'string', + 'material': 'string', + 'mobile_link': 'string', + 'name': 'string', + 'ordering_index': 'int', + 'origin_country': 'string', + 'parent_product_id': 'string', + 'pattern': 'string', + 'post_conversion_signal_based_enforcement_appeal_eligibility': 'bool', + 'price': 'string', + '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', + 'retailer_product_group_id': 'string', + 'review_rejection_reasons': 'list', + 'review_status': 'ReviewStatus', + 'sale_price': 'string', + 'sale_price_end_date': 'string', + 'sale_price_start_date': 'string', + 'shipping_weight_unit': 'ShippingWeightUnit', + 'shipping_weight_value': 'float', + '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', + 'android_app_name': 'string', + 'android_class': 'string', + 'android_package': 'string', + 'android_url': 'string', + 'checkout_url': 'string', + 'commerce_tax_category': 'CommerceTaxCategory', + 'ios_app_name': 'string', + 'ios_app_store_id': 'unsigned int', + 'ios_url': 'string', + 'ipad_app_name': 'string', + 'ipad_app_store_id': 'unsigned int', + 'ipad_url': 'string', + 'iphone_app_name': 'string', + 'iphone_app_store_id': 'unsigned int', + 'iphone_url': 'string', + 'launch_date': 'string', + 'return_policy_days': 'unsigned int', + 'windows_phone_app_id': 'string', + 'windows_phone_app_name': 'string', + 'windows_phone_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['AgeGroup'] = ProductItem.AgeGroup.__dict__.values() + field_enum_info['Availability'] = ProductItem.Availability.__dict__.values() + field_enum_info['Condition'] = ProductItem.Condition.__dict__.values() + field_enum_info['Gender'] = ProductItem.Gender.__dict__.values() + 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() + field_enum_info['ErrorType'] = ProductItem.ErrorType.__dict__.values() + field_enum_info['MarkedForProductLaunch'] = ProductItem.MarkedForProductLaunch.__dict__.values() + field_enum_info['OriginCountry'] = ProductItem.OriginCountry.__dict__.values() + field_enum_info['WaComplianceCategory'] = ProductItem.WaComplianceCategory.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productitemcommerceinsights.py b/tap_facebook/facebook_business/adobjects/productitemcommerceinsights.py new file mode 100644 index 0000000..0f15e16 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productitemcommerceinsights.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 ProductItemCommerceInsights( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemCommerceInsights, self).__init__() + self._isProductItemCommerceInsights = True + self._api = api + + class Field(AbstractObject.Field): + message_sends = 'message_sends' + organic_impressions = 'organic_impressions' + paid_impressions = 'paid_impressions' + + _field_types = { + 'message_sends': 'unsigned int', + 'organic_impressions': 'unsigned int', + 'paid_impressions': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productitemerror.py b/tap_facebook/facebook_business/adobjects/productitemerror.py new file mode 100644 index 0000000..9e0b5f8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productitemerror.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 ProductItemError( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemError, self).__init__() + self._isProductItemError = True + self._api = api + + class Field(AbstractObject.Field): + description = 'description' + error_priority = 'error_priority' + error_type = 'error_type' + title = 'title' + + _field_types = { + 'description': 'string', + 'error_priority': 'string', + 'error_type': 'string', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productitemimporteraddress.py b/tap_facebook/facebook_business/adobjects/productitemimporteraddress.py new file mode 100644 index 0000000..1b1ae88 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productitemimporteraddress.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 ProductItemImporterAddress( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemImporterAddress, self).__init__() + self._isProductItemImporterAddress = True + self._api = api + + class Field(AbstractObject.Field): + city = 'city' + country = 'country' + postal_code = 'postal_code' + region = 'region' + street1 = 'street1' + street2 = 'street2' + + _field_types = { + 'city': 'string', + 'country': 'string', + 'postal_code': 'string', + 'region': 'string', + 'street1': 'string', + 'street2': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productitemlocalinfo.py b/tap_facebook/facebook_business/adobjects/productitemlocalinfo.py new file mode 100644 index 0000000..d8b2bf2 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/productitemlocalinfolatlongshape.py b/tap_facebook/facebook_business/adobjects/productitemlocalinfolatlongshape.py new file mode 100644 index 0000000..c4e5d5a --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/productset.py b/tap_facebook/facebook_business/adobjects/productset.py new file mode 100644 index 0000000..ed8e791 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productset.py @@ -0,0 +1,470 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 ProductSet( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductSet = True + super(ProductSet, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + auto_creation_url = 'auto_creation_url' + filter = 'filter' + id = 'id' + latest_metadata = 'latest_metadata' + live_metadata = 'live_metadata' + name = 'name' + ordering_info = 'ordering_info' + product_catalog = 'product_catalog' + product_count = 'product_count' + retailer_id = 'retailer_id' + metadata = 'metadata' + publish_to_shops = 'publish_to_shops' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'product_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.productcatalog import ProductCatalog + return ProductCatalog(api=self._api, fbid=parent_id).create_product_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 = { + 'allow_live_product_set_deletion': 'bool', + } + 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=ProductSet, + 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 = { + 'filter': 'Object', + 'metadata': 'map', + 'name': 'string', + 'ordering_info': 'list', + 'publish_to_shops': 'list', + 'retailer_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductSet, + 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_automotive_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.') + from facebook_business.adobjects.automotivemodel import AutomotiveModel + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/automotive_models', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AutomotiveModel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AutomotiveModel, 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_destinations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.destination import Destination + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/destinations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Destination, + api_type='EDGE', + response_parser=ObjectParser(target_class=Destination, 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_flights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.flight import Flight + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/flights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Flight, + api_type='EDGE', + response_parser=ObjectParser(target_class=Flight, 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_home_listings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.homelisting import HomeListing + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/home_listings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HomeListing, + api_type='EDGE', + response_parser=ObjectParser(target_class=HomeListing, 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_hotels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.hotel import Hotel + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/hotels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Hotel, + api_type='EDGE', + response_parser=ObjectParser(target_class=Hotel, 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_titles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.mediatitle import MediaTitle + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/media_titles', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MediaTitle, + api_type='EDGE', + response_parser=ObjectParser(target_class=MediaTitle, 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productitem import ProductItem + param_types = { + 'bulk_pagination': 'bool', + 'error_priority': 'error_priority_enum', + 'error_type': 'error_type_enum', + 'filter': 'Object', + } + enums = { + 'error_priority_enum': ProductItem.ErrorPriority.__dict__.values(), + 'error_type_enum': ProductItem.ErrorType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/products', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItem, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductItem, 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_vehicle_offers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.vehicleoffer import VehicleOffer + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/vehicle_offers', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VehicleOffer, + api_type='EDGE', + response_parser=ObjectParser(target_class=VehicleOffer, 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_vehicles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.vehicle import Vehicle + param_types = { + 'bulk_pagination': 'bool', + 'filter': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/vehicles', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Vehicle, + api_type='EDGE', + response_parser=ObjectParser(target_class=Vehicle, 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_creation_url': 'string', + 'filter': 'string', + 'id': 'string', + 'latest_metadata': 'ProductSetMetadata', + 'live_metadata': 'ProductSetMetadata', + 'name': 'string', + 'ordering_info': 'list', + 'product_catalog': 'ProductCatalog', + 'product_count': 'unsigned int', + 'retailer_id': 'string', + 'metadata': 'map', + 'publish_to_shops': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productsetmetadata.py b/tap_facebook/facebook_business/adobjects/productsetmetadata.py new file mode 100644 index 0000000..9a3977f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productsetmetadata.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 ProductSetMetadata( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductSetMetadata, self).__init__() + self._isProductSetMetadata = True + self._api = api + + class Field(AbstractObject.Field): + cover_image_url = 'cover_image_url' + description = 'description' + external_url = 'external_url' + integrity_review_status = 'integrity_review_status' + + _field_types = { + 'cover_image_url': 'string', + 'description': 'string', + 'external_url': 'string', + 'integrity_review_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/productvariant.py b/tap_facebook/facebook_business/adobjects/productvariant.py new file mode 100644 index 0000000..e20ec91 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/productvariant.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 ProductVariant( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductVariant, self).__init__() + self._isProductVariant = True + self._api = api + + class Field(AbstractObject.Field): + label = 'label' + options = 'options' + product_field = 'product_field' + + _field_types = { + 'label': 'string', + 'options': 'list', + 'product_field': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/profile.py b/tap_facebook/facebook_business/adobjects/profile.py new file mode 100644 index 0000000..db55e73 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/profile.py @@ -0,0 +1,149 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Profile( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProfile = True + super(Profile, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + can_post = 'can_post' + id = 'id' + link = 'link' + name = 'name' + pic = 'pic' + pic_crop = 'pic_crop' + pic_large = 'pic_large' + pic_small = 'pic_small' + pic_square = 'pic_square' + profile_type = 'profile_type' + username = 'username' + + class ProfileType: + application = 'application' + event = 'event' + group = 'group' + page = 'page' + user = 'user' + + class Type: + angry = 'ANGRY' + care = 'CARE' + fire = 'FIRE' + haha = 'HAHA' + hundred = 'HUNDRED' + like = 'LIKE' + love = 'LOVE' + none = 'NONE' + pride = 'PRIDE' + sad = 'SAD' + thankful = 'THANKFUL' + wow = 'WOW' + + 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=Profile, + 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profilepicturesource import ProfilePictureSource + param_types = { + 'height': 'int', + 'redirect': 'bool', + 'type': 'type_enum', + 'width': 'int', + } + enums = { + 'type_enum': ProfilePictureSource.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/picture', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProfilePictureSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProfilePictureSource, 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 = { + 'can_post': 'bool', + 'id': 'string', + 'link': 'string', + 'name': 'string', + 'pic': 'string', + 'pic_crop': 'ProfilePictureSource', + 'pic_large': 'string', + 'pic_small': 'string', + 'pic_square': 'string', + 'profile_type': 'ProfileType', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ProfileType'] = Profile.ProfileType.__dict__.values() + field_enum_info['Type'] = Profile.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/profilepicturesource.py b/tap_facebook/facebook_business/adobjects/profilepicturesource.py new file mode 100644 index 0000000..e46a1c4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/profilepicturesource.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 ProfilePictureSource( + AbstractObject, +): + + def __init__(self, api=None): + super(ProfilePictureSource, self).__init__() + self._isProfilePictureSource = True + self._api = api + + class Field(AbstractObject.Field): + bottom = 'bottom' + cache_key = 'cache_key' + height = 'height' + is_silhouette = 'is_silhouette' + left = 'left' + right = 'right' + top = 'top' + url = 'url' + width = 'width' + + class Type: + album = 'album' + small = 'small' + thumbnail = 'thumbnail' + + _field_types = { + 'bottom': 'unsigned int', + 'cache_key': 'string', + 'height': 'unsigned int', + 'is_silhouette': 'bool', + 'left': 'unsigned int', + 'right': 'unsigned int', + 'top': 'unsigned int', + 'url': 'string', + 'width': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Type'] = ProfilePictureSource.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/publisherblocklist.py b/tap_facebook/facebook_business/adobjects/publisherblocklist.py new file mode 100644 index 0000000..43642bd --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/publisherblocklist.py @@ -0,0 +1,224 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 PublisherBlockList( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPublisherBlockList = True + super(PublisherBlockList, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + app_publishers = 'app_publishers' + business_owner_id = 'business_owner_id' + id = 'id' + is_auto_blocking_on = 'is_auto_blocking_on' + is_eligible_at_campaign_level = 'is_eligible_at_campaign_level' + last_update_time = 'last_update_time' + last_update_user = 'last_update_user' + name = 'name' + owner_ad_account_id = 'owner_ad_account_id' + web_publishers = 'web_publishers' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'publisher_block_lists' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_publisher_block_list(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 + if batch 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', + 'business_id': 'string', + 'draft_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PublisherBlockList, + 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 = { + 'spec': 'Object', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PublisherBlockList, + 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_app_end_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.') + param_types = { + 'publisher_urls': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/append_publisher_urls', + 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_paged_web_publishers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'draft_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/paged_web_publishers', + 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 = { + 'app_publishers': 'list', + 'business_owner_id': 'string', + 'id': 'string', + 'is_auto_blocking_on': 'bool', + 'is_eligible_at_campaign_level': 'bool', + 'last_update_time': 'datetime', + 'last_update_user': 'string', + 'name': 'string', + 'owner_ad_account_id': 'string', + 'web_publishers': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/rawcustomaudience.py b/tap_facebook/facebook_business/adobjects/rawcustomaudience.py new file mode 100644 index 0000000..ea2bc1a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/rawcustomaudience.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 RawCustomAudience( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isRawCustomAudience = True + super(RawCustomAudience, 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/tap_facebook/facebook_business/adobjects/reachfrequencyactivity.py b/tap_facebook/facebook_business/adobjects/reachfrequencyactivity.py new file mode 100644 index 0000000..05782fb --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencyactivity.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 ReachFrequencyActivity( + AbstractObject, +): + + def __init__(self, api=None): + super(ReachFrequencyActivity, self).__init__() + self._isReachFrequencyActivity = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + campaign_active = 'campaign_active' + campaign_started = 'campaign_started' + creative_uploaded = 'creative_uploaded' + io_approved = 'io_approved' + sf_link = 'sf_link' + + _field_types = { + 'account_id': 'string', + 'campaign_active': 'bool', + 'campaign_started': 'bool', + 'creative_uploaded': 'bool', + 'io_approved': 'bool', + 'sf_link': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyadformat.py b/tap_facebook/facebook_business/adobjects/reachfrequencyadformat.py new file mode 100644 index 0000000..2be4db0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencyadformat.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 ReachFrequencyAdFormat( + AbstractObject, +): + + def __init__(self, api=None): + super(ReachFrequencyAdFormat, self).__init__() + self._isReachFrequencyAdFormat = True + self._api = api + + class Field(AbstractObject.Field): + details = 'details' + type = 'type' + + _field_types = { + 'details': 'Object', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py b/tap_facebook/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py new file mode 100644 index 0000000..8aa49e7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.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 ReachFrequencyCurveLowerConfidenceRange( + AbstractObject, +): + + def __init__(self, api=None): + super(ReachFrequencyCurveLowerConfidenceRange, self).__init__() + self._isReachFrequencyCurveLowerConfidenceRange = True + self._api = api + + class Field(AbstractObject.Field): + impression_lower = 'impression_lower' + num_points = 'num_points' + reach = 'reach' + reach_lower = 'reach_lower' + uniq_video_views_2s_lower = 'uniq_video_views_2s_lower' + video_views_2s_lower = 'video_views_2s_lower' + + _field_types = { + 'impression_lower': 'list', + 'num_points': 'unsigned int', + 'reach': 'list', + 'reach_lower': 'list', + 'uniq_video_views_2s_lower': 'list', + 'video_views_2s_lower': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py b/tap_facebook/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py new file mode 100644 index 0000000..d2868f9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.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 ReachFrequencyCurveUpperConfidenceRange( + AbstractObject, +): + + def __init__(self, api=None): + super(ReachFrequencyCurveUpperConfidenceRange, self).__init__() + self._isReachFrequencyCurveUpperConfidenceRange = True + self._api = api + + class Field(AbstractObject.Field): + impression_upper = 'impression_upper' + num_points = 'num_points' + reach = 'reach' + reach_upper = 'reach_upper' + uniq_video_views_2s_upper = 'uniq_video_views_2s_upper' + video_views_2s_upper = 'video_views_2s_upper' + + _field_types = { + 'impression_upper': 'list', + 'num_points': 'unsigned int', + 'reach': 'list', + 'reach_upper': 'list', + 'uniq_video_views_2s_upper': 'list', + 'video_views_2s_upper': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencydaypart.py b/tap_facebook/facebook_business/adobjects/reachfrequencydaypart.py new file mode 100644 index 0000000..b59493d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencydaypart.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 ReachFrequencyDayPart( + AbstractObject, +): + + def __init__(self, api=None): + super(ReachFrequencyDayPart, self).__init__() + self._isReachFrequencyDayPart = True + self._api = api + + class Field(AbstractObject.Field): + days = 'days' + end_minute = 'end_minute' + start_minute = 'start_minute' + + _field_types = { + 'days': 'list', + 'end_minute': 'int', + 'start_minute': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyestimatescurve.py b/tap_facebook/facebook_business/adobjects/reachfrequencyestimatescurve.py new file mode 100644 index 0000000..cca3c2d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencyestimatescurve.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 ReachFrequencyEstimatesCurve( + AbstractObject, +): + + def __init__(self, api=None): + super(ReachFrequencyEstimatesCurve, self).__init__() + self._isReachFrequencyEstimatesCurve = True + self._api = api + + class Field(AbstractObject.Field): + budget = 'budget' + conversion = 'conversion' + impression = 'impression' + interpolated_reach = 'interpolated_reach' + num_points = 'num_points' + raw_impression = 'raw_impression' + raw_reach = 'raw_reach' + reach = 'reach' + + _field_types = { + 'budget': 'list', + 'conversion': 'list', + 'impression': 'list', + 'interpolated_reach': 'float', + 'num_points': 'unsigned int', + 'raw_impression': 'list', + 'raw_reach': 'list', + 'reach': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py b/tap_facebook/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py new file mode 100644 index 0000000..898c1aa --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.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 ReachFrequencyEstimatesPlacementBreakdown( + AbstractObject, +): + + def __init__(self, api=None): + super(ReachFrequencyEstimatesPlacementBreakdown, self).__init__() + self._isReachFrequencyEstimatesPlacementBreakdown = True + self._api = api + + class Field(AbstractObject.Field): + android = 'android' + audience_network = 'audience_network' + desktop = 'desktop' + facebook_search = 'facebook_search' + fb_reels = 'fb_reels' + fb_reels_overlay = 'fb_reels_overlay' + ig_android = 'ig_android' + ig_ios = 'ig_ios' + ig_other = 'ig_other' + ig_reels = 'ig_reels' + ig_story = 'ig_story' + instant_articles = 'instant_articles' + instream_videos = 'instream_videos' + ios = 'ios' + msite = 'msite' + suggested_videos = 'suggested_videos' + + _field_types = { + 'android': 'list', + 'audience_network': 'list', + 'desktop': 'list', + 'facebook_search': 'list', + 'fb_reels': 'list', + 'fb_reels_overlay': 'list', + 'ig_android': 'list', + 'ig_ios': 'list', + 'ig_other': 'list', + 'ig_reels': 'list', + 'ig_story': 'list', + 'instant_articles': 'list', + 'instream_videos': 'list', + 'ios': 'list', + 'msite': 'list', + 'suggested_videos': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyprediction.py b/tap_facebook/facebook_business/adobjects/reachfrequencyprediction.py new file mode 100644 index 0000000..cdfd508 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencyprediction.py @@ -0,0 +1,323 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 +from facebook_business.adobjects.helpers.reachfrequencypredictionmixin import ReachFrequencyPredictionMixin + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class ReachFrequencyPrediction( + ReachFrequencyPredictionMixin, + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isReachFrequencyPrediction = True + super(ReachFrequencyPrediction, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + activity_status = 'activity_status' + ad_formats = 'ad_formats' + auction_entry_option_index = 'auction_entry_option_index' + audience_size_lower_bound = 'audience_size_lower_bound' + audience_size_upper_bound = 'audience_size_upper_bound' + business_id = 'business_id' + buying_type = 'buying_type' + campaign_group_id = 'campaign_group_id' + campaign_id = 'campaign_id' + campaign_time_start = 'campaign_time_start' + campaign_time_stop = 'campaign_time_stop' + currency = 'currency' + curve_budget_reach = 'curve_budget_reach' + curve_reach = 'curve_reach' + daily_grp_curve = 'daily_grp_curve' + daily_impression_curve = 'daily_impression_curve' + daily_impression_curve_map = 'daily_impression_curve_map' + day_parting_schedule = 'day_parting_schedule' + destination_id = 'destination_id' + end_time = 'end_time' + expiration_time = 'expiration_time' + external_budget = 'external_budget' + external_impression = 'external_impression' + external_maximum_budget = 'external_maximum_budget' + external_maximum_impression = 'external_maximum_impression' + external_maximum_reach = 'external_maximum_reach' + external_minimum_budget = 'external_minimum_budget' + external_minimum_impression = 'external_minimum_impression' + external_minimum_reach = 'external_minimum_reach' + external_reach = 'external_reach' + feed_ratio_0000 = 'feed_ratio_0000' + frequency_cap = 'frequency_cap' + frequency_distribution_map = 'frequency_distribution_map' + frequency_distribution_map_agg = 'frequency_distribution_map_agg' + grp_audience_size = 'grp_audience_size' + grp_avg_probability_map = 'grp_avg_probability_map' + grp_country_audience_size = 'grp_country_audience_size' + grp_curve = 'grp_curve' + grp_dmas_audience_size = 'grp_dmas_audience_size' + grp_filtering_threshold_00 = 'grp_filtering_threshold_00' + grp_points = 'grp_points' + grp_ratio = 'grp_ratio' + grp_reach_ratio = 'grp_reach_ratio' + grp_status = 'grp_status' + holdout_percentage = 'holdout_percentage' + id = 'id' + impression_curve = 'impression_curve' + instagram_destination_id = 'instagram_destination_id' + instream_packages = 'instream_packages' + interval_frequency_cap = 'interval_frequency_cap' + interval_frequency_cap_reset_period = 'interval_frequency_cap_reset_period' + is_bonus_media = 'is_bonus_media' + is_conversion_goal = 'is_conversion_goal' + is_higher_average_frequency = 'is_higher_average_frequency' + is_io = 'is_io' + is_reserved_buying = 'is_reserved_buying' + is_trp = 'is_trp' + name = 'name' + objective = 'objective' + objective_name = 'objective_name' + odax_objective = 'odax_objective' + odax_objective_name = 'odax_objective_name' + optimization_goal = 'optimization_goal' + optimization_goal_name = 'optimization_goal_name' + pause_periods = 'pause_periods' + placement_breakdown = 'placement_breakdown' + placement_breakdown_map = 'placement_breakdown_map' + plan_name = 'plan_name' + plan_type = 'plan_type' + prediction_mode = 'prediction_mode' + prediction_progress = 'prediction_progress' + reference_id = 'reference_id' + reservation_status = 'reservation_status' + start_time = 'start_time' + status = 'status' + story_event_type = 'story_event_type' + target_cpm = 'target_cpm' + target_spec = 'target_spec' + time_created = 'time_created' + time_updated = 'time_updated' + timezone_id = 'timezone_id' + timezone_name = 'timezone_name' + topline_id = 'topline_id' + video_view_length_constraint = 'video_view_length_constraint' + viewtag = 'viewtag' + action = 'action' + budget = 'budget' + deal_id = 'deal_id' + destination_ids = 'destination_ids' + exceptions = 'exceptions' + 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' + reach = 'reach' + rf_prediction_id = 'rf_prediction_id' + 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' + quote = 'quote' + reserve = 'reserve' + + class BuyingType: + auction = 'AUCTION' + deprecated_reach_block = 'DEPRECATED_REACH_BLOCK' + fixed_cpm = 'FIXED_CPM' + mixed = 'MIXED' + reachblock = 'REACHBLOCK' + research_poll = 'RESEARCH_POLL' + reserved = 'RESERVED' + + class InstreamPackages: + beauty = 'BEAUTY' + entertainment = 'ENTERTAINMENT' + food = 'FOOD' + normal = 'NORMAL' + premium = 'PREMIUM' + regular_animals_pets = 'REGULAR_ANIMALS_PETS' + regular_food = 'REGULAR_FOOD' + regular_games = 'REGULAR_GAMES' + regular_politics = 'REGULAR_POLITICS' + regular_sports = 'REGULAR_SPORTS' + regular_style = 'REGULAR_STYLE' + regular_tv_movies = 'REGULAR_TV_MOVIES' + spanish = 'SPANISH' + sports = 'SPORTS' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'reachfrequencypredictions' + + # @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.adaccount import AdAccount + return AdAccount(api=self._api, fbid=parent_id).create_reach_frequency_prediction(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=ReachFrequencyPrediction, + 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': 'int', + 'activity_status': 'ReachFrequencyActivity', + 'ad_formats': 'list', + 'auction_entry_option_index': 'int', + 'audience_size_lower_bound': 'unsigned int', + 'audience_size_upper_bound': 'unsigned int', + 'business_id': 'int', + 'buying_type': 'string', + 'campaign_group_id': 'int', + 'campaign_id': 'string', + 'campaign_time_start': 'datetime', + 'campaign_time_stop': 'datetime', + 'currency': 'string', + 'curve_budget_reach': 'ReachFrequencyEstimatesCurve', + 'curve_reach': 'list', + 'daily_grp_curve': 'list', + 'daily_impression_curve': 'list', + 'daily_impression_curve_map': 'list>>', + 'day_parting_schedule': 'list', + 'destination_id': 'string', + 'end_time': 'datetime', + 'expiration_time': 'datetime', + 'external_budget': 'int', + 'external_impression': 'unsigned int', + 'external_maximum_budget': 'int', + 'external_maximum_impression': 'string', + 'external_maximum_reach': 'unsigned int', + 'external_minimum_budget': 'int', + 'external_minimum_impression': 'unsigned int', + 'external_minimum_reach': 'unsigned int', + 'external_reach': 'unsigned int', + 'feed_ratio_0000': 'unsigned int', + 'frequency_cap': 'unsigned int', + 'frequency_distribution_map': 'list>>', + 'frequency_distribution_map_agg': 'list>>', + 'grp_audience_size': 'float', + 'grp_avg_probability_map': 'string', + 'grp_country_audience_size': 'float', + 'grp_curve': 'list', + 'grp_dmas_audience_size': 'float', + 'grp_filtering_threshold_00': 'unsigned int', + 'grp_points': 'float', + 'grp_ratio': 'float', + 'grp_reach_ratio': 'float', + 'grp_status': 'string', + 'holdout_percentage': 'unsigned int', + 'id': 'string', + 'impression_curve': 'list', + 'instagram_destination_id': 'string', + 'instream_packages': 'list', + 'interval_frequency_cap': 'unsigned int', + 'interval_frequency_cap_reset_period': 'unsigned int', + 'is_bonus_media': 'unsigned int', + 'is_conversion_goal': 'unsigned int', + 'is_higher_average_frequency': 'bool', + 'is_io': 'bool', + 'is_reserved_buying': 'unsigned int', + 'is_trp': 'bool', + 'name': 'string', + 'objective': 'unsigned int', + 'objective_name': 'string', + 'odax_objective': 'unsigned int', + 'odax_objective_name': 'string', + 'optimization_goal': 'unsigned int', + 'optimization_goal_name': 'string', + 'pause_periods': 'list', + 'placement_breakdown': 'ReachFrequencyEstimatesPlacementBreakdown', + 'placement_breakdown_map': 'list>', + 'plan_name': 'string', + 'plan_type': 'string', + 'prediction_mode': 'unsigned int', + 'prediction_progress': 'unsigned int', + 'reference_id': 'string', + 'reservation_status': 'unsigned int', + 'start_time': 'datetime', + 'status': 'unsigned int', + 'story_event_type': 'unsigned int', + 'target_cpm': 'unsigned int', + 'target_spec': 'Targeting', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'timezone_id': 'unsigned int', + 'timezone_name': 'string', + 'topline_id': 'unsigned int', + 'video_view_length_constraint': 'unsigned int', + 'viewtag': 'string', + 'action': 'Action', + 'budget': 'unsigned int', + 'deal_id': 'string', + 'destination_ids': 'list', + 'exceptions': 'bool', + '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', + 'reach': 'unsigned int', + 'rf_prediction_id': 'string', + '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): + field_enum_info = {} + field_enum_info['Action'] = ReachFrequencyPrediction.Action.__dict__.values() + field_enum_info['BuyingType'] = ReachFrequencyPrediction.BuyingType.__dict__.values() + field_enum_info['InstreamPackages'] = ReachFrequencyPrediction.InstreamPackages.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyspec.py b/tap_facebook/facebook_business/adobjects/reachfrequencyspec.py new file mode 100644 index 0000000..7618e6d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/reachfrequencyspec.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 ReachFrequencySpec( + AbstractObject, +): + + def __init__(self, api=None): + super(ReachFrequencySpec, self).__init__() + self._isReachFrequencySpec = True + self._api = api + + class Field(AbstractObject.Field): + countries = 'countries' + default_creation_data = 'default_creation_data' + global_io_max_campaign_duration = 'global_io_max_campaign_duration' + max_campaign_duration = 'max_campaign_duration' + max_days_to_finish = 'max_days_to_finish' + max_pause_without_prediction_rerun = 'max_pause_without_prediction_rerun' + min_campaign_duration = 'min_campaign_duration' + min_reach_limits = 'min_reach_limits' + + _field_types = { + 'countries': 'list', + 'default_creation_data': 'Object', + 'global_io_max_campaign_duration': 'unsigned int', + 'max_campaign_duration': 'Object', + 'max_days_to_finish': 'Object', + 'max_pause_without_prediction_rerun': 'Object', + 'min_campaign_duration': 'Object', + 'min_reach_limits': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/recommendation.py b/tap_facebook/facebook_business/adobjects/recommendation.py new file mode 100644 index 0000000..371e817 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/recommendation.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 Recommendation( + AbstractObject, +): + + def __init__(self, api=None): + super(Recommendation, self).__init__() + self._isRecommendation = True + self._api = api + + class Field(AbstractObject.Field): + created_time = 'created_time' + has_rating = 'has_rating' + has_review = 'has_review' + open_graph_story = 'open_graph_story' + rating = 'rating' + recommendation_type = 'recommendation_type' + review_text = 'review_text' + reviewer = 'reviewer' + + _field_types = { + 'created_time': 'datetime', + 'has_rating': 'bool', + 'has_review': 'bool', + 'open_graph_story': 'Object', + 'rating': 'int', + 'recommendation_type': 'string', + 'review_text': 'string', + 'reviewer': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/revsharepolicy.py b/tap_facebook/facebook_business/adobjects/revsharepolicy.py new file mode 100644 index 0000000..7b0dddd --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/revsharepolicy.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 RevSharePolicy( + AbstractObject, +): + + def __init__(self, api=None): + super(RevSharePolicy, self).__init__() + self._isRevSharePolicy = True + self._api = api + + class Field(AbstractObject.Field): + policy_id = 'policy_id' + policy_name = 'policy_name' + + _field_types = { + 'policy_id': 'string', + 'policy_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/richmediaelement.py b/tap_facebook/facebook_business/adobjects/richmediaelement.py new file mode 100644 index 0000000..a47cb2c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/richmediaelement.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 RichMediaElement( + AbstractObject, +): + + def __init__(self, api=None): + super(RichMediaElement, self).__init__() + self._isRichMediaElement = True + self._api = api + + class Field(AbstractObject.Field): + element = 'element' + element_type = 'element_type' + name = 'name' + + _field_types = { + 'element': 'Object', + 'element_type': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/rtbdynamicpost.py b/tap_facebook/facebook_business/adobjects/rtbdynamicpost.py new file mode 100644 index 0000000..c563aee --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/rtbdynamicpost.py @@ -0,0 +1,159 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 RTBDynamicPost( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isRTBDynamicPost = True + super(RTBDynamicPost, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + child_attachments = 'child_attachments' + created = 'created' + description = 'description' + id = 'id' + image_url = 'image_url' + link = 'link' + message = 'message' + owner_id = 'owner_id' + place_id = 'place_id' + product_id = 'product_id' + 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=RTBDynamicPost, + 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.comment import Comment + param_types = { + 'filter': 'filter_enum', + 'live_filter': 'live_filter_enum', + 'order': 'order_enum', + 'since': 'datetime', + } + enums = { + 'filter_enum': Comment.Filter.__dict__.values(), + 'live_filter_enum': Comment.LiveFilter.__dict__.values(), + '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() + + def get_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profile import Profile + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Profile, + api_type='EDGE', + response_parser=ObjectParser(target_class=Profile, 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 = { + 'child_attachments': 'list', + 'created': 'datetime', + 'description': 'string', + 'id': 'string', + 'image_url': 'string', + 'link': 'string', + 'message': 'string', + 'owner_id': 'string', + 'place_id': 'string', + 'product_id': 'string', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/savedaudience.py b/tap_facebook/facebook_business/adobjects/savedaudience.py new file mode 100644 index 0000000..b227892 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/savedaudience.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 SavedAudience( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSavedAudience = True + super(SavedAudience, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account = 'account' + approximate_count_lower_bound = 'approximate_count_lower_bound' + approximate_count_upper_bound = 'approximate_count_upper_bound' + delete_time = 'delete_time' + description = 'description' + id = 'id' + name = 'name' + operation_status = 'operation_status' + owner_business = 'owner_business' + page_deletion_marked_delete_time = 'page_deletion_marked_delete_time' + permission_for_actions = 'permission_for_actions' + run_status = 'run_status' + sentence_lines = 'sentence_lines' + targeting = 'targeting' + 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=SavedAudience, + 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', + 'approximate_count_lower_bound': 'int', + 'approximate_count_upper_bound': 'int', + 'delete_time': 'int', + 'description': 'string', + 'id': 'string', + 'name': 'string', + 'operation_status': 'CustomAudienceStatus', + 'owner_business': 'Business', + 'page_deletion_marked_delete_time': 'int', + 'permission_for_actions': 'AudiencePermissionForActions', + 'run_status': 'string', + 'sentence_lines': 'list', + 'targeting': 'Targeting', + 'time_created': 'datetime', + 'time_updated': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/savedmessageresponse.py b/tap_facebook/facebook_business/adobjects/savedmessageresponse.py new file mode 100644 index 0000000..212334a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/savedmessageresponse.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 SavedMessageResponse( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSavedMessageResponse = True + super(SavedMessageResponse, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + category = 'category' + id = 'id' + image = 'image' + is_enabled = 'is_enabled' + message = 'message' + 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=SavedMessageResponse, + 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', + 'image': 'string', + 'is_enabled': 'bool', + 'message': 'string', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/securitysettings.py b/tap_facebook/facebook_business/adobjects/securitysettings.py new file mode 100644 index 0000000..cb13660 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/securitysettings.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 SecuritySettings( + AbstractObject, +): + + def __init__(self, api=None): + super(SecuritySettings, self).__init__() + self._isSecuritySettings = 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/tap_facebook/facebook_business/adobjects/serverside/__init__.py b/tap_facebook/facebook_business/adobjects/serverside/__init__.py new file mode 100644 index 0000000..dfc80ec --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/__init__.py @@ -0,0 +1,19 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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/tap_facebook/facebook_business/adobjects/serverside/action_source.py b/tap_facebook/facebook_business/adobjects/serverside/action_source.py new file mode 100644 index 0000000..6610c3c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/action_source.py @@ -0,0 +1,71 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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 enum import Enum + + +# Used to specify where the conversion occurred. +# See https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/server-event#action-source +class ActionSource(Enum): + + """ + Conversion happened over email. + """ + EMAIL = 'email' + + """ + Conversion was made on your website. + """ + WEBSITE = 'website' + + """ + Conversion was made using your app. + """ + APP = 'app' + + """ + Conversion was made over the phone. + """ + PHONE_CALL = 'phone_call' + + """ + Conversion was made via a messaging app, SMS, or online messaging feature. + """ + CHAT = 'chat' + + """ + Conversion was made in person at your physical store. + """ + PHYSICAL_STORE = 'physical_store' + + """ + Conversion happened automatically, for example, a subscription renewal that's set on auto-pay each month. + """ + 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. + """ + OTHER = 'other' diff --git a/tap_facebook/facebook_business/adobjects/serverside/app_data.py b/tap_facebook/facebook_business/adobjects/serverside/app_data.py new file mode 100644 index 0000000..90d24e6 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/app_data.py @@ -0,0 +1,253 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +class AppData(object): + + param_types = { + 'application_tracking_enabled': 'bool', + 'advertiser_tracking_enabled': 'bool', + 'campaign_ids': 'str', + 'consider_views': 'bool', + 'extinfo': 'ExtendedDeviceInfo', + 'include_dwell_data': 'bool', + 'include_video_data': 'bool', + 'install_referrer': 'str', + 'installer_package': 'str', + 'receipt_data': 'str', + 'url_schemes': 'str', + 'windows_attribution_id': 'str', + } + + def __init__( + self, + application_tracking_enabled=None, + advertiser_tracking_enabled=None, + campaign_ids=None, + consider_views=None, + extinfo=None, + include_dwell_data=None, + include_video_data=None, + install_referrer=None, + installer_package=None, + receipt_data=None, + url_schemes=None, + windows_attribution_id=None, + ): + # type: (bool, bool, str, str, bool, ExtendedDeviceInfo, bool, bool, str, str, str, str, str) -> None + + """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._campaign_ids = None + self._consider_views = None + self._extinfo = None + self._include_dwell_data = None + self._include_video_data = None + self._install_referrer = None + self._installer_package = None + self._receipt_data = None + self._url_schemes = None + self._windows_attribution_id = None + + if application_tracking_enabled is not None: + self.application_tracking_enabled = application_tracking_enabled + if campaign_ids is not None: + self.campaign_ids = campaign_ids + if consider_views is not None: + self.consider_views = consider_views + if extinfo is not None: + self.extinfo = extinfo + if include_dwell_data is not None: + self.include_dwell_data = include_dwell_data + if include_video_data is not None: + self.include_video_data = include_video_data + if install_referrer is not None: + self.install_referrer = install_referrer + if installer_package is not None: + self.installer_package = installer_package + if receipt_data is not None: + self.receipt_data = receipt_data + if url_schemes is not None: + self.url_schemes = url_schemes + if windows_attribution_id is not None: + self.windows_attribution_id = windows_attribution_id + + @property + def application_tracking_enabled(self): + return self._application_tracking_enabled + + @application_tracking_enabled.setter + def application_tracking_enabled(self, application_tracking_enabled): + self._application_tracking_enabled = application_tracking_enabled + + @property + def advertiser_tracking_enabled(self): + return self._advertiser_tracking_enabled + + @advertiser_tracking_enabled.setter + def advertiser_tracking_enabled(self, advertiser_tracking_enabled): + self._advertiser_tracking_enabled = advertiser_tracking_enabled + + @property + def campaign_ids(self): + return self._campaign_ids + + @campaign_ids.setter + def campaign_ids(self, campaign_ids): + self._campaign_ids = campaign_ids + + @property + def consider_views(self): + return self._consider_views + + @consider_views.setter + def consider_views(self, consider_views): + self._consider_views = consider_views + + @property + def extinfo(self): + return self._extinfo + + @extinfo.setter + def extinfo(self, extinfo): + self._extinfo = extinfo + + @property + def include_dwell_data(self): + return self._include_dwell_data + + @include_dwell_data.setter + def include_dwell_data(self, include_dwell_data): + self._include_dwell_data = include_dwell_data + + @property + def include_video_data(self): + return self._include_video_data + + @include_video_data.setter + def include_video_data(self, include_video_data): + self._include_video_data = include_video_data + + @property + def install_referrer(self): + return self._install_referrer + + @install_referrer.setter + def install_referrer(self, install_referrer): + self._install_referrer = install_referrer + + @property + def installer_package(self): + return self._installer_package + + @installer_package.setter + def installer_package(self, installer_package): + self._installer_package = installer_package + + @property + def receipt_data(self): + return self._receipt_data + + @receipt_data.setter + def receipt_data(self, receipt_data): + self._receipt_data = receipt_data + + @property + def url_schemes(self): + return self._url_schemes + + @url_schemes.setter + def url_schemes(self, url_schemes): + self._url_schemes = url_schemes + + @property + def windows_attribution_id(self): + return self._windows_attribution_id + + @windows_attribution_id.setter + def windows_attribution_id(self, windows_attribution_id): + self._windows_attribution_id = windows_attribution_id + + def normalize(self): + 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 + + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.param_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AppData, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AppData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/batch_processor.py b/tap_facebook/facebook_business/adobjects/serverside/batch_processor.py new file mode 100644 index 0000000..ec8be8f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/batch_processor.py @@ -0,0 +1,69 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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.serverside.util import Util +if not Util.async_requests_available(): + raise Exception('BatchProcessor requires Python >= 3.5.3') + +import asyncio + +class BatchProcessor: + def __init__(self, batch_size=50, concurrent_requests=4): + self.batch_size = batch_size + self.concurrent_requests = concurrent_requests + + def process_event_requests(self, event_requests_async): + async def process(): + async for _ in self.process_event_requests_generator(event_requests_async): + pass + + asyncio.run(process()) + + async def process_event_requests_generator(self, event_requests_async): + index = 0 + while index < len(event_requests_async): + batch = event_requests_async[index:(index + self.concurrent_requests)] + responses = [] + for request in batch: + response = await request.execute() + responses.append(response) + yield responses + + index += self.concurrent_requests + + def process_events(self, event_request_async_to_clone, events): + async def process(): + async for _ in self.process_events_generator(event_request_async_to_clone, events): + pass + + asyncio.run(process()) + + async def process_events_generator(self, event_request_async_to_clone, events): + index = 0 + while index < len(events): + responses = [] + while index < len(events) and len(responses) < self.concurrent_requests: + event_request = event_request_async_to_clone.clone_without_events() + event_request.events = events[index:(index + self.batch_size)] + response = await event_request.execute() + responses.append(response) + index += self.batch_size + + yield responses diff --git a/tap_facebook/facebook_business/adobjects/serverside/content.py b/tap_facebook/facebook_business/adobjects/serverside/content.py new file mode 100644 index 0000000..29ebd23 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/content.py @@ -0,0 +1,268 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import pprint +import six + +from facebook_business.adobjects.serverside.delivery_category import DeliveryCategory + +class Content(object): + """ + Content objects that contain the product IDs associated with the event plus information about the products. + """ + param_types = { + 'product_id': 'str', + 'quantity': 'str', + 'item_price': 'float', + 'title': 'str', + 'description': 'str', + 'brand': 'str', + 'category': 'str', + 'delivery_category': 'str', + } + + def __init__( + self, + product_id=None, + quantity=None, + item_price=None, + title=None, + description=None, + brand=None, + category=None, + delivery_category=None, + ): + # type: (str, int, float, str, str, str, str, str) -> None + + self._product_id = None + self._quantity = None + self._item_price = None + self._title = None + self._description = None + self._brand = None + self._category = None + self._delivery_category = None + if product_id is not None: + self.product_id = product_id + if quantity is not None: + self.quantity = quantity + if item_price is not None: + self.item_price = item_price + if title is not None: + self.title = title + if description is not None: + self.description = description + if brand is not None: + self.brand = brand + if category is not None: + self.category = category + if delivery_category is not None: + self.delivery_category = delivery_category + + @property + def product_id(self): + """ + Gets Product Id. + :rtype: str + """ + return self._product_id + + @product_id.setter + def product_id(self, product_id): + """ + Sets Product Id. + """ + self._product_id = product_id + + @property + def quantity(self): + """ + Gets number of product. + :rtype: int + """ + return self._quantity + + @quantity.setter + def quantity(self, quantity): + """ + Set number of product. + """ + self._quantity = quantity + + @property + def item_price(self): + """ + Gets Item Price. + :rtype: float + """ + return self._item_price + + @item_price.setter + def item_price(self, item_price): + """ + Sets Item Price. + """ + self._item_price = item_price + + @property + def title(self): + """ + Gets title. + :rtype: float + """ + return self._title + + @title.setter + def title(self, title): + """ + Sets title. + """ + self._title = title + + @property + def description(self): + """ + Gets description. + :rtype: float + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets description. + """ + self._description = description + + @property + def brand(self): + """ + Gets brand. + :rtype: float + """ + return self._brand + + @brand.setter + def brand(self, brand): + """ + Sets brand. + """ + self._brand = brand + + @property + def category(self): + """ + Gets category. + :rtype: float + """ + return self._category + + @category.setter + def category(self, category): + """ + Sets category. + """ + self._category = category + + @property + def delivery_category(self): + """Gets the Type of Delivery Category. + + :return: The Delivery Category type. + :rtype: DeliveryCategory + """ + return self._delivery_category + + @delivery_category.setter + def delivery_category(self, delivery_category): + """Sets the Type of Delivery Category. + + Use with Purchase events. + + :param delivery_category: The Delivery Category type. + :type: DeliveryCategory + """ + if not isinstance(delivery_category, DeliveryCategory): + raise TypeError('delivery_category must be of type DeliveryCategory. Passed invalid category: ' + delivery_category) + + self._delivery_category = delivery_category + + def normalize(self): + normalized_payload = { + 'id': self.product_id, + 'quantity': self.quantity, + 'item_price': self.item_price, + 'title': self.title, + 'description': self.description, + 'brand': self.brand, + 'category': self.category, + } + + if self.delivery_category is not None: + normalized_payload['delivery_category'] = self.delivery_category.value + + normalized_payload = {k: v for k, v in normalized_payload.items() if v is not None} + return normalized_payload + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.param_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Content, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Content): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/custom_data.py b/tap_facebook/facebook_business/adobjects/serverside/custom_data.py new file mode 100644 index 0000000..b6a56fe --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/custom_data.py @@ -0,0 +1,556 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import pprint +import six + +from facebook_business.adobjects.serverside.content import Content +from facebook_business.adobjects.serverside.normalize import Normalize +from facebook_business.adobjects.serverside.delivery_category import DeliveryCategory + +class CustomData(object): + """ + CustomData includes additional business data about the event. + """ + param_types = { + 'value': 'float', + 'currency': 'str', + 'content_name': 'str', + 'content_category': 'str', + 'content_ids': 'list[str]', + 'contents': 'list[Content]', + 'content_type': 'str', + 'order_id': 'str', + 'predicted_ltv': 'float', + 'num_items': 'int', + 'status': 'str', + 'search_string' : 'str', + 'delivery_category' : 'DeliveryCategory', + 'item_number': 'str', + 'custom_properties' : 'dict' + } + + def __init__( + self, + value=None, + currency=None, + content_name=None, + content_category=None, + content_ids=None, + contents=None, + content_type=None, + order_id=None, + predicted_ltv=None, + num_items=None, + status=None, + search_string=None, + delivery_category=None, + item_number=None, + custom_properties={}, + ): + # type: (float, str, str, str, content_ids, List[str], List[Content], str, str, float, int, str, str, DeliveryCategory ,str, dict) -> None + + self._value = None + self._currency = None + self._content_name = None + self._content_category = None + self._content_ids = None + self._contents = None + self._content_type = None + self._order_id = None + self._predicted_ltv = None + self._num_items = None + self._status = None + self._search_string = None + self._delivery_category = None + self._item_number = None + self._custom_properties = None + if value is not None: + self.value = value + if currency is not None: + self.currency = currency + if content_name is not None: + self.content_name = content_name + if content_category is not None: + self.content_category = content_category + if content_ids is not None: + self.content_ids = content_ids + if contents is not None: + self.contents = contents + if content_type is not None: + self.content_type = content_type + if order_id is not None: + self.order_id = order_id + if predicted_ltv is not None: + self.predicted_ltv = predicted_ltv + if num_items is not None: + self.num_items = num_items + if status is not None: + self.status = status + if search_string is not None: + self.search_string = search_string + if delivery_category is not None: + self.delivery_category = delivery_category + if item_number is not None: + self.item_number = item_number + if custom_properties: + self.custom_properties = custom_properties + + @property + def value(self): + """Gets the value. + + A numeric value associated with this event. This could be a monetary value or a value in some other metric. + + :return: The value. + :rtype: float or int + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value. + + A numeric value associated with this event. This could be a monetary value or a value in some other metric. + + :param value: The value. + :type: float or int + """ + if not isinstance(value, (float, int)): + raise TypeError('CustomData.value must be a float or int. TypeError on value: %s' % value) + self._value = value + + @property + def currency(self): + """Gets the currency. + + The currency for the value specified, if applicable. Currency must be a valid ISO 4217 three digit currency code. + + :return: The currency. + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency. + + The currency for the value specified, if applicable. Currency must be a valid ISO 4217 three digit currency code. + + :param currency: The currency. + :type: str + """ + + self._currency = currency + + @property + def content_name(self): + """Gets the content name. + + The name of the page or product associated with the event. Example: 'lettuce'. + + :return: The content name. + :rtype: str + """ + return self._content_name + + @content_name.setter + def content_name(self, content_name): + """Sets the content name. + + The name of the page or product associated with the event. Example: 'lettuce'. + + :param content_name: The content name. + :type: str + """ + + self._content_name = content_name + + @property + def content_category(self): + """Gets the content category. + + The category of the content associated with the event. Example: 'grocery' + + :return: The content category. + :rtype: str + """ + return self._content_category + + @content_category.setter + def content_category(self, content_category): + """Sets the content category. + + The category of the content associated with the event. Example: 'grocery' + + :param content_category: The content category. + :type: str + """ + + self._content_category = content_category + + @property + def content_ids(self): + """Gets the content ids. + + The content IDs associated with the event, such as product SKUs for items in an + AddToCart event: ['ABC123', 'XYZ789']. If content_type is a product, then your content IDs must + be an array with a single string value. Otherwise, this array can contain any number of string values. + + :return: The content ids. + :rtype: list[str] + """ + return self._content_ids + + @content_ids.setter + def content_ids(self, content_ids): + """Sets the content_ids. + + The content IDs associated with the event, such as product SKUs for items in an AddToCart event: + ['ABC123', 'XYZ789']. If content_type is a product, then your content IDs must be an array with + a single string value. Otherwise, this array can contain any number of string values. + + :param content_ids: The content_ids. + :type: list[str] + """ + + self._content_ids = content_ids + + @property + def contents(self): + """Gets the contents. + + A list of Content objects that contain the product IDs associated with the event plus information about + the products. id, quantity, and item_price are available fields. + + :return: The contents. + :rtype: list[Content] + """ + return self._contents + + @contents.setter + def contents(self, contents): + """Sets the contents. + + A list of Content objects that contain the product IDs associated with the event plus information about + the products. id, quantity, and item_price are available fields. + + :param contents: The contents. + :type: list[Content] + """ + + self._contents = contents + + @property + def content_type(self): + """Gets the content type. + + A String equal to either 'product' or 'product_group'. Set to product if the keys you send content_ids or + contents represent products. Set to product_group if the keys you send in content_ids represent product groups. + + :return: The content type. + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content type. + + A String equal to either 'product' or 'product_group'. Set to product if the keys you send content_ids or + contents represent products. Set to product_group if the keys you send in content_ids represent product groups. + + :param content_type: The content type. + :type: str + """ + + self._content_type = content_type + + @property + def order_id(self): + """Gets the order id. + + The order ID for this transaction as a String. + + :return: The order id. + :rtype: str + """ + return self._order_id + + @order_id.setter + def order_id(self, order_id): + """Sets the order id. + + The order ID for this transaction as a String. + + :param order_id: The order id. + :type: str + """ + + self._order_id = order_id + + @property + def predicted_ltv(self): + """Gets the predicted ltv. + + The predicted lifetime value of a conversion event + + :return: The predicted ltv. + :rtype: float or int + """ + return self._predicted_ltv + + @predicted_ltv.setter + def predicted_ltv(self, predicted_ltv): + """Sets the predicted_ltv. + + The predicted lifetime value of a conversion event + + :param predicted_ltv: The predicted_ltv. + :type: float or int + """ + if not isinstance(predicted_ltv, (float, int)): + raise TypeError('CustomData.predicted_ltv must be a float or int. TypeError on predicted_ltv: %s' % predicted_ltv) + self._predicted_ltv = predicted_ltv + + @property + def num_items(self): + """Gets the num items. + + Use only with InitiateCheckout events. The number of items that a user tries to buy during checkout. + + :return: The num_items. + :rtype: int + """ + return self._num_items + + @num_items.setter + def num_items(self, num_items): + """Sets the num items. + + Use only with InitiateCheckout events. The number of items that a user tries to buy during checkout. + + :param num_items: The num_items. + :type: int + """ + + self._num_items = num_items + + @property + def status(self): + """Gets the status. + + Use only with CompleteRegistration events. The status of the registration event, as a String. + + :return: The status. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status. + + Use only with CompleteRegistration events. The status of the registration event, as a String. + + :param status: The status. + :type: str + """ + + self._status = status + + @property + def search_string(self): + """Gets the search query made by a user. + + :return: The search query. + :rtype: str + """ + return self._search_string + + @search_string.setter + def search_string(self, search_string): + """Sets the search query made by a user. + + Use only with Search events. A search query made by a user. + + :param search_string: The search query. + :type: str + """ + + self._search_string = search_string + + @property + def delivery_category(self): + """Gets the Type of Delivery Category. + + :return: The Delivery Category type. + :rtype: DeliveryCategory + """ + return self._delivery_category + + @delivery_category.setter + def delivery_category(self, delivery_category): + """Sets the Type of Delivery Category. + + Use with Purchase events. + + :param delivery_category: The Delivery Category type. + :type: DeliveryCategory + """ + if not isinstance(delivery_category, DeliveryCategory): + raise TypeError('delivery_category must be of type DeliveryCategory. Passed invalid category: ' + delivery_category) + + self._delivery_category = delivery_category + + @property + def item_number(self): + """Gets the item number. + + :return: The item number. + :rtype: str + """ + return self._item_number + + @item_number.setter + def item_number(self, item_number): + """Sets the item number. + + :param item_number: The item number. + :type: str + """ + + self._item_number = item_number + + @property + def custom_properties(self): + """Gets the custom properties to be included in the Custom Data. + + :return: The custom properties dictionary. + :rtype: dict + """ + return self._custom_properties + + @custom_properties.setter + def custom_properties(self, custom_properties): + """Sets the custom properties to be included in the Custom Data. + + These are properties that are not defined in the standard list of the custom data. + + :param custom_properties: The custom properties dictionary. + :type: dict + """ + + self._custom_properties = custom_properties + + def add_custom_property(self, key, value): + + """Adds the custom property (key, value) to the custom property bag. + + :param key: The Key for the property to be added. + :type: str + :param value: The Value for the property to be added. + :type: str + """ + + self.custom_properties[key] = value + + def normalize(self): + normalized_payload = { + 'value': self.value, + 'currency': Normalize.normalize_field_skip_hashing('currency', self.currency), + 'content_name': self.content_name, + 'content_category': self.content_category, + 'content_ids': self.content_ids, + 'content_type': self.content_type, + 'order_id': self.order_id, + 'predicted_ltv': self.predicted_ltv, + 'num_items': self.num_items, + 'status': self.status, + 'search_string': self.search_string, + 'item_number': self.item_number, + } + + if self.delivery_category is not None: + normalized_payload['delivery_category'] = self.delivery_category.value + + if self.contents is not None: + contents = [] + for content in self.contents: + if content is not None: + contents.append(content.normalize()) + + normalized_payload['contents'] = contents + + # Append the custom_properties to the custom_data normalized payload. + if self.custom_properties: + for key in self.custom_properties: + if key in normalized_payload.keys(): + raise Exception('Duplicate key in custom_properties:"' + key + '". Please make sure the keys defined in the custom_properties are not already available in standard custom_data property list.') + normalized_payload[key] = self.custom_properties[key] + + normalized_payload = {k: v for k, v in normalized_payload.items() if v is not None} + return normalized_payload + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.param_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CustomData, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CustomData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/delivery_category.py b/tap_facebook/facebook_business/adobjects/serverside/delivery_category.py new file mode 100644 index 0000000..f9793c7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/delivery_category.py @@ -0,0 +1,39 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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 enum import Enum + + +# Type of delivery for a purchase event +class DeliveryCategory(Enum): + """ + Customer needs to enter the store to get the purchased product. + """ + IN_STORE = 'in_store' + + """ + Customer picks up their order by driving to a store and waiting inside their vehicle. + """ + CURBSIDE = 'curbside' + + """ + Purchase is delivered to the customer's home. + """ + HOME_DELIVERY = 'home_delivery' diff --git a/tap_facebook/facebook_business/adobjects/serverside/event.py b/tap_facebook/facebook_business/adobjects/serverside/event.py new file mode 100644 index 0000000..20ef8b7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/event.py @@ -0,0 +1,517 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import pprint +import six + +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): + param_types = { + 'event_name': 'str', + 'event_time': 'int', + 'event_source_url': 'str', + 'opt_out': 'bool', + '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, + 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 + self._event_time = None + self._event_source_url = None + self._opt_out = 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 + self._action_source = 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: + self.opt_out = opt_out + if event_id is not None: + self.event_id = event_id + if user_data is not 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: + self.data_processing_options_country = data_processing_options_country + if data_processing_options_state is not None: + self.data_processing_options_state = data_processing_options_state + if action_source is not 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): + """Gets the event_name of this Event. + + A Facebook pixel Standard Event or Custom Event name. + + :return: The event_name of this Event. + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this Event. + + A Facebook pixel Standard Event or Custom Event name. + + :param event_name: The event_name of this Event. + :type: str + :return self + """ + if event_name is None: + raise ValueError("Invalid value for `event_name`, must not be `None`") + + self._event_name = event_name + + @property + def event_time(self): + """Gets the event_time of this Event. + + A Unix timestamp in seconds indicating when the actual event occurred. + + :return: The event_time of this Event. + :rtype: int + """ + return self._event_time + + @event_time.setter + def event_time(self, event_time): + """Sets the event_time of this Event. + + A Unix timestamp in seconds indicating when the actual event occurred. + + :param event_time: The event_time of this Event. + :type: int + """ + if event_time is None: + raise ValueError("Invalid value for `event_time`, must not be `None`") + + if not isinstance(event_time, int): + raise TypeError('Event.event_time must be an int') + + self._event_time = event_time + + @property + def event_source_url(self): + """Gets the event_source_url of this Event. + + The browser URL where the event happened. + + :return: The event_source_url of this Event. + :rtype: str + """ + return self._event_source_url + + @event_source_url.setter + def event_source_url(self, event_source_url): + """Sets the event_source_url of this Event. + + The browser URL where the event happened. + + :param event_source_url: The event_source_url of this Event. + :type: str + """ + + self._event_source_url = event_source_url + + @property + def opt_out(self): + """Gets the opt_out of this Event. + + A flag that indicates we should not use this event for ads delivery optimization. + If set to true, we only use the event for attribution. + + :return: The opt_out of this Event. + :rtype: bool + """ + return self._opt_out + + @opt_out.setter + def opt_out(self, opt_out): + """Sets the opt_out of this Event. + + A flag that indicates we should not use this event for ads delivery optimization. + If set to true, we only use the event for attribution. + + :param opt_out: The opt_out of this Event. + :type: bool + """ + + if not isinstance(opt_out, bool): + raise TypeError('Event.opt_out must be a bool') + self._opt_out = opt_out + + @property + def event_id(self): + """Gets the event_id of this Event. + + This ID can be any string chosen by the advertiser. + This is used with event_name to determine if events sent from + both server and browser are identical. + + :return: The event_id of this Event. + :rtype: str + """ + return self._event_id + + @event_id.setter + def event_id(self, event_id): + """Sets the event_id of this Event. + + This ID can be any string chosen by the advertiser. + This is used with event_name to determine if events sent from + both server and browser are identical. + + :param event_id: The event_id of this Event. + :type: str + """ + + self._event_id = event_id + + @property + def user_data(self): + """Gets the user_data of this Event. + + + :return: The user_data of this Event. + :rtype: UserData + """ + return self._user_data + + @user_data.setter + def user_data(self, user_data): + """Sets the user_data of this Event. + + + :param user_data: The user_data of this Event. + :type: UserData + """ + if user_data is None: + raise ValueError("Invalid value for `user_data`, must not be `None`") + + if not isinstance(user_data, UserData): + raise TypeError('Event.user_Data must be of type UserData') + + self._user_data = user_data + + @property + def custom_data(self): + """Gets the custom_data of this Event. + + + :return: The custom_data of this Event. + :rtype: CustomData + """ + return self._custom_data + + @custom_data.setter + def custom_data(self, custom_data): + """Sets the custom_data of this Event. + + + :param custom_data: The custom_data of this Event. + :type: CustomData + """ + + if not isinstance(custom_data, CustomData): + raise TypeError('Event.custom_data must be of type CustomData') + + 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. + + :return: The data_processing_options of this Event. + :rtype: list[str] + """ + return self._data_processing_options + + @data_processing_options.setter + def data_processing_options(self, data_processing_options): + """Sets the data_processing_options of this Event. + Processing options you would like to enable for a specific event. + For more details see https://developers.facebook.com/docs/marketing-apis/data-processing-options + + :param data_processing_options: The data_processing_options of this Event. + :type: list[str] + """ + + self._data_processing_options = data_processing_options + + @property + def data_processing_options_country(self): + """Gets the data_processing_options_country of this Event. + + :return: The data_processing_options_country of this Event. + :rtype: int + """ + return self._data_processing_options_country + + @data_processing_options_country.setter + def data_processing_options_country(self, data_processing_options_country): + """Sets the data_processing_options_country of this Event. + A country that you want to associate to this data processing option. + For more details: https://developers.intern.facebook.com/docs/marketing-apis/data-processing-options + + :param data_processing_options_country: The data_processing_options_country of this Event. + :type: int + """ + + if not isinstance(data_processing_options_country, int): + raise TypeError('Event.data_processing_options_country must be an int') + + self._data_processing_options_country = data_processing_options_country + + @property + def data_processing_options_state(self): + """Gets the data_processing_options_state of this Event. + + :return: The data_processing_options_state of this Event. + :rtype: int + """ + return self._data_processing_options_state + + @data_processing_options_state.setter + def data_processing_options_state(self, data_processing_options_state): + """Sets the data_processing_options_state of this Event. + A state that you want to associate with this data processing option. + For more details: https://developers.facebook.com/docs/marketing-apis/data-processing-options + + :param data_processing_options: The data_processing_options of this Event. + :type: int + """ + + self._data_processing_options_state = data_processing_options_state + + @property + def action_source(self): + """Gets the action_source. + + Allows you to specify where the conversion occurred. + + :return: The action_source. + :rtype: ActionSource + """ + return self._action_source + + @action_source.setter + def action_source(self, action_source): + """Sets the action_source. + + Allows you to specify where the conversion occurred. + + :param action_source: The action_source. + :type: ActionSource + """ + + self._action_source = action_source + + @property + def advanced_measurement_table(self): + """Gets the advanced_measurement_table. + + Only used for the Advanced Measurement API in the Advanced Analytics product. + + :return: The advanced_measurement_table. + :rtype: str + """ + return self._advanced_measurement_table + + @advanced_measurement_table.setter + def advanced_measurement_table(self, advanced_measurement_table): + """Sets the advanced_measurement_table. + + Only used for the Advanced Measurement API in the Advanced Analytics product. + + :param advanced_measurement_table: The advanced_measurement_table. + :type: str + """ + 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, + 'event_id': self.event_id, 'data_processing_options': self.data_processing_options, + 'data_processing_options_country' : self.data_processing_options_country, + 'data_processing_options_state': self.data_processing_options_state, + 'advanced_measurement_table': self.advanced_measurement_table } + + if self.user_data is not None: + normalized_payload['user_data'] = self.user_data.normalize() + + 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 + + def validate_action_source(self, action_source): + if not type(action_source) == ActionSource: + raise TypeError( + '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 = {} + + for attr, _ in six.iteritems(self.param_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Event, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Event): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/event_request.py b/tap_facebook/facebook_business/adobjects/serverside/event_request.py new file mode 100644 index 0000000..b100f97 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/event_request.py @@ -0,0 +1,363 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import json +import pprint +import six + +from facebook_business import FacebookAdsApi +from facebook_business.adobjects.adspixel import AdsPixel +from facebook_business.adobjects.serverside.event import Event +from facebook_business.adobjects.serverside.event_response import EventResponse +from facebook_business.adobjects.serverside.http_method import HttpMethod +from facebook_business.adobjects.serverside.request_options import RequestOptions +from facebook_business.adobjects.serverside.util import Util +from facebook_business.session import FacebookSession + + +class EventRequest(object): + """ + Conversions API Event Request. + """ + + param_types = { + 'events': 'list[Event]', + 'test_event_code': 'str', + 'namespace_id': 'str', + 'upload_id': 'str', + 'upload_tag': 'str', + 'upload_source': 'str', + 'partner_agent': 'str', + } + + def __init__( + self, + pixel_id=None, + events=None, + test_event_code=None, + namespace_id=None, + upload_id=None, + upload_tag=None, + upload_source=None, + partner_agent=None, + http_client=None, + access_token=None, + appsecret=None, + ): + # type: (str, List[Event], str) -> None + + self._events = None + self._test_event_code = None + self._namespace_id = None + self._upload_id = None + self._upload_tag = None + self._upload_source = None + self._partner_agent = None + self.__pixel_id = None + self.__http_client = None + self.__access_token = None + self.__appsecret = None + if pixel_id is None: + raise ValueError("Invalid value for `pixel_id`, must not be `None`") + self.__pixel_id = pixel_id + if http_client is not None and access_token is None: + raise ValueError("An access_token must also be passed in when passing in an http_client") + if http_client is not None: + self.__http_client = http_client + if access_token is not None: + self.__access_token = access_token + if appsecret is not None: + self.__appsecret = appsecret + self.events = events + if test_event_code is not None: + self.test_event_code = test_event_code + if namespace_id is not None: + self.namespace_id = namespace_id + if upload_id is not None: + self.upload_id = upload_id + if upload_tag is not None: + self.upload_tag = upload_tag + if upload_source is not None: + self.upload_source = upload_source + if partner_agent is not None: + self.partner_agent = partner_agent + + @property + def events(self): + """Gets the events. + + An array of Server Event objects + + :return: The events. + :rtype: list[Event] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events. + + An array of Server Event objects + + :param events: The events. + :type: list[Event] + """ + if events is None: + raise ValueError("Invalid value for `events`, must not be `None`") + + self._events = events + + @property + def test_event_code(self): + """Gets the test_event_code. + + Code used to verify that your server events are received correctly by Facebook. + Use this code to test your server events in the Test Events feature in Events Manager. + See Test Events Tool (https://developers.facebook.com/docs/marketing-api/conversions-api/using-the-api#testEvents) for an example. + + :return: The test_event_code. + :rtype: str + """ + return self._test_event_code + + @test_event_code.setter + def test_event_code(self, test_event_code): + """Sets the test_event_code. + + Code used to verify that your server events are received correctly by Facebook. + Use this code to test your server events in the Test Events feature in Events Manager. + See Test Events Tool (https://developers.facebook.com/docs/marketing-api/conversions-api/using-the-api#testEvents) for an example. + + :param test_event_code: The test_event_code. + :type: str + """ + + self._test_event_code = test_event_code + + @property + def namespace_id(self): + """Gets the namespace_id. + + :return: The namespace_id. + :rtype: str + """ + return self._namespace_id + + @namespace_id.setter + def namespace_id(self, namespace_id): + """Sets the namespace_id. + + :param namespace_id: The namespace_id. + :type: str + """ + + self._namespace_id = namespace_id + + @property + def upload_id(self): + """Gets the upload_id. + + :return: The upload_id. + :rtype: str + """ + return self._upload_id + + @upload_id.setter + def upload_id(self, upload_id): + """Sets the upload_id. + + :param upload_id: The upload_id. + :type: str + """ + + self._upload_id = upload_id + + @property + def upload_tag(self): + """Gets the upload_tag. + + :return: The upload_tag. + :rtype: str + """ + return self._upload_tag + + @upload_tag.setter + def upload_tag(self, upload_tag): + """Sets the upload_tag. + + :param upload_tag: The upload_tag. + :type: str + """ + + self._upload_tag = upload_tag + + @property + def upload_source(self): + """Gets the upload_source. + + :return: The upload_source. + :rtype: str + """ + return self._upload_source + + @upload_source.setter + def upload_source(self, upload_source): + """Sets the upload_source. + + :param upload_source: The upload_source. + :type: str + """ + + self._upload_source = upload_source + + @property + def partner_agent(self): + """Gets the partner_agent. + + Allows you to specify the platform from which the event is sent e.g. wordpress + + :return: The partner_agent. + :rtype: str + """ + return self._partner_agent + + @partner_agent.setter + def partner_agent(self, partner_agent): + """Sets the partner_agent. + + Allows you to specify the platform from which the event is sent e.g. wordpress + + :param partner_agent: The partner_agent. + :type: str + """ + + self._partner_agent = partner_agent + + def get_request_params(self): + params = {} + if self.test_event_code is not None: + params['test_event_code'] = self.test_event_code + if self.namespace_id is not None: + params['namespace_id'] = self.namespace_id + if self.upload_id is not None: + params['upload_id'] = self.upload_id + if self.upload_tag is not None: + params['upload_tag'] = self.upload_tag + if self.upload_source is not None: + params['upload_source'] = self.upload_source + if self.partner_agent is not None: + params['partner_agent'] = self.partner_agent + + return params + + def get_params(self): + params = self.get_request_params() + params["data"] = self.normalize() + return params + + def execute(self): + params = self.get_params() + + if self.__http_client is not None: + return self.execute_with_client(params) + + response = AdsPixel(self.__pixel_id).create_event( + fields=[], + params=params, + ) + return EventResponse(events_received=response['events_received'], + fbtrace_id=response['fbtrace_id'], + messages=response['messages']) + + def execute_with_client(self, params): + url = '/'.join([ + FacebookSession.GRAPH, + FacebookAdsApi.API_VERSION, + self.__pixel_id, + 'events', + ]) + params['access_token'] = self.__access_token + if self.__appsecret is not None: + params['appsecret_proof'] = Util.appsecret_proof(self.__appsecret, self.__access_token) + request_options = RequestOptions( + ca_bundle_path=Util.ca_bundle_path() + ) + + return self.__http_client.execute( + url=url, + method=HttpMethod.POST, + request_options=request_options, + headers=FacebookAdsApi.HTTP_DEFAULT_HEADERS, + params=params + ) + + def normalize(self): + normalized_events = [] + for event in self.events: + normalized_event = event.normalize() + normalized_events.append(json.dumps(normalized_event)) + + return normalized_events + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.param_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EventRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EventRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/event_request_async.py b/tap_facebook/facebook_business/adobjects/serverside/event_request_async.py new file mode 100644 index 0000000..e97e809 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/event_request_async.py @@ -0,0 +1,114 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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.serverside.util import Util +if not Util.async_requests_available(): + raise Exception('EventRequestAsync requires Python >= 3.5.3') + +from facebook_business.adobjects.serverside.event_request import EventRequest +from facebook_business.adobjects.serverside.event_response import EventResponse +from facebook_business.api import FacebookAdsApi +from facebook_business.session import FacebookSession + +import aiohttp +import json +import os +import ssl + +class EventRequestAsync(EventRequest): + def __init__( + self, + pixel_id=None, + events=None, + test_event_code=None, + namespace_id=None, + upload_id=None, + upload_tag=None, + upload_source=None, + partner_agent=None + ): + super().__init__( + pixel_id, + events, + test_event_code, + namespace_id, + upload_id, + upload_tag, + upload_source, + partner_agent + ) + self.pixel_id = pixel_id + + async def create_event(self, session): + api_version = FacebookAdsApi.get_default_api().API_VERSION + url = '/'.join([ + FacebookSession.GRAPH, + api_version, + self.pixel_id, + 'events' + ]) + + facebook_session = FacebookAdsApi.get_default_api()._session + access_token = facebook_session.access_token + params = self.get_params() + params['access_token'] = access_token + if facebook_session.app_secret: + params['appsecret_proof'] = facebook_session._gen_appsecret_proof() + cafile = os.path.join( + os.path.dirname(__file__), + '..', + '..', + 'fb_ca_chain_bundle.crt' + ) + sslcontext = ssl.create_default_context(cafile=cafile) + + async with session.post( + url=url, + data=params, + ssl=sslcontext, + headers=FacebookAdsApi.get_default_api().HTTP_DEFAULT_HEADERS + ) as response: + return await response.json() + + async def execute(self): + async with aiohttp.ClientSession() as session: + response = await self.create_event(session) + return EventResponse(events_received=response['events_received'], + fbtrace_id=response['fbtrace_id'], + messages=response['messages']) + + def normalize(self): + normalized_events = [] + for event in self.events: + normalized_event = event.normalize() + normalized_events.append(normalized_event) + + return json.dumps(normalized_events) + + def clone_without_events(self): + return EventRequestAsync( + pixel_id=self.pixel_id, + events=[], + test_event_code=self.test_event_code, + namespace_id=self.namespace_id, + upload_id=self.upload_id, + upload_tag=self.upload_tag, + upload_source=self.upload_source, + ) diff --git a/tap_facebook/facebook_business/adobjects/serverside/event_response.py b/tap_facebook/facebook_business/adobjects/serverside/event_response.py new file mode 100644 index 0000000..36ea645 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/event_response.py @@ -0,0 +1,154 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import pprint +import re +import six + + +class EventResponse(object): + param_types = { + 'events_received': 'int', + 'messages': 'list[str]', + 'fbtrace_id': 'str' + } + + def __init__(self, events_received = None, messages = None, fbtrace_id = None): + # type: (int, List[str], str) -> None + + """Conversions API Event Response""" + self._events_received = None + self._messages = None + self._fbtrace_id = None + if events_received is not None: + self.events_received = events_received + if messages is not None: + self.messages = messages + if fbtrace_id is not None: + self.fbtrace_id = fbtrace_id + + @property + def events_received(self): + """Gets the count of events received. + + + :return: The count of events received.. + :rtype: int + """ + return self._events_received + + @events_received.setter + def events_received(self, events_received): + """Sets the count of events received. + + + :param events_received: The count of events received.. + :type: int + """ + + self._events_received = events_received + + @property + def messages(self): + """Gets the messages. + + + :return: The messages. + :rtype: list[str] + """ + return self._messages + + @messages.setter + def messages(self, messages): + """Sets the messages. + + + :param messages: The messages. + :type: list[str] + """ + + self._messages = messages + + @property + def fbtrace_id(self): + """Gets the Facebook API trace id. + + + :return: The Facebook API trace id. + :rtype: str + """ + return self._fbtrace_id + + @fbtrace_id.setter + def fbtrace_id(self, fbtrace_id): + """Sets the messages. + + + :param fbtrace_id: The Facebook API trace id. + :type: str + """ + + self._fbtrace_id = fbtrace_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.param_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EventResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EventResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/extended_device_info.py b/tap_facebook/facebook_business/adobjects/serverside/extended_device_info.py new file mode 100644 index 0000000..f9a4c1b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/extended_device_info.py @@ -0,0 +1,323 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +class ExtendedDeviceInfo(object): + + EXT_INFO_VERSION = 0 + APP_PACKAGE_NAME = 1 + SHORT_VERSION = 2 + LONG_VERSION = 3 + OS_VERSION = 4 + DEVICE_MODEL_NAME = 5 + LOCALE = 6 + TIMEZONE_ABBREVIATION = 7 + CARRIER = 8 + SCREEN_WIDTH = 9 + SCREEN_HEIGHT = 10 + SCREEN_DENSITY = 11 + CPU_CORE_COUNT = 12 + TOTAL_DISK_SPACE_GB = 13 + FREE_DISK_SPACE_GB = 14 + DEVICE_TIME_ZONE = 15 + + param_types = { + 'ext_info_version': 'str', + 'app_package_name': 'str', + 'short_version': 'str', + 'long_version': 'str', + 'os_version': 'str', + 'device_model_name': 'str', + 'locale': 'str', + 'timezone_abbreviation': 'str', + 'carrier': 'str', + 'screen_width': 'int', + 'screen_height': 'int', + 'screen_density': 'str', + 'cpu_core_count': 'int', + 'total_disk_space_gb': 'int', + 'free_disk_space_gb': 'int', + 'device_time_zone': 'str', + } + + def __init__( + self, + ext_info_version=None, + app_package_name=None, + short_version=None, + long_version=None, + os_version=None, + device_model_name=None, + locale=None, + timezone_abbreviation=None, + carrier=None, + screen_width=None, + screen_height=None, + screen_density=None, + cpu_core_count=None, + total_disk_space_gb=None, + free_disk_space_gb=None, + device_time_zone=None, + ): + # type: (str, str, str, str, str, str, str, str, str, int, int, str, int, int, int, str) -> None + + """ExtendedDeviceInfo""" + self._ext_info_version = None + self._app_package_name = None + self._short_version = None + self._long_version = None + self._os_version = None + self._device_model_name = None + self._locale = None + self._timezone_abbreviation = None + self._carrier = None + self._screen_width = None + self._screen_height = None + self._screen_density = None + self._cpu_core_count = None + self._total_disk_space_gb = None + self._free_disk_space_gb = None + self._device_time_zone = None + + if ext_info_version is not None: + self.ext_info_version = ext_info_version + if app_package_name is not None: + self.app_package_name = app_package_name + if short_version is not None: + self.short_version = short_version + if long_version is not None: + self.long_version = long_version + if os_version is not None: + self.os_version = os_version + if device_model_name is not None: + self.device_model_name = device_model_name + if locale is not None: + self.locale = locale + if timezone_abbreviation is not None: + self.timezone_abbreviation = timezone_abbreviation + if carrier is not None: + self.carrier = carrier + if screen_width is not None: + self.screen_width = screen_width + if screen_height is not None: + self.screen_height = screen_height + if screen_density is not None: + self.screen_density = screen_density + if cpu_core_count is not None: + self.cpu_core_count = cpu_core_count + if total_disk_space_gb is not None: + self.total_disk_space_gb = total_disk_space_gb + if free_disk_space_gb is not None: + self.free_disk_space_gb = free_disk_space_gb + if device_time_zone is not None: + self.device_time_zone = device_time_zone + + @property + def ext_info_version(self): + return self._ext_info_version + + @ext_info_version.setter + def ext_info_version(self, ext_info_version): + self._ext_info_version = ext_info_version + + @property + def app_package_name(self): + return self._app_package_name + + @app_package_name.setter + def app_package_name(self, app_package_name): + self._app_package_name = app_package_name + + @property + def short_version(self): + return self._short_version + + @short_version.setter + def short_version(self, short_version): + self._short_version = short_version + + @property + def long_version(self): + return self._long_version + + @long_version.setter + def long_version(self, long_version): + self._long_version = long_version + + @property + def os_version(self): + return self._os_version + + @os_version.setter + def os_version(self, os_version): + self._os_version = os_version + + @property + def device_model_name(self): + return self._device_model_name + + @device_model_name.setter + def device_model_name(self, device_model_name): + self._device_model_name = device_model_name + + @property + def locale(self): + return self._locale + + @locale.setter + def locale(self, locale): + self._locale = locale + + @property + def timezone_abbreviation(self): + return self._timezone_abbreviation + + @timezone_abbreviation.setter + def timezone_abbreviation(self, timezone_abbreviation): + self._timezone_abbreviation = timezone_abbreviation + + @property + def carrier(self): + return self._carrier + + @carrier.setter + def carrier(self, carrier): + self._carrier = carrier + + @property + def screen_width(self): + return self._screen_width + + @screen_width.setter + def screen_width(self, screen_width): + self._screen_width = screen_width + + @property + def screen_height(self): + return self._screen_height + + @screen_height.setter + def screen_height(self, screen_height): + self._screen_height = screen_height + + @property + def screen_density(self): + return self._screen_density + + @screen_density.setter + def screen_density(self, screen_density): + self._screen_density = screen_density + + @property + def cpu_core_count(self): + return self._cpu_core_count + + @cpu_core_count.setter + def cpu_core_count(self, cpu_core_count): + self._cpu_core_count = cpu_core_count + + @property + def total_disk_space_gb(self): + return self._total_disk_space_gb + + @total_disk_space_gb.setter + def total_disk_space_gb(self, total_disk_space_gb): + self._total_disk_space_gb = total_disk_space_gb + + @property + def free_disk_space_gb(self): + return self._free_disk_space_gb + + @free_disk_space_gb.setter + def free_disk_space_gb(self, free_disk_space_gb): + self._free_disk_space_gb = free_disk_space_gb + + @property + def device_time_zone(self): + return self._device_time_zone + + @device_time_zone.setter + def device_time_zone(self, device_time_zone): + self._device_time_zone = device_time_zone + + def normalize(self): + extended_device_info_array = [] + extended_device_info_array.insert(self.EXT_INFO_VERSION, self._ext_info_version) + extended_device_info_array.insert(self.APP_PACKAGE_NAME, self._app_package_name) + extended_device_info_array.insert(self.SHORT_VERSION, self._short_version) + extended_device_info_array.insert(self.LONG_VERSION, self._long_version) + extended_device_info_array.insert(self.OS_VERSION, self._os_version) + extended_device_info_array.insert(self.DEVICE_MODEL_NAME, self._device_model_name) + extended_device_info_array.insert(self.LOCALE, self._locale) + extended_device_info_array.insert(self.TIMEZONE_ABBREVIATION, self._timezone_abbreviation) + extended_device_info_array.insert(self.CARRIER, self._carrier) + extended_device_info_array.insert(self.SCREEN_WIDTH, self._screen_width) + extended_device_info_array.insert(self.SCREEN_HEIGHT, self._screen_height) + extended_device_info_array.insert(self.SCREEN_DENSITY, self._screen_density) + extended_device_info_array.insert(self.CPU_CORE_COUNT, self._cpu_core_count) + extended_device_info_array.insert(self.TOTAL_DISK_SPACE_GB, self._total_disk_space_gb) + extended_device_info_array.insert(self.FREE_DISK_SPACE_GB, self._free_disk_space_gb) + extended_device_info_array.insert(self.DEVICE_TIME_ZONE, self._device_time_zone) + return extended_device_info_array + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.param_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ExtendedDeviceInfo, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Event): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/gender.py b/tap_facebook/facebook_business/adobjects/serverside/gender.py new file mode 100644 index 0000000..6a5ab97 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/gender.py @@ -0,0 +1,26 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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 enum import Enum + + +class Gender(Enum): + MALE = 'm' + FEMALE = 'f' diff --git a/tap_facebook/facebook_business/adobjects/serverside/http_method.py b/tap_facebook/facebook_business/adobjects/serverside/http_method.py new file mode 100644 index 0000000..ea7783b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/http_method.py @@ -0,0 +1,25 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +class HttpMethod: + POST = 'POST' + PUT = 'PUT' + GET = 'GET' + DELETE = 'DELETE' diff --git a/tap_facebook/facebook_business/adobjects/serverside/http_service_interface.py b/tap_facebook/facebook_business/adobjects/serverside/http_service_interface.py new file mode 100644 index 0000000..1c44541 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/http_service_interface.py @@ -0,0 +1,26 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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 abc import ABC, abstractmethod + +class HttpServiceInterface(ABC): + @abstractmethod + def execute(self, url, method, request_options, headers, params): + pass diff --git a/tap_facebook/facebook_business/adobjects/serverside/messaging_channel.py b/tap_facebook/facebook_business/adobjects/serverside/messaging_channel.py new file mode 100644 index 0000000..ce0572c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/messaging_channel.py @@ -0,0 +1,32 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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 enum import Enum + + +# 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/tap_facebook/facebook_business/adobjects/serverside/normalize.py b/tap_facebook/facebook_business/adobjects/serverside/normalize.py new file mode 100644 index 0000000..3fcd3a3 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/normalize.py @@ -0,0 +1,203 @@ +# coding=utf-8 +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import datetime +import hashlib +import pycountry +import re + +# defined regex for normalization of data +location_excluded_chars = re.compile(r"[0-9.\s\-()]") +isocode_included_chars = re.compile(r"[^a-z]") +email_pattern = re.compile(r".+@.+\..+") +md5_pattern = re.compile(r"^[a-f0-9]{32}$") +sha256_pattern = re.compile(r"^[a-f0-9]{64}$") +year_pattern = re.compile(r"^[0-9]{4}$") + +class Normalize(object): + + + @staticmethod + def normalize_field(field, data): + return Normalize.normalize(field, data, True) + + @staticmethod + def normalize_field_skip_hashing(field, data): + return Normalize.normalize(field, data, False) + + @staticmethod + def normalize(field, data, hash_field): + """Computes the normalized value for the given field type and data. + + :param field: The field name that is being normalized. + :param data: The data that is being normalized. + :return: Normalized value. + :rtype: str + """ + if field is None: + raise TypeError('Field Type must be passed for Normalization') + if data is None or len(data) == 0: + return None + + normalized_data = data.lower().strip() + if Normalize.is_already_hashed(normalized_data): + return normalized_data + + if field == "em": + normalized_data = Normalize.validate_email(normalized_data) + + elif field == "ct": + # Remove numbers, space and period character + normalized_data = location_excluded_chars.sub("", normalized_data) + + elif field == "zp": + normalized_data = re.sub(r"\s","", normalized_data) + normalized_data = normalized_data.split("-")[0] + + elif field == "st": + # Remove numbers, space and period character + normalized_data = location_excluded_chars.sub("", normalized_data) + + elif field == "country": + # Remove any non-alpha characters from the data + normalized_data = isocode_included_chars.sub("", normalized_data) + if not Normalize.is_valid_country_code(normalized_data): + raise TypeError("Invalid format for country:'" + data + "'.Please follow ISO 2-letter ISO 3166-1 standard for representing country. eg: us") + + elif field == "currency": + # Remove any non-alpha characters from the data + normalized_data = isocode_included_chars.sub("", normalized_data) + if len(normalized_data) != 3: + raise TypeError("Invalid format for currency:'" + data + "'.Please follow ISO 3-letter ISO 4217 standard for representing currency. Eg: usd") + + elif field == "ph": + # Remove spaces and parenthesis within phone number + normalized_data = re.sub(r"[\s\-()]", "", normalized_data) + + # Removes the starting + and leading two 0's + normalized_data = re.sub(r"^\+?0{0,2}", "", normalized_data) + + international_number = Normalize.get_international_number(normalized_data) + + if international_number is None: + raise ValueError("Invalid format for phone number:'" + normalized_data + "'. Please check passed phone number.") + else: + normalized_data = international_number + + elif field == "f5first" or field == "f5last": + normalized_data = normalized_data[:5] + + elif field == "fi": + normalized_data = normalized_data[:1] + + elif field == "dobd": + if len(normalized_data) == 1: + normalized_data = '0' + normalized_data + + try: + dobd_int = int(normalized_data) + if dobd_int < 1 or dobd_int > 31: + raise ValueError + except ValueError: + raise ValueError("Invalid format for dobd: '%s'. Day should be specified in 'DD' format." % data) + + elif field == "dobm": + if len(normalized_data) == 1: + normalized_data = '0' + normalized_data + + try: + dobm_int = int(normalized_data) + if dobm_int < 1 or dobm_int > 12: + raise ValueError + except ValueError: + raise ValueError("Invalid format for dobm: '%s'. Month should be specified in 'MM' format." % data) + + elif field == "doby": + if not year_pattern.match(normalized_data): + raise ValueError("Invalid format for doby: '%s'. Year should be specified in 'YYYY' format." % data) + + if hash_field: + normalized_data = Normalize.hash_sha_256(normalized_data) + + return normalized_data + + """ + Validates the email field for RFC 5322 + :param token: The email token that is being validates. + :return: validated email value. + :rtype: str + """ + @staticmethod + def validate_email(email): + result = email_pattern.match(email) + if result is None: + raise TypeError('Invalid email format for the passed email:' + email + '.Please check the passed email format.') + return email + + """ + Checks if the given data is already hashed by MD5 or SHA256 Hash + :param data: The token that is being checked for hashed. + :return: boolean representing the {md5/sha256} hash state of the token. + :rtype: bool + """ + @staticmethod + def is_already_hashed(data): + md5_match = md5_pattern.match(data) + sha256_match = sha256_pattern.match(data) + if md5_match is None and sha256_match is None: + return False + return True + + @staticmethod + def hash_sha_256(input): + if input is None: + return None + input = input.encode('utf-8') + return hashlib.sha256(input).hexdigest() + + @staticmethod + def get_international_number(phone_number): + + # Removes the + and leading two 0's + phone_number = re.sub(r"^\+?0{0,2}", "", phone_number) + + if phone_number.startswith('0'): + return None + + # International Phone number with country calling code. + international_number_regex = re.compile(r'^\d{1,4}\(?\d{2,3}\)?\d{4,}$') + + matched_groups = international_number_regex.match(phone_number) + if matched_groups is None: + return None + + return matched_groups.group() + + """ + Checks if the given country code is present in the ISO list + :param country code: The code that is being checked for presence. + :return: boolean indicating whether country code is valid. + :rtype: bool + """ + @staticmethod + def is_valid_country_code(country_code): + country_data = pycountry.countries.get(alpha_2=country_code.upper()) + return country_data is not None diff --git a/tap_facebook/facebook_business/adobjects/serverside/request_options.py b/tap_facebook/facebook_business/adobjects/serverside/request_options.py new file mode 100644 index 0000000..97601ed --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/request_options.py @@ -0,0 +1,30 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +class RequestOptions: + def __init__(self, ca_bundle_path=None): + self.ca_bundle_path = ca_bundle_path + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RequestOptions): + return False + + return self.__dict__ == other.__dict__ diff --git a/tap_facebook/facebook_business/adobjects/serverside/user_data.py b/tap_facebook/facebook_business/adobjects/serverside/user_data.py new file mode 100644 index 0000000..8c7598d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/user_data.py @@ -0,0 +1,1209 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import pprint +import six + +from facebook_business.adobjects.serverside.gender import Gender +from facebook_business.adobjects.serverside.normalize import Normalize + + +class UserData(object): + multi_value_constructor_err = 'Cannot set both {} and {} parameters via constructor. Please set either the singular or plural parameter, not both.' + + param_types = { + 'emails': 'list[str]', + 'phones': 'list[str]', + 'genders': 'list[Gender]', + 'dates_of_birth': 'list[str]', + 'last_names': 'list[str]', + 'first_names': 'list[str]', + 'cities': 'list[str]', + 'states': 'list[str]', + 'country_codes': 'list[str]', + 'zip_codes': 'list[str]', + 'external_ids': 'list[str]', + 'client_ip_address': 'str', + 'client_user_agent': 'str', + 'fbc': 'str', + 'fbp': 'str', + 'subscription_id': 'str', + 'fb_login_id': 'str', + 'lead_id': 'str', + 'f5first': 'str', + 'f5last': 'str', + 'fi': 'str', + 'dobd': 'str', + 'dobm': 'str', + 'doby': 'str', + 'madid': 'str', + 'anon_id': 'str', + 'ctwa_clid': 'ctwa_clid', + 'page_id': 'page_id', + } + + def __init__( + self, + email=None, + phone=None, + gender=None, + date_of_birth=None, + last_name=None, + first_name=None, + city=None, + state=None, + country_code=None, + zip_code=None, + external_id=None, + client_ip_address=None, + client_user_agent=None, + fbc=None, + fbp=None, + subscription_id=None, + fb_login_id=None, + lead_id=None, + f5first=None, + f5last=None, + fi=None, + dobd=None, + dobm=None, + doby=None, + emails=None, + phones=None, + genders=None, + dates_of_birth=None, + last_names=None, + first_names=None, + cities=None, + states=None, + country_codes=None, + zip_codes=None, + 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, str, str) -> None + + """UserData is a set of identifiers Facebook can use for targeted attribution""" + self._emails = None + self._phones = None + self._genders = None + self._dates_of_birth = None + self._last_names = None + self._first_names = None + self._cities = None + self._states = None + self._country_codes = None + self._zip_codes = None + self._external_ids = None + self._client_ip_address = None + self._client_user_agent = None + self._fbc = None + self._fbp = None + self._subscription_id = None + self._fb_login_id = None + self._lead_id = None + self._f5first = None + self._f5last = None + self._fi = None + self._dobd = None + self._dobm = None + 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')) + if phone is not None and phones is not None: + raise ValueError(UserData.multi_value_constructor_err.format('phone', 'phones')) + if gender is not None and genders is not None: + raise ValueError(UserData.multi_value_constructor_err.format('gender', 'genders')) + if date_of_birth is not None and dates_of_birth is not None: + raise ValueError(UserData.multi_value_constructor_err.format('date_of_birth', 'dates_of_birth')) + if last_name is not None and last_names is not None: + raise ValueError(UserData.multi_value_constructor_err.format('last_name', 'last_names')) + if first_name is not None and first_names is not None: + raise ValueError(UserData.multi_value_constructor_err.format('first_name', 'first_names')) + if city is not None and cities is not None: + raise ValueError(UserData.multi_value_constructor_err.format('city', 'cities')) + if state is not None and states is not None: + raise ValueError(UserData.multi_value_constructor_err.format('state', 'states')) + if country_code is not None and country_codes is not None: + raise ValueError(UserData.multi_value_constructor_err.format('country_code', 'country_codes')) + if zip_code is not None and zip_codes is not None: + raise ValueError(UserData.multi_value_constructor_err.format('zip_code', 'zip_codes')) + if external_id is not None and external_ids is not None: + raise ValueError(UserData.multi_value_constructor_err.format('external_id', 'external_ids')) + + if email is not None: + self.email = email + elif emails is not None: + self.emails = emails + if phone is not None: + self.phone = phone + elif phones is not None: + self.phones = phones + if gender is not None: + self.gender = gender + elif genders is not None: + self.genders = genders + if date_of_birth is not None: + self.date_of_birth = date_of_birth + elif dates_of_birth is not None: + self.dates_of_birth = dates_of_birth + if last_name is not None: + self.last_name = last_name + elif last_names is not None: + self.last_names = last_names + if first_name is not None: + self.first_name = first_name + elif first_names is not None: + self.first_names = first_names + if city is not None: + self.city = city + elif cities is not None: + self.cities = cities + if state is not None: + self.state = state + elif states is not None: + self.states = states + if country_code is not None: + self.country_code = country_code + elif country_codes is not None: + self.country_codes = country_codes + if zip_code is not None: + self.zip_code = zip_code + elif zip_codes is not None: + self.zip_codes = zip_codes + if external_id is not None: + self.external_id = external_id + elif external_ids is not None: + self.external_ids = external_ids + + if client_ip_address is not None: + self.client_ip_address = client_ip_address + if client_user_agent is not None: + self.client_user_agent = client_user_agent + if fbc is not None: + self.fbc = fbc + if fbp is not None: + self.fbp = fbp + if subscription_id is not None: + self.subscription_id = subscription_id + if fb_login_id is not None: + self.fb_login_id = fb_login_id + if lead_id is not None: + self.lead_id = lead_id + if f5first is not None: + self.f5first = f5first + if f5last is not None: + self.f5last = f5last + if fi is not None: + self.fi = fi + if dobd is not None: + self.dobd = dobd + if dobm is not None: + self.dobm = dobm + if doby is not None: + self.doby = doby + if madid is not None: + 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): + """Gets the email. + + An email address, in lowercase. + + :return: The email. + :rtype: str + """ + return self._emails[0] if self._emails else None + + @email.setter + def email(self, email): + """Sets the email. + + An email address, in lowercase. + + :param email: The email. + :type: str + """ + + self._emails = [email] if email is not None else None + + @property + def emails(self): + """Gets the emails. + + A list of email addresses, in lowercase. + + :return: The emails. + :rtype: list[str] + """ + return self._emails + + @emails.setter + def emails(self, emails): + """Sets the emails. + + A list of email addresses, in lowercase. + + :param emails: A list of emails. + :type: list[str] + """ + + self._emails = emails + + @property + def phone(self): + """Gets the phone. + + A phoneone number. Include only digits with country code, area code, and number. + + :return: The phone. + :rtype: str + """ + return self._phones[0] if self._phones else None + + @phone.setter + def phone(self, phone): + """Sets the phone. + + A phone number. Include only digits with country code, area code, and number. + + :param phone: The phone. + :type: str + """ + + self._phones = [phone] if phone is not None else None + + @property + def phones(self): + """Gets the phones. + + A list of phone numbers. Include only digits with country code, area code, and number. + + :return: The phone numbers. + :rtype: list[str] + """ + return self._phones + + @phones.setter + def phones(self, phones): + """Sets the phones. + + A list of phone numbers. Include only digits with country code, area code, and number. + + :param phones: A list of phones. + :type: list[str] + """ + + self._phones = phones + + @property + def gender(self): + """Gets the gender. + + Gender, in lowercase. Either f or m. + + :return: The gender. + :rtype: Gender + """ + return self._genders[0] if self._genders else None + + @gender.setter + def gender(self, gender): + """Sets the gender. + + Gender, in lowercase. Either f or m. + + :param gender: The gender. + :type: Gender + """ + if gender is None: + return + if not isinstance(gender, Gender): + raise TypeError('UserData.gender must be of type Gender') + + self._genders = [gender] + + @property + def genders(self): + """Gets the genders. + + A list of genders, in lowercase. Either f or m. + + :return: A list of genders. + :rtype: list[Gender] + """ + return self._genders + + @genders.setter + def genders(self, genders): + """Sets the genders. + + A list of Genders, in lowercase. Either f or m. + + :param genders: The genders. + :type: Gender + """ + if genders and not (all(isinstance(gender, Gender) for gender in genders)): + raise TypeError('UserData.genders must be of type list[Gender]') + + self._genders = genders + + @property + def date_of_birth(self): + """Gets the date of birth. + + A date of birth given as YYYYMMDD. + + + :return: The date of birth. + :rtype: str + """ + return self._dates_of_birth[0] if self._dates_of_birth else None + + @date_of_birth.setter + def date_of_birth(self, date_of_birth): + """Sets the date of birth. + + A date of birth given as YYYYMMDD. + + :param date_of_birth: The date of birth. + :type: str + """ + + self._dates_of_birth = [date_of_birth] if date_of_birth is not None else None + + @property + def dates_of_birth(self): + """Gets the dates of birth. + + A list of dates of birth given as YYYYMMDD. + + + :return: The dates of birth. + :rtype: list[str] + """ + return self._dates_of_birth + + @dates_of_birth.setter + def dates_of_birth(self, dates_of_birth): + """Sets the dates of birth. + + A list of dates of birth given as YYYYMMDD. + + :param dates_of_birth: The dates of birth. + :type: list[str] + """ + + self._dates_of_birth = dates_of_birth + + @property + def last_name(self): + """Gets the last_name. + + A last name in lowercase. + + :return: The last name. + :rtype: str + """ + return self._last_names[0] if self._last_names else None + + @last_name.setter + def last_name(self, last_name): + """Sets the last name. + + A last name in lowercase. + + :param last_name: The last name. + :type: str + """ + + self._last_names = [last_name] if last_name is not None else None + + @property + def last_names(self): + """Gets the last_names. + + A list of last names in lowercase. + + :return: The last names. + :rtype: list[str] + """ + return self._last_names + + @last_names.setter + def last_names(self, last_names): + """Sets the last names. + + A list of last names in lowercase. + + :param last_names: The last names. + :type: list[str] + """ + + self._last_names = last_names + + @property + def first_name(self): + """Gets the first name. + + A first name in lowercase. + + :return: The first name. + :rtype: str + """ + return self._first_names[0] if self._first_names else None + + @first_name.setter + def first_name(self, first_name): + """Sets the first name. + + A first name in lowercase. + + :param first_name: The first name. + :type: str + """ + + self._first_names = [first_name] if first_name is not None else None + + @property + def first_names(self): + """Gets the first names. + + A list of first names in lowercase. + + :return: The first names. + :rtype: list[str] + """ + return self._first_names + + @first_names.setter + def first_names(self, first_names): + """Sets the first names. + + A list of first names in lowercase. + + :param first_names: The first names. + :type: list[str] + """ + + self._first_names = first_names + + @property + def city(self): + """Gets the city. + + A city in lower-case without spaces or punctuation. + + :return: The city. + :rtype: str + """ + return self._cities[0] if self._cities else None + + @city.setter + def city(self, city): + """Sets the city. + + A city in lower-case without spaces or punctuation. + + :param city: The city. + :type: str + """ + + self._cities = [city] if city is not None else None + + @property + def cities(self): + """Gets the cities. + + A list of cities in lower-case without spaces or punctuation. + + :return: The cities. + :rtype: list[str] + """ + return self._cities + + @cities.setter + def cities(self, cities): + """Sets the cities. + + A list of cities in lower-case without spaces or punctuation. + + :param cities: The cities. + :type: list[str] + """ + + self._cities = cities + + @property + def state(self): + """Gets the state. + + A two-letter state code in lowercase. + + :return: The state. + :rtype: str + """ + return self._states[0] if self._states else None + + @state.setter + def state(self, state): + """Sets the state. + + A two-letter state code in lowercase. + + :param state: The state. + :type: str + """ + + self._states = [state] if state is not None else None + + @property + def states(self): + """Gets the states. + + A list of two-letter state codes in lowercase. + + :return: The states. + :rtype: list[str] + """ + return self._states + + @states.setter + def states(self, states): + """Sets the states. + + A list of two-letter state codes in lowercase. + + :param states: The states. + :type: list[str] + """ + + self._states = states + + @property + def country_code(self): + """Gets the country code. + + A two-letter country code in lowercase + + :return: The country code. + :rtype: str + """ + return self._country_codes[0] if self._country_codes else None + + @country_code.setter + def country_code(self, country_code): + """Sets a two-letter country code in lowercase. + + :param country_code: The country code + :type: str + """ + + self._country_codes = [country_code] if country_code is not None else None + + @property + def country_codes(self): + """Gets the country codes. + + A list of two-letter country codes in lowercase + + :return: The country codes. + :rtype: list[str] + """ + return self._country_codes + + @country_codes.setter + def country_codes(self, country_codes): + """Sets a list of two-letter country codes in lowercase. + + :param country_codes: The country codes + :type: list[str] + """ + + self._country_codes = country_codes + + @property + def zip_code(self): + """Gets the zipcode. + + TFor the United States, this is a five-digit zip code. + For other locations, follow each country's standards. + + :return: The zipcode. + :rtype: str + """ + return self._zip_codes[0] if self._zip_codes else None + + @zip_code.setter + def zip_code(self, zip_code): + """Sets the zipcode. + + For the United States, this is a five-digit zip code. + For other locations, follow each country's standards. + + :param zip_code: The zipcode. + :type: str + """ + + self._zip_codes = [zip_code] if zip_code is not None else None + + @property + def zip_codes(self): + """Gets the zipcodes. + + For the United States, this is a list of five-digit zip codes. + For other locations, follow each country's standards. + + :return: The zipcodes. + :rtype: list[str] + """ + return self._zip_codes + + @zip_codes.setter + def zip_codes(self, zip_codes): + """Sets the zipcodes. + + For the United States, this is a list of five-digit zip codes. + For other locations, follow each country's standards. + + :param zip_codes: The zipcodes. + :type: list[str] + """ + + self._zip_codes = zip_codes + + @property + def external_id(self): + """Gets the external id. + + Any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. + In the Offline Conversions API (https://www.facebook.com/business/help/104039186799009), + this is known as extern_id. For more information, see Offline Conversions, Providing External IDs. If + External ID is being sent via other channels, then it should be sent in the same format via the Conversions API. + + :return: The external id. + :rtype: str + """ + return self._external_ids[0] if self._external_ids else None + + @external_id.setter + def external_id(self, external_id): + """Sets the external id. + + Any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. + In the Offline Conversions API (https://www.facebook.com/business/help/104039186799009), + this is known as extern_id. For more information, see Offline Conversions, Providing External IDs. If + External ID is being sent via other channels, then it should be sent in the same format via the Conversions API. + + :param external_id: The external id. + :type: str + """ + + self._external_ids = [external_id] if external_id is not None else None + + @property + def external_ids(self): + """Gets the external ids. + + A list of any unique IDs from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. + In the Offline Conversions API (https://www.facebook.com/business/help/104039186799009), + this is known as extern_id. For more information, see Offline Conversions, Providing External IDs. If + External ID is being sent via other channels, then it should be sent in the same format via the Conversions API. + + :return: The external ids. + :rtype: list[str] + """ + return self._external_ids + + @external_ids.setter + def external_ids(self, external_ids): + """Sets the external ids. + + A list of any unique IDs from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. + In the Offline Conversions API (https://www.facebook.com/business/help/104039186799009), + this is known as extern_id. For more information, see Offline Conversions, Providing External IDs. If + External ID is being sent via other channels, then it should be sent in the same format via the Conversions API. + + :param external_ids: The external ids. + :type: list[str] + """ + + self._external_ids = external_ids + + @property + def client_ip_address(self): + """Gets the client ip address. + + The IP address of the browser corresponding to the event. + + :return: The client ip address. + :rtype: str + """ + return self._client_ip_address + + @client_ip_address.setter + def client_ip_address(self, client_ip_address): + """Sets the client ip address. + + The IP address of the browser corresponding to the event. + + :param client_ip_address: The client ip address. + :type: str + """ + + self._client_ip_address = client_ip_address + + @property + def client_user_agent(self): + """Gets the client user agent. + + The user agent for the browser corresponding to the event. + + :return: The client user agent. + :rtype: str + """ + return self._client_user_agent + + @client_user_agent.setter + def client_user_agent(self, client_user_agent): + """Sets the client user agent. + + The user agent for the browser corresponding to the event. + + :param client_user_agent: The client user agent. + :type: str + """ + + self._client_user_agent = client_user_agent + + @property + def fbc(self): + """Gets the fbc. + + The Facebook click ID value stored in the _fbc browser cookie under your domain. + See Managing fbc and fbp Parameters for how to get this value + (https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc), + or generate this value from a fbclid query parameter. + + :return: The fbc. + :rtype: str + """ + return self._fbc + + @fbc.setter + def fbc(self, fbc): + """Sets the fbc. + + The Facebook click ID value stored in the _fbc browser cookie under your domain. + See Managing fbc and fbp Parameters for how to get this value + (https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc), + or generate this value from a fbclid query parameter. + + :param fbc: The fbc. + :type: str + """ + + self._fbc = fbc + + @property + def fbp(self): + """Gets the fbp. + + The Facebook browser ID value stored in the _fbp browser cookie under your domain. + See Managing fbc and fbp Parameters for how to get this value + (https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc), + or generate this value from a fbclid query parameter. + + :return: The fbp. + :rtype: str + """ + return self._fbp + + @fbp.setter + def fbp(self, fbp): + """Sets the fbp. + + The Facebook browser ID value stored in the _fbp browser cookie under your domain. + See Managing fbc and fbp Parameters for how to get this value + (https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc), + or generate this value from a fbclid query parameter. + + :param fbp: The fbp. + :type: str + """ + + self._fbp = fbp + + @property + def subscription_id(self): + """Gets the subscription id. + + The subscription ID for the user in this transaction. This is similar to the order ID for an individual product. + + :return: The subscription id. + :rtype: str + """ + return self._subscription_id + + @subscription_id.setter + def subscription_id(self, subscription_id): + """Sets the subscription id. + + The subscription ID for the user in this transaction. This is similar to the order ID for an individual product. + + :param subscription_id: The subscription id. + :type: str + """ + + self._subscription_id = subscription_id + + @property + def fb_login_id(self): + """Gets the Facebook login id. + + ID issued by Facebook when a person first logs into an instance of an app. This is also known as App-Scoped ID. + + :return: The Facebook login id. + :rtype: str + """ + return self._fb_login_id + + @fb_login_id.setter + def fb_login_id(self, fb_login_id): + """Sets the Facebook login id. + + ID issued by Facebook when a person first logs into an instance of an app. This is also known as App-Scoped ID. + + :param fb_login_id: The Facebook login id. + :type: str + """ + + self._fb_login_id = fb_login_id + + @property + def lead_id(self): + """Gets the lead_id. + + Lead ID is associated with a lead generated by Facebook's Lead Ads. + + :return: The lead_id. + :rtype: str + """ + return self._lead_id + + @lead_id.setter + def lead_id(self, lead_id): + """Sets the lead_id. + + Lead ID is associated with a lead generated by Facebook's Lead Ads. + + :param lead_id: The lead_id. + :type: str + """ + + self._lead_id = lead_id + + @property + def f5first(self): + """Gets the f5first. + + The first 5 characters of a first name. + + :return: f5first. + :rtype: str + """ + return self._f5first + + @f5first.setter + def f5first(self, f5first): + """Sets the f5first. + + The first 5 characters of a first name. + + :param f5first. + :type: str + """ + + self._f5first = f5first + + @property + def f5last(self): + """Gets the f5last. + + The first 5 characters of a last name. + + :return: f5last. + :rtype: str + """ + return self._f5last + + @f5last.setter + def f5last(self, f5last): + """Sets the f5last. + + The first 5 characters of a last name. + + :param f5last. + :type: str + """ + + self._f5last = f5last + + @property + def fi(self): + """Gets the fi. + + The first initial. + + :return: fi. + :rtype: str + """ + return self._fi + + @fi.setter + def fi(self, fi): + """Sets the fi. + + The first initial. + + :param fi. + :type: str + """ + + self._fi = fi + + @property + def dobd(self): + """Gets the dobd. + + The date of birth day. + + :return: dobd. + :rtype: str + """ + return self._dobd + + @dobd.setter + def dobd(self, dobd): + """Sets the dobd. + + The date of birth day. + + :param dobd. + :type: str + """ + + self._dobd = dobd + + @property + def dobm(self): + """Gets the dobm. + + The date of birth month. + + :return: dobm. + :rtype: str + """ + return self._dobm + + @dobm.setter + def dobm(self, dobm): + """Sets the dobm. + + The date of birth month. + + :param dobm. + :type: str + """ + + self._dobm = dobm + + @property + def doby(self): + """Gets the doby. + + The date of birth year. + + :return: doby. + :rtype: str + """ + return self._doby + + @doby.setter + def doby(self, doby): + """Sets the doby. + + The date of birth year. + + :param doby. + :type: str + """ + + self._doby = doby + + @property + def madid(self): + return self._madid + + @madid.setter + def madid(self, madid): + self._madid = madid + + @property + def anon_id(self): + return self._anon_id + + @anon_id.setter + 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), + 'db': self.__normalize_list('db', self.dates_of_birth), + 'ln': self.__normalize_list('ln', self.last_names), + 'fn': self.__normalize_list('fn', self.first_names), + 'ct': self.__normalize_list('ct', self.cities), + 'st': self.__normalize_list('st', self.states), + 'zp': self.__normalize_list('zp', self.zip_codes), + 'country': self.__normalize_list('country', self.country_codes), + 'external_id': self.__dedup_list(self.external_ids), + 'client_ip_address': self.client_ip_address, + 'client_user_agent': self.client_user_agent, + 'fbc': self.fbc, + 'fbp': self.fbp, + 'subscription_id': self.subscription_id, + 'fb_login_id': self.fb_login_id, + 'lead_id': self.lead_id, + 'f5first': Normalize.normalize_field('f5first', self.f5first), + 'f5last': Normalize.normalize_field('f5last', self.f5last), + 'fi': Normalize.normalize_field('fi', self.fi), + 'dobd': Normalize.normalize_field('dobd', self.dobd), + 'dobm': Normalize.normalize_field('dobm', self.dobm), + '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))) + + normalized_payload = {k: v for k, v in normalized_payload.items() if v is not None} + return normalized_payload + + def __normalize_list(self, field_name, value_list): + """Dedup, hash and normalize the given list. + + :type: field_name: str + :type value_list: list[str] + :rtype: dict + """ + if field_name is None or not value_list: + return None + normalized_list = list(map(lambda val: Normalize.normalize_field(field_name, val), value_list)) + return self.__dedup_list(normalized_list) + + def __dedup_list(self, value_list): + """Dedup the given list. + + :type value_list: list[str] + :rtype: dict + """ + if not value_list: + return None + return list(set(value_list)) + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.param_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserData, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/util.py b/tap_facebook/facebook_business/adobjects/serverside/util.py new file mode 100644 index 0000000..ae78fc4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/serverside/util.py @@ -0,0 +1,49 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import hmac +import hashlib +import os +import sys + +class Util: + + @staticmethod + def async_requests_available(): + return sys.version_info >= (3, 5, 3) + + @staticmethod + def ca_bundle_path(): + return os.path.join( + os.path.dirname(__file__), + '..', + '..', + 'fb_ca_chain_bundle.crt', + ) + + @staticmethod + def appsecret_proof(appsecret, access_token): + hmac_object = hmac.new( + appsecret.encode('utf-8'), + msg=access_token.encode('utf-8'), + digestmod=hashlib.sha256 + ) + + return hmac_object.hexdigest() diff --git a/tap_facebook/facebook_business/adobjects/shadowighashtag.py b/tap_facebook/facebook_business/adobjects/shadowighashtag.py new file mode 100644 index 0000000..52be31d --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/shadowigmediabuilder.py b/tap_facebook/facebook_business/adobjects/shadowigmediabuilder.py new file mode 100644 index 0000000..d620491 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/shadowigmediabuilder.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 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' + + 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', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/shadowigmediacollaborators.py b/tap_facebook/facebook_business/adobjects/shadowigmediacollaborators.py new file mode 100644 index 0000000..8099781 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/shadowigmediaproducttags.py b/tap_facebook/facebook_business/adobjects/shadowigmediaproducttags.py new file mode 100644 index 0000000..a73a19d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/shadowigmediaproducttags.py @@ -0,0 +1,57 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class ShadowIGMediaProductTags( + AbstractObject, +): + + def __init__(self, api=None): + super(ShadowIGMediaProductTags, self).__init__() + self._isShadowIGMediaProductTags = True + self._api = api + + class Field(AbstractObject.Field): + image_url = 'image_url' + is_checkout = 'is_checkout' + merchant_id = 'merchant_id' + name = 'name' + price_string = 'price_string' + product_id = 'product_id' + review_status = 'review_status' + stripped_price_string = 'stripped_price_string' + stripped_sale_price_string = 'stripped_sale_price_string' + x = 'x' + y = 'y' + + _field_types = { + 'image_url': 'string', + 'is_checkout': 'bool', + 'merchant_id': 'int', + 'name': 'string', + 'price_string': 'string', + 'product_id': 'int', + 'review_status': 'string', + 'stripped_price_string': 'string', + 'stripped_sale_price_string': 'string', + 'x': 'float', + 'y': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductsearch.py b/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductsearch.py new file mode 100644 index 0000000..5aacd8f --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductvariant.py b/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductvariant.py new file mode 100644 index 0000000..d65d778 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/shop.py b/tap_facebook/facebook_business/adobjects/shop.py new file mode 100644 index 0000000..b01e7fb --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/shop.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 Shop( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isShop = True + 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): + from facebook_business.utils import api_utils + if batch 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=Shop, + 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 = { + 'commerce_merchant_settings': 'CommerceMerchantSettings', + 'fb_sales_channel': 'Object', + 'id': 'string', + 'ig_sales_channel': 'Object', + 'is_onsite_enabled': 'bool', + 'shop_status': 'string', + 'workspace': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/splittestwinner.py b/tap_facebook/facebook_business/adobjects/splittestwinner.py new file mode 100644 index 0000000..6bcb12d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/splittestwinner.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 SplitTestWinner( + AbstractObject, +): + + def __init__(self, api=None): + super(SplitTestWinner, self).__init__() + self._isSplitTestWinner = True + self._api = api + + class Field(AbstractObject.Field): + ad_object_level = 'ad_object_level' + confidences = 'confidences' + winner_ad_object_id = 'winner_ad_object_id' + + _field_types = { + 'ad_object_level': 'string', + 'confidences': 'list>', + 'winner_ad_object_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/storecatalogsettings.py b/tap_facebook/facebook_business/adobjects/storecatalogsettings.py new file mode 100644 index 0000000..bfdaa12 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/storecatalogsettings.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 StoreCatalogSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isStoreCatalogSettings = True + super(StoreCatalogSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + page = 'page' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'catalog_store' + + # @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_catalog_store(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 + if batch 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=StoreCatalogSettings, + 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/tap_facebook/facebook_business/adobjects/stories.py b/tap_facebook/facebook_business/adobjects/stories.py new file mode 100644 index 0000000..d77d22a --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/systemuser.py b/tap_facebook/facebook_business/adobjects/systemuser.py new file mode 100644 index 0000000..87a0a57 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/systemuser.py @@ -0,0 +1,238 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 SystemUser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSystemUser = True + super(SystemUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + created_by = 'created_by' + created_time = 'created_time' + finance_permission = 'finance_permission' + id = 'id' + ip_permission = 'ip_permission' + name = 'name' + role = 'role' + system_user_id = 'system_user_id' + + class Role: + admin = 'ADMIN' + ads_rights_reviewer = 'ADS_RIGHTS_REVIEWER' + value_default = 'DEFAULT' + developer = 'DEVELOPER' + employee = 'EMPLOYEE' + finance_analyst = 'FINANCE_ANALYST' + finance_edit = 'FINANCE_EDIT' + finance_editor = 'FINANCE_EDITOR' + finance_view = 'FINANCE_VIEW' + manage = 'MANAGE' + partner_center_admin = 'PARTNER_CENTER_ADMIN' + partner_center_analyst = 'PARTNER_CENTER_ANALYST' + partner_center_education = 'PARTNER_CENTER_EDUCATION' + partner_center_marketing = 'PARTNER_CENTER_MARKETING' + partner_center_operations = 'PARTNER_CENTER_OPERATIONS' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'system_users' + + # @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_system_user(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=SystemUser, + 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_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='/assigned_ad_accounts', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessassetgroup import BusinessAssetGroup + param_types = { + 'contained_asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_business_asset_groups', + 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 get_assigned_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.') + from facebook_business.adobjects.page import Page + param_types = { + 'pages': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_pages', + 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_assigned_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_product_catalogs', + 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 = { + 'created_by': 'User', + 'created_time': 'datetime', + 'finance_permission': 'string', + 'id': 'string', + 'ip_permission': 'string', + 'name': 'string', + 'role': 'Role', + 'system_user_id': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Role'] = SystemUser.Role.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/tab.py b/tap_facebook/facebook_business/adobjects/tab.py new file mode 100644 index 0000000..e65cc37 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/tab.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 Tab( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isTab = True + super(Tab, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + application = 'application' + custom_image_url = 'custom_image_url' + custom_name = 'custom_name' + id = 'id' + image_url = 'image_url' + is_non_connection_landing_tab = 'is_non_connection_landing_tab' + is_permanent = 'is_permanent' + link = 'link' + name = 'name' + position = 'position' + + _field_types = { + 'application': 'Application', + 'custom_image_url': 'string', + 'custom_name': 'string', + 'id': 'string', + 'image_url': 'string', + 'is_non_connection_landing_tab': 'bool', + 'is_permanent': 'bool', + 'link': 'string', + 'name': 'string', + 'position': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targeting.py b/tap_facebook/facebook_business/adobjects/targeting.py new file mode 100644 index 0000000..eba803e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targeting.py @@ -0,0 +1,229 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class Targeting( + AbstractObject, +): + + def __init__(self, api=None): + super(Targeting, self).__init__() + self._isTargeting = True + self._api = api + + 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' + behaviors = 'behaviors' + brand_safety_content_filter_levels = 'brand_safety_content_filter_levels' + catalog_based_targeting = 'catalog_based_targeting' + cities = 'cities' + college_years = 'college_years' + connections = 'connections' + contextual_targeting_categories = 'contextual_targeting_categories' + countries = 'countries' + country = 'country' + country_groups = 'country_groups' + custom_audiences = 'custom_audiences' + device_platforms = 'device_platforms' + direct_install_devices = 'direct_install_devices' + dynamic_audience_ids = 'dynamic_audience_ids' + education_majors = 'education_majors' + education_schools = 'education_schools' + education_statuses = 'education_statuses' + effective_audience_network_positions = 'effective_audience_network_positions' + effective_device_platforms = 'effective_device_platforms' + effective_facebook_positions = 'effective_facebook_positions' + effective_instagram_positions = 'effective_instagram_positions' + effective_messenger_positions = 'effective_messenger_positions' + effective_publisher_platforms = 'effective_publisher_platforms' + engagement_specs = 'engagement_specs' + ethnic_affinity = 'ethnic_affinity' + exclude_reached_since = 'exclude_reached_since' + excluded_brand_safety_content_types = 'excluded_brand_safety_content_types' + excluded_connections = 'excluded_connections' + excluded_custom_audiences = 'excluded_custom_audiences' + excluded_dynamic_audience_ids = 'excluded_dynamic_audience_ids' + excluded_engagement_specs = 'excluded_engagement_specs' + excluded_geo_locations = 'excluded_geo_locations' + excluded_mobile_device_model = 'excluded_mobile_device_model' + excluded_product_audience_specs = 'excluded_product_audience_specs' + excluded_publisher_categories = 'excluded_publisher_categories' + excluded_publisher_list_ids = 'excluded_publisher_list_ids' + excluded_user_device = 'excluded_user_device' + exclusions = 'exclusions' + facebook_positions = 'facebook_positions' + family_statuses = 'family_statuses' + fb_deal_id = 'fb_deal_id' + flexible_spec = 'flexible_spec' + friends_of_connections = 'friends_of_connections' + genders = 'genders' + generation = 'generation' + geo_locations = 'geo_locations' + home_ownership = 'home_ownership' + home_type = 'home_type' + home_value = 'home_value' + household_composition = 'household_composition' + income = 'income' + industries = 'industries' + instagram_positions = 'instagram_positions' + instream_video_skippable_excluded = 'instream_video_skippable_excluded' + interested_in = 'interested_in' + interests = 'interests' + is_whatsapp_destination_ad = 'is_whatsapp_destination_ad' + keywords = 'keywords' + life_events = 'life_events' + locales = 'locales' + messenger_positions = 'messenger_positions' + moms = 'moms' + net_worth = 'net_worth' + office_type = 'office_type' + place_page_set_ids = 'place_page_set_ids' + political_views = 'political_views' + politics = 'politics' + product_audience_specs = 'product_audience_specs' + prospecting_audience = 'prospecting_audience' + publisher_platforms = 'publisher_platforms' + radius = 'radius' + 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' + user_device = 'user_device' + user_event = 'user_event' + user_os = 'user_os' + wireless_carrier = 'wireless_carrier' + work_employers = 'work_employers' + work_positions = 'work_positions' + zips = 'zips' + + class DevicePlatforms: + desktop = 'desktop' + mobile = 'mobile' + + class EffectiveDevicePlatforms: + desktop = 'desktop' + mobile = 'mobile' + + _field_types = { + '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', + 'behaviors': 'list', + 'brand_safety_content_filter_levels': 'list', + 'catalog_based_targeting': 'CatalogBasedTargeting', + 'cities': 'list', + 'college_years': 'list', + 'connections': 'list', + 'contextual_targeting_categories': 'list', + 'countries': 'list', + 'country': 'list', + 'country_groups': 'list', + 'custom_audiences': 'list', + 'device_platforms': 'list', + 'direct_install_devices': 'bool', + 'dynamic_audience_ids': 'list', + 'education_majors': 'list', + 'education_schools': 'list', + 'education_statuses': 'list', + 'effective_audience_network_positions': 'list', + 'effective_device_platforms': 'list', + 'effective_facebook_positions': 'list', + 'effective_instagram_positions': 'list', + 'effective_messenger_positions': 'list', + 'effective_publisher_platforms': 'list', + 'engagement_specs': 'list', + 'ethnic_affinity': 'list', + 'exclude_reached_since': 'list', + 'excluded_brand_safety_content_types': 'list', + 'excluded_connections': 'list', + 'excluded_custom_audiences': 'list', + 'excluded_dynamic_audience_ids': 'list', + 'excluded_engagement_specs': 'list', + 'excluded_geo_locations': 'TargetingGeoLocation', + 'excluded_mobile_device_model': 'list', + 'excluded_product_audience_specs': 'list', + 'excluded_publisher_categories': 'list', + 'excluded_publisher_list_ids': 'list', + 'excluded_user_device': 'list', + 'exclusions': 'FlexibleTargeting', + 'facebook_positions': 'list', + 'family_statuses': 'list', + 'fb_deal_id': 'string', + 'flexible_spec': 'list', + 'friends_of_connections': 'list', + 'genders': 'list', + 'generation': 'list', + 'geo_locations': 'TargetingGeoLocation', + 'home_ownership': 'list', + 'home_type': 'list', + 'home_value': 'list', + 'household_composition': 'list', + 'income': 'list', + 'industries': 'list', + 'instagram_positions': 'list', + 'instream_video_skippable_excluded': 'bool', + 'interested_in': 'list', + 'interests': 'list', + 'is_whatsapp_destination_ad': 'bool', + 'keywords': 'list', + 'life_events': 'list', + 'locales': 'list', + 'messenger_positions': 'list', + 'moms': 'list', + 'net_worth': 'list', + 'office_type': 'list', + 'place_page_set_ids': 'list', + 'political_views': 'list', + 'politics': 'list', + 'product_audience_specs': 'list', + 'prospecting_audience': 'TargetingProspectingAudience', + 'publisher_platforms': 'list', + 'radius': 'string', + 'regions': 'list', + 'relationship_statuses': 'list', + 'site_category': 'list', + 'targeting_automation': 'TargetingAutomation', + 'targeting_optimization': 'string', + 'targeting_relaxation_types': 'TargetingRelaxation', + 'user_adclusters': 'list', + 'user_device': 'list', + 'user_event': 'list', + 'user_os': 'list', + 'wireless_carrier': 'list', + 'work_employers': 'list', + 'work_positions': 'list', + 'zips': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['DevicePlatforms'] = Targeting.DevicePlatforms.__dict__.values() + field_enum_info['EffectiveDevicePlatforms'] = Targeting.EffectiveDevicePlatforms.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetingautomation.py b/tap_facebook/facebook_business/adobjects/targetingautomation.py new file mode 100644 index 0000000..fea25b5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetingautomation.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 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' + shared_audiences = 'shared_audiences' + value_expression = 'value_expression' + + _field_types = { + 'advantage_audience': 'unsigned int', + '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/tap_facebook/facebook_business/adobjects/targetingdynamicrule.py b/tap_facebook/facebook_business/adobjects/targetingdynamicrule.py new file mode 100644 index 0000000..354900b --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetingdynamicrule.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 TargetingDynamicRule( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingDynamicRule, self).__init__() + self._isTargetingDynamicRule = True + self._api = api + + class Field(AbstractObject.Field): + field_action_type = 'action.type' + ad_group_id = 'ad_group_id' + campaign_group_id = 'campaign_group_id' + campaign_id = 'campaign_id' + impression_count = 'impression_count' + page_id = 'page_id' + post = 'post' + retention_seconds = 'retention_seconds' + + _field_types = { + 'action.type': 'string', + 'ad_group_id': 'string', + 'campaign_group_id': 'string', + 'campaign_id': 'string', + 'impression_count': 'string', + 'page_id': 'string', + 'post': 'string', + 'retention_seconds': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocation.py b/tap_facebook/facebook_business/adobjects/targetinggeolocation.py new file mode 100644 index 0000000..e69a266 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocation.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 + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class TargetingGeoLocation( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocation, self).__init__() + self._isTargetingGeoLocation = True + self._api = api + + class Field(AbstractObject.Field): + cities = 'cities' + countries = 'countries' + country_groups = 'country_groups' + custom_locations = 'custom_locations' + electoral_districts = 'electoral_districts' + 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' + neighborhoods = 'neighborhoods' + places = 'places' + political_districts = 'political_districts' + regions = 'regions' + small_geo_areas = 'small_geo_areas' + subcities = 'subcities' + subneighborhoods = 'subneighborhoods' + zips = 'zips' + + _field_types = { + 'cities': 'list', + 'countries': 'list', + 'country_groups': 'list', + 'custom_locations': 'list', + 'electoral_districts': 'list', + 'geo_markets': 'list', + 'large_geo_areas': 'list', + 'location_cluster_ids': 'list', + 'location_expansion': 'TargetingGeoLocationLocationExpansion', + 'location_types': 'list', + 'medium_geo_areas': 'list', + 'metro_areas': 'list', + 'neighborhoods': 'list', + 'places': 'list', + 'political_districts': 'list', + 'regions': 'list', + 'small_geo_areas': 'list', + 'subcities': 'list', + 'subneighborhoods': 'list', + 'zips': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationcity.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationcity.py new file mode 100644 index 0000000..48fdb36 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationcity.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 TargetingGeoLocationCity( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationCity, self).__init__() + self._isTargetingGeoLocationCity = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + distance_unit = 'distance_unit' + key = 'key' + name = 'name' + radius = 'radius' + region = 'region' + region_id = 'region_id' + + _field_types = { + 'country': 'string', + 'distance_unit': 'string', + 'key': 'string', + 'name': 'string', + 'radius': 'unsigned int', + 'region': 'string', + 'region_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationcustomlocation.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationcustomlocation.py new file mode 100644 index 0000000..d9e51ee --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationcustomlocation.py @@ -0,0 +1,63 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +This class is auto-generated. + +For any issues or feature requests related to this class, please let us know on +github and we'll fix in our codegen framework. We'll not be able to accept +pull request for this class. +""" + +class TargetingGeoLocationCustomLocation( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationCustomLocation, self).__init__() + self._isTargetingGeoLocationCustomLocation = True + self._api = api + + class Field(AbstractObject.Field): + address_string = 'address_string' + country = 'country' + country_group = 'country_group' + custom_type = 'custom_type' + distance_unit = 'distance_unit' + key = 'key' + latitude = 'latitude' + longitude = 'longitude' + max_population = 'max_population' + min_population = 'min_population' + name = 'name' + primary_city_id = 'primary_city_id' + radius = 'radius' + region_id = 'region_id' + + _field_types = { + 'address_string': 'string', + 'country': 'string', + 'country_group': 'string', + 'custom_type': 'string', + 'distance_unit': 'string', + 'key': 'string', + 'latitude': 'float', + 'longitude': 'float', + 'max_population': 'int', + 'min_population': 'int', + 'name': 'string', + 'primary_city_id': 'int', + 'radius': 'float', + 'region_id': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py new file mode 100644 index 0000000..f3d2e2f --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationelectoraldistrict.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 TargetingGeoLocationElectoralDistrict( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationElectoralDistrict, self).__init__() + self._isTargetingGeoLocationElectoralDistrict = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + deprecation_code = 'deprecation_code' + electoral_district = 'electoral_district' + key = 'key' + name = 'name' + + _field_types = { + 'country': 'string', + 'deprecation_code': 'string', + 'electoral_district': 'string', + 'key': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationgeoentities.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationgeoentities.py new file mode 100644 index 0000000..5776e21 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationgeoentities.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 TargetingGeoLocationGeoEntities( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationGeoEntities, self).__init__() + self._isTargetingGeoLocationGeoEntities = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + key = 'key' + name = 'name' + region = 'region' + region_id = 'region_id' + + _field_types = { + 'country': 'string', + 'key': 'string', + 'name': 'string', + 'region': 'string', + 'region_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationcluster.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationcluster.py new file mode 100644 index 0000000..7ca227a --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationcluster.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 TargetingGeoLocationLocationCluster( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationLocationCluster, self).__init__() + self._isTargetingGeoLocationLocationCluster = True + self._api = api + + class Field(AbstractObject.Field): + key = 'key' + + _field_types = { + 'key': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationexpansion.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationexpansion.py new file mode 100644 index 0000000..045a660 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationexpansion.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 TargetingGeoLocationLocationExpansion( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationLocationExpansion, self).__init__() + self._isTargetingGeoLocationLocationExpansion = True + self._api = api + + class Field(AbstractObject.Field): + allowed = 'allowed' + + _field_types = { + 'allowed': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationmarket.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationmarket.py new file mode 100644 index 0000000..3446ab0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationmarket.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 TargetingGeoLocationMarket( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationMarket, self).__init__() + self._isTargetingGeoLocationMarket = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + key = 'key' + market_type = 'market_type' + name = 'name' + + _field_types = { + 'country': 'string', + 'key': 'string', + 'market_type': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationplace.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationplace.py new file mode 100644 index 0000000..67f0892 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationplace.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 TargetingGeoLocationPlace( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationPlace, self).__init__() + self._isTargetingGeoLocationPlace = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + distance_unit = 'distance_unit' + key = 'key' + latitude = 'latitude' + longitude = 'longitude' + name = 'name' + primary_city_id = 'primary_city_id' + radius = 'radius' + region_id = 'region_id' + + _field_types = { + 'country': 'string', + 'distance_unit': 'string', + 'key': 'string', + 'latitude': 'float', + 'longitude': 'float', + 'name': 'string', + 'primary_city_id': 'int', + 'radius': 'float', + 'region_id': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py new file mode 100644 index 0000000..b95c671 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.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 TargetingGeoLocationPoliticalDistrict( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationPoliticalDistrict, self).__init__() + self._isTargetingGeoLocationPoliticalDistrict = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + key = 'key' + name = 'name' + political_district = 'political_district' + + _field_types = { + 'country': 'string', + 'key': 'string', + 'name': 'string', + 'political_district': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationregion.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationregion.py new file mode 100644 index 0000000..8471a19 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationregion.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 TargetingGeoLocationRegion( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationRegion, self).__init__() + self._isTargetingGeoLocationRegion = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + key = 'key' + name = 'name' + + _field_types = { + 'country': 'string', + 'key': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationzip.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationzip.py new file mode 100644 index 0000000..d0d10d5 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetinggeolocationzip.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 TargetingGeoLocationZip( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingGeoLocationZip, self).__init__() + self._isTargetingGeoLocationZip = True + self._api = api + + class Field(AbstractObject.Field): + country = 'country' + key = 'key' + name = 'name' + primary_city_id = 'primary_city_id' + region_id = 'region_id' + + _field_types = { + 'country': 'string', + 'key': 'string', + 'name': 'string', + 'primary_city_id': 'int', + 'region_id': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetingproductaudiencespec.py b/tap_facebook/facebook_business/adobjects/targetingproductaudiencespec.py new file mode 100644 index 0000000..a4c2067 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetingproductaudiencespec.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 TargetingProductAudienceSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingProductAudienceSpec, self).__init__() + self._isTargetingProductAudienceSpec = True + self._api = api + + class Field(AbstractObject.Field): + exclusions = 'exclusions' + inclusions = 'inclusions' + product_set_id = 'product_set_id' + + _field_types = { + 'exclusions': 'list', + 'inclusions': 'list', + 'product_set_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetingproductaudiencesubspec.py b/tap_facebook/facebook_business/adobjects/targetingproductaudiencesubspec.py new file mode 100644 index 0000000..3bd43ef --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetingproductaudiencesubspec.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 TargetingProductAudienceSubSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingProductAudienceSubSpec, self).__init__() + self._isTargetingProductAudienceSubSpec = True + self._api = api + + class Field(AbstractObject.Field): + retention_seconds = 'retention_seconds' + rule = 'rule' + + _field_types = { + 'retention_seconds': 'string', + 'rule': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetingprospectingaudience.py b/tap_facebook/facebook_business/adobjects/targetingprospectingaudience.py new file mode 100644 index 0000000..1a2a9cf --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetingprospectingaudience.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 TargetingProspectingAudience( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingProspectingAudience, self).__init__() + self._isTargetingProspectingAudience = True + self._api = api + + class Field(AbstractObject.Field): + sources = 'sources' + + _field_types = { + 'sources': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetingrelaxation.py b/tap_facebook/facebook_business/adobjects/targetingrelaxation.py new file mode 100644 index 0000000..2c11114 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetingrelaxation.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 TargetingRelaxation( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingRelaxation, self).__init__() + self._isTargetingRelaxation = True + self._api = api + + class Field(AbstractObject.Field): + custom_audience = 'custom_audience' + lookalike = 'lookalike' + + _field_types = { + 'custom_audience': 'unsigned int', + 'lookalike': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/targetingsearch.py b/tap_facebook/facebook_business/adobjects/targetingsearch.py new file mode 100644 index 0000000..87c4e48 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetingsearch.py @@ -0,0 +1,85 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the 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 +from facebook_business.exceptions import FacebookBadObjectError +from facebook_business.session import FacebookSession + +class TargetingSearch(AbstractObject): + + class DemographicSearchClasses(object): + demographics = 'demographics' + ethnic_affinity = 'ethnic_affinity' + family_statuses = 'family_statuses' + generation = 'generation' + home_ownership = 'home_ownership' + home_type = 'home_type' + home_value = 'home_value' + household_composition = 'household_composition' + income = 'income' + industries = 'industries' + life_events = 'life_events' + markets = 'markets' + moms = 'moms' + net_worth = 'net_worth' + office_type = 'office_type' + politics = 'politics' + + class TargetingSearchTypes(object): + country = 'adcountry' + education = 'adeducationschool' + employer = 'adworkemployer' + geolocation = 'adgeolocation' + geometadata = 'adgeolocationmeta' + interest = 'adinterest' + interest_suggestion = 'adinterestsuggestion' + interest_validate = 'adinterestvalid' + keyword = 'adkeyword' + locale = 'adlocale' + major = 'adeducationmajor' + position = 'adworkposition' + radius_suggestion = 'adradiussuggestion' + targeting_category = 'adtargetingcategory' + zipcode = 'adzipcode' + + @classmethod + def search(cls, params=None, api=None): + api = api or FacebookAdsApi.get_default_api() + if not api: + raise FacebookBadObjectError( + "An Api instance must be provided as an argument or set as " + "the default Api in FacebookAdsApi.", + ) + + params = {} if not params else params.copy() + response = api.call( + FacebookAdsApi.HTTP_METHOD_GET, + "/".join(( + FacebookSession.GRAPH, + FacebookAdsApi.API_VERSION, + 'search' + )), + params, + ).json() + + ret_val = [] + if response: + keys = response['data'] + # The response object can be either a dictionary of dictionaries + # or a dictionary of lists. + if isinstance(keys, list): + for item in keys: + search_obj = TargetingSearch() + search_obj.update(item) + ret_val.append(search_obj) + elif isinstance(keys, dict): + for item in keys: + search_obj = TargetingSearch() + search_obj.update(keys[item]) + if keys[item]: + ret_val.append(search_obj) + return ret_val diff --git a/tap_facebook/facebook_business/adobjects/targetingsentenceline.py b/tap_facebook/facebook_business/adobjects/targetingsentenceline.py new file mode 100644 index 0000000..47becaf --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/targetingsentenceline.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 +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 TargetingSentenceLine( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isTargetingSentenceLine = True + super(TargetingSentenceLine, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + params = 'params' + targetingsentencelines = 'targetingsentencelines' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'targetingsentencelines' + + _field_types = { + 'id': 'string', + 'params': 'Targeting', + 'targetingsentencelines': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/textwithentities.py b/tap_facebook/facebook_business/adobjects/textwithentities.py new file mode 100644 index 0000000..cad92c0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/textwithentities.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 TextWithEntities( + AbstractObject, +): + + def __init__(self, api=None): + super(TextWithEntities, self).__init__() + self._isTextWithEntities = True + self._api = api + + class Field(AbstractObject.Field): + text = 'text' + + _field_types = { + 'text': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/trackingandconversionwithdefaults.py b/tap_facebook/facebook_business/adobjects/trackingandconversionwithdefaults.py new file mode 100644 index 0000000..3ef66a4 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/trackingandconversionwithdefaults.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 TrackingAndConversionWithDefaults( + AbstractObject, +): + + def __init__(self, api=None): + super(TrackingAndConversionWithDefaults, self).__init__() + self._isTrackingAndConversionWithDefaults = True + self._api = api + + class Field(AbstractObject.Field): + custom_conversion = 'custom_conversion' + custom_tracking = 'custom_tracking' + default_conversion = 'default_conversion' + default_tracking = 'default_tracking' + + _field_types = { + 'custom_conversion': 'list', + 'custom_tracking': 'list', + 'default_conversion': 'list', + 'default_tracking': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/unifiedthread.py b/tap_facebook/facebook_business/adobjects/unifiedthread.py new file mode 100644 index 0000000..72a0dbc --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/unifiedthread.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 UnifiedThread( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isUnifiedThread = True + super(UnifiedThread, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + can_reply = 'can_reply' + folder = 'folder' + former_participants = 'former_participants' + id = 'id' + is_subscribed = 'is_subscribed' + link = 'link' + linked_group = 'linked_group' + message_count = 'message_count' + name = 'name' + participants = 'participants' + scoped_thread_key = 'scoped_thread_key' + senders = 'senders' + snippet = 'snippet' + subject = 'subject' + unread_count = 'unread_count' + updated_time = 'updated_time' + wallpaper = 'wallpaper' + + class Platform: + instagram = 'INSTAGRAM' + messenger = 'MESSENGER' + + 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=UnifiedThread, + 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_messages(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'source': 'source_enum', + } + enums = { + 'source_enum': [ + 'ALL', + 'PARTICIPANTS', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/messages', + 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 = { + 'can_reply': 'bool', + 'folder': 'string', + 'former_participants': 'Object', + 'id': 'string', + 'is_subscribed': 'bool', + 'link': 'string', + 'linked_group': 'Group', + 'message_count': 'int', + 'name': 'string', + 'participants': 'Object', + 'scoped_thread_key': 'string', + 'senders': 'Object', + 'snippet': 'string', + 'subject': 'string', + 'unread_count': 'int', + 'updated_time': 'datetime', + 'wallpaper': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Platform'] = UnifiedThread.Platform.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/url.py b/tap_facebook/facebook_business/adobjects/url.py new file mode 100644 index 0000000..590e5c0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/url.py @@ -0,0 +1,120 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 URL( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isURL = True + super(URL, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + engagement = 'engagement' + id = 'id' + og_object = 'og_object' + ownership_permissions = 'ownership_permissions' + scopes = 'scopes' + + class Scopes: + news_tab = 'NEWS_TAB' + news_tab_dev_env = 'NEWS_TAB_DEV_ENV' + + 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=URL, + 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 = { + 'blacklist': 'bool', + 'denylist': 'bool', + 'hmac': 'string', + 'locale': 'list', + 'scopes': 'list', + 'ts': 'datetime', + } + enums = { + 'scopes_enum': URL.Scopes.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=URL, + 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 = { + 'engagement': 'Object', + 'id': 'string', + 'og_object': 'Object', + 'ownership_permissions': 'Object', + 'scopes': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Scopes'] = URL.Scopes.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/user.py b/tap_facebook/facebook_business/adobjects/user.py new file mode 100644 index 0000000..7fe2939 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/user.py @@ -0,0 +1,2237 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 User( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isUser = True + super(User, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + about = 'about' + age_range = 'age_range' + avatar_2d_profile_picture = 'avatar_2d_profile_picture' + birthday = 'birthday' + community = 'community' + cover = 'cover' + currency = 'currency' + education = 'education' + email = 'email' + favorite_athletes = 'favorite_athletes' + favorite_teams = 'favorite_teams' + first_name = 'first_name' + gender = 'gender' + hometown = 'hometown' + id = 'id' + id_for_avatars = 'id_for_avatars' + inspirational_people = 'inspirational_people' + 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' + local_news_megaphone_dismiss_status = 'local_news_megaphone_dismiss_status' + local_news_subscription_status = 'local_news_subscription_status' + locale = 'locale' + location = 'location' + meeting_for = 'meeting_for' + middle_name = 'middle_name' + name = 'name' + name_format = 'name_format' + payment_pricepoints = 'payment_pricepoints' + political = 'political' + profile_pic = 'profile_pic' + quotes = 'quotes' + relationship_status = 'relationship_status' + shared_login_upgrade_required_by = 'shared_login_upgrade_required_by' + short_name = 'short_name' + significant_other = 'significant_other' + sports = 'sports' + supports_donate_button_in_live_video = 'supports_donate_button_in_live_video' + third_party_id = 'third_party_id' + timezone = 'timezone' + token_for_business = 'token_for_business' + updated_time = 'updated_time' + verified = 'verified' + video_upload_limits = 'video_upload_limits' + website = 'website' + + class LocalNewsMegaphoneDismissStatus: + no = 'NO' + yes = 'YES' + + class LocalNewsSubscriptionStatus: + status_off = 'STATUS_OFF' + status_on = 'STATUS_ON' + + class Filtering: + ema = 'ema' + groups = 'groups' + groups_social = 'groups_social' + + class Type: + content_update = 'content_update' + generic = 'generic' + + 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=User, + 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 = { + 'emoji_color_pref': 'unsigned int', + 'firstname': 'string', + 'lastname': 'string', + 'local_news_megaphone_dismiss_status': 'local_news_megaphone_dismiss_status_enum', + 'local_news_subscription_status': 'local_news_subscription_status_enum', + 'name': 'string', + 'password': 'string', + } + enums = { + 'local_news_megaphone_dismiss_status_enum': User.LocalNewsMegaphoneDismissStatus.__dict__.values(), + 'local_news_subscription_status_enum': User.LocalNewsSubscriptionStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=User, + 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_access_tokens(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/access_tokens', + 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_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 = { + 'business_app': 'int', + 'page_id': 'string', + 'scope': 'list', + 'set_token_expires_in_60_days': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/access_tokens', + 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() + + def get_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.page import Page + param_types = { + 'is_place': 'bool', + 'is_promotable': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/accounts', + 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 create_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 = { + 'about': 'string', + 'address': 'string', + 'category': 'int', + 'category_enum': 'string', + 'category_list': 'list', + 'city_id': 'string', + 'coordinates': 'Object', + 'cover_photo': 'Object', + 'description': 'string', + 'ignore_coordinate_warnings': 'bool', + 'location': 'Object', + 'name': 'string', + 'phone': 'string', + 'picture': 'string', + 'website': 'string', + 'zip': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/accounts', + 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_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudy import AdStudy + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ad_studies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_ad_study(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.adstudy import AdStudy + param_types = { + 'cells': 'list', + 'client_business': 'string', + 'confidence_level': 'float', + 'cooldown_start_time': 'int', + 'description': 'string', + 'end_time': 'int', + 'name': 'string', + 'objectives': 'list', + 'observation_end_time': 'int', + 'start_time': 'int', + 'type': 'type_enum', + 'viewers': 'list', + } + enums = { + 'type_enum': AdStudy.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/ad_studies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdStudy, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdStudy, 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_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() + + def get_albums(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.album import Album + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/albums', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Album, + api_type='EDGE', + response_parser=ObjectParser(target_class=Album, 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_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.') + param_types = { + 'business_app': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/applications', + 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() + + def get_app_request_former_recipients(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.apprequestformerrecipient import AppRequestFormerRecipient + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/apprequestformerrecipients', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AppRequestFormerRecipient, + api_type='EDGE', + response_parser=ObjectParser(target_class=AppRequestFormerRecipient, 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_app_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.apprequest import AppRequest + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/apprequests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AppRequest, + api_type='EDGE', + response_parser=ObjectParser(target_class=AppRequest, 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_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='/assigned_ad_accounts', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessassetgroup import BusinessAssetGroup + param_types = { + 'contained_asset_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_business_asset_groups', + 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 get_assigned_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.') + from facebook_business.adobjects.page import Page + param_types = { + 'pages': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_pages', + 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_assigned_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_product_catalogs', + 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() + + def get_avatars(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/avatars', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Avatar, + api_type='EDGE', + response_parser=ObjectParser(target_class=Avatar, 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_business_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.businessuser import BusinessUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/business_users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessUser, 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_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.') + param_types = { + 'business': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/businesses', + 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_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.') + from facebook_business.adobjects.business import Business + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/businesses', + 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_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.') + from facebook_business.adobjects.business import Business + param_types = { + 'child_business_external_id': 'string', + 'email': 'string', + 'name': 'string', + 'primary_page': 'string', + 'sales_rep_email': 'string', + 'survey_business_type': 'survey_business_type_enum', + 'survey_num_assets': 'unsigned int', + 'survey_num_people': 'unsigned int', + 'timezone_id': 'unsigned int', + 'vertical': 'vertical_enum', + } + enums = { + 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), + 'vertical_enum': Business.Vertical.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/businesses', + 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_conversations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.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'], + method='GET', + endpoint='/conversations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UnifiedThread, + api_type='EDGE', + response_parser=ObjectParser(target_class=UnifiedThread, 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_custom_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.pageusermessagethreadlabel import PageUserMessageThreadLabel + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/custom_labels', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageUserMessageThreadLabel, + api_type='EDGE', + response_parser=ObjectParser(target_class=PageUserMessageThreadLabel, 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): + 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', + } + enums = { + 'type_enum': Event.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/events', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Event, + api_type='EDGE', + response_parser=ObjectParser(target_class=Event, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.post import Post + param_types = { + 'include_hidden': 'bool', + 'q': 'string', + 'show_expired': 'bool', + 'since': 'datetime', + 'until': 'datetime', + 'with': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/feed', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + api_type='EDGE', + response_parser=ObjectParser(target_class=Post, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.post import Post + param_types = { + 'actions': 'Object', + 'adaptive_type': 'string', + 'album_id': 'string', + 'android_key_hash': 'string', + 'animated_effect_id': 'unsigned int', + 'application_id': 'string', + 'asked_fun_fact_prompt_id': 'unsigned int', + 'asset3d_id': 'unsigned int', + 'associated_id': 'string', + 'attach_place_suggestion': 'bool', + 'attached_media': 'list', + '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', + 'child_attachments': 'list', + 'client_mutation_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', + 'connection_class': 'string', + 'content_attachment': 'string', + 'coordinates': 'Object', + 'cta_link': 'string', + 'cta_type': 'string', + 'description': 'string', + 'direct_share_status': 'unsigned int', + 'expanded_height': 'unsigned int', + 'expanded_width': 'unsigned int', + 'feed_targeting': 'Object', + 'formatting': 'formatting_enum', + 'fun_fact_prompt_id': 'unsigned int', + 'fun_fact_toastee_id': 'unsigned int', + 'height': 'unsigned int', + 'holiday_card': 'string', + 'home_checkin_city_id': 'Object', + 'image_crops': 'map', + 'implicit_with_tags': 'list', + 'instant_game_entry_point_data': 'string', + 'ios_bundle_id': 'string', + 'is_backout_draft': 'bool', + 'is_boost_intended': 'bool', + 'is_explicit_location': 'bool', + 'is_explicit_share': 'bool', + 'is_group_linking_post': 'bool', + 'is_photo_container': 'bool', + 'link': 'string', + 'location_source_id': 'string', + 'manual_privacy': 'bool', + 'message': 'string', + 'multi_share_end_card': 'bool', + 'multi_share_optimized': 'bool', + 'name': 'string', + 'nectar_module': 'string', + 'object_attachment': 'string', + 'offer_like_post_id': 'unsigned int', + 'og_action_type_id': 'string', + 'og_hide_object_attachment': 'bool', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'page_recommendation': 'string', + 'picture': 'string', + 'place': 'Object', + 'place_attachment_setting': 'place_attachment_setting_enum', + 'place_list': 'string', + 'place_list_data': 'list', + 'post_surfaces_blacklist': 'list', + 'posting_to_redspace': 'posting_to_redspace_enum', + 'privacy': 'string', + 'prompt_id': 'string', + 'prompt_tracking_string': 'string', + 'properties': 'Object', + 'proxied_app_id': 'string', + 'publish_event_id': 'unsigned int', + 'published': 'bool', + 'quote': 'string', + 'react_mode_metadata': 'string', + 'ref': 'list', + 'referenceable_image_ids': 'list', + 'referral_id': 'string', + 'scheduled_publish_time': 'datetime', + 'source': 'string', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'suggested_place_id': 'Object', + 'tags': 'list', + 'target_surface': 'target_surface_enum', + 'targeting': 'Object', + 'text_format_metadata': 'string', + 'text_format_preset_id': 'string', + 'text_only_place': 'string', + 'throwback_camera_roll_media': 'string', + 'thumbnail': 'file', + 'time_since_original_post': 'unsigned int', + 'title': 'string', + 'tracking_info': 'string', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'user_selected_tags': 'bool', + 'video_start_time_ms': 'unsigned int', + 'viewer_coordinates': 'Object', + 'width': 'unsigned int', + } + enums = { + 'backdated_time_granularity_enum': Post.BackdatedTimeGranularity.__dict__.values(), + 'formatting_enum': Post.Formatting.__dict__.values(), + 'place_attachment_setting_enum': Post.PlaceAttachmentSetting.__dict__.values(), + 'post_surfaces_blacklist_enum': Post.PostSurfacesBlacklist.__dict__.values(), + 'posting_to_redspace_enum': Post.PostingToRedspace.__dict__.values(), + 'target_surface_enum': Post.TargetSurface.__dict__.values(), + 'unpublished_content_type_enum': Post.UnpublishedContentType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/feed', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + api_type='EDGE', + response_parser=ObjectParser(target_class=Post, 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_friends(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'uid': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/friends', + 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() + + def get_fundraisers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.fundraiserpersontocharity import FundraiserPersonToCharity + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/fundraisers', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FundraiserPersonToCharity, + api_type='EDGE', + response_parser=ObjectParser(target_class=FundraiserPersonToCharity, 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_fundraiser(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.fundraiserpersontocharity import FundraiserPersonToCharity + param_types = { + 'charity_id': 'string', + 'cover_photo': 'file', + 'currency': 'string', + 'description': 'string', + 'end_time': 'int', + 'external_event_name': 'string', + 'external_event_start_time': 'int', + 'external_event_uri': 'string', + 'external_fundraiser_uri': 'string', + 'external_id': 'string', + 'fundraiser_type': 'fundraiser_type_enum', + 'goal_amount': 'int', + 'name': 'string', + 'page_id': 'string', + } + enums = { + 'fundraiser_type_enum': FundraiserPersonToCharity.FundraiserType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/fundraisers', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FundraiserPersonToCharity, + api_type='EDGE', + response_parser=ObjectParser(target_class=FundraiserPersonToCharity, 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.group import Group + param_types = { + 'admin_only': 'bool', + 'parent': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/groups', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Group, + api_type='EDGE', + response_parser=ObjectParser(target_class=Group, 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_ids_for_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.') + from facebook_business.adobjects.useridforapp import UserIDForApp + param_types = { + 'app': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ids_for_apps', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UserIDForApp, + api_type='EDGE', + response_parser=ObjectParser(target_class=UserIDForApp, 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_ids_for_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.') + from facebook_business.adobjects.useridforapp import UserIDForApp + param_types = { + 'app': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ids_for_business', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UserIDForApp, + api_type='EDGE', + response_parser=ObjectParser(target_class=UserIDForApp, 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_ids_for_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.') + from facebook_business.adobjects.useridforpage import UserIDForPage + param_types = { + 'page': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ids_for_pages', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UserIDForPage, + api_type='EDGE', + response_parser=ObjectParser(target_class=UserIDForPage, 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'target_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/likes', + 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_live_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.livevideo import LiveVideo + param_types = { + 'broadcast_status': 'list', + 'source': 'source_enum', + } + enums = { + 'broadcast_status_enum': LiveVideo.BroadcastStatus.__dict__.values(), + 'source_enum': LiveVideo.Source.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/live_videos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideo, 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_live_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.livevideo import LiveVideo + param_types = { + 'content_tags': 'list', + 'description': 'string', + 'enable_backup_ingest': 'bool', + 'encoding_settings': 'string', + 'event_params': 'Object', + 'fisheye_video_cropped': 'bool', + 'front_z_rotation': 'float', + 'is_audio_only': 'bool', + 'is_spherical': 'bool', + 'original_fov': 'unsigned int', + 'privacy': 'string', + 'projection': 'projection_enum', + 'published': 'bool', + 'schedule_custom_profile_image': 'file', + 'spatial_audio_format': 'spatial_audio_format_enum', + 'status': 'status_enum', + 'stereoscopic_mode': 'stereoscopic_mode_enum', + 'stop_on_delete_stream': 'bool', + 'stream_type': 'stream_type_enum', + 'title': 'string', + } + enums = { + 'projection_enum': LiveVideo.Projection.__dict__.values(), + 'spatial_audio_format_enum': LiveVideo.SpatialAudioFormat.__dict__.values(), + 'status_enum': LiveVideo.Status.__dict__.values(), + 'stereoscopic_mode_enum': LiveVideo.StereoscopicMode.__dict__.values(), + 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/live_videos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LiveVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=LiveVideo, 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_desktop_performance_trace(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/messenger_desktop_performance_traces', + 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() + + def get_music(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'target_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/music', + 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 create_notification(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'bot_message_payload_elements': 'string', + 'filtering': 'list', + 'href': 'Object', + 'label': 'string', + 'message': 'map', + 'notif_ids': 'list', + 'payload': 'string', + 'read': 'bool', + 'ref': 'string', + 'schedule_interval': 'unsigned int', + 'seen': 'bool', + 'template': 'Object', + 'type': 'type_enum', + } + enums = { + 'filtering_enum': User.Filtering.__dict__.values(), + 'type_enum': User.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/notifications', + 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() + + def get_payment_transactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.paymentenginepayment import PaymentEnginePayment + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/payment_transactions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PaymentEnginePayment, + api_type='EDGE', + response_parser=ObjectParser(target_class=PaymentEnginePayment, 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_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.') + param_types = { + 'permission': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/permissions', + 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_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.permission import Permission + param_types = { + 'permission': 'string', + 'status': 'status_enum', + } + enums = { + 'status_enum': Permission.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/permissions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Permission, + api_type='EDGE', + response_parser=ObjectParser(target_class=Permission, 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_personal_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='/personal_ad_accounts', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.photo import Photo + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': Photo.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/photos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Photo, + api_type='EDGE', + response_parser=ObjectParser(target_class=Photo, 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_photo(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.photo import Photo + param_types = { + 'aid': 'string', + 'allow_spherical_photo': 'bool', + 'alt_text_custom': 'string', + 'android_key_hash': 'string', + 'application_id': 'string', + 'attempt': 'unsigned int', + 'audience_exp': 'bool', + 'backdated_time': 'datetime', + 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'caption': 'string', + 'composer_session_id': 'string', + 'direct_share_status': 'unsigned int', + 'feed_targeting': 'Object', + 'filter_type': 'unsigned int', + 'full_res_is_coming_later': 'bool', + 'initial_view_heading_override_degrees': 'unsigned int', + 'initial_view_pitch_override_degrees': 'unsigned int', + 'initial_view_vertical_fov_override_degrees': 'unsigned int', + 'ios_bundle_id': 'string', + 'is_explicit_location': 'bool', + 'is_explicit_place': 'bool', + 'manual_privacy': 'bool', + 'message': 'string', + 'name': 'string', + 'no_story': 'bool', + 'offline_id': 'unsigned int', + 'og_action_type_id': 'string', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_set_profile_badge': 'bool', + 'og_suggestion_mechanism': 'string', + 'place': 'Object', + 'privacy': 'string', + 'profile_id': 'int', + 'proxied_app_id': 'string', + 'published': 'bool', + 'qn': 'string', + 'spherical_metadata': 'map', + 'sponsor_id': 'string', + 'sponsor_relationship': 'unsigned int', + 'tags': 'list', + 'target_id': 'int', + 'targeting': 'Object', + 'time_since_original_post': 'unsigned int', + 'uid': 'int', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'url': 'string', + 'user_selected_tags': 'bool', + 'vault_image_id': 'string', + } + enums = { + 'backdated_time_granularity_enum': Photo.BackdatedTimeGranularity.__dict__.values(), + 'unpublished_content_type_enum': Photo.UnpublishedContentType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/photos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Photo, + api_type='EDGE', + response_parser=ObjectParser(target_class=Photo, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.profilepicturesource import ProfilePictureSource + param_types = { + 'height': 'int', + 'redirect': 'bool', + 'type': 'type_enum', + 'width': 'int', + } + enums = { + 'type_enum': ProfilePictureSource.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/picture', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProfilePictureSource, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProfilePictureSource, 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_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.') + from facebook_business.adobjects.post import Post + param_types = { + 'include_hidden': 'bool', + 'q': 'string', + 'show_expired': 'bool', + 'since': 'datetime', + 'until': 'datetime', + 'with': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/posts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Post, + api_type='EDGE', + response_parser=ObjectParser(target_class=Post, 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_rich_media_documents(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.canvas import Canvas + param_types = { + 'query': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/rich_media_documents', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Canvas, + api_type='EDGE', + response_parser=ObjectParser(target_class=Canvas, 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_staging_resource(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'file': 'file', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/staging_resources', + 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() + + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.advideo import AdVideo + param_types = { + 'type': 'type_enum', + } + enums = { + 'type_enum': AdVideo.Type.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + 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) + + if batch is 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 = { + 'adaptive_type': 'string', + 'animated_effect_id': 'unsigned int', + 'application_id': 'string', + 'asked_fun_fact_prompt_id': 'unsigned int', + 'audio_story_wave_animation_handle': '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_tools': 'string', + 'description': 'string', + 'direct_share_status': 'unsigned int', + '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_explicit_share': 'bool', + 'is_group_linking_post': 'bool', + 'is_voice_clip': 'bool', + 'location_source_id': 'string', + 'manual_privacy': 'bool', + 'no_story': 'bool', + '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', + 'privacy': 'string', + 'publish_event_id': 'unsigned int', + 'react_mode_metadata': 'string', + 'referenced_sticker_id': 'string', + 'replace_video_id': 'string', + 'slideshow_spec': 'map', + 'source': 'string', + 'source_instagram_media_id': 'string', + 'spherical': 'bool', + 'sponsor_id': 'string', + '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', + '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(), + } + 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) + + if batch is 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 = { + 'about': 'string', + 'age_range': 'AgeRange', + 'avatar_2d_profile_picture': 'AvatarProfilePicture', + 'birthday': 'string', + 'community': 'Group', + 'cover': 'UserCoverPhoto', + 'currency': 'Currency', + 'education': 'list', + 'email': 'string', + 'favorite_athletes': 'list', + 'favorite_teams': 'list', + 'first_name': 'string', + 'gender': 'string', + 'hometown': 'Page', + 'id': 'string', + 'id_for_avatars': 'string', + 'inspirational_people': 'list', + 'install_type': 'string', + 'installed': 'bool', + 'is_guest_user': 'bool', + 'is_work_account': 'bool', + 'languages': 'list', + 'last_name': 'string', + 'link': 'string', + 'local_news_megaphone_dismiss_status': 'bool', + 'local_news_subscription_status': 'bool', + 'locale': 'string', + 'location': 'Page', + 'meeting_for': 'list', + 'middle_name': 'string', + 'name': 'string', + 'name_format': 'string', + 'payment_pricepoints': 'PaymentPricepoints', + 'political': 'string', + 'profile_pic': 'string', + 'quotes': 'string', + 'relationship_status': 'string', + 'shared_login_upgrade_required_by': 'datetime', + 'short_name': 'string', + 'significant_other': 'User', + 'sports': 'list', + 'supports_donate_button_in_live_video': 'bool', + 'third_party_id': 'string', + 'timezone': 'float', + 'token_for_business': 'string', + 'updated_time': 'datetime', + 'verified': 'bool', + 'video_upload_limits': 'VideoUploadLimits', + 'website': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['LocalNewsMegaphoneDismissStatus'] = User.LocalNewsMegaphoneDismissStatus.__dict__.values() + field_enum_info['LocalNewsSubscriptionStatus'] = User.LocalNewsSubscriptionStatus.__dict__.values() + field_enum_info['Filtering'] = User.Filtering.__dict__.values() + field_enum_info['Type'] = User.Type.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/useravailablecatalogs.py b/tap_facebook/facebook_business/adobjects/useravailablecatalogs.py new file mode 100644 index 0000000..a89e692 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/usercoverphoto.py b/tap_facebook/facebook_business/adobjects/usercoverphoto.py new file mode 100644 index 0000000..d6884c8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/usercoverphoto.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 UserCoverPhoto( + AbstractObject, +): + + def __init__(self, api=None): + super(UserCoverPhoto, self).__init__() + self._isUserCoverPhoto = True + self._api = api + + class Field(AbstractObject.Field): + offset_x = 'offset_x' + offset_y = 'offset_y' + source = 'source' + + _field_types = { + 'offset_x': 'float', + 'offset_y': 'float', + 'source': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/userdevice.py b/tap_facebook/facebook_business/adobjects/userdevice.py new file mode 100644 index 0000000..621c15e --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/userdevice.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 UserDevice( + AbstractObject, +): + + def __init__(self, api=None): + super(UserDevice, self).__init__() + self._isUserDevice = True + self._api = api + + class Field(AbstractObject.Field): + hardware = 'hardware' + os = 'os' + + _field_types = { + 'hardware': 'string', + 'os': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/useridforapp.py b/tap_facebook/facebook_business/adobjects/useridforapp.py new file mode 100644 index 0000000..b21e645 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/useridforapp.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 UserIDForApp( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isUserIDForApp = True + super(UserIDForApp, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + app = 'app' + id = 'id' + + _field_types = { + 'app': 'Application', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/useridforpage.py b/tap_facebook/facebook_business/adobjects/useridforpage.py new file mode 100644 index 0000000..1892ce8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/useridforpage.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 UserIDForPage( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isUserIDForPage = True + super(UserIDForPage, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + page = 'page' + + _field_types = { + 'id': 'string', + 'page': 'Page', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/userleadgendisclaimerresponse.py b/tap_facebook/facebook_business/adobjects/userleadgendisclaimerresponse.py new file mode 100644 index 0000000..88d97b7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/userleadgendisclaimerresponse.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 UserLeadGenDisclaimerResponse( + AbstractObject, +): + + def __init__(self, api=None): + super(UserLeadGenDisclaimerResponse, self).__init__() + self._isUserLeadGenDisclaimerResponse = True + self._api = api + + class Field(AbstractObject.Field): + checkbox_key = 'checkbox_key' + is_checked = 'is_checked' + + _field_types = { + 'checkbox_key': 'string', + 'is_checked': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/userleadgenfielddata.py b/tap_facebook/facebook_business/adobjects/userleadgenfielddata.py new file mode 100644 index 0000000..b1e966c --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/userleadgenfielddata.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 UserLeadGenFieldData( + AbstractObject, +): + + def __init__(self, api=None): + super(UserLeadGenFieldData, self).__init__() + self._isUserLeadGenFieldData = True + self._api = api + + class Field(AbstractObject.Field): + name = 'name' + values = 'values' + + _field_types = { + 'name': 'string', + 'values': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/userpageonetimeoptintokensettings.py b/tap_facebook/facebook_business/adobjects/userpageonetimeoptintokensettings.py new file mode 100644 index 0000000..8da6352 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/userpageonetimeoptintokensettings.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 UserPageOneTimeOptInTokenSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isUserPageOneTimeOptInTokenSettings = True + super(UserPageOneTimeOptInTokenSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_timestamp = 'creation_timestamp' + next_eligible_time = 'next_eligible_time' + notification_messages_frequency = 'notification_messages_frequency' + notification_messages_reoptin = 'notification_messages_reoptin' + notification_messages_timezone = 'notification_messages_timezone' + notification_messages_token = 'notification_messages_token' + recipient_id = 'recipient_id' + token_expiry_timestamp = 'token_expiry_timestamp' + topic_title = 'topic_title' + user_token_status = 'user_token_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=UserPageOneTimeOptInTokenSettings, + 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_timestamp': 'int', + 'next_eligible_time': 'int', + 'notification_messages_frequency': 'string', + 'notification_messages_reoptin': 'string', + 'notification_messages_timezone': 'string', + 'notification_messages_token': 'string', + 'recipient_id': 'string', + 'token_expiry_timestamp': 'int', + 'topic_title': 'string', + 'user_token_status': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/userpaymentmobilepricepoints.py b/tap_facebook/facebook_business/adobjects/userpaymentmobilepricepoints.py new file mode 100644 index 0000000..a05b380 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/userpaymentmobilepricepoints.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 UserPaymentMobilePricepoints( + AbstractObject, +): + + def __init__(self, api=None): + super(UserPaymentMobilePricepoints, self).__init__() + self._isUserPaymentMobilePricepoints = True + self._api = api + + class Field(AbstractObject.Field): + mobile_country = 'mobile_country' + phone_number_last4 = 'phone_number_last4' + pricepoints = 'pricepoints' + user_currency = 'user_currency' + + _field_types = { + 'mobile_country': 'string', + 'phone_number_last4': 'string', + 'pricepoints': 'list', + 'user_currency': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/valuebasedeligiblesource.py b/tap_facebook/facebook_business/adobjects/valuebasedeligiblesource.py new file mode 100644 index 0000000..b0d8826 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/valuebasedeligiblesource.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 ValueBasedEligibleSource( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isValueBasedEligibleSource = True + super(ValueBasedEligibleSource, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + title = 'title' + type = 'type' + + _field_types = { + 'id': 'string', + 'title': 'string', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/vehicle.py b/tap_facebook/facebook_business/adobjects/vehicle.py new file mode 100644 index 0000000..6013e60 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/vehicle.py @@ -0,0 +1,435 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 Vehicle( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVehicle = True + super(Vehicle, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + address = 'address' + applinks = 'applinks' + availability = 'availability' + body_style = 'body_style' + category_specific_fields = 'category_specific_fields' + condition = 'condition' + currency = 'currency' + custom_label_0 = 'custom_label_0' + date_first_on_lot = 'date_first_on_lot' + dealer_communication_channel = 'dealer_communication_channel' + dealer_email = 'dealer_email' + dealer_id = 'dealer_id' + dealer_name = 'dealer_name' + dealer_phone = 'dealer_phone' + dealer_privacy_policy_url = 'dealer_privacy_policy_url' + description = 'description' + drivetrain = 'drivetrain' + exterior_color = 'exterior_color' + fb_page_id = 'fb_page_id' + features = 'features' + fuel_type = 'fuel_type' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + interior_color = 'interior_color' + legal_disclosure_impressum_url = 'legal_disclosure_impressum_url' + make = 'make' + mileage = 'mileage' + model = 'model' + previous_currency = 'previous_currency' + previous_price = 'previous_price' + price = 'price' + sale_currency = 'sale_currency' + sale_price = 'sale_price' + sanitized_images = 'sanitized_images' + state_of_vehicle = 'state_of_vehicle' + title = 'title' + transmission = 'transmission' + trim = 'trim' + unit_price = 'unit_price' + url = 'url' + vehicle_id = 'vehicle_id' + vehicle_registration_plate = 'vehicle_registration_plate' + vehicle_specifications = 'vehicle_specifications' + vehicle_type = 'vehicle_type' + vin = 'vin' + visibility = 'visibility' + year = 'year' + + 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' + + class Availability: + available = 'AVAILABLE' + not_available = 'NOT_AVAILABLE' + pending = 'PENDING' + + class BodyStyle: + convertible = 'CONVERTIBLE' + coupe = 'COUPE' + crossover = 'CROSSOVER' + estate = 'ESTATE' + grandtourer = 'GRANDTOURER' + hatchback = 'HATCHBACK' + minibus = 'MINIBUS' + minivan = 'MINIVAN' + mpv = 'MPV' + none = 'NONE' + other = 'OTHER' + pickup = 'PICKUP' + roadster = 'ROADSTER' + saloon = 'SALOON' + sedan = 'SEDAN' + small_car = 'SMALL_CAR' + sportscar = 'SPORTSCAR' + supercar = 'SUPERCAR' + supermini = 'SUPERMINI' + suv = 'SUV' + truck = 'TRUCK' + van = 'VAN' + wagon = 'WAGON' + + class Condition: + excellent = 'EXCELLENT' + fair = 'FAIR' + good = 'GOOD' + none = 'NONE' + other = 'OTHER' + poor = 'POOR' + very_good = 'VERY_GOOD' + + class Drivetrain: + awd = 'AWD' + four_wd = 'FOUR_WD' + fwd = 'FWD' + none = 'NONE' + other = 'OTHER' + rwd = 'RWD' + two_wd = 'TWO_WD' + + class FuelType: + diesel = 'DIESEL' + electric = 'ELECTRIC' + flex = 'FLEX' + gasoline = 'GASOLINE' + hybrid = 'HYBRID' + none = 'NONE' + other = 'OTHER' + petrol = 'PETROL' + plugin_hybrid = 'PLUGIN_HYBRID' + + class StateOfVehicle: + cpo = 'CPO' + new = 'NEW' + used = 'USED' + + class Transmission: + automatic = 'AUTOMATIC' + manual = 'MANUAL' + none = 'NONE' + other = 'OTHER' + + class VehicleType: + boat = 'BOAT' + car_truck = 'CAR_TRUCK' + commercial = 'COMMERCIAL' + motorcycle = 'MOTORCYCLE' + other = 'OTHER' + powersport = 'POWERSPORT' + rv_camper = 'RV_CAMPER' + trailer = 'TRAILER' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'vehicles' + + # @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_vehicle(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=Vehicle, + 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 = { + 'address': 'map', + 'applinks': 'Object', + 'availability': 'availability_enum', + 'body_style': 'body_style_enum', + 'condition': 'condition_enum', + 'currency': 'string', + 'date_first_on_lot': 'string', + 'dealer_id': 'string', + 'dealer_name': 'string', + 'dealer_phone': 'string', + 'description': 'string', + 'drivetrain': 'drivetrain_enum', + 'exterior_color': 'string', + 'fb_page_id': 'string', + 'fuel_type': 'fuel_type_enum', + 'images': 'list', + 'interior_color': 'string', + 'make': 'string', + 'mileage': 'map', + 'model': 'string', + 'price': 'unsigned int', + 'state_of_vehicle': 'state_of_vehicle_enum', + 'title': 'string', + 'transmission': 'transmission_enum', + 'trim': 'string', + 'url': 'string', + 'vehicle_type': 'vehicle_type_enum', + 'vin': 'string', + 'year': 'unsigned int', + } + enums = { + 'availability_enum': Vehicle.Availability.__dict__.values(), + 'body_style_enum': Vehicle.BodyStyle.__dict__.values(), + 'condition_enum': Vehicle.Condition.__dict__.values(), + 'drivetrain_enum': Vehicle.Drivetrain.__dict__.values(), + 'fuel_type_enum': Vehicle.FuelType.__dict__.values(), + 'state_of_vehicle_enum': Vehicle.StateOfVehicle.__dict__.values(), + 'transmission_enum': Vehicle.Transmission.__dict__.values(), + 'vehicle_type_enum': Vehicle.VehicleType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Vehicle, + 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.') + 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=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_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 = { + 'address': 'Object', + 'applinks': 'CatalogItemAppLinks', + 'availability': 'string', + 'body_style': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'condition': 'string', + 'currency': 'string', + 'custom_label_0': 'string', + 'date_first_on_lot': 'string', + 'dealer_communication_channel': 'string', + 'dealer_email': 'string', + 'dealer_id': 'string', + 'dealer_name': 'string', + 'dealer_phone': 'string', + 'dealer_privacy_policy_url': 'string', + 'description': 'string', + 'drivetrain': 'string', + 'exterior_color': 'string', + 'fb_page_id': 'Page', + 'features': 'list', + 'fuel_type': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'interior_color': 'string', + 'legal_disclosure_impressum_url': 'string', + 'make': 'string', + 'mileage': 'Object', + 'model': 'string', + 'previous_currency': 'string', + 'previous_price': 'string', + 'price': 'string', + 'sale_currency': 'string', + 'sale_price': 'string', + 'sanitized_images': 'list', + 'state_of_vehicle': 'string', + 'title': 'string', + 'transmission': 'string', + 'trim': 'string', + 'unit_price': 'Object', + 'url': 'string', + 'vehicle_id': 'string', + 'vehicle_registration_plate': 'string', + 'vehicle_specifications': 'list', + 'vehicle_type': 'string', + 'vin': 'string', + 'visibility': 'Visibility', + 'year': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = Vehicle.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = Vehicle.Visibility.__dict__.values() + field_enum_info['Availability'] = Vehicle.Availability.__dict__.values() + field_enum_info['BodyStyle'] = Vehicle.BodyStyle.__dict__.values() + field_enum_info['Condition'] = Vehicle.Condition.__dict__.values() + field_enum_info['Drivetrain'] = Vehicle.Drivetrain.__dict__.values() + field_enum_info['FuelType'] = Vehicle.FuelType.__dict__.values() + field_enum_info['StateOfVehicle'] = Vehicle.StateOfVehicle.__dict__.values() + field_enum_info['Transmission'] = Vehicle.Transmission.__dict__.values() + field_enum_info['VehicleType'] = Vehicle.VehicleType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/vehicleoffer.py b/tap_facebook/facebook_business/adobjects/vehicleoffer.py new file mode 100644 index 0000000..31d1966 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/vehicleoffer.py @@ -0,0 +1,264 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 VehicleOffer( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVehicleOffer = True + super(VehicleOffer, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + amount_currency = 'amount_currency' + amount_percentage = 'amount_percentage' + amount_price = 'amount_price' + amount_qualifier = 'amount_qualifier' + applinks = 'applinks' + availability = 'availability' + body_style = 'body_style' + cashback_currency = 'cashback_currency' + cashback_price = 'cashback_price' + category_specific_fields = 'category_specific_fields' + currency = 'currency' + dma_codes = 'dma_codes' + downpayment_currency = 'downpayment_currency' + downpayment_price = 'downpayment_price' + downpayment_qualifier = 'downpayment_qualifier' + drivetrain = 'drivetrain' + end_date = 'end_date' + end_time = 'end_time' + exterior_color = 'exterior_color' + fuel_type = 'fuel_type' + generation = 'generation' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + interior_color = 'interior_color' + interior_upholstery = 'interior_upholstery' + make = 'make' + model = 'model' + offer_description = 'offer_description' + offer_disclaimer = 'offer_disclaimer' + offer_type = 'offer_type' + price = 'price' + sanitized_images = 'sanitized_images' + start_date = 'start_date' + start_time = 'start_time' + term_length = 'term_length' + term_qualifier = 'term_qualifier' + title = 'title' + transmission = 'transmission' + trim = 'trim' + unit_price = 'unit_price' + url = 'url' + vehicle_offer_id = 'vehicle_offer_id' + visibility = 'visibility' + year = 'year' + + 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=VehicleOffer, + 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.') + 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=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_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 = { + 'amount_currency': 'string', + 'amount_percentage': 'float', + 'amount_price': 'string', + 'amount_qualifier': 'string', + 'applinks': 'CatalogItemAppLinks', + 'availability': 'string', + 'body_style': 'string', + 'cashback_currency': 'string', + 'cashback_price': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'currency': 'string', + 'dma_codes': 'list', + 'downpayment_currency': 'string', + 'downpayment_price': 'string', + 'downpayment_qualifier': 'string', + 'drivetrain': 'string', + 'end_date': 'string', + 'end_time': 'int', + 'exterior_color': 'string', + 'fuel_type': 'string', + 'generation': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'interior_color': 'string', + 'interior_upholstery': 'string', + 'make': 'string', + 'model': 'string', + 'offer_description': 'string', + 'offer_disclaimer': 'string', + 'offer_type': 'string', + 'price': 'string', + 'sanitized_images': 'list', + 'start_date': 'string', + 'start_time': 'int', + 'term_length': 'unsigned int', + 'term_qualifier': 'string', + 'title': 'string', + 'transmission': 'string', + 'trim': 'string', + 'unit_price': 'Object', + 'url': 'string', + 'vehicle_offer_id': 'string', + 'visibility': 'Visibility', + 'year': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = VehicleOffer.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = VehicleOffer.Visibility.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videocopyright.py b/tap_facebook/facebook_business/adobjects/videocopyright.py new file mode 100644 index 0000000..759ade0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videocopyright.py @@ -0,0 +1,185 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 VideoCopyright( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoCopyright = True + super(VideoCopyright, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + content_category = 'content_category' + copyright_content_id = 'copyright_content_id' + creator = 'creator' + excluded_ownership_segments = 'excluded_ownership_segments' + id = 'id' + in_conflict = 'in_conflict' + monitoring_status = 'monitoring_status' + monitoring_type = 'monitoring_type' + ownership_countries = 'ownership_countries' + reference_file = 'reference_file' + reference_file_disabled = 'reference_file_disabled' + reference_file_disabled_by_ops = 'reference_file_disabled_by_ops' + reference_owner_id = 'reference_owner_id' + rule_ids = 'rule_ids' + tags = 'tags' + whitelisted_ids = 'whitelisted_ids' + + class ContentCategory: + episode = 'episode' + movie = 'movie' + web = 'web' + + class MonitoringType: + 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=VideoCopyright, + 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 = { + 'append_excluded_ownership_segments': 'bool', + 'attribution_id': 'string', + 'content_category': 'content_category_enum', + 'excluded_ownership_countries': 'list', + 'excluded_ownership_segments': 'list', + 'is_reference_disabled': 'bool', + 'monitoring_type': 'monitoring_type_enum', + 'ownership_countries': 'list', + 'rule_id': 'string', + 'whitelisted_ids': 'list', + 'whitelisted_ig_user_ids': 'list', + } + enums = { + 'content_category_enum': VideoCopyright.ContentCategory.__dict__.values(), + 'monitoring_type_enum': VideoCopyright.MonitoringType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoCopyright, + 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_update_records(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/update_records', + 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 = { + 'content_category': 'string', + 'copyright_content_id': 'string', + 'creator': 'User', + 'excluded_ownership_segments': 'list', + 'id': 'string', + 'in_conflict': 'bool', + 'monitoring_status': 'string', + 'monitoring_type': 'string', + 'ownership_countries': 'VideoCopyrightGeoGate', + 'reference_file': 'CopyrightReferenceContainer', + 'reference_file_disabled': 'bool', + 'reference_file_disabled_by_ops': 'bool', + 'reference_owner_id': 'string', + 'rule_ids': 'list', + 'tags': 'list', + 'whitelisted_ids': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ContentCategory'] = VideoCopyright.ContentCategory.__dict__.values() + field_enum_info['MonitoringType'] = VideoCopyright.MonitoringType.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videocopyrightcheckstatus.py b/tap_facebook/facebook_business/adobjects/videocopyrightcheckstatus.py new file mode 100644 index 0000000..50e4782 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/videocopyrightconditiongroup.py b/tap_facebook/facebook_business/adobjects/videocopyrightconditiongroup.py new file mode 100644 index 0000000..d171a09 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videocopyrightconditiongroup.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 VideoCopyrightConditionGroup( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoCopyrightConditionGroup, self).__init__() + self._isVideoCopyrightConditionGroup = True + self._api = api + + class Field(AbstractObject.Field): + action = 'action' + conditions = 'conditions' + validity_status = 'validity_status' + + _field_types = { + 'action': 'string', + 'conditions': 'list', + 'validity_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videocopyrightgeogate.py b/tap_facebook/facebook_business/adobjects/videocopyrightgeogate.py new file mode 100644 index 0000000..4001eed --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videocopyrightgeogate.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 VideoCopyrightGeoGate( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoCopyrightGeoGate, self).__init__() + self._isVideoCopyrightGeoGate = True + self._api = api + + class Field(AbstractObject.Field): + excluded_countries = 'excluded_countries' + included_countries = 'included_countries' + + _field_types = { + 'excluded_countries': 'list', + 'included_countries': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videocopyrightrule.py b/tap_facebook/facebook_business/adobjects/videocopyrightrule.py new file mode 100644 index 0000000..a670434 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videocopyrightrule.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 VideoCopyrightRule( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoCopyrightRule = True + super(VideoCopyrightRule, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + condition_groups = 'condition_groups' + copyrights = 'copyrights' + created_date = 'created_date' + creator = 'creator' + id = 'id' + is_in_migration = 'is_in_migration' + name = 'name' + + class Source: + match_settings_dialog = 'MATCH_SETTINGS_DIALOG' + rules_selector = 'RULES_SELECTOR' + rules_tab = 'RULES_TAB' + + 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=VideoCopyrightRule, + 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 = { + 'condition_groups': 'list', + 'copyrights': 'list', + 'created_date': 'datetime', + 'creator': 'User', + 'id': 'string', + 'is_in_migration': 'bool', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Source'] = VideoCopyrightRule.Source.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videocopyrightsegment.py b/tap_facebook/facebook_business/adobjects/videocopyrightsegment.py new file mode 100644 index 0000000..426a7d0 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videocopyrightsegment.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 VideoCopyrightSegment( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoCopyrightSegment, self).__init__() + self._isVideoCopyrightSegment = True + self._api = api + + class Field(AbstractObject.Field): + duration_in_sec = 'duration_in_sec' + media_type = 'media_type' + start_time_in_sec = 'start_time_in_sec' + + _field_types = { + 'duration_in_sec': 'float', + 'media_type': 'string', + 'start_time_in_sec': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videolist.py b/tap_facebook/facebook_business/adobjects/videolist.py new file mode 100644 index 0000000..4b9f023 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videolist.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 +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 VideoList( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoList = True + super(VideoList, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + description = 'description' + id = 'id' + last_modified = 'last_modified' + owner = 'owner' + season_number = 'season_number' + thumbnail = 'thumbnail' + title = 'title' + videos_count = 'videos_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=VideoList, + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.advideo import AdVideo + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + 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) + + if batch is 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', + 'description': 'string', + 'id': 'string', + 'last_modified': 'datetime', + 'owner': 'Object', + 'season_number': 'int', + 'thumbnail': 'string', + 'title': 'string', + 'videos_count': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videopoll.py b/tap_facebook/facebook_business/adobjects/videopoll.py new file mode 100644 index 0000000..778d75d --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videopoll.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 VideoPoll( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoPoll = True + super(VideoPoll, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + close_after_voting = 'close_after_voting' + default_open = 'default_open' + id = 'id' + question = 'question' + show_gradient = 'show_gradient' + show_results = 'show_results' + status = 'status' + + class Status: + closed = 'closed' + results_open = 'results_open' + voting_open = 'voting_open' + + class Action: + attach_to_video = 'ATTACH_TO_VIDEO' + close = 'CLOSE' + delete_poll = 'DELETE_POLL' + show_results = 'SHOW_RESULTS' + show_voting = 'SHOW_VOTING' + + 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=VideoPoll, + 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 = { + 'action': 'action_enum', + 'close_after_voting': 'bool', + 'default_open': 'bool', + 'show_gradient': 'bool', + 'show_results': 'bool', + } + enums = { + 'action_enum': VideoPoll.Action.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoPoll, + 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_poll_options(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/poll_options', + 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 = { + 'close_after_voting': 'bool', + 'default_open': 'bool', + 'id': 'string', + 'question': 'string', + 'show_gradient': 'bool', + 'show_results': 'bool', + 'status': 'Status', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = VideoPoll.Status.__dict__.values() + field_enum_info['Action'] = VideoPoll.Action.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videostatus.py b/tap_facebook/facebook_business/adobjects/videostatus.py new file mode 100644 index 0000000..35042ca --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/videostatuserror.py b/tap_facebook/facebook_business/adobjects/videostatuserror.py new file mode 100644 index 0000000..8e2bc13 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/videostatusprocessingphase.py b/tap_facebook/facebook_business/adobjects/videostatusprocessingphase.py new file mode 100644 index 0000000..cf599ce --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/videostatuspublishingphase.py b/tap_facebook/facebook_business/adobjects/videostatuspublishingphase.py new file mode 100644 index 0000000..6943fe3 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/videostatusuploadingphase.py b/tap_facebook/facebook_business/adobjects/videostatusuploadingphase.py new file mode 100644 index 0000000..52c23c5 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/videothumbnail.py b/tap_facebook/facebook_business/adobjects/videothumbnail.py new file mode 100644 index 0000000..736cda7 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videothumbnail.py @@ -0,0 +1,57 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 VideoThumbnail( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoThumbnail = True + super(VideoThumbnail, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + height = 'height' + id = 'id' + is_preferred = 'is_preferred' + name = 'name' + scale = 'scale' + uri = 'uri' + width = 'width' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'thumbnails' + + _field_types = { + 'height': 'unsigned int', + 'id': 'string', + 'is_preferred': 'bool', + 'name': 'string', + 'scale': 'float', + 'uri': 'string', + 'width': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/videouploadlimits.py b/tap_facebook/facebook_business/adobjects/videouploadlimits.py new file mode 100644 index 0000000..7ecf8ea --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/videouploadlimits.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 VideoUploadLimits( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoUploadLimits, self).__init__() + self._isVideoUploadLimits = True + self._api = api + + class Field(AbstractObject.Field): + length = 'length' + size = 'size' + + _field_types = { + 'length': 'unsigned int', + 'size': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/voipinfo.py b/tap_facebook/facebook_business/adobjects/voipinfo.py new file mode 100644 index 0000000..09a3365 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/voipinfo.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 VoipInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(VoipInfo, self).__init__() + self._isVoipInfo = True + self._api = api + + class Field(AbstractObject.Field): + has_mobile_app = 'has_mobile_app' + has_permission = 'has_permission' + is_callable = 'is_callable' + is_callable_webrtc = 'is_callable_webrtc' + is_pushable = 'is_pushable' + reason_code = 'reason_code' + reason_description = 'reason_description' + + _field_types = { + 'has_mobile_app': 'bool', + 'has_permission': 'bool', + 'is_callable': 'bool', + 'is_callable_webrtc': 'bool', + 'is_pushable': 'bool', + 'reason_code': 'unsigned int', + 'reason_description': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/webapplink.py b/tap_facebook/facebook_business/adobjects/webapplink.py new file mode 100644 index 0000000..77de118 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/webapplink.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 WebAppLink( + AbstractObject, +): + + def __init__(self, api=None): + super(WebAppLink, self).__init__() + self._isWebAppLink = True + self._api = api + + class Field(AbstractObject.Field): + should_fallback = 'should_fallback' + url = 'url' + + _field_types = { + 'should_fallback': 'bool', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/whatsappbusinessaccount.py b/tap_facebook/facebook_business/adobjects/whatsappbusinessaccount.py new file mode 100644 index 0000000..e535ea8 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/whatsappbusinessaccount.py @@ -0,0 +1,1095 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 WhatsAppBusinessAccount( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWhatsAppBusinessAccount = True + super(WhatsAppBusinessAccount, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_review_status = 'account_review_status' + analytics = 'analytics' + 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_funding_id = 'primary_funding_id' + purchase_order_number = 'purchase_order_number' + status = 'status' + timezone_id = 'timezone_id' + + class Tasks: + develop = 'DEVELOP' + manage = 'MANAGE' + manage_extensions = 'MANAGE_EXTENSIONS' + manage_phone = 'MANAGE_PHONE' + manage_phone_assets = 'MANAGE_PHONE_ASSETS' + manage_templates = 'MANAGE_TEMPLATES' + view_cost = 'VIEW_COST' + view_phone_assets = 'VIEW_PHONE_ASSETS' + view_templates = 'VIEW_TEMPLATES' + + class Category: + authentication = 'AUTHENTICATION' + marketing = 'MARKETING' + utility = 'UTILITY' + + class SubCategory: + custom = 'CUSTOM' + 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): + 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=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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'user': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/assigned_users', + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.assigneduser import AssignedUser + param_types = { + 'business': 'string', + } + 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() + + def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'tasks': 'list', + 'user': 'int', + } + enums = { + 'tasks_enum': WhatsAppBusinessAccount.Tasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/assigned_users', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/audiences', + 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_conversation_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 = { + 'conversation_categories': 'list', + 'conversation_directions': 'list', + 'conversation_types': 'list', + 'country_codes': 'list', + 'dimensions': 'list', + 'end': 'unsigned int', + 'granularity': 'granularity_enum', + 'metric_types': 'list', + 'phone_numbers': 'list', + 'start': 'unsigned int', + } + enums = { + 'conversation_categories_enum': [ + 'AUTHENTICATION', + 'MARKETING', + 'MARKETING_OPTIMIZED_DELIVERY', + 'SERVICE', + 'UNKNOWN', + 'UTILITY', + ], + 'conversation_directions_enum': [ + 'BUSINESS_INITIATED', + 'UNKNOWN', + 'USER_INITIATED', + ], + 'conversation_types_enum': [ + 'FREE_ENTRY_POINT', + 'FREE_TIER', + 'REGULAR', + 'UNKNOWN', + ], + 'dimensions_enum': [ + 'CONVERSATION_CATEGORY', + 'CONVERSATION_DIRECTION', + 'CONVERSATION_TYPE', + 'COUNTRY', + 'PHONE', + 'UNKNOWN', + ], + 'granularity_enum': [ + 'DAILY', + 'HALF_HOUR', + 'MONTHLY', + ], + 'metric_types_enum': [ + 'CONVERSATION', + 'COST', + 'UNKNOWN', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/conversation_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_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + 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, + 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_message_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/message_campaigns', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'hsm_id': 'string', + 'name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/message_templates', + 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_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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'category': 'list', + 'content': 'string', + 'language': 'list', + 'name': 'string', + 'name_or_content': 'string', + 'quality_score': 'list', + 'status': 'list', + } + enums = { + 'category_enum': WhatsAppBusinessAccount.Category.__dict__.values(), + 'quality_score_enum': [ + 'GREEN', + 'RED', + 'UNKNOWN', + 'YELLOW', + ], + 'status_enum': [ + 'APPROVED', + 'DELETED', + 'DISABLED', + 'IN_APPEAL', + 'LIMIT_EXCEEDED', + 'PAUSED', + 'PENDING', + 'PENDING_DELETION', + 'REJECTED', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/message_templates', + 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_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 = { + 'allow_category_change': 'bool', + 'category': 'category_enum', + 'components': 'list', + 'cta_url_link_tracking_opted_out': 'bool', + '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(), + 'sub_category_enum': WhatsAppBusinessAccount.SubCategory.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/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 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/phone_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_phone_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 = { + 'cc': 'string', + 'migrate_phone_number': 'bool', + 'phone_number': 'string', + 'preverified_id': 'string', + 'verified_name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/phone_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 delete_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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 = { + 'catalog_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/product_catalogs', + 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/product_catalogs', + 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() + + def create_product_catalog(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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.productcatalog import ProductCatalog + param_types = { + 'catalog_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/product_catalogs', + 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() + + def get_schedules(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch 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='/schedules', + 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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/subscribed_apps', + 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_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.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/subscribed_apps', + 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_subscribed_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.') + param_types = { + 'override_callback_uri': 'string', + 'verify_token': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/subscribed_apps', + 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_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', + '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): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'name': 'string', + 'template_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/template_performance_metrics', + 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_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', + '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_funding_id': 'string', + 'purchase_order_number': 'string', + 'status': 'string', + 'timezone_id': 'string', + } + @classmethod + 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['SubCategory'] = WhatsAppBusinessAccount.SubCategory.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatus.py b/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatus.py new file mode 100644 index 0000000..653d438 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py b/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py new file mode 100644 index 0000000..b395ee5 --- /dev/null +++ b/tap_facebook/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/tap_facebook/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py b/tap_facebook/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py new file mode 100644 index 0000000..50adac3 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.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 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' + + _field_types = { + 'client_business_id': 'string', + 'id': 'string', + 'rejection_reasons': 'list', + 'submitted_info': 'Object', + 'submitted_time': 'datetime', + 'update_time': 'datetime', + 'verification_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py b/tap_facebook/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py new file mode 100644 index 0000000..a56abb9 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py @@ -0,0 +1,214 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# This source code is licensed under the license found in the +# 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 WhatsAppBusinessPreVerifiedPhoneNumber( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWhatsAppBusinessPreVerifiedPhoneNumber = True + super(WhatsAppBusinessPreVerifiedPhoneNumber, self).__init__(fbid, parent_id, api) + + 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' + + class CodeVerificationStatus: + expired = 'EXPIRED' + not_verified = 'NOT_VERIFIED' + verified = 'VERIFIED' + + 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=WhatsAppBusinessPreVerifiedPhoneNumber, + 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_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': 'string', + } + enums = { + 'code_method_enum': [ + 'SMS', + 'VOICE', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/request_code', + 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_verify_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': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/verify_code', + 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 = { + 'code_verification_status': 'string', + 'code_verification_time': 'datetime', + 'id': 'string', + 'owner_business': 'Business', + 'phone_number': 'string', + 'verification_expiry_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['CodeVerificationStatus'] = WhatsAppBusinessPreVerifiedPhoneNumber.CodeVerificationStatus.__dict__.values() + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/whatsappbusinessprofile.py b/tap_facebook/facebook_business/adobjects/whatsappbusinessprofile.py new file mode 100644 index 0000000..a82d9dc --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/whatsappbusinessprofile.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 WhatsAppBusinessProfile( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWhatsAppBusinessProfile = True + super(WhatsAppBusinessProfile, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name_verification = 'name_verification' + whatsapp_business_api_data = 'whatsapp_business_api_data' + + 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=WhatsAppBusinessProfile, + 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 = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WhatsAppBusinessProfile, + 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_verification': 'Object', + 'whatsapp_business_api_data': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/windowsapplink.py b/tap_facebook/facebook_business/adobjects/windowsapplink.py new file mode 100644 index 0000000..fc29766 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/windowsapplink.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 WindowsAppLink( + AbstractObject, +): + + def __init__(self, api=None): + super(WindowsAppLink, self).__init__() + self._isWindowsAppLink = True + self._api = api + + class Field(AbstractObject.Field): + app_id = 'app_id' + app_name = 'app_name' + package_family_name = 'package_family_name' + url = 'url' + + _field_types = { + 'app_id': 'string', + 'app_name': 'string', + 'package_family_name': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/windowsphoneapplink.py b/tap_facebook/facebook_business/adobjects/windowsphoneapplink.py new file mode 100644 index 0000000..bc59220 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/windowsphoneapplink.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 WindowsPhoneAppLink( + AbstractObject, +): + + def __init__(self, api=None): + super(WindowsPhoneAppLink, self).__init__() + self._isWindowsPhoneAppLink = True + self._api = api + + class Field(AbstractObject.Field): + app_id = 'app_id' + app_name = 'app_name' + url = 'url' + + _field_types = { + 'app_id': 'string', + 'app_name': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py b/tap_facebook/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py new file mode 100644 index 0000000..1134733 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/woodhengepurchasedpaygreceipt.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 WoodhengePurchasedPAYGReceipt( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWoodhengePurchasedPAYGReceipt = True + super(WoodhengePurchasedPAYGReceipt, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + number_of_subscriptions_purchased = 'number_of_subscriptions_purchased' + purchase_time = 'purchase_time' + 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=WoodhengePurchasedPAYGReceipt, + 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', + 'number_of_subscriptions_purchased': 'int', + 'purchase_time': 'datetime', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/adobjects/workuserfrontline.py b/tap_facebook/facebook_business/adobjects/workuserfrontline.py new file mode 100644 index 0000000..348d798 --- /dev/null +++ b/tap_facebook/facebook_business/adobjects/workuserfrontline.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 WorkUserFrontline( + AbstractObject, +): + + def __init__(self, api=None): + super(WorkUserFrontline, self).__init__() + self._isWorkUserFrontline = True + self._api = api + + class Field(AbstractObject.Field): + has_access = 'has_access' + is_frontline = 'is_frontline' + + _field_types = { + 'has_access': 'bool', + 'is_frontline': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/tap_facebook/facebook_business/api.py b/tap_facebook/facebook_business/api.py new file mode 100644 index 0000000..f7a41b1 --- /dev/null +++ b/tap_facebook/facebook_business/api.py @@ -0,0 +1,921 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# 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 + +from facebook_business.exceptions import ( + FacebookRequestError, + FacebookBadObjectError, + FacebookUnavailablePropertyException, + FacebookBadParameterError, +) +from facebook_business.utils import api_utils +from facebook_business.utils import urls + +from contextlib import contextmanager +import backoff +import copy +from six.moves import http_client +import os +import json +import six +import sys +import re + +try: + # Since python 3 + from six.moves import collections_abc +except ImportError: + # Won't work after python 3.8 + import collections as collections_abc + +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.typechecker import TypeChecker + + +""" +api module contains classes that make http requests to Facebook's graph API. +""" + +def retry_pattern(backoff_type, exception, **wait_gen_kwargs): + def log_retry_attempt(details): + _, exception, _ = sys.exc_info() + + def should_retry_api_error(exception): + + # Define the regular expression pattern + pattern = r'\(#100\) Cannot include [\w, ]+ in summary param because they weren\'t there while creating the report run(?:\. All available values are: )?' + if isinstance(exception, FacebookRequestError): + return (exception.http_status()==400 and re.match(pattern, exception._error['message'])) + return False + + return backoff.on_exception( + backoff_type, + exception, + jitter=None, + on_backoff=log_retry_attempt, + giveup=lambda exc: not should_retry_api_error(exc), + **wait_gen_kwargs + ) + +class FacebookResponse(object): + + """Encapsulates an http response from Facebook's Graph API.""" + + def __init__(self, body=None, http_status=None, headers=None, call=None): + """Initializes the object's internal data. + Args: + body (optional): The response body as text. + http_status (optional): The http status code. + headers (optional): The http headers. + call (optional): The original call that was made. + """ + self._body = body + self._http_status = http_status + self._headers = headers or {} + self._call = call + + def body(self): + """Returns the response body.""" + return self._body + + def json(self): + """Returns the response body -- in json if possible.""" + try: + return json.loads(self._body) + except (TypeError, ValueError): + return self._body + + def headers(self): + """Return the response headers.""" + return self._headers + + def etag(self): + """Returns the ETag header value if it exists.""" + return self._headers.get('ETag') + + def status(self): + """Returns the http status code of the response.""" + return self._http_status + + def is_success(self): + """Returns boolean indicating if the call was successful.""" + + json_body = self.json() + + if isinstance(json_body, collections_abc.Mapping) and 'error' in json_body: + # Is a dictionary, has error in it + return False + elif bool(json_body): + # Has body and no error + if 'success' in json_body: + return json_body['success'] + # 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 + return True + elif self._http_status == http_client.OK: + # HTTP Okay + return True + else: + # Something else + return False + + def is_failure(self): + """Returns boolean indicating if the call failed.""" + return not self.is_success() + + def error(self): + """ + Returns a FacebookRequestError (located in the exceptions module) with + an appropriate debug message. + """ + if self.is_failure(): + return FacebookRequestError( + "Call was not successful", + self._call, + self.status(), + self.headers(), + self.body(), + ) + else: + return None + + +class FacebookAdsApi(object): + + """Encapsulates session attributes and methods to make API calls. + Attributes: + SDK_VERSION (class): indicating sdk version. + HTTP_METHOD_GET (class): HTTP GET method name. + HTTP_METHOD_POST (class): HTTP POST method name + HTTP_METHOD_DELETE (class): HTTP DELETE method name + HTTP_DEFAULT_HEADERS (class): Default HTTP headers for requests made by + this sdk. + """ + + SDK_VERSION = apiconfig.ads_api_config['SDK_VERSION'] + + API_VERSION = apiconfig.ads_api_config['API_VERSION'] + + HTTP_METHOD_GET = 'GET' + + HTTP_METHOD_POST = 'POST' + + HTTP_METHOD_DELETE = 'DELETE' + + HTTP_DEFAULT_HEADERS = { + 'User-Agent': "fbbizsdk-python-%s" % SDK_VERSION, + } + + _default_api = None + _default_account_id = None + + def __init__(self, session, api_version=None, enable_debug_logger=False): + """Initializes the api instance. + Args: + session: FacebookSession object that contains a requests interface + and attribute GRAPH (the Facebook GRAPH API URL). + api_version: API version + """ + self._session = session + self._num_requests_succeeded = 0 + self._num_requests_attempted = 0 + self._api_version = api_version or self.API_VERSION + self._enable_debug_logger = enable_debug_logger + + def get_num_requests_attempted(self): + """Returns the number of calls attempted.""" + return self._num_requests_attempted + + def get_num_requests_succeeded(self): + """Returns the number of calls that succeeded.""" + return self._num_requests_succeeded + + @classmethod + def init( + cls, + app_id=None, + app_secret=None, + access_token=None, + account_id=None, + api_version=None, + proxies=None, + timeout=None, + debug=False, + crash_log=True, + ): + session = FacebookSession(app_id, app_secret, access_token, proxies, + timeout) + api = cls(session, api_version, enable_debug_logger=debug) + cls.set_default_api(api) + + if account_id: + cls.set_default_account_id(account_id) + + if crash_log: + from facebook_business.crashreporter import CrashReporter + if debug: + CrashReporter.enableLogging() + CrashReporter.enable() + + return api + + @classmethod + def set_default_api(cls, api_instance): + """Sets the default api instance. + When making calls to the api, objects will revert to using the default + api if one is not specified when initializing the objects. + Args: + api_instance: The instance which to set as default. + """ + cls._default_api = api_instance + + @classmethod + def get_default_api(cls): + """Returns the default api instance.""" + return cls._default_api + + @classmethod + def set_default_account_id(cls, account_id): + account_id = str(account_id) + if account_id.find('act_') == -1: + raise ValueError( + "Account ID provided in FacebookAdsApi.set_default_account_id " + "expects a string that begins with 'act_'", + ) + cls._default_account_id = account_id + + @classmethod + def get_default_account_id(cls): + return cls._default_account_id + + @retry_pattern(backoff.expo, (FacebookRequestError), max_tries=5, factor=5) + def call( + self, + method, + path, + params=None, + headers=None, + files=None, + url_override=None, + api_version=None, + ): + """Makes an API call. + Args: + method: The HTTP method name (e.g. 'GET'). + path: A tuple of path tokens or a full URL string. A tuple will + be translated to a url as follows: + graph_url/tuple[0]/tuple[1]... + It will be assumed that if the path is not a string, it will be + iterable. + params (optional): A mapping of request parameters where a key + is the parameter name and its value is a string or an object + which can be JSON-encoded. + headers (optional): A mapping of request headers where a key is the + header name and its value is the header value. + files (optional): An optional mapping of file names to binary open + file objects. These files will be attached to the request. + Returns: + A FacebookResponse object containing the response body, headers, + http status, and summary of the call that was made. + Raises: + FacebookResponse.error() if the request failed. + """ + if not params: + params = {} + if not headers: + headers = {} + if not files: + files = {} + + api_version = api_version or self._api_version + + if api_version and not re.search(r'v[0-9]+\.[0-9]+', api_version): + raise FacebookBadObjectError( + 'Please provide the API version in the following format: %s' + % self.API_VERSION, + ) + + self._num_requests_attempted += 1 + + if not isinstance(path, six.string_types): + # Path is not a full path + path = "/".join(( + url_override or self._session.GRAPH, + api_version, + '/'.join(map(str, path)), + )) + + # Include api headers in http request + headers = headers.copy() + headers.update(FacebookAdsApi.HTTP_DEFAULT_HEADERS) + + if params: + params = _top_level_param_json_encode(params) + + # Get request response and encapsulate it in a FacebookResponse + if method in ('GET', 'DELETE'): + response = self._session.requests.request( + method, + path, + params=params, + headers=headers, + files=files, + timeout=self._session.timeout + ) + + else: + response = self._session.requests.request( + method, + path, + data=params, + headers=headers, + files=files, + timeout=self._session.timeout + ) + if self._enable_debug_logger: + import curlify + print(curlify.to_curl(response.request)) + fb_response = FacebookResponse( + body=response.text, + headers=response.headers, + http_status=response.status_code, + call={ + 'method': method, + 'path': path, + 'params': params, + 'headers': headers, + 'files': files, + }, + ) + + if fb_response.is_failure(): + raise fb_response.error() + + self._num_requests_succeeded += 1 + return fb_response + + def new_batch(self): + """ + Returns a new FacebookAdsApiBatch, which when executed will go through + this api. + """ + return FacebookAdsApiBatch(api=self) + + +class FacebookAdsApiBatch(object): + + """ + Exposes methods to build a sequence of calls which can be executed with + a single http request. + Note: Individual exceptions won't be thrown for each call that fails. + The success and failure callback functions corresponding to a call + should handle its success or failure. + """ + + def __init__(self, api, success=None, failure=None): + self._api = api + self._files = [] + self._batch = [] + self._success_callbacks = [] + self._failure_callbacks = [] + if success is not None: + self._success_callbacks.append(success) + if failure is not None: + self._failure_callbacks.append(failure) + self._requests = [] + + def __len__(self): + return len(self._batch) + + def add( + self, + method, + relative_path, + params=None, + headers=None, + files=None, + success=None, + failure=None, + request=None, + ): + """Adds a call to the batch. + Args: + method: The HTTP method name (e.g. 'GET'). + relative_path: A tuple of path tokens or a relative URL string. + A tuple will be translated to a url as follows: + //... + It will be assumed that if the path is not a string, it will be + iterable. + params (optional): A mapping of request parameters where a key + is the parameter name and its value is a string or an object + which can be JSON-encoded. + headers (optional): A mapping of request headers where a key is the + header name and its value is the header value. + files (optional): An optional mapping of file names to binary open + file objects. These files will be attached to the request. + success (optional): A callback function which will be called with + the FacebookResponse of this call if the call succeeded. + failure (optional): A callback function which will be called with + the FacebookResponse of this call if the call failed. + request (optional): The APIRequest object + Returns: + A dictionary describing the call. + """ + if not isinstance(relative_path, six.string_types): + relative_url = '/'.join(relative_path) + else: + relative_url = relative_path + + call = { + 'method': method, + 'relative_url': relative_url, + } + + if params: + params = _top_level_param_json_encode(params) + keyvals = ['%s=%s' % (key, urls.quote_with_encoding(value)) + for key, value in params.items()] + if method == 'GET': + call['relative_url'] += '?' + '&'.join(keyvals) + else: + call['body'] = '&'.join(keyvals) + + if files: + call['attached_files'] = ','.join(files.keys()) + + if headers: + call['headers'] = [] + for header in headers: + batch_formatted_header = {} + batch_formatted_header['name'] = header + batch_formatted_header['value'] = headers[header] + call['headers'].append(batch_formatted_header) + + self._batch.append(call) + self._files.append(files) + self._success_callbacks.append(success) + self._failure_callbacks.append(failure) + self._requests.append(request) + + return call + + def add_request( + self, + request, + success=None, + failure=None, + ): + """Interface to add a APIRequest to the batch. + Args: + request: The APIRequest object to add + success (optional): A callback function which will be called with + the FacebookResponse of this call if the call succeeded. + failure (optional): A callback function which will be called with + the FacebookResponse of this call if the call failed. + Returns: + A dictionary describing the call. + """ + updated_params = copy.deepcopy(request._params) + if request._fields: + updated_params['fields'] = ','.join(request._fields) + return self.add( + method=request._method, + relative_path=request._path, + params=updated_params, + files=request._file_params, + success=success, + failure=failure, + request=request, + ) + + def execute(self): + """Makes a batch call to the api associated with this object. + For each individual call response, calls the success or failure callback + function if they were specified. + Note: Does not explicitly raise exceptions. Individual exceptions won't + be thrown for each call that fails. The success and failure callback + functions corresponding to a call should handle its success or failure. + Returns: + If some of the calls have failed, returns a new FacebookAdsApiBatch + object with those calls. Otherwise, returns None. + """ + if not self._batch: + return None + method = 'POST' + path = tuple() + params = {'batch': self._batch} + files = {} + for call_files in self._files: + if call_files: + files.update(call_files) + + fb_response = self._api.call( + method, + path, + params=params, + files=files, + ) + + responses = fb_response.json() + retry_indices = [] + + for index, response in enumerate(responses): + if response: + body = response.get('body') + code = response.get('code') + headers = response.get('headers') + + inner_fb_response = FacebookResponse( + body=body, + headers=headers, + http_status=code, + call=self._batch[index], + ) + + if inner_fb_response.is_success(): + if self._success_callbacks[index]: + self._success_callbacks[index](inner_fb_response) + elif self._failure_callbacks[index]: + self._failure_callbacks[index](inner_fb_response) + else: + retry_indices.append(index) + + if retry_indices: + new_batch = self.__class__(self._api) + new_batch._files = [self._files[index] for index in retry_indices] + new_batch._batch = [self._batch[index] for index in retry_indices] + new_batch._success_callbacks = [self._success_callbacks[index] + for index in retry_indices] + new_batch._failure_callbacks = [self._failure_callbacks[index] + for index in retry_indices] + return new_batch + else: + return None + + +class FacebookRequest: + """ + Represents an API request + """ + + def __init__( + self, + node_id, + method, + endpoint, + api=None, + param_checker=TypeChecker({}, {}), + target_class=None, + api_type=None, + allow_file_upload=False, + response_parser=None, + include_summary=True, + api_version=None, + ): + """ + Args: + node_id: The node id to perform the api call. + method: The HTTP method of the call. + endpoint: The edge of the api call. + api (optional): The FacebookAdsApi object. + param_checker (optional): Parameter checker. + target_class (optional): The return class of the api call. + api_type (optional): NODE or EDGE type of the call. + allow_file_upload (optional): Whether the call allows upload. + response_parser (optional): An ObjectParser to parse response. + include_summary (optional): Include "summary". + api_version (optional): API version. + """ + self._api = api or FacebookAdsApi.get_default_api() + self._node_id = node_id + self._method = method + self._endpoint = endpoint.replace('/', '') + self._path = (node_id, endpoint.replace('/', '')) + self._param_checker = param_checker + self._target_class = target_class + self._api_type = api_type + self._allow_file_upload = allow_file_upload + self._response_parser = response_parser + self._include_summary = include_summary + self._api_version = api_version + self._params = {} + self._fields = [] + self._file_params = {} + self._file_counter = 0 + self._accepted_fields = [] + if target_class is not None: + self._accepted_fields = target_class.Field.__dict__.values() + + def add_file(self, file_path): + if not self._allow_file_upload: + api_utils.warning('Endpoint ' + self._endpoint + ' cannot upload files') + file_key = 'source' + str(self._file_counter) + if os.path.isfile(file_path): + self._file_params[file_key] = file_path + self._file_counter += 1 + else: + raise FacebookBadParameterError( + 'Cannot find file ' + file_path + '!', + ) + return self + + def add_files(self, files): + if files is None: + return self + for file_path in files: + self.add_file(file_path) + return self + + def add_field(self, field): + if field not in self._fields: + self._fields.append(field) + if field not in self._accepted_fields: + api_utils.warning(self._endpoint + ' does not allow field ' + field) + return self + + def add_fields(self, fields): + if fields is None: + return self + for field in fields: + self.add_field(field) + return self + + def add_param(self, key, value): + if not self._param_checker.is_valid_pair(key, value): + api_utils.warning('value of ' + key + ' might not be compatible. ' + + ' Expect ' + self._param_checker.get_type(key) + '; ' + + ' got ' + str(type(value))) + if self._param_checker.is_file_param(key): + self._file_params[key] = value + else: + self._params[key] = self._extract_value(value) + return self + + def add_params(self, params): + if params is None: + return self + for key in params.keys(): + self.add_param(key, params[key]) + return self + + def get_fields(self): + return list(self._fields) + + def get_params(self): + return copy.deepcopy(self._params) + + def execute(self): + params = copy.deepcopy(self._params) + if self._api_type == "EDGE" and self._method == "GET": + cursor = Cursor( + target_objects_class=self._target_class, + params=params, + fields=self._fields, + include_summary=self._include_summary, + api=self._api, + node_id=self._node_id, + endpoint=self._endpoint, + object_parser=self._response_parser, + ) + cursor.load_next_page() + return cursor + if self._fields: + params['fields'] = ','.join(self._fields) + with open_files(self._file_params) as files: + response = self._api.call( + method=self._method, + path=(self._path), + params=params, + files=files, + api_version=self._api_version, + ) + if response.error(): + raise response.error() + if self._response_parser: + return self._response_parser.parse_single(response.json()) + else: + return response + + def add_to_batch(self, batch, success=None, failure=None): + batch.add_request(self, success, failure) + + def _extract_value(self, value): + if hasattr(value, 'export_all_data'): + return value.export_all_data() + elif isinstance(value, list): + return [self._extract_value(item) for item in value] + elif isinstance(value, dict): + return dict((self._extract_value(k), self._extract_value(v)) + for (k, v) in value.items()) + else: + return value + + +class Cursor(object): + + """Cursor is an cursor over an object's connections. + Previously called EdgeIterator. + Examples: + >>> me = AdAccountUser('me') + >>> my_accounts = [act for act in Cursor(me, AdAccount)] + >>> my_accounts + [, ] + """ + + def __init__( + self, + source_object=None, + target_objects_class=None, + fields=None, + params=None, + include_summary=True, + api=None, + node_id=None, + endpoint=None, + object_parser=None + ): + """ + Initializes an cursor over the objects to which there is an edge from + source_object. + To initialize, you'll need to provide either (source_object and + target_objects_class) or (api, node_id, endpoint, and object_parser) + Args: + source_object: An AbstractObject instance from which to inspect an + edge. This object should have an id. + 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. + params (optional): A mapping of request parameters where a key + is the parameter name and its value is a string or an object + which can be JSON-encoded. + include_summary (optional): Include summary. + api (optional): FacebookAdsApi object. + node_id (optional): The ID of calling node. + endpoint (optional): The edge name. + object_parser (optional): The ObjectParser to parse response. + """ + self.params = dict(params or {}) + target_objects_class._assign_fields_to_params(fields, self.params) + self._source_object = source_object + self._target_objects_class = target_objects_class + self._node_id = node_id or source_object.get_id_assured() + self._endpoint = endpoint or target_objects_class.get_endpoint() + self._api = api or source_object.get_api() + self._path = ( + self._node_id, + self._endpoint, + ) + self._queue = [] + self._headers = [] + self._finished_iteration = False + self._total_count = None + self._summary = None + self._include_summary = include_summary or 'default_summary' in self.params + self._object_parser = object_parser or ObjectParser( + api=self._api, + target_class=self._target_objects_class, + ) + + def __repr__(self): + return str(self._queue) + + def __len__(self): + return len(self._queue) + + def __iter__(self): + return self + + def __next__(self): + # Load next page at end. + # If load_next_page returns False, raise StopIteration exception + if not self._queue and not self.load_next_page(): + raise StopIteration() + + return self._queue.pop(0) + + # Python 2 compatibility. + next = __next__ + + def __getitem__(self, index): + return self._queue[index] + + def headers(self): + return self._headers + + def total(self): + if self._total_count is None: + raise FacebookUnavailablePropertyException( + "Couldn't retrieve the object total count for that type " + "of request.", + ) + return self._total_count + + def summary(self): + if self._summary is None or not isinstance(self._summary, dict): + raise FacebookUnavailablePropertyException( + "Couldn't retrieve the object summary for that type " + "of request.", + ) + return " %s" % ( + json.dumps( + self._summary, + sort_keys=True, + indent=4, + separators=(',', ': '), + ), + ) + + def load_next_page(self): + """Queries server for more nodes and loads them into the internal queue. + Returns: + True if successful, else False. + """ + print(f"Within packages") + if self._finished_iteration: + return False + + if ( + self._include_summary and + 'default_summary' not in self.params and + 'summary' not in self.params + ): + self.params['summary'] = True + + response_obj = self._api.call( + 'GET', + self._path, + params=self.params, + ) + response = response_obj.json() + self._headers = response_obj.headers() + + if ( + 'paging' in response and + 'cursors' in response['paging'] and + '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: + # Indicate if this was the last page + self._finished_iteration = True + + if ( + self._include_summary and + 'summary' in response and + 'total_count' in response['summary'] + ): + self._total_count = response['summary']['total_count'] + print(f"Summary : {response['summary']}") + + if self._include_summary and 'summary' in response: + self._summary = response['summary'] + + self._queue = self.build_objects_from_response(response) + return len(self._queue) > 0 + + def get_one(self): + for obj in self: + return obj + return None + + def build_objects_from_response(self, response): + return self._object_parser.parse_multiple(response) + + +@contextmanager +def open_files(files): + opened_files = {} + for key, path in files.items(): + opened_files.update({key: open(path, 'rb')}) + yield opened_files + for file in opened_files.values(): + file.close() + + +def _top_level_param_json_encode(params): + params = params.copy() + + for param, value in params.items(): + if ( + isinstance(value, (collections_abc.Mapping, collections_abc.Sequence, bool)) + and not isinstance(value, six.string_types) + ): + params[param] = json.dumps( + value, + sort_keys=True, + separators=(',', ':'), + ) + else: + params[param] = value + + return params diff --git a/tap_facebook/facebook_business/apiconfig.py b/tap_facebook/facebook_business/apiconfig.py new file mode 100644 index 0000000..68a015b --- /dev/null +++ b/tap_facebook/facebook_business/apiconfig.py @@ -0,0 +1,11 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. + +# 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': 'v19.0', + 'SDK_VERSION': 'v19.0.2', + 'STRICT_MODE': False +} diff --git a/tap_facebook/facebook_business/bootstrap.py b/tap_facebook/facebook_business/bootstrap.py new file mode 100644 index 0000000..1810f88 --- /dev/null +++ b/tap_facebook/facebook_business/bootstrap.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. + +import sys +import os + +this_dir = os.path.dirname(__file__) +repo_dir = os.path.join(this_dir, os.pardir) +sys.path.insert(1, repo_dir) + +import json +from facebook_business.session import FacebookSession +from facebook_business.api import FacebookAdsApi +from facebook_business.adobjects import * +from facebook_business.exceptions import FacebookError + + +class Authentication(): + """ + DON'T USE THIS CLASS DIRECTLY. USE `auth()` function from this module + Helper class to authenticate using config.json config file from this + repository. This is useful in two cases: + - Testing environment + - Interactive exploration in REPL + This class shouldn't be used in production. + It's intended for development. Use FacebookAdsApi.init in production + """ + + _api = FacebookAdsApi.get_default_api() + if _api: + _is_authenticated = True + else: + _is_authenticated = False + + @property + def is_authenticated(cls): + return cls._is_authenticated + + @classmethod + def load_config(cls): + with open(os.path.join(repo_dir, 'config.json')) as config_file: + config = json.load(config_file) + return config + + @classmethod + def auth(cls): + """ + Prepare for Ads API calls and return a tuple with act_id + and page_id. page_id can be None but act_id is always set. + """ + config = cls.load_config() + + if cls._is_authenticated: + return config['act_id'], config.get('page_id', None) + + if config['app_id'] and config['app_secret'] \ + and config['act_id'] and config['access_token']: + + FacebookAdsApi.init( + config['app_id'], + config['app_secret'], + config['access_token'], + config['act_id'], + ) + + cls._is_authenticated = True + + return config['act_id'], config.get('page_id', None) + + else: + required_fields = set( + ('app_id', 'app_secret', 'act_id', 'access_token') + ) + + missing_fields = required_fields - set(config.keys()) + raise FacebookError( + '\n\tFile config.json needs to have the following fields: {}\n' + '\tMissing fields: {}\n'.format( + ', '.join(required_fields), + ', '.join(missing_fields), + ) + ) + + +def auth(): + return Authentication.auth() + +if sys.flags.interactive: + auth() diff --git a/tap_facebook/facebook_business/crashreporter.py b/tap_facebook/facebook_business/crashreporter.py new file mode 100644 index 0000000..8884b2f --- /dev/null +++ b/tap_facebook/facebook_business/crashreporter.py @@ -0,0 +1,122 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 +import json +import logging + +from enum import Enum + +from facebook_business.api import FacebookRequest +from facebook_business.session import FacebookSession +from facebook_business.api import FacebookAdsApi +from facebook_business.exceptions import FacebookError +from facebook_business.exceptions import FacebookRequestError + + +class Reasons(Enum): + API = 'API' + SDK = 'SDK' + +class CrashReporter(object): + + reporter_instance = None + logger = None + + def __init__(self, app_id, excepthook): + self.__app_id = app_id + self.__excepthook = excepthook + + @classmethod + def enable(cls): + 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 + cls.logging('Enabled') + + @classmethod + def disable(cls): + if cls.reporter_instance != None: + # Restore the original excepthook + sys.excepthook = cls.reporter_instance.__excepthook + cls.reporter_instance = None + cls.logging('Disabled') + + @classmethod + def enableLogging(cls): + if cls.logger is None: + logging.basicConfig() + cls.logger = logging.getLogger(__name__) + cls.logger.setLevel(logging.INFO) + + @classmethod + def disableLogging(cls): + if cls.logger != None: + cls.logger = None + + @classmethod + def logging(cls, info): + if cls.logger != None: + cls.logger.info(info) + + def __exception_handler(self, etype, evalue, tb): + params = self.__build_param(etype, tb) + if params: + CrashReporter.logging('Crash detected!') + self.__send_report(params) + else: + CrashReporter.logging('No crash detected.') + + self.__forward_exception(etype, evalue, tb) + + + def __forward_exception(self, etype, evalue, tb): + self.__excepthook(etype, evalue, tb) + + def __build_param(self, etype, tb): + if not etype: + return None + fb_request_errors = [cls.__name__ for cls in FacebookError.__subclasses__()] + reason = None + + if etype.__name__ == FacebookRequestError.__name__: + reason = Reasons.API + elif etype.__name__ in fb_request_errors: + reason = Reasons.SDK + + if reason is None: + extracted_tb = traceback.extract_tb(tb, limit=100) + for ii, (filename, line, funcname, code) in enumerate(extracted_tb): + if filename.find('facebook_business') != -1: + reason = Reasons.SDK + + if reason is None: + return None + + return { + 'reason': "{} : {}".format(reason.value, etype.__name__), + 'callstack': traceback.format_tb(tb), + 'platform': sys.version + }; + + def __send_report(self, payload): + try: + anonymous = FacebookSession() + api = FacebookAdsApi(anonymous) + request = FacebookRequest( + node_id=self.__app_id, + method='POST', + endpoint='/instruments', + api=api, + ) + request.add_params({'bizsdk_crash_report':payload}) + request.execute() + CrashReporter.logging('Succeed to Send Crash Report.') + except Exception as e: + CrashReporter.logging('Fail to Send Crash Report.') diff --git a/tap_facebook/facebook_business/exceptions.py b/tap_facebook/facebook_business/exceptions.py new file mode 100644 index 0000000..a661923 --- /dev/null +++ b/tap_facebook/facebook_business/exceptions.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. + +""" +The exceptions module contains Exception subclasses whose instances might be +raised by the sdk. +""" + +import json +import re + + +class FacebookError(Exception): + """ + All errors specific to Facebook api requests and Facebook ads design will be + subclassed from FacebookError which is subclassed from Exception. + """ + pass + + +class FacebookRequestError(FacebookError): + """ + Raised when an api request fails. Returned by error() method on a + FacebookResponse object returned through a callback function (relevant + only for failure callbacks) if not raised at the core api call method. + """ + + def __init__( + self, message, + request_context, + http_status, + http_headers, + body + ): + self._message = message + self._request_context = request_context + self._http_status = http_status + self._http_headers = http_headers + try: + self._body = json.loads(body) + except (TypeError, ValueError): + self._body = body + + self._api_error_code = None + self._api_error_type = None + self._api_error_message = None + self._api_error_subcode = None + self._api_blame_field_specs = None + self._api_transient_error = False + + if self._body and 'error' in self._body: + self._error = self._body['error'] + error_data = self._error.get('error_data', str({})) + if not isinstance(error_data, dict): + error_data = json.loads(error_data) + if 'message' in self._error: + self._api_error_message = self._error['message'] + if 'code' in self._error: + self._api_error_code = self._error['code'] + if 'is_transient' in self._error: + self._api_transient_error = self._error['is_transient'] + if 'error_subcode' in self._error: + self._api_error_subcode = self._error['error_subcode'] + if 'type' in self._error: + self._api_error_type = self._error['type'] + if isinstance(error_data, dict) and error_data.get('blame_field_specs'): + self._api_blame_field_specs = \ + error_data['blame_field_specs'] + else: + self._error = None + + # We do not want to print the file bytes + request = self._request_context + if 'files' in self._request_context: + request = self._request_context.copy() + del request['files'] + + super(FacebookRequestError, self).__init__( + "\n\n" + + " Message: %s\n" % self._message + + " Method: %s\n" % request.get('method') + + " Path: %s\n" % request.get('path', '/') + + " Params: %s\n" % request.get('params') + + "\n" + + " Status: %s\n" % self._http_status + + " Response:\n %s" % re.sub( + r"\n", "\n ", + json.dumps(self._body, indent=2) + ) + + "\n" + ) + + def request_context(self): + return self._request_context + + def http_status(self): + return self._http_status + + def http_headers(self): + return self._http_headers + + def body(self): + return self._body + + def api_error_message(self): + return self._api_error_message + + def api_error_code(self): + return self._api_error_code + + def api_error_subcode(self): + return self._api_error_subcode + + def api_error_type(self): + return self._api_error_type + + def api_blame_field_specs(self): + return self._api_blame_field_specs + + def api_transient_error(self): + return self._api_transient_error + + def get_message(self): + return self._message + + +class FacebookBadObjectError(FacebookError): + """Raised when a guarantee about the object validity fails.""" + pass + +class FacebookBadParameterError(FacebookError): + """Raised when a guarantee about the parameter validity fails.""" + pass + +class FacebookUnavailablePropertyException(FacebookError): + """Raised when an object's property or method is not available.""" + pass + + +class DocsmithSkipTestError(Exception): + """Raised when a docsmith test is skipped.""" + def __init__(self, message): + self._message = message + + def get_skip_error_msg(self): + return self._message + +class FacebookBadParameterTypeException(FacebookError): + """Raised when a parameter or field is set with improper type.""" + pass diff --git a/tap_facebook/facebook_business/exit_codes.py b/tap_facebook/facebook_business/exit_codes.py new file mode 100644 index 0000000..6e0d84b --- /dev/null +++ b/tap_facebook/facebook_business/exit_codes.py @@ -0,0 +1,12 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 + FAILURE = 1 + SUCCESS = 0 + USER_ERROR = 40 + USER_SKIP = 42 diff --git a/tap_facebook/facebook_business/fb_ca_chain_bundle.crt b/tap_facebook/facebook_business/fb_ca_chain_bundle.crt new file mode 100644 index 0000000..162dbc8 --- /dev/null +++ b/tap_facebook/facebook_business/fb_ca_chain_bundle.crt @@ -0,0 +1,3188 @@ +## +## Bundle of CA Root Certificates +## +## Certificate data from Mozilla as of: Fri Jan 21 20:58:59 2022 GMT +## +## This is a bundle of X.509 certificates of public Certificate Authorities +## (CA). These were automatically extracted from Mozilla's root certificates +## file (certdata.txt). This file can be found in the mozilla source tree: +## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt +## +## It contains the certificates in PEM format and therefore +## can be directly used with curl / libcurl / php_curl, or with +## an Apache+mod_ssl webserver for SSL client authentication. +## Just configure this file as the SSLCACertificateFile. +## +## Conversion done with mk-ca-bundle.pl version 1.28. +## SHA256: bb36818a81feaa4cca61101e6d6276cd09e972efcb08112dfed846918ca41d7f +## + + +GlobalSign Root CA +================== +-----BEGIN CERTIFICATE----- +MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx +GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds +b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV +BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD +VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa +DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc +THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb +Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP +c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX +gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF +AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj +Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG +j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH +hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC +X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== +-----END CERTIFICATE----- + +Entrust.net Premium 2048 Secure Server CA +========================================= +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u +ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp +bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV +BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx +NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 +d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl +MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u +ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL +Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr +hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW +nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi +VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ +KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy +T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf +zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT +J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e +nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE= +-----END CERTIFICATE----- + +Baltimore CyberTrust Root +========================= +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE +ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li +ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC +SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs +dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME +uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB +UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C +G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 +XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr +l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI +VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB +BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh +cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 +hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa +Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H +RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + +Entrust Root Certification Authority +==================================== +-----BEGIN CERTIFICATE----- +MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw +b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG +A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 +MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu +MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu +Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v +dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz +A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww +Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 +j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN +rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1 +MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH +hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA +A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM +Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa +v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS +W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 +tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 +-----END CERTIFICATE----- + +Comodo AAA Services root +======================== +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw +MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl +c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV +BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG +C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs +i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW +Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH +Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK +Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f +BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl +cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz +LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm +7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z +8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C +12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- + +QuoVadis Root CA 2 +================== +-----BEGIN CERTIFICATE----- +MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx +ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 +XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk +lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB +lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy +lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt +66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn +wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh +D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy +BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie +J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud +DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU +a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT +ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv +Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3 +UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm +VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK ++JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW +IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1 +WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X +f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II +4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 +VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u +-----END CERTIFICATE----- + +QuoVadis Root CA 3 +================== +-----BEGIN CERTIFICATE----- +MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx +OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg +DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij +KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K +DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv +BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp +p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8 +nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX +MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM +Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz +uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT +BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj +YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0 +aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB +BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD +VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4 +ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE +AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV +qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s +hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z +POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2 +Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp +8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC +bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu +g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p +vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr +qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= +-----END CERTIFICATE----- + +Security Communication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw +8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM +DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX +5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd +DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 +JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g +0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a +mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ +s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ +6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi +FL39vmwLAw== +-----END CERTIFICATE----- + +XRamp Global CA Root +==================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE +BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj +dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx +HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg +U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu +IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx +foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE +zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs +AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry +xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap +oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC +AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc +/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt +qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n +nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz +8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw= +-----END CERTIFICATE----- + +Go Daddy Class 2 CA +=================== +-----BEGIN CERTIFICATE----- +MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY +VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG +A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g +RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD +ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv +2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32 +qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j +YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY +vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O +BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o +atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu +MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG +A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim +PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt +I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ +HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI +Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b +vZ8= +-----END CERTIFICATE----- + +Starfield Class 2 CA +==================== +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc +U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo +MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG +A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG +SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY +bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ +JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm +epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN +F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF +MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f +hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo +bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs +afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM +PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl +xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD +KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 +QBFGmh95DmK/D5fs4C8fF5Q= +-----END CERTIFICATE----- + +DigiCert Assured ID Root CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx +MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO +9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy +UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW +/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy +oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf +GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF +66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq +hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc +EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn +SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i +8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe ++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== +-----END CERTIFICATE----- + +DigiCert Global Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw +MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn +TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 +BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H +4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y +7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB +o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm +8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF +BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr +EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt +tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 +UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- + +DigiCert High Assurance EV Root CA +================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw +KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw +MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ +MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu +Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t +Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS +OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 +MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ +NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe +h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB +Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY +JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ +V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp +myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK +mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K +-----END CERTIFICATE----- + +SwissSign Gold CA - G2 +====================== +-----BEGIN CERTIFICATE----- +MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw +EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN +MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp +c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq +t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C +jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg +vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF +ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR +AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend +jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO +peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR +7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi +GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64 +OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov +L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm +5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr +44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf +Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m +Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp +mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk +vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf +KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br +NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj +viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ +-----END CERTIFICATE----- + +SwissSign Silver CA - G2 +======================== +-----BEGIN CERTIFICATE----- +MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT +BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X +DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 +aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 +N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm ++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH +6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu +MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h +qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5 +FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs +ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc +celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X +CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB +tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 +cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P +4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F +kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L +3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx +/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa +DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP +e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu +WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ +DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub +DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u +-----END CERTIFICATE----- + +SecureTrust CA +============== +-----BEGIN CERTIFICATE----- +MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy +dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe +BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX +OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t +DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH +GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b +01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH +ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj +aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu +SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf +mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ +nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR +3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE= +-----END CERTIFICATE----- + +Secure Global CA +================ +-----BEGIN CERTIFICATE----- +MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH +bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg +MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg +Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx +YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ +bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g +8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV +HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi +0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn +oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA +MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+ +OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn +CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 +3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc +f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW +-----END CERTIFICATE----- + +COMODO Certification Authority +============================== +-----BEGIN CERTIFICATE----- +MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb +MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD +T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH ++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww +xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV +4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA +1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI +rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k +b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC +AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP +OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ +RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc +IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN ++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== +-----END CERTIFICATE----- + +Network Solutions Certificate Authority +======================================= +-----BEGIN CERTIFICATE----- +MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG +EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr +IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx +MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu +MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx +jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT +aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT +crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc +/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB +AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv +bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA +A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q +4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ +GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv +wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD +ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey +-----END CERTIFICATE----- + +COMODO ECC Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix +GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR +Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X +4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni +wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG +FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA +U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= +-----END CERTIFICATE----- + +Certigna +======== +-----BEGIN CERTIFICATE----- +MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw +EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3 +MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI +Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q +XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH +GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p +ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg +DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf +Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ +tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ +BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J +SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA +hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+ +ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu +PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY +1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw +WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== +-----END CERTIFICATE----- + +ePKI Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG +EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg +Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx +MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq +MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs +IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi +lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv +qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX +12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O +WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+ +ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao +lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/ +vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi +Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi +MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH +ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0 +1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq +KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV +xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP +NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r +GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE +xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx +gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy +sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD +BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= +-----END CERTIFICATE----- + +certSIGN ROOT CA +================ +-----BEGIN CERTIFICATE----- +MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD +VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa +Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE +CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I +JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH +rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2 +ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD +0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943 +AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B +Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB +AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8 +SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0 +x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt +vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz +TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD +-----END CERTIFICATE----- + +NetLock Arany (Class Gold) Főtanúsítvány +======================================== +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G +A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 +dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB +cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx +MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO +ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv +biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6 +c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu +0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw +/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk +H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw +fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1 +neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW +qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta +YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC +bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna +NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu +dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= +-----END CERTIFICATE----- + +Hongkong Post Root CA 1 +======================= +-----BEGIN CERTIFICATE----- +MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT +DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx +NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n +IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 +ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr +auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh +qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY +V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV +HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i +h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio +l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei +IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps +T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT +c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== +-----END CERTIFICATE----- + +SecureSign RootCA11 +=================== +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi +SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS +b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw +KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 +cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL +TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO +wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq +g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP +O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA +bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX +t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh +OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r +bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ +Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01 +y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 +lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= +-----END CERTIFICATE----- + +Microsec e-Szigno Root CA 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER +MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv +c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o +dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE +BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt +U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA +fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG +0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA +pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm +1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC +AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf +QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE +FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o +lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX +I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 +tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 +yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi +LXpUq3DDfSJlgnCW +-----END CERTIFICATE----- + +GlobalSign Root CA - R3 +======================= +-----BEGIN CERTIFICATE----- +MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt +iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ +0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 +rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl +OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 +xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 +lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 +EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E +bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 +YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r +kpeDMdmztcpHWD9f +-----END CERTIFICATE----- + +Autoridad de Certificacion Firmaprofesional CIF A62634068 +========================================================= +-----BEGIN CERTIFICATE----- +MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA +BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 +MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw +QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB +NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD +Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P +B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY +7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH +ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI +plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX +MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX +LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK +bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU +vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud +EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH +DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp +cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA +bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx +ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx +51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk +R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP +T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f +Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl +osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR +crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR +saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD +KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi +6Et8Vcad+qMUu2WFbm5PEn4KPJ2V +-----END CERTIFICATE----- + +Izenpe.com +========== +-----BEGIN CERTIFICATE----- +MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG +EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz +MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu +QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ +03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK +ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU ++zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC +PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT +OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK +F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK +0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+ +0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB +leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID +AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+ +SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG +NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx +MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O +BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l +Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga +kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q +hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs +g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 +aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 +nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC +ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo +Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z +WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== +-----END CERTIFICATE----- + +Go Daddy Root Certificate Authority - G2 +======================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu +MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 +MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 +b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G +A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq +9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD ++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd +fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl +NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 +BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac +vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r +5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV +N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 +-----END CERTIFICATE----- + +Starfield Root Certificate Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0 +eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw +DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg +VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB +dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv +W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs +bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk +N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf +ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU +JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol +TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx +4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw +F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K +pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ +c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 +-----END CERTIFICATE----- + +Starfield Services Root Certificate Authority - G2 +================================================== +-----BEGIN CERTIFICATE----- +MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl +IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV +BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT +dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg +Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 +h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa +hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP +LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB +rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG +SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP +E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy +xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd +iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza +YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 +-----END CERTIFICATE----- + +AffirmTrust Commercial +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw +MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb +DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV +C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 +BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww +MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV +HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG +hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi +qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv +0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh +sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= +-----END CERTIFICATE----- + +AffirmTrust Networking +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw +MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE +Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI +dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 +/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb +h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV +HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu +UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6 +12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23 +WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9 +/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= +-----END CERTIFICATE----- + +AffirmTrust Premium +=================== +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy +OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy +dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn +BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV +5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs ++7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd +GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R +p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI +S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04 +6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5 +/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo ++Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv +MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg +Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC +6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S +L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK ++4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV +BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg +IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 +g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb +zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== +-----END CERTIFICATE----- + +AffirmTrust Premium ECC +======================= +-----BEGIN CERTIFICATE----- +MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV +BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx +MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U +cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ +N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW +BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK +BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X +57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM +eQ== +-----END CERTIFICATE----- + +Certum Trusted Network CA +========================= +-----BEGIN CERTIFICATE----- +MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK +ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy +MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU +ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC +l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J +J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 +fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 +cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB +Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw +DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj +jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 +mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj +Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI +03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= +-----END CERTIFICATE----- + +TWCA Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ +VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG +EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB +IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx +QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC +oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP +4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r +y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB +BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG +9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC +mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW +QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY +T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny +Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== +-----END CERTIFICATE----- + +Security Communication RootCA2 +============================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh +dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC +SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy +aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ ++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R +3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV +spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K +EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8 +QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB +CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj +u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk +3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q +tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 +mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 +-----END CERTIFICATE----- + +EC-ACC +====== +-----BEGIN CERTIFICATE----- +MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE +BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w +ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD +VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE +CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT +BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7 +MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt +SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl +Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh +cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK +w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT +ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 +HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a +E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw +0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD +VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 +Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l +dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ +lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa +Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe +l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 +E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D +5EI= +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions RootCA 2011 +======================================================= +-----BEGIN CERTIFICATE----- +MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT +O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y +aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z +IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT +AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z +IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo +IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI +1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa +71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u +8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH +3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/ +MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8 +MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu +b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt +XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8 +TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD +/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N +7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4 +-----END CERTIFICATE----- + +Actalis Authentication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM +BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE +AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky +MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz +IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290 +IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ +wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa +by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6 +zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f +YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2 +oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l +EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7 +hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8 +EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5 +jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY +iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt +ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI +WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0 +JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx +K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+ +Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC +4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo +2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz +lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem +OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9 +vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== +-----END CERTIFICATE----- + +Buypass Class 2 Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X +DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 +eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1 +g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn +9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b +/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU +CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff +awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI +zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn +Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX +Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs +M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF +AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s +A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI +osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S +aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd +DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD +LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0 +oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC +wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS +CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN +rJgWVqA= +-----END CERTIFICATE----- + +Buypass Class 3 Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X +DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 +eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH +sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR +5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh +7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ +ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH +2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV +/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ +RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA +Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq +j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF +AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV +cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G +uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG +Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8 +ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2 +KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz +6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug +UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe +eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi +Cp/HuZc= +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 3 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM +IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU +cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx +MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz +dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD +ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK +9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU +NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF +iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W +0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr +AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb +fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT +ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h +P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml +e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe +Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE +LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD +ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA +BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv +KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z +p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC +AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ +4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y +eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw +MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G +PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw +OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm +2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 +o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV +dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph +X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I= +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 EV 2009 +================================= +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS +egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh +zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T +7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60 +sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35 +11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv +cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v +ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El +MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp +b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh +c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+ +PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05 +nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX +ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA +NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv +w9y4AyHqnxbxLFS1 +-----END CERTIFICATE----- + +CA Disig Root R2 +================ +-----BEGIN CERTIFICATE----- +MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw +EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp +ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx +EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp +c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC +w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia +xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7 +A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S +GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV +g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa +5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE +koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A +Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i +Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV +HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u +Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM +tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV +sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je +dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8 +1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx +mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01 +utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0 +sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg +UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV +7+ZtsH8tZ/3zbBt1RqPlShfppNcL +-----END CERTIFICATE----- + +ACCVRAIZ1 +========= +-----BEGIN CERTIFICATE----- +MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB +SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1 +MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH +UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM +jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0 +RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD +aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ +0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG +WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7 +8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR +5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J +9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK +Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw +Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu +Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2 +VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM +Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA +QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh +AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA +YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj +AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA +IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk +aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0 +dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2 +MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI +hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E +R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN +YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49 +nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ +TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3 +sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h +I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg +Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd +3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p +EfbRD0tVNEYqi4Y7 +-----END CERTIFICATE----- + +TWCA Global Root CA +=================== +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT +CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD +QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK +EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg +Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C +nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV +r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR +Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV +tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W +KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99 +sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p +yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn +kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI +zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g +cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn +LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M +8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg +/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg +lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP +A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m +i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8 +EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3 +zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0= +-----END CERTIFICATE----- + +TeliaSonera Root CA v1 +====================== +-----BEGIN CERTIFICATE----- +MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE +CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4 +MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW +VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+ +6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA +3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k +B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn +Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH +oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3 +F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ +oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7 +gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc +TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB +AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW +DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm +zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx +0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW +pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV +G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc +c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT +JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2 +qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6 +Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems +WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= +-----END CERTIFICATE----- + +E-Tugra Certification Authority +=============================== +-----BEGIN CERTIFICATE----- +MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w +DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls +ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN +ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw +NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx +QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl +cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD +DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd +hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K +CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g +ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ +BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0 +E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz +rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq +jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn +rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5 +dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB +/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG +MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK +kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO +XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807 +VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo +a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc +dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV +KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT +Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0 +8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G +C7TbO6Orb1wdtn7os4I07QZcJA== +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 2 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM +IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU +cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx +MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz +dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD +ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ +SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F +vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970 +2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV +WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy +YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4 +r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf +vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR +3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN +9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== +-----END CERTIFICATE----- + +Atos TrustedRoot 2011 +===================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU +cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 +MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG +A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV +hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr +54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ +DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 +HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR +z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R +l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ +bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB +CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h +k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh +TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 +61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G +3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed +-----END CERTIFICATE----- + +QuoVadis Root CA 1 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE +PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm +PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6 +Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN +ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l +g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV +7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX +9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f +iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg +t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI +hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC +MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3 +GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct +Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP ++V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh +3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa +wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6 +O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0 +FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV +hMJKzRwuJIczYOXD +-----END CERTIFICATE----- + +QuoVadis Root CA 2 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh +ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY +NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t +oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o +MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l +V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo +L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ +sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD +6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh +lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI +hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K +pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9 +x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz +dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X +U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw +mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD +zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN +JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr +O3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + +QuoVadis Root CA 3 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286 +IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL +Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe +6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3 +I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U +VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7 +5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi +Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM +dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt +rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI +hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px +KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS +t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ +TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du +DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib +Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD +hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX +0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW +dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2 +PpxxVJkES/1Y+Zj0 +-----END CERTIFICATE----- + +DigiCert Assured ID Root G2 +=========================== +-----BEGIN CERTIFICATE----- +MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw +MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH +35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq +bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw +VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP +YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn +lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO +w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv +0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz +d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW +hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M +jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo +IhNzbM8m9Yop5w== +-----END CERTIFICATE----- + +DigiCert Assured ID Root G3 +=========================== +-----BEGIN CERTIFICATE----- +MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD +VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ +BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb +RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs +KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF +UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy +YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy +1vUhZscv6pZjamVFkpUBtA== +-----END CERTIFICATE----- + +DigiCert Global Root G2 +======================= +-----BEGIN CERTIFICATE----- +MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx +MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ +kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO +3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV +BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM +UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB +o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu +5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr +F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U +WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH +QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/ +iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl +MrY= +-----END CERTIFICATE----- + +DigiCert Global Root G3 +======================= +-----BEGIN CERTIFICATE----- +MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD +VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw +MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k +aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C +AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O +YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp +Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y +3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34 +VOKa5Vt8sycX +-----END CERTIFICATE----- + +DigiCert Trusted Root G4 +======================== +-----BEGIN CERTIFICATE----- +MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw +HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G +CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp +pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o +k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa +vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY +QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6 +MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm +mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7 +f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH +dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8 +oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud +DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD +ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY +ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr +yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy +7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah +ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN +5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb +/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa +5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK +G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP +82Z+ +-----END CERTIFICATE----- + +COMODO RSA Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn +dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ +FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+ +5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG +x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX +2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL +OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3 +sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C +GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5 +WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E +FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w +DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt +rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+ +nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg +tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW +sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp +pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA +zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq +ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 +7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I +LaZRfyHBNVOFBkpdn627G190 +-----END CERTIFICATE----- + +USERTrust RSA Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz +0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j +Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn +RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O ++T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq +/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE +Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM +lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8 +yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+ +eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd +BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW +FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ +7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ +Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM +8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi +FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi +yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c +J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw +sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx +Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9 +-----END CERTIFICATE----- + +USERTrust ECC Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2 +0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez +nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV +HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB +HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu +9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R4 +=========================== +-----BEGIN CERTIFICATE----- +MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl +OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P +AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV +MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF +JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R5 +=========================== +-----BEGIN CERTIFICATE----- +MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6 +SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS +h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx +uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 +yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 +-----END CERTIFICATE----- + +Staat der Nederlanden EV Root CA +================================ +-----BEGIN CERTIFICATE----- +MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M +MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl +cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk +SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW +O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r +0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8 +Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV +XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr +08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV +0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd +74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx +fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa +ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI +eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu +c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq +5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN +b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN +f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi +5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4 +WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK +DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy +eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg== +-----END CERTIFICATE----- + +IdenTrust Commercial Root CA 1 +============================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS +b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES +MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB +IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld +hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/ +mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi +1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C +XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl +3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy +NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV +WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg +xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix +uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI +hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH +6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg +ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt +ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV +YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX +feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro +kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe +2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz +Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R +cGzM7vRX+Bi6hG6H +-----END CERTIFICATE----- + +IdenTrust Public Sector Root CA 1 +================================= +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv +ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV +UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS +b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy +P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6 +Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI +rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf +qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS +mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn +ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh +LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v +iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL +4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B +Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw +DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj +t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A +mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt +GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt +m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx +NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4 +Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI +ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC +ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ +3Wl9af0AVqW3rLatt8o+Ae+c +-----END CERTIFICATE----- + +Entrust Root Certification Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy +bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug +b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw +HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT +DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx +OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s +eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP +/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz +HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU +s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y +TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx +AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6 +0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z +iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ +Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi +nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+ +vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO +e4pIb4tF9g== +-----END CERTIFICATE----- + +Entrust Root Certification Authority - EC1 +========================================== +-----BEGIN CERTIFICATE----- +MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx +FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn +YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl +ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw +FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs +LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg +dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt +IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy +AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef +9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h +vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8 +kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G +-----END CERTIFICATE----- + +CFCA EV ROOT +============ +-----BEGIN CERTIFICATE----- +MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE +CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB +IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw +MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD +DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV +BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD +7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN +uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW +ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7 +xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f +py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K +gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol +hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ +tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf +BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB +/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB +ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q +ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua +4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG +E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX +BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn +aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy +PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX +kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C +ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GB CA +=============================== +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG +EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl +ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw +MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD +VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds +b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX +scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP +rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk +9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o +Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg +GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB +/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI +hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD +dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0 +VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui +HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic +Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= +-----END CERTIFICATE----- + +SZAFIR ROOT CA2 +=============== +-----BEGIN CERTIFICATE----- +MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG +A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV +BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ +BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD +VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q +qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK +DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE +2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ +ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi +ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P +AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC +AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5 +O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67 +oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul +4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6 ++/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw== +-----END CERTIFICATE----- + +Certum Trusted Network CA 2 +=========================== +-----BEGIN CERTIFICATE----- +MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE +BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1 +bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y +ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ +TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl +cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB +IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9 +7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o +CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b +Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p +uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130 +GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ +9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB +Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye +hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM +BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI +hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW +Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA +L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo +clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM +pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb +w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo +J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm +ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX +is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7 +zAYspsbiDrW5viSP +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions RootCA 2015 +======================================================= +-----BEGIN CERTIFICATE----- +MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT +BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0 +aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl +YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx +MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg +QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV +BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw +MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv +bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh +iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+ +6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd +FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr +i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F +GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2 +fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu +iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc +Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI +hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+ +D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM +d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y +d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn +82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb +davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F +Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt +J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa +JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q +p/UsQu0yrbYhnr68 +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions ECC RootCA 2015 +=========================================================== +-----BEGIN CERTIFICATE----- +MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0 +aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u +cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj +aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw +MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj +IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD +VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290 +Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP +dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK +Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O +BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA +GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn +dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR +-----END CERTIFICATE----- + +ISRG Root X1 +============ +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE +BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD +EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG +EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT +DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r +Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1 +3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K +b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN +Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ +4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf +1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu +hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH +usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r +OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G +A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY +9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL +ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV +0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt +hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw +TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx +e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA +JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD +YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n +JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ +m+kXQ99b21/+jh5Xos1AnX5iItreGCc= +-----END CERTIFICATE----- + +AC RAIZ FNMT-RCM +================ +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT +AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw +MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD +TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf +qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr +btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL +j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou +08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw +WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT +tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ +47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC +ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa +i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o +dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD +nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s +D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ +j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT +Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW ++YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7 +Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d +8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm +5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG +rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM= +-----END CERTIFICATE----- + +Amazon Root CA 1 +================ +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1 +MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH +FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ +gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t +dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce +VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3 +DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM +CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy +8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa +2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2 +xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- + +Amazon Root CA 2 +================ +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1 +MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4 +kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp +N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9 +AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd +fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx +kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS +btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0 +Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN +c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+ +3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw +DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA +A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY ++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE +YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW +xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ +gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW +aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV +Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3 +KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi +JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw= +-----END CERTIFICATE----- + +Amazon Root CA 3 +================ +-----BEGIN CERTIFICATE----- +MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB +f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr +Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43 +rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc +eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw== +-----END CERTIFICATE----- + +Amazon Root CA 4 +================ +-----BEGIN CERTIFICATE----- +MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN +/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri +83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV +HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA +MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1 +AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA== +-----END CERTIFICATE----- + +TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 +============================================= +-----BEGIN CERTIFICATE----- +MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT +D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr +IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g +TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp +ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD +VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt +c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth +bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11 +IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8 +6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc +wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0 +3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9 +WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU +ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ +KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh +AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc +lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R +e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j +q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= +-----END CERTIFICATE----- + +GDCA TrustAUTH R5 ROOT +====================== +-----BEGIN CERTIFICATE----- +MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw +BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD +DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow +YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ +IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs +AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p +OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr +pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ +9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ +xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM +R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ +D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4 +oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx +9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg +p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9 +H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35 +6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd ++PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ +HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD +F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ +8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv +/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT +aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== +-----END CERTIFICATE----- + +TrustCor RootCert CA-1 +====================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx +MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu +YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe +VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy +dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq +jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4 +pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0 +JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h +gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw +/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j +BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5 +mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf +ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C +qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P +3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk= +-----END CERTIFICATE----- + +TrustCor RootCert CA-2 +====================== +-----BEGIN CERTIFICATE----- +MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w +DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT +eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0 +eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy +MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h +bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U +cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0 +IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb +ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk +RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1 +oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb +XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1 +/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q +jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP +eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg +rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh +8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU +2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h +Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp +kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv +2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3 +S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw +PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv +DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU +RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE +xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX +RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ +-----END CERTIFICATE----- + +TrustCor ECA-1 +============== +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw +N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5 +MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y +IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR +MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23 +xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc +p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+ +fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj +YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL +f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF +AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u +/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F +hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs +J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC +jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g== +-----END CERTIFICATE----- + +SSL.com Root Certification Authority RSA +======================================== +-----BEGIN CERTIFICATE----- +MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM +BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x +MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw +MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM +LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C +Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8 +P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge +oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp +k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z +fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ +gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2 +UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8 +1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s +bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV +HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr +dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf +ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl +u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq +erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj +MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ +vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI +Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y +wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI +WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k= +-----END CERTIFICATE----- + +SSL.com Root Certification Authority ECC +======================================== +-----BEGIN CERTIFICATE----- +MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv +BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy +MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO +BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv +bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+ +8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR +hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT +jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW +e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z +5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority RSA R2 +============================================== +-----BEGIN CERTIFICATE----- +MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w +DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u +MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy +MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI +DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD +VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh +hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w +cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO +Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+ +B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh +CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim +9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto +RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm +JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48 ++qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV +HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp +qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1 +++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx +Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G +guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz +OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7 +CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq +lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR +rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1 +hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX +9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority ECC +=========================================== +-----BEGIN CERTIFICATE----- +MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy +BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw +MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM +LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy +3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O +BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe +5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ +N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm +m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== +-----END CERTIFICATE----- + +GlobalSign Root CA - R6 +======================= +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEgMB4GA1UECxMX +R2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds +b2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQxMjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9i +YWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs +U2lnbjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQss +grRIxutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1kZguSgMpE +3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxDaNc9PIrFsmbVkJq3MQbF +vuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJwLnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqM +PKq0pPbzlUoSB239jLKJz9CgYXfIWHSw1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+ +azayOeSsJDa38O+2HBNXk7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05O +WgtH8wY2SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/hbguy +CLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4nWUx2OVvq+aWh2IMP +0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpYrZxCRXluDocZXFSxZba/jJvcE+kN +b7gu3GduyYsRtYQUigAZcIN5kZeR1BonvzceMgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNV +HSMEGDAWgBSubAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN +nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGtIxg93eFyRJa0 +lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr6155wsTLxDKZmOMNOsIeDjHfrY +BzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLjvUYAGm0CuiVdjaExUd1URhxN25mW7xocBFym +Fe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr +3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1 +0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T +uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK +oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t +JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA= +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GC CA +=============================== +-----BEGIN CERTIFICATE----- +MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD +SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo +MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa +Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL +ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh +bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr +VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab +NTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E +AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk +AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 +-----END CERTIFICATE----- + +GTS Root R1 +=========== +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG +EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv +b3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG +A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx +9vaMf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7r +aKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnW +r4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqM +LnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly +4cpk9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr +06zqkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92 +wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om +3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNu +JLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEM +BQADggIBADiWCu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1 +d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6ZXPYfcX3v73sv +fuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZRgyFmxhE+885H7pwoHyXa/6xm +ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b +gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq +4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr +tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo +pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0 +sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql +CFF1pkgl +-----END CERTIFICATE----- + +GTS Root R2 +=========== +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG +EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv +b3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG +A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTuk +k3LvCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo +7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWI +m8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5Gm +dFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbu +ak7MkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscsz +cTJGr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW +Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73Vululycsl +aVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy +5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEM +BQADggIBALZp8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT +vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiTz9D2PGcDFWEJ ++YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiApJiS4wGWAqoC7o87xdFtCjMw +c3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvbpxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3Da +WsYDQvTtN6LwG1BUSw7YhN4ZKJmBR64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5r +n/WkhLx3+WuXrD5RRaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56Gtmwfu +Nmsk0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC5AwiWVIQ +7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiFizoHCBy69Y9Vmhh1fuXs +gWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLnyOd/xCxgXS/Dr55FBcOEArf9LAhST4Ld +o/DUhgkC +-----END CERTIFICATE----- + +GTS Root R3 +=========== +-----BEGIN CERTIFICATE----- +MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU +Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej +QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP +0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0 +glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa +KaqW04MjyaR7YbPMAuhd +-----END CERTIFICATE----- + +GTS Root R4 +=========== +-----BEGIN CERTIFICATE----- +MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa +6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj +QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV +2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI +N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x +zPKwTdb+mciUqXWi4w== +-----END CERTIFICATE----- + +UCA Global G2 Root +================== +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG +EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x +NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU +cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT +oni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV +8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS +h6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o +LTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/ +R+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe +KW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa +4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc +OxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97 +8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O +BBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo +5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5 +1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A +Ds0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9 +yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX +c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo +jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk +bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x +ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn +RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A== +-----END CERTIFICATE----- + +UCA Extended Validation Root +============================ +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG +EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u +IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G +A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs +iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF +Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu +eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR +59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH +0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR +el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv +B0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth +WG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS +NwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS +3H5aBZ8eNJr34RQwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL +BQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR +ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM +aVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4 +dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb ++7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW +F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi +GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc +GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi +djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr +dhh2n1ax +-----END CERTIFICATE----- + +Certigna Root CA +================ +-----BEGIN CERTIFICATE----- +MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE +BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ +MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda +MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz +MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX +stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz +KNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8 +JXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16 +XdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq +4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej +wpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ +lXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI +jzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/ +/TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw +HQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of +1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy +dGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h +LmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl +cnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt +OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP +TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq +7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3 +4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd +8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS +6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY +tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS +aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde +E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= +-----END CERTIFICATE----- + +emSign Root CA - G1 +=================== +-----BEGIN CERTIFICATE----- +MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET +MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl +ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx +ODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk +aHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN +LnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1 +cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW +DV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ +6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH +hQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2 +vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q +NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q ++Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih +U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx +iN66zB+Afko= +-----END CERTIFICATE----- + +emSign ECC Root CA - G3 +======================= +-----BEGIN CERTIFICATE----- +MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG +A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg +MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4 +MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11 +ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g +RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc +58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr +MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D +CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7 +jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj +-----END CERTIFICATE----- + +emSign Root CA - C1 +=================== +-----BEGIN CERTIFICATE----- +MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx +EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp +Z24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE +BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD +ExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up +ufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/ +Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX +OFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V +I5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms +lMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+ +XJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD +ggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp +/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1 +NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9 +wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ +BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI= +-----END CERTIFICATE----- + +emSign ECC Root CA - C3 +======================= +-----BEGIN CERTIFICATE----- +MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG +A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF +Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE +BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD +ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd +6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9 +SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA +B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA +MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU +ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ== +-----END CERTIFICATE----- + +Hongkong Post Root CA 3 +======================= +-----BEGIN CERTIFICATE----- +MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG +A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK +Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2 +MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv +bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX +SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz +iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf +jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim +5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe +sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj +0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/ +JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u +y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h ++bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG +xVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID +AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e +i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN +AQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw +W62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld +y8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov ++BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc +eqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw +9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7 +nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY +hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB +60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq +dBb9HxEGmpv0 +-----END CERTIFICATE----- + +Entrust Root Certification Authority - G4 +========================================= +-----BEGIN CERTIFICATE----- +MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJBgNV +BAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3Qu +bmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1 +dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eSAtIEc0MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYT +AlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0 +L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhv +cml0eSAtIEc0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3D +umSXbcr3DbVZwbPLqGgZ2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV +3imz/f3ET+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j5pds +8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAMC1rlLAHGVK/XqsEQ +e9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73TDtTUXm6Hnmo9RR3RXRv06QqsYJn7 +ibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNXwbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5X +xNMhIWNlUpEbsZmOeX7m640A2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV +7rtNOzK+mndmnqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8 +dWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwlN4y6mACXi0mW +Hv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNjc0kCAwEAAaNCMEAwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9n +MA0GCSqGSIb3DQEBCwUAA4ICAQAS5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4Q +jbRaZIxowLByQzTSGwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht +7LGrhFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/B7NTeLUK +YvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uIAeV8KEsD+UmDfLJ/fOPt +jqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbwH5Lk6rWS02FREAutp9lfx1/cH6NcjKF+ +m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKW +RGhXxNUzzxkvFMSUHHuk2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjA +JOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G ++TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPT +kcpG2om3PVODLAgfi49T3f+sHw== +-----END CERTIFICATE----- + +Microsoft ECC Root Certificate Authority 2017 +============================================= +-----BEGIN CERTIFICATE----- +MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV +UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQgRUND +IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4 +MjMxNjA0WjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw +NAYDVQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwdjAQ +BgcqhkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBEyPNgASGAlEvaqiBYgtlzPbKnR5vSmZRogPZnZH6 +thaxjG7efM3beaYvzrvOcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYbhGBKia/teQ87zvH2RPUB +eMCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTIy5lycFIM ++Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3FQEEAwIBADAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlf +Xu5gKcs68tvWMoQZP3zVL8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaR +eNtUjGUBiudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M= +-----END CERTIFICATE----- + +Microsoft RSA Root Certificate Authority 2017 +============================================= +-----BEGIN CERTIFICATE----- +MIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBlMQswCQYDVQQG +EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQg +UlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjI1MTIyWhcNNDIw +NzE4MjMwMDIzWjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u +MTYwNAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcw +ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW9R2LBifOZNt9GkMml +7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTELy/xztokLaCLeX0ZdDMbRnMlfl7rEqUrQ7e +S0MdhweSE5CAg2Q1OQT85elss7YfUJQ4ZVBcF0a5toW1HLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw7 +1VdyvD/IybLeS2v4I2wDwAW9lcfNcztmgGTjGqwu+UcF8ga2m3P1eDNbx6H7JyqhtJqRjJHTOoI+ +dkC0zVJhUXAoP8XFWvLJjEm7FFtNyP9nTUwSlq31/niol4fX/V4ggNyhSyL71Imtus5Hl0dVe49F +yGcohJUcaDDv70ngNXtk55iwlNpNhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaGYaRS +MLl6IE9vDzhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6W6IYZVcSn2i51BVr +lMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4KUGsTuqwPN1q3ErWQgR5WrlcihtnJ +0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPSMQH+FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJ +ClTUFLkqqNfs+avNJVgyeY+QW5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCAYYw +DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNnpv7tNsiMwEAYJKwYBBAGC +NxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBAKyvPl3CEZaJjqPnktaXFbgToqZCLgLNFgVZJ8og +6Lq46BrsTaiXVq5lQ7GPAJtSzVXNUzltYkyLDVt8LkS/gxCP81OCgMNPOsduET/m4xaRhPtthH80 +dK2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6tZRGrox/2KJQJWVggEbbMwSubLWYdFQl3JPk ++ONVFT24bcMKpBLBaYVu32TxU5nhSnUgnZUP5NbcA/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex +/2kskZGT4d9Mozd2TaGf+G0eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDy +AmH3pvwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGsRGRxpl/j8nW +ZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2dxEuqPiAppGWSZI1b7rCoucL5mxAyE +7+WL85MB+GqQk2dLsmijtWKP6T+MejteD+eMuMZ87zf9dOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKT +c0QWbej09+CVgI+WXTik9KveCjCHk9hNAHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D +5KbvtwEwXlGjefVwaaZBRA+GsCyRxj3qrg+E +-----END CERTIFICATE----- + +e-Szigno Root CA 2017 +===================== +-----BEGIN CERTIFICATE----- +MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNVBAYTAkhVMREw +DwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUt +MjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJvb3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZa +Fw00MjA4MjIxMjA3MDZaMHExCzAJBgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UE +CgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3pp +Z25vIFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtvxie+RJCx +s1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+HWyx7xf58etqjYzBhMA8G +A1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSHERUI0arBeAyxr87GyZDv +vzAEwDAfBgNVHSMEGDAWgBSHERUI0arBeAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEA +tVfd14pVCzbhhkT61NlojbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxO +svxyqltZ+efcMQ== +-----END CERTIFICATE----- + +certSIGN Root CA G2 +=================== +-----BEGIN CERTIFICATE----- +MIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNVBAYTAlJPMRQw +EgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjAeFw0xNzAy +MDYwOTI3MzVaFw00MjAyMDYwOTI3MzVaMEExCzAJBgNVBAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lH +TiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP +ADCCAgoCggIBAMDFdRmRfUR0dIf+DjuW3NgBFszuY5HnC2/OOwppGnzC46+CjobXXo9X69MhWf05 +N0IwvlDqtg+piNguLWkh59E3GE59kdUWX2tbAMI5Qw02hVK5U2UPHULlj88F0+7cDBrZuIt4Imfk +abBoxTzkbFpG583H+u/E7Eu9aqSs/cwoUe+StCmrqzWaTOTECMYmzPhpn+Sc8CnTXPnGFiWeI8Mg +wT0PPzhAsP6CRDiqWhqKa2NYOLQV07YRaXseVO6MGiKscpc/I1mbySKEwQdPzH/iV8oScLumZfNp +dWO9lfsbl83kqK/20U6o2YpxJM02PbyWxPFsqa7lzw1uKA2wDrXKUXt4FMMgL3/7FFXhEZn91Qqh +ngLjYl/rNUssuHLoPj1PrCy7Lobio3aP5ZMqz6WryFyNSwb/EkaseMsUBzXgqd+L6a8VTxaJW732 +jcZZroiFDsGJ6x9nxUWO/203Nit4ZoORUSs9/1F3dmKh7Gc+PoGD4FapUB8fepmrY7+EF3fxDTvf +95xhszWYijqy7DwaNz9+j5LP2RIUZNoQAhVB/0/E6xyjyfqZ90bp4RjZsbgyLcsUDFDYg2WD7rlc +z8sFWkz6GZdr1l0T08JcVLwyc6B49fFtHsufpaafItzRUZ6CeWRgKRM+o/1Pcmqr4tTluCRVLERL +iohEnMqE0yo7AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1Ud +DgQWBBSCIS1mxteg4BXrzkwJd8RgnlRuAzANBgkqhkiG9w0BAQsFAAOCAgEAYN4auOfyYILVAzOB +ywaK8SJJ6ejqkX/GM15oGQOGO0MBzwdw5AgeZYWR5hEit/UCI46uuR59H35s5r0l1ZUa8gWmr4UC +b6741jH/JclKyMeKqdmfS0mbEVeZkkMR3rYzpMzXjWR91M08KCy0mpbqTfXERMQlqiCA2ClV9+BB +/AYm/7k29UMUA2Z44RGx2iBfRgB4ACGlHgAoYXhvqAEBj500mv/0OJD7uNGzcgbJceaBxXntC6Z5 +8hMLnPddDnskk7RI24Zf3lCGeOdA5jGokHZwYa+cNywRtYK3qq4kNFtyDGkNzVmf9nGvnAvRCjj5 +BiKDUyUM/FHE5r7iOZULJK2v0ZXkltd0ZGtxTgI8qoXzIKNDOXZbbFD+mpwUHmUUihW9o4JFWklW +atKcsWMy5WHgUyIOpwpJ6st+H6jiYoD2EEVSmAYY3qXNL3+q1Ok+CHLsIwMCPKaq2LxndD0UF/tU +Sxfj03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZkPuXaTH4M +NMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N +0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc= +-----END CERTIFICATE----- + +Trustwave Global Certification Authority +======================================== +-----BEGIN CERTIFICATE----- +MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV +UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 +ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTAeFw0xNzA4MjMxOTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJV +UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 +ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALldUShLPDeS0YLOvR29 +zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0XznswuvCAAJWX/NKSqIk4cXGIDtiLK0thAf +LdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4Bq +stTnoApTAbqOl5F2brz81Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9o +WN0EACyW80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotPJqX+ +OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1lRtzuzWniTY+HKE40 +Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfwhI0Vcnyh78zyiGG69Gm7DIwLdVcE +uE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm ++9jaJXLE9gCxInm943xZYkqcBW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqj +ifLJS3tBEW1ntwiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1UdDwEB/wQEAwIB +BjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W0OhUKDtkLSGm+J1WE2pIPU/H +PinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfeuyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0H +ZJDmHvUqoai7PF35owgLEQzxPy0QlG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla +4gt5kNdXElE1GYhBaCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5R +vbbEsLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPTMaCm/zjd +zyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qequ5AvzSxnI9O4fKSTx+O +856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxhVicGaeVyQYHTtgGJoC86cnn+OjC/QezH +Yj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu +3R3y4G5OBVixwJAWKqQ9EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP +29FpHOTKyeC2nOnOcXHebD8WpHk= +-----END CERTIFICATE----- + +Trustwave Global ECC P256 Certification Authority +================================================= +-----BEGIN CERTIFICATE----- +MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER +MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI +b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy +dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1 +NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH77bOYj +43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoNFWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqm +P62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt +0UrrdaVKEJmzsaGLSvcwCgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjz +RM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7 +-----END CERTIFICATE----- + +Trustwave Global ECC P384 Certification Authority +================================================= +-----BEGIN CERTIFICATE----- +MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER +MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI +b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy +dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4 +NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGvaDXU1CDFH +Ba5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJj9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr +/TklZvFe/oyujUF5nQlgziip04pt89ZF1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNV +HQ8BAf8EBQMDBwYAMB0GA1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNn +ADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl +CrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw== +-----END CERTIFICATE----- + +NAVER Global Root Certification Authority +========================================= +-----BEGIN CERTIFICATE----- +MIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEMBQAwaTELMAkG +A1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRGT1JNIENvcnAuMTIwMAYDVQQD +DClOQVZFUiBHbG9iYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MTgwODU4 +NDJaFw0zNzA4MTgyMzU5NTlaMGkxCzAJBgNVBAYTAktSMSYwJAYDVQQKDB1OQVZFUiBCVVNJTkVT +UyBQTEFURk9STSBDb3JwLjEyMDAGA1UEAwwpTkFWRVIgR2xvYmFsIFJvb3QgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC21PGTXLVAiQqrDZBb +UGOukJR0F0Vy1ntlWilLp1agS7gvQnXp2XskWjFlqxcX0TM62RHcQDaH38dq6SZeWYp34+hInDEW ++j6RscrJo+KfziFTowI2MMtSAuXaMl3Dxeb57hHHi8lEHoSTGEq0n+USZGnQJoViAbbJAh2+g1G7 +XNr4rRVqmfeSVPc0W+m/6imBEtRTkZazkVrd/pBzKPswRrXKCAfHcXLJZtM0l/aM9BhK4dA9WkW2 +aacp+yPOiNgSnABIqKYPszuSjXEOdMWLyEz59JuOuDxp7W87UC9Y7cSw0BwbagzivESq2M0UXZR4 +Yb8ObtoqvC8MC3GmsxY/nOb5zJ9TNeIDoKAYv7vxvvTWjIcNQvcGufFt7QSUqP620wbGQGHfnZ3z +VHbOUzoBppJB7ASjjw2i1QnK1sua8e9DXcCrpUHPXFNwcMmIpi3Ua2FzUCaGYQ5fG8Ir4ozVu53B +A0K6lNpfqbDKzE0K70dpAy8i+/Eozr9dUGWokG2zdLAIx6yo0es+nPxdGoMuK8u180SdOqcXYZai +cdNwlhVNt0xz7hlcxVs+Qf6sdWA7G2POAN3aCJBitOUt7kinaxeZVL6HSuOpXgRM6xBtVNbv8ejy +YhbLgGvtPe31HzClrkvJE+2KAQHJuFFYwGY6sWZLxNUxAmLpdIQM201GLQIDAQABo0IwQDAdBgNV +HQ4EFgQU0p+I36HNLL3s9TsBAZMzJ7LrYEswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMB +Af8wDQYJKoZIhvcNAQEMBQADggIBADLKgLOdPVQG3dLSLvCkASELZ0jKbY7gyKoNqo0hV4/GPnrK +21HUUrPUloSlWGB/5QuOH/XcChWB5Tu2tyIvCZwTFrFsDDUIbatjcu3cvuzHV+YwIHHW1xDBE1UB +jCpD5EHxzzp6U5LOogMFDTjfArsQLtk70pt6wKGm+LUx5vR1yblTmXVHIloUFcd4G7ad6Qz4G3bx +hYTeodoS76TiEJd6eN4MUZeoIUCLhr0N8F5OSza7OyAfikJW4Qsav3vQIkMsRIz75Sq0bBwcupTg +E34h5prCy8VCZLQelHsIJchxzIdFV4XTnyliIoNRlwAYl3dqmJLJfGBs32x9SuRwTMKeuB330DTH +D8z7p/8Dvq1wkNoL3chtl1+afwkyQf3NosxabUzyqkn+Zvjp2DXrDige7kgvOtB5CTh8piKCk5XQ +A76+AqAF3SAi428diDRgxuYKuQl1C/AH6GmWNcf7I4GOODm4RStDeKLRLBT/DShycpWbXgnbiUSY +qqFJu3FS8r/2/yehNq+4tneI3TqkbZs0kNwUXTC/t+sX5Ie3cdCh13cV1ELX8vMxmV2b3RZtP+oG +I/hGoiLtk/bdmuYqh7GYVPEi92tF4+KOdh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmg +kpzNNIaRkPpkUZ3+/uul9XXeifdy +-----END CERTIFICATE----- + +AC RAIZ FNMT-RCM SERVIDORES SEGUROS +=================================== +-----BEGIN CERTIFICATE----- +MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQswCQYDVQQGEwJF +UzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgwFgYDVQRhDA9WQVRFUy1RMjgy +NjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1SQ00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4 +MTIyMDA5MzczM1oXDTQzMTIyMDA5MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQt +UkNNMQ4wDAYDVQQLDAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNB +QyBSQUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LHsbI6GA60XYyzZl2hNPk2 +LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oKUm8BA06Oi6NCMEAwDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqG +SM49BAMDA2kAMGYCMQCuSuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoD +zBOQn5ICMQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJyv+c= +-----END CERTIFICATE----- + +GlobalSign Root R46 +=================== +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgISEdK7udcjGJ5AXwqdLdDfJWfRMA0GCSqGSIb3DQEBDAUAMEYxCzAJBgNV +BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJv +b3QgUjQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAX +BgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBSNDYwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCsrHQy6LNl5brtQyYdpokNRbopiLKkHWPd08Es +CVeJOaFV6Wc0dwxu5FUdUiXSE2te4R2pt32JMl8Nnp8semNgQB+msLZ4j5lUlghYruQGvGIFAha/ +r6gjA7aUD7xubMLL1aa7DOn2wQL7Id5m3RerdELv8HQvJfTqa1VbkNud316HCkD7rRlr+/fKYIje +2sGP1q7Vf9Q8g+7XFkyDRTNrJ9CG0Bwta/OrffGFqfUo0q3v84RLHIf8E6M6cqJaESvWJ3En7YEt +bWaBkoe0G1h6zD8K+kZPTXhc+CtI4wSEy132tGqzZfxCnlEmIyDLPRT5ge1lFgBPGmSXZgjPjHvj +K8Cd+RTyG/FWaha/LIWFzXg4mutCagI0GIMXTpRW+LaCtfOW3T3zvn8gdz57GSNrLNRyc0NXfeD4 +12lPFzYE+cCQYDdF3uYM2HSNrpyibXRdQr4G9dlkbgIQrImwTDsHTUB+JMWKmIJ5jqSngiCNI/on +ccnfxkF0oE32kRbcRoxfKWMxWXEM2G/CtjJ9++ZdU6Z+Ffy7dXxd7Pj2Fxzsx2sZy/N78CsHpdls +eVR2bJ0cpm4O6XkMqCNqo98bMDGfsVR7/mrLZqrcZdCinkqaByFrgY/bxFn63iLABJzjqls2k+g9 +vXqhnQt2sQvHnf3PmKgGwvgqo6GDoLclcqUC4wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA1yrc4GHqMywptWU4jaWSf8FmSwwDQYJKoZIhvcNAQEM +BQADggIBAHx47PYCLLtbfpIrXTncvtgdokIzTfnvpCo7RGkerNlFo048p9gkUbJUHJNOxO97k4Vg +JuoJSOD1u8fpaNK7ajFxzHmuEajwmf3lH7wvqMxX63bEIaZHU1VNaL8FpO7XJqti2kM3S+LGteWy +gxk6x9PbTZ4IevPuzz5i+6zoYMzRx6Fcg0XERczzF2sUyQQCPtIkpnnpHs6i58FZFZ8d4kuaPp92 +CC1r2LpXFNqD6v6MVenQTqnMdzGxRBF6XLE+0xRFFRhiJBPSy03OXIPBNvIQtQ6IbbjhVp+J3pZm +OUdkLG5NrmJ7v2B0GbhWrJKsFjLtrWhV/pi60zTe9Mlhww6G9kuEYO4Ne7UyWHmRVSyBQ7N0H3qq +JZ4d16GLuc1CLgSkZoNNiTW2bKg2SnkheCLQQrzRQDGQob4Ez8pn7fXwgNNgyYMqIgXQBztSvwye +qiv5u+YfjyW6hY0XHgL+XVAEV8/+LbzvXMAaq7afJMbfc2hIkCwU9D9SGuTSyxTDYWnP4vkYxboz +nxSjBF25cfe1lNj2M8FawTSLfJvdkzrnE6JwYZ+vj+vYxXX4M2bUdGc6N3ec592kD3ZDZopD8p/7 +DEJ4Y9HiD2971KE9dJeFt0g5QdYg/NA6s/rob8SKunE3vouXsXgxT7PntgMTzlSdriVZzH81Xwj3 +QEUxeCp6 +-----END CERTIFICATE----- + +GlobalSign Root E46 +=================== +-----BEGIN CERTIFICATE----- +MIICCzCCAZGgAwIBAgISEdK7ujNu1LzmJGjFDYQdmOhDMAoGCCqGSM49BAMDMEYxCzAJBgNVBAYT +AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJvb3Qg +RTQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAXBgNV +BAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBFNDYwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAAScDrHPt+ieUnd1NPqlRqetMhkytAepJ8qUuwzSChDH2omwlwxwEwkB +jtjqR+q+soArzfwoDdusvKSGN+1wCAB16pMLey5SnCNoIwZD7JIvU4Tb+0cUB+hflGddyXqBPCCj +QjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQxCpCPtsad0kRL +gLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ7Zvvi5QCkxeCmb6zniz2C5GMn0oUsfZk +vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+ +CAezNIm8BZ/3Hobui3A= +-----END CERTIFICATE----- + +GLOBALTRUST 2020 +================ +-----BEGIN CERTIFICATE----- +MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx +IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT +VCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh +BgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy +MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi +D59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO +VPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3QWPKzv9pj2gOlTblzLmM +CcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPwyJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCm +fecqQjuCgGOlYx8ZzHyyZqjC0203b+J+BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKA +A1GqtH6qRNdDYfOiaxaJSaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9OR +JitHHmkHr96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj04KlG +DfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9MedKZssCz3AwyIDMvU +clOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIwq7ejMZdnrY8XD2zHc+0klGvIg5rQ +mjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1Ud +IwQYMBaAFNwuH9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA +VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJCXtzoRlgHNQIw +4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd6IwPS3BD0IL/qMy/pJTAvoe9 +iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS +8cE54+X1+NZK3TTN+2/BT+MAi1bikvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2 +HcqtbepBEX4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS +vTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918 +oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF +YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl +gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg== +-----END CERTIFICATE----- + +ANF Secure Server Root CA +========================= +-----BEGIN CERTIFICATE----- +MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNVBAUTCUc2MzI4 +NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lv +bjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNVBAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3Qg +Q0EwHhcNMTkwOTA0MTAwMDM4WhcNMzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEw +MQswCQYDVQQGEwJFUzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQw +EgYDVQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQTCC +AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCjcqQZAZ2cC4Ffc0m6p6zz +BE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9qyGFOtibBTI3/TO80sh9l2Ll49a2pcbnv +T1gdpd50IJeh7WhM3pIXS7yr/2WanvtH2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcv +B2VSAKduyK9o7PQUlrZXH1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXse +zx76W0OLzc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyRp1RM +VwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQzW7i1o0TJrH93PB0j +7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/SiOL9V8BY9KHcyi1Swr1+KuCLH5z +JTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJnLNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe +8TZBAQIvfXOn3kLMTOmJDVb3n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVO +Hj1tyRRM4y5Bu8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj +o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAOBgNVHQ8BAf8E +BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEATh65isagmD9uw2nAalxJ +UqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzx +j6ptBZNscsdW699QIyjlRRA96Gejrw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDt +dD+4E5UGUcjohybKpFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM +5gf0vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjqOknkJjCb +5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ/zo1PqVUSlJZS2Db7v54 +EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ92zg/LFis6ELhDtjTO0wugumDLmsx2d1H +hk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI+PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGy +g77FGr8H6lnco4g175x2MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3 +r5+qPeoott7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw= +-----END CERTIFICATE----- + +Certum EC-384 CA +================ +-----BEGIN CERTIFICATE----- +MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQswCQYDVQQGEwJQ +TDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2Vy +dGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2 +MDcyNDU0WhcNNDMwMzI2MDcyNDU0WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERh +dGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx +GTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATEKI6rGFtq +vm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7TmFy8as10CW4kjPMIRBSqn +iBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68KjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFI0GZnQkdjrzife81r1HfS+8EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNo +ADBlAjADVS2m5hjEfO/JUG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0 +QoSZ/6vnnvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k= +-----END CERTIFICATE----- + +Certum Trusted Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6MQswCQYDVQQG +EwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0g +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0Ew +HhcNMTgwMzE2MTIxMDEzWhcNNDMwMzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMY +QXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZn0EGze2jusDbCSzBfN8p +fktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/qp1x4EaTByIVcJdPTsuclzxFUl6s1wB52 +HO8AU5853BSlLCIls3Jy/I2z5T4IHhQqNwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2 +fJmItdUDmj0VDT06qKhF8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGt +g/BKEiJ3HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGamqi4 +NboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi7VdNIuJGmj8PkTQk +fVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSFytKAQd8FqKPVhJBPC/PgP5sZ0jeJ +P/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0PqafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSY +njYJdmZm/Bo/6khUHL4wvYBQv3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHK +HRzQ+8S1h9E6Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1 +vALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAEii1QAL +LtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4WxmB82M+w85bj/UvXgF2Ez8s +ALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvozMrnadyHncI013nR03e4qllY/p0m+jiGPp2K +h2RX5Rc64vmNueMzeMGQ2Ljdt4NR5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8 +CYyqOhNf6DR5UMEQGfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA +4kZf5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq0Uc9Nneo +WWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj +6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTMqJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmT +OPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck +bxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb +-----END CERTIFICATE----- + +TunTrust Root CA +================ +-----BEGIN CERTIFICATE----- +MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG +A1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj +dHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw +NDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD +ZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz +2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b +bjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7 +NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd +gjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW +VSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f +Tpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ +juXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas +DXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS +VXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI +04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0 +90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl +0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd +Ao74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY +YdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp +adbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x +xBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP +jCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM +MEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z +ZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r +AZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o= +-----END CERTIFICATE----- + +HARICA TLS RSA Root CA 2021 +=========================== +-----BEGIN CERTIFICATE----- +MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG +EwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u +cyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz +OFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl +bWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB +IFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN +JLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu +a2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y +Ulhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K +5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv +dmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR +0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH +GjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm +haZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ +CPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G +A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU +EapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq +QRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD +QpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR +j88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5 +vZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0 +qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6 +Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/ +PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn +kf3/W9b3raYvAwtt41dU63ZTGI0RmLo= +-----END CERTIFICATE----- + +HARICA TLS ECC Root CA 2021 +=========================== +-----BEGIN CERTIFICATE----- +MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH +UjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD +QTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX +DTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj +IGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv +b3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l +AEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b +ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW +0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi +rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw +CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps +-----END CERTIFICATE----- diff --git a/tap_facebook/facebook_business/mixins.py b/tap_facebook/facebook_business/mixins.py new file mode 100644 index 0000000..9076748 --- /dev/null +++ b/tap_facebook/facebook_business/mixins.py @@ -0,0 +1,202 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 +""" + +from facebook_business.exceptions import FacebookBadObjectError + +# @deprecated CanValidate is being deprecated +class CanValidate(object): + """ + An instance of CanValidate will allow the ad objects + to call remote_validate() to verify if its parameters are valid + """ + def remote_validate(self, params=None): + params = params or {} + data_cache = dict(self._data) + changes_cache = dict(self._changes) + params['execution_options'] = ['validate_only'] + self.save(params=params) + self._data = data_cache + self._changes = changes_cache + return self + + +# @deprecated CanArchive is being deprecated +class CanArchive(object): + + """ + An instance of CanArchive will allow the ad objects + to call remote_delete() to be deleted using a POST request against + the object's status field. + """ + def remote_delete( + self, + batch=None, + failure=None, + success=None + ): + return self.remote_update( + params={ + 'status': self.Status.deleted, + }, + batch=batch, + failure=failure, + success=success, + ) + + """ + An instance of CanArchive will allow the ad objects + to call remote_archive() to be archived + """ + def remote_archive( + self, + batch=None, + failure=None, + success=None + ): + return self.remote_update( + params={ + 'status': self.Status.archived, + }, + batch=batch, + failure=failure, + success=success, + ) + + +# @deprecated CannotCreate is being deprecated +class CannotCreate(object): + + """ + An instance of CannotCreate will raise a TypeError when calling + remote_create(). + """ + + @classmethod + def remote_create(cls, *args, **kwargs): + raise TypeError('Cannot create object of type %s.' % cls.__name__) + +# @deprecated CannotDelete is being deprecated +class CannotDelete(object): + + """ + An instance of CannotDelete will raise a TypeError when calling + remote_delete(). + """ + + @classmethod + def remote_delete(cls, *args, **kwargs): + raise TypeError('Cannot delete object of type %s.' % cls.__name__) + +# @deprecated CannotUpdate is being deprecated +class CannotUpdate(object): + + """ + An instance of CannotUpdate will raise a TypeError when calling + remote_update(). + """ + + @classmethod + def remote_update(cls, *args, **kwargs): + raise TypeError('Cannot update object of type %s.' % cls.__name__) + +# @deprecated HasObjective is being deprecated +class HasObjective(object): + + """ + An instance of HasObjective will have an enum attribute Objective. + """ + + class Objective(object): + app_installs = 'APP_INSTALLS' + brand_awareness = 'BRAND_AWARENESS' + conversions = 'CONVERSIONS' + 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' + +# @deprecated HasStatus is being deprecated +class HasStatus(object): + + """ + An instance of HasStatus will have an enum attribute Status. + """ + + class Status(object): + active = 'ACTIVE' + archived = 'ARCHIVED' + deleted = 'DELETED' + paused = 'PAUSED' + +# @deprecated HasBidInfo is being deprecated +class HasBidInfo(object): + + """ + An instance of HasBidInfo will have an enum attribute BidInfo. + """ + + class BidInfo(object): + actions = 'ACTIONS' + clicks = 'CLICKS' + impressions = 'IMPRESSIONS' + reach = 'REACH' + social = 'SOCIAL' + +class HasAdLabels(object): + + def add_labels(self, labels=None): + """Adds labels to an ad object. + Args: + labels: A list of ad label IDs + Returns: + The FacebookResponse object. + """ + return self.get_api_assured().call( + 'POST', + (self.get_id_assured(), 'adlabels'), + params={'adlabels': [{'id': label} for label in labels]}, + ) + + def remove_labels(self, labels=None): + """Remove labels to an ad object. + Args: + labels: A list of ad label IDs + Returns: + The FacebookResponse object. + """ + return self.get_api_assured().call( + 'DELETE', + (self.get_id_assured(), 'adlabels'), + params={'adlabels': [{'id': label} for label in labels]}, + ) + +class ValidatesFields(object): + def __setitem__(self, key, value): + if key not in self.Field.__dict__: + raise FacebookBadObjectError( + "\"%s\" is not a valid field of %s" + % (key, self.__class__.__name__) + ) + else: + super(ValidatesFields, self).__setitem__(key, value) diff --git a/tap_facebook/facebook_business/session.py b/tap_facebook/facebook_business/session.py new file mode 100644 index 0000000..3dad0d9 --- /dev/null +++ b/tap_facebook/facebook_business/session.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. + +""" +The purpose of the session module is to encapsulate authentication classes and +utilities. +""" +import hashlib +import hmac +import requests +import os + + +class FacebookSession(object): + """ + FacebookSession manages the the Graph API authentication and https + connection. + + Attributes: + GRAPH (class): The graph url without an ending forward-slash. + app_id: The application id. + app_secret: The application secret. + access_token: The access token. + appsecret_proof: The application secret proof. + proxies: Object containing proxies for 'http' and 'https' + requests: The python requests object through which calls to the api can + be made. + """ + GRAPH = 'https://graph.facebook.com' + + def __init__(self, app_id=None, app_secret=None, access_token=None, + proxies=None, timeout=None, debug=False): + """ + Initializes and populates the instance attributes with app_id, + app_secret, access_token, appsecret_proof, proxies, timeout and requests + given arguments app_id, app_secret, access_token, proxies and timeout. + """ + self.app_id = app_id + self.app_secret = app_secret + self.access_token = access_token + self.proxies = proxies + self.timeout = timeout + self.debug = debug + self.requests = requests.Session() + self.requests.verify = os.path.join( + os.path.dirname(__file__), + 'fb_ca_chain_bundle.crt', + ) + params = { + 'access_token': self.access_token + } + if app_secret: + params['appsecret_proof'] = self._gen_appsecret_proof() + self.requests.params.update(params) + + if self.proxies: + self.requests.proxies.update(self.proxies) + + def _gen_appsecret_proof(self): + h = hmac.new( + self.app_secret.encode('utf-8'), + msg=self.access_token.encode('utf-8'), + digestmod=hashlib.sha256 + ) + + self.appsecret_proof = h.hexdigest() + return self.appsecret_proof + +__all__ = ['FacebookSession'] diff --git a/tap_facebook/facebook_business/specs.py b/tap_facebook/facebook_business/specs.py new file mode 100644 index 0000000..d4592e3 --- /dev/null +++ b/tap_facebook/facebook_business/specs.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. + +""" +specs module contains classes that help you define and create specs for use +in the Ads API. +""" + +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.mixins import ValidatesFields +from facebook_business.adobjects import adcreativeobjectstoryspec +from facebook_business.adobjects import adcreativelinkdatachildattachment +from facebook_business.adobjects import adcreativelinkdata +from facebook_business.adobjects import adcreativetextdata +from facebook_business.adobjects import adcreativephotodata +from facebook_business.adobjects import adcreativevideodata +from facebook_business.adobjects import pagepost +from facebook_business.adobjects import user + + +class ObjectStorySpec(adcreativeobjectstoryspec.AdCreativeObjectStorySpec): + pass + + +class AttachmentData(adcreativelinkdatachildattachment.AdCreativeLinkDataChildAttachment): + pass + + +class LinkData(adcreativelinkdata.AdCreativeLinkData): + pass + + +class TemplateData(adcreativelinkdata.AdCreativeLinkData): + pass + + +class TextData(adcreativetextdata.AdCreativeTextData): + pass + + +class PhotoData(adcreativephotodata.AdCreativePhotoData): + pass + + +class VideoData(adcreativevideodata.AdCreativeVideoData): + pass + +class PagePostData(pagepost.PagePost): + pass + +class UserData(user.User): + pass + +class SlideshowSpec(ValidatesFields, AbstractObject): + class Field(object): + images_urls = 'images_urls' + duration_ms = 'duration_ms' + transition_ms = 'transition_ms' diff --git a/tap_facebook/facebook_business/test/__init__.py b/tap_facebook/facebook_business/test/__init__.py new file mode 100644 index 0000000..726eabc --- /dev/null +++ b/tap_facebook/facebook_business/test/__init__.py @@ -0,0 +1 @@ +__all__ = ['tests'] diff --git a/tap_facebook/facebook_business/test/docs.py b/tap_facebook/facebook_business/test/docs.py new file mode 100644 index 0000000..172291c --- /dev/null +++ b/tap_facebook/facebook_business/test/docs.py @@ -0,0 +1,702 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Unit tests for the Python Facebook Business SDK. + +How to run: + python -m facebook_business.test.docs + python -m facebook_business.test.docs -v AdGroupDocsTestCase +''' + +import os +import sys +import json +from .docs_utils import * + + +class AdAccountDocsTestCase(DocsTestCase): + def setUp(self): + # Create Campaigns + campaign = self.create_campaign(1) + self.create_campaign(2) + # Create AdSets + adset = self.create_adset(1, campaign) + self.create_adset(2, campaign) + # Create Creatives + creative1 = self.create_creative(1) + creative2 = self.create_creative(2) + # Create AdGroups + ad = self.create_ad(1, adset, creative1) + self.create_ad(2, adset, creative2) + DocsDataStore.set('ad_id', ad.get_id()) + # Create Ad Labels + adlabel = self.create_adlabel() + DocsDataStore.set('adlabel_id', adlabel['id']) + # Create AdImage + image = self.create_image() + DocsDataStore.set('ad_account_image_hash', image['hash']) + + + def test_get_insights(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + insights = account.get_insights(fields=[ + Insights.Field.campaign_id, + Insights.Field.unique_clicks, + Insights.Field.impressions, + ], params={ + 'level': Insights.Level.campaign, + 'date_preset': Insights.Preset.yesterday, + }) + self.store_response(insights) + + def test_get_activities(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + activities = account.get_activities(fields=[ + Activity.Field.event_type, + Activity.Field.event_time, + ]) + self.store_response(activities[0]) + + def test_opt_out_user_from_targeting(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + response = account.opt_out_user_from_targeting( + schema=CustomAudience.Schema.email_hash, + users=['joe@example.com'], + ) + self.store_response(response) + + def test_get_campaigns(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + campaigns = account.get_campaigns(fields=[ + Campaign.Field.name, + Campaign.Field.configured_status, + ]) + self.store_response(campaigns) + + def test_get_ad_sets(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + adsets = account.get_ad_sets(fields=[ + AdSet.Field.name, + AdSet.Field.bid_info, + AdSet.Field.configured_status, + AdSet.Field.daily_budget, + AdSet.Field.targeting, + ]) + self.store_response(adsets) + + def test_get_ads(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + ads = account.get_ads(fields=[ + Ad.Field.name, + Ad.Field.configured_status, + Ad.Field.creative, + ]) + self.store_response(ads) + + def test_get_ad_users(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + users = account.get_ad_users() + self.store_response(users) + + def test_get_ad_creatives(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + creatives = account.get_ad_creatives(fields=[ + AdCreative.Field.name, + AdCreative.Field.image_hash, + ]) + self.store_response(creatives[0:2]) + + def test_get_ad_images(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + images = account.get_ad_images(fields=[ + AdImage.Field.hash, + ]) + self.store_response(images[0:2]) + + def test_get_ad_conversion_pixels(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + pixels = account.get_ad_conversion_pixels(fields=[ + AdImage.Field.hash, + ]) + self.store_response(pixels) + + def test_get_broad_category_targeting(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + bct = account.get_broad_category_targeting() + self.store_response(bct[0:2]) + + def test_get_connection_objects(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + connection_objects = account.get_connection_objects() + connection_objects = [ + co for co in connection_objects if co['id'] == '606699326111137'] + self.store_response(connection_objects) + + def test_get_custom_audiences(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + custom_audiences = account.get_custom_audiences() + self.store_response(custom_audiences[0:2]) + + def test_get_partner_categories(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + partner_categories = account.get_partner_categories() + self.store_response(partner_categories[0]) + + def test_get_rate_cards(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + rate_cards = account.get_rate_cards() + self.store_response(rate_cards[0:2]) + + def test_get_reach_estimate(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + reach_estimate = account.get_reach_estimate(params={ + 'currency': 'USD', + 'optimize_for': 'OFFSITE_CONVERSIONS', + 'targeting_spec': { + 'geo_locations': { + 'countries': ['US'], + } + } + }) + self.store_response(reach_estimate) + + def test_get_transactions(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + transactions = account.get_transactions() + self.store_response(transactions[0:2]) + + def test_get_ad_preview(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + ad_preview = account.get_ad_preview(params={ + 'creative': { + 'title': 'This is the title', + 'body': 'This is the body', + 'object_url': 'https://facebookmarketingpartners.com', + 'image_hash': DocsDataStore.get('ad_account_image_hash'), + }, + 'ad_format': 'RIGHT_COLUMN_STANDARD', + }) + self.store_response(ad_preview) + + def test_get_ads_pixels(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + pixels = account.get_ads_pixels(fields=[ + AdsPixel.Field.name, + AdsPixel.Field.id, + ]) + self.store_response(pixels) + + def test_get_targeting_description(self): + adgroup = Ad(DocsDataStore.get('ad_id')) + targeting = { + TargetingSpecsField.geo_locations: { + TargetingSpecsField.countries: ['US'], + }, + } + targeting_desc = adgroup.get_targeting_description(fields=[ + 'targetingsentencelines' + ], params={ + 'targeting_spec': targeting + }) + self.store_response(targeting_desc) + + def test_get_ad_labels(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + adlabels = account.get_ad_labels(fields=[ + AdLabel.Field.name, + AdLabel.Field.id, + ]) + self.store_response(adlabels) + + def test_get_ad_creatives_by_labels(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + adlabel_id = DocsDataStore.get('adlabel_id') + params = {'ad_label_ids': [adlabel_id], 'operator': 'ALL'} + adcreatives = account.get_ad_creatives_by_labels(fields=[ + AdLabel.Field.name, + AdLabel.Field.id, + ], params=params) + self.store_response(adcreatives) + + def test_get_ads_by_labels(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + adlabel_id = DocsDataStore.get('adlabel_id') + params = {'ad_label_ids': [adlabel_id], 'operator': 'ALL'} + ads = account.get_ads_by_labels(fields=[ + AdLabel.Field.name, + AdLabel.Field.id, + ], params=params) + self.store_response(ads) + + def test_get_adsets_by_labels(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + adlabel_id = DocsDataStore.get('adlabel_id') + params = {'ad_label_ids': [adlabel_id], 'operator': 'ALL'} + adsets = account.get_adsets_by_labels(fields=[ + AdLabel.Field.name, + AdLabel.Field.id, + ], params=params) + self.store_response(adsets) + + def test_get_campaigns_by_labels(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + adlabel_id = DocsDataStore.get('adlabel_id') + params = {'ad_label_ids': [adlabel_id], 'operator': 'ALL'} + campaigns = account.get_campaigns_by_labels(fields=[ + AdLabel.Field.name, + AdLabel.Field.id, + ], params=params) + self.store_response(campaigns) + + def test_get_minimum_budgets(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + min_budgets = account.get_minimum_budgets() + self.store_response(min_budgets[0:2]) + + +class AdUserDocsTestCase(DocsTestCase): + def test_get_ad_accounts(self): + user = AdUser('me') + accounts = user.get_ad_accounts(fields=[ + AdAccount.Field.name, + ]) + self.store_response(accounts[0:3]) + + def test_get_ad_account(self): + user = AdUser('me') + account = user.get_ad_account(fields=[ + AdAccount.Field.name, + ]) + self.store_response(account) + + def test_get_pages(self): + user = AdUser('me') + pages = user.get_pages(fields=[ + Page.Field.name, + ]) + self.store_response(pages) + + +class AdCreativeDocsTestCase(DocsTestCase): + def setUp(self): + creative = self.create_creative(1) + DocsDataStore.set('creative_id', creative.get_id()) + + def test_get_ad_preview(self): + creative = AdCreative(DocsDataStore.get('creative_id')) + preview = creative.get_ad_preview(params={ + 'ad_format': 'RIGHT_COLUMN_STANDARD', + }) + self.store_response(preview) + + +class AdDocsTestCase(DocsTestCase): + def setUp(self): + campaign = self.create_campaign(1) + adset = self.create_adset(1, campaign) + creative = self.create_creative_leads(1) + ad = self.create_ad(1, adset, creative) + DocsDataStore.set('ad_id', ad.get_id()) + + def test_get_ad_creatives(self): + ad = Ad(DocsDataStore.get('ad_id')) + creatives = ad.get_ad_creatives(fields=[AdCreative.Field.name]) + self.store_response(creatives) + + def test_get_targeting_description(self): + ad = Ad(DocsDataStore.get('ad_id')) + targeting_desc = ad.get_targeting_description(fields=[ + 'targetingsentencelines', + ]) + self.store_response(targeting_desc) + + def test_get_keyword_stats(self): + ad = Ad(DocsDataStore.get('ad_id')) + keywords = ad.get_keyword_stats() + self.store_response(keywords) + + def test_get_ad_preview(self): + ad = Ad(DocsDataStore.get('ad_id')) + ad_preview = ad.get_ad_preview(params={ + 'ad_format': 'RIGHT_COLUMN_STANDARD', + }) + self.store_response(ad_preview) + + def test_get_reach_estimate(self): + ad = Ad(DocsDataStore.get('ad_id')) + reach_estimate = ad.get_reach_estimate() + self.store_response(reach_estimate) + + def test_get_click_tracking_tag(self): + ad = Ad(DocsDataStore.get('ad_id')) + tag = ad.get_click_tracking_tag() + self.store_response(tag) + + def test_get_leads(self): + ad = Ad(DocsDataStore.get('ad_id')) + leads = ad.get_leads() + self.store_response(leads) + + +class AdImageDocsTestCase(DocsTestCase): + def setUp(self): + DocsDataStore.set( + 'image_zip', os.path.join(os.path.dirname(__file__), 'test.zip')) + DocsDataStore.set( + 'image_path', os.path.join(os.path.dirname(__file__), 'test.png')) + image = AdImage(parent_id=DocsDataStore.get('adaccount_id')) + image[AdImage.Field.filename] = DocsDataStore.get('image_path') + image.remote_create() + DocsDataStore.set('image_id', image['id']) + + def test_remote_create(self): + image = AdImage(parent_id=DocsDataStore.get('adaccount_id')) + image[AdImage.Field.filename] = DocsDataStore.get('image_path') + image.remote_create() + self.store_response(image) + + def test_remote_create_from_zip(self): + images = AdImage.remote_create_from_zip( + filename=DocsDataStore.get('image_zip'), + parent_id=DocsDataStore.get('adaccount_id'), + ) + self.store_response(images) + + def test_remote_read(self): + image = AdImage(DocsDataStore.get('image_id')) + image.remote_read() + self.store_response(image) + + def test_get_hash(self): + image = AdImage(DocsDataStore.get('image_id')) + image.remote_read() + image_hash = image.get_hash() + self.store_response(image_hash) + + +class AdSetDocsTestCase(DocsTestCase): + def setUp(self): + campaign = self.create_campaign(1) + adset = self.create_adset(1, campaign) + creative1 = self.create_creative(1) + creative2 = self.create_creative(2) + self.create_ad(1, adset, creative1) + self.create_ad(2, adset, creative2) + DocsDataStore.set('adcampaign_id', campaign.get_id()) + DocsDataStore.set('adset_id', adset.get_id()) + + def test_get_ads(self): + adset = AdSet(DocsDataStore.get('adset_id')) + adgroups = adset.get_ads(fields=[ + AdSet.Field.name, + AdSet.Field.campaign_id, + AdSet.Field.configured_status, + ]) + self.store_response(adgroups) + + def test_get_ad_creatives(self): + adset = AdSet(DocsDataStore.get('adset_id')) + adcreatives = adset.get_ad_creatives(fields=[ + AdCreative.Field.name, + AdCreative.Field.id, + AdCreative.Field.preview_url, + AdCreative.Field.call_to_action_type, + ]) + self.store_response(adcreatives) + + +class AdsPixelDocsTestCase(DocsTestCase): + + def setUp(self): + pixel = self.create_ads_pixel() + DocsDataStore.set('pixel_id', pixel.get_id()) + + def test_share_pixel_with_ad_account(self): + business_id = DocsDataStore.get('business_id') + act_id = DocsDataStore.get('adaccount_id') + destination_account_id = act_id.replace("act_", "") + pixel_id = DocsDataStore.get('pixel_id') + pixel = AdsPixel(pixel_id) + pixel.share_pixel_with_ad_account(business_id, destination_account_id) + self.store_response(pixel) + + def test_get_agencies(self): + pixel_id = DocsDataStore.get('pixel_id') + pixel = AdsPixel(pixel_id) + shared_agencies = pixel.get_agencies() + self.store_response(shared_agencies) + + def test_unshare_pixel_from_ad_account(self): + business_id = DocsDataStore.get('business_id') + account_id = DocsDataStore.get('adaccount_id').replace("act_", "") + pixel_id = DocsDataStore.get('pixel_id') + pixel = AdsPixel(pixel_id) + pixel.unshare_pixel_from_ad_account(business_id, account_id) + self.store_response(pixel) + + +class BusinessDocsTestCase(DocsTestCase): + def test_get_product_catalogs(self): + business = Business(DocsDataStore.get('business_id')) + catalogs = business.get_product_catalogs() + self.store_response(catalogs[0]) + + def test_get_insights(self): + business = Business(DocsDataStore.get('business_id')) + insights = business.get_insights(fields=[ + Insights.Field.campaign_id, + Insights.Field.unique_clicks, + Insights.Field.impressions, + ], params={ + 'level': Insights.Level.campaign, + 'date_preset': Insights.Preset.yesterday, + }) + self.store_response(insights) + + +class CustomAudienceDocsTestCase(DocsTestCase): + + def setUp(self): + ca = self.create_custom_audience() + DocsDataStore.set('ca_id', ca.get_id_assured()) + + def test_add_users(self): + custom_audience = CustomAudience(DocsDataStore.get('ca_id')) + response = custom_audience.add_users( + schema=CustomAudience.Schema.email_hash, + users=[ + 'joe@example.com', + ] + ) + self.store_response(response) + + def test_remove_users(self): + custom_audience = CustomAudience(DocsDataStore.get('ca_id')) + response = custom_audience.remove_users( + schema=CustomAudience.Schema.email_hash, + users=[ + 'joe@example.com', + ] + ) + self.store_response(response) + + def test_format_params(self): + formatted_params = CustomAudience.format_params( + schema=CustomAudience.Schema.email_hash, + users=['joe@example.com'], + ) + self.store_response(formatted_params) + + +class CampaignDocsTestCase(DocsTestCase): + def setUp(self): + campaign = self.create_campaign(1) + adset = self.create_adset(1, campaign) + self.create_adset(2, campaign) + creative = self.create_creative(1) + self.create_ad(1, adset, creative) + self.create_ad(2, adset, creative) + DocsDataStore.set('campaign_id', campaign.get_id()) + + def test_get_ad_sets(self): + campaign = Campaign(DocsDataStore.get('campaign_id')) + adsets = campaign.get_ad_sets(fields=[ + AdSet.Field.name, + AdSet.Field.id, + AdSet.Field.daily_budget, + ]) + self.store_response(adsets[0]) + + def test_get_ads(self): + campaign = Campaign(DocsDataStore.get('campaign_id')) + ads = campaign.get_ads(fields=[ + Ad.Field.name, + Ad.Field.configured_status, + Ad.Field.creative, + ]) + self.store_response(ads) + + +class ProductGroupDocsTestCase(DocsTestCase): + pass + + +class ProductFeedDocsTestCase(DocsTestCase): + + def setUp(self): + product_catalog = self.create_product_catalog() + DocsDataStore.set('dpa_catalog_id', product_catalog.get_id()) + product_feed = self.create_product_feed(product_catalog.get_id()) + DocsDataStore.set('dpa_feed_id', product_feed.get_id()) + + def test_get_products(self): + feed = ProductFeed(DocsDataStore.get('dpa_feed_id')) + products = feed.get_products(fields=[ + Product.Field.title, + Product.Field.price, + ]) + self.store_response(products) + + +class ProductAudienceDocsTestCase(DocsTestCase): + pass + + +class ProductDocsTestCase(DocsTestCase): + pass + + +class ProductCatalogDocsTestCase(DocsTestCase): + + def setUp(self): + product_catalog = self.create_product_catalog() + DocsDataStore.set('dpa_catalog_id', product_catalog.get_id()) + pixel = self.create_ads_pixel() + DocsDataStore.set('pixel_id', pixel.get_id()) + + def test_get_product_feeds(self): + catalog = ProductCatalog(DocsDataStore.get('dpa_catalog_id')) + feeds = catalog.get_product_feeds() + self.store_response(feeds[0]) + + def test_add_external_event_sources(self): + catalog = ProductCatalog(DocsDataStore.get('dpa_catalog_id')) + response = catalog.add_external_event_sources(pixel_ids=[ + DocsDataStore.get('pixel_id'), + ]) + self.store_response(response) + + def test_get_external_event_sources(self): + catalog = ProductCatalog(DocsDataStore.get('dpa_catalog_id')) + sources = catalog.get_external_event_sources() + self.store_response(sources) + + def test_remove_external_event_sources(self): + catalog = ProductCatalog(DocsDataStore.get('dpa_catalog_id')) + response = catalog.remove_external_event_sources(pixel_ids=[ + DocsDataStore.get('pixel_id'), + ]) + self.store_response(response) + + +class ProductSetDocsTestCase(DocsTestCase): + + def setUp(self): + product_catalog = self.create_product_catalog() + DocsDataStore.set('dpa_catalog_id', product_catalog.get_id()) + product_set = self.create_product_set(product_catalog.get_id()) + DocsDataStore.set('dpa_set_id', product_set.get_id()) + + def test_get_product_groups(self): + product_set = ProductSet(DocsDataStore.get('dpa_set_id')) + product_groups = product_set.get_product_groups(fields=[ + Product.Field.title, + Product.Field.price, + ]) + self.store_response(product_groups) + + def test_get_products(self): + product_set = ProductSet(DocsDataStore.get('dpa_set_id')) + products = product_set.get_products(fields=[ + Product.Field.title, + Product.Field.price, + ]) + self.store_response(products) + + +class ProductFeedUploadErrorDocsTestCase(DocsTestCase): + pass + + +class AdConversionPixelDocsTestCase(DocsTestCase): + pass + + +class ClickTrackingTagDocsTestCase(DocsTestCase): + pass + + +class InsightsDocsTestCase(DocsTestCase): + pass + + +class PageDocsTestCase(DocsTestCase): + + def test_get_leadgen_forms(self): + page = Page(DocsDataStore.get('page_id')) + leadgen_forms = page.get_leadgen_forms() + self.store_response(leadgen_forms[0:2]) + +class ReachFrequencyPredictionDocsTestCase(DocsTestCase): + def setUp(self): + rfp = self.create_reach_frequency_prediction() + DocsDataStore.set('rfp_id', rfp.get_id()) + + def test_reserve(self): + pass + + def test_cancel(self): + pass + + +class TargetingSearchDocsTestCase(DocsTestCase): + def test_search(self): + results = TargetingSearch.search(params={ + 'q': 'United States', + 'type': TargetingSearch.TargetingSearchTypes.country, + 'limit': 2, + }) + self.store_response(results) + + +if __name__ == '__main__': + handle = open(DocsDataStore.get('filename'), 'w') + handle.write('') + handle.close() + + try: + config_file = open('./config.json') + except IOError: + print("No config file found, skipping docs tests") + sys.exit() + config = json.load(config_file) + config_file.close() + + act_id = "1505766289694659" + FacebookAdsApi.init( + config['app_id'], + config['app_secret'], + config['access_token'], + 'act_' + str(act_id) + ) + DocsDataStore.set('adaccount_id', 'act_' + str(act_id)) + DocsDataStore.set('adaccount_id_int', act_id) + DocsDataStore.set('business_id', '1454288444842444') + DocsDataStore.set('ca_id', '6026172406640') + DocsDataStore.set('dpa_catalog_id', '447683242047472') + DocsDataStore.set('dpa_set_id', '808641022536664') + DocsDataStore.set('dpa_feed_id', '1577689442497017') + DocsDataStore.set('dpa_upload_id', '1577690399163588') + DocsDataStore.set('as_user_id', '358829457619128') + DocsDataStore.set('pixel_id', '417531085081002') + DocsDataStore.set('page_id', config['page_id']) + + unittest.main() diff --git a/tap_facebook/facebook_business/test/docs_utils.py b/tap_facebook/facebook_business/test/docs_utils.py new file mode 100644 index 0000000..105b1b1 --- /dev/null +++ b/tap_facebook/facebook_business/test/docs_utils.py @@ -0,0 +1,273 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +import sys +import unittest +import inspect +import re +from ..objects import * +from ..specs import * +from ..exceptions import * + + +class DocsDataStore(object): + _data = {} + + @classmethod + def set(self, key, value): + self._data[key] = value + handle = open(DocsDataStore.get('filename'), 'a') + handle.write('docs_data#' + key + "\n" + value + "\n\n") + handle.close() + + @classmethod + def get(self, key): + return self._data[key] + + +linted_classes = [] + + +class DocsTestCase(unittest.TestCase): + def __init__(self, *args, **kwargs): + + super(DocsTestCase, self).__init__(*args, **kwargs) + + def get_aco_methods(): + sdk_obj = getattr(sys.modules[__name__], 'AbstractCrudObject') + members = inspect.getmembers(sdk_obj) + member_names = [m[0] for m in members] + return member_names + + errors = [] + warnings = [] + + sdk_class_name = re.sub(r'DocsTestCase$', '', self.__class__.__name__) + + if sdk_class_name not in linted_classes: + sdk_obj = getattr(sys.modules[__name__], sdk_class_name) + sdk_members = inspect.getmembers(sdk_obj, inspect.ismethod) + sdk_members = [m[0] for m in sdk_members + if m[0] not in get_aco_methods() and + not m[0].startswith('remote_')] + + members = inspect.getmembers(self, inspect.ismethod) + members = [m for m in members + if (m[0].startswith('test_'))] + for member in members: + expected_string = re.sub(r'^test_', '', member[0]) + "(" + sourcelines = inspect.getsourcelines(member[1])[0] + sourcelines.pop(0) + source = "".join(sourcelines).strip() + if expected_string not in source and source != "pass": + errors.append( + "Error: Expected method call to " + expected_string + + ") not used in " + self.__class__.__name__ + "::" + + member[0], + ) + + member_names = [m[0] for m in members] + for sdk_member in sdk_members: + if "test_" + sdk_member not in member_names: + warnings.append( + "Warning: Method defined in SDK not defined in " + + "test - " + sdk_class_name + "::" + sdk_member + "()", + ) + + if len(warnings) > 0: + print("\n".join(warnings)) + + if len(errors) > 0: + print("\n".join(errors)) + sys.exit() + + linted_classes.append(sdk_class_name) + + def tearDown(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + campaigns = account.get_campaigns() + for campaign in campaigns: + campaign.remote_delete() + + def verify(self, obj, output): + def strip_spacing(content): + content = str(content) + content = re.sub(r'\s+', ' ', content) + content = re.sub(r'\n|\r', '', content) + return content + + return strip_spacing(obj) == strip_spacing(output) + + def create_campaign(self, counter): + campaign = Campaign(parent_id=DocsDataStore.get('adaccount_id')) + campaign['name'] = "Campaign " + str(counter) + campaign['status'] = "PAUSED" + campaign.remote_create() + return campaign + + def create_adset(self, counter, campaign): + adset = AdSet(parent_id=DocsDataStore.get('adaccount_id')) + adset['name'] = "Ad Set " + str(counter) + adset['campaign_id'] = campaign['id'] + adset['daily_budget'] = 1000 + adset['bid_amount'] = 2 + adset['billing_event'] = 'LINK_CLICKS' + adset['optimization_goal'] = 'LINK_CLICKS' + adset['status'] = 'PAUSED' + adset['daily_budget'] = 1000 + adset['targeting'] = { + 'geo_locations': { + 'countries': ['US'], + }, + 'interests': [ + { + "id": "6003232518610", + "name": "Parenting", + }, + ], + } + adset.remote_create() + return adset + + def create_ad(self, counter, adset, creative): + adgroup = Ad(parent_id=DocsDataStore.get('adaccount_id')) + adgroup['name'] = "Ad " + str(counter) + adgroup['adset_id'] = adset['id'] + adgroup['creative'] = {'creative_id': creative.get_id()} + adgroup['status'] = 'PAUSED' + adgroup.remote_create() + return adgroup + + def create_creative(self, counter): + creative = AdCreative(parent_id=DocsDataStore.get('adaccount_id')) + creative['title'] = "My Creative " + str(counter) + creative['body'] = "This is my creative's body" + creative['object_url'] = "https://internet.org" + creative['image_hash'] = self.create_image()['hash'] + creative.remote_create() + return creative + + def create_creative_leads(self, counter): + image_hash = self.create_image()['hash'] + link_data = LinkData() + link_data[LinkData.Field.message] = 'try it out' + link_data[LinkData.Field.link] = "www.wikipedia.com" + link_data[LinkData.Field.caption] = 'Caption' + link_data[LinkData.Field.image_hash] = image_hash + + object_story_spec = ObjectStorySpec() + page_id = DocsDataStore.get('page_id') + object_story_spec[ObjectStorySpec.Field.page_id] = page_id + object_story_spec[ObjectStorySpec.Field.link_data] = link_data + + creative = AdCreative(parent_id=DocsDataStore.get('adaccount_id')) + creative[AdCreative.Field.name] = 'Test Creative' + creative[AdCreative.Field.object_story_spec] = object_story_spec + creative.remote_create() + return creative + + def create_image(self): + image = AdImage(parent_id=DocsDataStore.get('adaccount_id')) + image['filename'] = './facebook_business/test/misc/image.png' + image.remote_create() + return image + + def create_adlabel(self): + label = AdLabel(parent_id=DocsDataStore.get('adaccount_id')) + label[AdLabel.Field.name] = 'AdLabel name' + label.remote_create() + return label + + def create_custom_audience(self): + audience = CustomAudience(parent_id=DocsDataStore.get('adaccount_id')) + audience[CustomAudience.Field.subtype] = CustomAudience.Subtype.custom + audience[CustomAudience.Field.name] = 'Test Audience' + audience[CustomAudience.Field.description] = 'Autogen-docs example' + audience.remote_create() + return audience + + def create_reach_frequency_prediction(self): + act_id = DocsDataStore.get('adaccount_id') + rfp = ReachFrequencyPrediction(parent_id=act_id) + rfp['frequency_cap'] = 2 + rfp['start_time'] = 1449080260 + rfp['stop_time'] = 1449083860 + rfp['reach'] = 20 + rfp['story_event_type'] = 0 + rfp['prediction_mode'] = 0 + rfp['target_spec'] = { + 'geo_locations': { + 'countries': ['US'], + }, + } + rfp.remote_create() + return rfp + + def create_ads_pixel(self): + account = AdAccount(DocsDataStore.get('adaccount_id')) + pixel = account.get_ads_pixels([AdsPixel.Field.code]) + + if pixel is None: + pixel = AdsPixel(parent_id=DocsDataStore.get('adaccount_id')) + pixel[AdsPixel.Field.name] = unique_name('Test Pixel') + pixel.remote_create() + return pixel + + def create_product_catalog(self): + params = {} + params['name'] = 'Test Catalog' + product_catalog = ProductCatalog( + parent_id=DocsDataStore.get('business_id') + ) + product_catalog.update(params) + product_catalog.remote_create() + return product_catalog + + def create_product_set(self, product_catalog_id): + params = {} + params['name'] = 'Test Product Set' + product_set = ProductSet(parent_id=product_catalog_id) + product_set.update(params) + product_set.remote_create() + return product_set + + def create_product_feed(self, product_catalog_id): + product_feed = ProductFeed(parent_id=product_catalog_id) + product_feed[ProductFeed.Field.name] = 'Test Feed' + product_feed[ProductFeed.Field.schedule] = { + 'interval': 'DAILY', + 'url': 'http://www.example.com/sample_feed.tsv', + 'hour': 22, + } + product_feed.remote_create() + return product_feed + + def store_response(self, obj): + class_name = re.sub(r'DocsTestCase$', '', self.__class__.__name__) + method = inspect.stack()[1][3] + handle = open(DocsDataStore.get('filename'), 'a') + obj_str = str(obj) + obj_str = re.sub('<', '<', obj_str) + obj_str = re.sub('>', '>', obj_str) + handle.write(class_name + '#' + method + "\n" + obj_str + "\n\n") + handle.close() + + +DocsDataStore.set('filename', '/tmp/python_sdk_docs.nlsv') diff --git a/tap_facebook/facebook_business/test/integration_ad.py b/tap_facebook/facebook_business/test/integration_ad.py new file mode 100644 index 0000000..9f4ee7b --- /dev/null +++ b/tap_facebook/facebook_business/test/integration_ad.py @@ -0,0 +1,286 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Unit tests for the Python Facebook Business SDK. + +How to run: + python -m facebook_business.test.integration_ad +''' + +import warnings +import json +from facebook_business.session import FacebookSession +from facebook_business.exceptions import FacebookRequestError +from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse +from facebook_business.adobjects.adaccount import AdAccount +from facebook_business.adobjects.adcreative import AdCreative +from facebook_business.adobjects.ad import Ad +from facebook_business.adobjects.targeting import Targeting +from facebook_business.adobjects.adsinsights import AdsInsights +from .integration_utils import * +from .integration_constant import * + + +# ad is renamed from adgroup in API +class AdTestCase(IntegrationTestCase): + def test_get_ad(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' + '"' + str(FieldName.AD_REVIEW_FEEDBACK) + '":' + str(TestValue.AD_REVIEW_FEEDBACK) + ',' + '"' + str(FieldName.ADLABELS) + '":' + str(TestValue.AD_LABEL) + ',' + '"' + str(FieldName.ADSET_ID) + '":"' + str(TestValue.ADSET_ID) + '",' + '"' + str(FieldName.BID_AMOUNT) + '":"' + str(TestValue.BID_AMOUNT) + '",' + '"' + str(FieldName.CONFIGURED_STATUS) + '":"' + str(TestValue.CONFIGURED_STATUS) + '",' + '"' + str(FieldName.CREATIVE) + '":' + str(TestValue.CREATIVE) + ',' + '"' + str(FieldName.EFFECTIVE_STATUS) + '":"' + str(TestValue.EFFECTIVE_STATUS) + '",' + '"' + str(FieldName.ISSUES_INFO) + '":' + str(TestValue.ISSUES_INFO) + ',' + '"' + str(FieldName.PRIORITY) + '":"' + str(TestValue.PRIORITY) + '",' + '"' + str(FieldName.TARGETING) + '":' + str(TestValue.TARGETING) + ',' + '"' + str(FieldName.DATE_FORMAT) + '":"' + str(TestValue.DATE_FORMAT) + '",' + '"' + str(FieldName.EXECUTION_OPTIONS) + '":"' + str(TestValue.EXECUTION_OPTIONS) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.ACCOUNT_ID, + FieldName.AD_REVIEW_FEEDBACK, + FieldName.ADLABELS, + FieldName.ADSET_ID, + FieldName.BID_AMOUNT, + FieldName.CONFIGURED_STATUS, + FieldName.CREATIVE, + FieldName.EFFECTIVE_STATUS, + FieldName.ISSUES_INFO, + FieldName.PRIORITY, + FieldName.TARGETING, + FieldName.DATE_FORMAT, + FieldName.EXECUTION_OPTIONS, + ] + params = {} + + ad = Ad(TestValue.AD_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(ad, Ad)) + self.assertEqual(ad[FieldName.ACCOUNT_ID], TestValue.ACCOUNT_ID) + self.assertEqual(ad[FieldName.AD_REVIEW_FEEDBACK], json.loads(TestValue.AD_REVIEW_FEEDBACK)) + self.assertEqual(ad[FieldName.ADLABELS], [json.loads(TestValue.AD_LABEL)]) + self.assertEqual(ad[FieldName.ADSET_ID], TestValue.ADSET_ID) + self.assertEqual(ad[FieldName.BID_AMOUNT], TestValue.BID_AMOUNT) + self.assertEqual(ad[FieldName.CONFIGURED_STATUS], TestValue.CONFIGURED_STATUS) + self.assertTrue(isinstance(ad[FieldName.CREATIVE], AdCreative)) + self.assertEqual(ad[FieldName.EFFECTIVE_STATUS], TestValue.EFFECTIVE_STATUS) + self.assertEqual(ad[FieldName.ISSUES_INFO], [json.loads(TestValue.ISSUES_INFO)]) + self.assertEqual(ad[FieldName.PRIORITY], TestValue.PRIORITY) + self.assertTrue(isinstance(ad[FieldName.TARGETING], Targeting)) + self.assertEqual(ad[FieldName.DATE_FORMAT], TestValue.DATE_FORMAT) + self.assertEqual(ad[FieldName.EXECUTION_OPTIONS], [TestValue.EXECUTION_OPTIONS]) + + + def test_get_ad_with_wrong_fields(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = {} + with self.assertRaises(FacebookRequestError): + ad = Ad(TestValue.AD_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 1) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + + def test_create_ad(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.AD_ID) + '", "success": "true"}') + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + FieldName.ACCOUNT_ID: TestValue.ACCOUNT_ID, + FieldName.AD_REVIEW_FEEDBACK: json.loads(TestValue.AD_REVIEW_FEEDBACK), + FieldName.ADLABELS: [json.loads(TestValue.AD_LABEL)], + FieldName.ADSET_ID: TestValue.ADSET_ID, + FieldName.BID_AMOUNT: TestValue.BID_AMOUNT, + FieldName.CONFIGURED_STATUS: TestValue.CONFIGURED_STATUS, + FieldName.CREATIVE: json.loads(TestValue.CREATIVE), + FieldName.EFFECTIVE_STATUS: TestValue.EFFECTIVE_STATUS, + FieldName.ISSUES_INFO: [json.loads(TestValue.ISSUES_INFO)], + FieldName.PRIORITY: TestValue.PRIORITY, + FieldName.TARGETING: json.loads(TestValue.TARGETING), + FieldName.DATE_FORMAT: TestValue.DATE_FORMAT, + FieldName.EXECUTION_OPTIONS: [TestValue.EXECUTION_OPTIONS], + } + + ad = AdAccount(TestValue.ACCOUNT_ID).create_ad( + fields, + params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(ad, Ad)) + self.assertEqual(ad[FieldName.ID], TestValue.AD_ID) + + + def test_create_ad_with_wrong_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + 'status': 'unexited_status', + 'priority': 'hight', + } + with self.assertRaises(FacebookRequestError): + ad = AdAccount(TestValue.ACCOUNT_ID).create_ad( + fields, + params, + ) + + self.assertEqual(len(warning), 2) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + + def test_get_ad_creatives(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '",' + '"' + str(FieldName.ID) + '":"' + str(TestValue.CREATIVE_ID) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.NAME, + FieldName.ID, + ] + params = {} + + creatives = Ad(TestValue.AD_ID).get_ad_creatives( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(creatives[0], AdCreative)) + self.assertEqual(creatives[0][FieldName.NAME], TestValue.NAME) + self.assertEqual(creatives[0][FieldName.ID], TestValue.CREATIVE_ID) + + + def test_get_ad_creatives_with_wrong_fields(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = {} + with self.assertRaises(FacebookRequestError): + creatives = Ad(TestValue.AD_ID).get_ad_creatives( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 1) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + + def test_get_insights(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.AD_NAME) + '":"' + str(TestValue.NAME) + '",' + '"' + str(FieldName.AD_ID) + '":"' + str(TestValue.AD_ID) + '",' + '"' + str(FieldName.DATE_START) + '":"' + str(TestValue.DATE_START) + '",' + '"' + str(FieldName.DATE_STOP) + '":"' + str(TestValue.DATE_STOP) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.AD_NAME, + ] + params = { + FieldName.ACTION_BREAKDOWNS: [TestValue.ACTION_BREAKDOWNS], + FieldName.ACTION_ATTRIBUTION_WINDOWS: [TestValue.ACTION_ATTRIBUTION_WINDOWS], + FieldName.DATE_PRESET: TestValue.DATE_PRESET, + FieldName.LEVEL: TestValue.LEVEL, + FieldName.SUMMARY_ACTION_BREAKDOWNS: [TestValue.SUMMARY_ACTION_BREAKDOWNS], + } + + ad_insights = Ad(TestValue.AD_ID).get_insights( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(ad_insights[0], AdsInsights)) + self.assertEqual(ad_insights[0][FieldName.AD_NAME], TestValue.NAME) + self.assertEqual(ad_insights[0][FieldName.DATE_START], TestValue.DATE_START) + self.assertEqual(ad_insights[0][FieldName.DATE_STOP], TestValue.DATE_STOP) + + + def test_get_insights_with_wrong_fields_and_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexisted_fields', + ] + params = { + FieldName.ACTION_BREAKDOWNS: 3, + FieldName.LEVEL: 'wrong_level', + } + with self.assertRaises(FacebookRequestError): + ad_insights = Ad(TestValue.AD_ID).get_insights( + fields, + params, + ) + + self.assertEqual(len(warning), 3) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_adaccount.py b/tap_facebook/facebook_business/test/integration_adaccount.py new file mode 100644 index 0000000..39e894c --- /dev/null +++ b/tap_facebook/facebook_business/test/integration_adaccount.py @@ -0,0 +1,385 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Unit tests for the Python Facebook Business SDK. + +How to run: + python -m facebook_business.test.integration_adaccount +''' + +import warnings +import json +from facebook_business.session import FacebookSession +from facebook_business.exceptions import FacebookRequestError +from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse +from facebook_business.adobjects.adaccount import AdAccount +from facebook_business.adobjects.adcreative import AdCreative +from facebook_business.adobjects.ad import Ad +from facebook_business.adobjects.campaign import Campaign +from facebook_business.adobjects.adsinsights import AdsInsights +from facebook_business.adobjects.agencyclientdeclaration import AgencyClientDeclaration +from facebook_business.adobjects.business import Business +from facebook_business.adobjects.extendedcreditinvoicegroup import ExtendedCreditInvoiceGroup +from .integration_utils import * +from .integration_constant import * + + +class AdAccountTestCase(IntegrationTestCase): + def test_get_adaccount(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' + '"' + str(FieldName.ACCOUNT_STATUS) + '":' + str(TestValue.ACCOUNT_STATUS) + ',' + '"' + str(FieldName.AGE) + '":"' + str(TestValue.AGE) + '",' + '"' + str(FieldName.AGENCY_CLIENT_DECLARATION) + '":' + str(TestValue.AGENCY_CLIENT_DECLARATION) + ',' + '"' + str(FieldName.AMOUNT_SPENT) + '":"' + str(TestValue.AMOUNT_SPENT) + '",' + '"' + str(FieldName.BALANCE) + '":"' + str(TestValue.BALANCE) + '",' + '"' + str(FieldName.BUSINESS) + '":' + str(TestValue.BUSINESS) + ',' + '"' + str(FieldName.BUSINESS_CITY) + '":"' + str(TestValue.BUSINESS_CITY) + '",' + '"' + str(FieldName.CAPABILITIES) + '":"' + str(TestValue.CAPABILITIES) + '",' + '"' + str(FieldName.CURRENCY) + '":"' + str(TestValue.CURRENCY) + '",' + '"' + str(FieldName.DISABLE_REASON) + '":' + str(TestValue.DISABLE_REASON) + ',' + '"' + str(FieldName.EXTENDED_CREDIT_INVOICE_GROUP) + '":' + str(TestValue.EXTENDED_CREDIT_INVOICE_GROUP) + ',' + '"' + str(FieldName.FAILED_DELIVERY_CHECKS) + '":' + str(TestValue.FAILED_DELIVERY_CHECKS) + ',' + '"' + str(FieldName.HAS_PAGE_AUTHORIZED_ADACCOUNT) + '":"' + str(TestValue.HAS_PAGE_AUTHORIZED_ADACCOUNT) + '",' + '"' + str(FieldName.TOS_ACCEPTED) + '":' + str(TestValue.TOS_ACCEPTED) + '' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.ACCOUNT_ID, + FieldName.ACCOUNT_STATUS, + FieldName.AGE, + FieldName.AGENCY_CLIENT_DECLARATION, + FieldName.BALANCE, + FieldName.BUSINESS, + FieldName.BUSINESS_CITY, + FieldName.CAPABILITIES, + FieldName.CURRENCY, + FieldName.DISABLE_REASON, + FieldName.EXTENDED_CREDIT_INVOICE_GROUP, + FieldName.FAILED_DELIVERY_CHECKS, + FieldName.HAS_PAGE_AUTHORIZED_ADACCOUNT, + FieldName.TOS_ACCEPTED, + ] + params = {} + + account = AdAccount(TestValue.ACCOUNT_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(account, AdAccount)) + self.assertEqual(account[FieldName.ACCOUNT_ID],TestValue.ACCOUNT_ID) + self.assertEqual(account[FieldName.ACCOUNT_STATUS], TestValue.ACCOUNT_STATUS) + self.assertEqual(account[FieldName.AGE], TestValue.AGE) + self.assertTrue(isinstance(account[FieldName.AGENCY_CLIENT_DECLARATION], AgencyClientDeclaration)) + self.assertEqual(account[FieldName.BALANCE], TestValue.BALANCE) + self.assertTrue(isinstance(account[FieldName.BUSINESS], Business)) + self.assertEqual(account[FieldName.BUSINESS_CITY], TestValue.BUSINESS_CITY) + self.assertEqual(account[FieldName.CAPABILITIES], [TestValue.CAPABILITIES]) + self.assertEqual(account[FieldName.CURRENCY], TestValue.CURRENCY) + self.assertEqual(account[FieldName.DISABLE_REASON], TestValue.DISABLE_REASON) + self.assertTrue(isinstance(account[FieldName.EXTENDED_CREDIT_INVOICE_GROUP], ExtendedCreditInvoiceGroup)) + self.assertEqual(account[FieldName.FAILED_DELIVERY_CHECKS], [json.loads(TestValue.FAILED_DELIVERY_CHECKS)]) + self.assertEqual(account[FieldName.HAS_PAGE_AUTHORIZED_ADACCOUNT], TestValue.HAS_PAGE_AUTHORIZED_ADACCOUNT) + self.assertEqual(account[FieldName.TOS_ACCEPTED], json.loads(TestValue.TOS_ACCEPTED)) + + + def test_get_adaccount_with_wrong_fields(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = {} + + with self.assertRaises(FacebookRequestError): + account = AdAccount(TestValue.ACCOUNT_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 1) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + + def test_create_adaccount(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.ACCOUNT_ID) + '", "success": "true"}') + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + FieldName.AD_ACCOUNT_CREATED_FROM_BM_FLAG: TestValue.AD_ACCOUNT_CREATED_FROM_BM_FLAG, + FieldName.CURRENCY: TestValue.CURRENCY, + FieldName.INVOICE: TestValue.INVOICE, + FieldName.NAME: TestValue.NAME, + FieldName.TIMEZONE_ID: TestValue.TIMEZONE_ID, + } + + account = Business(TestValue.BUSINESS_ID).create_ad_account( + fields, + params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(account, AdAccount)) + self.assertEqual(account[FieldName.ID], TestValue.ACCOUNT_ID) + + + def test_create_adaccount_with_wrong_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + 'invoice': 0, + 'timezone_id': 'abc', + } + with self.assertRaises(FacebookRequestError): + account = Business(TestValue.BUSINESS_ID).create_ad_account( + fields, + params, + ) + + self.assertEqual(len(warning), 2) + self.assertTrue(issubclass(warning[-1].category, UserWarning)) + + + def test_get_insights(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.ID) + '":"' + str(TestValue.ACCOUNT_ID) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.ACCOUNT_ID, + ] + params = { + FieldName.ACTION_ATTRIBUTION_WINDOWS: [TestValue.ACTION_ATTRIBUTION_WINDOWS], + FieldName.ACTION_BREAKDOWNS: [TestValue.ACTION_BREAKDOWNS], + FieldName.ACTION_REPORT_TIME: TestValue.ACTION_REPORT_TIME, + FieldName.DATE_PRESET: TestValue.DATE_PRESET, + FieldName.LEVEL: TestValue.LEVEL, + FieldName.SUMMARY_ACTION_BREAKDOWNS: [TestValue.SUMMARY_ACTION_BREAKDOWNS], + } + + ad_insights = AdAccount(TestValue.ACCOUNT_ID).get_insights( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(ad_insights[0], AdsInsights)) + self.assertEqual(ad_insights[0][FieldName.ID], TestValue.ACCOUNT_ID) + + + + def test_get_insights_with_wrong_fields_and_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexisted_field', + ] + params = { + FieldName.DATE_PRESET: 'invalide_date', + FieldName.LEVEL: 'wrong_level', + } + with self.assertRaises(FacebookRequestError): + ad_insights = AdAccount(TestValue.ACCOUNT_ID).get_insights( + fields, + params, + ) + + self.assertEqual(len(warning), 3) + self.assertTrue(issubclass(warning[-1].category, UserWarning)) + + + def test_get_ad_creatives(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.NAME, + ] + params = {} + + creatives = AdAccount(TestValue.ACCOUNT_ID).get_ad_creatives( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(creatives[0], AdCreative)) + self.assertEqual(creatives[0][FieldName.NAME], TestValue.NAME) + + + def test_get_ad_creatives_with_wrong_fields(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = {} + with self.assertRaises(FacebookRequestError): + creatives = AdAccount(TestValue.ACCOUNT_ID).get_ad_creatives( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 1) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + + def test_get_campaigns(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.NAME, + ] + params = { + FieldName.DATE_PRESET: TestValue.DATE_PRESET, + FieldName.EFFECTIVE_STATUS: [TestValue.EFFECTIVE_STATUS], + FieldName.INCLUDE_DRAFTS: TestValue.INCLUDE_DRAFTS, + FieldName.TIME_RANGE: json.loads(TestValue.TIME_RANGE), + } + + campaigns = AdAccount(TestValue.ACCOUNT_ID).get_campaigns( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(campaigns[0], Campaign)) + self.assertEqual(campaigns[0][FieldName.NAME], TestValue.NAME) + + + def test_get_campaigns_with_wrong_fields_and_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = { + FieldName.EFFECTIVE_STATUS: 'unexisted_status', + } + + with self.assertRaises(FacebookRequestError): + campaigns = AdAccount(TestValue.ACCOUNT_ID).get_campaigns( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 2) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + + def test_get_ads(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.NAME, + ] + params = { + FieldName.DATE_PRESET: TestValue.DATE_PRESET, + FieldName.EFFECTIVE_STATUS: [TestValue.EFFECTIVE_STATUS], + FieldName.INCLUDE_DRAFTS: TestValue.INCLUDE_DRAFTS, + FieldName.TIME_RANGE: json.loads(TestValue.TIME_RANGE), + FieldName.UPDATED_SINCE: TestValue.UPDATED_SINCE, + } + + ads = AdAccount(TestValue.ACCOUNT_ID).get_ads( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(ads[0], Ad)) + self.assertEqual(ads[0][FieldName.NAME], TestValue.NAME) + + + def test_get_ads_with_wrong_fields_and_param(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = { + FieldName.EFFECTIVE_STATUS: 'unexisted_status', + } + with self.assertRaises(FacebookRequestError): + ads = AdAccount(TestValue.ACCOUNT_ID).get_ads( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 2) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_adcreative.py b/tap_facebook/facebook_business/test/integration_adcreative.py new file mode 100644 index 0000000..eb881e9 --- /dev/null +++ b/tap_facebook/facebook_business/test/integration_adcreative.py @@ -0,0 +1,225 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Unit tests for the Python Facebook Business SDK. + +How to run: + python -m facebook_business.test.integration_adcreative +''' + +import warnings +import json +from facebook_business.session import FacebookSession +from facebook_business.exceptions import FacebookRequestError +from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse +from facebook_business.adobjects.adaccount import AdAccount +from facebook_business.adobjects.adcreative import AdCreative +from facebook_business.adobjects.adpreview import AdPreview +from .integration_utils import * +from .integration_constant import * + + +class AdCreativeTestCase(IntegrationTestCase): + def test_get_adcreative(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' + '"' + str(FieldName.ACTOR_ID) + '":"' + str(TestValue.ACTOR_ID) + '",' + '"' + str(FieldName.ADLABELS) + '":' + str(TestValue.AD_LABEL) + ',' + '"' + str(FieldName.APPLINK_TREATMENT) + '":"' + str(TestValue.APPLINK_TREATMENT) + '",' + '"' + str(FieldName.AUTHORIZATION_CATEGORY) + '":"' + str(TestValue.AUTHORIZATION_CATEGORY) + '",' + '"' + str(FieldName.AUTO_UPDATE) + '":"' + str(TestValue.AUTO_UPDATE) + '",' + '"' + str(FieldName.BODY) + '":"' + str(TestValue.BODY) + '",' + '"' + str(FieldName.CALL_TO_ACTION_TYPE) + '":"' + str(TestValue.CALL_TO_ACTION_TYPE) + '",' + '"' + str(FieldName.CATEGORIZATION_CRITERIA) + '":"' + str(TestValue.CATEGORIZATION_CRITERIA) + '",' + '"' + str(FieldName.IMAGE_HASH) + '":"' + str(TestValue.IMAGE_HASH) + '",' + '"' + str(FieldName.TITLE) + '":"' + str(TestValue.TITLE) + '",' + '"' + str(FieldName.OBJECT_URL) + '":"' + str(TestValue.OBJECT_URL) + '",' + '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.ACCOUNT_ID, + FieldName.ACTOR_ID, + FieldName.ADLABELS, + FieldName.APPLINK_TREATMENT, + FieldName.AUTHORIZATION_CATEGORY, + FieldName.AUTO_UPDATE, + FieldName.BODY, + FieldName.CALL_TO_ACTION_TYPE, + FieldName.CATEGORIZATION_CRITERIA, + FieldName.IMAGE_HASH, + FieldName.TITLE, + FieldName.OBJECT_URL, + FieldName.NAME, + ] + params = {} + + creative = AdCreative(TestValue.CREATIVE_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(creative, AdCreative)) + self.assertEqual(creative[FieldName.ACCOUNT_ID], TestValue.ACCOUNT_ID) + self.assertEqual(creative[FieldName.ACTOR_ID], TestValue.ACTOR_ID) + self.assertEqual(creative[FieldName.ADLABELS], [json.loads(TestValue.AD_LABEL)]) + self.assertEqual(creative[FieldName.APPLINK_TREATMENT], TestValue.APPLINK_TREATMENT) + self.assertEqual(creative[FieldName.AUTHORIZATION_CATEGORY], TestValue.AUTHORIZATION_CATEGORY) + self.assertEqual(creative[FieldName.BODY], TestValue.BODY) + self.assertEqual(creative[FieldName.CALL_TO_ACTION_TYPE], TestValue.CALL_TO_ACTION_TYPE) + self.assertEqual(creative[FieldName.CATEGORIZATION_CRITERIA], TestValue.CATEGORIZATION_CRITERIA) + self.assertEqual(creative[FieldName.IMAGE_HASH], TestValue.IMAGE_HASH) + self.assertEqual(creative[FieldName.TITLE], TestValue.TITLE) + self.assertEqual(creative[FieldName.OBJECT_URL], TestValue.OBJECT_URL) + self.assertEqual(creative[FieldName.NAME], TestValue.NAME) + + + def test_get_ad_creative_with_wrong_fields(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = {} + + with self.assertRaises(FacebookRequestError): + creative = AdCreative(TestValue.CREATIVE_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 1) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + + def test_create_ad_creative(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.CREATIVE_ID) + '", "success": "true"}') + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + FieldName.ADLABELS: [json.loads(TestValue.AD_LABEL)], + FieldName.ACTOR_ID: TestValue.ACTOR_ID, + FieldName.APPLINK_TREATMENT: TestValue.APPLINK_TREATMENT, + FieldName.AUTHORIZATION_CATEGORY: TestValue.AUTHORIZATION_CATEGORY, + FieldName.AUTO_UPDATE: TestValue.AUTO_UPDATE, + FieldName.BODY: TestValue.BODY, + FieldName.CALL_TO_ACTION_TYPE: TestValue.CALL_TO_ACTION_TYPE, + FieldName.CATEGORIZATION_CRITERIA: TestValue.CATEGORIZATION_CRITERIA, + FieldName.IMAGE_HASH: TestValue.IMAGE_HASH, + FieldName.TITLE: TestValue.TITLE, + FieldName.OBJECT_URL: TestValue.OBJECT_URL, + FieldName.NAME: TestValue.NAME, + } + + creative = AdAccount(TestValue.ACCOUNT_ID).create_ad_creative( + fields, + params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(creative, AdCreative)) + self.assertEqual(creative[FieldName.ID], TestValue.CREATIVE_ID) + + + def test_create_ad_creative_with_wrong_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + 'authorization_category': 'unexited_category', + } + with self.assertRaises(FacebookRequestError): + creative = AdAccount(TestValue.ACCOUNT_ID).create_ad_creative( + fields, + params, + ) + + + self.assertEqual(len(warning), 1) + self.assertTrue(issubclass(warning[-1].category, UserWarning)) + + + def test_get_previews(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.BODY) + '":"' + str(TestValue.BODY) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + FieldName.AD_FORMAT: TestValue.AD_FORMAT, + FieldName.DYNAMIC_ASSET_LABEL: TestValue.DYNAMIC_ASSET_LABEL, + FieldName.DYNAMIC_CREATIVE_SPEC: json.loads(TestValue.DYNAMIC_CREATIVE_SPEC), + FieldName.HEIGHT: TestValue.HEIGHT, + FieldName.WIDTH: TestValue.WIDTH, + FieldName.RENDER_TYPE: TestValue.RENDER_TYPE, + } + + previews = AdCreative(TestValue.CREATIVE_ID).get_previews( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(previews[0], AdPreview)) + self.assertEqual(previews[0][FieldName.BODY], TestValue.BODY) + + + def test_get_previews_with_wrong_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + 'render_type':'wrong_type', + } + with self.assertRaises(FacebookRequestError): + previews = AdCreative(TestValue.CREATIVE_ID).get_previews( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 1) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_adset.py b/tap_facebook/facebook_business/test/integration_adset.py new file mode 100644 index 0000000..53b68de --- /dev/null +++ b/tap_facebook/facebook_business/test/integration_adset.py @@ -0,0 +1,205 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Unit tests for the Python Facebook Business SDK. + +How to run: + python -m facebook_business.test.integration_adset +''' + +import unittest +import warnings +import json +from facebook_business.session import FacebookSession +from facebook_business.exceptions import FacebookRequestError +from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse +from facebook_business.adobjects.adaccount import AdAccount +from facebook_business.adobjects.adset import AdSet +from facebook_business.adobjects.adbidadjustments import AdBidAdjustments +from .integration_utils import * +from .integration_constant import * + + +class AdSetTestCase(IntegrationTestCase): + def test_get_ad_set(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' + '"' + str(FieldName.ADLABELS) + '":' + str(TestValue.AD_LABEL) + ',' + '"' + str(FieldName.ADSET_SCHEDULE) + '":' + str(TestValue.ADSET_SCHEDULE) + ',' + '"' + str(FieldName.ASSET_FEED_ID) + '":"' + str(TestValue.ASSET_FEED_ID) + '",' + '"' + str(FieldName.BID_ADJUSTMENTS) + '":' + str(TestValue.BID_ADJUSTMENTS) + ',' + '"' + str(FieldName.BID_AMOUNT) + '":"' + str(TestValue.BID_AMOUNT) + '",' + '"' + str(FieldName.BILLING_EVENT) + '":"' + str(TestValue.BILLING_EVENT) + '",' + '"' + str(FieldName.BID_STRATEGY) + '":"' + str(TestValue.BID_STRATEGY) + '",' + '"' + str(FieldName.BUDGET_REMAINING) + '": "' + str(TestValue.BUDGET_REMAINING) + '",' + '"' + str(FieldName.CAMPAIGN_ID) + '":"' + str(TestValue.CAMPAIGN_ID) + '",' + '"' + str(FieldName.CONFIGURED_STATUS) + '": "' + str(TestValue.CONFIGURED_STATUS) + '",' + '"' + str(FieldName.DATE_FORMAT) + '":"' + str(TestValue.DATE_FORMAT) + '",' + '"' + str(FieldName.DAILY_MIN_SPEND_TARGET) + '": "' + str(TestValue.DAILY_MIN_SPEND_TARGET) + '",' + '"' + str(FieldName.EFFECTIVE_STATUS) + '":"' + str(TestValue.EFFECTIVE_STATUS) + '",' + '"' + str(FieldName.INSTAGRAM_ACTOR_ID) + '":"' + str(TestValue.INSTAGRAM_ACTOR_ID) + '",' + '"' + str(FieldName.ISSUES_INFO) + '": ' + str(TestValue.ISSUES_INFO) + ',' + '"' + str(FieldName.OPTIMIZATION_GOAL) + '":"' + str(TestValue.OPTIMIZATION_GOAL) + '",' + '"' + str(FieldName.PACING_TYPE) + '":"' + str(TestValue.PACING_TYPE) + '",' + '"' + str(FieldName.REVIEW_FEEDBACK) + '":"' + str(TestValue.REVIEW_FEEDBACK) + '",' + '"' + str(FieldName.TUNE_FOR_CATEGORY) + '":"' + str(TestValue.TUNE_FOR_CATEGORY) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.ACCOUNT_ID, + FieldName.ADLABELS, + FieldName.ADSET_SCHEDULE, + FieldName.ASSET_FEED_ID, + FieldName.BID_ADJUSTMENTS, + FieldName.BID_AMOUNT, + FieldName.BILLING_EVENT, + FieldName.BID_STRATEGY, + FieldName.BUDGET_REMAINING, + FieldName.CAMPAIGN_ID, + FieldName.CONFIGURED_STATUS, + FieldName.DATE_FORMAT, + FieldName.DAILY_MIN_SPEND_TARGET, + FieldName.EFFECTIVE_STATUS, + FieldName.INSTAGRAM_ACTOR_ID, + FieldName.ISSUES_INFO, + FieldName.OPTIMIZATION_GOAL, + FieldName.PACING_TYPE, + FieldName.REVIEW_FEEDBACK, + FieldName.TUNE_FOR_CATEGORY, + ] + params = {} + print(params.__class__.__name__) + ad_set = AdSet(TestValue.ADSET_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(ad_set, AdSet)) + self.assertEqual(ad_set[FieldName.ACCOUNT_ID], TestValue.ACCOUNT_ID) + self.assertEqual(ad_set[FieldName.ADLABELS], [json.loads(TestValue.AD_LABEL)]) + self.assertEqual(ad_set[FieldName.ADSET_SCHEDULE], [json.loads(TestValue.ADSET_SCHEDULE)]) + self.assertEqual(ad_set[FieldName.ASSET_FEED_ID], TestValue.ASSET_FEED_ID) + self.assertTrue(isinstance(ad_set[FieldName.BID_ADJUSTMENTS], AdBidAdjustments)) + self.assertEqual(ad_set[FieldName.BID_AMOUNT], TestValue.BID_AMOUNT) + self.assertEqual(ad_set[FieldName.BILLING_EVENT], TestValue.BILLING_EVENT) + self.assertEqual(ad_set[FieldName.BID_STRATEGY], TestValue.BID_STRATEGY) + self.assertEqual(ad_set[FieldName.BUDGET_REMAINING], TestValue.BUDGET_REMAINING) + self.assertEqual(ad_set[FieldName.CAMPAIGN_ID], TestValue.CAMPAIGN_ID) + self.assertEqual(ad_set[FieldName.CONFIGURED_STATUS], TestValue.CONFIGURED_STATUS) + self.assertEqual(ad_set[FieldName.DATE_FORMAT], TestValue.DATE_FORMAT) + self.assertEqual(ad_set[FieldName.DAILY_MIN_SPEND_TARGET], TestValue.DAILY_MIN_SPEND_TARGET) + self.assertEqual(ad_set[FieldName.EFFECTIVE_STATUS], TestValue.EFFECTIVE_STATUS) + self.assertEqual(ad_set[FieldName.INSTAGRAM_ACTOR_ID], TestValue.INSTAGRAM_ACTOR_ID) + self.assertEqual(ad_set[FieldName.ISSUES_INFO], [json.loads(TestValue.ISSUES_INFO)]) + self.assertEqual(ad_set[FieldName.OPTIMIZATION_GOAL], TestValue.OPTIMIZATION_GOAL) + self.assertEqual(ad_set[FieldName.PACING_TYPE], [TestValue.PACING_TYPE]) + self.assertEqual(ad_set[FieldName.REVIEW_FEEDBACK], TestValue.REVIEW_FEEDBACK) + self.assertEqual(ad_set[FieldName.TUNE_FOR_CATEGORY], TestValue.TUNE_FOR_CATEGORY) + + + def test_get_ad_set_with_wrong_fields(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = {} + with self.assertRaises(FacebookRequestError): + ad_set = AdSet(TestValue.ADSET_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 1) + self.assertTrue((issubclass(warning[0].category, UserWarning))) + + + def test_create_ad_set(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.ADSET_ID) + '", "success": "true"}') + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + FieldName.ADLABELS: [json.loads(TestValue.AD_LABEL)], + FieldName.BID_STRATEGY: TestValue.BID_STRATEGY, + FieldName.BUDGET_REBALANCE_FLAG: False, + FieldName.BUYING_TYPE: TestValue.BUYING_TYPE, + FieldName.BILLING_EVENT: TestValue.BILLING_EVENT, + FieldName.DAILY_BUDGET: TestValue.DAILY_BUDGET, + FieldName.EXECUTION_OPTIONS: [TestValue.EXECUTION_OPTIONS], + FieldName.ITERATIVE_SPLIT_TEST_CONFIGS: [json.loads(TestValue.ITERATIVE_SPLIT_TEST_CONFIGS)], + FieldName.LIFETIME_BUDGET: TestValue.LIFETIME_BUDGET, + FieldName.NAME: TestValue.NAME, + FieldName.OBJECTIVE: TestValue.OBJECTIVE, + FieldName.OPTIMIZATION_GOAL: TestValue.OPTIMIZATION_GOAL, + FieldName.PACING_TYPE: [TestValue.PACING_TYPE], + FieldName.PROMOTED_OBJECT: json.loads(TestValue.PROMOTED_OBJECT), + FieldName.SOURCE_CAMPAIGN_ID: TestValue.CAMPAIGN_ID, + FieldName.SPECIAL_AD_CATEGORY: TestValue.SPECIAL_AD_CATEGORY, + FieldName.SPEND_CAP: TestValue.SPEND_CAP, + FieldName.STATUS: TestValue.STATUS, + FieldName.TARGETING: json.loads(TestValue.TARGETING), + FieldName.TOPLINE_ID: TestValue.TOPLINE_ID, + FieldName.UPSTREAM_EVENTS: json.loads(TestValue.UPSTREAM_EVENTS), + } + + ad_set = AdAccount(TestValue.ACCOUNT_ID).create_ad_set( + fields, + params, + ) + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(ad_set, AdSet)) + self.assertEqual(ad_set[FieldName.ID], TestValue.ADSET_ID) + + + def test_create_ad_set_with_wrong_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + FieldName.STATUS: 3, + FieldName.TARGETING: 'wrong_targeting', + } + with self.assertRaises(FacebookRequestError): + ad_set = AdAccount(TestValue.ACCOUNT_ID).create_ad_set( + fields, + params, + ) + + self.assertEqual(len(warning), 2) + self.assertTrue(issubclass(warning[-1].category, UserWarning)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_campaign.py b/tap_facebook/facebook_business/test/integration_campaign.py new file mode 100644 index 0000000..603d82b --- /dev/null +++ b/tap_facebook/facebook_business/test/integration_campaign.py @@ -0,0 +1,232 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Unit tests for the Python Facebook Business SDK. + +How to run: + python -m facebook_business.test.integration_campaign +''' + +import warnings +import json +from facebook_business.session import FacebookSession +from facebook_business.exceptions import FacebookRequestError +from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse +from facebook_business.adobjects.campaign import Campaign +from facebook_business.adobjects.adaccount import AdAccount +from facebook_business.adobjects.adpromotedobject import AdPromotedObject +from .integration_utils import * +from .integration_constant import * + + +class CampaignTestCase(IntegrationTestCase): + def test_get_campaign(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode( + '{' + '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' + '"' + str(FieldName.ADLABELS) + '":' + str(TestValue.AD_LABEL) + ',' + '"' + str(FieldName.BID_STRATEGY) + '":"' + str(TestValue.BID_STRATEGY) + '",' + '"' + str(FieldName.BOOSTED_OBJECT_ID) + '":"' + str(TestValue.BOOSTED_OBJECT_ID) + '",' + '"' + str(FieldName.BRAND_LIFT_STUDIES) + '":' + str(TestValue.BRAND_LIFT_STUDIES) + ',' + '"' + str(FieldName.BUDGET_REBALANCE_FLAG) + '":"' + str(TestValue.BUDGET_REBALANCE_FLAG) + '",' + '"' + str(FieldName.BUDGET_REMAINING) + '": "' + str(TestValue.BUDGET_REMAINING) + '",' + '"' + str(FieldName.BUYING_TYPE) + '":"' + str(TestValue.BUYING_TYPE) + '",' + '"' + str(FieldName.CAN_CREATE_BRAND_LIFT_STUDY) + '":"' + str(TestValue.CAN_CREATE_BRAND_LIFT_STUDY) + '",' + '"' + str(FieldName.CAN_USE_SPEND_CAP) + '":"' + str(TestValue.CAN_USE_SPEND_CAP) + '",' + '"' + str(FieldName.CONFIGURED_STATUS) + '":"' + str(TestValue.CONFIGURED_STATUS) + '",' + '"' + str(FieldName.CREATED_TIME) + '":"' + str(TestValue.CREATED_TIME) + '",' + '"' + str(FieldName.DAILY_BUDGET) + '":"' + str(TestValue.DAILY_BUDGET) + '",' + '"' + str(FieldName.EFFECTIVE_STATUS) + '":"' + str(TestValue.EFFECTIVE_STATUS) + '",' + '"' + str(FieldName.ID) + '": "' + str(TestValue.CAMPAIGN_ID) + '",' + '"' + str(FieldName.ISSUES_INFO) + '": ' + str(TestValue.ISSUES_INFO) + ',' + '"' + str(FieldName.LAST_BUDGET_TOGGLING_TIME) + '":"' + str(TestValue.LAST_BUDGET_TOGGLING_TIME) + '",' + '"' + str(FieldName.LIFETIME_BUDGET) + '":"' + str(TestValue.LIFETIME_BUDGET) + '",' + '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '",' + '"' + str(FieldName.OBJECTIVE) + '":"' + str(TestValue.OBJECTIVE) + '",' + '"' + str(FieldName.RECOMMENDATIONS) + '":' + str(TestValue.RECOMMENDATIONS) + ',' + '"' + str(FieldName.PACING_TYPE) + '":"' + str(TestValue.PACING_TYPE) + '",' + '"' + str(FieldName.PROMOTED_OBJECT) + '":' + str(TestValue.PROMOTED_OBJECT) + ',' + '"' + str(FieldName.SPECIAL_AD_CATEGORY) + '":"' + str(TestValue.SPECIAL_AD_CATEGORY) + '",' + '"' + str(FieldName.SPEND_CAP) + '":"' + str(TestValue.SPEND_CAP) + '",' + '"' + str(FieldName.STATUS) + '":"' + str(TestValue.STATUS) + '",' + '"' + str(FieldName.TOPLINE_ID) + '":"' + str(TestValue.TOPLINE_ID) + '",' + '"' + str(FieldName.START_TIME) + '":"' + str(TestValue.START_TIME) + '",' + '"' + str(FieldName.STOP_TIME) + '":"' + str(TestValue.STOP_TIME) + '",' + '"' + str(FieldName.UPDATED_TIME) + '":"' + str(TestValue.UPDATED_TIME) + '"' + '}' + ) + + self.mock_request.return_value = self.mock_response + + fields = [ + FieldName.ACCOUNT_ID, + FieldName.ADLABELS, + FieldName.BID_STRATEGY, + FieldName.BOOSTED_OBJECT_ID, + FieldName.BRAND_LIFT_STUDIES, + FieldName.BUDGET_REBALANCE_FLAG, + FieldName.BUDGET_REMAINING, + FieldName.BUYING_TYPE, + FieldName.CAN_CREATE_BRAND_LIFT_STUDY, + FieldName.CAN_USE_SPEND_CAP, + FieldName.CONFIGURED_STATUS, + FieldName.CREATED_TIME, + FieldName.DAILY_BUDGET, + FieldName.EFFECTIVE_STATUS, + FieldName.ID, + FieldName.ISSUES_INFO, + FieldName.LAST_BUDGET_TOGGLING_TIME, + FieldName.LIFETIME_BUDGET, + FieldName.NAME, + FieldName.OBJECTIVE, + FieldName.PACING_TYPE, + FieldName.PROMOTED_OBJECT, + FieldName.RECOMMENDATIONS, + FieldName.SPECIAL_AD_CATEGORY, + FieldName.SPEND_CAP, + FieldName.START_TIME, + FieldName.STATUS, + FieldName.STOP_TIME, + FieldName.TOPLINE_ID, + FieldName.UPDATED_TIME, + ] + params = {} + + campaign = Campaign(TestValue.CAMPAIGN_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(campaign, Campaign)) + self.assertEqual(campaign[FieldName.ACCOUNT_ID], TestValue.ACCOUNT_ID) + self.assertEqual(campaign[FieldName.ADLABELS], [json.loads(TestValue.AD_LABEL)]) + self.assertEqual(campaign[FieldName.BID_STRATEGY], TestValue.BID_STRATEGY) + self.assertEqual(campaign[FieldName.BOOSTED_OBJECT_ID], TestValue.BOOSTED_OBJECT_ID) + self.assertEqual(campaign[FieldName.BRAND_LIFT_STUDIES], [json.loads(TestValue.BRAND_LIFT_STUDIES)]) + self.assertEqual(campaign[FieldName.BUDGET_REBALANCE_FLAG], TestValue.BUDGET_REBALANCE_FLAG) + self.assertEqual(campaign[FieldName.BUDGET_REMAINING], TestValue.BUDGET_REMAINING) + self.assertEqual(campaign[FieldName.BUYING_TYPE], TestValue.BUYING_TYPE) + self.assertEqual(campaign[FieldName.CAN_CREATE_BRAND_LIFT_STUDY], TestValue.CAN_CREATE_BRAND_LIFT_STUDY) + self.assertEqual(campaign[FieldName.CAN_USE_SPEND_CAP], TestValue.CAN_USE_SPEND_CAP) + self.assertEqual(campaign[FieldName.CONFIGURED_STATUS], TestValue.CONFIGURED_STATUS) + self.assertEqual(campaign[FieldName.CREATED_TIME], TestValue.CREATED_TIME) + self.assertEqual(campaign[FieldName.DAILY_BUDGET], TestValue.DAILY_BUDGET) + self.assertEqual(campaign[FieldName.EFFECTIVE_STATUS], TestValue.EFFECTIVE_STATUS) + self.assertEqual(campaign[FieldName.ID], TestValue.CAMPAIGN_ID) + self.assertEqual(campaign[FieldName.ISSUES_INFO], [json.loads(TestValue.ISSUES_INFO)]) + self.assertEqual(campaign[FieldName.LAST_BUDGET_TOGGLING_TIME], TestValue.LAST_BUDGET_TOGGLING_TIME) + self.assertEqual(campaign[FieldName.LIFETIME_BUDGET], TestValue.LIFETIME_BUDGET) + self.assertEqual(campaign[FieldName.NAME], TestValue.NAME) + self.assertEqual(campaign[FieldName.OBJECTIVE], TestValue.OBJECTIVE) + self.assertEqual(campaign[FieldName.PACING_TYPE], [TestValue.PACING_TYPE]) + self.assertTrue(isinstance(campaign[FieldName.PROMOTED_OBJECT], AdPromotedObject)) + self.assertEqual(campaign[FieldName.RECOMMENDATIONS], [json.loads(TestValue.RECOMMENDATIONS)]) + self.assertEqual(campaign[FieldName.SPECIAL_AD_CATEGORY], TestValue.SPECIAL_AD_CATEGORY) + self.assertEqual(campaign[FieldName.SPEND_CAP], TestValue.SPEND_CAP) + self.assertEqual(campaign[FieldName.STATUS], TestValue.STATUS) + self.assertEqual(campaign[FieldName.START_TIME], TestValue.START_TIME) + self.assertEqual(campaign[FieldName.STOP_TIME], TestValue.STOP_TIME) + self.assertEqual(campaign[FieldName.TOPLINE_ID], TestValue.TOPLINE_ID) + self.assertEqual(campaign[FieldName.UPDATED_TIME], TestValue.UPDATED_TIME) + + + def test_get_campaign_with_wrong_fields(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [ + 'unexist_field', + ] + params = {} + with self.assertRaises(FacebookRequestError): + campaign = Campaign(TestValue.CAMPAIGN_ID).api_get( + fields=fields, + params=params, + ) + + self.assertEqual(len(warning), 1) + self.assertTrue(issubclass(warning[0].category, UserWarning)) + + + def test_create_campaign(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.SUCCESS + self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.CAMPAIGN_ID) + '", "success": "true"}') + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + FieldName.ADLABELS: [json.loads(TestValue.AD_LABEL)], + FieldName.BID_STRATEGY: TestValue.BID_STRATEGY, + FieldName.BUDGET_REBALANCE_FLAG: False, + FieldName.BUYING_TYPE: TestValue.BUYING_TYPE, + FieldName.DAILY_BUDGET: TestValue.DAILY_BUDGET, + FieldName.EXECUTION_OPTIONS: [TestValue.EXECUTION_OPTIONS], + FieldName.ITERATIVE_SPLIT_TEST_CONFIGS: [json.loads(TestValue.ITERATIVE_SPLIT_TEST_CONFIGS)], + FieldName.LIFETIME_BUDGET: TestValue.LIFETIME_BUDGET, + FieldName.NAME: TestValue.NAME, + FieldName.OBJECTIVE: TestValue.OBJECTIVE, + FieldName.PACING_TYPE: [TestValue.PACING_TYPE], + FieldName.PROMOTED_OBJECT: json.loads(TestValue.PROMOTED_OBJECT), + FieldName.SOURCE_CAMPAIGN_ID: TestValue.CAMPAIGN_ID, + FieldName.SPECIAL_AD_CATEGORY: TestValue.SPECIAL_AD_CATEGORY, + FieldName.SPEND_CAP: TestValue.SPEND_CAP, + FieldName.STATUS: TestValue.STATUS, + FieldName.TOPLINE_ID: TestValue.TOPLINE_ID, + FieldName.UPSTREAM_EVENTS: json.loads(TestValue.UPSTREAM_EVENTS), + } + + campaign = AdAccount(TestValue.ACCOUNT_ID).create_campaign( + fields, + params, + ) + + self.assertEqual(len(warning), 0) + self.assertTrue(isinstance(campaign, Campaign)) + self.assertEqual(campaign[FieldName.ID], TestValue.CAMPAIGN_ID) + + + def test_create_campaign_with_wrong_params(self): + with warnings.catch_warnings(record=True) as warning: + self.mock_response.status_code = StatusCode.ERROR + self.mock_request.return_value = self.mock_response + + fields = [] + params = { + 'status': 3, + 'special_ad_categories': 'wrong_enum', + } + with self.assertRaises(FacebookRequestError): + campaign = AdAccount(TestValue.ACCOUNT_ID).create_campaign( + fields, + params, + ) + + self.assertEqual(len(warning), 2) + self.assertTrue(issubclass(warning[-1].category, UserWarning)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_constant.py b/tap_facebook/facebook_business/test/integration_constant.py new file mode 100644 index 0000000..d67ae5b --- /dev/null +++ b/tap_facebook/facebook_business/test/integration_constant.py @@ -0,0 +1,288 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION 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 file stores the information needed to perform integration testing +# on the Python Ads SDK. + +class FieldName: + ACCOUNT_ID = 'account_id' + ACCOUNT_STATUS = 'account_status' + ACTION_ATTRIBUTION_WINDOWS = 'action_attribution_windows' + ACTION_BREAKDOWNS = 'action_breakdowns' + ACTION_REPORT_TIME = 'action_report_time' + ACTOR_ID = 'actor_id' + AD_ACCOUNT_CREATED_FROM_BM_FLAG = 'ad_account_created_from_bm_flag' + AD_FORMAT = 'ad_format' + AD_ID = 'ad_id' + AD_NAME = 'ad_name' + AD_REVIEW_FEEDBACK = 'ad_review_feedback' + ADLABELS = 'adlabels' + ADSET_ID = 'adset_id' + ADSET_SCHEDULE = 'adset_schedule' + AGE = 'age' + AGENCY_CLIENT_DECLARATION = 'agency_client_declaration' + AMOUNT_SPENT = 'amount_spent' + APPLINK_TREATMENT = 'applink_treatment' + AUTHORIZATION_CATEGORY = 'authorization_category' + AUTO_UPDATE = 'auto_update' + ASSET_FEED_ID = 'asset_feed_id' + BALANCE = 'balance' + BID_ADJUSTMENTS = 'bid_adjustments' + BID_AMOUNT = 'bid_amount' + BID_STRATEGY = 'bid_strategy' + BILLING_EVENT = 'billing_event' + BODY = 'body' + BOOSTED_OBJECT_ID = 'boosted_object_id' + BRAND_LIFT_STUDIES = 'brand_lift_studies' + BUDGET_REBALANCE_FLAG = 'budget_rebalance_flag' + BUDGET_REMAINING = 'budget_remaining' + BUSINESS_CITY = 'business_city' + BUSINESS = 'business' + BUYING_TYPE = 'buying_type' + CALL_TO_ACTION_TYPE = 'call_to_action_type' + CAMPAIGN_ID = 'campaign_id' + CAN_CREATE_BRAND_LIFT_STUDY = 'can_create_brand_lift_study' + CAN_USE_SPEND_CAP = 'can_use_spend_cap' + CAPABILITIES = 'capabilities' + CATEGORIZATION_CRITERIA = 'categorization_criteria' + CONFIGURED_STATUS = 'configured_status' + CREATED_TIME = 'created_time' + CREATIVE = 'creative' + CURRENCY = 'currency' + DAILY_BUDGET = 'daily_budget' + DAILY_MIN_SPEND_TARGET = 'daily_min_spend_target' + DATE_PRESET = 'date_preset' + DATE_FORMAT = 'date_format' + DATE_START = 'date_start' + DATE_STOP = 'date_stop' + DISABLE_REASON = 'disable_reason' + DYNAMIC_ASSET_LABEL = 'dynamic_asset_label' + DYNAMIC_CREATIVE_SPEC = 'dynamic_creative_spec' + EFFECTIVE_STATUS = 'effective_status' + EXECUTION_OPTIONS = 'execution_options' + EXTENDED_CREDIT_INVOICE_GROUP = 'extended_credit_invoice_group' + FAILED_DELIVERY_CHECKS = 'failed_delivery_checks' + HAS_PAGE_AUTHORIZED_ADACCOUNT = 'has_page_authorized_adaccount' + HEIGHT = 'height' + ID = 'id' + IMAGE_HASH = 'image_hash' + INCLUDE_DRAFTS = 'include_drafts' + INSTAGRAM_ACTOR_ID = 'instagram_actor_id' + INVOICE = 'invoice' + ISSUES_INFO = 'issues_info' + ITERATIVE_SPLIT_TEST_CONFIGS = 'iterative_split_test_configs' + LAST_BUDGET_TOGGLING_TIME = 'last_budget_toggling_time' + LEVEL = 'level' + LIFETIME_BUDGET = 'lifetime_budget' + NAME = 'name' + OBJECTIVE = 'objective' + OBJECT_URL = 'object_url' + OPTIMIZATION_GOAL = 'optimization_goal' + RECOMMENDATIONS = 'recommendations' + RENDER_TYPE = 'render_type' + REVIEW_FEEDBACK = 'review_feedback' + PACING_TYPE = 'pacing_type' + PRIORITY = 'priority' + PROMOTED_OBJECT = 'promoted_object' + SOURCE_CAMPAIGN_ID = 'source_campaign_id' + SPECIAL_AD_CATEGORY = 'special_ad_category' + SPEND_CAP = 'spend_cap' + STATUS = 'status' + SUMMARY_ACTION_BREAKDOWNS = 'summary_action_breakdowns' + TARGETING = 'targeting' + TIME_RANGE = 'time_range' + TIMEZONE_ID = 'timezone_id' + TITLE = 'title' + TOPLINE_ID = 'topline_id' + TOS_ACCEPTED = 'tos_accepted' + TUNE_FOR_CATEGORY = 'tune_for_category' + START_TIME = 'start_time' + STOP_TIME = 'stop_time' + UPDATED_SINCE = 'updated_since' + UPDATED_TIME = 'updated_time' + UPSTREAM_EVENTS = 'upstream_events' + WIDTH = 'width' + +class TestValue: + ACCESS_TOKEN = 'accesstoken' + ACCOUNT_ID = 'act_123' + ACCOUNT_STATUS = 1 + ACTION_ATTRIBUTION_WINDOWS = '28d_click' + ACTION_BREAKDOWNS = 'action_canvas_component_name' + ACTION_REPORT_TIME = 'conversion' + ACTOR_ID = '1245' + AD_ACCOUNT_CREATED_FROM_BM_FLAG = 'false' + AD_ID = '125475' + AD_LABEL = '{"name": "test_label"}' + AD_FORMAT = 'DESKTOP_FEED_STANDARD' + AD_REVIEW_FEEDBACK = '{"global": "LANDING_PAGE_FAIL"}' + ADSET_ID = '12345' + ADSET_SCHEDULE = '{"pacing_type": "standard"}' + AGE = '365' + AGENCY_CLIENT_DECLARATION = ( + '{' + '"agency_representing_client": "0",' + '"client_based_in_france":"0",' + '"client_city": "San Jose",' + '"client_postal_code": "95131",' + '"client_street": "lundi street"' + '}' + ) + AMOUNT_SPENT = "50000" + APPLINK_TREATMENT = 'deeplink_with_web_fallback' + APP_ID = '1234567' + APP_SECRET = 'appsecret' + APP_URL = 'http://test.com' + ASSET_FEED_ID = '123' + AUTHORIZATION_CATEGORY = 'NONE' + AUTO_UPDATE = 'true' + BALANCE = '25000' + BID_ADJUSTMENTS = '{"user_groups": "test_group"}' + BID_AMOUNT = '30000' + BID_STRATEGY = 'LOWEST_COST_WITHOUT_CAP' + BILLING_EVENT = 'IMPRESSIONS' + BODY = "This is my test body" + BOOSTED_OBJECT_ID = '12345678' + BRAND_LIFT_STUDIES = ( + '{' + '"id": "cell_id",' + '"name":"Group A",' + '"treatment_percentage": "50",' + '"adsets": {"id" : "adset_id"}' + '}' + ) + BUDGET_REBALANCE_FLAG = 'false' + BUDGET_REMAINING = '150' + BUSINESS_CITY = 'Menlo park' + BUSINESS_ID = '111111' + BUSINESS = ( + '{' + '"id": "111111",' + '"name":"test business"' + '}' + ) + BUYING_TYPE = 'AUCTION' + CALL_TO_ACTION_TYPE = 'CONTACT' + CAMPAIGN_ID = '1234321' + CAN_CREATE_BRAND_LIFT_STUDY = 'true' + CAN_USE_SPEND_CAP = 'true' + CAPABILITIES = 'BULK_ACCOUNT' + CATEGORIZATION_CRITERIA = 'brand' + CONFIGURED_STATUS = 'PAUSED' + CREATED_TIME = '3728193' + CREATIVE_ID = '1523548' + CREATIVE = ( + '{' + '"id": "15742462",' + '"name": "test name"' + '}' + ) + CURRENCY = 'USD' + DAILY_BUDGET = '200' + DAILY_MIN_SPEND_TARGET = '50' + DATE_FORMAT = 'U' + DATE_PRESET = 'last_30d' + DATE_START = '2019-11-06' + DATE_STOP = '2019-12-05' + DISABLE_REASON = 0 + DYNAMIC_ASSET_LABEL = 'test dynamic asset label' + DYNAMIC_CREATIVE_SPEC = ( + '{' + '"message": "test message",' + '"description": "test description"' + '}' + ) + EFFECTIVE_STATUS = 'PAUSED' + EXECUTION_OPTIONS = 'include_recommendations' + EXTENDED_CREDIT_INVOICE_GROUP = ( + '{' + '"id": "12325487",' + '"name": "test name"' + '}' + ) + FAILED_DELIVERY_CHECKS = ( + '{' + '"summary": "Custom Audience No Longer Shared",' + '"description": "This custom audience not shared.",' + '"check_name": "invalid_custom_audiences"' + '}' + ) + HAS_PAGE_AUTHORIZED_ADACCOUNT = 'true' + HEIGHT = 690 + IMAGE_HASH = '9fdba2b8a67f316e107d3cbbfad2952' + INCLUDE_DRAFTS = 'false' + INSTAGRAM_ACTOR_ID = '12321' + INVOICE = 'true' + ISSUES_INFO = ( + '{' + '"level": "AD",' + '"error_code": "1815869",' + '"error_summary": "Ad post is not available"' + '}' + ) + ITERATIVE_SPLIT_TEST_CONFIGS = '{"name": "test_config"}' + LAST_BUDGET_TOGGLING_TIME = '3892193' + LEVEL = 'ad' + LIFETIME_BUDGET = '10000' + NAME = 'test_name' + OBJECTIVE = 'LINK_CLICKS' + OBJECT_URL = 'http://test.object.com' + OPTIMIZATION_GOAL = 'LINK_CLICKS' + PACING_TYPE = 'standard' + PAGE_ID = '13531' + PRIORITY = '2' + PROMOTED_OBJECT = '{"page_id": "13531"}' + RECOMMENDATIONS = '{"code": "1772120"}' + RENDER_TYPE = 'FALLBACK' + REVIEW_FEEDBACK = 'test review' + SECONDARY_BUSINESS_ID = '2222222' + SECONDARY_ACCOUNT_ID = 'act_456' + SECONDARY_PAGE_ID = '24642' + SPECIAL_AD_CATEGORY = 'EMPLOYMENT' + SPEND_CAP = '922337203685478' + START_TIME = '3728232' + STATUS = 'PAUSED' + STOP_TIME = '3872293' + SUMMARY_ACTION_BREAKDOWNS = 'action_device' + TARGETING = ( + '{' + '"geo_locations": {"countries": "US"},' + '"interests":{"id": "12345678910", "name": "Parenting"}' + '}' + ) + TIME_RANGE =( + '{' + '"since": "2018-11-01",' + '"until": "2019-11-01"' + '}' + ) + TIMEZONE_ID = '10' + TITLE = 'test_title' + TOPLINE_ID = '32123' + TOS_ACCEPTED = ( + '{' + '"item1": "1"' + '}' + ) + TUNE_FOR_CATEGORY = 'CREDIT' + UPDATED_SINCE = '35487985' + UPDATED_TIME = '3728132' + UPSTREAM_EVENTS = '{"name": "event_1", "event_id": "12121"}' + WIDTH = 540 diff --git a/tap_facebook/facebook_business/test/integration_test_runner.py b/tap_facebook/facebook_business/test/integration_test_runner.py new file mode 100644 index 0000000..1681c3c --- /dev/null +++ b/tap_facebook/facebook_business/test/integration_test_runner.py @@ -0,0 +1,68 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Integration test runner for the Python Facebook Business SDK. + +Note: + 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__)) +COMMEND_BASE = "python -m facebook_business.test." +# test will run under release folder +RELEASE_PATH = DIRECTORY + "/../../" + +# suffix of file name in the Test folder, which should not be executed +UTILS = "utils" +RUNNER = "runner" +CONSTANT = "constant" + +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: + cmd = COMMEND_BASE + test + try: + subprocess.check_output( + cmd, + cwd=os.chdir(RELEASE_PATH), + shell=True, + ) + except subprocess.CalledProcessError as e: + failed = True + continue + +if failed: + exit(1) diff --git a/tap_facebook/facebook_business/test/integration_utils.py b/tap_facebook/facebook_business/test/integration_utils.py new file mode 100644 index 0000000..1c8ae13 --- /dev/null +++ b/tap_facebook/facebook_business/test/integration_utils.py @@ -0,0 +1,56 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + + +import unittest +import warnings +from enum import Enum +try: + from unittest.mock import patch +except ImportError: + from mock import patch +from requests.models import Response +from facebook_business.api import FacebookAdsApi, FacebookResponse + +class IntegrationTestCase(unittest.TestCase): + mock_response = None + + def __init__(self, *args, **kwargs): + super(IntegrationTestCase, self).__init__(*args, **kwargs) + FacebookAdsApi.init(access_token='access_token', crash_log=False) + + def setUp(self): + self.patcher = patch('requests.Session.request') + self.mock_request = self.patcher.start() + self.mock_response = Response() + + # ignore Deprecation warning from SDK which is not the part of our testcase + warnings.filterwarnings( + action='ignore', + category=DeprecationWarning, + ) + + def tearDown(self): + mock_response = None + self.patcher.stop() + +class StatusCode(Enum): + SUCCESS = 200 + ERROR = 400 diff --git a/tap_facebook/facebook_business/test/other_docs.py b/tap_facebook/facebook_business/test/other_docs.py new file mode 100644 index 0000000..caddb7a --- /dev/null +++ b/tap_facebook/facebook_business/test/other_docs.py @@ -0,0 +1,75 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Unit tests for the Python Facebook Business SDK. + +How to run: + python -m facebook_business.test.other_docs +''' + + +import os +import sys +import json +from .docs_utils import * + + +class AdConversionPixelDocsTestCase(DocsTestCase): + pass + + +class ClickTrackingTagDocsTestCase(DocsTestCase): + pass + + +class InsightsDocsTestCase(DocsTestCase): + pass + +if __name__ == '__main__': + with open(DocsDataStore.get('filename'), 'w') as handle: + handle.write('') + try: + config_file = open('./config.json') + except IOError: + print("No config file found, skipping docs tests") + sys.exit() + config = json.load(config_file) + config_file.close() + + act_id = "1505766289694659" + FacebookAdsApi.init( + config['app_id'], + config['app_secret'], + config['access_token'], + 'act_' + str(act_id) + ) + DocsDataStore.set('adaccount_id', 'act_' + str(act_id)) + DocsDataStore.set('adaccount_id_int', act_id) + DocsDataStore.set('business_id', '1454288444842444') + DocsDataStore.set('ca_id', '6026172406640') + DocsDataStore.set('dpa_catalog_id', '447683242047472') + DocsDataStore.set('dpa_set_id', '808641022536664') + DocsDataStore.set('dpa_feed_id', '1577689442497017') + DocsDataStore.set('dpa_upload_id', '1577690399163588') + DocsDataStore.set('as_user_id', '358829457619128') + DocsDataStore.set('pixel_id', '417531085081002') + + unittest.main() diff --git a/tap_facebook/facebook_business/test/unit.py b/tap_facebook/facebook_business/test/unit.py new file mode 100644 index 0000000..5e52be6 --- /dev/null +++ b/tap_facebook/facebook_business/test/unit.py @@ -0,0 +1,465 @@ +# Copyright 2014 Facebook, Inc. + +# You are hereby granted a non-exclusive, worldwide, royalty-free license to +# use, copy, modify, and distribute this software in source code or binary +# form for use in connection with the web services and APIs provided by +# Facebook. + +# As with any software that integrates with the Facebook platform, your use +# of this software is subject to the Facebook Developer Principles and +# Policies [http://developers.facebook.com/policy/]. This copyright notice +# shall be included in all copies or substantial portions of the software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +''' +Unit tests for the Python Facebook Business SDK. + +How to run: + python -m facebook_business.test.unit +''' + +import unittest +import json +import inspect +import six +import re +import hashlib +from six.moves import urllib +from sys import version_info +from .. import api +from .. import specs +from .. import exceptions +from .. import session +from .. import utils +from facebook_business.adobjects import (abstractcrudobject, + ad, + adaccount, + adcreative, + customaudience, + productcatalog) +from facebook_business.utils import version + + +class CustomAudienceTestCase(unittest.TestCase): + + def test_format_params(self): + payload = customaudience.CustomAudience.format_params( + customaudience.CustomAudience.Schema.email_hash, + [" test ", "test", "..test.."] + ) + # This is the value of "test" when it's hashed with sha256 + test_hash = \ + "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" + users = payload['payload']['data'] + assert users[0] == test_hash + assert users[1] == users[0] + assert users[2] == users[1] + + def test_fail_when_no_app_ids(self): + def uid_payload(): + customaudience.CustomAudience.format_params( + customaudience.CustomAudience.Schema.uid, + ["123123"], + ) + self.assertRaises( + exceptions.FacebookBadObjectError, + uid_payload, + ) + + def test_format_params_pre_hashed(self): + # This is the value of "test" when it's hashed with sha256 + user = "test" + test_hash = (hashlib.sha256(user.encode('utf8')).hexdigest()) + payload = customaudience.CustomAudience.format_params( + customaudience.CustomAudience.Schema.email_hash, + [test_hash], + pre_hashed=True + ) + + users = payload['payload']['data'] + assert users[0] == test_hash + + def test_multi_key_params(self): + schema = [ + customaudience.CustomAudience.Schema.MultiKeySchema.extern_id, + customaudience.CustomAudience.Schema.MultiKeySchema.fn, + customaudience.CustomAudience.Schema.MultiKeySchema.email, + customaudience.CustomAudience.Schema.MultiKeySchema.ln, + ] + payload = customaudience.CustomAudience.format_params( + schema,[["abc123def", " TEST ", "test", "..test.."]], + is_raw=True, + ) + # This is the value of [" Test ", " test", "..test"] and + # ["TEST2", 'TEST3', '..test5..'] when it's hashed with sha256 + # extern_id, however, should never get hashed. + test_hash1 = [ + "abc123def", + "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", + "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", + "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", + ] + + users = payload['payload']['data'] + assert users[0] == test_hash1 + + def test_extern_id_key_single(self): + + schema = [ + customaudience.CustomAudience.Schema.MultiKeySchema.extern_id, + ] + payload = customaudience.CustomAudience.format_params( + schema, + [ + ["abc123def"], ["abc234def"], ["abc345def"], ["abc456def"], + ], + is_raw=True, + ) + + expected = [ + ["abc123def"], ["abc234def"], ["abc345def"], ["abc456def"], + ] + + actual = payload['payload']['data'] + assert actual == expected + + +class EdgeIteratorTestCase(unittest.TestCase): + + def test_builds_from_array(self): + """ + Sometimes the response returns an array inside the data + key. This asserts that we successfully build objects using + the objects in that array. + """ + response = { + "data": [{ + "id": "6019579" + }, { + "id": "6018402" + }] + } + ei = api.Cursor( + adaccount.AdAccount(fbid='123'), + ad.Ad, + ) + objs = ei.build_objects_from_response(response) + assert len(objs) == 2 + + def test_builds_from_object(self): + """ + Sometimes the response returns a single JSON object. This asserts + that we're not looking for the data key and that we correctly build + the object without relying on the data key. + """ + response = { + "id": "601957/targetingsentencelines", + "targetingsentencelines": [{ + "content": "Location - Living In:", + "children": [ + "United States" + ] + }, { + "content": "Age:", + "children": [ + "18 - 65+" + ] + }] + } + ei = api.Cursor( + adaccount.AdAccount(fbid='123'), + ad.Ad, + ) + obj = ei.build_objects_from_response(response) + assert len(obj) == 1 and obj[0]['id'] == "601957/targetingsentencelines" + + def test_total_is_none(self): + ei = api.Cursor( + adaccount.AdAccount(fbid='123'), + ad.Ad, + ) + self.assertRaises( + exceptions.FacebookUnavailablePropertyException, ei.total) + + def test_total_is_defined(self): + ei = api.Cursor( + adaccount.AdAccount(fbid='123'), + ad.Ad, + ) + ei._total_count = 32 + self.assertEqual(ei.total(), 32) + + def test_builds_from_object_with_data_key(self): + """ + Sometimes the response returns a single JSON object - with a "data". + For instance with adcreative. This asserts that we successfully + build the object that is in "data" key. + """ + response = { + "data": { + "name": "test name", + "status": "ACTIVE", + "account_id": 'act_345' + } + } + ei = api.Cursor( + ad.Ad('123'), + adcreative.AdCreative, + ) + obj = ei.build_objects_from_response(response) + assert len(obj) == 1 and obj[0]['account_id'] == 'act_345' + +class AbstractCrudObjectTestCase(unittest.TestCase): + def test_all_aco_has_id_field(self): + # Some objects do not have FBIDs or don't need checking (ACO) + for obj in (ad.Ad, + adaccount.AdAccount, + adcreative.AdCreative, + customaudience.CustomAudience, + productcatalog.ProductCatalog): + if ( + inspect.isclass(obj) and + issubclass(obj, abstractcrudobject.AbstractCrudObject) and + obj != abstractcrudobject.AbstractCrudObject + ): + try: + id_field = obj.Field.id + assert id_field != '' + except Exception as e: + self.fail("Could not instantiate " + str(obj) + "\n " + str(e)) + + def test_delitem_changes_history(self): + account = adaccount.AdAccount() + account['name'] = 'foo' + assert len(account._changes) > 0 + del account['name'] + assert len(account._changes) == 0 + + def test_fields_to_params(self): + """ + Demonstrates that AbstractCrudObject._assign_fields_to_params() + handles various combinations of params and fields properly. + """ + class Foo(abstractcrudobject.AbstractCrudObject): + _default_read_fields = ['id', 'name'] + + class Bar(abstractcrudobject.AbstractCrudObject): + _default_read_fields = [] + + for adclass, fields, params, expected in [ + (Foo, None, {}, {'fields': 'id,name'}), + (Foo, None, {'a': 'b'}, {'a': 'b', 'fields': 'id,name'}), + (Foo, ['x'], {}, {'fields': 'x'}), + (Foo, ['x'], {'a': 'b'}, {'a': 'b', 'fields': 'x'}), + (Foo, [], {}, {}), + (Foo, [], {'a': 'b'}, {'a': 'b'}), + (Bar, None, {}, {}), + (Bar, None, {'a': 'b'}, {'a': 'b'}), + (Bar, ['x'], {}, {'fields': 'x'}), + (Bar, ['x'], {'a': 'b'}, {'a': 'b', 'fields': 'x'}), + (Bar, [], {}, {}), + (Bar, [], {'a': 'b'}, {'a': 'b'}), + ]: + adclass._assign_fields_to_params(fields, params) + assert params == expected + + +class AbstractObjectTestCase(unittest.TestCase): + def test_export_nested_object(self): + obj = specs.PagePostData() + obj2 = {} + obj2['id'] = 'id' + obj2['name'] = 'foo' + obj['from'] = obj2 + expected = { + 'from': { + 'id': 'id', + 'name': 'foo' + } + } + assert obj.export_data() == expected + + def test_export_dict(self): + obj = specs.ObjectStorySpec() + obj['link_data'] = { + 'link_data': 3 + } + expected = { + 'link_data': { + 'link_data': 3 + } + } + assert obj.export_data() == expected + + def test_export_none(self): + obj = specs.ObjectStorySpec() + obj['link_data'] = None + expected = {} + assert obj.export_data() == expected + + def test_export_list(self): + obj = adcreative.AdCreative() + obj2 = specs.LinkData() + obj3 = specs.AttachmentData() + obj3['description'] = "$100" + obj2['child_attachments'] = [obj3] + obj['link_data'] = obj2 + + try: + json.dumps(obj.export_data()) + except: + self.fail("Objects in crud object export") + + def test_export_no_objects(self): + obj = specs.ObjectStorySpec() + obj2 = specs.VideoData() + obj2['description'] = "foo" + obj['video_data'] = obj2 + + try: + json.dumps(obj.export_data()) + except: + self.fail("Objects in object export") + + def test_can_print(self): + '''Must be able to print nested objects without serialization issues''' + obj = specs.PagePostData() + obj2 = {} + obj2['id'] = 'id' + obj2['name'] = 'foo' + obj['from'] = obj2 + + try: + obj.__repr__() + except TypeError as e: + self.fail('Cannot call __repr__ on AbstractObject\n %s' % e) + + +class SessionTestCase(unittest.TestCase): + + def gen_appsecret_proof(self, access_token, app_secret): + import hashlib + import hmac + + if version_info < (3, 0): + h = hmac.new( + bytes(app_secret), + msg=bytes(access_token), + digestmod=hashlib.sha256 + ) + else: + h = hmac.new( + bytes(app_secret, 'utf-8'), + msg=bytes(access_token, 'utf-8'), + digestmod=hashlib.sha256 + ) + return h.hexdigest() + + def test_appsecret_proof(self): + app_id = 'reikgukrhgfgtcheghjteirdldlrkjbu' + app_secret = 'gdrtejfdghurnhnjghjnertihbknlrvv' + access_token = 'bekguvjhdvdburldfnrfdguljijenklc' + + fb_session = session.FacebookSession(app_id, app_secret, access_token) + self.assertEqual( + fb_session.appsecret_proof, + self.gen_appsecret_proof(access_token, app_secret) + ) + + +class ProductCatalogTestCase(unittest.TestCase): + def test_b64_encode_is_correct(self): + product_id = 'ID_1' + b64_id_as_str = 'SURfMQ==' + + catalog = productcatalog.ProductCatalog() + self.assertEqual(b64_id_as_str, catalog.b64_encoded_id(product_id)) + + +class SessionWithoutAppSecretTestCase(unittest.TestCase): + def test_appsecret_proof_absence(self): + try: + session.FacebookSession( + access_token='thisisfakeaccesstoken' + ) + except Exception as e: + self.fail("Could not instantiate " + "\n " + str(e)) + + +class UrlsUtilsTestCase(unittest.TestCase): + + def test_quote_with_encoding_basestring(self): + s = "some string" + self.assertEqual( + utils.urls.quote_with_encoding(s), + urllib.parse.quote(s) + ) + # do not need to test for that in PY3 + if six.PY2: + s = u"some string with ùnicode".encode("utf-8") + self.assertEqual( + utils.urls.quote_with_encoding(s), + urllib.parse.quote(s) + ) + + def test_quote_with_encoding_unicode(self): + s = u"some string with ùnicode" + self.assertEqual( + utils.urls.quote_with_encoding(s), + urllib.parse.quote(s.encode("utf-8")) + ) + + def test_quote_with_encoding_integer(self): + s = 1234 + self.assertEqual( + utils.urls.quote_with_encoding(s), + urllib.parse.quote('1234') + ) + + def test_quote_with_encoding_other_than_string_and_integer(self): + s = [1, 2] + self.assertRaises( + ValueError, + utils.urls.quote_with_encoding, s + ) + + +class FacebookAdsApiBatchTestCase(unittest.TestCase): + + def test_add_works_with_utf8(self): + default_api = api.FacebookAdsApi.get_default_api() + batch_api = api.FacebookAdsApiBatch(default_api) + batch_api.add('GET', 'some/path', params={"key": u"vàlué"}) + self.assertEqual(len(batch_api), 1) + self.assertEqual(batch_api._batch[0], { + 'method': 'GET', + 'relative_url': 'some/path?'+'key=' + utils.urls.quote_with_encoding(u'vàlué') + }) + + +class VersionUtilsTestCase(unittest.TestCase): + + def test_api_version_is_pulled(self): + version_value = utils.version.get_version() + assert re.search('[0-9]+\.[0-9]+\.[0-9]', version_value) + + +class FacebookResponseTestCase(unittest.TestCase): + + def test_is_success_200(self): + resp = api.FacebookResponse(http_status=200) + self.assertTrue(resp.is_success()) + + def test_is_success_service_unavailable(self): + resp = api.FacebookResponse(body="Service Unavailable", http_status=200) + self.assertFalse(resp.is_success()) + +if __name__ == '__main__': + unittest.main() diff --git a/tap_facebook/facebook_business/typechecker.py b/tap_facebook/facebook_business/typechecker.py new file mode 100644 index 0000000..50c4958 --- /dev/null +++ b/tap_facebook/facebook_business/typechecker.py @@ -0,0 +1,205 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 +import six + +from facebook_business.utils import api_utils +from facebook_business.exceptions import( + FacebookBadParameterTypeException, +) + +class TypeChecker: + """ + A checker for field/params types of objects and API requests. + You may change the setting in apiconfig.py. Under STRICT mode, any check + failures will throw exception. Under non-STRICT mode, failures will result + in warning messages. + """ + + primitive_types = set(["unsigned int", "int", "bool", "string", "Object", + "datetime", "float"]) + + def __init__(self, type_check_info, type_check_enum): + self._type_check_info = type_check_info + self._enum_data = type_check_enum + + def is_primitive_type(self, type): + return (type in self.primitive_types) or (type in self._enum_data) + + def convert_string_to_prim_type(self, primitive_type, value): + if primitive_type in self._enum_data: + return value + elif primitive_type in ("unsigned int", "int"): + return int(value) + elif primitive_type == "bool": + return value not in ("false", "0", "null") + elif primitive_type == "float": + return float(value) + elif primitive_type == "datetime": + return value + elif primitive_type == "string": + return str(value) + elif primitive_type == "Object": + return value + else: + raise FacebookBadParameterTypeException('Fail to convert from ' + + value.__class__.__name__ + ' to ' + str(primitive_type)) + + def get_type(self, param): + if param not in self._type_check_info: + return None + return self._type_check_info[param] + + def is_valid_key(self, param): + return param in self._type_check_info + + def is_valid_pair(self, param, value): + if self.is_valid_key(param): + value_type = self._type_check_info[param] + return self.is_type(value_type, value) + else: + return True + + def is_type(self, value_type, value, allow_dict_as_obj=True): + if value is None or value_type is None: + return True + + if value_type in self._enum_data: + return value in self._enum_data[value_type] + if value_type == 'file': + return os.path.isfile(value) + if value_type == 'list': + return isinstance(value, list) + + if isinstance(value, dict) and value_type in ['map', 'Object']: + return True + if isinstance(value, bool): + return value_type in ['bool'] + if isinstance(value, six.string_types): + if value_type in ['string', 'unicode', 'file', 'datetime']: + return True + elif value_type == 'bool' and value in ['true', 'false']: + return True + elif value_type in ['int', 'unsigned int', 'float']: + return value.isdigit() + else: + return False + if isinstance(value, (int, float)): + return value_type in ['int', 'unsigned int', 'float', 'string', 'datetime'] + + if self.is_type_collection(value_type, 'list'): + 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) + 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') + 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)): + return True + + if allow_dict_as_obj and isinstance(value, dict): + return self._type_is_ad_object(value_type) + + return False + + def is_type_collection(self, value_type, collection_name): + return collection_name == value_type[:len(collection_name)] + + def get_type_from_collection(self, value_type, collection_name): + return [s.strip() for s in + value_type[len(collection_name):].strip("<>").split(',')] + + def is_list_param(self, param): + if self.is_valid_key(param): + return self.is_type_collection(self._type_check_info[param], "list") + return False + + def is_map_param(self, param): + if self.is_valid_key(param): + return self.is_type_collection(self._type_check_info[param], "map") + return False + + def is_file_param(self, param): + if param == "filename": + return True + if self.is_valid_key(param): + return self._type_check_info[param] == "file" + return False + + def get_typed_value(self, key, value): + if not self.is_valid_key(key): + return value + field_type = self.get_type(key) + if self.is_type(field_type, value, allow_dict_as_obj=False): + return value + + if self.is_primitive_type(field_type) and isinstance(value, six.text_type): + typed_value = self.convert_string_to_prim_type(field_type, value) + elif self.is_type_collection(field_type, "list"): + sub_type = self.get_type_from_collection(field_type, "list")[0] + if isinstance(value, list): + typed_value = [self.get_typed_value(sub_type, v) for v in value] + else: + typed_value = [self.get_typed_value(sub_type, value)] + elif self.is_type_collection(field_type, "map"): + sub_types = self.get_type_from_collection(field_type, "map") + 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] + 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) + except: + typed_value = value + else: + typed_value = value + + if not self.is_type(field_type, typed_value): + api_utils.warning('Value of ' + key + ' is not be compatible.' + + ' Expect ' + field_type + '; got ' + str(type(typed_value))) + return typed_value + + def _create_field_object(self, field_type, data=None): + mod = importlib.import_module( + "facebook_business.adobjects." + field_type.lower()) + if mod is not None and hasattr(mod, field_type): + obj = (getattr(mod, field_type))() + if data is not None: + obj._set_data(data) + return obj + return None + + def _type_is_ad_object(self, value_type): + try: + mod = importlib.import_module( + "facebook_business.adobjects." + value_type.lower()) + return mod is not None + except: + return False diff --git a/tap_facebook/facebook_business/utils/__init__.py b/tap_facebook/facebook_business/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tap_facebook/facebook_business/utils/api_utils.py b/tap_facebook/facebook_business/utils/api_utils.py new file mode 100644 index 0000000..2de8bef --- /dev/null +++ b/tap_facebook/facebook_business/utils/api_utils.py @@ -0,0 +1,16 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 warnings +from facebook_business import apiconfig +from facebook_business.exceptions import FacebookBadObjectError + + +def warning(message): + if apiconfig.ads_api_config['STRICT_MODE']: + raise FacebookBadObjectError(message) + else: + warnings.warn(message) diff --git a/tap_facebook/facebook_business/utils/urls.py b/tap_facebook/facebook_business/utils/urls.py new file mode 100644 index 0000000..0d0cbad --- /dev/null +++ b/tap_facebook/facebook_business/utils/urls.py @@ -0,0 +1,31 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 + + +def quote_with_encoding(val): + """Quote a string that will be placed in url. + If the string is unicode, we encode it + to utf-8 before using `urllib.parse.quote`. + In case it's not a string (an int for instance), + we still try to convert it. + + Args: + val: The string to be properly encoded. + """ + if not isinstance(val, (six.integer_types, six.string_types)): + raise ValueError("Cannot encode {} type.".format(type(val))) + + # handle other stuff than strings + if isinstance(val, six.integer_types): + val = six.text_type(val).encode('utf-8') if six.PY3 else bytes(val) + + # works with PY2 and PY3 + elif not isinstance(val, bytes): + val = val.encode("utf-8") + + return six.moves.urllib.parse.quote(val) diff --git a/tap_facebook/facebook_business/utils/version.py b/tap_facebook/facebook_business/utils/version.py new file mode 100644 index 0000000..d6f9273 --- /dev/null +++ b/tap_facebook/facebook_business/utils/version.py @@ -0,0 +1,30 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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. +""" + +import os +import re + + +def get_version(): + this_dir = os.path.dirname(__file__) + package_init_filename = os.path.join(this_dir, '../__init__.py') + + version = None + with open(package_init_filename, 'r') as handle: + file_content = handle.read() + version = re.search( + r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', + file_content, re.MULTILINE + ).group(1) + + if not version: + raise ValueError('Cannot find version information') + + return version diff --git a/tap_facebook/facebook_business/video_uploader.py b/tap_facebook/facebook_business/video_uploader.py new file mode 100644 index 0000000..1c92656 --- /dev/null +++ b/tap_facebook/facebook_business/video_uploader.py @@ -0,0 +1,397 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# 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 +""" + +from facebook_business.exceptions import FacebookError +from facebook_business.exceptions import FacebookRequestError +from abc import ABCMeta, abstractmethod + +import os +import ntpath +import time + + +class VideoUploader(object): + """ + Video Uploader that can upload videos to adaccount + """ + + def __init__(self): + self._session = None + + def upload(self, video, wait_for_encoding=False): + """ + Upload the given video file. + Args: + video(required): The AdVideo object that will be uploaded + wait_for_encoding: Whether to wait until encoding is finished. + """ + # Check there is no existing session + if self._session: + raise FacebookError( + "There is already an upload session for this video uploader", + ) + + # Initiate an upload session + self._session = VideoUploadSession(video, wait_for_encoding) + result = self._session.start() + self._session = None + return result + + +class VideoUploadSession(object): + + def __init__(self, video, wait_for_encoding=False, interval=3, timeout=180): + self._video = video + self._api = video.get_api_assured() + if (video.Field.filepath in video): + self._file_path = video[video.Field.filepath] + self._slideshow_spec = None + elif (video.Field.slideshow_spec in video): + self._slideshow_spec = video[video.Field.slideshow_spec] + self._file_path = None + self._account_id = video.get_parent_id_assured() + self._wait_for_encoding = wait_for_encoding + # Setup start request manager + self._start_request_manager = VideoUploadStartRequestManager( + self._api, + ) + + # Setup transfer request manager + self._transfer_request_manager = VideoUploadTransferRequestManager( + self._api, + ) + + # Setup finish request manager + self._finish_request_manager = VideoUploadFinishRequestManager( + self._api, + ) + self._timeout = timeout + self._interval = interval + + def start(self): + # Run start request manager + start_response = self._start_request_manager.send_request( + self.getStartRequestContext(), + ).json() + self._start_offset = int(start_response['start_offset']) + self._end_offset = int(start_response['end_offset']) + self._session_id = start_response['upload_session_id'] + video_id = start_response['video_id'] + + # Run transfer request manager + self._transfer_request_manager.send_request( + self.getTransferRequestContext(), + ) + + # Run finish request manager + response = self._finish_request_manager.send_request( + self.getFinishRequestContext(), + ) + + if self._wait_for_encoding: + VideoEncodingStatusChecker.waitUntilReady( + self._api, video_id, interval=self._interval, timeout=self._timeout + ) + + # Populate the video info + body = response.json().copy() + body['id'] = video_id + del body['success'] + + return body + + def getStartRequestContext(self): + context = VideoUploadRequestContext() + if (self._file_path): + context.file_size = os.path.getsize(self._file_path) + context.account_id = self._account_id + return context + + def getTransferRequestContext(self): + context = VideoUploadRequestContext() + context.session_id = self._session_id + context.start_offset = self._start_offset + context.end_offset = self._end_offset + if (self._file_path): + context.file_path = self._file_path + if (self._slideshow_spec): + context.slideshow_spec = self._slideshow_spec + context.account_id = self._account_id + return context + + def getFinishRequestContext(self): + context = VideoUploadRequestContext() + context.session_id = self._session_id + context.account_id = self._account_id + if (self._file_path): + context.file_name = ntpath.basename(self._file_path) + return context + + +class VideoUploadRequestManager(object): + """ + Abstract class for request managers + """ + __metaclass__ = ABCMeta + + def __init__(self, api): + self._api = api + + @abstractmethod + def send_request(self, context): + """ + send upload request + """ + pass + + @abstractmethod + def getParamsFromContext(self, context): + """ + get upload params from context + """ + pass + + +class VideoUploadStartRequestManager(VideoUploadRequestManager): + + def send_request(self, context): + """ + send start request with the given context + """ + # Init a VideoUploadRequest and send the request + request = VideoUploadRequest(self._api) + request.setParams(self.getParamsFromContext(context)) + return request.send((context.account_id, 'advideos')) + + def getParamsFromContext(self, context): + return { + 'file_size': context.file_size, + 'upload_phase': 'start', + } + + +class VideoUploadTransferRequestManager(VideoUploadRequestManager): + + def send_request(self, context): + """ + send transfer request with the given context + """ + # Init a VideoUploadRequest + request = VideoUploadRequest(self._api) + self._start_offset = context.start_offset + self._end_offset = context.end_offset + filepath = context.file_path + file_size = os.path.getsize(filepath) + # Give a chance to retry every 10M, or at least twice + retry = max(file_size / (1024 * 1024 * 10), 2) + f = open(filepath, 'rb') + # While the there are still more chunks to send + while self._start_offset != self._end_offset: + # Read a chunk of file + f.seek(self._start_offset) + chunk = f.read(self._end_offset - self._start_offset) + context.start_offset = self._start_offset + context.end_offset = self._end_offset + # Parse the context + request.setParams( + self.getParamsFromContext(context), + {'video_file_chunk': ( + os.path.basename(context.file_path), + chunk, + 'multipart/form-data', + )}, + ) + # send the request + try: + response = request.send( + (context.account_id, 'advideos'), + ).json() + self._start_offset = int(response['start_offset']) + self._end_offset = int(response['end_offset']) + except FacebookRequestError as e: + subcode = e.api_error_subcode() + body = e.body() + if subcode == 1363037: + # 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 + retry > 0): + self._start_offset = int( + body['error']['error_data']['start_offset'], + ) + self._end_offset = int( + body['error']['error_data']['end_offset'], + ) + retry = max(retry - 1, 0) + continue + elif ('error' in body and + 'is_transient' in body['error']): + if body['error']['is_transient']: + time.sleep(1) + continue + f.close() + raise e + + f.close() + return response + + def getParamsFromContext(self, context): + return { + 'upload_phase': 'transfer', + 'start_offset': context.start_offset, + 'upload_session_id': context.session_id, + } + + +class VideoUploadFinishRequestManager(VideoUploadRequestManager): + + def send_request(self, context): + """ + send transfer request with the given context + """ + # Init a VideoUploadRequest + request = VideoUploadRequest(self._api) + + # Parse the context + request.setParams(self.getParamsFromContext(context)) + + # send the request + return request.send((context.account_id, 'advideos')) + + def getParamsFromContext(self, context): + return { + 'upload_phase': 'finish', + 'upload_session_id': context.session_id, + 'title': context.file_name, + } + + +class VideoUploadRequestContext(object): + """ + Upload request context that contains the param data + """ + + @property + def account_id(self): + return self._account_id + + @account_id.setter + def account_id(self, account_id): + self._account_id = account_id + + @property + def file_name(self): + return self._name + + @file_name.setter + def file_name(self, name): + self._name = name + + @property + def file_size(self): + return self._size + + @file_size.setter + def file_size(self, size): + self._size = size + + @property + def session_id(self): + return self._session_id + + @session_id.setter + def session_id(self, session_id): + self._session_id = session_id + + @property + def start_offset(self): + return self._start_offset + + @start_offset.setter + def start_offset(self, start_offset): + self._start_offset = start_offset + + @property + def end_offset(self): + return self._end_offset + + @end_offset.setter + def end_offset(self, end_offset): + self._end_offset = end_offset + + @property + def file(self): + return self._file + + @file.setter + def file(self, file): + self._file = file + + @property + def file_path(self): + return self._filepath + + @file_path.setter + def file_path(self, filepath): + self._filepath = filepath + + +class VideoUploadRequest(object): + + def __init__(self, api): + self._params = None + self._files = None + self._api = api + + def send(self, path): + """ + send the current request + """ + return self._api.call( + 'POST', + path, + params=self._params, + files=self._files, + url_override='https://graph-video.facebook.com', + ) + + def setParams(self, params, files=None): + self._params = params + self._files = files + + +class VideoEncodingStatusChecker(object): + + @staticmethod + def waitUntilReady(api, video_id, interval, timeout): + start_time = time.time() + while True: + status = VideoEncodingStatusChecker.getStatus(api, video_id) + status = status['video_status'] + if status != 'processing': + break + if start_time + timeout <= time.time(): + raise FacebookError('video encoding timeout: ' + str(timeout)) + time.sleep(interval) + if status != 'ready': + raise FacebookError( + 'video encoding status: ' + status, + ) + return + + @staticmethod + def getStatus(api, video_id): + result = api.call( + 'GET', + [int(video_id)], + params={'fields': 'status'}, + ).json() + return result['status'] From 178731e6f968cad1881b99351ce1415c311f22a4 Mon Sep 17 00:00:00 2001 From: Sourabh Gandhi Date: Fri, 5 Apr 2024 12:50:23 +0000 Subject: [PATCH 3/4] Monkey patch the original function(call) of facebook business sdk --- setup.py | 1 + tap_facebook/__init__.py | 49 +- tap_facebook/facebook_business/__init__.py | 15 - .../facebook_business/adobjects/__init__.py | 0 .../adobjects/abstractcrudobject.py | 639 -- .../adobjects/abstractobject.py | 160 - .../facebook_business/adobjects/ad.py | 753 --- .../facebook_business/adobjects/adaccount.py | 4221 ------------- .../adobjects/adaccountadruleshistory.py | 77 - .../adobjects/adaccountadvolume.py | 185 - .../adobjects/adaccountbusinessconstraints.py | 56 - .../adobjects/adaccountdefaultdestination.py | 39 - .../adobjects/adaccountdefaultobjective.py | 87 - .../adobjects/adaccountdeliveryestimate.py | 77 - .../adobjects/adaccountdsarecommendations.py | 37 - .../adaccountiosfourteencampaignlimits.py | 41 - ...ccountmatchedsearchapplicationsedgedata.py | 80 - .../adobjects/adaccountmaxbid.py | 37 - .../adobjects/adaccountpromotableobjects.py | 41 - .../adobjects/adaccountreachestimate.py | 41 - .../adaccountrecommendedcamapaignbudget.py | 41 - .../adobjects/adaccountsubscribedapps.py | 52 - .../adobjects/adaccounttargetingunified.py | 567 -- .../adobjects/adaccounttrackingdata.py | 37 - .../adobjects/adaccountuser.py | 51 - .../facebook_business/adobjects/adactivity.py | 165 - .../adobjects/adassetbody.py | 44 - .../adobjects/adassetcalltoactiontype.py | 42 - ...assetcustomizationrulecustomizationspec.py | 60 - .../adobjects/adassetdescription.py | 44 - .../adobjects/adassetfeedadditionaldata.py | 47 - .../adobjects/adassetfeedspec.py | 158 - .../adassetfeedspecassetcustomizationrule.py | 61 - .../adobjects/adassetfeedspecassetlabel.py | 42 - .../adobjects/adassetfeedspecbody.py | 41 - .../adobjects/adassetfeedspeccalltoaction.py | 41 - .../adobjects/adassetfeedspeccaption.py | 41 - .../adobjects/adassetfeedspeccarousel.py | 43 - .../adassetfeedspeccarouselchildattachment.py | 55 - .../adobjects/adassetfeedspecdescription.py | 41 - .../adobjects/adassetfeedspecevents.py | 40 - .../adobjects/adassetfeedspecgrouprule.py | 49 - .../adobjects/adassetfeedspecimage.py | 45 - .../adobjects/adassetfeedspeclinkurl.py | 47 - .../adobjects/adassetfeedspectitle.py | 41 - .../adobjects/adassetfeedspecvideo.py | 47 - .../adobjects/adassetimage.py | 52 - .../adobjects/adassetlinkurl.py | 56 - .../adobjects/adassetmessageextensions.py | 37 - .../adobjects/adassetonsitedestinations.py | 43 - .../adobjects/adassettargetruletargeting.py | 56 - .../adobjects/adassettitle.py | 44 - .../adobjects/adassetvideo.py | 60 - .../adobjects/adasyncrequest.py | 132 - .../adobjects/adasyncrequestset.py | 214 - .../adasyncrequestsetnotificationresult.py | 39 - .../adobjects/adbidadjustments.py | 41 - .../adobjects/adcampaignbidconstraint.py | 37 - .../adobjects/adcampaigndeliveryestimate.py | 77 - ...campaigndeliverystatsunsupportedreasons.py | 39 - .../adcampaignfrequencycontrolspecs.py | 41 - .../adobjects/adcampaignissuesinfo.py | 45 - .../adobjects/adcampaignlearningstageinfo.py | 43 - .../adobjects/adcampaignoptimizationevent.py | 41 - .../adobjects/adcampaignpacedbidinfo.py | 37 - .../facebook_business/adobjects/adcreative.py | 541 -- .../adobjects/adcreativeaddisclaimer.py | 41 - .../adobjects/adcreativebrandedcontentads.py | 49 - .../adcreativebrandedcontentadspartners.py | 43 - .../adcreativecollectionthumbnailinfo.py | 41 - .../adcreativedegreesoffreedomspec.py | 51 - .../adcreativefacebookbrandedcontent.py | 41 - .../adobjects/adcreativefeaturedetails.py | 37 - .../adobjects/adcreativefeaturesspec.py | 89 - .../adobjects/adcreativeinsights.py | 37 - .../adcreativeinstagrambrandedcontent.py | 37 - .../adcreativeinteractivecomponentsspec.py | 39 - .../adobjects/adcreativelinkdata.py | 111 - .../adcreativelinkdataapplinkspec.py | 43 - .../adcreativelinkdatacalltoaction.py | 118 - .../adcreativelinkdatacalltoactionvalue.py | 57 - .../adcreativelinkdatachildattachment.py | 57 - .../adcreativelinkdataimagelayerspec.py | 113 - .../adcreativelinkdataimageoverlayspec.py | 114 - .../adcreativelinkdatasponsorshipinfospec.py | 39 - .../adcreativelinkdatatemplatevideospec.py | 41 - .../adobjects/adcreativeobjectstoryspec.py | 49 - .../adcreativeomnichannellinkspec.py | 39 - .../adobjects/adcreativephotodata.py | 47 - .../adcreativephotodatamediaelements.py | 43 - .../adobjects/adcreativeplacedata.py | 47 - .../adcreativeplatformcustomization.py | 37 - .../adcreativeportraitcustomizations.py | 39 - .../adcreativepostclickconfiguration.py | 39 - .../adcreativepromotionmetadataspec.py | 52 - .../adcreativerecommendersettings.py | 39 - .../adobjects/adcreativesitelinksspec.py | 39 - .../adobjects/adcreativesourcingspec.py | 41 - .../adobjects/adcreativestaticfallbackspec.py | 47 - .../adobjects/adcreativetemplateurlspec.py | 49 - .../adobjects/adcreativetextdata.py | 37 - .../adobjects/adcreativevideodata.py | 69 - .../adobjects/adcustomizationrulespec.py | 55 - .../adobjects/addynamiccreative.py | 37 - .../adobjects/adentitytargetspend.py | 45 - .../adobjects/adgroupissuesinfo.py | 45 - .../adobjects/adgroupmetadata.py | 45 - .../adgroupplacementspecificreviewfeedback.py | 109 - .../adobjects/adgroupreviewfeedback.py | 39 - .../facebook_business/adobjects/adimage.py | 126 - .../facebook_business/adobjects/adkeywords.py | 43 - .../facebook_business/adobjects/adlabel.py | 273 - .../adobjects/admonetizationproperty.py | 194 - .../adnetworkanalyticsasyncqueryresult.py | 47 - .../adnetworkanalyticssyncqueryresult.py | 104 - .../adobjects/adplacement.py | 86 - .../adobjects/adplacepageset.py | 103 - .../adobjects/adplacepagesetmetadata.py | 43 - .../facebook_business/adobjects/adpreview.py | 118 - .../adobjects/adpromotedobject.py | 117 - .../adobjects/adrecommendation.py | 61 - .../adobjects/adrecommendationdata.py | 37 - .../adobjects/adreportrun.py | 182 - .../facebook_business/adobjects/adrule.py | 300 - .../adobjects/adruleevaluationspec.py | 81 - .../adobjects/adruleexecutionoptions.py | 46 - .../adobjects/adruleexecutionspec.py | 95 - .../adobjects/adrulefilters.py | 57 - .../adobjects/adrulehistory.py | 70 - .../adobjects/adrulehistoryresult.py | 47 - .../adobjects/adrulehistoryresultaction.py | 43 - .../adobjects/adruleschedule.py | 41 - .../adobjects/adruleschedulespec.py | 39 - .../adobjects/adruletrigger.py | 67 - .../adobjects/adsactionstats.py | 107 - .../facebook_business/adobjects/adset.py | 1103 ---- .../adobjects/adshistogramstats.py | 107 - .../adobjects/adsimagecrops.py | 49 - .../adobjects/adsinsights.py | 449 -- .../adsoptimaldeliverygrowthopportunity.py | 41 - .../facebook_business/adobjects/adspixel.py | 748 --- .../adobjects/adspixelstats.py | 43 - .../adobjects/adspixelstatsresult.py | 65 - .../facebook_business/adobjects/adstudy.py | 363 -- .../adobjects/adstudycell.py | 229 - .../adobjects/adstudyobjective.py | 360 -- .../adobjects/adstudyobjectiveid.py | 44 - .../adstudyobjectiveoffsitedatasets.py | 42 - .../facebook_business/adobjects/advideo.py | 1354 ----- .../adobjects/agencyclientdeclaration.py | 59 - .../facebook_business/adobjects/agerange.py | 39 - .../facebook_business/adobjects/album.py | 410 -- .../adobjects/analyticssegment.py | 105 - .../adobjects/androidapplink.py | 43 - .../adobjects/application.py | 2315 -------- .../facebook_business/adobjects/apprequest.py | 117 - .../adobjects/apprequestformerrecipient.py | 42 - .../adobjects/assigneduser.py | 46 - .../adobjects/asyncrequest.py | 59 - .../adobjects/asyncsession.py | 98 - .../adobjects/attributionspec.py | 39 - .../adobjects/audiencepermissionforactions.py | 45 - .../adobjects/audiocopyright.py | 124 - .../adobjects/automotivemodel.py | 234 - .../facebook_business/adobjects/avatar.py | 107 - .../adobjects/avatarprofilepicture.py | 72 - .../brandedcontentshadowigmediaid.py | 46 - .../adobjects/brandedcontentshadowiguserid.py | 40 - .../adobjects/brandrequest.py | 110 - .../adobjects/brandsafetyblocklistusage.py | 45 - .../adobjects/broadtargetingcategories.py | 67 - .../facebook_business/adobjects/business.py | 3981 ------------- .../adobjects/businessadaccountrequest.py | 42 - .../adobjects/businessapplicationrequest.py | 42 - .../adobjects/businessassetgroup.py | 1003 ---- .../businessassetsharingagreement.py | 121 - .../adobjects/businesscreativefolder.py | 96 - .../adobjects/businessimage.py | 132 - .../businessmanagedpartnereligibility.py | 41 - .../businessownedobjectonbehalfofrequest.py | 88 - .../adobjects/businesspagerequest.py | 42 - .../businesspartnerpremiumoptions.py | 41 - .../adobjects/businessrolerequest.py | 176 - .../adobjects/businessuser.py | 319 - .../adobjects/businessvideo.py | 78 - .../facebook_business/adobjects/campaign.py | 1058 ---- .../campaigngroupbrandconfiguration.py | 41 - ...ampaigngroupcollaborativeadspartnerinfo.py | 36 - .../facebook_business/adobjects/canvas.py | 222 - .../adobjects/canvasadsettings.py | 49 - .../adobjects/canvasbodyelement.py | 37 - .../adobjects/canvascollectionthumbnail.py | 41 - .../adobjects/canvasdynamicsetting.py | 74 - .../adobjects/canvaspreview.py | 37 - .../adobjects/catalogbasedtargeting.py | 37 - .../adobjects/catalogitemappealstatus.py | 51 - .../adobjects/catalogitemapplinks.py | 51 - .../catalogitemchannelstointegritystatus.py | 39 - .../catalogsegmentallmatchcountlaser.py | 47 - .../adobjects/catalogsubverticallist.py | 141 - .../facebook_business/adobjects/chatplugin.py | 59 - .../adobjects/checkbatchrequeststatus.py | 55 - .../facebook_business/adobjects/childevent.py | 46 - .../adobjects/clicktrackingtag.py | 33 - .../facebook_business/adobjects/cloudgame.py | 86 - .../collaborativeadspartnerinfolistitem.py | 36 - .../collaborativeadssharesettings.py | 80 - .../facebook_business/adobjects/comment.py | 419 -- .../adobjects/commercemerchantsettings.py | 612 -- .../commercemerchantsettingssetupstatus.py | 47 - .../adobjects/commerceorder.py | 620 -- .../commerceordertransactiondetail.py | 116 - .../adobjects/commercepayout.py | 45 - .../adobjects/commercesettings.py | 39 - .../adobjects/connectionstargeting.py | 42 - .../contentpublishinglimitresponse.py | 39 - .../adobjects/contextualbundlingspec.py | 37 - .../adobjects/conversionactionquery.py | 87 - .../adobjects/copyrightreferencecontainer.py | 62 - .../facebook_business/adobjects/coverphoto.py | 48 - ...cpasadvertiserpartnershiprecommendation.py | 86 - .../adobjects/cpasbusinesssetupconfig.py | 121 - .../adobjects/cpascollaborationrequest.py | 104 - .../adobjects/cpasmerchantconfig.py | 82 - .../adobjects/creativehistory.py | 39 - .../facebook_business/adobjects/creditcard.py | 110 - .../adobjects/creditpartitionactionoptions.py | 41 - .../facebook_business/adobjects/crmaddress.py | 96 - .../ctxpartnerappwelcomemessageflow.py | 82 - .../facebook_business/adobjects/currency.py | 43 - .../adobjects/currencyamount.py | 43 - .../adobjects/customaudience.py | 703 --- .../adobjects/customaudienceadaccount.py | 40 - .../adobjects/customaudiencedatasource.py | 116 - .../adobjects/customaudiencegroup.py | 41 - .../adobjects/customaudiencesalts.py | 39 - .../adobjects/customaudiencesession.py | 51 - .../customaudiencesharedaccountinfo.py | 45 - .../adobjects/customaudiencesharingstatus.py | 39 - .../adobjects/customaudiencestatus.py | 39 - .../adobjects/customaudiencestos.py | 44 - .../adobjects/customconversion.py | 243 - .../adobjects/customconversionstatsresult.py | 52 - .../adobjects/customusersettings.py | 39 - .../facebook_business/adobjects/dacheck.py | 54 - .../facebook_business/adobjects/dataset.py | 40 - .../facebook_business/adobjects/daypart.py | 43 - .../adobjects/deliverycheck.py | 43 - .../adobjects/deliverycheckextrainfo.py | 41 - .../adobjects/deliverywindow.py | 542 -- .../adobjects/destination.py | 208 - .../adobjects/dynamicpostchildattachment.py | 47 - .../adobjects/dynamicpriceconfigbydate.py | 76 - .../adobjects/dynamicvideometadata.py | 76 - .../facebook_business/adobjects/engagement.py | 49 - .../adobjects/entityattextrange.py | 58 - .../facebook_business/adobjects/event.py | 528 -- .../adobjects/eventsourcegroup.py | 182 - .../facebook_business/adobjects/experience.py | 48 - .../adobjects/extendedcredit.py | 273 - .../extendedcreditallocationconfig.py | 166 - .../adobjects/extendedcreditinvoicegroup.py | 242 - .../adobjects/externaleventsource.py | 49 - .../adobjects/fameexportconfig.py | 43 - .../adobjects/flexibletargeting.py | 91 - .../facebook_business/adobjects/flight.py | 251 - .../adobjects/fundingsourcedetails.py | 48 - .../adobjects/fundingsourcedetailscoupon.py | 45 - .../adobjects/fundraiserpersontocharity.py | 280 - .../facebook_business/adobjects/group.py | 1175 ---- .../adobjects/hasleadaccess.py | 53 - .../adobjects/helpers/__init__.py | 0 .../adobjects/helpers/adaccountmixin.py | 69 - .../adobjects/helpers/adaccountusermixin.py | 48 - .../adobjects/helpers/adimagemixin.py | 146 - .../adobjects/helpers/adpreviewmixin.py | 10 - .../adobjects/helpers/adreportrunmixin.py | 21 - .../adobjects/helpers/adsinsightsmixin.py | 28 - .../adobjects/helpers/businessmixin.py | 18 - .../adobjects/helpers/customaudiencemixin.py | 257 - .../adobjects/helpers/productcatalogmixin.py | 128 - .../helpers/reachfrequencypredictionmixin.py | 44 - .../adobjects/highdemandperiod.py | 154 - ...demandperiodtimesuggestionweeklysegment.py | 43 - .../adobjects/homelisting.py | 350 -- .../facebook_business/adobjects/hotel.py | 335 -- .../facebook_business/adobjects/hotelroom.py | 121 - .../facebook_business/adobjects/idname.py | 42 - .../adobjects/igbcadspermission.py | 74 - .../facebook_business/adobjects/igcomment.py | 210 - .../adobjects/igcommentfromuser.py | 42 - .../facebook_business/adobjects/igmedia.py | 461 -- .../adobjects/igshoppingproductappeal.py | 45 - .../adobjects/igshoppingreviewstatus.py | 41 - ...igshoppingreviewstatusonsiteeligibility.py | 39 - ...oppingreviewstatusreasonwithhelpmessage.py | 41 - .../facebook_business/adobjects/iguser.py | 833 --- ...igvideocopyrightcheckmatchesinformation.py | 39 - .../adobjects/igvideocopyrightcheckstatus.py | 39 - .../adobjects/imagecopyright.py | 391 -- .../adobjects/insightsresult.py | 84 - .../adobjects/insightsvalue.py | 55 - .../adobjects/instagramcarousel.py | 152 - .../adobjects/instagramcomment.py | 209 - .../adobjects/instagraminsightsresult.py | 108 - .../adobjects/instagraminsightsvalue.py | 39 - .../adobjects/instagrammedia.py | 162 - .../instagramshoppingmerchantreviewmessage.py | 39 - .../adobjects/instagramuser.py | 246 - .../adobjects/instagramvideometadata.py | 41 - .../facebook_business/adobjects/iosapplink.py | 41 - .../facebook_business/adobjects/jobopening.py | 148 - .../facebook_business/adobjects/keyvalue.py | 39 - .../facebook_business/adobjects/lead.py | 141 - .../leadgenappointmentbookinginfo.py | 41 - .../adobjects/leadgenappointmentslotsbyday.py | 39 - .../adobjects/leadgenappointmenttimeslot.py | 39 - ...leadgenconditionalquestionsgroupchoices.py | 41 - ...adgenconditionalquestionsgroupquestions.py | 41 - .../adobjects/leadgencontextcard.py | 50 - .../adobjects/leadgencustomdisclaimer.py | 41 - .../adobjects/leadgencustomdisclaimerbody.py | 39 - .../adobjects/leadgendraftquestion.py | 51 - .../adobjects/leadgenform.py | 288 - .../adobjects/leadgenlegalcontent.py | 44 - .../adobjects/leadgenlegalcontentcheckbox.py | 48 - .../leadgenpostsubmissioncheckresult.py | 41 - .../adobjects/leadgenprivacypolicy.py | 39 - .../adobjects/leadgenquestion.py | 56 - .../adobjects/leadgenquestionoption.py | 39 - .../adobjects/leadgenthankyoupage.py | 60 - .../adobjects/leadgenurlentityatranges.py | 41 - .../facebook_business/adobjects/lifeevent.py | 115 - .../facebook_business/adobjects/link.py | 168 - .../facebook_business/adobjects/livevideo.py | 577 -- .../adobjects/livevideoadbreakconfig.py | 55 - .../adobjects/livevideoerror.py | 78 - .../adobjects/livevideoinputstream.py | 85 - .../livevideorecommendedencodersettings.py | 41 - .../adobjects/livevideotargeting.py | 43 - .../adobjects/localservicebusiness.py | 212 - .../facebook_business/adobjects/location.py | 61 - .../adobjects/lookalikespec.py | 59 - .../adobjects/mailingaddress.py | 84 - .../adobjects/managedpartnerbusiness.py | 49 - .../adobjects/managedpartnerextendedcredit.py | 44 - .../adobjects/mediafingerprint.py | 124 - .../facebook_business/adobjects/mediatitle.py | 295 - .../adobjects/messagingfeaturereview.py | 39 - .../adobjects/messagingfeaturestatus.py | 41 - .../messengeradspartialautomatedsteplist.py | 112 - .../adobjects/messengerprofile.py | 55 - .../adobjects/minimumbudget.py | 50 - .../adobjects/musicvideocopyright.py | 96 - .../facebook_business/adobjects/nullnode.py | 36 - .../adobjects/objectparser.py | 103 - .../adobjects/offlineconversiondataset.py | 665 --- .../offlineconversiondatasetpermissions.py | 43 - .../offlineconversiondatasetupload.py | 171 - .../offlineconversiondatasetusage.py | 37 - .../adobjects/offsitepixel.py | 86 - .../adobjects/omegacustomertrx.py | 143 - .../adobjects/openbridgeconfiguration.py | 163 - .../adobjects/opengraphcontext.py | 70 - .../adobjects/outcomepredictionpoint.py | 43 - .../facebook_business/adobjects/page.py | 5273 ----------------- .../adobjects/pageaboutstorycomposedblock.py | 45 - ...pageaboutstorycomposedblockentityranges.py | 41 - .../pageaboutstorycomposedblockinlinestyle.py | 41 - .../adobjects/pagecalltoaction.py | 265 - .../adobjects/pagecategory.py | 46 - .../adobjects/pagechangeproposal.py | 50 - .../adobjects/pagecommerceeligibility.py | 39 - .../adobjects/pageparking.py | 41 - .../adobjects/pagepaymentoptions.py | 45 - .../facebook_business/adobjects/pagepost.py | 703 --- .../adobjects/pagepostexperiment.py | 174 - .../adobjects/pagerestaurantservices.py | 55 - .../adobjects/pagerestaurantspecialties.py | 45 - .../adobjects/pagesavedfilter.py | 82 - .../adobjects/pagesettings.py | 39 - .../adobjects/pagestartinfo.py | 39 - .../adobjects/pagethreadowner.py | 37 - .../adobjects/pageupcomingchange.py | 80 - .../adobjects/pageusermessagethreadlabel.py | 164 - .../adobjects/partnerstudy.py | 104 - .../adobjects/paymentenginepayment.py | 180 - .../adobjects/paymentpricepoints.py | 37 - .../adobjects/paymentsubscription.py | 116 - .../facebook_business/adobjects/permission.py | 45 - .../facebook_business/adobjects/persona.py | 104 - .../facebook_business/adobjects/photo.py | 397 -- .../facebook_business/adobjects/place.py | 76 - .../facebook_business/adobjects/placetopic.py | 91 - .../adobjects/platformimagesource.py | 41 - .../adobjects/playablecontent.py | 94 - .../facebook_business/adobjects/post.py | 719 --- .../facebook_business/adobjects/privacy.py | 47 - .../adobjects/privateliftstudyinstance.py | 132 - .../adobjects/productcatalog.py | 1982 ------- .../adobjects/productcatalogcategory.py | 70 - .../adobjects/productcatalogdatasource.py | 54 - .../productcatalogdiagnosticgroup.py | 127 - .../productcataloghotelroomsbatch.py | 43 - .../adobjects/productcatalogimagesettings.py | 39 - .../productcatalogimagesettingsoperation.py | 37 - .../productcatalogpricingvariablesbatch.py | 43 - .../productcatalogproductsetsbatch.py | 43 - .../adobjects/producteventstat.py | 85 - .../adobjects/productfeed.py | 814 --- .../productfeedmissingfeeditemreplacement.py | 41 - .../adobjects/productfeedrule.py | 145 - .../adobjects/productfeedrulesuggestion.py | 41 - .../adobjects/productfeedschedule.py | 95 - .../adobjects/productfeedupload.py | 170 - .../adobjects/productfeeduploaderror.py | 166 - .../adobjects/productfeeduploaderrorreport.py | 39 - .../adobjects/productfeeduploaderrorsample.py | 74 - .../adobjects/productgroup.py | 286 - .../adobjects/productimage.py | 76 - .../adobjects/productitem.py | 1187 ---- .../adobjects/productitemcommerceinsights.py | 41 - .../adobjects/productitemerror.py | 43 - .../adobjects/productitemimporteraddress.py | 47 - .../adobjects/productitemlocalinfo.py | 86 - .../productitemlocalinfolatlongshape.py | 39 - .../facebook_business/adobjects/productset.py | 470 -- .../adobjects/productsetmetadata.py | 43 - .../adobjects/productvariant.py | 41 - .../facebook_business/adobjects/profile.py | 149 - .../adobjects/profilepicturesource.py | 59 - .../adobjects/publisherblocklist.py | 224 - .../adobjects/rawcustomaudience.py | 42 - .../adobjects/reachfrequencyactivity.py | 47 - .../adobjects/reachfrequencyadformat.py | 39 - ...reachfrequencycurvelowerconfidencerange.py | 47 - ...reachfrequencycurveupperconfidencerange.py | 47 - .../adobjects/reachfrequencydaypart.py | 41 - .../adobjects/reachfrequencyestimatescurve.py | 51 - ...achfrequencyestimatesplacementbreakdown.py | 67 - .../adobjects/reachfrequencyprediction.py | 323 - .../adobjects/reachfrequencyspec.py | 51 - .../adobjects/recommendation.py | 51 - .../adobjects/revsharepolicy.py | 39 - .../adobjects/richmediaelement.py | 41 - .../adobjects/rtbdynamicpost.py | 159 - .../adobjects/savedaudience.py | 100 - .../adobjects/savedmessageresponse.py | 80 - .../adobjects/securitysettings.py | 36 - .../adobjects/serverside/__init__.py | 19 - .../adobjects/serverside/action_source.py | 71 - .../adobjects/serverside/app_data.py | 253 - .../adobjects/serverside/batch_processor.py | 69 - .../adobjects/serverside/content.py | 268 - .../adobjects/serverside/custom_data.py | 556 -- .../adobjects/serverside/delivery_category.py | 39 - .../adobjects/serverside/event.py | 517 -- .../adobjects/serverside/event_request.py | 363 -- .../serverside/event_request_async.py | 114 - .../adobjects/serverside/event_response.py | 154 - .../serverside/extended_device_info.py | 323 - .../adobjects/serverside/gender.py | 26 - .../adobjects/serverside/http_method.py | 25 - .../serverside/http_service_interface.py | 26 - .../adobjects/serverside/messaging_channel.py | 32 - .../adobjects/serverside/normalize.py | 203 - .../adobjects/serverside/request_options.py | 30 - .../adobjects/serverside/user_data.py | 1209 ---- .../adobjects/serverside/util.py | 49 - .../adobjects/shadowighashtag.py | 136 - .../adobjects/shadowigmediabuilder.py | 76 - .../adobjects/shadowigmediacollaborators.py | 44 - .../adobjects/shadowigmediaproducttags.py | 57 - .../shadowigusercatalogproductsearch.py | 51 - .../shadowigusercatalogproductvariant.py | 39 - .../facebook_business/adobjects/shop.py | 82 - .../adobjects/splittestwinner.py | 41 - .../adobjects/storecatalogsettings.py | 112 - .../facebook_business/adobjects/stories.py | 52 - .../facebook_business/adobjects/systemuser.py | 238 - .../facebook_business/adobjects/tab.py | 58 - .../facebook_business/adobjects/targeting.py | 229 - .../adobjects/targetingautomation.py | 41 - .../adobjects/targetingdynamicrule.py | 51 - .../adobjects/targetinggeolocation.py | 75 - .../adobjects/targetinggeolocationcity.py | 49 - .../targetinggeolocationcustomlocation.py | 63 - .../targetinggeolocationelectoraldistrict.py | 45 - .../targetinggeolocationgeoentities.py | 45 - .../targetinggeolocationlocationcluster.py | 37 - .../targetinggeolocationlocationexpansion.py | 37 - .../adobjects/targetinggeolocationmarket.py | 43 - .../adobjects/targetinggeolocationplace.py | 53 - .../targetinggeolocationpoliticaldistrict.py | 43 - .../adobjects/targetinggeolocationregion.py | 41 - .../adobjects/targetinggeolocationzip.py | 45 - .../adobjects/targetingproductaudiencespec.py | 41 - .../targetingproductaudiencesubspec.py | 39 - .../adobjects/targetingprospectingaudience.py | 37 - .../adobjects/targetingrelaxation.py | 39 - .../adobjects/targetingsearch.py | 85 - .../adobjects/targetingsentenceline.py | 49 - .../adobjects/textwithentities.py | 37 - .../trackingandconversionwithdefaults.py | 43 - .../adobjects/unifiedthread.py | 142 - .../facebook_business/adobjects/url.py | 120 - .../facebook_business/adobjects/user.py | 2237 ------- .../adobjects/useravailablecatalogs.py | 43 - .../adobjects/usercoverphoto.py | 41 - .../facebook_business/adobjects/userdevice.py | 39 - .../adobjects/useridforapp.py | 42 - .../adobjects/useridforpage.py | 42 - .../userleadgendisclaimerresponse.py | 39 - .../adobjects/userleadgenfielddata.py | 39 - .../userpageonetimeoptintokensettings.py | 90 - .../adobjects/userpaymentmobilepricepoints.py | 43 - .../adobjects/valuebasedeligiblesource.py | 44 - .../facebook_business/adobjects/vehicle.py | 435 -- .../adobjects/vehicleoffer.py | 264 - .../adobjects/videocopyright.py | 185 - .../adobjects/videocopyrightcheckstatus.py | 39 - .../adobjects/videocopyrightconditiongroup.py | 41 - .../adobjects/videocopyrightgeogate.py | 39 - .../adobjects/videocopyrightrule.py | 88 - .../adobjects/videocopyrightsegment.py | 41 - .../facebook_business/adobjects/videolist.py | 117 - .../facebook_business/adobjects/videopoll.py | 162 - .../adobjects/videostatus.py | 47 - .../adobjects/videostatuserror.py | 39 - .../adobjects/videostatusprocessingphase.py | 39 - .../adobjects/videostatuspublishingphase.py | 43 - .../adobjects/videostatusuploadingphase.py | 43 - .../adobjects/videothumbnail.py | 57 - .../adobjects/videouploadlimits.py | 39 - .../facebook_business/adobjects/voipinfo.py | 49 - .../facebook_business/adobjects/webapplink.py | 39 - .../adobjects/whatsappbusinessaccount.py | 1095 ---- .../adobjects/whatsappbusinesshealthstatus.py | 48 - ...tsappbusinesshealthstatusformessagesend.py | 39 - ...nesspartnerclientverificationsubmission.py | 52 - .../whatsappbusinesspreverifiedphonenumber.py | 214 - .../adobjects/whatsappbusinessprofile.py | 104 - .../adobjects/windowsapplink.py | 43 - .../adobjects/windowsphoneapplink.py | 41 - .../woodhengepurchasedpaygreceipt.py | 76 - .../adobjects/workuserfrontline.py | 39 - tap_facebook/facebook_business/api.py | 921 --- tap_facebook/facebook_business/apiconfig.py | 11 - tap_facebook/facebook_business/bootstrap.py | 92 - .../facebook_business/crashreporter.py | 122 - tap_facebook/facebook_business/exceptions.py | 153 - tap_facebook/facebook_business/exit_codes.py | 12 - .../facebook_business/fb_ca_chain_bundle.crt | 3188 ---------- tap_facebook/facebook_business/mixins.py | 202 - tap_facebook/facebook_business/session.py | 72 - tap_facebook/facebook_business/specs.py | 65 - .../facebook_business/test/__init__.py | 1 - tap_facebook/facebook_business/test/docs.py | 702 --- .../facebook_business/test/docs_utils.py | 273 - .../facebook_business/test/integration_ad.py | 286 - .../test/integration_adaccount.py | 385 -- .../test/integration_adcreative.py | 225 - .../test/integration_adset.py | 205 - .../test/integration_campaign.py | 232 - .../test/integration_constant.py | 288 - .../test/integration_test_runner.py | 68 - .../test/integration_utils.py | 56 - .../facebook_business/test/other_docs.py | 75 - tap_facebook/facebook_business/test/unit.py | 465 -- tap_facebook/facebook_business/typechecker.py | 205 - .../facebook_business/utils/__init__.py | 0 .../facebook_business/utils/api_utils.py | 16 - tap_facebook/facebook_business/utils/urls.py | 31 - .../facebook_business/utils/version.py | 30 - .../facebook_business/video_uploader.py | 397 -- 575 files changed, 49 insertions(+), 92332 deletions(-) delete mode 100644 tap_facebook/facebook_business/__init__.py delete mode 100644 tap_facebook/facebook_business/adobjects/__init__.py delete mode 100644 tap_facebook/facebook_business/adobjects/abstractcrudobject.py delete mode 100644 tap_facebook/facebook_business/adobjects/abstractobject.py delete mode 100644 tap_facebook/facebook_business/adobjects/ad.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccount.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountadruleshistory.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountadvolume.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountbusinessconstraints.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountdefaultdestination.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountdefaultobjective.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountdeliveryestimate.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountdsarecommendations.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountmaxbid.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountpromotableobjects.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountreachestimate.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountsubscribedapps.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccounttargetingunified.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccounttrackingdata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adaccountuser.py delete mode 100644 tap_facebook/facebook_business/adobjects/adactivity.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetbody.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetcalltoactiontype.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetdescription.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedadditionaldata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecassetlabel.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecbody.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeccalltoaction.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeccaption.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeccarousel.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecdescription.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecevents.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecgrouprule.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecimage.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspeclinkurl.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspectitle.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetfeedspecvideo.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetimage.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetlinkurl.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetmessageextensions.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetonsitedestinations.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassettargetruletargeting.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassettitle.py delete mode 100644 tap_facebook/facebook_business/adobjects/adassetvideo.py delete mode 100644 tap_facebook/facebook_business/adobjects/adasyncrequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/adasyncrequestset.py delete mode 100644 tap_facebook/facebook_business/adobjects/adasyncrequestsetnotificationresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/adbidadjustments.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcampaignbidconstraint.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcampaigndeliveryestimate.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcampaignissuesinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcampaignlearningstageinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcampaignoptimizationevent.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcampaignpacedbidinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreative.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeaddisclaimer.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativebrandedcontentads.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativebrandedcontentadspartners.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativedegreesoffreedomspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativefacebookbrandedcontent.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativefeaturedetails.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativefeaturesspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeinsights.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdataapplinkspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoaction.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatachildattachment.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeobjectstoryspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeomnichannellinkspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativephotodata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativephotodatamediaelements.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeplacedata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeplatformcustomization.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativeportraitcustomizations.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativepostclickconfiguration.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativepromotionmetadataspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativerecommendersettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativesitelinksspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativesourcingspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativestaticfallbackspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativetemplateurlspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativetextdata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcreativevideodata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adcustomizationrulespec.py delete mode 100644 tap_facebook/facebook_business/adobjects/addynamiccreative.py delete mode 100644 tap_facebook/facebook_business/adobjects/adentitytargetspend.py delete mode 100644 tap_facebook/facebook_business/adobjects/adgroupissuesinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/adgroupmetadata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py delete mode 100644 tap_facebook/facebook_business/adobjects/adgroupreviewfeedback.py delete mode 100644 tap_facebook/facebook_business/adobjects/adimage.py delete mode 100644 tap_facebook/facebook_business/adobjects/adkeywords.py delete mode 100644 tap_facebook/facebook_business/adobjects/adlabel.py delete mode 100644 tap_facebook/facebook_business/adobjects/admonetizationproperty.py delete mode 100644 tap_facebook/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/adplacement.py delete mode 100644 tap_facebook/facebook_business/adobjects/adplacepageset.py delete mode 100644 tap_facebook/facebook_business/adobjects/adplacepagesetmetadata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adpreview.py delete mode 100644 tap_facebook/facebook_business/adobjects/adpromotedobject.py delete mode 100644 tap_facebook/facebook_business/adobjects/adrecommendation.py delete mode 100644 tap_facebook/facebook_business/adobjects/adrecommendationdata.py delete mode 100644 tap_facebook/facebook_business/adobjects/adreportrun.py delete mode 100644 tap_facebook/facebook_business/adobjects/adrule.py delete mode 100644 tap_facebook/facebook_business/adobjects/adruleevaluationspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adruleexecutionoptions.py delete mode 100644 tap_facebook/facebook_business/adobjects/adruleexecutionspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adrulefilters.py delete mode 100644 tap_facebook/facebook_business/adobjects/adrulehistory.py delete mode 100644 tap_facebook/facebook_business/adobjects/adrulehistoryresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/adrulehistoryresultaction.py delete mode 100644 tap_facebook/facebook_business/adobjects/adruleschedule.py delete mode 100644 tap_facebook/facebook_business/adobjects/adruleschedulespec.py delete mode 100644 tap_facebook/facebook_business/adobjects/adruletrigger.py delete mode 100644 tap_facebook/facebook_business/adobjects/adsactionstats.py delete mode 100644 tap_facebook/facebook_business/adobjects/adset.py delete mode 100644 tap_facebook/facebook_business/adobjects/adshistogramstats.py delete mode 100644 tap_facebook/facebook_business/adobjects/adsimagecrops.py delete mode 100644 tap_facebook/facebook_business/adobjects/adsinsights.py delete mode 100644 tap_facebook/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py delete mode 100644 tap_facebook/facebook_business/adobjects/adspixel.py delete mode 100644 tap_facebook/facebook_business/adobjects/adspixelstats.py delete mode 100644 tap_facebook/facebook_business/adobjects/adspixelstatsresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/adstudy.py delete mode 100644 tap_facebook/facebook_business/adobjects/adstudycell.py delete mode 100644 tap_facebook/facebook_business/adobjects/adstudyobjective.py delete mode 100644 tap_facebook/facebook_business/adobjects/adstudyobjectiveid.py delete mode 100644 tap_facebook/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py delete mode 100644 tap_facebook/facebook_business/adobjects/advideo.py delete mode 100644 tap_facebook/facebook_business/adobjects/agencyclientdeclaration.py delete mode 100644 tap_facebook/facebook_business/adobjects/agerange.py delete mode 100644 tap_facebook/facebook_business/adobjects/album.py delete mode 100644 tap_facebook/facebook_business/adobjects/analyticssegment.py delete mode 100644 tap_facebook/facebook_business/adobjects/androidapplink.py delete mode 100644 tap_facebook/facebook_business/adobjects/application.py delete mode 100644 tap_facebook/facebook_business/adobjects/apprequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/apprequestformerrecipient.py delete mode 100644 tap_facebook/facebook_business/adobjects/assigneduser.py delete mode 100644 tap_facebook/facebook_business/adobjects/asyncrequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/asyncsession.py delete mode 100644 tap_facebook/facebook_business/adobjects/attributionspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/audiencepermissionforactions.py delete mode 100644 tap_facebook/facebook_business/adobjects/audiocopyright.py delete mode 100644 tap_facebook/facebook_business/adobjects/automotivemodel.py delete mode 100644 tap_facebook/facebook_business/adobjects/avatar.py delete mode 100644 tap_facebook/facebook_business/adobjects/avatarprofilepicture.py delete mode 100644 tap_facebook/facebook_business/adobjects/brandedcontentshadowigmediaid.py delete mode 100644 tap_facebook/facebook_business/adobjects/brandedcontentshadowiguserid.py delete mode 100644 tap_facebook/facebook_business/adobjects/brandrequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/brandsafetyblocklistusage.py delete mode 100644 tap_facebook/facebook_business/adobjects/broadtargetingcategories.py delete mode 100644 tap_facebook/facebook_business/adobjects/business.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessadaccountrequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessapplicationrequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessassetgroup.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessassetsharingagreement.py delete mode 100644 tap_facebook/facebook_business/adobjects/businesscreativefolder.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessimage.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessmanagedpartnereligibility.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/businesspagerequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/businesspartnerpremiumoptions.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessrolerequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessuser.py delete mode 100644 tap_facebook/facebook_business/adobjects/businessvideo.py delete mode 100644 tap_facebook/facebook_business/adobjects/campaign.py delete mode 100644 tap_facebook/facebook_business/adobjects/campaigngroupbrandconfiguration.py delete mode 100644 tap_facebook/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/canvas.py delete mode 100644 tap_facebook/facebook_business/adobjects/canvasadsettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/canvasbodyelement.py delete mode 100644 tap_facebook/facebook_business/adobjects/canvascollectionthumbnail.py delete mode 100644 tap_facebook/facebook_business/adobjects/canvasdynamicsetting.py delete mode 100644 tap_facebook/facebook_business/adobjects/canvaspreview.py delete mode 100644 tap_facebook/facebook_business/adobjects/catalogbasedtargeting.py delete mode 100644 tap_facebook/facebook_business/adobjects/catalogitemappealstatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/catalogitemapplinks.py delete mode 100644 tap_facebook/facebook_business/adobjects/catalogitemchannelstointegritystatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py delete mode 100644 tap_facebook/facebook_business/adobjects/catalogsubverticallist.py delete mode 100644 tap_facebook/facebook_business/adobjects/chatplugin.py delete mode 100644 tap_facebook/facebook_business/adobjects/checkbatchrequeststatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/childevent.py delete mode 100644 tap_facebook/facebook_business/adobjects/clicktrackingtag.py delete mode 100644 tap_facebook/facebook_business/adobjects/cloudgame.py delete mode 100644 tap_facebook/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py delete mode 100644 tap_facebook/facebook_business/adobjects/collaborativeadssharesettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/comment.py delete mode 100644 tap_facebook/facebook_business/adobjects/commercemerchantsettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/commercemerchantsettingssetupstatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/commerceorder.py delete mode 100644 tap_facebook/facebook_business/adobjects/commerceordertransactiondetail.py delete mode 100644 tap_facebook/facebook_business/adobjects/commercepayout.py delete mode 100644 tap_facebook/facebook_business/adobjects/commercesettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/connectionstargeting.py delete mode 100644 tap_facebook/facebook_business/adobjects/contentpublishinglimitresponse.py delete mode 100644 tap_facebook/facebook_business/adobjects/contextualbundlingspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/conversionactionquery.py delete mode 100644 tap_facebook/facebook_business/adobjects/copyrightreferencecontainer.py delete mode 100644 tap_facebook/facebook_business/adobjects/coverphoto.py delete mode 100644 tap_facebook/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py delete mode 100644 tap_facebook/facebook_business/adobjects/cpasbusinesssetupconfig.py delete mode 100644 tap_facebook/facebook_business/adobjects/cpascollaborationrequest.py delete mode 100644 tap_facebook/facebook_business/adobjects/cpasmerchantconfig.py delete mode 100644 tap_facebook/facebook_business/adobjects/creativehistory.py delete mode 100644 tap_facebook/facebook_business/adobjects/creditcard.py delete mode 100644 tap_facebook/facebook_business/adobjects/creditpartitionactionoptions.py delete mode 100644 tap_facebook/facebook_business/adobjects/crmaddress.py delete mode 100644 tap_facebook/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py delete mode 100644 tap_facebook/facebook_business/adobjects/currency.py delete mode 100644 tap_facebook/facebook_business/adobjects/currencyamount.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudience.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudienceadaccount.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudiencedatasource.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudiencegroup.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudiencesalts.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudiencesession.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudiencesharedaccountinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudiencesharingstatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudiencestatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/customaudiencestos.py delete mode 100644 tap_facebook/facebook_business/adobjects/customconversion.py delete mode 100644 tap_facebook/facebook_business/adobjects/customconversionstatsresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/customusersettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/dacheck.py delete mode 100644 tap_facebook/facebook_business/adobjects/dataset.py delete mode 100644 tap_facebook/facebook_business/adobjects/daypart.py delete mode 100644 tap_facebook/facebook_business/adobjects/deliverycheck.py delete mode 100644 tap_facebook/facebook_business/adobjects/deliverycheckextrainfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/deliverywindow.py delete mode 100644 tap_facebook/facebook_business/adobjects/destination.py delete mode 100644 tap_facebook/facebook_business/adobjects/dynamicpostchildattachment.py delete mode 100644 tap_facebook/facebook_business/adobjects/dynamicpriceconfigbydate.py delete mode 100644 tap_facebook/facebook_business/adobjects/dynamicvideometadata.py delete mode 100644 tap_facebook/facebook_business/adobjects/engagement.py delete mode 100644 tap_facebook/facebook_business/adobjects/entityattextrange.py delete mode 100644 tap_facebook/facebook_business/adobjects/event.py delete mode 100644 tap_facebook/facebook_business/adobjects/eventsourcegroup.py delete mode 100644 tap_facebook/facebook_business/adobjects/experience.py delete mode 100644 tap_facebook/facebook_business/adobjects/extendedcredit.py delete mode 100644 tap_facebook/facebook_business/adobjects/extendedcreditallocationconfig.py delete mode 100644 tap_facebook/facebook_business/adobjects/extendedcreditinvoicegroup.py delete mode 100644 tap_facebook/facebook_business/adobjects/externaleventsource.py delete mode 100644 tap_facebook/facebook_business/adobjects/fameexportconfig.py delete mode 100644 tap_facebook/facebook_business/adobjects/flexibletargeting.py delete mode 100644 tap_facebook/facebook_business/adobjects/flight.py delete mode 100644 tap_facebook/facebook_business/adobjects/fundingsourcedetails.py delete mode 100644 tap_facebook/facebook_business/adobjects/fundingsourcedetailscoupon.py delete mode 100644 tap_facebook/facebook_business/adobjects/fundraiserpersontocharity.py delete mode 100644 tap_facebook/facebook_business/adobjects/group.py delete mode 100644 tap_facebook/facebook_business/adobjects/hasleadaccess.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/__init__.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/adaccountmixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/adaccountusermixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/adimagemixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/adpreviewmixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/adreportrunmixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/adsinsightsmixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/businessmixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/customaudiencemixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/productcatalogmixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py delete mode 100644 tap_facebook/facebook_business/adobjects/highdemandperiod.py delete mode 100644 tap_facebook/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py delete mode 100644 tap_facebook/facebook_business/adobjects/homelisting.py delete mode 100644 tap_facebook/facebook_business/adobjects/hotel.py delete mode 100644 tap_facebook/facebook_business/adobjects/hotelroom.py delete mode 100644 tap_facebook/facebook_business/adobjects/idname.py delete mode 100644 tap_facebook/facebook_business/adobjects/igbcadspermission.py delete mode 100644 tap_facebook/facebook_business/adobjects/igcomment.py delete mode 100644 tap_facebook/facebook_business/adobjects/igcommentfromuser.py delete mode 100644 tap_facebook/facebook_business/adobjects/igmedia.py delete mode 100644 tap_facebook/facebook_business/adobjects/igshoppingproductappeal.py delete mode 100644 tap_facebook/facebook_business/adobjects/igshoppingreviewstatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py delete mode 100644 tap_facebook/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py delete mode 100644 tap_facebook/facebook_business/adobjects/iguser.py delete mode 100644 tap_facebook/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py delete mode 100644 tap_facebook/facebook_business/adobjects/igvideocopyrightcheckstatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/imagecopyright.py delete mode 100644 tap_facebook/facebook_business/adobjects/insightsresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/insightsvalue.py delete mode 100644 tap_facebook/facebook_business/adobjects/instagramcarousel.py delete mode 100644 tap_facebook/facebook_business/adobjects/instagramcomment.py delete mode 100644 tap_facebook/facebook_business/adobjects/instagraminsightsresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/instagraminsightsvalue.py delete mode 100644 tap_facebook/facebook_business/adobjects/instagrammedia.py delete mode 100644 tap_facebook/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py delete mode 100644 tap_facebook/facebook_business/adobjects/instagramuser.py delete mode 100644 tap_facebook/facebook_business/adobjects/instagramvideometadata.py delete mode 100644 tap_facebook/facebook_business/adobjects/iosapplink.py delete mode 100644 tap_facebook/facebook_business/adobjects/jobopening.py delete mode 100644 tap_facebook/facebook_business/adobjects/keyvalue.py delete mode 100644 tap_facebook/facebook_business/adobjects/lead.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenappointmentbookinginfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenappointmentslotsbyday.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenappointmenttimeslot.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgencontextcard.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgencustomdisclaimer.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgencustomdisclaimerbody.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgendraftquestion.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenform.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenlegalcontent.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenlegalcontentcheckbox.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenprivacypolicy.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenquestion.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenquestionoption.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenthankyoupage.py delete mode 100644 tap_facebook/facebook_business/adobjects/leadgenurlentityatranges.py delete mode 100644 tap_facebook/facebook_business/adobjects/lifeevent.py delete mode 100644 tap_facebook/facebook_business/adobjects/link.py delete mode 100644 tap_facebook/facebook_business/adobjects/livevideo.py delete mode 100644 tap_facebook/facebook_business/adobjects/livevideoadbreakconfig.py delete mode 100644 tap_facebook/facebook_business/adobjects/livevideoerror.py delete mode 100644 tap_facebook/facebook_business/adobjects/livevideoinputstream.py delete mode 100644 tap_facebook/facebook_business/adobjects/livevideorecommendedencodersettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/livevideotargeting.py delete mode 100644 tap_facebook/facebook_business/adobjects/localservicebusiness.py delete mode 100644 tap_facebook/facebook_business/adobjects/location.py delete mode 100644 tap_facebook/facebook_business/adobjects/lookalikespec.py delete mode 100644 tap_facebook/facebook_business/adobjects/mailingaddress.py delete mode 100644 tap_facebook/facebook_business/adobjects/managedpartnerbusiness.py delete mode 100644 tap_facebook/facebook_business/adobjects/managedpartnerextendedcredit.py delete mode 100644 tap_facebook/facebook_business/adobjects/mediafingerprint.py delete mode 100644 tap_facebook/facebook_business/adobjects/mediatitle.py delete mode 100644 tap_facebook/facebook_business/adobjects/messagingfeaturereview.py delete mode 100644 tap_facebook/facebook_business/adobjects/messagingfeaturestatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/messengeradspartialautomatedsteplist.py delete mode 100644 tap_facebook/facebook_business/adobjects/messengerprofile.py delete mode 100644 tap_facebook/facebook_business/adobjects/minimumbudget.py delete mode 100644 tap_facebook/facebook_business/adobjects/musicvideocopyright.py delete mode 100644 tap_facebook/facebook_business/adobjects/nullnode.py delete mode 100644 tap_facebook/facebook_business/adobjects/objectparser.py delete mode 100644 tap_facebook/facebook_business/adobjects/offlineconversiondataset.py delete mode 100644 tap_facebook/facebook_business/adobjects/offlineconversiondatasetpermissions.py delete mode 100644 tap_facebook/facebook_business/adobjects/offlineconversiondatasetupload.py delete mode 100644 tap_facebook/facebook_business/adobjects/offlineconversiondatasetusage.py delete mode 100644 tap_facebook/facebook_business/adobjects/offsitepixel.py delete mode 100644 tap_facebook/facebook_business/adobjects/omegacustomertrx.py delete mode 100644 tap_facebook/facebook_business/adobjects/openbridgeconfiguration.py delete mode 100644 tap_facebook/facebook_business/adobjects/opengraphcontext.py delete mode 100644 tap_facebook/facebook_business/adobjects/outcomepredictionpoint.py delete mode 100644 tap_facebook/facebook_business/adobjects/page.py delete mode 100644 tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblock.py delete mode 100644 tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py delete mode 100644 tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagecalltoaction.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagecategory.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagechangeproposal.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagecommerceeligibility.py delete mode 100644 tap_facebook/facebook_business/adobjects/pageparking.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagepaymentoptions.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagepost.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagepostexperiment.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagerestaurantservices.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagerestaurantspecialties.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagesavedfilter.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagesettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagestartinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/pagethreadowner.py delete mode 100644 tap_facebook/facebook_business/adobjects/pageupcomingchange.py delete mode 100644 tap_facebook/facebook_business/adobjects/pageusermessagethreadlabel.py delete mode 100644 tap_facebook/facebook_business/adobjects/partnerstudy.py delete mode 100644 tap_facebook/facebook_business/adobjects/paymentenginepayment.py delete mode 100644 tap_facebook/facebook_business/adobjects/paymentpricepoints.py delete mode 100644 tap_facebook/facebook_business/adobjects/paymentsubscription.py delete mode 100644 tap_facebook/facebook_business/adobjects/permission.py delete mode 100644 tap_facebook/facebook_business/adobjects/persona.py delete mode 100644 tap_facebook/facebook_business/adobjects/photo.py delete mode 100644 tap_facebook/facebook_business/adobjects/place.py delete mode 100644 tap_facebook/facebook_business/adobjects/placetopic.py delete mode 100644 tap_facebook/facebook_business/adobjects/platformimagesource.py delete mode 100644 tap_facebook/facebook_business/adobjects/playablecontent.py delete mode 100644 tap_facebook/facebook_business/adobjects/post.py delete mode 100644 tap_facebook/facebook_business/adobjects/privacy.py delete mode 100644 tap_facebook/facebook_business/adobjects/privateliftstudyinstance.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcatalog.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcatalogcategory.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcatalogdatasource.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcatalogdiagnosticgroup.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcataloghotelroomsbatch.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcatalogimagesettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcatalogimagesettingsoperation.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcatalogpricingvariablesbatch.py delete mode 100644 tap_facebook/facebook_business/adobjects/productcatalogproductsetsbatch.py delete mode 100644 tap_facebook/facebook_business/adobjects/producteventstat.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeed.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeedrule.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeedrulesuggestion.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeedschedule.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeedupload.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeeduploaderror.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeeduploaderrorreport.py delete mode 100644 tap_facebook/facebook_business/adobjects/productfeeduploaderrorsample.py delete mode 100644 tap_facebook/facebook_business/adobjects/productgroup.py delete mode 100644 tap_facebook/facebook_business/adobjects/productimage.py delete mode 100644 tap_facebook/facebook_business/adobjects/productitem.py delete mode 100644 tap_facebook/facebook_business/adobjects/productitemcommerceinsights.py delete mode 100644 tap_facebook/facebook_business/adobjects/productitemerror.py delete mode 100644 tap_facebook/facebook_business/adobjects/productitemimporteraddress.py delete mode 100644 tap_facebook/facebook_business/adobjects/productitemlocalinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/productitemlocalinfolatlongshape.py delete mode 100644 tap_facebook/facebook_business/adobjects/productset.py delete mode 100644 tap_facebook/facebook_business/adobjects/productsetmetadata.py delete mode 100644 tap_facebook/facebook_business/adobjects/productvariant.py delete mode 100644 tap_facebook/facebook_business/adobjects/profile.py delete mode 100644 tap_facebook/facebook_business/adobjects/profilepicturesource.py delete mode 100644 tap_facebook/facebook_business/adobjects/publisherblocklist.py delete mode 100644 tap_facebook/facebook_business/adobjects/rawcustomaudience.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyactivity.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyadformat.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencydaypart.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyestimatescurve.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyprediction.py delete mode 100644 tap_facebook/facebook_business/adobjects/reachfrequencyspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/recommendation.py delete mode 100644 tap_facebook/facebook_business/adobjects/revsharepolicy.py delete mode 100644 tap_facebook/facebook_business/adobjects/richmediaelement.py delete mode 100644 tap_facebook/facebook_business/adobjects/rtbdynamicpost.py delete mode 100644 tap_facebook/facebook_business/adobjects/savedaudience.py delete mode 100644 tap_facebook/facebook_business/adobjects/savedmessageresponse.py delete mode 100644 tap_facebook/facebook_business/adobjects/securitysettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/__init__.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/action_source.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/app_data.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/batch_processor.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/content.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/custom_data.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/delivery_category.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/event.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/event_request.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/event_request_async.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/event_response.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/extended_device_info.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/gender.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/http_method.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/http_service_interface.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/messaging_channel.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/normalize.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/request_options.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/user_data.py delete mode 100644 tap_facebook/facebook_business/adobjects/serverside/util.py delete mode 100644 tap_facebook/facebook_business/adobjects/shadowighashtag.py delete mode 100644 tap_facebook/facebook_business/adobjects/shadowigmediabuilder.py delete mode 100644 tap_facebook/facebook_business/adobjects/shadowigmediacollaborators.py delete mode 100644 tap_facebook/facebook_business/adobjects/shadowigmediaproducttags.py delete mode 100644 tap_facebook/facebook_business/adobjects/shadowigusercatalogproductsearch.py delete mode 100644 tap_facebook/facebook_business/adobjects/shadowigusercatalogproductvariant.py delete mode 100644 tap_facebook/facebook_business/adobjects/shop.py delete mode 100644 tap_facebook/facebook_business/adobjects/splittestwinner.py delete mode 100644 tap_facebook/facebook_business/adobjects/storecatalogsettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/stories.py delete mode 100644 tap_facebook/facebook_business/adobjects/systemuser.py delete mode 100644 tap_facebook/facebook_business/adobjects/tab.py delete mode 100644 tap_facebook/facebook_business/adobjects/targeting.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetingautomation.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetingdynamicrule.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocation.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationcity.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationcustomlocation.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationgeoentities.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationlocationcluster.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationlocationexpansion.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationmarket.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationplace.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationregion.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetinggeolocationzip.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetingproductaudiencespec.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetingproductaudiencesubspec.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetingprospectingaudience.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetingrelaxation.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetingsearch.py delete mode 100644 tap_facebook/facebook_business/adobjects/targetingsentenceline.py delete mode 100644 tap_facebook/facebook_business/adobjects/textwithentities.py delete mode 100644 tap_facebook/facebook_business/adobjects/trackingandconversionwithdefaults.py delete mode 100644 tap_facebook/facebook_business/adobjects/unifiedthread.py delete mode 100644 tap_facebook/facebook_business/adobjects/url.py delete mode 100644 tap_facebook/facebook_business/adobjects/user.py delete mode 100644 tap_facebook/facebook_business/adobjects/useravailablecatalogs.py delete mode 100644 tap_facebook/facebook_business/adobjects/usercoverphoto.py delete mode 100644 tap_facebook/facebook_business/adobjects/userdevice.py delete mode 100644 tap_facebook/facebook_business/adobjects/useridforapp.py delete mode 100644 tap_facebook/facebook_business/adobjects/useridforpage.py delete mode 100644 tap_facebook/facebook_business/adobjects/userleadgendisclaimerresponse.py delete mode 100644 tap_facebook/facebook_business/adobjects/userleadgenfielddata.py delete mode 100644 tap_facebook/facebook_business/adobjects/userpageonetimeoptintokensettings.py delete mode 100644 tap_facebook/facebook_business/adobjects/userpaymentmobilepricepoints.py delete mode 100644 tap_facebook/facebook_business/adobjects/valuebasedeligiblesource.py delete mode 100644 tap_facebook/facebook_business/adobjects/vehicle.py delete mode 100644 tap_facebook/facebook_business/adobjects/vehicleoffer.py delete mode 100644 tap_facebook/facebook_business/adobjects/videocopyright.py delete mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightcheckstatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightconditiongroup.py delete mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightgeogate.py delete mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightrule.py delete mode 100644 tap_facebook/facebook_business/adobjects/videocopyrightsegment.py delete mode 100644 tap_facebook/facebook_business/adobjects/videolist.py delete mode 100644 tap_facebook/facebook_business/adobjects/videopoll.py delete mode 100644 tap_facebook/facebook_business/adobjects/videostatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/videostatuserror.py delete mode 100644 tap_facebook/facebook_business/adobjects/videostatusprocessingphase.py delete mode 100644 tap_facebook/facebook_business/adobjects/videostatuspublishingphase.py delete mode 100644 tap_facebook/facebook_business/adobjects/videostatusuploadingphase.py delete mode 100644 tap_facebook/facebook_business/adobjects/videothumbnail.py delete mode 100644 tap_facebook/facebook_business/adobjects/videouploadlimits.py delete mode 100644 tap_facebook/facebook_business/adobjects/voipinfo.py delete mode 100644 tap_facebook/facebook_business/adobjects/webapplink.py delete mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinessaccount.py delete mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatus.py delete mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py delete mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py delete mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py delete mode 100644 tap_facebook/facebook_business/adobjects/whatsappbusinessprofile.py delete mode 100644 tap_facebook/facebook_business/adobjects/windowsapplink.py delete mode 100644 tap_facebook/facebook_business/adobjects/windowsphoneapplink.py delete mode 100644 tap_facebook/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py delete mode 100644 tap_facebook/facebook_business/adobjects/workuserfrontline.py delete mode 100644 tap_facebook/facebook_business/api.py delete mode 100644 tap_facebook/facebook_business/apiconfig.py delete mode 100644 tap_facebook/facebook_business/bootstrap.py delete mode 100644 tap_facebook/facebook_business/crashreporter.py delete mode 100644 tap_facebook/facebook_business/exceptions.py delete mode 100644 tap_facebook/facebook_business/exit_codes.py delete mode 100644 tap_facebook/facebook_business/fb_ca_chain_bundle.crt delete mode 100644 tap_facebook/facebook_business/mixins.py delete mode 100644 tap_facebook/facebook_business/session.py delete mode 100644 tap_facebook/facebook_business/specs.py delete mode 100644 tap_facebook/facebook_business/test/__init__.py delete mode 100644 tap_facebook/facebook_business/test/docs.py delete mode 100644 tap_facebook/facebook_business/test/docs_utils.py delete mode 100644 tap_facebook/facebook_business/test/integration_ad.py delete mode 100644 tap_facebook/facebook_business/test/integration_adaccount.py delete mode 100644 tap_facebook/facebook_business/test/integration_adcreative.py delete mode 100644 tap_facebook/facebook_business/test/integration_adset.py delete mode 100644 tap_facebook/facebook_business/test/integration_campaign.py delete mode 100644 tap_facebook/facebook_business/test/integration_constant.py delete mode 100644 tap_facebook/facebook_business/test/integration_test_runner.py delete mode 100644 tap_facebook/facebook_business/test/integration_utils.py delete mode 100644 tap_facebook/facebook_business/test/other_docs.py delete mode 100644 tap_facebook/facebook_business/test/unit.py delete mode 100644 tap_facebook/facebook_business/typechecker.py delete mode 100644 tap_facebook/facebook_business/utils/__init__.py delete mode 100644 tap_facebook/facebook_business/utils/api_utils.py delete mode 100644 tap_facebook/facebook_business/utils/urls.py delete mode 100644 tap_facebook/facebook_business/utils/version.py delete mode 100644 tap_facebook/facebook_business/video_uploader.py diff --git a/setup.py b/setup.py index 4e9051d..81f3da8 100755 --- a/setup.py +++ b/setup.py @@ -12,6 +12,7 @@ install_requires=[ 'attrs==17.3.0', 'backoff==2.2.1', + 'facebook_business==19.0.2', 'pendulum==1.2.0', 'requests==2.20.0', 'singer-python==6.0.0', diff --git a/tap_facebook/__init__.py b/tap_facebook/__init__.py index 95c56c2..bf8ec2b 100755 --- a/tap_facebook/__init__.py +++ b/tap_facebook/__init__.py @@ -15,8 +15,8 @@ import backoff import sys -sys.path.append('/opt/code/tap-facebook/tap_facebook/') +import re import singer import singer.metrics as metrics from singer import utils, metadata @@ -90,6 +90,53 @@ CONFIG = {} +def retry_on_summary_param_error(backoff_type, exception, **wait_gen_kwargs): + """ + At times, the Facebook Graph API exhibits erratic behavior, + triggering errors related to the Summary parameter with a status code of 400. + However, upon retrying, the API functions as expected. + """ + def log_retry_attempt(details): + _, exception, _ = sys.exc_info() + LOGGER.info("Retrying the API call to fix Summary param error") + + def should_retry_api_error(exception): + + # Define the regular expression pattern + pattern = r'\(#100\) Cannot include [\w, ]+ in summary param because they weren\'t there while creating the report run(?:\. All available values are: )?' + if isinstance(exception, FacebookRequestError): + return (exception.http_status()==400 and re.match(pattern, exception._error['message'])) + return False + + return backoff.on_exception( + backoff_type, + exception, + jitter=None, + on_backoff=log_retry_attempt, + giveup=lambda exc: not should_retry_api_error(exc), + **wait_gen_kwargs + ) + +original_call = FacebookAdsApi.call + +@retry_on_summary_param_error(backoff.expo, (FacebookRequestError), max_tries=5, factor=5) +def call_with_retry(self, method, path, params=None, headers=None, files=None, url_override=None, api_version=None,): + """ + Adding the retry decorator on the original function call + """ + return original_call( + self, + method, + path, + params, + headers, + files, + url_override, + api_version,) + +FacebookAdsApi.call = call_with_retry + + class TapFacebookException(Exception): pass diff --git a/tap_facebook/facebook_business/__init__.py b/tap_facebook/facebook_business/__init__.py deleted file mode 100644 index 382ec4e..0000000 --- a/tap_facebook/facebook_business/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# 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__ = '19.0.2' -__all__ = [ - 'session', - 'objects', - 'api', -] diff --git a/tap_facebook/facebook_business/adobjects/__init__.py b/tap_facebook/facebook_business/adobjects/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tap_facebook/facebook_business/adobjects/abstractcrudobject.py b/tap_facebook/facebook_business/adobjects/abstractcrudobject.py deleted file mode 100644 index 01b7f2e..0000000 --- a/tap_facebook/facebook_business/adobjects/abstractcrudobject.py +++ /dev/null @@ -1,639 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# 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.api import ( - FacebookAdsApi, - Cursor, - FacebookRequest, -) - -from facebook_business.adobjects.abstractobject import AbstractObject -from facebook_business.adobjects.objectparser import ObjectParser - -import logging - -class AbstractCrudObject(AbstractObject): - """ - Extends AbstractObject and implements methods to create, read, update, - and delete. - Attributes: - parent_id: The object's parent's id. (default None) - api: The api instance associated with this object. (default None) - """ - - def __init__(self, fbid=None, parent_id=None, api=None): - """Initializes a CRUD object. - Args: - fbid (optional): The id of the object ont the Graph. - parent_id (optional): The id of the object's parent. - api (optional): An api object which all calls will go through. If - an api object is not specified, api calls will revert to going - through the default api. - """ - super(AbstractCrudObject, self).__init__() - - self._api = api or FacebookAdsApi.get_default_api() - self._changes = {} - if (parent_id is not None): - warning_message = "parent_id as a parameter of constructor is " \ - "being deprecated." - logging.warning(warning_message) - self._parent_id = parent_id - self._data['id'] = fbid - self._include_summary = True - - def __setitem__(self, key, value): - """Sets an item in this CRUD object while maintaining a changelog.""" - - if key not in self._data or self._data[key] != value: - self._changes[key] = value - super(AbstractCrudObject, self).__setitem__(key, value) - if '_setitem_trigger' in dir(self): - self._setitem_trigger(key, value) - - return self - - def __delitem__(self, key): - del self._data[key] - self._changes.pop(key, None) - - def __eq__(self, other): - """Two objects are the same if they have the same fbid.""" - return ( - # Same class - isinstance(other, self.__class__) and - - # Both have id's - self.get_id() and other.get_id() and - - # Both have same id - self.get_id() == other.get_id() - ) - - def __ne__(self, other): - return not self.__eq__(other) - - @classmethod - def get_by_ids(cls, ids, params=None, fields=None, api=None): - api = api or FacebookAdsApi.get_default_api() - params = dict(params or {}) - cls._assign_fields_to_params(fields, params) - params['ids'] = ','.join(map(str, ids)) - response = api.call( - 'GET', - ['/'], - params=params, - ) - result = [] - for fbid, data in response.json().items(): - obj = cls(fbid, api=api) - obj._set_data(data) - result.append(obj) - return result - - # Getters - - def get_id(self): - """Returns the object's fbid if set. Else, it returns None.""" - return self[self.Field.id] if hasattr(self, 'Field') and hasattr(self.Field, 'Field') else self['id'] - - # @deprecated deprecate parent_id in AbstractCrudObject - def get_parent_id(self): - warning_message = "parent_id is being deprecated." - logging.warning(warning_message) - """Returns the object's parent's id.""" - return self._parent_id or FacebookAdsApi.get_default_account_id() - - def get_api(self): - """ - Returns the api associated with the object. - """ - return self._api - - def get_id_assured(self): - """Returns the fbid of the object. - Raises: - FacebookBadObjectError if the object does not have an id. - """ - if not self.get(self.Field.id): - raise FacebookBadObjectError( - "%s object needs an id for this operation." - % self.__class__.__name__, - ) - - return self.get_id() - - # @deprecated deprecate parent_id in AbstractCrudObject - def get_parent_id_assured(self): - """Returns the object's parent's fbid. - Raises: - FacebookBadObjectError if the object does not have a parent id. - """ - warning_message = "parent_id is being deprecated." - logging.warning(warning_message) - if not self.get_parent_id(): - raise FacebookBadObjectError( - "%s object needs a parent_id for this operation." - % self.__class__.__name__, - ) - - return self.get_parent_id() - - def get_api_assured(self): - """Returns the fbid of the object. - Raises: - FacebookBadObjectError if get_api returns None. - """ - api = self.get_api() - if not api: - raise FacebookBadObjectError( - "%s does not yet have an associated api object.\n" - "Did you forget to instantiate an API session with: " - "FacebookAdsApi.init(app_id, app_secret, access_token)" - % self.__class__.__name__, - ) - - return api - - # Data management - - def _clear_history(self): - self._changes = {} - if 'filename' in self._data: - del self._data['filename'] - return self - - def _set_data(self, data): - """ - Sets object's data as if it were read from the server. - Warning: Does not log changes. - """ - for key in map(str, data): - self[key] = data[key] - - # clear history due to the update - self._changes.pop(key, None) - self._json = data - return self - - def export_changed_data(self): - """ - Returns a dictionary of property names mapped to their values for - properties modified from their original values. - """ - return self.export_value(self._changes) - - def export_data(self): - """ - Deprecated. Use export_all_data() or export_changed_data() instead. - """ - return self.export_changed_data() - - # CRUD Helpers - - def clear_id(self): - """Clears the object's fbid.""" - del self[self.Field.id] - return self - - def get_node_path(self): - """Returns the node's relative path as a tuple of tokens.""" - return (self.get_id_assured(),) - - def get_node_path_string(self): - """Returns the node's path as a tuple.""" - return '/'.join(self.get_node_path()) - - # CRUD - # @deprecated - # use Object(parent_id).create_xxx() instead - def remote_create( - self, - batch=None, - failure=None, - files=None, - params=None, - success=None, - api_version=None, - ): - """Creates the object by calling the API. - Args: - batch (optional): A FacebookAdsApiBatch object. If specified, - the call will be added to the batch. - params (optional): A mapping of request parameters where a key - is the parameter name and its value is a string or an object - which can be JSON-encoded. - files (optional): An optional mapping of file names to binary open - file objects. These files will be attached to the request. - success (optional): A callback function which will be called with - the FacebookResponse of this call if the call succeeded. - failure (optional): A callback function which will be called with - the FacebookResponse of this call if the call failed. - Returns: - self if not a batch call. - the return value of batch.add if a batch call. - """ - warning_message = "`remote_create` is being deprecated, please update your code with new function." - logging.warning(warning_message) - if self.get_id(): - raise FacebookBadObjectError( - "This %s object was already created." - % self.__class__.__name__, - ) - if not 'get_endpoint' in dir(self): - raise TypeError('Cannot create object of type %s.' - % self.__class__.__name__) - - params = {} if not params else params.copy() - params.update(self.export_all_data()) - request = None - if hasattr(self, 'api_create'): - request = self.api_create(self.get_parent_id_assured(), pending=True) - else: - request = FacebookRequest( - node_id=self.get_parent_id_assured(), - method='POST', - endpoint=self.get_endpoint(), - api=self._api, - target_class=self.__class__, - response_parser=ObjectParser( - reuse_object=self - ), - ) - request.add_params(params) - request.add_files(files) - - if batch is not None: - - def callback_success(response): - self._set_data(response.json()) - self._clear_history() - - if success: - success(response) - - def callback_failure(response): - if failure: - failure(response) - - return batch.add_request( - request=request, - success=callback_success, - failure=callback_failure, - ) - else: - response = request.execute() - self._set_data(response._json) - self._clear_history() - - return self - - # @deprecated - # use Object(id).api_get() instead - def remote_read( - self, - batch=None, - failure=None, - fields=None, - params=None, - success=None, - api_version=None, - ): - """Reads the object by calling the API. - Args: - batch (optional): A FacebookAdsApiBatch object. If specified, - the call will be added to the batch. - fields (optional): A list of fields to read. - params (optional): A mapping of request parameters where a key - is the parameter name and its value is a string or an object - which can be JSON-encoded. - files (optional): An optional mapping of file names to binary open - file objects. These files will be attached to the request. - success (optional): A callback function which will be called with - the FacebookResponse of this call if the call succeeded. - failure (optional): A callback function which will be called with - the FacebookResponse of this call if the call failed. - Returns: - self if not a batch call. - the return value of batch.add if a batch call. - """ - warning_message = "`remote_read` is being deprecated, please update your code with new function." - logging.warning(warning_message) - params = dict(params or {}) - if hasattr(self, 'api_get'): - request = self.api_get(pending=True) - else: - request = FacebookRequest( - node_id=self.get_id_assured(), - method='GET', - endpoint='/', - api=self._api, - target_class=self.__class__, - response_parser=ObjectParser( - reuse_object=self - ), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - def callback_success(response): - self._set_data(response.json()) - - if success: - success(response) - - def callback_failure(response): - if failure: - failure(response) - - batch_call = batch.add_request( - request=request, - success=callback_success, - failure=callback_failure, - ) - return batch_call - else: - self = request.execute() - return self - - # @deprecated - # use Object(id).api_update() instead - def remote_update( - self, - batch=None, - failure=None, - files=None, - params=None, - success=None, - api_version=None, - ): - """Updates the object by calling the API with only the changes recorded. - Args: - batch (optional): A FacebookAdsApiBatch object. If specified, - the call will be added to the batch. - params (optional): A mapping of request parameters where a key - is the parameter name and its value is a string or an object - which can be JSON-encoded. - files (optional): An optional mapping of file names to binary open - file objects. These files will be attached to the request. - success (optional): A callback function which will be called with - the FacebookResponse of this call if the call succeeded. - failure (optional): A callback function which will be called with - the FacebookResponse of this call if the call failed. - Returns: - self if not a batch call. - the return value of batch.add if a batch call. - """ - warning_message = "`remote_update` is being deprecated, please update your code with new function." - logging.warning(warning_message) - params = {} if not params else params.copy() - params.update(self.export_changed_data()) - self._set_data(params) - if hasattr(self, 'api_update'): - request = self.api_update(pending=True) - else: - request = FacebookRequest( - node_id=self.get_id_assured(), - method='POST', - endpoint='/', - api=self._api, - target_class=self.__class__, - response_parser=ObjectParser( - reuse_object=self - ), - ) - request.add_params(params) - request.add_files(files) - - if batch is not None: - def callback_success(response): - self._clear_history() - - if success: - success(response) - - def callback_failure(response): - if failure: - failure(response) - - batch_call = batch.add_request( - request=request, - success=callback_success, - failure=callback_failure, - ) - return batch_call - else: - request.execute() - self._clear_history() - - return self - - # @deprecated - # use Object(id).api_delete() instead - def remote_delete( - self, - batch=None, - failure=None, - params=None, - success=None, - api_version=None, - ): - """Deletes the object by calling the API with the DELETE http method. - Args: - batch (optional): A FacebookAdsApiBatch object. If specified, - the call will be added to the batch. - params (optional): A mapping of request parameters where a key - is the parameter name and its value is a string or an object - which can be JSON-encoded. - success (optional): A callback function which will be called with - the FacebookResponse of this call if the call succeeded. - failure (optional): A callback function which will be called with - the FacebookResponse of this call if the call failed. - Returns: - self if not a batch call. - the return value of batch.add if a batch call. - """ - warning_message = "`remote_delete` is being deprecated, please update your code with new function." - logging.warning(warning_message) - if hasattr(self, 'api_delete'): - request = self.api_delete(pending=True) - else: - request = FacebookRequest( - node_id=self.get_id_assured(), - method='DELETE', - endpoint='/', - api=self._api, - ) - request.add_params(params) - if batch is not None: - def callback_success(response): - self.clear_id() - - if success: - success(response) - - def callback_failure(response): - if failure: - failure(response) - - batch_call = batch.add_request( - request=request, - success=callback_success, - failure=callback_failure, - ) - return batch_call - else: - request.execute() - self.clear_id() - - return self - - # Helpers - - # @deprecated - def remote_save(self, *args, **kwargs): - """ - Calls remote_create method if object has not been created. Else, calls - the remote_update method. - """ - warning_message = "`remote_save` is being deprecated, please update your code with new function." - logging.warning(warning_message) - if self.get_id(): - return self.remote_update(*args, **kwargs) - else: - return self.remote_create(*args, **kwargs) - - def remote_archive( - self, - batch=None, - failure=None, - success=None - ): - if 'Status' not in dir(self) or 'archived' not in dir(self.Status): - raise TypeError('Cannot archive object of type %s.' - % self.__class__.__name__) - return self.api_create( - params={ - 'status': self.Status.archived, - }, - batch=batch, - failure=failure, - success=success, - ) - - # @deprecated - save = remote_save - - def iterate_edge( - self, - target_objects_class, - fields=None, - params=None, - fetch_first_page=True, - include_summary=True, - endpoint=None - ): - """ - Returns Cursor with argument self as source_object and - the rest as given __init__ arguments. - Note: list(iterate_edge(...)) can prefetch all the objects. - """ - source_object = self - cursor = Cursor( - source_object, - target_objects_class, - fields=fields, - params=params, - include_summary=include_summary, - endpoint=endpoint, - ) - if fetch_first_page: - cursor.load_next_page() - return cursor - - def iterate_edge_async(self, target_objects_class, fields=None, - params=None, is_async=False, include_summary=True, - endpoint=None): - from facebook_business.adobjects.adreportrun import AdReportRun - """ - Behaves as iterate_edge(...) if parameter is_async if False - (Default value) - If is_async is True: - Returns an AsyncJob which can be checked using remote_read() - to verify when the job is completed and the result ready to query - or download using get_result() - Example: - >>> job = object.iterate_edge_async( - TargetClass, fields, params, is_async=True) - >>> time.sleep(10) - >>> job.remote_read() - >>> if job: - result = job.read_result() - print result - """ - synchronous = not is_async - synchronous_iterator = self.iterate_edge( - target_objects_class, - fields, - params, - fetch_first_page=synchronous, - include_summary=include_summary, - ) - if synchronous: - return synchronous_iterator - - if not params: - params = {} - else: - params = dict(params) - self.__class__._assign_fields_to_params(fields, params) - - # To force an async response from an edge, do a POST instead of GET. - # The response comes in the format of an AsyncJob which - # indicates the progress of the async request. - if endpoint is None: - endpoint = target_objects_class.get_endpoint() - response = self.get_api_assured().call( - 'POST', - (self.get_id_assured(), endpoint), - params=params, - ).json() - - # AsyncJob stores the real iterator - # for when the result is ready to be queried - result = AdReportRun() - - if 'report_run_id' in response: - response['id'] = response['report_run_id'] - result._set_data(response) - return result - - def edge_object(self, target_objects_class, fields=None, params=None, endpoint=None): - """ - Returns first object when iterating over Cursor with argument - self as source_object and the rest as given __init__ arguments. - """ - params = {} if not params else params.copy() - params['limit'] = '1' - for obj in self.iterate_edge( - target_objects_class, - fields=fields, - params=params, - endpoint=endpoint, - ): - return obj - - # if nothing found, return None - return None - - def assure_call(self): - if not self._api: - raise FacebookBadObjectError( - 'Api call cannot be made if api is not set') diff --git a/tap_facebook/facebook_business/adobjects/abstractobject.py b/tap_facebook/facebook_business/adobjects/abstractobject.py deleted file mode 100644 index f1070af..0000000 --- a/tap_facebook/facebook_business/adobjects/abstractobject.py +++ /dev/null @@ -1,160 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# 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.typechecker import TypeChecker - -try: - # Since python 3 - import collections.abc as collections_abc -except ImportError: - # Won't work after python 3.8 - import collections as collections_abc - -import json - -class AbstractObject(collections_abc.MutableMapping): - - """ - Represents an abstract object (may or may not have explicitly be a node of - the Graph) as a MutableMapping of its data. - """ - - _default_read_fields = [] - _field_types = {} - - class Field: - pass - - def __init__(self): - self._data = {} - self._field_checker = TypeChecker(self._field_types, - self._get_field_enum_info()) - - def __getitem__(self, key): - return self._data[str(key)] - - def __setitem__(self, key, value): - if key.startswith('_'): - self.__setattr__(key, value) - else: - self._data[key] = self._field_checker.get_typed_value(key, value) - return self - - def __eq__(self, other): - return other is not None and hasattr(other, 'export_all_data') and \ - self.export_all_data() == other.export_all_data() - - def __delitem__(self, key): - del self._data[key] - - def __iter__(self): - return iter(self._data) - - def __len__(self): - return len(self._data) - - def __contains__(self, key): - return key in self._data - - def __unicode__(self): - return unicode(self._data) - - def __repr__(self): - return "<%s> %s" % ( - self.__class__.__name__, - json.dumps( - self.export_value(self._data), - sort_keys=True, - indent=4, - separators=(',', ': '), - ), - ) - - #reads in data from json object - def _set_data(self, data): - if hasattr(data, 'items'): - for key, value in data.items(): - self[key] = value - else: - raise FacebookBadObjectError("Bad data to set object data") - self._json = data - - @classmethod - def _get_field_enum_info(cls): - """Returns info for fields that use enum values - Should be implemented in subclasses - """ - return {} - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - """Returns the endpoint name. - Raises: - NotImplementedError if the method is not implemented in a class - that derives from this abstract class. - """ - raise NotImplementedError( - "%s must have implemented get_endpoint." % cls.__name__, - ) - - @classmethod - def get_default_read_fields(cls): - """Returns the class's list of default fields to read.""" - return cls._default_read_fields - - @classmethod - def set_default_read_fields(cls, fields): - """Sets the class's list of default fields to read. - Args: - fields: list of field names to read by default without specifying - them explicitly during a read operation either via EdgeIterator - or via AbstractCrudObject.read. - """ - cls._default_read_fields = fields - - @classmethod - def _assign_fields_to_params(cls, fields, params): - """Applies fields to params in a consistent manner.""" - if fields is None: - fields = cls.get_default_read_fields() - if fields: - params['fields'] = ','.join(fields) - - def set_data(self, data): - """ - For an AbstractObject, we do not need to keep history. - """ - self._set_data(data) - - def export_value(self, data): - if isinstance(data, AbstractObject): - data = data.export_all_data() - elif isinstance(data, dict): - data = dict((k, self.export_value(v)) - for k, v in data.items() - if v is not None) - elif isinstance(data, list): - data = [self.export_value(v) for v in data] - return data - - def export_data(self): - """ - Deprecated. Use export_all_data() instead. - """ - return self.export_all_data() - - def export_all_data(self): - return self.export_value(self._data) - - @classmethod - def create_object(cls, api, data, target_class): - new_object = target_class(api=api) - new_object._set_data(data) - return new_object diff --git a/tap_facebook/facebook_business/adobjects/ad.py b/tap_facebook/facebook_business/adobjects/ad.py deleted file mode 100644 index f392b10..0000000 --- a/tap_facebook/facebook_business/adobjects/ad.py +++ /dev/null @@ -1,753 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.mixins import HasAdLabels - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Ad( - AbstractCrudObject, - HasAdLabels, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAd = True - super(Ad, self).__init__(fbid, parent_id, api) - - 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' - bid_amount = 'bid_amount' - bid_info = 'bid_info' - bid_type = 'bid_type' - campaign = 'campaign' - campaign_id = 'campaign_id' - configured_status = 'configured_status' - conversion_domain = 'conversion_domain' - conversion_specs = 'conversion_specs' - created_time = 'created_time' - creative = 'creative' - demolink_hash = 'demolink_hash' - display_sequence = 'display_sequence' - effective_status = 'effective_status' - engagement_audience = 'engagement_audience' - failed_delivery_checks = 'failed_delivery_checks' - id = 'id' - issues_info = 'issues_info' - last_updated_by_app_id = 'last_updated_by_app_id' - name = 'name' - preview_shareable_link = 'preview_shareable_link' - priority = 'priority' - recommendations = 'recommendations' - source_ad = 'source_ad' - source_ad_id = 'source_ad_id' - status = 'status' - targeting = 'targeting' - tracking_and_conversion_with_defaults = 'tracking_and_conversion_with_defaults' - tracking_specs = 'tracking_specs' - updated_time = 'updated_time' - adset_spec = 'adset_spec' - audience_id = 'audience_id' - date_format = 'date_format' - draft_adgroup_id = 'draft_adgroup_id' - execution_options = 'execution_options' - include_demolink_hashes = 'include_demolink_hashes' - filename = 'filename' - - class BidType: - absolute_ocpm = 'ABSOLUTE_OCPM' - cpa = 'CPA' - cpc = 'CPC' - cpm = 'CPM' - multi_premium = 'MULTI_PREMIUM' - - class ConfiguredStatus: - active = 'ACTIVE' - archived = 'ARCHIVED' - deleted = 'DELETED' - paused = 'PAUSED' - - class EffectiveStatus: - active = 'ACTIVE' - adset_paused = 'ADSET_PAUSED' - archived = 'ARCHIVED' - campaign_paused = 'CAMPAIGN_PAUSED' - deleted = 'DELETED' - disapproved = 'DISAPPROVED' - in_process = 'IN_PROCESS' - paused = 'PAUSED' - pending_billing_info = 'PENDING_BILLING_INFO' - pending_review = 'PENDING_REVIEW' - preapproved = 'PREAPPROVED' - with_issues = 'WITH_ISSUES' - - class Status: - active = 'ACTIVE' - archived = 'ARCHIVED' - deleted = 'DELETED' - 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' - - class ExecutionOptions: - include_recommendations = 'include_recommendations' - synchronous_ad_review = 'synchronous_ad_review' - validate_only = 'validate_only' - - class Operator: - all = 'ALL' - any = 'ANY' - - class StatusOption: - active = 'ACTIVE' - inherited_from_source = 'INHERITED_FROM_SOURCE' - paused = 'PAUSED' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'ads' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad(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 - if batch 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 = { - 'am_call_tags': 'map', - 'date_preset': 'date_preset_enum', - 'from_adtable': 'bool', - 'review_feedback_breakdown': 'bool', - 'time_range': 'map', - } - enums = { - 'date_preset_enum': [ - 'data_maximum', - 'last_14d', - 'last_28d', - 'last_30d', - 'last_3d', - 'last_7d', - 'last_90d', - 'last_month', - 'last_quarter', - 'last_week_mon_sun', - 'last_week_sun_sat', - 'last_year', - 'maximum', - 'this_month', - 'this_quarter', - 'this_week_mon_today', - 'this_week_sun_today', - 'this_year', - 'today', - 'yesterday', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - 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_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', - 'display_sequence': 'unsigned int', - 'draft_adgroup_id': 'string', - 'engagement_audience': 'bool', - 'execution_options': 'list', - 'include_demolink_hashes': 'bool', - 'name': 'string', - 'priority': 'unsigned int', - 'status': 'status_enum', - 'tracking_specs': 'Object', - } - enums = { - 'execution_options_enum': Ad.ExecutionOptions.__dict__.values(), - 'status_enum': Ad.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - 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_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.adcreative import AdCreative - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adcreatives', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCreative, 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'adlabels': 'list', - 'execution_options': 'list', - } - enums = { - 'execution_options_enum': Ad.ExecutionOptions.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adlabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_ad_rules_governed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adrule import AdRule - param_types = { - 'pass_evaluation': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adrules_governed', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdRule, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'time_range': 'map', - 'updated_since': 'int', - } - enums = { - 'date_preset_enum': Ad.DatePreset.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/copies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_copy(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'adset_id': 'string', - 'rename_options': 'Object', - 'status_option': 'status_option_enum', - } - enums = { - 'status_option_enum': Ad.StatusOption.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/copies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_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.adsinsights import AdsInsights - if is_async: - return self.get_insights_async(fields, params, batch, success, failure, pending) - param_types = { - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'action_report_time_enum', - 'breakdowns': 'list', - 'date_preset': 'date_preset_enum', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'level_enum', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - enums = { - 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), - 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), - 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), - 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), - 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), - 'level_enum': AdsInsights.Level.__dict__.values(), - 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdsInsights, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdsInsights, 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() - - def get_insights_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adreportrun import AdReportRun - from facebook_business.adobjects.adsinsights import AdsInsights - param_types = { - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'action_report_time_enum', - 'breakdowns': 'list', - 'date_preset': 'date_preset_enum', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'level_enum', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - enums = { - 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), - 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), - 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), - 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), - 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), - 'level_enum': AdsInsights.Level.__dict__.values(), - 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), - } - - if fields is not None: - params['fields'] = params.get('fields') if params.get('fields') is not None else list() - params['fields'].extend(field for field in fields if field not in params['fields']) - - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdReportRun, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdReportRun, api=self._api), - include_summary=False, - ) - request.add_params(params) - - if batch is 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_leads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.lead import Lead - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/leads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Lead, - api_type='EDGE', - response_parser=ObjectParser(target_class=Lead, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.adpreview import AdPreview - param_types = { - 'ad_format': 'ad_format_enum', - 'creative_feature': 'creative_feature_enum', - 'dynamic_asset_label': 'string', - 'dynamic_creative_spec': 'Object', - 'dynamic_customization': 'Object', - 'end_date': 'datetime', - 'height': 'unsigned int', - 'locale': 'string', - 'place_page_id': 'int', - 'post': 'Object', - 'product_item_ids': 'list', - 'render_type': 'render_type_enum', - 'start_date': 'datetime', - 'width': 'unsigned int', - } - enums = { - 'ad_format_enum': AdPreview.AdFormat.__dict__.values(), - 'creative_feature_enum': AdPreview.CreativeFeature.__dict__.values(), - 'render_type_enum': AdPreview.RenderType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/previews', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdPreview, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdPreview, 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_targeting_sentence_lines(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.targetingsentenceline import TargetingSentenceLine - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/targetingsentencelines', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=TargetingSentenceLine, - api_type='EDGE', - response_parser=ObjectParser(target_class=TargetingSentenceLine, 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', - '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', - 'bid_amount': 'int', - 'bid_info': 'map', - 'bid_type': 'BidType', - 'campaign': 'Campaign', - 'campaign_id': 'string', - 'configured_status': 'ConfiguredStatus', - 'conversion_domain': 'string', - 'conversion_specs': 'list', - 'created_time': 'datetime', - 'creative': 'AdCreative', - 'demolink_hash': 'string', - 'display_sequence': 'int', - 'effective_status': 'EffectiveStatus', - 'engagement_audience': 'bool', - 'failed_delivery_checks': 'list', - 'id': 'string', - 'issues_info': 'list', - 'last_updated_by_app_id': 'string', - 'name': 'string', - 'preview_shareable_link': 'string', - 'priority': 'unsigned int', - 'recommendations': 'list', - 'source_ad': 'Ad', - 'source_ad_id': 'string', - 'status': 'Status', - 'targeting': 'Targeting', - 'tracking_and_conversion_with_defaults': 'TrackingAndConversionWithDefaults', - 'tracking_specs': 'list', - 'updated_time': 'datetime', - 'adset_spec': 'AdSet', - 'audience_id': 'string', - 'date_format': 'string', - 'draft_adgroup_id': 'string', - 'execution_options': 'list', - 'include_demolink_hashes': 'bool', - 'filename': 'file' - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['BidType'] = Ad.BidType.__dict__.values() - field_enum_info['ConfiguredStatus'] = Ad.ConfiguredStatus.__dict__.values() - field_enum_info['EffectiveStatus'] = Ad.EffectiveStatus.__dict__.values() - 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['Operator'] = Ad.Operator.__dict__.values() - field_enum_info['StatusOption'] = Ad.StatusOption.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccount.py b/tap_facebook/facebook_business/adobjects/adaccount.py deleted file mode 100644 index 05a9c8e..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccount.py +++ /dev/null @@ -1,4221 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.adobjects.helpers.adaccountmixin import AdAccountMixin -from facebook_business.mixins import HasAdLabels - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccount( - AdAccountMixin, - AbstractCrudObject, - HasAdLabels, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdAccount = True - super(AdAccount, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - account_status = 'account_status' - 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' - business = 'business' - business_city = 'business_city' - business_country_code = 'business_country_code' - business_name = 'business_name' - business_state = 'business_state' - business_street = 'business_street' - business_street2 = 'business_street2' - business_zip = 'business_zip' - can_create_brand_lift_study = 'can_create_brand_lift_study' - capabilities = 'capabilities' - created_time = 'created_time' - currency = 'currency' - custom_audience_info = 'custom_audience_info' - default_dsa_beneficiary = 'default_dsa_beneficiary' - default_dsa_payor = 'default_dsa_payor' - disable_reason = 'disable_reason' - end_advertiser = 'end_advertiser' - end_advertiser_name = 'end_advertiser_name' - existing_customers = 'existing_customers' - extended_credit_invoice_group = 'extended_credit_invoice_group' - failed_delivery_checks = 'failed_delivery_checks' - fb_entity = 'fb_entity' - funding_source = 'funding_source' - funding_source_details = 'funding_source_details' - has_migrated_permissions = 'has_migrated_permissions' - has_page_authorized_adaccount = 'has_page_authorized_adaccount' - id = 'id' - io_number = 'io_number' - is_attribution_spec_system_default = 'is_attribution_spec_system_default' - is_direct_deals_enabled = 'is_direct_deals_enabled' - is_in_3ds_authorization_enabled_market = 'is_in_3ds_authorization_enabled_market' - is_notifications_enabled = 'is_notifications_enabled' - is_personal = 'is_personal' - is_prepay_account = 'is_prepay_account' - is_tax_id_required = 'is_tax_id_required' - liable_address = 'liable_address' - line_numbers = 'line_numbers' - media_agency = 'media_agency' - min_campaign_group_spend_cap = 'min_campaign_group_spend_cap' - min_daily_budget = 'min_daily_budget' - name = 'name' - offsite_pixels_tos_accepted = 'offsite_pixels_tos_accepted' - owner = 'owner' - owner_business = 'owner_business' - partner = 'partner' - rf_spec = 'rf_spec' - send_bill_to_address = 'send_bill_to_address' - show_checkout_experience = 'show_checkout_experience' - sold_to_address = 'sold_to_address' - spend_cap = 'spend_cap' - tax_id = 'tax_id' - tax_id_status = 'tax_id_status' - tax_id_type = 'tax_id_type' - timezone_id = 'timezone_id' - 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' - - class Currency: - aed = 'AED' - ars = 'ARS' - aud = 'AUD' - bdt = 'BDT' - bob = 'BOB' - brl = 'BRL' - cad = 'CAD' - chf = 'CHF' - clp = 'CLP' - cny = 'CNY' - cop = 'COP' - crc = 'CRC' - czk = 'CZK' - dkk = 'DKK' - dzd = 'DZD' - egp = 'EGP' - eur = 'EUR' - gbp = 'GBP' - gtq = 'GTQ' - hkd = 'HKD' - hnl = 'HNL' - huf = 'HUF' - idr = 'IDR' - ils = 'ILS' - inr = 'INR' - isk = 'ISK' - jpy = 'JPY' - kes = 'KES' - krw = 'KRW' - lkr = 'LKR' - mop = 'MOP' - mxn = 'MXN' - myr = 'MYR' - ngn = 'NGN' - nio = 'NIO' - nok = 'NOK' - nzd = 'NZD' - pen = 'PEN' - php = 'PHP' - pkr = 'PKR' - pln = 'PLN' - pyg = 'PYG' - qar = 'QAR' - ron = 'RON' - sar = 'SAR' - sek = 'SEK' - sgd = 'SGD' - thb = 'THB' - value_try = 'TRY' - twd = 'TWD' - uah = 'UAH' - usd = 'USD' - uyu = 'UYU' - 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' - analyze = 'ANALYZE' - draft = 'DRAFT' - manage = 'MANAGE' - - class ClaimObjective: - automotive_model = 'AUTOMOTIVE_MODEL' - collaborative_ads = 'COLLABORATIVE_ADS' - home_listing = 'HOME_LISTING' - media_title = 'MEDIA_TITLE' - product = 'PRODUCT' - travel = 'TRAVEL' - vehicle = 'VEHICLE' - vehicle_offer = 'VEHICLE_OFFER' - - class ContentType: - automotive_model = 'AUTOMOTIVE_MODEL' - destination = 'DESTINATION' - flight = 'FLIGHT' - 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' - vehicle = 'VEHICLE' - vehicle_offer = 'VEHICLE_OFFER' - - class Subtype: - app = 'APP' - bag_of_accounts = 'BAG_OF_ACCOUNTS' - bidding = 'BIDDING' - claim = 'CLAIM' - custom = 'CUSTOM' - engagement = 'ENGAGEMENT' - fox = 'FOX' - lookalike = 'LOOKALIKE' - managed = 'MANAGED' - measurement = 'MEASUREMENT' - offline_conversion = 'OFFLINE_CONVERSION' - partner = 'PARTNER' - primary = 'PRIMARY' - regulated_categories_audience = 'REGULATED_CATEGORIES_AUDIENCE' - study_rule_audience = 'STUDY_RULE_AUDIENCE' - subscriber_segment = 'SUBSCRIBER_SEGMENT' - video = 'VIDEO' - website = 'WEBSITE' - - class ActionSource: - physical_store = 'PHYSICAL_STORE' - website = 'WEBSITE' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adaccounts' - - 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=AdAccount, - 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 = { - 'agency_client_declaration': 'map', - 'attribution_spec': 'list', - 'business_info': 'map', - 'currency': 'currency_enum', - 'custom_audience_info': 'map', - 'default_dsa_beneficiary': 'string', - 'default_dsa_payor': 'string', - 'end_advertiser': 'string', - 'existing_customers': 'list', - 'is_notifications_enabled': 'bool', - 'media_agency': 'string', - 'name': 'string', - 'partner': 'string', - 'spend_cap': 'float', - 'spend_cap_action': 'string', - 'timezone_id': 'unsigned int', - 'tos_accepted': 'map', - } - enums = { - 'currency_enum': AdAccount.Currency.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccount, - 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_account_controls(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccountbusinessconstraints import AdAccountBusinessConstraints - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/account_controls', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountBusinessConstraints, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountBusinessConstraints, 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_account_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccountbusinessconstraints import AdAccountBusinessConstraints - param_types = { - 'audience_controls': 'Object', - 'placement_controls': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/account_controls', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountBusinessConstraints, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountBusinessConstraints, 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_activities(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adactivity import AdActivity - param_types = { - 'add_children': 'bool', - 'after': 'string', - 'business_id': 'string', - 'category': 'category_enum', - 'data_source': 'data_source_enum', - 'extra_oids': 'list', - 'limit': 'int', - 'oid': 'string', - 'since': 'datetime', - 'uid': 'int', - 'until': 'datetime', - } - enums = { - 'category_enum': AdActivity.Category.__dict__.values(), - 'data_source_enum': AdActivity.DataSource.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/activities', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdActivity, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdActivity, 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_ad_place_page_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.adplacepageset import AdPlacePageSet - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ad_place_page_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdPlacePageSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdPlacePageSet, 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_ad_place_page_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.adplacepageset import AdPlacePageSet - param_types = { - 'location_types': 'list', - 'name': 'string', - 'parent_page': 'string', - 'targeted_area_type': 'targeted_area_type_enum', - } - enums = { - 'location_types_enum': AdPlacePageSet.LocationTypes.__dict__.values(), - 'targeted_area_type_enum': AdPlacePageSet.TargetedAreaType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/ad_place_page_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdPlacePageSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdPlacePageSet, 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_ad_place_page_sets_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adplacepageset import AdPlacePageSet - param_types = { - 'location_types': 'list', - 'name': 'string', - 'parent_page': 'string', - 'targeted_area_type': 'targeted_area_type_enum', - } - enums = { - 'location_types_enum': AdPlacePageSet.LocationTypes.__dict__.values(), - 'targeted_area_type_enum': AdPlacePageSet.TargetedAreaType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/ad_place_page_sets_async', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdPlacePageSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdPlacePageSet, 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_ad_saved_keywords(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ad_saved_keywords', - 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_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudy import AdStudy - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ad_studies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_ad_cloud_playables(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.cloudgame import CloudGame - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adcloudplayables', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CloudGame, - api_type='EDGE', - response_parser=ObjectParser(target_class=CloudGame, 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_ad_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.adcreative import AdCreative - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adcreatives', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCreative, 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_ad_creative(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adcreative import AdCreative - param_types = { - 'actor_id': 'unsigned int', - 'adlabels': 'list', - 'applink_treatment': 'applink_treatment_enum', - 'asset_feed_spec': 'Object', - 'authorization_category': 'authorization_category_enum', - 'body': 'string', - 'branded_content': 'map', - 'branded_content_sponsor_page_id': 'string', - 'bundle_folder_id': 'string', - 'call_to_action': 'Object', - 'categorization_criteria': 'categorization_criteria_enum', - 'category_media_source': 'category_media_source_enum', - 'degrees_of_freedom_spec': 'map', - 'destination_set_id': 'string', - 'dynamic_ad_voice': 'dynamic_ad_voice_enum', - 'enable_launch_instant_app': 'bool', - 'facebook_branded_content': 'map', - 'image_crops': 'map', - 'image_file': 'string', - 'image_hash': 'string', - 'image_url': 'string', - 'instagram_actor_id': 'string', - 'instagram_branded_content': 'map', - 'instagram_permalink_url': 'string', - 'instagram_user_id': 'string', - 'interactive_components_spec': 'map', - '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', - 'object_story_spec': 'AdCreativeObjectStorySpec', - 'object_type': 'string', - 'object_url': 'string', - 'omnichannel_link_spec': 'map', - 'place_page_set_id': 'string', - 'platform_customizations': 'Object', - 'playable_asset_id': 'string', - 'portrait_customizations': 'map', - 'product_set_id': 'string', - 'recommender_settings': 'map', - 'source_instagram_media_id': 'string', - 'template_url': 'string', - 'template_url_spec': 'string', - 'thumbnail_url': 'string', - 'title': 'string', - 'url_tags': 'string', - 'use_page_actor_override': 'bool', - } - enums = { - 'applink_treatment_enum': AdCreative.ApplinkTreatment.__dict__.values(), - 'authorization_category_enum': AdCreative.AuthorizationCategory.__dict__.values(), - 'categorization_criteria_enum': AdCreative.CategorizationCriteria.__dict__.values(), - 'category_media_source_enum': AdCreative.CategoryMediaSource.__dict__.values(), - 'dynamic_ad_voice_enum': AdCreative.DynamicAdVoice.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adcreatives', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCreative, 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_ad_creatives_by_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adcreative import AdCreative - param_types = { - 'ad_label_ids': 'list', - 'operator': 'operator_enum', - } - enums = { - 'operator_enum': AdCreative.Operator.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adcreativesbylabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCreative, 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_ad_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.') - param_types = { - 'hash': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/adimages', - 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_ad_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.adimage import AdImage - param_types = { - 'biz_tag_id': 'unsigned int', - 'business_id': 'string', - 'hashes': 'list', - 'minheight': 'unsigned int', - 'minwidth': 'unsigned int', - 'name': 'string', - 'selected_hashes': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adimages', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdImage, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdImage, 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_ad_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.adimage import AdImage - param_types = { - 'bytes': 'string', - 'copy_from': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adimages', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdImage, - api_type='EDGE', - allow_file_upload=True, - response_parser=ObjectParser(target_class=AdImage, 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_ad_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adlabel import AdLabel - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adlabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdLabel, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdLabel, 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adlabel import AdLabel - param_types = { - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adlabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdLabel, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdLabel, 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_ad_playables(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.playablecontent import PlayableContent - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adplayables', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PlayableContent, - api_type='EDGE', - response_parser=ObjectParser(target_class=PlayableContent, 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_ad_playable(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.playablecontent import PlayableContent - param_types = { - 'app_id': 'string', - 'name': 'string', - 'session_id': 'string', - 'source': 'file', - 'source_url': 'string', - 'source_zip': 'file', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adplayables', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PlayableContent, - api_type='EDGE', - response_parser=ObjectParser(target_class=PlayableContent, 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_ad_rules_history(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccountadruleshistory import AdAccountAdRulesHistory - param_types = { - 'action': 'action_enum', - 'evaluation_type': 'evaluation_type_enum', - 'hide_no_changes': 'bool', - 'object_id': 'string', - } - enums = { - 'action_enum': AdAccountAdRulesHistory.Action.__dict__.values(), - 'evaluation_type_enum': AdAccountAdRulesHistory.EvaluationType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adrules_history', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountAdRulesHistory, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountAdRulesHistory, 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_ad_rules_library(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adrule import AdRule - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adrules_library', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdRule, 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_ad_rules_library(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adrule import AdRule - param_types = { - 'account_id': 'string', - 'evaluation_spec': 'Object', - 'execution_spec': 'Object', - 'name': 'string', - 'schedule_spec': 'Object', - 'status': 'status_enum', - 'ui_creation_source': 'ui_creation_source_enum', - } - enums = { - 'status_enum': AdRule.Status.__dict__.values(), - 'ui_creation_source_enum': AdRule.UiCreationSource.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adrules_library', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdRule, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.ad import Ad - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'time_range': 'map', - 'updated_since': 'int', - } - enums = { - 'date_preset_enum': Ad.DatePreset.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_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.') - 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', - 'audience_id': 'string', - 'bid_amount': 'int', - 'conversion_domain': 'string', - 'creative': 'AdCreative', - 'date_format': 'string', - 'display_sequence': 'unsigned int', - 'draft_adgroup_id': 'string', - 'engagement_audience': 'bool', - 'execution_options': 'list', - 'include_demolink_hashes': 'bool', - 'name': 'string', - 'priority': 'unsigned int', - 'source_ad_id': 'string', - 'status': 'status_enum', - 'tracking_specs': 'Object', - } - enums = { - 'execution_options_enum': Ad.ExecutionOptions.__dict__.values(), - 'status_enum': Ad.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/ads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - allow_file_upload=True, - response_parser=ObjectParser(target_class=Ad, 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.') - param_types = { - 'filtering': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads_reporting_mmm_reports', - 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_schedulers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/ads_reporting_mmm_schedulers', - 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_volume(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccountadvolume import AdAccountAdVolume - param_types = { - 'page_id': 'int', - 'recommendation_type': 'recommendation_type_enum', - 'show_breakdown_by_actor': 'bool', - } - enums = { - 'recommendation_type_enum': AdAccountAdVolume.RecommendationType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads_volume', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountAdVolume, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountAdVolume, 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_by_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.ad import Ad - param_types = { - 'ad_label_ids': 'list', - 'operator': 'operator_enum', - } - enums = { - 'operator_enum': Ad.Operator.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adsbylabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_ad_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.adset import AdSet - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'is_completed': 'bool', - 'time_range': 'map', - 'updated_since': 'int', - } - enums = { - 'date_preset_enum': AdSet.DatePreset.__dict__.values(), - 'effective_status_enum': AdSet.EffectiveStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_ad_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.adset import AdSet - param_types = { - 'adlabels': 'list', - 'adset_schedule': 'list', - 'attribution_spec': 'list', - 'bid_adjustments': 'Object', - 'bid_amount': 'int', - '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', - 'daily_budget': 'unsigned int', - 'daily_imps': 'unsigned int', - 'daily_min_spend_target': 'unsigned int', - 'daily_spend_cap': 'unsigned int', - 'date_format': 'string', - 'destination_type': 'destination_type_enum', - 'dsa_beneficiary': 'string', - 'dsa_payor': 'string', - 'end_time': 'datetime', - 'execution_options': 'list', - 'existing_customer_budget_percentage': 'unsigned int', - 'frequency_control_specs': 'list', - 'full_funnel_exploration_mode': 'full_funnel_exploration_mode_enum', - 'is_dynamic_creative': 'bool', - 'lifetime_budget': 'unsigned int', - 'lifetime_imps': 'unsigned int', - 'lifetime_min_spend_target': 'unsigned int', - 'lifetime_spend_cap': 'unsigned int', - 'line_number': 'unsigned int', - 'multi_optimization_goal_weight': 'multi_optimization_goal_weight_enum', - 'name': 'string', - 'optimization_goal': 'optimization_goal_enum', - 'optimization_sub_event': 'optimization_sub_event_enum', - 'pacing_type': 'list', - 'promoted_object': 'Object', - 'rb_prediction_id': 'string', - 'rf_prediction_id': 'string', - 'source_adset_id': 'string', - 'start_time': 'datetime', - 'status': 'status_enum', - 'targeting': 'Targeting', - 'time_based_ad_rotation_id_blocks': 'list>', - 'time_based_ad_rotation_intervals': 'list', - 'time_start': 'datetime', - 'time_stop': 'datetime', - 'topline_id': 'string', - 'tune_for_category': 'tune_for_category_enum', - } - enums = { - 'bid_strategy_enum': AdSet.BidStrategy.__dict__.values(), - 'billing_event_enum': AdSet.BillingEvent.__dict__.values(), - 'destination_type_enum': AdSet.DestinationType.__dict__.values(), - 'execution_options_enum': AdSet.ExecutionOptions.__dict__.values(), - 'full_funnel_exploration_mode_enum': AdSet.FullFunnelExplorationMode.__dict__.values(), - 'multi_optimization_goal_weight_enum': AdSet.MultiOptimizationGoalWeight.__dict__.values(), - 'optimization_goal_enum': AdSet.OptimizationGoal.__dict__.values(), - 'optimization_sub_event_enum': AdSet.OptimizationSubEvent.__dict__.values(), - 'status_enum': AdSet.Status.__dict__.values(), - 'tune_for_category_enum': AdSet.TuneForCategory.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_ad_sets_by_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adset import AdSet - param_types = { - 'ad_label_ids': 'list', - 'operator': 'operator_enum', - } - enums = { - 'operator_enum': AdSet.Operator.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adsetsbylabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'sort_by': 'sort_by_enum', - } - enums = { - 'sort_by_enum': AdsPixel.SortBy.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adspixels', - 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_ads_pixel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adspixels', - 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_advertisable_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 = { - 'app_id': 'string', - 'business_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/advertisable_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 delete_ad_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'video_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/advideos', - 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_ad_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.advideo import AdVideo - param_types = { - 'max_aspect_ratio': 'float', - 'maxheight': 'unsigned int', - 'maxlength': 'unsigned int', - 'maxwidth': 'unsigned int', - 'min_aspect_ratio': 'float', - 'minheight': 'unsigned int', - 'minlength': 'unsigned int', - 'minwidth': 'unsigned int', - 'title': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/advideos', - 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) - - if batch is 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_ad_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 = { - 'adaptive_type': 'string', - '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_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', - 'name': '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', - 'react_mode_metadata': 'string', - 'referenced_sticker_id': 'string', - 'replace_video_id': 'string', - 'slideshow_spec': 'map', - 'source': 'file', - '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', - 'video_file_chunk': 'file', - '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(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/advideos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdVideo, - api_type='EDGE', - allow_file_upload=True, - response_parser=ObjectParser(target_class=AdVideo, 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_affected_ad_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.adset import AdSet - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/affectedadsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_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): - 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='/agencies', - 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_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): - 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='/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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'user': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/assigned_users', - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.assigneduser import AssignedUser - param_types = { - 'business': 'string', - } - 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() - - def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'tasks': 'list', - 'user': 'int', - } - enums = { - 'tasks_enum': AdAccount.Tasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/assigned_users', - 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 create_async_batch_request(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.campaign import Campaign - param_types = { - 'adbatch': 'list', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/async_batch_requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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_async_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.asyncrequest import AsyncRequest - param_types = { - 'status': 'status_enum', - 'type': 'type_enum', - } - enums = { - 'status_enum': AsyncRequest.Status.__dict__.values(), - 'type_enum': AsyncRequest.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/async_requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AsyncRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=AsyncRequest, 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_async_ad_request_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.adasyncrequestset import AdAsyncRequestSet - param_types = { - 'is_completed': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/asyncadrequestsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAsyncRequestSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAsyncRequestSet, 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_async_ad_request_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.adasyncrequestset import AdAsyncRequestSet - param_types = { - 'ad_specs': 'list', - 'name': 'string', - 'notification_mode': 'notification_mode_enum', - 'notification_uri': 'string', - } - enums = { - 'notification_mode_enum': AdAsyncRequestSet.NotificationMode.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/asyncadrequestsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAsyncRequestSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAsyncRequestSet, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'publisher_urls_file': 'file', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/block_list_drafts', - 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_broad_targeting_categories(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.broadtargetingcategories import BroadTargetingCategories - param_types = { - 'custom_categories_only': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/broadtargetingcategories', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BroadTargetingCategories, - api_type='EDGE', - response_parser=ObjectParser(target_class=BroadTargetingCategories, 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_business_projects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='GET', - endpoint='/businessprojects', - 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'before_date': 'datetime', - 'delete_offset': 'unsigned int', - 'delete_strategy': 'delete_strategy_enum', - 'object_count': 'int', - } - enums = { - 'delete_strategy_enum': [ - 'DELETE_ANY', - 'DELETE_ARCHIVED_BEFORE', - 'DELETE_OLDEST', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/campaigns', - 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.campaign import Campaign - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'is_completed': 'bool', - 'time_range': 'map', - } - enums = { - 'date_preset_enum': Campaign.DatePreset.__dict__.values(), - 'effective_status_enum': Campaign.EffectiveStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/campaigns', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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_campaign(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.campaign import Campaign - param_types = { - 'adlabels': 'list', - 'bid_strategy': 'bid_strategy_enum', - 'buying_type': 'string', - 'daily_budget': 'unsigned int', - 'execution_options': 'list', - 'is_skadnetwork_attribution': 'bool', - 'iterative_split_test_configs': 'list', - 'lifetime_budget': 'unsigned int', - 'name': 'string', - 'objective': 'objective_enum', - 'pacing_type': 'list', - 'promoted_object': 'Object', - 'smart_promotion_type': 'smart_promotion_type_enum', - 'source_campaign_id': 'string', - 'special_ad_categories': 'list', - 'special_ad_category_country': 'list', - 'spend_cap': 'unsigned int', - 'start_time': 'datetime', - 'status': 'status_enum', - 'stop_time': 'datetime', - 'topline_id': 'string', - } - enums = { - 'bid_strategy_enum': Campaign.BidStrategy.__dict__.values(), - 'execution_options_enum': Campaign.ExecutionOptions.__dict__.values(), - 'objective_enum': Campaign.Objective.__dict__.values(), - 'smart_promotion_type_enum': Campaign.SmartPromotionType.__dict__.values(), - 'special_ad_categories_enum': Campaign.SpecialAdCategories.__dict__.values(), - 'special_ad_category_country_enum': Campaign.SpecialAdCategoryCountry.__dict__.values(), - 'status_enum': Campaign.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/campaigns', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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_campaigns_by_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.campaign import Campaign - param_types = { - 'ad_label_ids': 'list', - 'operator': 'operator_enum', - } - enums = { - 'operator_enum': Campaign.Operator.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/campaignsbylabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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_connected_instagram_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.iguser import IGUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/connected_instagram_accounts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGUser, - api_type='EDGE', - response_parser=ObjectParser(target_class=IGUser, 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_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/conversion_goals', - 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_custom_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.customaudience import CustomAudience - param_types = { - 'business_id': 'string', - 'fetch_primary_audience': 'bool', - 'fields': 'list', - 'filtering': 'list', - 'pixel_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/customaudiences', - 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 create_custom_audience(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customaudience import CustomAudience - param_types = { - 'allowed_domains': 'list', - 'associated_audience_id': 'unsigned int', - 'claim_objective': 'claim_objective_enum', - 'content_type': 'content_type_enum', - 'countries': 'string', - 'creation_params': 'map', - 'customer_file_source': 'customer_file_source_enum', - 'dataset_id': 'string', - 'description': 'string', - 'enable_fetch_or_create': 'bool', - 'event_source_group': 'string', - 'event_sources': 'list', - 'exclusions': 'list', - 'inclusions': 'list', - 'is_snapshot': 'bool', - 'is_value_based': 'bool', - 'list_of_accounts': 'list', - 'lookalike_spec': 'string', - 'name': 'string', - 'opt_out_link': 'string', - 'origin_audience_id': 'string', - 'parent_audience_id': 'unsigned int', - 'partner_reference_key': 'string', - 'pixel_id': 'string', - 'prefill': 'bool', - 'product_set_id': 'string', - 'regulated_audience_spec': 'string', - 'retention_days': 'unsigned int', - 'rev_share_policy_id': 'unsigned int', - 'rule': 'string', - 'rule_aggregation': 'string', - '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(), - 'content_type_enum': CustomAudience.ContentType.__dict__.values(), - 'customer_file_source_enum': CustomAudience.CustomerFileSource.__dict__.values(), - 'subtype_enum': CustomAudience.Subtype.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/customaudiences', - 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_custom_audiences_tos(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customaudiencestos import CustomAudiencesTOS - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/customaudiencestos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomAudiencesTOS, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomAudiencesTOS, 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_custom_audiences_to(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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': 'string', - 'tos_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/customaudiencestos', - 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customconversion import CustomConversion - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/customconversions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversion, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomConversion, 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_custom_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customconversion import CustomConversion - param_types = { - 'advanced_rule': 'string', - 'custom_event_type': 'custom_event_type_enum', - 'default_conversion_value': 'float', - 'description': 'string', - 'event_source_id': 'string', - 'name': 'string', - 'rule': 'string', - } - enums = { - 'custom_event_type_enum': CustomConversion.CustomEventType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/customconversions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversion, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomConversion, 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_delivery_estimate(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccountdeliveryestimate import AdAccountDeliveryEstimate - param_types = { - 'optimization_goal': 'optimization_goal_enum', - 'promoted_object': 'Object', - 'targeting_spec': 'Targeting', - } - enums = { - 'optimization_goal_enum': AdAccountDeliveryEstimate.OptimizationGoal.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/delivery_estimate', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountDeliveryEstimate, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountDeliveryEstimate, 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_deprecated_targeting_ad_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.adset import AdSet - param_types = { - 'type': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/deprecatedtargetingadsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.adpreview import AdPreview - param_types = { - 'ad_format': 'ad_format_enum', - 'creative': 'AdCreative', - 'creative_feature': 'creative_feature_enum', - 'dynamic_asset_label': 'string', - 'dynamic_creative_spec': 'Object', - 'dynamic_customization': 'Object', - 'end_date': 'datetime', - 'height': 'unsigned int', - 'locale': 'string', - 'place_page_id': 'int', - 'post': 'Object', - 'product_item_ids': 'list', - 'render_type': 'render_type_enum', - 'start_date': 'datetime', - 'width': 'unsigned int', - } - enums = { - 'ad_format_enum': AdPreview.AdFormat.__dict__.values(), - 'creative_feature_enum': AdPreview.CreativeFeature.__dict__.values(), - 'render_type_enum': AdPreview.RenderType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/generatepreviews', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdPreview, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdPreview, 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_impacting_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudy import AdStudy - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/impacting_ad_studies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_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.adsinsights import AdsInsights - if is_async: - return self.get_insights_async(fields, params, batch, success, failure, pending) - param_types = { - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'action_report_time_enum', - 'breakdowns': 'list', - 'date_preset': 'date_preset_enum', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'level_enum', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - enums = { - 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), - 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), - 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), - 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), - 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), - 'level_enum': AdsInsights.Level.__dict__.values(), - 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdsInsights, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdsInsights, 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() - - def get_insights_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adreportrun import AdReportRun - from facebook_business.adobjects.adsinsights import AdsInsights - param_types = { - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'action_report_time_enum', - 'breakdowns': 'list', - 'date_preset': 'date_preset_enum', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'level_enum', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - enums = { - 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), - 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), - 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), - 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), - 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), - 'level_enum': AdsInsights.Level.__dict__.values(), - 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), - } - - if fields is not None: - params['fields'] = params.get('fields') if params.get('fields') is not None else list() - params['fields'].extend(field for field in fields if field not in params['fields']) - - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdReportRun, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdReportRun, api=self._api), - include_summary=False, - ) - request.add_params(params) - - if batch is 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_instagram_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.instagramuser import InstagramUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/instagram_accounts', - 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_ios_fourteen_campaign_limits(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccountiosfourteencampaignlimits import AdAccountIosFourteenCampaignLimits - param_types = { - 'app_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ios_fourteen_campaign_limits', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountIosFourteenCampaignLimits, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountIosFourteenCampaignLimits, 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_managed_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.') - param_types = { - 'campaign_group_id': 'unsigned int', - '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', - 'override_targeting_countries': 'list', - 'product_set_id': 'string', - 'start_time': 'unsigned int', - 'use_marketplace_template': 'bool', - 'use_seller_template': 'bool', - } - enums = { - 'campaign_group_status_enum': [ - 'ACTIVE', - 'ADSET_PAUSED', - 'ARCHIVED', - 'CAMPAIGN_PAUSED', - 'DELETED', - 'DISAPPROVED', - 'IN_PROCESS', - 'PAUSED', - 'PENDING_BILLING_INFO', - 'PENDING_REVIEW', - 'PREAPPROVED', - 'WITH_ISSUES', - ], - 'custom_event_type_enum': [ - 'ADD_TO_CART', - 'CONTENT_VIEW', - 'PURCHASE', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/managed_partner_ads', - 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_matched_search_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.adaccountmatchedsearchapplicationsedgedata import AdAccountMatchedSearchApplicationsEdgeData - param_types = { - 'allow_incomplete_app': 'bool', - 'app_store': 'app_store_enum', - 'app_store_country': 'string', - 'business_id': 'string', - 'is_skadnetwork_search': 'bool', - 'only_apps_with_permission': 'bool', - 'query_term': 'string', - } - enums = { - 'app_store_enum': AdAccountMatchedSearchApplicationsEdgeData.AppStore.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/matched_search_applications', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountMatchedSearchApplicationsEdgeData, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountMatchedSearchApplicationsEdgeData, 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_max_bid(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccountmaxbid import AdAccountMaxBid - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/max_bid', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountMaxBid, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountMaxBid, 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_minimum_budgets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.minimumbudget import MinimumBudget - param_types = { - 'bid_amount': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/minimum_budgets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MinimumBudget, - api_type='EDGE', - response_parser=ObjectParser(target_class=MinimumBudget, 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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.businessownedobjectonbehalfofrequest import BusinessOwnedObjectOnBehalfOfRequest - param_types = { - 'status': 'status_enum', - } - enums = { - 'status_enum': BusinessOwnedObjectOnBehalfOfRequest.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/onbehalf_requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessOwnedObjectOnBehalfOfRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessOwnedObjectOnBehalfOfRequest, 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_product_audience(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customaudience import CustomAudience - param_types = { - 'allowed_domains': 'list', - 'associated_audience_id': 'unsigned int', - 'claim_objective': 'claim_objective_enum', - 'content_type': 'content_type_enum', - 'creation_params': 'map', - 'description': 'string', - 'enable_fetch_or_create': 'bool', - 'event_source_group': 'string', - 'event_sources': 'list', - 'exclusions': 'list', - 'inclusions': 'list', - 'is_snapshot': 'bool', - 'is_value_based': 'bool', - 'name': 'string', - 'opt_out_link': 'string', - 'parent_audience_id': 'unsigned int', - 'product_set_id': 'string', - 'rev_share_policy_id': 'unsigned int', - 'subtype': 'subtype_enum', - } - enums = { - 'claim_objective_enum': AdAccount.ClaimObjective.__dict__.values(), - 'content_type_enum': AdAccount.ContentType.__dict__.values(), - 'subtype_enum': AdAccount.Subtype.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/product_audiences', - 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_promote_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.') - from facebook_business.adobjects.page import Page - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/promote_pages', - 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_publisher_block_lists(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.publisherblocklist import PublisherBlockList - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/publisher_block_lists', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PublisherBlockList, - api_type='EDGE', - response_parser=ObjectParser(target_class=PublisherBlockList, 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_publisher_block_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.publisherblocklist import PublisherBlockList - param_types = { - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/publisher_block_lists', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PublisherBlockList, - api_type='EDGE', - response_parser=ObjectParser(target_class=PublisherBlockList, 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_reach_estimate(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccountreachestimate import AdAccountReachEstimate - param_types = { - 'adgroup_ids': 'list', - 'caller_id': 'string', - 'concepts': 'string', - 'creative_action_spec': 'string', - 'is_debug': 'bool', - 'object_store_url': 'string', - 'targeting_spec': 'Targeting', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/reachestimate', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountReachEstimate, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountReachEstimate, 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_reach_frequency_predictions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.reachfrequencyprediction import ReachFrequencyPrediction - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/reachfrequencypredictions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ReachFrequencyPrediction, - api_type='EDGE', - response_parser=ObjectParser(target_class=ReachFrequencyPrediction, 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_reach_frequency_prediction(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.reachfrequencyprediction import ReachFrequencyPrediction - param_types = { - 'action': 'action_enum', - 'ad_formats': 'list', - 'auction_entry_option_index': 'unsigned int', - 'budget': 'unsigned int', - 'buying_type': 'buying_type_enum', - 'campaign_group_id': 'string', - 'day_parting_schedule': 'list', - 'deal_id': 'string', - 'destination_id': 'unsigned int', - 'destination_ids': 'list', - 'end_time': 'unsigned int', - 'exceptions': 'bool', - 'existing_campaign_id': 'string', - 'expiration_time': 'unsigned int', - 'frequency_cap': 'unsigned int', - 'grp_buying': 'bool', - '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', - 'is_higher_average_frequency': 'bool', - 'is_reach_and_frequency_io_buying': 'bool', - 'is_reserved_buying': 'bool', - 'num_curve_points': 'unsigned int', - 'objective': 'string', - 'optimization_goal': 'string', - 'prediction_mode': 'unsigned int', - 'reach': 'unsigned int', - 'rf_prediction_id': 'string', - 'rf_prediction_id_to_release': 'string', - 'rf_prediction_id_to_share': 'string', - 'start_time': 'unsigned int', - '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', - } - enums = { - 'action_enum': ReachFrequencyPrediction.Action.__dict__.values(), - 'buying_type_enum': ReachFrequencyPrediction.BuyingType.__dict__.values(), - 'instream_packages_enum': ReachFrequencyPrediction.InstreamPackages.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/reachfrequencypredictions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ReachFrequencyPrediction, - api_type='EDGE', - response_parser=ObjectParser(target_class=ReachFrequencyPrediction, 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_saved_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.savedaudience import SavedAudience - param_types = { - 'business_id': 'string', - 'fields': 'list', - 'filtering': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/saved_audiences', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=SavedAudience, - api_type='EDGE', - response_parser=ObjectParser(target_class=SavedAudience, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'app_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/subscribed_apps', - 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_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.') - from facebook_business.adobjects.adaccountsubscribedapps import AdAccountSubscribedApps - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/subscribed_apps', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountSubscribedApps, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountSubscribedApps, 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_subscribed_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.') - from facebook_business.adobjects.adaccountsubscribedapps import AdAccountSubscribedApps - param_types = { - 'app_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/subscribed_apps', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountSubscribedApps, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountSubscribedApps, 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_targeting_browse(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccounttargetingunified import AdAccountTargetingUnified - param_types = { - 'excluded_category': 'string', - 'include_nodes': 'bool', - 'is_exclusion': 'bool', - 'limit_type': 'limit_type_enum', - 'regulated_categories': 'list', - 'regulated_countries': 'list', - 'whitelisted_types': 'list', - } - enums = { - 'limit_type_enum': AdAccountTargetingUnified.LimitType.__dict__.values(), - 'regulated_categories_enum': AdAccountTargetingUnified.RegulatedCategories.__dict__.values(), - 'regulated_countries_enum': AdAccountTargetingUnified.RegulatedCountries.__dict__.values(), - 'whitelisted_types_enum': AdAccountTargetingUnified.WhitelistedTypes.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/targetingbrowse', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountTargetingUnified, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountTargetingUnified, 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_targeting_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.adaccounttargetingunified import AdAccountTargetingUnified - param_types = { - 'allow_only_fat_head_interests': 'bool', - 'app_store': 'app_store_enum', - 'countries': 'list', - 'is_exclusion': 'bool', - 'limit_type': 'limit_type_enum', - 'objective': 'objective_enum', - 'promoted_object': 'Object', - 'q': 'string', - 'regulated_categories': 'list', - 'regulated_countries': 'list', - 'session_id': 'unsigned int', - 'targeting_list': 'list', - 'whitelisted_types': 'list', - } - enums = { - 'app_store_enum': AdAccountTargetingUnified.AppStore.__dict__.values(), - 'limit_type_enum': AdAccountTargetingUnified.LimitType.__dict__.values(), - 'objective_enum': AdAccountTargetingUnified.Objective.__dict__.values(), - 'regulated_categories_enum': AdAccountTargetingUnified.RegulatedCategories.__dict__.values(), - 'regulated_countries_enum': AdAccountTargetingUnified.RegulatedCountries.__dict__.values(), - 'whitelisted_types_enum': AdAccountTargetingUnified.WhitelistedTypes.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/targetingsearch', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountTargetingUnified, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountTargetingUnified, 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_targeting_sentence_lines(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.targetingsentenceline import TargetingSentenceLine - param_types = { - 'discard_ages': 'bool', - 'discard_placements': 'bool', - 'hide_targeting_spec_from_return': 'bool', - 'targeting_spec': 'Targeting', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/targetingsentencelines', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=TargetingSentenceLine, - api_type='EDGE', - response_parser=ObjectParser(target_class=TargetingSentenceLine, 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_targeting_suggestions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccounttargetingunified import AdAccountTargetingUnified - param_types = { - 'app_store': 'app_store_enum', - 'countries': 'list', - 'limit_type': 'limit_type_enum', - 'mode': 'mode_enum', - 'objective': 'objective_enum', - 'objects': 'Object', - 'regulated_categories': 'list', - 'regulated_countries': 'list', - 'session_id': 'unsigned int', - 'targeting_list': 'list', - 'whitelisted_types': 'list', - } - enums = { - 'app_store_enum': AdAccountTargetingUnified.AppStore.__dict__.values(), - 'limit_type_enum': AdAccountTargetingUnified.LimitType.__dict__.values(), - 'mode_enum': AdAccountTargetingUnified.Mode.__dict__.values(), - 'objective_enum': AdAccountTargetingUnified.Objective.__dict__.values(), - 'regulated_categories_enum': AdAccountTargetingUnified.RegulatedCategories.__dict__.values(), - 'regulated_countries_enum': AdAccountTargetingUnified.RegulatedCountries.__dict__.values(), - 'whitelisted_types_enum': AdAccountTargetingUnified.WhitelistedTypes.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/targetingsuggestions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountTargetingUnified, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountTargetingUnified, 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_targeting_validation(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccounttargetingunified import AdAccountTargetingUnified - param_types = { - 'id_list': 'list', - 'is_exclusion': 'bool', - 'name_list': 'list', - 'targeting_list': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/targetingvalidation', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountTargetingUnified, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountTargetingUnified, 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_tracking(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adaccounttrackingdata import AdAccountTrackingData - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/tracking', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountTrackingData, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountTrackingData, 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_tracking(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'tracking_specs': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/tracking', - 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_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.adaccountuser import AdAccountUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/users', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAccountUser, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAccountUser, 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_users_of_any_audience(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'namespace': 'string', - 'payload': 'Object', - 'session': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/usersofanyaudience', - 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_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.') - 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=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_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', - 'business': 'Business', - 'business_city': 'string', - 'business_country_code': 'string', - 'business_name': 'string', - 'business_state': 'string', - 'business_street': 'string', - 'business_street2': 'string', - 'business_zip': 'string', - 'can_create_brand_lift_study': 'bool', - 'capabilities': 'list', - 'created_time': 'datetime', - 'currency': 'string', - 'custom_audience_info': 'CustomAudienceGroup', - 'default_dsa_beneficiary': 'string', - 'default_dsa_payor': 'string', - 'disable_reason': 'unsigned int', - 'end_advertiser': 'string', - 'end_advertiser_name': 'string', - 'existing_customers': 'list', - 'extended_credit_invoice_group': 'ExtendedCreditInvoiceGroup', - 'failed_delivery_checks': 'list', - 'fb_entity': 'unsigned int', - 'funding_source': 'string', - 'funding_source_details': 'FundingSourceDetails', - 'has_migrated_permissions': 'bool', - 'has_page_authorized_adaccount': 'bool', - 'id': 'string', - 'io_number': 'string', - 'is_attribution_spec_system_default': 'bool', - 'is_direct_deals_enabled': 'bool', - 'is_in_3ds_authorization_enabled_market': 'bool', - 'is_notifications_enabled': 'bool', - 'is_personal': 'unsigned int', - 'is_prepay_account': 'bool', - 'is_tax_id_required': 'bool', - 'liable_address': 'CRMAddress', - 'line_numbers': 'list', - 'media_agency': 'string', - 'min_campaign_group_spend_cap': 'string', - 'min_daily_budget': 'unsigned int', - 'name': 'string', - 'offsite_pixels_tos_accepted': 'bool', - 'owner': 'string', - 'owner_business': 'Business', - 'partner': 'string', - 'rf_spec': 'ReachFrequencySpec', - 'send_bill_to_address': 'CRMAddress', - 'show_checkout_experience': 'bool', - 'sold_to_address': 'CRMAddress', - 'spend_cap': 'string', - 'tax_id': 'string', - 'tax_id_status': 'unsigned int', - 'tax_id_type': 'string', - 'timezone_id': 'unsigned int', - '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', - } - @classmethod - 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() - field_enum_info['Subtype'] = AdAccount.Subtype.__dict__.values() - field_enum_info['ActionSource'] = AdAccount.ActionSource.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountadruleshistory.py b/tap_facebook/facebook_business/adobjects/adaccountadruleshistory.py deleted file mode 100644 index 8142197..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountadruleshistory.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountAdRulesHistory( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountAdRulesHistory, self).__init__() - self._isAdAccountAdRulesHistory = True - self._api = api - - class Field(AbstractObject.Field): - evaluation_spec = 'evaluation_spec' - exception_code = 'exception_code' - exception_message = 'exception_message' - execution_spec = 'execution_spec' - is_manual = 'is_manual' - results = 'results' - rule_id = 'rule_id' - schedule_spec = 'schedule_spec' - timestamp = 'timestamp' - - class Action: - budget_not_redistributed = 'BUDGET_NOT_REDISTRIBUTED' - changed_bid = 'CHANGED_BID' - changed_budget = 'CHANGED_BUDGET' - email = 'EMAIL' - 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_semantic_based_audience_expansion = 'ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION' - endpoint_pinged = 'ENDPOINT_PINGED' - error = 'ERROR' - facebook_notification_sent = 'FACEBOOK_NOTIFICATION_SENT' - message_sent = 'MESSAGE_SENT' - not_changed = 'NOT_CHANGED' - paused = 'PAUSED' - unpaused = 'UNPAUSED' - - class EvaluationType: - schedule = 'SCHEDULE' - trigger = 'TRIGGER' - - _field_types = { - 'evaluation_spec': 'AdRuleEvaluationSpec', - 'exception_code': 'int', - 'exception_message': 'string', - 'execution_spec': 'AdRuleExecutionSpec', - 'is_manual': 'bool', - 'results': 'list', - 'rule_id': 'int', - 'schedule_spec': 'AdRuleScheduleSpec', - 'timestamp': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Action'] = AdAccountAdRulesHistory.Action.__dict__.values() - field_enum_info['EvaluationType'] = AdAccountAdRulesHistory.EvaluationType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountadvolume.py b/tap_facebook/facebook_business/adobjects/adaccountadvolume.py deleted file mode 100644 index 59a6d0d..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountadvolume.py +++ /dev/null @@ -1,185 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountAdVolume( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountAdVolume, self).__init__() - self._isAdAccountAdVolume = True - self._api = api - - class Field(AbstractObject.Field): - actor_id = 'actor_id' - actor_name = 'actor_name' - ad_limit_scope_business = 'ad_limit_scope_business' - ad_limit_scope_business_manager_id = 'ad_limit_scope_business_manager_id' - ad_limit_set_by_page_admin = 'ad_limit_set_by_page_admin' - ads_running_or_in_review_count = 'ads_running_or_in_review_count' - ads_running_or_in_review_count_subject_to_limit_set_by_page = 'ads_running_or_in_review_count_subject_to_limit_set_by_page' - current_account_ads_running_or_in_review_count = 'current_account_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' - limit_on_ads_running_or_in_review = 'limit_on_ads_running_or_in_review' - recommendations = 'recommendations' - - class RecommendationType: - 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_friction = 'ADVANTAGE_PLUS_AUDIENCE_FRICTION' - advantage_plus_audience_toggle = 'ADVANTAGE_PLUS_AUDIENCE_TOGGLE' - advantage_plus_creative = 'ADVANTAGE_PLUS_CREATIVE' - advantage_plus_creative_catalog = 'ADVANTAGE_PLUS_CREATIVE_CATALOG' - 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_budget_optimization_pfr = 'ASC_BUDGET_OPTIMIZATION_PFR' - asc_creation_package = 'ASC_CREATION_PACKAGE' - 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_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' - automatic_placements = 'AUTOMATIC_PLACEMENTS' - auto_bid = 'AUTO_BID' - blended_ads = 'BLENDED_ADS' - broad_targeting = 'BROAD_TARGETING' - 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' - 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_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_guidance = 'CTX_GUIDANCE' - da_advantage_plus_creative_info_labels = 'DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS' - dead_link = 'DEAD_LINK' - 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' - ges_test = 'GES_TEST' - guidance_center_code_gen = 'GUIDANCE_CENTER_CODE_GEN' - 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' - not_applicable = 'NOT_APPLICABLE' - 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' - predictive_creative_limited = 'PREDICTIVE_CREATIVE_LIMITED' - predictive_creative_limited_hourly = 'PREDICTIVE_CREATIVE_LIMITED_HOURLY' - rapid_learning_limited = 'RAPID_LEARNING_LIMITED' - rapid_learning_phase = 'RAPID_LEARNING_PHASE' - reels_duplication_upsell = 'REELS_DUPLICATION_UPSELL' - revert = 'REVERT' - scale_good_campaign = 'SCALE_GOOD_CAMPAIGN' - semantic_based_audience_expansion = 'SEMANTIC_BASED_AUDIENCE_EXPANSION' - setup_pixel = 'SETUP_PIXEL' - shops_ads = 'SHOPS_ADS' - signals_growth_capi = 'SIGNALS_GROWTH_CAPI' - signals_growth_capi_table = 'SIGNALS_GROWTH_CAPI_TABLE' - signals_growth_capi_v2 = 'SIGNALS_GROWTH_CAPI_V2' - 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' - 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 = { - 'actor_id': 'string', - 'actor_name': 'string', - 'ad_limit_scope_business': 'Business', - 'ad_limit_scope_business_manager_id': 'string', - 'ad_limit_set_by_page_admin': 'unsigned int', - 'ads_running_or_in_review_count': 'unsigned int', - 'ads_running_or_in_review_count_subject_to_limit_set_by_page': 'unsigned int', - 'current_account_ads_running_or_in_review_count': 'unsigned int', - 'future_limit_activation_date': 'string', - 'future_limit_on_ads_running_or_in_review': 'unsigned int', - 'limit_on_ads_running_or_in_review': 'unsigned int', - 'recommendations': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['RecommendationType'] = AdAccountAdVolume.RecommendationType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountbusinessconstraints.py b/tap_facebook/facebook_business/adobjects/adaccountbusinessconstraints.py deleted file mode 100644 index a68e546..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountbusinessconstraints.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdAccountBusinessConstraints( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdAccountBusinessConstraints = True - super(AdAccountBusinessConstraints, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - audience_controls = 'audience_controls' - campaigns_with_error = 'campaigns_with_error' - placement_controls = 'placement_controls' - status = 'status' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'account_controls' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_account_control(fields, params, batch, success, failure, pending) - - _field_types = { - 'audience_controls': 'Object', - 'campaigns_with_error': 'list', - 'placement_controls': 'Object', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountdefaultdestination.py b/tap_facebook/facebook_business/adobjects/adaccountdefaultdestination.py deleted file mode 100644 index f8a6875..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountdefaultdestination.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountDefaultDestination( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountDefaultDestination, self).__init__() - self._isAdAccountDefaultDestination = True - self._api = api - - class Field(AbstractObject.Field): - destination_id = 'destination_id' - destination_url = 'destination_url' - - _field_types = { - 'destination_id': 'string', - 'destination_url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountdefaultobjective.py b/tap_facebook/facebook_business/adobjects/adaccountdefaultobjective.py deleted file mode 100644 index bb86b4e..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountdefaultobjective.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountDefaultObjective( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountDefaultObjective, self).__init__() - self._isAdAccountDefaultObjective = True - self._api = api - - class Field(AbstractObject.Field): - default_objective_for_user = 'default_objective_for_user' - objective_for_level = 'objective_for_level' - - class DefaultObjectiveForUser: - 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' - - class ObjectiveForLevel: - 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' - - _field_types = { - 'default_objective_for_user': 'DefaultObjectiveForUser', - 'objective_for_level': 'ObjectiveForLevel', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['DefaultObjectiveForUser'] = AdAccountDefaultObjective.DefaultObjectiveForUser.__dict__.values() - field_enum_info['ObjectiveForLevel'] = AdAccountDefaultObjective.ObjectiveForLevel.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountdeliveryestimate.py b/tap_facebook/facebook_business/adobjects/adaccountdeliveryestimate.py deleted file mode 100644 index a784697..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountdeliveryestimate.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountDeliveryEstimate( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountDeliveryEstimate, self).__init__() - self._isAdAccountDeliveryEstimate = True - self._api = api - - class Field(AbstractObject.Field): - daily_outcomes_curve = 'daily_outcomes_curve' - estimate_dau = 'estimate_dau' - estimate_mau_lower_bound = 'estimate_mau_lower_bound' - estimate_mau_upper_bound = 'estimate_mau_upper_bound' - estimate_ready = 'estimate_ready' - targeting_optimization_types = 'targeting_optimization_types' - - 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' - 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 = { - 'daily_outcomes_curve': 'list', - 'estimate_dau': 'int', - 'estimate_mau_lower_bound': 'int', - 'estimate_mau_upper_bound': 'int', - 'estimate_ready': 'bool', - 'targeting_optimization_types': 'list>', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['OptimizationGoal'] = AdAccountDeliveryEstimate.OptimizationGoal.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountdsarecommendations.py b/tap_facebook/facebook_business/adobjects/adaccountdsarecommendations.py deleted file mode 100644 index 6e2a347..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountdsarecommendations.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py b/tap_facebook/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py deleted file mode 100644 index 75a9667..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountIosFourteenCampaignLimits( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountIosFourteenCampaignLimits, self).__init__() - self._isAdAccountIosFourteenCampaignLimits = True - self._api = api - - class Field(AbstractObject.Field): - campaign_group_limit = 'campaign_group_limit' - campaign_group_limits_details = 'campaign_group_limits_details' - campaign_limit = 'campaign_limit' - - _field_types = { - 'campaign_group_limit': 'int', - 'campaign_group_limits_details': 'list', - 'campaign_limit': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py b/tap_facebook/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py deleted file mode 100644 index a45d663..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountMatchedSearchApplicationsEdgeData( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountMatchedSearchApplicationsEdgeData, self).__init__() - self._isAdAccountMatchedSearchApplicationsEdgeData = True - self._api = api - - class Field(AbstractObject.Field): - app_id = 'app_id' - are_app_events_unavailable = 'are_app_events_unavailable' - icon_url = 'icon_url' - name = 'name' - search_source_store = 'search_source_store' - store = 'store' - unique_id = 'unique_id' - url = 'url' - - class AppStore: - amazon_app_store = 'AMAZON_APP_STORE' - apk_mirror = 'APK_MIRROR' - apk_monk = 'APK_MONK' - 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' - fb_gameroom = 'FB_GAMEROOM' - galaxy_store = 'GALAXY_STORE' - google_play = 'GOOGLE_PLAY' - instant_game = 'INSTANT_GAME' - itunes = 'ITUNES' - itunes_ipad = 'ITUNES_IPAD' - neon_android_store = 'NEON_ANDROID_STORE' - none = 'NONE' - oculus_app_store = 'OCULUS_APP_STORE' - oppo = 'OPPO' - roku_store = 'ROKU_STORE' - uptodown = 'UPTODOWN' - vivo = 'VIVO' - windows_10_store = 'WINDOWS_10_STORE' - windows_store = 'WINDOWS_STORE' - xiaomi = 'XIAOMI' - - _field_types = { - 'app_id': 'string', - 'are_app_events_unavailable': 'bool', - 'icon_url': 'string', - 'name': 'string', - 'search_source_store': 'string', - 'store': 'string', - 'unique_id': 'string', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['AppStore'] = AdAccountMatchedSearchApplicationsEdgeData.AppStore.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountmaxbid.py b/tap_facebook/facebook_business/adobjects/adaccountmaxbid.py deleted file mode 100644 index 0da1a73..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountmaxbid.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountMaxBid( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountMaxBid, self).__init__() - self._isAdAccountMaxBid = True - self._api = api - - class Field(AbstractObject.Field): - max_bid = 'max_bid' - - _field_types = { - 'max_bid': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountpromotableobjects.py b/tap_facebook/facebook_business/adobjects/adaccountpromotableobjects.py deleted file mode 100644 index 4b66f6d..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountpromotableobjects.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountPromotableObjects( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountPromotableObjects, self).__init__() - self._isAdAccountPromotableObjects = True - self._api = api - - class Field(AbstractObject.Field): - promotable_app_ids = 'promotable_app_ids' - promotable_page_ids = 'promotable_page_ids' - promotable_urls = 'promotable_urls' - - _field_types = { - 'promotable_app_ids': 'list', - 'promotable_page_ids': 'list', - 'promotable_urls': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountreachestimate.py b/tap_facebook/facebook_business/adobjects/adaccountreachestimate.py deleted file mode 100644 index 2bbafd7..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountreachestimate.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountReachEstimate( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountReachEstimate, self).__init__() - self._isAdAccountReachEstimate = True - self._api = api - - class Field(AbstractObject.Field): - estimate_ready = 'estimate_ready' - users_lower_bound = 'users_lower_bound' - users_upper_bound = 'users_upper_bound' - - _field_types = { - 'estimate_ready': 'bool', - 'users_lower_bound': 'int', - 'users_upper_bound': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py b/tap_facebook/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py deleted file mode 100644 index 44b2db6..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountRecommendedCamapaignBudget( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountRecommendedCamapaignBudget, self).__init__() - self._isAdAccountRecommendedCamapaignBudget = True - self._api = api - - class Field(AbstractObject.Field): - daily = 'daily' - lifetime = 'lifetime' - objective = 'objective' - - _field_types = { - 'daily': 'string', - 'lifetime': 'string', - 'objective': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountsubscribedapps.py b/tap_facebook/facebook_business/adobjects/adaccountsubscribedapps.py deleted file mode 100644 index c750fd8..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountsubscribedapps.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdAccountSubscribedApps( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdAccountSubscribedApps = True - super(AdAccountSubscribedApps, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - app_id = 'app_id' - app_name = 'app_name' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'subscribed_apps' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_subscribed_app(fields, params, batch, success, failure, pending) - - _field_types = { - 'app_id': 'string', - 'app_name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccounttargetingunified.py b/tap_facebook/facebook_business/adobjects/adaccounttargetingunified.py deleted file mode 100644 index a239966..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccounttargetingunified.py +++ /dev/null @@ -1,567 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdAccountTargetingUnified( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdAccountTargetingUnified = True - super(AdAccountTargetingUnified, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - audience_size_lower_bound = 'audience_size_lower_bound' - audience_size_upper_bound = 'audience_size_upper_bound' - conversion_lift = 'conversion_lift' - description = 'description' - id = 'id' - img = 'img' - info = 'info' - info_title = 'info_title' - is_recommendation = 'is_recommendation' - key = 'key' - link = 'link' - name = 'name' - parent = 'parent' - partner = 'partner' - path = 'path' - performance_rating = 'performance_rating' - raw_name = 'raw_name' - recommendation_model = 'recommendation_model' - search_interest_id = 'search_interest_id' - source = 'source' - spend = 'spend' - type = 'type' - valid = 'valid' - - class LimitType: - behaviors = 'behaviors' - college_years = 'college_years' - education_majors = 'education_majors' - education_schools = 'education_schools' - education_statuses = 'education_statuses' - ethnic_affinity = 'ethnic_affinity' - family_statuses = 'family_statuses' - generation = 'generation' - home_ownership = 'home_ownership' - home_type = 'home_type' - home_value = 'home_value' - household_composition = 'household_composition' - income = 'income' - industries = 'industries' - interested_in = 'interested_in' - interests = 'interests' - life_events = 'life_events' - location_categories = 'location_categories' - moms = 'moms' - net_worth = 'net_worth' - office_type = 'office_type' - politics = 'politics' - relationship_statuses = 'relationship_statuses' - user_adclusters = 'user_adclusters' - work_employers = 'work_employers' - work_positions = 'work_positions' - - class RegulatedCategories: - credit = 'CREDIT' - employment = 'EMPLOYMENT' - housing = 'HOUSING' - issues_elections_politics = 'ISSUES_ELECTIONS_POLITICS' - none = 'NONE' - online_gambling_and_gaming = 'ONLINE_GAMBLING_AND_GAMING' - - class RegulatedCountries: - ad = 'AD' - ae = 'AE' - af = 'AF' - ag = 'AG' - ai = 'AI' - al = 'AL' - am = 'AM' - an = 'AN' - ao = 'AO' - aq = 'AQ' - ar = 'AR' - value_as = 'AS' - at = 'AT' - au = 'AU' - aw = 'AW' - ax = 'AX' - az = 'AZ' - ba = 'BA' - bb = 'BB' - bd = 'BD' - be = 'BE' - bf = 'BF' - bg = 'BG' - bh = 'BH' - bi = 'BI' - bj = 'BJ' - bl = 'BL' - bm = 'BM' - bn = 'BN' - bo = 'BO' - bq = 'BQ' - br = 'BR' - bs = 'BS' - bt = 'BT' - bv = 'BV' - bw = 'BW' - by = 'BY' - bz = 'BZ' - ca = 'CA' - cc = 'CC' - cd = 'CD' - cf = 'CF' - cg = 'CG' - ch = 'CH' - ci = 'CI' - ck = 'CK' - cl = 'CL' - cm = 'CM' - cn = 'CN' - co = 'CO' - cr = 'CR' - cu = 'CU' - cv = 'CV' - cw = 'CW' - cx = 'CX' - cy = 'CY' - cz = 'CZ' - de = 'DE' - dj = 'DJ' - dk = 'DK' - dm = 'DM' - do = 'DO' - dz = 'DZ' - ec = 'EC' - ee = 'EE' - eg = 'EG' - eh = 'EH' - er = 'ER' - es = 'ES' - et = 'ET' - fi = 'FI' - fj = 'FJ' - fk = 'FK' - fm = 'FM' - fo = 'FO' - fr = 'FR' - ga = 'GA' - gb = 'GB' - gd = 'GD' - ge = 'GE' - gf = 'GF' - gg = 'GG' - gh = 'GH' - gi = 'GI' - gl = 'GL' - gm = 'GM' - gn = 'GN' - gp = 'GP' - gq = 'GQ' - gr = 'GR' - gs = 'GS' - gt = 'GT' - gu = 'GU' - gw = 'GW' - gy = 'GY' - hk = 'HK' - hm = 'HM' - hn = 'HN' - hr = 'HR' - ht = 'HT' - hu = 'HU' - id = 'ID' - ie = 'IE' - il = 'IL' - im = 'IM' - value_in = 'IN' - io = 'IO' - iq = 'IQ' - ir = 'IR' - value_is = 'IS' - it = 'IT' - je = 'JE' - jm = 'JM' - jo = 'JO' - jp = 'JP' - ke = 'KE' - kg = 'KG' - kh = 'KH' - ki = 'KI' - km = 'KM' - kn = 'KN' - kp = 'KP' - kr = 'KR' - kw = 'KW' - ky = 'KY' - kz = 'KZ' - la = 'LA' - lb = 'LB' - lc = 'LC' - li = 'LI' - lk = 'LK' - lr = 'LR' - ls = 'LS' - lt = 'LT' - lu = 'LU' - lv = 'LV' - ly = 'LY' - ma = 'MA' - mc = 'MC' - md = 'MD' - me = 'ME' - mf = 'MF' - mg = 'MG' - mh = 'MH' - mk = 'MK' - ml = 'ML' - mm = 'MM' - mn = 'MN' - mo = 'MO' - mp = 'MP' - mq = 'MQ' - mr = 'MR' - ms = 'MS' - mt = 'MT' - mu = 'MU' - mv = 'MV' - mw = 'MW' - mx = 'MX' - my = 'MY' - mz = 'MZ' - na = 'NA' - nc = 'NC' - ne = 'NE' - nf = 'NF' - ng = 'NG' - ni = 'NI' - nl = 'NL' - no = 'NO' - np = 'NP' - nr = 'NR' - nu = 'NU' - nz = 'NZ' - om = 'OM' - pa = 'PA' - pe = 'PE' - pf = 'PF' - pg = 'PG' - ph = 'PH' - pk = 'PK' - pl = 'PL' - pm = 'PM' - pn = 'PN' - pr = 'PR' - ps = 'PS' - pt = 'PT' - pw = 'PW' - py = 'PY' - qa = 'QA' - re = 'RE' - ro = 'RO' - rs = 'RS' - ru = 'RU' - rw = 'RW' - sa = 'SA' - sb = 'SB' - sc = 'SC' - sd = 'SD' - se = 'SE' - sg = 'SG' - sh = 'SH' - si = 'SI' - sj = 'SJ' - sk = 'SK' - sl = 'SL' - sm = 'SM' - sn = 'SN' - so = 'SO' - sr = 'SR' - ss = 'SS' - st = 'ST' - sv = 'SV' - sx = 'SX' - sy = 'SY' - sz = 'SZ' - tc = 'TC' - td = 'TD' - tf = 'TF' - tg = 'TG' - th = 'TH' - tj = 'TJ' - tk = 'TK' - tl = 'TL' - tm = 'TM' - tn = 'TN' - to = 'TO' - tr = 'TR' - tt = 'TT' - tv = 'TV' - tw = 'TW' - tz = 'TZ' - ua = 'UA' - ug = 'UG' - um = 'UM' - us = 'US' - uy = 'UY' - uz = 'UZ' - va = 'VA' - vc = 'VC' - ve = 'VE' - vg = 'VG' - vi = 'VI' - vn = 'VN' - vu = 'VU' - wf = 'WF' - ws = 'WS' - xk = 'XK' - ye = 'YE' - yt = 'YT' - za = 'ZA' - zm = 'ZM' - zw = 'ZW' - - class WhitelistedTypes: - 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' - behaviors = 'behaviors' - brand_safety_content_filter_levels = 'brand_safety_content_filter_levels' - brand_safety_content_severity_levels = 'brand_safety_content_severity_levels' - cafe_ca_contraction_targeting_signal = 'cafe_ca_contraction_targeting_signal' - cafe_ca_expansion_targeting_signal = 'cafe_ca_expansion_targeting_signal' - catalog_based_targeting = 'catalog_based_targeting' - cities = 'cities' - city_keys = 'city_keys' - college_years = 'college_years' - conjunctive_user_adclusters = 'conjunctive_user_adclusters' - connections = 'connections' - contextual_targeting_categories = 'contextual_targeting_categories' - countries = 'countries' - country = 'country' - country_groups = 'country_groups' - custom_audiences = 'custom_audiences' - device_platforms = 'device_platforms' - direct_install_devices = 'direct_install_devices' - dynamic_audience_ids = 'dynamic_audience_ids' - education_majors = 'education_majors' - education_schools = 'education_schools' - education_statuses = 'education_statuses' - effective_audience_network_positions = 'effective_audience_network_positions' - effective_device_platforms = 'effective_device_platforms' - effective_facebook_positions = 'effective_facebook_positions' - effective_instagram_positions = 'effective_instagram_positions' - effective_messenger_positions = 'effective_messenger_positions' - effective_oculus_positions = 'effective_oculus_positions' - effective_publisher_platforms = 'effective_publisher_platforms' - effective_whatsapp_positions = 'effective_whatsapp_positions' - engagement_specs = 'engagement_specs' - ethnic_affinity = 'ethnic_affinity' - exclude_previous_days = 'exclude_previous_days' - exclude_reached_since = 'exclude_reached_since' - excluded_brand_safety_content_types = 'excluded_brand_safety_content_types' - excluded_connections = 'excluded_connections' - excluded_custom_audiences = 'excluded_custom_audiences' - excluded_dynamic_audience_ids = 'excluded_dynamic_audience_ids' - excluded_engagement_specs = 'excluded_engagement_specs' - excluded_geo_locations = 'excluded_geo_locations' - excluded_mobile_device_model = 'excluded_mobile_device_model' - excluded_product_audience_specs = 'excluded_product_audience_specs' - excluded_publisher_categories = 'excluded_publisher_categories' - excluded_publisher_list_ids = 'excluded_publisher_list_ids' - 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' - flexible_spec = 'flexible_spec' - follow_profiles = 'follow_profiles' - follow_profiles_negative = 'follow_profiles_negative' - format = 'format' - friends_of_connections = 'friends_of_connections' - gatekeepers = 'gatekeepers' - genders = 'genders' - generation = 'generation' - geo_locations = 'geo_locations' - home_ownership = 'home_ownership' - home_type = 'home_type' - home_value = 'home_value' - household_composition = 'household_composition' - id = 'id' - income = 'income' - industries = 'industries' - instagram_hashtags = 'instagram_hashtags' - instagram_positions = 'instagram_positions' - instream_video_skippable_excluded = 'instream_video_skippable_excluded' - instream_video_sponsorship_placements = 'instream_video_sponsorship_placements' - interest_defaults_source = 'interest_defaults_source' - interested_in = 'interested_in' - interests = 'interests' - is_instagram_destination_ad = 'is_instagram_destination_ad' - is_whatsapp_destination_ad = 'is_whatsapp_destination_ad' - keywords = 'keywords' - life_events = 'life_events' - locales = 'locales' - location_categories = 'location_categories' - location_cluster_ids = 'location_cluster_ids' - location_expansion = 'location_expansion' - marketing_message_targeting = 'marketing_message_targeting' - marketplace_product_categories = 'marketplace_product_categories' - messenger_positions = 'messenger_positions' - mobile_device_model = 'mobile_device_model' - moms = 'moms' - net_worth = 'net_worth' - oculus_positions = 'oculus_positions' - office_type = 'office_type' - page_types = 'page_types' - place_page_set_ids = 'place_page_set_ids' - political_views = 'political_views' - politics = 'politics' - product_audience_specs = 'product_audience_specs' - prospecting_audience = 'prospecting_audience' - publisher_platforms = 'publisher_platforms' - radius = 'radius' - region_keys = 'region_keys' - regions = 'regions' - 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' - timezones = 'timezones' - topic = 'topic' - trending = 'trending' - user_adclusters = 'user_adclusters' - user_device = 'user_device' - user_event = 'user_event' - user_os = 'user_os' - user_page_threads = 'user_page_threads' - user_page_threads_excluded = 'user_page_threads_excluded' - whatsapp_positions = 'whatsapp_positions' - wireless_carrier = 'wireless_carrier' - work_employers = 'work_employers' - work_positions = 'work_positions' - zips = 'zips' - - class AppStore: - amazon_app_store = 'amazon_app_store' - apk_mirror = 'apk_mirror' - apk_monk = 'apk_monk' - 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' - fb_gameroom = 'fb_gameroom' - galaxy_store = 'galaxy_store' - google_play = 'google_play' - instant_game = 'instant_game' - itunes = 'itunes' - itunes_ipad = 'itunes_ipad' - neon_android_store = 'neon_android_store' - none = 'none' - oculus_app_store = 'oculus_app_store' - oppo = 'oppo' - roku_channel_store = 'roku_channel_store' - uptodown = 'uptodown' - vivo = 'vivo' - windows_10_store = 'windows_10_store' - windows_store = 'windows_store' - xiaomi = 'xiaomi' - - class Objective: - app_installs = 'APP_INSTALLS' - brand_awareness = 'BRAND_AWARENESS' - conversions = 'CONVERSIONS' - 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' - - class Mode: - best_performing = 'best_performing' - recently_used = 'recently_used' - related = 'related' - suggestions = 'suggestions' - - _field_types = { - 'audience_size_lower_bound': 'unsigned int', - 'audience_size_upper_bound': 'unsigned int', - 'conversion_lift': 'float', - 'description': 'string', - 'id': 'string', - 'img': 'string', - 'info': 'string', - 'info_title': 'string', - 'is_recommendation': 'bool', - 'key': 'string', - 'link': 'string', - 'name': 'string', - 'parent': 'string', - 'partner': 'string', - 'path': 'list', - 'performance_rating': 'unsigned int', - 'raw_name': 'string', - 'recommendation_model': 'string', - 'search_interest_id': 'string', - 'source': 'string', - 'spend': 'float', - 'type': 'string', - 'valid': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['LimitType'] = AdAccountTargetingUnified.LimitType.__dict__.values() - field_enum_info['RegulatedCategories'] = AdAccountTargetingUnified.RegulatedCategories.__dict__.values() - field_enum_info['RegulatedCountries'] = AdAccountTargetingUnified.RegulatedCountries.__dict__.values() - field_enum_info['WhitelistedTypes'] = AdAccountTargetingUnified.WhitelistedTypes.__dict__.values() - field_enum_info['AppStore'] = AdAccountTargetingUnified.AppStore.__dict__.values() - field_enum_info['Objective'] = AdAccountTargetingUnified.Objective.__dict__.values() - field_enum_info['Mode'] = AdAccountTargetingUnified.Mode.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccounttrackingdata.py b/tap_facebook/facebook_business/adobjects/adaccounttrackingdata.py deleted file mode 100644 index bad8478..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccounttrackingdata.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountTrackingData( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAccountTrackingData, self).__init__() - self._isAdAccountTrackingData = True - self._api = api - - class Field(AbstractObject.Field): - tracking_specs = 'tracking_specs' - - _field_types = { - 'tracking_specs': 'ConversionActionQuery', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adaccountuser.py b/tap_facebook/facebook_business/adobjects/adaccountuser.py deleted file mode 100644 index e4b0944..0000000 --- a/tap_facebook/facebook_business/adobjects/adaccountuser.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.adobjects.helpers.adaccountusermixin import AdAccountUserMixin - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAccountUser( - AdAccountUserMixin, - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdAccountUser = True - super(AdAccountUser, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - name = 'name' - tasks = 'tasks' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'users' - - _field_types = { - 'id': 'string', - 'name': 'string', - 'tasks': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adactivity.py b/tap_facebook/facebook_business/adobjects/adactivity.py deleted file mode 100644 index 3765da2..0000000 --- a/tap_facebook/facebook_business/adobjects/adactivity.py +++ /dev/null @@ -1,165 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdActivity( - AbstractObject, -): - - def __init__(self, api=None): - super(AdActivity, self).__init__() - self._isAdActivity = True - self._api = api - - class Field(AbstractObject.Field): - actor_id = 'actor_id' - actor_name = 'actor_name' - application_id = 'application_id' - application_name = 'application_name' - date_time_in_timezone = 'date_time_in_timezone' - event_time = 'event_time' - event_type = 'event_type' - extra_data = 'extra_data' - object_id = 'object_id' - object_name = 'object_name' - object_type = 'object_type' - translated_event_type = 'translated_event_type' - - class EventType: - account_spending_limit_reached = 'account_spending_limit_reached' - ad_account_add_user_to_role = 'ad_account_add_user_to_role' - ad_account_billing_charge = 'ad_account_billing_charge' - ad_account_billing_charge_failed = 'ad_account_billing_charge_failed' - ad_account_billing_chargeback = 'ad_account_billing_chargeback' - ad_account_billing_chargeback_reversal = 'ad_account_billing_chargeback_reversal' - ad_account_billing_decline = 'ad_account_billing_decline' - ad_account_billing_refund = 'ad_account_billing_refund' - ad_account_remove_spend_limit = 'ad_account_remove_spend_limit' - ad_account_remove_user_from_role = 'ad_account_remove_user_from_role' - ad_account_reset_spend_limit = 'ad_account_reset_spend_limit' - ad_account_set_business_information = 'ad_account_set_business_information' - ad_account_update_spend_limit = 'ad_account_update_spend_limit' - ad_account_update_status = 'ad_account_update_status' - ad_review_approved = 'ad_review_approved' - ad_review_declined = 'ad_review_declined' - add_funding_source = 'add_funding_source' - add_images = 'add_images' - billing_event = 'billing_event' - campaign_ended = 'campaign_ended' - campaign_spending_limit_reached = 'campaign_spending_limit_reached' - conversion_event_updated = 'conversion_event_updated' - create_ad = 'create_ad' - create_ad_set = 'create_ad_set' - create_audience = 'create_audience' - create_campaign_group = 'create_campaign_group' - create_campaign_legacy = 'create_campaign_legacy' - delete_audience = 'delete_audience' - delete_images = 'delete_images' - di_ad_set_learning_stage_exit = 'di_ad_set_learning_stage_exit' - edit_and_update_ad_creative = 'edit_and_update_ad_creative' - edit_images = 'edit_images' - first_delivery_event = 'first_delivery_event' - funding_event_initiated = 'funding_event_initiated' - funding_event_successful = 'funding_event_successful' - lifetime_budget_spent = 'lifetime_budget_spent' - merge_campaigns = 'merge_campaigns' - receive_audience = 'receive_audience' - remove_funding_source = 'remove_funding_source' - remove_shared_audience = 'remove_shared_audience' - share_audience = 'share_audience' - unknown = 'unknown' - unshare_audience = 'unshare_audience' - update_ad_bid_info = 'update_ad_bid_info' - update_ad_bid_type = 'update_ad_bid_type' - update_ad_creative = 'update_ad_creative' - update_ad_friendly_name = 'update_ad_friendly_name' - update_ad_labels = 'update_ad_labels' - update_ad_run_status = 'update_ad_run_status' - update_ad_run_status_to_be_set_after_review = 'update_ad_run_status_to_be_set_after_review' - update_ad_set_ad_keywords = 'update_ad_set_ad_keywords' - update_ad_set_bid_adjustments = 'update_ad_set_bid_adjustments' - update_ad_set_bid_strategy = 'update_ad_set_bid_strategy' - update_ad_set_bidding = 'update_ad_set_bidding' - update_ad_set_budget = 'update_ad_set_budget' - update_ad_set_duration = 'update_ad_set_duration' - update_ad_set_learning_stage_status = 'update_ad_set_learning_stage_status' - update_ad_set_min_spend_target = 'update_ad_set_min_spend_target' - update_ad_set_name = 'update_ad_set_name' - update_ad_set_optimization_goal = 'update_ad_set_optimization_goal' - update_ad_set_run_status = 'update_ad_set_run_status' - update_ad_set_spend_cap = 'update_ad_set_spend_cap' - update_ad_set_target_spec = 'update_ad_set_target_spec' - update_ad_targets_spec = 'update_ad_targets_spec' - update_adgroup_stop_delivery = 'update_adgroup_stop_delivery' - update_audience = 'update_audience' - 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_delivery_type_cross_level_shift = 'update_delivery_type_cross_level_shift' - - class Category: - account = 'ACCOUNT' - ad = 'AD' - ad_keywords = 'AD_KEYWORDS' - ad_set = 'AD_SET' - audience = 'AUDIENCE' - bid = 'BID' - budget = 'BUDGET' - campaign = 'CAMPAIGN' - date = 'DATE' - status = 'STATUS' - targeting = 'TARGETING' - - class DataSource: - calypso = 'CALYPSO' - tao = 'TAO' - tao_ad_account = 'TAO_AD_ACCOUNT' - tao_ad_status = 'TAO_AD_STATUS' - - _field_types = { - 'actor_id': 'string', - 'actor_name': 'string', - 'application_id': 'string', - 'application_name': 'string', - 'date_time_in_timezone': 'string', - 'event_time': 'datetime', - 'event_type': 'EventType', - 'extra_data': 'string', - 'object_id': 'string', - 'object_name': 'string', - 'object_type': 'string', - 'translated_event_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['EventType'] = AdActivity.EventType.__dict__.values() - field_enum_info['Category'] = AdActivity.Category.__dict__.values() - field_enum_info['DataSource'] = AdActivity.DataSource.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetbody.py b/tap_facebook/facebook_business/adobjects/adassetbody.py deleted file mode 100644 index 02beba0..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetbody.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/adassetcalltoactiontype.py b/tap_facebook/facebook_business/adobjects/adassetcalltoactiontype.py deleted file mode 100644 index 11a7905..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetcalltoactiontype.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py b/tap_facebook/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py deleted file mode 100644 index 5ea7ade..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassetdescription.py b/tap_facebook/facebook_business/adobjects/adassetdescription.py deleted file mode 100644 index b824e97..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetdescription.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/adassetfeedadditionaldata.py b/tap_facebook/facebook_business/adobjects/adassetfeedadditionaldata.py deleted file mode 100644 index 95b3779..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedadditionaldata.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassetfeedspec.py b/tap_facebook/facebook_business/adobjects/adassetfeedspec.py deleted file mode 100644 index 6091700..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspec.py +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpec, self).__init__() - self._isAdAssetFeedSpec = True - self._api = api - - class Field(AbstractObject.Field): - ad_formats = 'ad_formats' - additional_data = 'additional_data' - app_product_page_id = 'app_product_page_id' - asset_customization_rules = 'asset_customization_rules' - autotranslate = 'autotranslate' - bodies = 'bodies' - call_to_action_types = 'call_to_action_types' - call_to_actions = 'call_to_actions' - captions = 'captions' - carousels = 'carousels' - descriptions = 'descriptions' - events = 'events' - groups = 'groups' - images = 'images' - link_urls = 'link_urls' - message_extensions = 'message_extensions' - onsite_destinations = 'onsite_destinations' - optimization_type = 'optimization_type' - reasons_to_shop = 'reasons_to_shop' - shops_bundle = 'shops_bundle' - titles = 'titles' - videos = 'videos' - - class CallToActionTypes: - add_to_cart = 'ADD_TO_CART' - apply_now = 'APPLY_NOW' - audio_call = 'AUDIO_CALL' - book_now = 'BOOK_NOW' - book_travel = 'BOOK_TRAVEL' - buy = 'BUY' - buy_now = 'BUY_NOW' - buy_tickets = 'BUY_TICKETS' - call = 'CALL' - call_me = 'CALL_ME' - call_now = 'CALL_NOW' - confirm = 'CONFIRM' - contact = 'CONTACT' - contact_us = 'CONTACT_US' - donate = 'DONATE' - donate_now = 'DONATE_NOW' - download = 'DOWNLOAD' - event_rsvp = 'EVENT_RSVP' - find_a_group = 'FIND_A_GROUP' - find_your_groups = 'FIND_YOUR_GROUPS' - follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' - follow_page = 'FOLLOW_PAGE' - follow_user = 'FOLLOW_USER' - get_directions = 'GET_DIRECTIONS' - get_offer = 'GET_OFFER' - get_offer_view = 'GET_OFFER_VIEW' - get_promotions = 'GET_PROMOTIONS' - get_quote = 'GET_QUOTE' - get_showtimes = 'GET_SHOWTIMES' - get_started = 'GET_STARTED' - 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' - message_page = 'MESSAGE_PAGE' - mobile_download = 'MOBILE_DOWNLOAD' - no_button = 'NO_BUTTON' - open_instant_app = 'OPEN_INSTANT_APP' - open_link = 'OPEN_LINK' - order_now = 'ORDER_NOW' - pay_to_access = 'PAY_TO_ACCESS' - play_game = 'PLAY_GAME' - play_game_on_facebook = 'PLAY_GAME_ON_FACEBOOK' - purchase_gift_cards = 'PURCHASE_GIFT_CARDS' - raise_money = 'RAISE_MONEY' - record_now = 'RECORD_NOW' - refer_friends = 'REFER_FRIENDS' - request_time = 'REQUEST_TIME' - say_thanks = 'SAY_THANKS' - see_more = 'SEE_MORE' - sell_now = 'SELL_NOW' - send_a_gift = 'SEND_A_GIFT' - send_gift_money = 'SEND_GIFT_MONEY' - send_updates = 'SEND_UPDATES' - share = 'SHARE' - shop_now = 'SHOP_NOW' - sign_up = 'SIGN_UP' - sotto_subscribe = 'SOTTO_SUBSCRIBE' - start_order = 'START_ORDER' - subscribe = 'SUBSCRIBE' - swipe_up_product = 'SWIPE_UP_PRODUCT' - swipe_up_shop = 'SWIPE_UP_SHOP' - update_app = 'UPDATE_APP' - use_app = 'USE_APP' - use_mobile_app = 'USE_MOBILE_APP' - video_annotation = 'VIDEO_ANNOTATION' - video_call = 'VIDEO_CALL' - visit_pages_feed = 'VISIT_PAGES_FEED' - watch_more = 'WATCH_MORE' - watch_video = 'WATCH_VIDEO' - whatsapp_message = 'WHATSAPP_MESSAGE' - woodhenge_support = 'WOODHENGE_SUPPORT' - - _field_types = { - 'ad_formats': 'list', - 'additional_data': 'AdAssetFeedAdditionalData', - 'app_product_page_id': 'string', - 'asset_customization_rules': 'list', - 'autotranslate': 'list', - 'bodies': 'list', - 'call_to_action_types': 'list', - 'call_to_actions': 'list', - 'captions': 'list', - 'carousels': 'list', - 'descriptions': 'list', - 'events': 'list', - 'groups': 'list', - 'images': 'list', - 'link_urls': 'list', - 'message_extensions': 'list', - 'onsite_destinations': 'list', - 'optimization_type': 'string', - 'reasons_to_shop': 'bool', - 'shops_bundle': 'bool', - 'titles': 'list', - 'videos': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['CallToActionTypes'] = AdAssetFeedSpec.CallToActionTypes.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py deleted file mode 100644 index 42dd02e..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassetfeedspecassetlabel.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecassetlabel.py deleted file mode 100644 index 1e22ee4..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspecassetlabel.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdAssetFeedSpecAssetLabel( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdAssetFeedSpecAssetLabel = True - super(AdAssetFeedSpecAssetLabel, 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/tap_facebook/facebook_business/adobjects/adassetfeedspecbody.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecbody.py deleted file mode 100644 index eed5bc7..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspecbody.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpecBody( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpecBody, self).__init__() - self._isAdAssetFeedSpecBody = True - self._api = api - - class Field(AbstractObject.Field): - adlabels = 'adlabels' - text = 'text' - url_tags = 'url_tags' - - _field_types = { - 'adlabels': 'list', - 'text': 'string', - 'url_tags': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspeccalltoaction.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeccalltoaction.py deleted file mode 100644 index 25b07ec..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspeccalltoaction.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassetfeedspeccaption.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeccaption.py deleted file mode 100644 index 4545c68..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspeccaption.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpecCaption( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpecCaption, self).__init__() - self._isAdAssetFeedSpecCaption = True - self._api = api - - class Field(AbstractObject.Field): - adlabels = 'adlabels' - text = 'text' - url_tags = 'url_tags' - - _field_types = { - 'adlabels': 'list', - 'text': 'string', - 'url_tags': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspeccarousel.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeccarousel.py deleted file mode 100644 index d46b446..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspeccarousel.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py deleted file mode 100644 index b839436..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassetfeedspecdescription.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecdescription.py deleted file mode 100644 index 9c5a09c..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspecdescription.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpecDescription( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpecDescription, self).__init__() - self._isAdAssetFeedSpecDescription = True - self._api = api - - class Field(AbstractObject.Field): - adlabels = 'adlabels' - text = 'text' - url_tags = 'url_tags' - - _field_types = { - 'adlabels': 'list', - 'text': 'string', - 'url_tags': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspecevents.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecevents.py deleted file mode 100644 index 0b8a360..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspecevents.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/adassetfeedspecgrouprule.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecgrouprule.py deleted file mode 100644 index dd749d5..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspecgrouprule.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpecGroupRule( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpecGroupRule, self).__init__() - self._isAdAssetFeedSpecGroupRule = True - self._api = api - - class Field(AbstractObject.Field): - body_label = 'body_label' - caption_label = 'caption_label' - description_label = 'description_label' - image_label = 'image_label' - link_url_label = 'link_url_label' - title_label = 'title_label' - video_label = 'video_label' - - _field_types = { - 'body_label': 'AdAssetFeedSpecAssetLabel', - 'caption_label': 'AdAssetFeedSpecAssetLabel', - 'description_label': 'AdAssetFeedSpecAssetLabel', - 'image_label': 'AdAssetFeedSpecAssetLabel', - 'link_url_label': 'AdAssetFeedSpecAssetLabel', - 'title_label': 'AdAssetFeedSpecAssetLabel', - 'video_label': 'AdAssetFeedSpecAssetLabel', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspecimage.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecimage.py deleted file mode 100644 index 6f5f627..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspecimage.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpecImage( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpecImage, self).__init__() - self._isAdAssetFeedSpecImage = True - self._api = api - - class Field(AbstractObject.Field): - adlabels = 'adlabels' - hash = 'hash' - image_crops = 'image_crops' - url = 'url' - url_tags = 'url_tags' - - _field_types = { - 'adlabels': 'list', - 'hash': 'string', - 'image_crops': 'AdsImageCrops', - 'url': 'string', - 'url_tags': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspeclinkurl.py b/tap_facebook/facebook_business/adobjects/adassetfeedspeclinkurl.py deleted file mode 100644 index c27e7df..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspeclinkurl.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpecLinkURL( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpecLinkURL, self).__init__() - self._isAdAssetFeedSpecLinkURL = True - self._api = api - - class Field(AbstractObject.Field): - adlabels = 'adlabels' - carousel_see_more_url = 'carousel_see_more_url' - deeplink_url = 'deeplink_url' - display_url = 'display_url' - url_tags = 'url_tags' - website_url = 'website_url' - - _field_types = { - 'adlabels': 'list', - 'carousel_see_more_url': 'string', - 'deeplink_url': 'string', - 'display_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/tap_facebook/facebook_business/adobjects/adassetfeedspectitle.py b/tap_facebook/facebook_business/adobjects/adassetfeedspectitle.py deleted file mode 100644 index 3498277..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspectitle.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpecTitle( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpecTitle, self).__init__() - self._isAdAssetFeedSpecTitle = True - self._api = api - - class Field(AbstractObject.Field): - adlabels = 'adlabels' - text = 'text' - url_tags = 'url_tags' - - _field_types = { - 'adlabels': 'list', - 'text': 'string', - 'url_tags': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetfeedspecvideo.py b/tap_facebook/facebook_business/adobjects/adassetfeedspecvideo.py deleted file mode 100644 index 8ba34b0..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetfeedspecvideo.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAssetFeedSpecVideo( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAssetFeedSpecVideo, self).__init__() - self._isAdAssetFeedSpecVideo = True - self._api = api - - class Field(AbstractObject.Field): - adlabels = 'adlabels' - caption_ids = 'caption_ids' - thumbnail_hash = 'thumbnail_hash' - thumbnail_url = 'thumbnail_url' - url_tags = 'url_tags' - video_id = 'video_id' - - _field_types = { - 'adlabels': 'list', - 'caption_ids': 'list', - 'thumbnail_hash': 'string', - 'thumbnail_url': 'string', - 'url_tags': 'string', - 'video_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adassetimage.py b/tap_facebook/facebook_business/adobjects/adassetimage.py deleted file mode 100644 index bae05d3..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetimage.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/adassetlinkurl.py b/tap_facebook/facebook_business/adobjects/adassetlinkurl.py deleted file mode 100644 index 5638937..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetlinkurl.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/adassetmessageextensions.py b/tap_facebook/facebook_business/adobjects/adassetmessageextensions.py deleted file mode 100644 index a3ea877..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetmessageextensions.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassetonsitedestinations.py b/tap_facebook/facebook_business/adobjects/adassetonsitedestinations.py deleted file mode 100644 index 2aa7681..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetonsitedestinations.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassettargetruletargeting.py b/tap_facebook/facebook_business/adobjects/adassettargetruletargeting.py deleted file mode 100644 index 9848beb..0000000 --- a/tap_facebook/facebook_business/adobjects/adassettargetruletargeting.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adassettitle.py b/tap_facebook/facebook_business/adobjects/adassettitle.py deleted file mode 100644 index 60a855d..0000000 --- a/tap_facebook/facebook_business/adobjects/adassettitle.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/adassetvideo.py b/tap_facebook/facebook_business/adobjects/adassetvideo.py deleted file mode 100644 index 547a508..0000000 --- a/tap_facebook/facebook_business/adobjects/adassetvideo.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/adasyncrequest.py b/tap_facebook/facebook_business/adobjects/adasyncrequest.py deleted file mode 100644 index 410a0f7..0000000 --- a/tap_facebook/facebook_business/adobjects/adasyncrequest.py +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdAsyncRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdAsyncRequest = True - super(AdAsyncRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - async_request_set = 'async_request_set' - created_time = 'created_time' - id = 'id' - input = 'input' - result = 'result' - scope_object_id = 'scope_object_id' - status = 'status' - type = 'type' - updated_time = 'updated_time' - - class Statuses: - canceled = 'CANCELED' - canceled_dependency = 'CANCELED_DEPENDENCY' - error = 'ERROR' - error_conflicts = 'ERROR_CONFLICTS' - error_dependency = 'ERROR_DEPENDENCY' - initial = 'INITIAL' - in_progress = 'IN_PROGRESS' - pending_dependency = 'PENDING_DEPENDENCY' - process_by_ad_async_engine = 'PROCESS_BY_AD_ASYNC_ENGINE' - process_by_event_processor = 'PROCESS_BY_EVENT_PROCESSOR' - success = 'SUCCESS' - user_canceled = 'USER_CANCELED' - user_canceled_dependency = 'USER_CANCELED_DEPENDENCY' - - 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=AdAsyncRequest, - 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_request_set': 'AdAsyncRequestSet', - 'created_time': 'datetime', - 'id': 'string', - 'input': 'map', - 'result': 'map', - 'scope_object_id': 'string', - 'status': 'string', - 'type': 'string', - 'updated_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Statuses'] = AdAsyncRequest.Statuses.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adasyncrequestset.py b/tap_facebook/facebook_business/adobjects/adasyncrequestset.py deleted file mode 100644 index f655194..0000000 --- a/tap_facebook/facebook_business/adobjects/adasyncrequestset.py +++ /dev/null @@ -1,214 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdAsyncRequestSet( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdAsyncRequestSet = True - super(AdAsyncRequestSet, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - canceled_count = 'canceled_count' - created_time = 'created_time' - error_count = 'error_count' - id = 'id' - in_progress_count = 'in_progress_count' - initial_count = 'initial_count' - is_completed = 'is_completed' - name = 'name' - notification_mode = 'notification_mode' - notification_result = 'notification_result' - notification_status = 'notification_status' - notification_uri = 'notification_uri' - owner_id = 'owner_id' - success_count = 'success_count' - total_count = 'total_count' - updated_time = 'updated_time' - ad_specs = 'ad_specs' - - class NotificationMode: - off = 'OFF' - on_complete = 'ON_COMPLETE' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'asyncadrequestsets' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_async_ad_request_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 - if batch 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=AdAsyncRequestSet, - 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 = { - 'name': 'string', - 'notification_mode': 'notification_mode_enum', - 'notification_uri': 'string', - } - enums = { - 'notification_mode_enum': AdAsyncRequestSet.NotificationMode.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAsyncRequestSet, - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.adasyncrequest import AdAsyncRequest - param_types = { - 'statuses': 'list', - } - enums = { - 'statuses_enum': AdAsyncRequest.Statuses.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAsyncRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAsyncRequest, 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 = { - 'canceled_count': 'int', - 'created_time': 'datetime', - 'error_count': 'int', - 'id': 'string', - 'in_progress_count': 'int', - 'initial_count': 'unsigned int', - 'is_completed': 'bool', - 'name': 'string', - 'notification_mode': 'NotificationMode', - 'notification_result': 'AdAsyncRequestSetNotificationResult', - 'notification_status': 'string', - 'notification_uri': 'string', - 'owner_id': 'string', - 'success_count': 'int', - 'total_count': 'unsigned int', - 'updated_time': 'datetime', - 'ad_specs': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['NotificationMode'] = AdAsyncRequestSet.NotificationMode.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adasyncrequestsetnotificationresult.py b/tap_facebook/facebook_business/adobjects/adasyncrequestsetnotificationresult.py deleted file mode 100644 index 75bdcae..0000000 --- a/tap_facebook/facebook_business/adobjects/adasyncrequestsetnotificationresult.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdAsyncRequestSetNotificationResult( - AbstractObject, -): - - def __init__(self, api=None): - super(AdAsyncRequestSetNotificationResult, self).__init__() - self._isAdAsyncRequestSetNotificationResult = True - self._api = api - - class Field(AbstractObject.Field): - response = 'response' - status = 'status' - - _field_types = { - 'response': 'string', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adbidadjustments.py b/tap_facebook/facebook_business/adobjects/adbidadjustments.py deleted file mode 100644 index a8d3e2f..0000000 --- a/tap_facebook/facebook_business/adobjects/adbidadjustments.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdBidAdjustments( - AbstractObject, -): - - def __init__(self, api=None): - super(AdBidAdjustments, self).__init__() - self._isAdBidAdjustments = True - self._api = api - - class Field(AbstractObject.Field): - age_range = 'age_range' - page_types = 'page_types' - user_groups = 'user_groups' - - _field_types = { - 'age_range': 'map', - 'page_types': 'Object', - 'user_groups': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcampaignbidconstraint.py b/tap_facebook/facebook_business/adobjects/adcampaignbidconstraint.py deleted file mode 100644 index 6090e8b..0000000 --- a/tap_facebook/facebook_business/adobjects/adcampaignbidconstraint.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCampaignBidConstraint( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCampaignBidConstraint, self).__init__() - self._isAdCampaignBidConstraint = True - self._api = api - - class Field(AbstractObject.Field): - roas_average_floor = 'roas_average_floor' - - _field_types = { - 'roas_average_floor': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcampaigndeliveryestimate.py b/tap_facebook/facebook_business/adobjects/adcampaigndeliveryestimate.py deleted file mode 100644 index 7f47755..0000000 --- a/tap_facebook/facebook_business/adobjects/adcampaigndeliveryestimate.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCampaignDeliveryEstimate( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCampaignDeliveryEstimate, self).__init__() - self._isAdCampaignDeliveryEstimate = True - self._api = api - - class Field(AbstractObject.Field): - daily_outcomes_curve = 'daily_outcomes_curve' - estimate_dau = 'estimate_dau' - estimate_mau_lower_bound = 'estimate_mau_lower_bound' - estimate_mau_upper_bound = 'estimate_mau_upper_bound' - estimate_ready = 'estimate_ready' - targeting_optimization_types = 'targeting_optimization_types' - - 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' - 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 = { - 'daily_outcomes_curve': 'list', - 'estimate_dau': 'int', - 'estimate_mau_lower_bound': 'int', - 'estimate_mau_upper_bound': 'int', - 'estimate_ready': 'bool', - 'targeting_optimization_types': 'list>', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['OptimizationGoal'] = AdCampaignDeliveryEstimate.OptimizationGoal.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py b/tap_facebook/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py deleted file mode 100644 index dbcb8cd..0000000 --- a/tap_facebook/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCampaignDeliveryStatsUnsupportedReasons( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCampaignDeliveryStatsUnsupportedReasons, self).__init__() - self._isAdCampaignDeliveryStatsUnsupportedReasons = True - self._api = api - - class Field(AbstractObject.Field): - reason_data = 'reason_data' - reason_type = 'reason_type' - - _field_types = { - 'reason_data': 'list>', - 'reason_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py b/tap_facebook/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py deleted file mode 100644 index 2186a7d..0000000 --- a/tap_facebook/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCampaignFrequencyControlSpecs( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCampaignFrequencyControlSpecs, self).__init__() - self._isAdCampaignFrequencyControlSpecs = True - self._api = api - - class Field(AbstractObject.Field): - event = 'event' - interval_days = 'interval_days' - max_frequency = 'max_frequency' - - _field_types = { - 'event': 'string', - 'interval_days': 'unsigned int', - 'max_frequency': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcampaignissuesinfo.py b/tap_facebook/facebook_business/adobjects/adcampaignissuesinfo.py deleted file mode 100644 index 657184b..0000000 --- a/tap_facebook/facebook_business/adobjects/adcampaignissuesinfo.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCampaignIssuesInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCampaignIssuesInfo, self).__init__() - self._isAdCampaignIssuesInfo = True - self._api = api - - class Field(AbstractObject.Field): - error_code = 'error_code' - error_message = 'error_message' - error_summary = 'error_summary' - error_type = 'error_type' - level = 'level' - - _field_types = { - 'error_code': 'int', - 'error_message': 'string', - 'error_summary': 'string', - 'error_type': 'string', - 'level': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcampaignlearningstageinfo.py b/tap_facebook/facebook_business/adobjects/adcampaignlearningstageinfo.py deleted file mode 100644 index fef9b44..0000000 --- a/tap_facebook/facebook_business/adobjects/adcampaignlearningstageinfo.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCampaignLearningStageInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCampaignLearningStageInfo, self).__init__() - self._isAdCampaignLearningStageInfo = True - self._api = api - - class Field(AbstractObject.Field): - attribution_windows = 'attribution_windows' - conversions = 'conversions' - last_sig_edit_ts = 'last_sig_edit_ts' - status = 'status' - - _field_types = { - 'attribution_windows': 'list', - 'conversions': 'unsigned int', - 'last_sig_edit_ts': 'int', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcampaignoptimizationevent.py b/tap_facebook/facebook_business/adobjects/adcampaignoptimizationevent.py deleted file mode 100644 index 7ad4748..0000000 --- a/tap_facebook/facebook_business/adobjects/adcampaignoptimizationevent.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCampaignOptimizationEvent( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCampaignOptimizationEvent, self).__init__() - self._isAdCampaignOptimizationEvent = True - self._api = api - - class Field(AbstractObject.Field): - custom_conversion_id = 'custom_conversion_id' - event_sequence = 'event_sequence' - event_type = 'event_type' - - _field_types = { - 'custom_conversion_id': 'string', - 'event_sequence': 'unsigned int', - 'event_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcampaignpacedbidinfo.py b/tap_facebook/facebook_business/adobjects/adcampaignpacedbidinfo.py deleted file mode 100644 index 15e70df..0000000 --- a/tap_facebook/facebook_business/adobjects/adcampaignpacedbidinfo.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCampaignPacedBidInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCampaignPacedBidInfo, self).__init__() - self._isAdCampaignPacedBidInfo = True - self._api = api - - class Field(AbstractObject.Field): - bidding_status = 'bidding_status' - - _field_types = { - 'bidding_status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreative.py b/tap_facebook/facebook_business/adobjects/adcreative.py deleted file mode 100644 index 1aa9580..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreative.py +++ /dev/null @@ -1,541 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.mixins import HasAdLabels - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreative( - AbstractCrudObject, - HasAdLabels, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdCreative = True - super(AdCreative, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - actor_id = 'actor_id' - adlabels = 'adlabels' - applink_treatment = 'applink_treatment' - asset_feed_spec = 'asset_feed_spec' - authorization_category = 'authorization_category' - auto_update = 'auto_update' - body = 'body' - branded_content = 'branded_content' - branded_content_sponsor_page_id = 'branded_content_sponsor_page_id' - bundle_folder_id = 'bundle_folder_id' - call_to_action_type = 'call_to_action_type' - categorization_criteria = 'categorization_criteria' - category_media_source = 'category_media_source' - collaborative_ads_lsb_image_bank_id = 'collaborative_ads_lsb_image_bank_id' - 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' - effective_authorization_category = 'effective_authorization_category' - effective_instagram_media_id = 'effective_instagram_media_id' - effective_instagram_story_id = 'effective_instagram_story_id' - effective_object_story_id = 'effective_object_story_id' - enable_direct_install = 'enable_direct_install' - enable_launch_instant_app = 'enable_launch_instant_app' - facebook_branded_content = 'facebook_branded_content' - id = 'id' - image_crops = 'image_crops' - image_hash = 'image_hash' - image_url = 'image_url' - instagram_actor_id = 'instagram_actor_id' - instagram_branded_content = 'instagram_branded_content' - instagram_permalink_url = 'instagram_permalink_url' - instagram_story_id = 'instagram_story_id' - instagram_user_id = 'instagram_user_id' - interactive_components_spec = 'interactive_components_spec' - link_deep_link_url = 'link_deep_link_url' - 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' - object_story_id = 'object_story_id' - object_story_spec = 'object_story_spec' - object_type = 'object_type' - object_url = 'object_url' - omnichannel_link_spec = 'omnichannel_link_spec' - 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' - portrait_customizations = 'portrait_customizations' - product_set_id = 'product_set_id' - recommender_settings = 'recommender_settings' - source_instagram_media_id = 'source_instagram_media_id' - status = 'status' - template_url = 'template_url' - template_url_spec = 'template_url_spec' - thumbnail_id = 'thumbnail_id' - thumbnail_url = 'thumbnail_url' - title = 'title' - url_tags = 'url_tags' - use_page_actor_override = 'use_page_actor_override' - video_id = 'video_id' - call_to_action = 'call_to_action' - image_file = 'image_file' - is_dco_internal = 'is_dco_internal' - - class CallToActionType: - add_to_cart = 'ADD_TO_CART' - apply_now = 'APPLY_NOW' - audio_call = 'AUDIO_CALL' - book_now = 'BOOK_NOW' - book_travel = 'BOOK_TRAVEL' - buy = 'BUY' - buy_now = 'BUY_NOW' - buy_tickets = 'BUY_TICKETS' - call = 'CALL' - call_me = 'CALL_ME' - call_now = 'CALL_NOW' - confirm = 'CONFIRM' - contact = 'CONTACT' - contact_us = 'CONTACT_US' - donate = 'DONATE' - donate_now = 'DONATE_NOW' - download = 'DOWNLOAD' - event_rsvp = 'EVENT_RSVP' - find_a_group = 'FIND_A_GROUP' - find_your_groups = 'FIND_YOUR_GROUPS' - follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' - follow_page = 'FOLLOW_PAGE' - follow_user = 'FOLLOW_USER' - get_directions = 'GET_DIRECTIONS' - get_offer = 'GET_OFFER' - get_offer_view = 'GET_OFFER_VIEW' - get_promotions = 'GET_PROMOTIONS' - get_quote = 'GET_QUOTE' - get_showtimes = 'GET_SHOWTIMES' - get_started = 'GET_STARTED' - 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' - message_page = 'MESSAGE_PAGE' - mobile_download = 'MOBILE_DOWNLOAD' - no_button = 'NO_BUTTON' - open_instant_app = 'OPEN_INSTANT_APP' - open_link = 'OPEN_LINK' - order_now = 'ORDER_NOW' - pay_to_access = 'PAY_TO_ACCESS' - play_game = 'PLAY_GAME' - play_game_on_facebook = 'PLAY_GAME_ON_FACEBOOK' - purchase_gift_cards = 'PURCHASE_GIFT_CARDS' - raise_money = 'RAISE_MONEY' - record_now = 'RECORD_NOW' - refer_friends = 'REFER_FRIENDS' - request_time = 'REQUEST_TIME' - say_thanks = 'SAY_THANKS' - see_more = 'SEE_MORE' - sell_now = 'SELL_NOW' - send_a_gift = 'SEND_A_GIFT' - send_gift_money = 'SEND_GIFT_MONEY' - send_updates = 'SEND_UPDATES' - share = 'SHARE' - shop_now = 'SHOP_NOW' - sign_up = 'SIGN_UP' - sotto_subscribe = 'SOTTO_SUBSCRIBE' - start_order = 'START_ORDER' - subscribe = 'SUBSCRIBE' - swipe_up_product = 'SWIPE_UP_PRODUCT' - swipe_up_shop = 'SWIPE_UP_SHOP' - update_app = 'UPDATE_APP' - use_app = 'USE_APP' - use_mobile_app = 'USE_MOBILE_APP' - video_annotation = 'VIDEO_ANNOTATION' - video_call = 'VIDEO_CALL' - visit_pages_feed = 'VISIT_PAGES_FEED' - watch_more = 'WATCH_MORE' - watch_video = 'WATCH_VIDEO' - whatsapp_message = 'WHATSAPP_MESSAGE' - woodhenge_support = 'WOODHENGE_SUPPORT' - - class ObjectType: - application = 'APPLICATION' - domain = 'DOMAIN' - event = 'EVENT' - invalid = 'INVALID' - offer = 'OFFER' - page = 'PAGE' - photo = 'PHOTO' - post_deleted = 'POST_DELETED' - privacy_check_fail = 'PRIVACY_CHECK_FAIL' - share = 'SHARE' - status = 'STATUS' - store_item = 'STORE_ITEM' - video = 'VIDEO' - - class Status: - active = 'ACTIVE' - deleted = 'DELETED' - in_process = 'IN_PROCESS' - with_issues = 'WITH_ISSUES' - - class ApplinkTreatment: - automatic = 'automatic' - deeplink_with_appstore_fallback = 'deeplink_with_appstore_fallback' - deeplink_with_web_fallback = 'deeplink_with_web_fallback' - web_only = 'web_only' - - class AuthorizationCategory: - none = 'NONE' - political = 'POLITICAL' - political_with_digitally_created_media = 'POLITICAL_WITH_DIGITALLY_CREATED_MEDIA' - - class CategorizationCriteria: - brand = 'brand' - category = 'category' - product_type = 'product_type' - - class CategoryMediaSource: - category = 'CATEGORY' - mixed = 'MIXED' - products_collage = 'PRODUCTS_COLLAGE' - products_slideshow = 'PRODUCTS_SLIDESHOW' - - class DynamicAdVoice: - dynamic = 'DYNAMIC' - story_owner = 'STORY_OWNER' - - class Operator: - all = 'ALL' - any = 'ANY' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adcreatives' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad_creative(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 = { - 'account_id': 'string', - 'adlabels': 'list', - 'name': 'string', - 'status': 'status_enum', - } - enums = { - 'status_enum': AdCreative.Status.__dict__.values(), - } - 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 = { - 'thumbnail_height': 'unsigned int', - 'thumbnail_width': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - 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 = { - 'account_id': 'string', - 'adlabels': 'list', - 'name': 'string', - 'status': 'status_enum', - } - enums = { - 'status_enum': AdCreative.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'adlabels': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adlabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCreative, 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_creative_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.') - from facebook_business.adobjects.adcreativeinsights import AdCreativeInsights - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/creative_insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreativeInsights, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCreativeInsights, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.adpreview import AdPreview - param_types = { - 'ad_format': 'ad_format_enum', - 'creative_feature': 'creative_feature_enum', - 'dynamic_asset_label': 'string', - 'dynamic_creative_spec': 'Object', - 'dynamic_customization': 'Object', - 'end_date': 'datetime', - 'height': 'unsigned int', - 'locale': 'string', - 'place_page_id': 'int', - 'post': 'Object', - 'product_item_ids': 'list', - 'render_type': 'render_type_enum', - 'start_date': 'datetime', - 'width': 'unsigned int', - } - enums = { - 'ad_format_enum': AdPreview.AdFormat.__dict__.values(), - 'creative_feature_enum': AdPreview.CreativeFeature.__dict__.values(), - 'render_type_enum': AdPreview.RenderType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/previews', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdPreview, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdPreview, 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', - 'actor_id': 'string', - 'adlabels': 'list', - 'applink_treatment': 'string', - 'asset_feed_spec': 'AdAssetFeedSpec', - 'authorization_category': 'string', - 'auto_update': 'bool', - 'body': 'string', - 'branded_content': 'AdCreativeBrandedContentAds', - 'branded_content_sponsor_page_id': 'string', - 'bundle_folder_id': 'string', - 'call_to_action_type': 'CallToActionType', - 'categorization_criteria': 'string', - 'category_media_source': 'string', - 'collaborative_ads_lsb_image_bank_id': 'string', - 'creative_sourcing_spec': 'AdCreativeSourcingSpec', - 'degrees_of_freedom_spec': 'AdCreativeDegreesOfFreedomSpec', - 'destination_set_id': 'string', - 'dynamic_ad_voice': 'string', - 'effective_authorization_category': 'string', - 'effective_instagram_media_id': 'string', - 'effective_instagram_story_id': 'string', - 'effective_object_story_id': 'string', - 'enable_direct_install': 'bool', - 'enable_launch_instant_app': 'bool', - 'facebook_branded_content': 'AdCreativeFacebookBrandedContent', - 'id': 'string', - 'image_crops': 'AdsImageCrops', - 'image_hash': 'string', - 'image_url': 'string', - 'instagram_actor_id': 'string', - 'instagram_branded_content': 'AdCreativeInstagramBrandedContent', - 'instagram_permalink_url': 'string', - 'instagram_story_id': 'string', - 'instagram_user_id': 'string', - 'interactive_components_spec': 'AdCreativeInteractiveComponentsSpec', - 'link_deep_link_url': 'string', - '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', - 'object_story_id': 'string', - 'object_story_spec': 'AdCreativeObjectStorySpec', - 'object_type': 'ObjectType', - 'object_url': 'string', - 'omnichannel_link_spec': 'AdCreativeOmnichannelLinkSpec', - 'photo_album_source_object_story_id': 'string', - 'place_page_set_id': 'string', - 'platform_customizations': 'AdCreativePlatformCustomization', - 'playable_asset_id': 'string', - 'portrait_customizations': 'AdCreativePortraitCustomizations', - 'product_set_id': 'string', - 'recommender_settings': 'AdCreativeRecommenderSettings', - 'source_instagram_media_id': 'string', - 'status': 'Status', - 'template_url': 'string', - 'template_url_spec': 'AdCreativeTemplateURLSpec', - 'thumbnail_id': 'string', - 'thumbnail_url': 'string', - 'title': 'string', - 'url_tags': 'string', - 'use_page_actor_override': 'bool', - 'video_id': 'string', - 'call_to_action': 'Object', - 'image_file': 'string', - 'is_dco_internal': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['CallToActionType'] = AdCreative.CallToActionType.__dict__.values() - field_enum_info['ObjectType'] = AdCreative.ObjectType.__dict__.values() - field_enum_info['Status'] = AdCreative.Status.__dict__.values() - field_enum_info['ApplinkTreatment'] = AdCreative.ApplinkTreatment.__dict__.values() - field_enum_info['AuthorizationCategory'] = AdCreative.AuthorizationCategory.__dict__.values() - field_enum_info['CategorizationCriteria'] = AdCreative.CategorizationCriteria.__dict__.values() - field_enum_info['CategoryMediaSource'] = AdCreative.CategoryMediaSource.__dict__.values() - field_enum_info['DynamicAdVoice'] = AdCreative.DynamicAdVoice.__dict__.values() - field_enum_info['Operator'] = AdCreative.Operator.__dict__.values() - return field_enum_info - - -def _setitem_trigger(self, key, value): - if key == 'id': - self._data['creative_id'] = self['id'] diff --git a/tap_facebook/facebook_business/adobjects/adcreativeaddisclaimer.py b/tap_facebook/facebook_business/adobjects/adcreativeaddisclaimer.py deleted file mode 100644 index 6eeec19..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeaddisclaimer.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeAdDisclaimer( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeAdDisclaimer, self).__init__() - self._isAdCreativeAdDisclaimer = True - self._api = api - - class Field(AbstractObject.Field): - text = 'text' - title = 'title' - url = 'url' - - _field_types = { - 'text': 'string', - 'title': 'string', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentads.py b/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentads.py deleted file mode 100644 index 22366ad..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentads.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeBrandedContentAds( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeBrandedContentAds, self).__init__() - self._isAdCreativeBrandedContentAds = True - self._api = api - - class Field(AbstractObject.Field): - ad_format = 'ad_format' - creator_ad_permission_type = 'creator_ad_permission_type' - 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', - 'creator_ad_permission_type': 'string', - 'instagram_boost_post_access_token': 'string', - 'is_mca_internal': 'bool', - 'partners': 'list', - 'promoted_page_id': 'string', - 'ui_version': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentadspartners.py b/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentadspartners.py deleted file mode 100644 index d0b7d2c..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativebrandedcontentadspartners.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py b/tap_facebook/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py deleted file mode 100644 index 7307ae9..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeCollectionThumbnailInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeCollectionThumbnailInfo, self).__init__() - self._isAdCreativeCollectionThumbnailInfo = True - self._api = api - - class Field(AbstractObject.Field): - element_child_index = 'element_child_index' - element_crops = 'element_crops' - element_id = 'element_id' - - _field_types = { - 'element_child_index': 'int', - 'element_crops': 'AdsImageCrops', - 'element_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativedegreesoffreedomspec.py b/tap_facebook/facebook_business/adobjects/adcreativedegreesoffreedomspec.py deleted file mode 100644 index 51559d6..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativedegreesoffreedomspec.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeDegreesOfFreedomSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeDegreesOfFreedomSpec, self).__init__() - self._isAdCreativeDegreesOfFreedomSpec = True - self._api = api - - class Field(AbstractObject.Field): - ad_handle_type = 'ad_handle_type' - creative_features_spec = 'creative_features_spec' - degrees_of_freedom_type = 'degrees_of_freedom_type' - image_transformation_types = 'image_transformation_types' - multi_media_transformation_type = 'multi_media_transformation_type' - stories_transformation_types = 'stories_transformation_types' - text_transformation_types = 'text_transformation_types' - video_transformation_types = 'video_transformation_types' - - _field_types = { - 'ad_handle_type': 'string', - 'creative_features_spec': 'AdCreativeFeaturesSpec', - 'degrees_of_freedom_type': 'string', - 'image_transformation_types': 'list', - 'multi_media_transformation_type': 'string', - 'stories_transformation_types': 'list', - 'text_transformation_types': 'list', - 'video_transformation_types': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativefacebookbrandedcontent.py b/tap_facebook/facebook_business/adobjects/adcreativefacebookbrandedcontent.py deleted file mode 100644 index c042871..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativefacebookbrandedcontent.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeFacebookBrandedContent( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeFacebookBrandedContent, self).__init__() - self._isAdCreativeFacebookBrandedContent = True - self._api = api - - class Field(AbstractObject.Field): - shared_to_sponsor_status = 'shared_to_sponsor_status' - sponsor_page_id = 'sponsor_page_id' - sponsor_relationship = 'sponsor_relationship' - - _field_types = { - 'shared_to_sponsor_status': 'string', - 'sponsor_page_id': 'string', - 'sponsor_relationship': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativefeaturedetails.py b/tap_facebook/facebook_business/adobjects/adcreativefeaturedetails.py deleted file mode 100644 index bf7ccce..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativefeaturedetails.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adcreativefeaturesspec.py b/tap_facebook/facebook_business/adobjects/adcreativefeaturesspec.py deleted file mode 100644 index cf53985..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativefeaturesspec.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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): - advantage_plus_creative = 'advantage_plus_creative' - audio = 'audio' - carousel_to_video = 'carousel_to_video' - cv_transformation = 'cv_transformation' - description_automation = 'description_automation' - dha_optimization = 'dha_optimization' - ig_glados_feed = 'ig_glados_feed' - image_auto_crop = 'image_auto_crop' - image_background_gen = 'image_background_gen' - 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' - 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_highlight = 'video_highlight' - - _field_types = { - 'advantage_plus_creative': 'AdCreativeFeatureDetails', - 'audio': 'AdCreativeFeatureDetails', - 'carousel_to_video': 'AdCreativeFeatureDetails', - 'cv_transformation': 'AdCreativeFeatureDetails', - 'description_automation': 'AdCreativeFeatureDetails', - 'dha_optimization': 'AdCreativeFeatureDetails', - 'ig_glados_feed': 'AdCreativeFeatureDetails', - 'image_auto_crop': 'AdCreativeFeatureDetails', - 'image_background_gen': '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', - 'standard_enhancements': 'AdCreativeFeatureDetails', - 'standard_enhancements_catalog': 'AdCreativeFeatureDetails', - 'text_generation': 'AdCreativeFeatureDetails', - 'text_optimizations': 'AdCreativeFeatureDetails', - 'video_auto_crop': 'AdCreativeFeatureDetails', - 'video_highlight': 'AdCreativeFeatureDetails', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativeinsights.py b/tap_facebook/facebook_business/adobjects/adcreativeinsights.py deleted file mode 100644 index 1faf288..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeinsights.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeInsights( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeInsights, self).__init__() - self._isAdCreativeInsights = True - self._api = api - - class Field(AbstractObject.Field): - aesthetics = 'aesthetics' - - _field_types = { - 'aesthetics': 'list>', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py b/tap_facebook/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py deleted file mode 100644 index fe469dc..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeInstagramBrandedContent( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeInstagramBrandedContent, self).__init__() - self._isAdCreativeInstagramBrandedContent = True - self._api = api - - class Field(AbstractObject.Field): - sponsor_id = 'sponsor_id' - - _field_types = { - 'sponsor_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py b/tap_facebook/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py deleted file mode 100644 index fa60a74..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeInteractiveComponentsSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeInteractiveComponentsSpec, self).__init__() - self._isAdCreativeInteractiveComponentsSpec = True - self._api = api - - class Field(AbstractObject.Field): - child_attachments = 'child_attachments' - components = 'components' - - _field_types = { - 'child_attachments': 'list', - 'components': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdata.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdata.py deleted file mode 100644 index 6075357..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdata.py +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkData( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkData, self).__init__() - self._isAdCreativeLinkData = True - self._api = api - - class Field(AbstractObject.Field): - ad_context = 'ad_context' - 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' - caption = 'caption' - child_attachments = 'child_attachments' - collection_thumbnails = 'collection_thumbnails' - customization_rules_spec = 'customization_rules_spec' - description = 'description' - event_id = 'event_id' - force_single_link = 'force_single_link' - format_option = 'format_option' - image_crops = 'image_crops' - image_hash = 'image_hash' - image_layer_specs = 'image_layer_specs' - image_overlay_spec = 'image_overlay_spec' - link = 'link' - message = 'message' - multi_share_end_card = 'multi_share_end_card' - multi_share_optimized = 'multi_share_optimized' - name = 'name' - offer_id = 'offer_id' - page_welcome_message = 'page_welcome_message' - picture = 'picture' - post_click_configuration = 'post_click_configuration' - preferred_image_tags = 'preferred_image_tags' - retailer_item_ids = 'retailer_item_ids' - show_multiple_images = 'show_multiple_images' - static_fallback_spec = 'static_fallback_spec' - use_flexible_image_aspect_ratio = 'use_flexible_image_aspect_ratio' - - 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' - single_image = 'single_image' - - _field_types = { - 'ad_context': 'string', - 'additional_image_index': 'int', - 'app_link_spec': 'AdCreativeLinkDataAppLinkSpec', - 'attachment_style': 'string', - 'automated_product_tags': 'bool', - 'branded_content_shared_to_sponsor_status': 'string', - 'branded_content_sponsor_page_id': 'string', - 'call_to_action': 'AdCreativeLinkDataCallToAction', - 'caption': 'string', - 'child_attachments': 'list', - 'collection_thumbnails': 'list', - 'customization_rules_spec': 'list', - 'description': 'string', - 'event_id': 'string', - 'force_single_link': 'bool', - 'format_option': 'FormatOption', - 'image_crops': 'AdsImageCrops', - 'image_hash': 'string', - 'image_layer_specs': 'list', - 'image_overlay_spec': 'AdCreativeLinkDataImageOverlaySpec', - 'link': 'string', - 'message': 'string', - 'multi_share_end_card': 'bool', - 'multi_share_optimized': 'bool', - 'name': 'string', - 'offer_id': 'string', - 'page_welcome_message': 'string', - 'picture': 'string', - 'post_click_configuration': 'AdCreativePostClickConfiguration', - 'preferred_image_tags': 'list', - 'retailer_item_ids': 'list', - 'show_multiple_images': 'bool', - 'static_fallback_spec': 'AdCreativeStaticFallbackSpec', - 'use_flexible_image_aspect_ratio': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['FormatOption'] = AdCreativeLinkData.FormatOption.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdataapplinkspec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdataapplinkspec.py deleted file mode 100644 index 0f47bcb..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdataapplinkspec.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkDataAppLinkSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkDataAppLinkSpec, self).__init__() - self._isAdCreativeLinkDataAppLinkSpec = True - self._api = api - - class Field(AbstractObject.Field): - android = 'android' - ios = 'ios' - ipad = 'ipad' - iphone = 'iphone' - - _field_types = { - 'android': 'list', - 'ios': 'list', - 'ipad': 'list', - 'iphone': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoaction.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoaction.py deleted file mode 100644 index 2a9a7b8..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoaction.py +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkDataCallToAction( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkDataCallToAction, self).__init__() - self._isAdCreativeLinkDataCallToAction = True - self._api = api - - class Field(AbstractObject.Field): - type = 'type' - value = 'value' - - class Type: - add_to_cart = 'ADD_TO_CART' - apply_now = 'APPLY_NOW' - audio_call = 'AUDIO_CALL' - book_now = 'BOOK_NOW' - book_travel = 'BOOK_TRAVEL' - buy = 'BUY' - buy_now = 'BUY_NOW' - buy_tickets = 'BUY_TICKETS' - call = 'CALL' - call_me = 'CALL_ME' - call_now = 'CALL_NOW' - confirm = 'CONFIRM' - contact = 'CONTACT' - contact_us = 'CONTACT_US' - donate = 'DONATE' - donate_now = 'DONATE_NOW' - download = 'DOWNLOAD' - event_rsvp = 'EVENT_RSVP' - find_a_group = 'FIND_A_GROUP' - find_your_groups = 'FIND_YOUR_GROUPS' - follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' - follow_page = 'FOLLOW_PAGE' - follow_user = 'FOLLOW_USER' - get_directions = 'GET_DIRECTIONS' - get_offer = 'GET_OFFER' - get_offer_view = 'GET_OFFER_VIEW' - get_promotions = 'GET_PROMOTIONS' - get_quote = 'GET_QUOTE' - get_showtimes = 'GET_SHOWTIMES' - get_started = 'GET_STARTED' - 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' - message_page = 'MESSAGE_PAGE' - mobile_download = 'MOBILE_DOWNLOAD' - no_button = 'NO_BUTTON' - open_instant_app = 'OPEN_INSTANT_APP' - open_link = 'OPEN_LINK' - order_now = 'ORDER_NOW' - pay_to_access = 'PAY_TO_ACCESS' - play_game = 'PLAY_GAME' - play_game_on_facebook = 'PLAY_GAME_ON_FACEBOOK' - purchase_gift_cards = 'PURCHASE_GIFT_CARDS' - raise_money = 'RAISE_MONEY' - record_now = 'RECORD_NOW' - refer_friends = 'REFER_FRIENDS' - request_time = 'REQUEST_TIME' - say_thanks = 'SAY_THANKS' - see_more = 'SEE_MORE' - sell_now = 'SELL_NOW' - send_a_gift = 'SEND_A_GIFT' - send_gift_money = 'SEND_GIFT_MONEY' - send_updates = 'SEND_UPDATES' - share = 'SHARE' - shop_now = 'SHOP_NOW' - sign_up = 'SIGN_UP' - sotto_subscribe = 'SOTTO_SUBSCRIBE' - start_order = 'START_ORDER' - subscribe = 'SUBSCRIBE' - swipe_up_product = 'SWIPE_UP_PRODUCT' - swipe_up_shop = 'SWIPE_UP_SHOP' - update_app = 'UPDATE_APP' - use_app = 'USE_APP' - use_mobile_app = 'USE_MOBILE_APP' - video_annotation = 'VIDEO_ANNOTATION' - video_call = 'VIDEO_CALL' - visit_pages_feed = 'VISIT_PAGES_FEED' - watch_more = 'WATCH_MORE' - watch_video = 'WATCH_VIDEO' - whatsapp_message = 'WHATSAPP_MESSAGE' - woodhenge_support = 'WOODHENGE_SUPPORT' - - _field_types = { - 'type': 'Type', - 'value': 'AdCreativeLinkDataCallToActionValue', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Type'] = AdCreativeLinkDataCallToAction.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py deleted file mode 100644 index c4f8325..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkDataCallToActionValue( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkDataCallToActionValue, self).__init__() - self._isAdCreativeLinkDataCallToActionValue = True - self._api = api - - class Field(AbstractObject.Field): - app_destination = 'app_destination' - app_link = 'app_link' - application = 'application' - event_id = 'event_id' - lead_gen_form_id = 'lead_gen_form_id' - link = 'link' - link_caption = 'link_caption' - link_format = 'link_format' - page = 'page' - product_link = 'product_link' - whatsapp_number = 'whatsapp_number' - - _field_types = { - 'app_destination': 'string', - 'app_link': 'string', - 'application': 'string', - 'event_id': 'string', - 'lead_gen_form_id': 'string', - 'link': 'string', - 'link_caption': 'string', - 'link_format': 'string', - 'page': 'string', - 'product_link': 'string', - 'whatsapp_number': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatachildattachment.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatachildattachment.py deleted file mode 100644 index a664cd7..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdatachildattachment.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkDataChildAttachment( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkDataChildAttachment, self).__init__() - self._isAdCreativeLinkDataChildAttachment = True - self._api = api - - class Field(AbstractObject.Field): - call_to_action = 'call_to_action' - caption = 'caption' - description = 'description' - image_crops = 'image_crops' - image_hash = 'image_hash' - link = 'link' - name = 'name' - picture = 'picture' - place_data = 'place_data' - static_card = 'static_card' - video_id = 'video_id' - - _field_types = { - 'call_to_action': 'AdCreativeLinkDataCallToAction', - 'caption': 'string', - 'description': 'string', - 'image_crops': 'AdsImageCrops', - 'image_hash': 'string', - 'link': 'string', - 'name': 'string', - 'picture': 'string', - 'place_data': 'AdCreativePlaceData', - 'static_card': 'bool', - 'video_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py deleted file mode 100644 index cbc9f3d..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkDataImageLayerSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkDataImageLayerSpec, self).__init__() - self._isAdCreativeLinkDataImageLayerSpec = True - self._api = api - - class Field(AbstractObject.Field): - blending_mode = 'blending_mode' - content = 'content' - frame_image_hash = 'frame_image_hash' - frame_source = 'frame_source' - image_source = 'image_source' - layer_type = 'layer_type' - opacity = 'opacity' - overlay_position = 'overlay_position' - overlay_shape = 'overlay_shape' - scale = 'scale' - shape_color = 'shape_color' - text_color = 'text_color' - text_font = 'text_font' - - class BlendingMode: - lighten = 'lighten' - multiply = 'multiply' - normal = 'normal' - - class FrameSource: - custom = 'custom' - - class ImageSource: - catalog = 'catalog' - - class LayerType: - frame_overlay = 'frame_overlay' - image = 'image' - text_overlay = 'text_overlay' - - class OverlayPosition: - bottom = 'bottom' - bottom_left = 'bottom_left' - bottom_right = 'bottom_right' - center = 'center' - left = 'left' - right = 'right' - top = 'top' - top_left = 'top_left' - top_right = 'top_right' - - class OverlayShape: - circle = 'circle' - none = 'none' - pill = 'pill' - rectangle = 'rectangle' - triangle = 'triangle' - - class TextFont: - 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' - open_sans_condensed_bold = 'open_sans_condensed_bold' - pt_serif_bold = 'pt_serif_bold' - roboto_condensed_regular = 'roboto_condensed_regular' - roboto_medium = 'roboto_medium' - - _field_types = { - 'blending_mode': 'BlendingMode', - 'content': 'Object', - 'frame_image_hash': 'string', - 'frame_source': 'FrameSource', - 'image_source': 'ImageSource', - 'layer_type': 'LayerType', - 'opacity': 'int', - 'overlay_position': 'OverlayPosition', - 'overlay_shape': 'OverlayShape', - 'scale': 'int', - 'shape_color': 'string', - 'text_color': 'string', - 'text_font': 'TextFont', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['BlendingMode'] = AdCreativeLinkDataImageLayerSpec.BlendingMode.__dict__.values() - field_enum_info['FrameSource'] = AdCreativeLinkDataImageLayerSpec.FrameSource.__dict__.values() - field_enum_info['ImageSource'] = AdCreativeLinkDataImageLayerSpec.ImageSource.__dict__.values() - field_enum_info['LayerType'] = AdCreativeLinkDataImageLayerSpec.LayerType.__dict__.values() - field_enum_info['OverlayPosition'] = AdCreativeLinkDataImageLayerSpec.OverlayPosition.__dict__.values() - field_enum_info['OverlayShape'] = AdCreativeLinkDataImageLayerSpec.OverlayShape.__dict__.values() - field_enum_info['TextFont'] = AdCreativeLinkDataImageLayerSpec.TextFont.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py deleted file mode 100644 index 024ec68..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkDataImageOverlaySpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkDataImageOverlaySpec, self).__init__() - self._isAdCreativeLinkDataImageOverlaySpec = True - self._api = api - - class Field(AbstractObject.Field): - custom_text_type = 'custom_text_type' - float_with_margin = 'float_with_margin' - overlay_template = 'overlay_template' - position = 'position' - text_font = 'text_font' - text_template_tags = 'text_template_tags' - text_type = 'text_type' - theme_color = 'theme_color' - - class CustomTextType: - free_shipping = 'free_shipping' - popular = 'popular' - - class OverlayTemplate: - circle_with_text = 'circle_with_text' - pill_with_text = 'pill_with_text' - triangle_with_text = 'triangle_with_text' - - class Position: - bottom_left = 'bottom_left' - bottom_right = 'bottom_right' - top_left = 'top_left' - top_right = 'top_right' - - class TextFont: - droid_serif_regular = 'droid_serif_regular' - dynads_hybrid_bold = 'dynads_hybrid_bold' - lato_regular = 'lato_regular' - noto_sans_regular = 'noto_sans_regular' - nunito_sans_bold = 'nunito_sans_bold' - open_sans_bold = 'open_sans_bold' - open_sans_condensed_bold = 'open_sans_condensed_bold' - pt_serif_bold = 'pt_serif_bold' - roboto_condensed_regular = 'roboto_condensed_regular' - roboto_medium = 'roboto_medium' - - class TextType: - automated_personalize = 'automated_personalize' - custom = 'custom' - disclaimer = 'disclaimer' - from_price = 'from_price' - guest_rating = 'guest_rating' - percentage_off = 'percentage_off' - price = 'price' - star_rating = 'star_rating' - strikethrough_price = 'strikethrough_price' - sustainable = 'sustainable' - - class ThemeColor: - background_000000_text_ffffff = 'background_000000_text_ffffff' - background_0090ff_text_ffffff = 'background_0090ff_text_ffffff' - background_00af4c_text_ffffff = 'background_00af4c_text_ffffff' - background_595959_text_ffffff = 'background_595959_text_ffffff' - background_755dde_text_ffffff = 'background_755dde_text_ffffff' - background_e50900_text_ffffff = 'background_e50900_text_ffffff' - background_f23474_text_ffffff = 'background_f23474_text_ffffff' - background_f78400_text_ffffff = 'background_f78400_text_ffffff' - background_ffffff_text_000000 = 'background_ffffff_text_000000' - background_ffffff_text_007ad0 = 'background_ffffff_text_007ad0' - background_ffffff_text_009c2a = 'background_ffffff_text_009c2a' - background_ffffff_text_646464 = 'background_ffffff_text_646464' - background_ffffff_text_755dde = 'background_ffffff_text_755dde' - background_ffffff_text_c91b00 = 'background_ffffff_text_c91b00' - background_ffffff_text_f23474 = 'background_ffffff_text_f23474' - background_ffffff_text_f78400 = 'background_ffffff_text_f78400' - - _field_types = { - 'custom_text_type': 'CustomTextType', - 'float_with_margin': 'bool', - 'overlay_template': 'OverlayTemplate', - 'position': 'Position', - 'text_font': 'TextFont', - 'text_template_tags': 'list', - 'text_type': 'TextType', - 'theme_color': 'ThemeColor', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['CustomTextType'] = AdCreativeLinkDataImageOverlaySpec.CustomTextType.__dict__.values() - field_enum_info['OverlayTemplate'] = AdCreativeLinkDataImageOverlaySpec.OverlayTemplate.__dict__.values() - field_enum_info['Position'] = AdCreativeLinkDataImageOverlaySpec.Position.__dict__.values() - field_enum_info['TextFont'] = AdCreativeLinkDataImageOverlaySpec.TextFont.__dict__.values() - field_enum_info['TextType'] = AdCreativeLinkDataImageOverlaySpec.TextType.__dict__.values() - field_enum_info['ThemeColor'] = AdCreativeLinkDataImageOverlaySpec.ThemeColor.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py deleted file mode 100644 index 3b51399..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkDataSponsorshipInfoSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkDataSponsorshipInfoSpec, self).__init__() - self._isAdCreativeLinkDataSponsorshipInfoSpec = True - self._api = api - - class Field(AbstractObject.Field): - sponsor_image_url = 'sponsor_image_url' - sponsor_name = 'sponsor_name' - - _field_types = { - 'sponsor_image_url': 'string', - 'sponsor_name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py b/tap_facebook/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py deleted file mode 100644 index 0a3c196..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeLinkDataTemplateVideoSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeLinkDataTemplateVideoSpec, self).__init__() - self._isAdCreativeLinkDataTemplateVideoSpec = True - self._api = api - - class Field(AbstractObject.Field): - categorization_criteria = 'categorization_criteria' - customization = 'customization' - template_id = 'template_id' - - _field_types = { - 'categorization_criteria': 'string', - 'customization': 'list>', - 'template_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativeobjectstoryspec.py b/tap_facebook/facebook_business/adobjects/adcreativeobjectstoryspec.py deleted file mode 100644 index 38c2d17..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeobjectstoryspec.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeObjectStorySpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeObjectStorySpec, self).__init__() - self._isAdCreativeObjectStorySpec = True - self._api = api - - class Field(AbstractObject.Field): - instagram_actor_id = 'instagram_actor_id' - link_data = 'link_data' - page_id = 'page_id' - photo_data = 'photo_data' - template_data = 'template_data' - text_data = 'text_data' - video_data = 'video_data' - - _field_types = { - 'instagram_actor_id': 'string', - 'link_data': 'AdCreativeLinkData', - 'page_id': 'string', - 'photo_data': 'AdCreativePhotoData', - 'template_data': 'AdCreativeLinkData', - 'text_data': 'AdCreativeTextData', - 'video_data': 'AdCreativeVideoData', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativeomnichannellinkspec.py b/tap_facebook/facebook_business/adobjects/adcreativeomnichannellinkspec.py deleted file mode 100644 index 7046d48..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeomnichannellinkspec.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeOmnichannelLinkSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeOmnichannelLinkSpec, self).__init__() - self._isAdCreativeOmnichannelLinkSpec = True - self._api = api - - class Field(AbstractObject.Field): - app = 'app' - web = 'web' - - _field_types = { - 'app': 'Object', - 'web': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativephotodata.py b/tap_facebook/facebook_business/adobjects/adcreativephotodata.py deleted file mode 100644 index 882e572..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativephotodata.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativePhotoData( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativePhotoData, self).__init__() - self._isAdCreativePhotoData = True - self._api = api - - class Field(AbstractObject.Field): - branded_content_shared_to_sponsor_status = 'branded_content_shared_to_sponsor_status' - branded_content_sponsor_page_id = 'branded_content_sponsor_page_id' - caption = 'caption' - image_hash = 'image_hash' - page_welcome_message = 'page_welcome_message' - url = 'url' - - _field_types = { - 'branded_content_shared_to_sponsor_status': 'string', - 'branded_content_sponsor_page_id': 'string', - 'caption': 'string', - 'image_hash': 'string', - 'page_welcome_message': 'string', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativephotodatamediaelements.py b/tap_facebook/facebook_business/adobjects/adcreativephotodatamediaelements.py deleted file mode 100644 index 2f123dd..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativephotodatamediaelements.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativePhotoDataMediaElements( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativePhotoDataMediaElements, self).__init__() - self._isAdCreativePhotoDataMediaElements = 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/tap_facebook/facebook_business/adobjects/adcreativeplacedata.py b/tap_facebook/facebook_business/adobjects/adcreativeplacedata.py deleted file mode 100644 index 2a98e13..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeplacedata.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativePlaceData( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativePlaceData, self).__init__() - self._isAdCreativePlaceData = True - self._api = api - - class Field(AbstractObject.Field): - address_string = 'address_string' - label = 'label' - latitude = 'latitude' - location_source_id = 'location_source_id' - longitude = 'longitude' - type = 'type' - - _field_types = { - 'address_string': 'string', - 'label': 'string', - 'latitude': 'float', - 'location_source_id': 'string', - 'longitude': 'float', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativeplatformcustomization.py b/tap_facebook/facebook_business/adobjects/adcreativeplatformcustomization.py deleted file mode 100644 index 34f1d35..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeplatformcustomization.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativePlatformCustomization( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativePlatformCustomization, self).__init__() - self._isAdCreativePlatformCustomization = True - self._api = api - - class Field(AbstractObject.Field): - instagram = 'instagram' - - _field_types = { - 'instagram': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativeportraitcustomizations.py b/tap_facebook/facebook_business/adobjects/adcreativeportraitcustomizations.py deleted file mode 100644 index 1e6d150..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativeportraitcustomizations.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativePortraitCustomizations( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativePortraitCustomizations, self).__init__() - self._isAdCreativePortraitCustomizations = True - self._api = api - - class Field(AbstractObject.Field): - carousel_delivery_mode = 'carousel_delivery_mode' - specifications = 'specifications' - - _field_types = { - 'carousel_delivery_mode': 'string', - 'specifications': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativepostclickconfiguration.py b/tap_facebook/facebook_business/adobjects/adcreativepostclickconfiguration.py deleted file mode 100644 index 937e520..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativepostclickconfiguration.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativePostClickConfiguration( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativePostClickConfiguration, self).__init__() - self._isAdCreativePostClickConfiguration = True - self._api = api - - class Field(AbstractObject.Field): - post_click_item_description = 'post_click_item_description' - post_click_item_headline = 'post_click_item_headline' - - _field_types = { - 'post_click_item_description': 'string', - 'post_click_item_headline': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativepromotionmetadataspec.py b/tap_facebook/facebook_business/adobjects/adcreativepromotionmetadataspec.py deleted file mode 100644 index 36b73bd..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativepromotionmetadataspec.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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': 'datetime', - 'id': 'string', - 'promotion_source': 'string', - 'promotion_type': 'string', - 'promotion_value': 'float', - 'required_code': 'string', - 'start_date': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativerecommendersettings.py b/tap_facebook/facebook_business/adobjects/adcreativerecommendersettings.py deleted file mode 100644 index 2eb3e1f..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativerecommendersettings.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeRecommenderSettings( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeRecommenderSettings, self).__init__() - self._isAdCreativeRecommenderSettings = True - self._api = api - - class Field(AbstractObject.Field): - preferred_events = 'preferred_events' - product_sales_channel = 'product_sales_channel' - - _field_types = { - 'preferred_events': 'list', - 'product_sales_channel': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativesitelinksspec.py b/tap_facebook/facebook_business/adobjects/adcreativesitelinksspec.py deleted file mode 100644 index 1c9db27..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativesitelinksspec.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/adcreativesourcingspec.py b/tap_facebook/facebook_business/adobjects/adcreativesourcingspec.py deleted file mode 100644 index 1bc965e..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativesourcingspec.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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' - - _field_types = { - 'associated_product_set_id': 'string', - 'promotion_metadata_spec': 'list', - 'site_links_spec': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativestaticfallbackspec.py b/tap_facebook/facebook_business/adobjects/adcreativestaticfallbackspec.py deleted file mode 100644 index a23e4ba..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativestaticfallbackspec.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeStaticFallbackSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeStaticFallbackSpec, self).__init__() - self._isAdCreativeStaticFallbackSpec = True - self._api = api - - class Field(AbstractObject.Field): - call_to_action = 'call_to_action' - description = 'description' - image_hash = 'image_hash' - link = 'link' - message = 'message' - name = 'name' - - _field_types = { - 'call_to_action': 'AdCreativeLinkDataCallToAction', - 'description': 'string', - 'image_hash': 'string', - 'link': 'string', - 'message': 'string', - 'name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativetemplateurlspec.py b/tap_facebook/facebook_business/adobjects/adcreativetemplateurlspec.py deleted file mode 100644 index 6fe93a2..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativetemplateurlspec.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeTemplateURLSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeTemplateURLSpec, self).__init__() - self._isAdCreativeTemplateURLSpec = True - self._api = api - - class Field(AbstractObject.Field): - android = 'android' - config = 'config' - ios = 'ios' - ipad = 'ipad' - iphone = 'iphone' - web = 'web' - windows_phone = 'windows_phone' - - _field_types = { - 'android': 'Object', - 'config': 'Object', - 'ios': 'Object', - 'ipad': 'Object', - 'iphone': 'Object', - 'web': 'Object', - 'windows_phone': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativetextdata.py b/tap_facebook/facebook_business/adobjects/adcreativetextdata.py deleted file mode 100644 index 7e9fb22..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativetextdata.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeTextData( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeTextData, self).__init__() - self._isAdCreativeTextData = True - self._api = api - - class Field(AbstractObject.Field): - message = 'message' - - _field_types = { - 'message': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcreativevideodata.py b/tap_facebook/facebook_business/adobjects/adcreativevideodata.py deleted file mode 100644 index 05493d3..0000000 --- a/tap_facebook/facebook_business/adobjects/adcreativevideodata.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCreativeVideoData( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCreativeVideoData, self).__init__() - self._isAdCreativeVideoData = True - self._api = api - - class Field(AbstractObject.Field): - additional_image_index = 'additional_image_index' - 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' - collection_thumbnails = 'collection_thumbnails' - customization_rules_spec = 'customization_rules_spec' - image_hash = 'image_hash' - image_url = 'image_url' - link_description = 'link_description' - message = 'message' - offer_id = 'offer_id' - page_welcome_message = 'page_welcome_message' - post_click_configuration = 'post_click_configuration' - retailer_item_ids = 'retailer_item_ids' - targeting = 'targeting' - title = 'title' - video_id = 'video_id' - - _field_types = { - 'additional_image_index': 'int', - 'branded_content_shared_to_sponsor_status': 'string', - 'branded_content_sponsor_page_id': 'string', - 'call_to_action': 'AdCreativeLinkDataCallToAction', - 'collection_thumbnails': 'list', - 'customization_rules_spec': 'list', - 'image_hash': 'string', - 'image_url': 'string', - 'link_description': 'string', - 'message': 'string', - 'offer_id': 'string', - 'page_welcome_message': 'string', - 'post_click_configuration': 'AdCreativePostClickConfiguration', - 'retailer_item_ids': 'list', - 'targeting': 'Targeting', - 'title': 'string', - 'video_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adcustomizationrulespec.py b/tap_facebook/facebook_business/adobjects/adcustomizationrulespec.py deleted file mode 100644 index c81de8a..0000000 --- a/tap_facebook/facebook_business/adobjects/adcustomizationrulespec.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdCustomizationRuleSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdCustomizationRuleSpec, self).__init__() - self._isAdCustomizationRuleSpec = True - self._api = api - - class Field(AbstractObject.Field): - caption = 'caption' - customization_spec = 'customization_spec' - description = 'description' - image_hash = 'image_hash' - link = 'link' - message = 'message' - name = 'name' - priority = 'priority' - template_url_spec = 'template_url_spec' - video_id = 'video_id' - - _field_types = { - 'caption': 'string', - 'customization_spec': 'Object', - 'description': 'string', - 'image_hash': 'string', - 'link': 'string', - 'message': 'string', - 'name': 'string', - 'priority': 'int', - 'template_url_spec': 'AdCreativeTemplateURLSpec', - 'video_id': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/addynamiccreative.py b/tap_facebook/facebook_business/adobjects/addynamiccreative.py deleted file mode 100644 index 585241d..0000000 --- a/tap_facebook/facebook_business/adobjects/addynamiccreative.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdDynamicCreative( - AbstractObject, -): - - def __init__(self, api=None): - super(AdDynamicCreative, self).__init__() - self._isAdDynamicCreative = True - self._api = api - - class Field(AbstractObject.Field): - preview_url = 'preview_url' - - _field_types = { - 'preview_url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adentitytargetspend.py b/tap_facebook/facebook_business/adobjects/adentitytargetspend.py deleted file mode 100644 index 4ce69b6..0000000 --- a/tap_facebook/facebook_business/adobjects/adentitytargetspend.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdEntityTargetSpend( - AbstractObject, -): - - def __init__(self, api=None): - super(AdEntityTargetSpend, self).__init__() - self._isAdEntityTargetSpend = True - self._api = api - - class Field(AbstractObject.Field): - amount = 'amount' - has_error = 'has_error' - is_accurate = 'is_accurate' - is_prorated = 'is_prorated' - is_updating = 'is_updating' - - _field_types = { - 'amount': 'string', - 'has_error': 'bool', - 'is_accurate': 'bool', - 'is_prorated': 'bool', - 'is_updating': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adgroupissuesinfo.py b/tap_facebook/facebook_business/adobjects/adgroupissuesinfo.py deleted file mode 100644 index 32bd11a..0000000 --- a/tap_facebook/facebook_business/adobjects/adgroupissuesinfo.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdgroupIssuesInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(AdgroupIssuesInfo, self).__init__() - self._isAdgroupIssuesInfo = True - self._api = api - - class Field(AbstractObject.Field): - error_code = 'error_code' - error_message = 'error_message' - error_summary = 'error_summary' - error_type = 'error_type' - level = 'level' - - _field_types = { - 'error_code': 'int', - 'error_message': 'string', - 'error_summary': 'string', - 'error_type': 'string', - 'level': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adgroupmetadata.py b/tap_facebook/facebook_business/adobjects/adgroupmetadata.py deleted file mode 100644 index 2734e0a..0000000 --- a/tap_facebook/facebook_business/adobjects/adgroupmetadata.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdgroupMetadata( - AbstractObject, -): - - def __init__(self, api=None): - super(AdgroupMetadata, self).__init__() - self._isAdgroupMetadata = True - self._api = api - - class Field(AbstractObject.Field): - ad_standard_enhancements_edit_source = 'ad_standard_enhancements_edit_source' - adgroup_creation_source = 'adgroup_creation_source' - adgroup_edit_source = 'adgroup_edit_source' - carousel_style = 'carousel_style' - carousel_with_static_card_style = 'carousel_with_static_card_style' - - _field_types = { - 'ad_standard_enhancements_edit_source': 'int', - 'adgroup_creation_source': 'string', - 'adgroup_edit_source': 'string', - 'carousel_style': 'string', - 'carousel_with_static_card_style': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py b/tap_facebook/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py deleted file mode 100644 index 99b8209..0000000 --- a/tap_facebook/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdgroupPlacementSpecificReviewFeedback( - AbstractObject, -): - - def __init__(self, api=None): - super(AdgroupPlacementSpecificReviewFeedback, self).__init__() - self._isAdgroupPlacementSpecificReviewFeedback = True - self._api = api - - class Field(AbstractObject.Field): - account_admin = 'account_admin' - ad = 'ad' - ads_conversion_experiences = 'ads_conversion_experiences' - b2c = 'b2c' - b2c_commerce_unified = 'b2c_commerce_unified' - bsg = 'bsg' - city_community = 'city_community' - commerce = 'commerce' - compromise = 'compromise' - daily_deals = 'daily_deals' - daily_deals_legacy = 'daily_deals_legacy' - dpa = 'dpa' - dri_copyright = 'dri_copyright' - dri_counterfeit = 'dri_counterfeit' - facebook = 'facebook' - facebook_pages_live_shopping = 'facebook_pages_live_shopping' - independent_work = 'independent_work' - instagram = 'instagram' - instagram_shop = 'instagram_shop' - job_search = 'job_search' - lead_gen_honeypot = 'lead_gen_honeypot' - marketplace = 'marketplace' - marketplace_home_rentals = 'marketplace_home_rentals' - marketplace_home_sales = 'marketplace_home_sales' - marketplace_motors = 'marketplace_motors' - marketplace_shops = 'marketplace_shops' - max_review_placements = 'max_review_placements' - neighborhoods = 'neighborhoods' - page_admin = 'page_admin' - product = 'product' - product_service = 'product_service' - profile = 'profile' - seller = 'seller' - shops = 'shops' - traffic_quality = 'traffic_quality' - unified_commerce_content = 'unified_commerce_content' - whatsapp = 'whatsapp' - - _field_types = { - 'account_admin': 'map', - 'ad': 'map', - 'ads_conversion_experiences': 'map', - 'b2c': 'map', - 'b2c_commerce_unified': 'map', - 'bsg': 'map', - 'city_community': 'map', - 'commerce': 'map', - 'compromise': 'map', - 'daily_deals': 'map', - 'daily_deals_legacy': 'map', - 'dpa': 'map', - 'dri_copyright': 'map', - 'dri_counterfeit': 'map', - 'facebook': 'map', - 'facebook_pages_live_shopping': 'map', - 'independent_work': 'map', - 'instagram': 'map', - 'instagram_shop': 'map', - 'job_search': 'map', - 'lead_gen_honeypot': 'map', - 'marketplace': 'map', - 'marketplace_home_rentals': 'map', - 'marketplace_home_sales': 'map', - 'marketplace_motors': 'map', - 'marketplace_shops': 'map', - 'max_review_placements': 'map', - 'neighborhoods': 'map', - 'page_admin': 'map', - 'product': 'map', - 'product_service': 'map', - 'profile': 'map', - 'seller': 'map', - 'shops': 'map', - 'traffic_quality': 'map', - 'unified_commerce_content': 'map', - 'whatsapp': 'map', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adgroupreviewfeedback.py b/tap_facebook/facebook_business/adobjects/adgroupreviewfeedback.py deleted file mode 100644 index aa6dfe0..0000000 --- a/tap_facebook/facebook_business/adobjects/adgroupreviewfeedback.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdgroupReviewFeedback( - AbstractObject, -): - - def __init__(self, api=None): - super(AdgroupReviewFeedback, self).__init__() - self._isAdgroupReviewFeedback = True - self._api = api - - class Field(AbstractObject.Field): - field_global = 'global' - placement_specific = 'placement_specific' - - _field_types = { - 'global': 'map', - 'placement_specific': 'AdgroupPlacementSpecificReviewFeedback', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adimage.py b/tap_facebook/facebook_business/adobjects/adimage.py deleted file mode 100644 index 27db9dd..0000000 --- a/tap_facebook/facebook_business/adobjects/adimage.py +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.adobjects.helpers.adimagemixin import AdImageMixin - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdImage( - AdImageMixin, - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdImage = True - super(AdImage, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - created_time = 'created_time' - creatives = 'creatives' - hash = 'hash' - height = 'height' - id = 'id' - is_associated_creatives_in_adgroups = 'is_associated_creatives_in_adgroups' - name = 'name' - original_height = 'original_height' - original_width = 'original_width' - owner_business = 'owner_business' - permalink_url = 'permalink_url' - status = 'status' - updated_time = 'updated_time' - url = 'url' - url_128 = 'url_128' - width = 'width' - bytes = 'bytes' - copy_from = 'copy_from' - filename = 'filename' - - class Status: - active = 'ACTIVE' - deleted = 'DELETED' - internal = 'INTERNAL' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adimages' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad_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 - if batch 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=AdImage, - 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', - 'created_time': 'datetime', - 'creatives': 'list', - 'hash': 'string', - 'height': 'unsigned int', - 'id': 'string', - 'is_associated_creatives_in_adgroups': 'bool', - 'name': 'string', - 'original_height': 'unsigned int', - 'original_width': 'unsigned int', - 'owner_business': 'Business', - 'permalink_url': 'string', - 'status': 'Status', - 'updated_time': 'datetime', - 'url': 'string', - 'url_128': 'string', - 'width': 'unsigned int', - 'bytes': 'string', - 'copy_from': 'Object', - 'filename': 'file' - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Status'] = AdImage.Status.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adkeywords.py b/tap_facebook/facebook_business/adobjects/adkeywords.py deleted file mode 100644 index ac578b6..0000000 --- a/tap_facebook/facebook_business/adobjects/adkeywords.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdKeywords( - AbstractObject, -): - - def __init__(self, api=None): - super(AdKeywords, self).__init__() - self._isAdKeywords = True - self._api = api - - class Field(AbstractObject.Field): - brands = 'brands' - product_categories = 'product_categories' - product_names = 'product_names' - search_terms = 'search_terms' - - _field_types = { - 'brands': 'list', - 'product_categories': 'list', - 'product_names': 'list', - 'search_terms': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adlabel.py b/tap_facebook/facebook_business/adobjects/adlabel.py deleted file mode 100644 index fb59331..0000000 --- a/tap_facebook/facebook_business/adobjects/adlabel.py +++ /dev/null @@ -1,273 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdLabel( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdLabel = True - super(AdLabel, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account = 'account' - created_time = 'created_time' - id = 'id' - name = 'name' - updated_time = 'updated_time' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adlabels' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad_label(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 - if batch 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=AdLabel, - 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 = { - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdLabel, - 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_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.adcreative import AdCreative - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adcreatives', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCreative, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.ad import Ad - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_ad_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.adset import AdSet - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.campaign import Campaign - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/campaigns', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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': 'AdAccount', - 'created_time': 'datetime', - 'id': 'string', - 'name': 'string', - 'updated_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/admonetizationproperty.py b/tap_facebook/facebook_business/adobjects/admonetizationproperty.py deleted file mode 100644 index a69a3d9..0000000 --- a/tap_facebook/facebook_business/adobjects/admonetizationproperty.py +++ /dev/null @@ -1,194 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdMonetizationProperty( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdMonetizationProperty = True - super(AdMonetizationProperty, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - owner_business = 'owner_business' - 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=AdMonetizationProperty, - 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_network_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.') - from facebook_business.adobjects.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult - param_types = { - 'aggregation_period': 'aggregation_period_enum', - 'breakdowns': 'list', - 'filters': 'list', - 'limit': 'unsigned int', - 'metrics': 'list', - 'ordering_column': 'ordering_column_enum', - 'ordering_type': 'ordering_type_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), - 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), - 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), - 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), - 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adnetworkanalytics', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdNetworkAnalyticsSyncQueryResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdNetworkAnalyticsSyncQueryResult, 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_ad_network_analytic(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult - param_types = { - 'aggregation_period': 'aggregation_period_enum', - 'breakdowns': 'list', - 'filters': 'list', - 'limit': 'int', - 'metrics': 'list', - 'ordering_column': 'ordering_column_enum', - 'ordering_type': 'ordering_type_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), - 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), - 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), - 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), - 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adnetworkanalytics', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdMonetizationProperty, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdMonetizationProperty, 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_ad_network_analytics_results(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adnetworkanalyticsasyncqueryresult import AdNetworkAnalyticsAsyncQueryResult - param_types = { - 'query_ids': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adnetworkanalytics_results', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdNetworkAnalyticsAsyncQueryResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdNetworkAnalyticsAsyncQueryResult, 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 = { - 'owner_business': 'Business', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py b/tap_facebook/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py deleted file mode 100644 index 7fd82e3..0000000 --- a/tap_facebook/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdNetworkAnalyticsAsyncQueryResult( - AbstractObject, -): - - def __init__(self, api=None): - super(AdNetworkAnalyticsAsyncQueryResult, self).__init__() - self._isAdNetworkAnalyticsAsyncQueryResult = True - self._api = api - - class Field(AbstractObject.Field): - data = 'data' - error = 'error' - omitted_results = 'omitted_results' - query_id = 'query_id' - results = 'results' - status = 'status' - - _field_types = { - 'data': 'Object', - 'error': 'Object', - 'omitted_results': 'list', - 'query_id': 'string', - 'results': 'list', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py b/tap_facebook/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py deleted file mode 100644 index d39b37f..0000000 --- a/tap_facebook/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdNetworkAnalyticsSyncQueryResult( - AbstractObject, -): - - def __init__(self, api=None): - super(AdNetworkAnalyticsSyncQueryResult, self).__init__() - self._isAdNetworkAnalyticsSyncQueryResult = True - self._api = api - - class Field(AbstractObject.Field): - omitted_results = 'omitted_results' - query_id = 'query_id' - results = 'results' - - class AggregationPeriod: - day = 'DAY' - total = 'TOTAL' - - class Breakdowns: - ad_server_campaign_id = 'AD_SERVER_CAMPAIGN_ID' - ad_space = 'AD_SPACE' - age = 'AGE' - app = 'APP' - clicked_view_tag = 'CLICKED_VIEW_TAG' - country = 'COUNTRY' - deal = 'DEAL' - deal_ad = 'DEAL_AD' - deal_page = 'DEAL_PAGE' - delivery_method = 'DELIVERY_METHOD' - display_format = 'DISPLAY_FORMAT' - fail_reason = 'FAIL_REASON' - gender = 'GENDER' - instant_article_id = 'INSTANT_ARTICLE_ID' - instant_article_page_id = 'INSTANT_ARTICLE_PAGE_ID' - is_deal_backfill = 'IS_DEAL_BACKFILL' - placement = 'PLACEMENT' - placement_name = 'PLACEMENT_NAME' - platform = 'PLATFORM' - property = 'PROPERTY' - sdk_version = 'SDK_VERSION' - - class Metrics: - fb_ad_network_bidding_bid_rate = 'FB_AD_NETWORK_BIDDING_BID_RATE' - fb_ad_network_bidding_request = 'FB_AD_NETWORK_BIDDING_REQUEST' - fb_ad_network_bidding_response = 'FB_AD_NETWORK_BIDDING_RESPONSE' - fb_ad_network_bidding_revenue = 'FB_AD_NETWORK_BIDDING_REVENUE' - fb_ad_network_bidding_win_rate = 'FB_AD_NETWORK_BIDDING_WIN_RATE' - fb_ad_network_click = 'FB_AD_NETWORK_CLICK' - fb_ad_network_cpm = 'FB_AD_NETWORK_CPM' - fb_ad_network_ctr = 'FB_AD_NETWORK_CTR' - fb_ad_network_filled_request = 'FB_AD_NETWORK_FILLED_REQUEST' - fb_ad_network_fill_rate = 'FB_AD_NETWORK_FILL_RATE' - fb_ad_network_imp = 'FB_AD_NETWORK_IMP' - fb_ad_network_impression_rate = 'FB_AD_NETWORK_IMPRESSION_RATE' - fb_ad_network_request = 'FB_AD_NETWORK_REQUEST' - fb_ad_network_revenue = 'FB_AD_NETWORK_REVENUE' - fb_ad_network_show_rate = 'FB_AD_NETWORK_SHOW_RATE' - fb_ad_network_video_guarantee_revenue = 'FB_AD_NETWORK_VIDEO_GUARANTEE_REVENUE' - fb_ad_network_video_mrc = 'FB_AD_NETWORK_VIDEO_MRC' - fb_ad_network_video_mrc_rate = 'FB_AD_NETWORK_VIDEO_MRC_RATE' - fb_ad_network_video_view = 'FB_AD_NETWORK_VIDEO_VIEW' - fb_ad_network_video_view_rate = 'FB_AD_NETWORK_VIDEO_VIEW_RATE' - - class OrderingColumn: - metric = 'METRIC' - time = 'TIME' - value = 'VALUE' - - class OrderingType: - ascending = 'ASCENDING' - descending = 'DESCENDING' - - _field_types = { - 'omitted_results': 'list', - 'query_id': 'string', - 'results': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['AggregationPeriod'] = AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values() - field_enum_info['Breakdowns'] = AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values() - field_enum_info['Metrics'] = AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values() - field_enum_info['OrderingColumn'] = AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values() - field_enum_info['OrderingType'] = AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adplacement.py b/tap_facebook/facebook_business/adobjects/adplacement.py deleted file mode 100644 index e232685..0000000 --- a/tap_facebook/facebook_business/adobjects/adplacement.py +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdPlacement( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdPlacement = True - super(AdPlacement, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - bundle_id = 'bundle_id' - display_format = 'display_format' - external_placement_id = 'external_placement_id' - google_display_format = 'google_display_format' - id = 'id' - name = 'name' - placement_group = 'placement_group' - platform = 'platform' - 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=AdPlacement, - 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 = { - 'bundle_id': 'string', - 'display_format': 'string', - 'external_placement_id': 'string', - 'google_display_format': 'string', - 'id': 'string', - 'name': 'string', - 'placement_group': 'Object', - 'platform': 'string', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adplacepageset.py b/tap_facebook/facebook_business/adobjects/adplacepageset.py deleted file mode 100644 index 4d52a0e..0000000 --- a/tap_facebook/facebook_business/adobjects/adplacepageset.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdPlacePageSet( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdPlacePageSet = True - super(AdPlacePageSet, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - id = 'id' - location_types = 'location_types' - name = 'name' - pages_count = 'pages_count' - parent_page = 'parent_page' - targeted_area_type = 'targeted_area_type' - - class LocationTypes: - home = 'home' - recent = 'recent' - - class TargetedAreaType: - custom_radius = 'CUSTOM_RADIUS' - marketing_area = 'MARKETING_AREA' - none = 'NONE' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'ad_place_page_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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad_place_page_set(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=AdPlacePageSet, - 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', - 'id': 'string', - 'location_types': 'list', - 'name': 'string', - 'pages_count': 'int', - 'parent_page': 'Page', - 'targeted_area_type': 'TargetedAreaType', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['LocationTypes'] = AdPlacePageSet.LocationTypes.__dict__.values() - field_enum_info['TargetedAreaType'] = AdPlacePageSet.TargetedAreaType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adplacepagesetmetadata.py b/tap_facebook/facebook_business/adobjects/adplacepagesetmetadata.py deleted file mode 100644 index 8f51ee6..0000000 --- a/tap_facebook/facebook_business/adobjects/adplacepagesetmetadata.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdPlacePageSetMetadata( - AbstractObject, -): - - def __init__(self, api=None): - super(AdPlacePageSetMetadata, self).__init__() - self._isAdPlacePageSetMetadata = True - self._api = api - - class Field(AbstractObject.Field): - audience = 'audience' - custom = 'custom' - extra_data = 'extra_data' - fixed_radius = 'fixed_radius' - - _field_types = { - 'audience': 'Object', - 'custom': 'Object', - 'extra_data': 'string', - 'fixed_radius': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adpreview.py b/tap_facebook/facebook_business/adobjects/adpreview.py deleted file mode 100644 index 0eb2e5c..0000000 --- a/tap_facebook/facebook_business/adobjects/adpreview.py +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license 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 - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdPreview( - AdPreviewMixin, - AbstractObject, -): - - def __init__(self, api=None): - super(AdPreview, self).__init__() - self._isAdPreview = True - self._api = api - - class Field(AbstractObject.Field): - body = 'body' - transformation_spec = 'transformation_spec' - - class AdFormat: - audience_network_instream_video = 'AUDIENCE_NETWORK_INSTREAM_VIDEO' - audience_network_instream_video_mobile = 'AUDIENCE_NETWORK_INSTREAM_VIDEO_MOBILE' - audience_network_outstream_video = 'AUDIENCE_NETWORK_OUTSTREAM_VIDEO' - 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_reels_banner = 'FACEBOOK_REELS_BANNER' - facebook_reels_banner_desktop = 'FACEBOOK_REELS_BANNER_DESKTOP' - facebook_reels_mobile = 'FACEBOOK_REELS_MOBILE' - facebook_reels_postloop = 'FACEBOOK_REELS_POSTLOOP' - facebook_reels_sticker = 'FACEBOOK_REELS_STICKER' - facebook_story_mobile = 'FACEBOOK_STORY_MOBILE' - facebook_story_sticker_mobile = 'FACEBOOK_STORY_STICKER_MOBILE' - instagram_explore_contextual = 'INSTAGRAM_EXPLORE_CONTEXTUAL' - instagram_explore_grid_home = 'INSTAGRAM_EXPLORE_GRID_HOME' - 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_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_immersive_mobile = 'INSTREAM_BANNER_IMMERSIVE_MOBILE' - instream_banner_mobile = 'INSTREAM_BANNER_MOBILE' - instream_video_desktop = 'INSTREAM_VIDEO_DESKTOP' - 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' - marketplace_mobile = 'MARKETPLACE_MOBILE' - messenger_mobile_inbox_media = 'MESSENGER_MOBILE_INBOX_MEDIA' - messenger_mobile_story_media = 'MESSENGER_MOBILE_STORY_MEDIA' - mobile_banner = 'MOBILE_BANNER' - mobile_feed_basic = 'MOBILE_FEED_BASIC' - 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_desktop = 'SUGGESTED_VIDEO_DESKTOP' - 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' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'previews' - - _field_types = { - 'body': 'string', - 'transformation_spec': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['AdFormat'] = AdPreview.AdFormat.__dict__.values() - field_enum_info['CreativeFeature'] = AdPreview.CreativeFeature.__dict__.values() - field_enum_info['RenderType'] = AdPreview.RenderType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adpromotedobject.py b/tap_facebook/facebook_business/adobjects/adpromotedobject.py deleted file mode 100644 index e4e70e2..0000000 --- a/tap_facebook/facebook_business/adobjects/adpromotedobject.py +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdPromotedObject( - AbstractObject, -): - - def __init__(self, api=None): - super(AdPromotedObject, self).__init__() - self._isAdPromotedObject = True - self._api = api - - class Field(AbstractObject.Field): - application_id = 'application_id' - conversion_goal_id = 'conversion_goal_id' - custom_conversion_id = 'custom_conversion_id' - custom_event_str = 'custom_event_str' - custom_event_type = 'custom_event_type' - event_id = 'event_id' - fundraiser_campaign_id = 'fundraiser_campaign_id' - mcme_conversion_id = 'mcme_conversion_id' - 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' - pixel_id = 'pixel_id' - pixel_rule = 'pixel_rule' - place_page_set = 'place_page_set' - 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' - customize_product = 'CUSTOMIZE_PRODUCT' - d2_retention = 'D2_RETENTION' - d7_retention = 'D7_RETENTION' - donate = 'DONATE' - find_location = 'FIND_LOCATION' - initiated_checkout = 'INITIATED_CHECKOUT' - lead = 'LEAD' - level_achieved = 'LEVEL_ACHIEVED' - listing_interaction = 'LISTING_INTERACTION' - messaging_conversation_started_7d = 'MESSAGING_CONVERSATION_STARTED_7D' - other = 'OTHER' - purchase = 'PURCHASE' - rate = 'RATE' - schedule = 'SCHEDULE' - search = 'SEARCH' - service_booking_request = 'SERVICE_BOOKING_REQUEST' - spent_credits = 'SPENT_CREDITS' - start_trial = 'START_TRIAL' - submit_application = 'SUBMIT_APPLICATION' - subscribe = 'SUBSCRIBE' - tutorial_completion = 'TUTORIAL_COMPLETION' - - _field_types = { - 'application_id': 'string', - 'conversion_goal_id': 'string', - 'custom_conversion_id': 'string', - 'custom_event_str': 'string', - 'custom_event_type': 'CustomEventType', - 'event_id': 'string', - 'fundraiser_campaign_id': 'string', - 'mcme_conversion_id': 'string', - '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', - 'pixel_id': 'string', - 'pixel_rule': 'string', - 'place_page_set': 'AdPlacePageSet', - '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): - field_enum_info = {} - field_enum_info['CustomEventType'] = AdPromotedObject.CustomEventType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adrecommendation.py b/tap_facebook/facebook_business/adobjects/adrecommendation.py deleted file mode 100644 index 40ba29c..0000000 --- a/tap_facebook/facebook_business/adobjects/adrecommendation.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRecommendation( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRecommendation, self).__init__() - self._isAdRecommendation = True - self._api = api - - class Field(AbstractObject.Field): - blame_field = 'blame_field' - code = 'code' - confidence = 'confidence' - importance = 'importance' - message = 'message' - recommendation_data = 'recommendation_data' - title = 'title' - - class Confidence: - high = 'HIGH' - low = 'LOW' - medium = 'MEDIUM' - - class Importance: - high = 'HIGH' - low = 'LOW' - medium = 'MEDIUM' - - _field_types = { - 'blame_field': 'string', - 'code': 'int', - 'confidence': 'Confidence', - 'importance': 'Importance', - 'message': 'string', - 'recommendation_data': 'AdRecommendationData', - 'title': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Confidence'] = AdRecommendation.Confidence.__dict__.values() - field_enum_info['Importance'] = AdRecommendation.Importance.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adrecommendationdata.py b/tap_facebook/facebook_business/adobjects/adrecommendationdata.py deleted file mode 100644 index c5caf6c..0000000 --- a/tap_facebook/facebook_business/adobjects/adrecommendationdata.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRecommendationData( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRecommendationData, self).__init__() - self._isAdRecommendationData = 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/tap_facebook/facebook_business/adobjects/adreportrun.py b/tap_facebook/facebook_business/adobjects/adreportrun.py deleted file mode 100644 index a000c69..0000000 --- a/tap_facebook/facebook_business/adobjects/adreportrun.py +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.adobjects.helpers.adreportrunmixin import AdReportRunMixin - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdReportRun( - AdReportRunMixin, - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdReportRun = True - super(AdReportRun, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - async_percent_completion = 'async_percent_completion' - async_status = 'async_status' - date_start = 'date_start' - date_stop = 'date_stop' - emails = 'emails' - friendly_name = 'friendly_name' - id = 'id' - is_bookmarked = 'is_bookmarked' - is_running = 'is_running' - schedule_id = 'schedule_id' - time_completed = 'time_completed' - time_ref = 'time_ref' - action_attribution_windows = 'action_attribution_windows' - action_breakdowns = 'action_breakdowns' - action_report_time = 'action_report_time' - breakdowns = 'breakdowns' - date_preset = 'date_preset' - default_summary = 'default_summary' - export_columns = 'export_columns' - export_format = 'export_format' - export_name = 'export_name' - fields = 'fields' - filtering = 'filtering' - level = 'level' - product_id_limit = 'product_id_limit' - sort = 'sort' - summary = 'summary' - summary_action_breakdowns = 'summary_action_breakdowns' - time_increment = 'time_increment' - time_range = 'time_range' - time_ranges = 'time_ranges' - use_account_attribution_setting = 'use_account_attribution_setting' - use_unified_attribution_setting = 'use_unified_attribution_setting' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'insights' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).get_insights_async(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=AdReportRun, - 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.adsinsights import AdsInsights - if is_async: - return self.get_insights_async(fields, params, batch, success, failure, pending) - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdsInsights, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdsInsights, 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 = { - 'account_id': 'string', - 'async_percent_completion': 'unsigned int', - 'async_status': 'string', - 'date_start': 'string', - 'date_stop': 'string', - 'emails': 'list', - 'friendly_name': 'string', - 'id': 'string', - 'is_bookmarked': 'bool', - 'is_running': 'bool', - 'schedule_id': 'string', - 'time_completed': 'unsigned int', - 'time_ref': 'unsigned int', - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'ActionReportTime', - 'breakdowns': 'list', - 'date_preset': 'DatePreset', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'Level', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adrule.py b/tap_facebook/facebook_business/adobjects/adrule.py deleted file mode 100644 index daf180c..0000000 --- a/tap_facebook/facebook_business/adobjects/adrule.py +++ /dev/null @@ -1,300 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdRule( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdRule = True - super(AdRule, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - created_by = 'created_by' - created_time = 'created_time' - evaluation_spec = 'evaluation_spec' - execution_spec = 'execution_spec' - id = 'id' - name = 'name' - schedule_spec = 'schedule_spec' - status = 'status' - updated_time = 'updated_time' - ui_creation_source = 'ui_creation_source' - - class Status: - deleted = 'DELETED' - disabled = 'DISABLED' - enabled = 'ENABLED' - has_issues = 'HAS_ISSUES' - - class UiCreationSource: - am_account_overview_recommendations = 'AM_ACCOUNT_OVERVIEW_RECOMMENDATIONS' - am_activity_history_table = 'AM_ACTIVITY_HISTORY_TABLE' - am_ad_object_name_card = 'AM_AD_OBJECT_NAME_CARD' - am_amfe_l3_recommendation = 'AM_AMFE_L3_RECOMMENDATION' - am_autoflow_guidance_card = 'AM_AUTOFLOW_GUIDANCE_CARD' - am_auto_apply_widget = 'AM_AUTO_APPLY_WIDGET' - am_editor_card = 'AM_EDITOR_CARD' - am_info_card = 'AM_INFO_CARD' - am_name_cell_dropdown = 'AM_NAME_CELL_DROPDOWN' - am_optimization_tip_guidance_card = 'AM_OPTIMIZATION_TIP_GUIDANCE_CARD' - am_performance_summary = 'AM_PERFORMANCE_SUMMARY' - 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' - pe_info_card = 'PE_INFO_CARD' - pe_toolbar_create_rule_dropdown = 'PE_TOOLBAR_CREATE_RULE_DROPDOWN' - rules_management_page_action_dropdown = 'RULES_MANAGEMENT_PAGE_ACTION_DROPDOWN' - rules_management_page_rule_group = 'RULES_MANAGEMENT_PAGE_RULE_GROUP' - rules_management_page_rule_name = 'RULES_MANAGEMENT_PAGE_RULE_NAME' - rules_management_page_top_nav = 'RULES_MANAGEMENT_PAGE_TOP_NAV' - rules_view_active_rules_dialog = 'RULES_VIEW_ACTIVE_RULES_DIALOG' - rule_creation_success_dialog = 'RULE_CREATION_SUCCESS_DIALOG' - rule_syd_redirect = 'RULE_SYD_REDIRECT' - rule_templates_dialog = 'RULE_TEMPLATES_DIALOG' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adrules_library' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad_rules_library(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 - if batch 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=AdRule, - 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 = { - 'evaluation_spec': 'Object', - 'execution_spec': 'Object', - 'name': 'string', - 'schedule_spec': 'Object', - 'status': 'status_enum', - } - enums = { - 'status_enum': AdRule.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdRule, - 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_execute(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/execute', - 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_history(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adrulehistory import AdRuleHistory - param_types = { - 'action': 'action_enum', - 'hide_no_changes': 'bool', - 'object_id': 'string', - } - enums = { - 'action_enum': AdRuleHistory.Action.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/history', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdRuleHistory, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdRuleHistory, 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_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/preview', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdRule, 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', - 'created_by': 'User', - 'created_time': 'datetime', - 'evaluation_spec': 'AdRuleEvaluationSpec', - 'execution_spec': 'AdRuleExecutionSpec', - 'id': 'string', - 'name': 'string', - 'schedule_spec': 'AdRuleScheduleSpec', - 'status': 'string', - 'updated_time': 'datetime', - 'ui_creation_source': 'UiCreationSource', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Status'] = AdRule.Status.__dict__.values() - field_enum_info['UiCreationSource'] = AdRule.UiCreationSource.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adruleevaluationspec.py b/tap_facebook/facebook_business/adobjects/adruleevaluationspec.py deleted file mode 100644 index c0356a8..0000000 --- a/tap_facebook/facebook_business/adobjects/adruleevaluationspec.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdRuleEvaluationSpec( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdRuleEvaluationSpec = True - super(AdRuleEvaluationSpec, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - evaluation_type = 'evaluation_type' - filters = 'filters' - trigger = 'trigger' - id = 'id' - - class EvaluationType: - schedule = 'SCHEDULE' - trigger = 'TRIGGER' - - 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=AdRuleEvaluationSpec, - 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 = { - 'evaluation_type': 'EvaluationType', - 'filters': 'list', - 'trigger': 'AdRuleTrigger', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['EvaluationType'] = AdRuleEvaluationSpec.EvaluationType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adruleexecutionoptions.py b/tap_facebook/facebook_business/adobjects/adruleexecutionoptions.py deleted file mode 100644 index 48bbaef..0000000 --- a/tap_facebook/facebook_business/adobjects/adruleexecutionoptions.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRuleExecutionOptions( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRuleExecutionOptions, self).__init__() - self._isAdRuleExecutionOptions = True - self._api = api - - class Field(AbstractObject.Field): - field = 'field' - operator = 'operator' - value = 'value' - - class Operator: - equal = 'EQUAL' - value_in = 'IN' - - _field_types = { - 'field': 'string', - 'operator': 'Operator', - 'value': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Operator'] = AdRuleExecutionOptions.Operator.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adruleexecutionspec.py b/tap_facebook/facebook_business/adobjects/adruleexecutionspec.py deleted file mode 100644 index be4366b..0000000 --- a/tap_facebook/facebook_business/adobjects/adruleexecutionspec.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdRuleExecutionSpec( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdRuleExecutionSpec = True - super(AdRuleExecutionSpec, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - execution_options = 'execution_options' - execution_type = 'execution_type' - id = 'id' - - class ExecutionType: - add_interest_relaxation = 'ADD_INTEREST_RELAXATION' - add_questionnaire_interests = 'ADD_QUESTIONNAIRE_INTERESTS' - audience_consolidation = 'AUDIENCE_CONSOLIDATION' - audience_consolidation_ask_first = 'AUDIENCE_CONSOLIDATION_ASK_FIRST' - change_bid = 'CHANGE_BID' - change_budget = 'CHANGE_BUDGET' - change_campaign_budget = 'CHANGE_CAMPAIGN_BUDGET' - dco = 'DCO' - increase_radius = 'INCREASE_RADIUS' - notification = 'NOTIFICATION' - pause = 'PAUSE' - ping_endpoint = 'PING_ENDPOINT' - rebalance_budget = 'REBALANCE_BUDGET' - rotate = 'ROTATE' - unpause = 'UNPAUSE' - update_creative = 'UPDATE_CREATIVE' - update_lax_budget = 'UPDATE_LAX_BUDGET' - update_lax_duration = 'UPDATE_LAX_DURATION' - - 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=AdRuleExecutionSpec, - 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 = { - 'execution_options': 'list', - 'execution_type': 'ExecutionType', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ExecutionType'] = AdRuleExecutionSpec.ExecutionType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adrulefilters.py b/tap_facebook/facebook_business/adobjects/adrulefilters.py deleted file mode 100644 index 7313a8a..0000000 --- a/tap_facebook/facebook_business/adobjects/adrulefilters.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRuleFilters( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRuleFilters, self).__init__() - self._isAdRuleFilters = True - self._api = api - - class Field(AbstractObject.Field): - field = 'field' - operator = 'operator' - value = 'value' - - class Operator: - all = 'ALL' - any = 'ANY' - contain = 'CONTAIN' - equal = 'EQUAL' - greater_than = 'GREATER_THAN' - value_in = 'IN' - in_range = 'IN_RANGE' - less_than = 'LESS_THAN' - none = 'NONE' - not_contain = 'NOT_CONTAIN' - not_equal = 'NOT_EQUAL' - not_in = 'NOT_IN' - not_in_range = 'NOT_IN_RANGE' - - _field_types = { - 'field': 'string', - 'operator': 'Operator', - 'value': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Operator'] = AdRuleFilters.Operator.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adrulehistory.py b/tap_facebook/facebook_business/adobjects/adrulehistory.py deleted file mode 100644 index 4caef42..0000000 --- a/tap_facebook/facebook_business/adobjects/adrulehistory.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRuleHistory( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRuleHistory, self).__init__() - self._isAdRuleHistory = True - self._api = api - - class Field(AbstractObject.Field): - evaluation_spec = 'evaluation_spec' - exception_code = 'exception_code' - exception_message = 'exception_message' - execution_spec = 'execution_spec' - is_manual = 'is_manual' - results = 'results' - schedule_spec = 'schedule_spec' - timestamp = 'timestamp' - - class Action: - budget_not_redistributed = 'BUDGET_NOT_REDISTRIBUTED' - changed_bid = 'CHANGED_BID' - changed_budget = 'CHANGED_BUDGET' - email = 'EMAIL' - 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_semantic_based_audience_expansion = 'ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION' - endpoint_pinged = 'ENDPOINT_PINGED' - error = 'ERROR' - facebook_notification_sent = 'FACEBOOK_NOTIFICATION_SENT' - message_sent = 'MESSAGE_SENT' - not_changed = 'NOT_CHANGED' - paused = 'PAUSED' - unpaused = 'UNPAUSED' - - _field_types = { - 'evaluation_spec': 'AdRuleEvaluationSpec', - 'exception_code': 'int', - 'exception_message': 'string', - 'execution_spec': 'AdRuleExecutionSpec', - 'is_manual': 'bool', - 'results': 'list', - 'schedule_spec': 'AdRuleScheduleSpec', - 'timestamp': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Action'] = AdRuleHistory.Action.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adrulehistoryresult.py b/tap_facebook/facebook_business/adobjects/adrulehistoryresult.py deleted file mode 100644 index f18db77..0000000 --- a/tap_facebook/facebook_business/adobjects/adrulehistoryresult.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRuleHistoryResult( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRuleHistoryResult, self).__init__() - self._isAdRuleHistoryResult = True - self._api = api - - class Field(AbstractObject.Field): - actions = 'actions' - object_id = 'object_id' - object_type = 'object_type' - - class ObjectType: - ad = 'AD' - adset = 'ADSET' - campaign = 'CAMPAIGN' - - _field_types = { - 'actions': 'list', - 'object_id': 'string', - 'object_type': 'ObjectType', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ObjectType'] = AdRuleHistoryResult.ObjectType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adrulehistoryresultaction.py b/tap_facebook/facebook_business/adobjects/adrulehistoryresultaction.py deleted file mode 100644 index 86c3d4d..0000000 --- a/tap_facebook/facebook_business/adobjects/adrulehistoryresultaction.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRuleHistoryResultAction( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRuleHistoryResultAction, self).__init__() - self._isAdRuleHistoryResultAction = True - self._api = api - - class Field(AbstractObject.Field): - action = 'action' - field = 'field' - new_value = 'new_value' - old_value = 'old_value' - - _field_types = { - 'action': 'string', - 'field': 'string', - 'new_value': 'string', - 'old_value': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adruleschedule.py b/tap_facebook/facebook_business/adobjects/adruleschedule.py deleted file mode 100644 index 71e6fbf..0000000 --- a/tap_facebook/facebook_business/adobjects/adruleschedule.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRuleSchedule( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRuleSchedule, self).__init__() - self._isAdRuleSchedule = True - self._api = api - - class Field(AbstractObject.Field): - days = 'days' - end_minute = 'end_minute' - start_minute = 'start_minute' - - _field_types = { - 'days': 'list', - 'end_minute': 'int', - 'start_minute': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adruleschedulespec.py b/tap_facebook/facebook_business/adobjects/adruleschedulespec.py deleted file mode 100644 index 6796c2f..0000000 --- a/tap_facebook/facebook_business/adobjects/adruleschedulespec.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRuleScheduleSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRuleScheduleSpec, self).__init__() - self._isAdRuleScheduleSpec = True - self._api = api - - class Field(AbstractObject.Field): - schedule = 'schedule' - schedule_type = 'schedule_type' - - _field_types = { - 'schedule': 'list', - 'schedule_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adruletrigger.py b/tap_facebook/facebook_business/adobjects/adruletrigger.py deleted file mode 100644 index f1ada13..0000000 --- a/tap_facebook/facebook_business/adobjects/adruletrigger.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdRuleTrigger( - AbstractObject, -): - - def __init__(self, api=None): - super(AdRuleTrigger, self).__init__() - self._isAdRuleTrigger = True - self._api = api - - class Field(AbstractObject.Field): - field = 'field' - operator = 'operator' - type = 'type' - value = 'value' - - class Operator: - all = 'ALL' - any = 'ANY' - contain = 'CONTAIN' - equal = 'EQUAL' - greater_than = 'GREATER_THAN' - value_in = 'IN' - in_range = 'IN_RANGE' - less_than = 'LESS_THAN' - none = 'NONE' - not_contain = 'NOT_CONTAIN' - not_equal = 'NOT_EQUAL' - not_in = 'NOT_IN' - not_in_range = 'NOT_IN_RANGE' - - class Type: - delivery_insights_change = 'DELIVERY_INSIGHTS_CHANGE' - metadata_creation = 'METADATA_CREATION' - metadata_update = 'METADATA_UPDATE' - stats_change = 'STATS_CHANGE' - stats_milestone = 'STATS_MILESTONE' - - _field_types = { - 'field': 'string', - 'operator': 'Operator', - 'type': 'Type', - 'value': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Operator'] = AdRuleTrigger.Operator.__dict__.values() - field_enum_info['Type'] = AdRuleTrigger.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adsactionstats.py b/tap_facebook/facebook_business/adobjects/adsactionstats.py deleted file mode 100644 index 89d6911..0000000 --- a/tap_facebook/facebook_business/adobjects/adsactionstats.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdsActionStats( - AbstractObject, -): - - def __init__(self, api=None): - super(AdsActionStats, self).__init__() - self._isAdsActionStats = True - self._api = api - - class Field(AbstractObject.Field): - field_1d_click = '1d_click' - field_1d_ev = '1d_ev' - field_1d_view = '1d_view' - field_28d_click = '28d_click' - field_28d_view = '28d_view' - field_7d_click = '7d_click' - field_7d_view = '7d_view' - 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': 'string', - '1d_ev': 'string', - '1d_view': 'string', - '28d_click': 'string', - '28d_view': 'string', - '7d_click': 'string', - '7d_view': 'string', - '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': 'string', - 'inline': 'string', - '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 - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adset.py b/tap_facebook/facebook_business/adobjects/adset.py deleted file mode 100644 index 735bf36..0000000 --- a/tap_facebook/facebook_business/adobjects/adset.py +++ /dev/null @@ -1,1103 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.mixins import HasAdLabels -from facebook_business.mixins import CanValidate - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdSet( - AbstractCrudObject, - HasAdLabels, - CanValidate, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdSet = True - super(AdSet, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - adlabels = 'adlabels' - adset_schedule = 'adset_schedule' - asset_feed_id = 'asset_feed_id' - attribution_spec = 'attribution_spec' - bid_adjustments = 'bid_adjustments' - bid_amount = 'bid_amount' - bid_constraints = 'bid_constraints' - bid_info = 'bid_info' - bid_strategy = 'bid_strategy' - 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' - created_time = 'created_time' - creative_sequence = 'creative_sequence' - daily_budget = 'daily_budget' - daily_min_spend_target = 'daily_min_spend_target' - daily_spend_cap = 'daily_spend_cap' - destination_type = 'destination_type' - dsa_beneficiary = 'dsa_beneficiary' - dsa_payor = 'dsa_payor' - effective_status = 'effective_status' - end_time = 'end_time' - existing_customer_budget_percentage = 'existing_customer_budget_percentage' - frequency_control_specs = 'frequency_control_specs' - 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' - lifetime_budget = 'lifetime_budget' - lifetime_imps = 'lifetime_imps' - lifetime_min_spend_target = 'lifetime_min_spend_target' - lifetime_spend_cap = 'lifetime_spend_cap' - multi_optimization_goal_weight = 'multi_optimization_goal_weight' - name = 'name' - optimization_goal = 'optimization_goal' - optimization_sub_event = 'optimization_sub_event' - pacing_type = 'pacing_type' - promoted_object = 'promoted_object' - recommendations = 'recommendations' - recurring_budget_semantics = 'recurring_budget_semantics' - review_feedback = 'review_feedback' - rf_prediction_id = 'rf_prediction_id' - source_adset = 'source_adset' - source_adset_id = 'source_adset_id' - start_time = 'start_time' - status = 'status' - targeting = 'targeting' - targeting_optimization_types = 'targeting_optimization_types' - time_based_ad_rotation_id_blocks = 'time_based_ad_rotation_id_blocks' - time_based_ad_rotation_intervals = 'time_based_ad_rotation_intervals' - updated_time = 'updated_time' - use_new_app_click = 'use_new_app_click' - campaign_spec = 'campaign_spec' - daily_imps = 'daily_imps' - date_format = 'date_format' - execution_options = 'execution_options' - line_number = 'line_number' - rb_prediction_id = 'rb_prediction_id' - time_start = 'time_start' - time_stop = 'time_stop' - topline_id = 'topline_id' - tune_for_category = 'tune_for_category' - - 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' - clicks = 'CLICKS' - impressions = 'IMPRESSIONS' - link_clicks = 'LINK_CLICKS' - listing_interaction = 'LISTING_INTERACTION' - none = 'NONE' - offer_claims = 'OFFER_CLAIMS' - page_likes = 'PAGE_LIKES' - post_engagement = 'POST_ENGAGEMENT' - purchase = 'PURCHASE' - thruplay = 'THRUPLAY' - - class ConfiguredStatus: - active = 'ACTIVE' - archived = 'ARCHIVED' - deleted = 'DELETED' - paused = 'PAUSED' - - class EffectiveStatus: - active = 'ACTIVE' - archived = 'ARCHIVED' - campaign_paused = 'CAMPAIGN_PAUSED' - deleted = 'DELETED' - in_process = 'IN_PROCESS' - paused = 'PAUSED' - with_issues = 'WITH_ISSUES' - - 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' - 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' - - class Status: - active = 'ACTIVE' - archived = 'ARCHIVED' - deleted = 'DELETED' - 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' - - class DestinationType: - app = 'APP' - applinks_automatic = 'APPLINKS_AUTOMATIC' - facebook = 'FACEBOOK' - instagram_direct = 'INSTAGRAM_DIRECT' - 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' - on_ad = 'ON_AD' - on_event = 'ON_EVENT' - on_page = 'ON_PAGE' - on_post = 'ON_POST' - on_video = 'ON_VIDEO' - shop_automatic = 'SHOP_AUTOMATIC' - undefined = 'UNDEFINED' - website = 'WEBSITE' - whatsapp = 'WHATSAPP' - - class ExecutionOptions: - include_recommendations = 'include_recommendations' - validate_only = 'validate_only' - - class FullFunnelExplorationMode: - extended_exploration = 'EXTENDED_EXPLORATION' - limited_exploration = 'LIMITED_EXPLORATION' - none_exploration = 'NONE_EXPLORATION' - - class MultiOptimizationGoalWeight: - balanced = 'BALANCED' - prefer_event = 'PREFER_EVENT' - prefer_install = 'PREFER_INSTALL' - undefined = 'UNDEFINED' - - class OptimizationSubEvent: - none = 'NONE' - travel_intent = 'TRAVEL_INTENT' - travel_intent_bucket_01 = 'TRAVEL_INTENT_BUCKET_01' - travel_intent_bucket_02 = 'TRAVEL_INTENT_BUCKET_02' - travel_intent_bucket_03 = 'TRAVEL_INTENT_BUCKET_03' - travel_intent_bucket_04 = 'TRAVEL_INTENT_BUCKET_04' - travel_intent_bucket_05 = 'TRAVEL_INTENT_BUCKET_05' - travel_intent_no_destination_intent = 'TRAVEL_INTENT_NO_DESTINATION_INTENT' - trip_consideration = 'TRIP_CONSIDERATION' - video_sound_on = 'VIDEO_SOUND_ON' - - class TuneForCategory: - credit = 'CREDIT' - employment = 'EMPLOYMENT' - housing = 'HOUSING' - issues_elections_politics = 'ISSUES_ELECTIONS_POLITICS' - none = 'NONE' - online_gambling_and_gaming = 'ONLINE_GAMBLING_AND_GAMING' - - class Operator: - all = 'ALL' - any = 'ANY' - - class StatusOption: - active = 'ACTIVE' - inherited_from_source = 'INHERITED_FROM_SOURCE' - paused = 'PAUSED' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adsets' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad_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 - if batch 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 = { - 'am_call_tags': 'map', - 'date_preset': 'date_preset_enum', - 'from_adtable': 'bool', - 'time_range': 'map', - } - enums = { - 'date_preset_enum': [ - 'data_maximum', - 'last_14d', - 'last_28d', - 'last_30d', - 'last_3d', - 'last_7d', - 'last_90d', - 'last_month', - 'last_quarter', - 'last_week_mon_sun', - 'last_week_sun_sat', - 'last_year', - 'maximum', - 'this_month', - 'this_quarter', - 'this_week_mon_today', - 'this_week_sun_today', - 'this_year', - 'today', - 'yesterday', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - 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 = { - 'account_id': 'string', - 'adlabels': 'list', - 'adset_schedule': 'list', - 'attribution_spec': 'list', - 'bid_adjustments': 'Object', - 'bid_amount': 'int', - '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', - 'daily_imps': 'unsigned int', - 'daily_min_spend_target': 'unsigned int', - 'daily_spend_cap': 'unsigned int', - 'date_format': 'string', - 'destination_type': 'destination_type_enum', - 'dsa_beneficiary': 'string', - 'dsa_payor': 'string', - 'end_time': 'datetime', - 'execution_options': 'list', - 'existing_customer_budget_percentage': 'unsigned int', - 'full_funnel_exploration_mode': 'full_funnel_exploration_mode_enum', - 'lifetime_budget': 'unsigned int', - 'lifetime_imps': 'unsigned int', - 'lifetime_min_spend_target': 'unsigned int', - 'lifetime_spend_cap': 'unsigned int', - 'multi_optimization_goal_weight': 'multi_optimization_goal_weight_enum', - 'name': 'string', - 'optimization_goal': 'optimization_goal_enum', - 'optimization_sub_event': 'optimization_sub_event_enum', - 'pacing_type': 'list', - 'promoted_object': 'Object', - 'rb_prediction_id': 'string', - 'rf_prediction_id': 'string', - 'start_time': 'datetime', - 'status': 'status_enum', - 'targeting': 'Targeting', - 'time_based_ad_rotation_id_blocks': 'list>', - 'time_based_ad_rotation_intervals': 'list', - 'time_start': 'datetime', - 'time_stop': 'datetime', - 'tune_for_category': 'tune_for_category_enum', - } - enums = { - 'bid_strategy_enum': AdSet.BidStrategy.__dict__.values(), - 'billing_event_enum': AdSet.BillingEvent.__dict__.values(), - 'destination_type_enum': AdSet.DestinationType.__dict__.values(), - 'execution_options_enum': AdSet.ExecutionOptions.__dict__.values(), - 'full_funnel_exploration_mode_enum': AdSet.FullFunnelExplorationMode.__dict__.values(), - 'multi_optimization_goal_weight_enum': AdSet.MultiOptimizationGoalWeight.__dict__.values(), - 'optimization_goal_enum': AdSet.OptimizationGoal.__dict__.values(), - 'optimization_sub_event_enum': AdSet.OptimizationSubEvent.__dict__.values(), - 'status_enum': AdSet.Status.__dict__.values(), - 'tune_for_category_enum': AdSet.TuneForCategory.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - 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_activities(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adactivity import AdActivity - param_types = { - 'after': 'string', - 'business_id': 'string', - 'category': 'category_enum', - 'limit': 'int', - 'since': 'datetime', - 'uid': 'int', - 'until': 'datetime', - } - enums = { - 'category_enum': AdActivity.Category.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/activities', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdActivity, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdActivity, 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_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudy import AdStudy - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ad_studies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_ad_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.adcreative import AdCreative - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adcreatives', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCreative, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCreative, 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_ad_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'adlabels': 'list', - 'execution_options': 'list', - } - enums = { - 'execution_options_enum': AdSet.ExecutionOptions.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/adlabels', - 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'adlabels': 'list', - 'execution_options': 'list', - } - enums = { - 'execution_options_enum': AdSet.ExecutionOptions.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adlabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_ad_rules_governed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adrule import AdRule - param_types = { - 'pass_evaluation': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adrules_governed', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdRule, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.ad import Ad - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'time_range': 'map', - 'updated_since': 'int', - } - enums = { - 'date_preset_enum': Ad.DatePreset.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_async_ad_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.adasyncrequest import AdAsyncRequest - param_types = { - 'statuses': 'list', - } - enums = { - 'statuses_enum': AdAsyncRequest.Statuses.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/asyncadrequests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdAsyncRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdAsyncRequest, 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'is_completed': 'bool', - 'time_range': 'map', - } - enums = { - 'date_preset_enum': AdSet.DatePreset.__dict__.values(), - 'effective_status_enum': AdSet.EffectiveStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/copies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_copy(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'campaign_id': 'string', - 'create_dco_adset': 'bool', - 'deep_copy': 'bool', - 'end_time': 'datetime', - 'rename_options': 'Object', - 'start_time': 'datetime', - 'status_option': 'status_option_enum', - } - enums = { - 'status_option_enum': AdSet.StatusOption.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/copies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_delivery_estimate(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adcampaigndeliveryestimate import AdCampaignDeliveryEstimate - param_types = { - 'optimization_goal': 'optimization_goal_enum', - 'promoted_object': 'Object', - 'targeting_spec': 'Targeting', - } - enums = { - 'optimization_goal_enum': AdCampaignDeliveryEstimate.OptimizationGoal.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/delivery_estimate', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdCampaignDeliveryEstimate, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdCampaignDeliveryEstimate, 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_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.adsinsights import AdsInsights - if is_async: - return self.get_insights_async(fields, params, batch, success, failure, pending) - param_types = { - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'action_report_time_enum', - 'breakdowns': 'list', - 'date_preset': 'date_preset_enum', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'level_enum', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - enums = { - 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), - 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), - 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), - 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), - 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), - 'level_enum': AdsInsights.Level.__dict__.values(), - 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdsInsights, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdsInsights, 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() - - def get_insights_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adreportrun import AdReportRun - from facebook_business.adobjects.adsinsights import AdsInsights - param_types = { - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'action_report_time_enum', - 'breakdowns': 'list', - 'date_preset': 'date_preset_enum', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'level_enum', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - enums = { - 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), - 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), - 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), - 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), - 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), - 'level_enum': AdsInsights.Level.__dict__.values(), - 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), - } - - if fields is not None: - params['fields'] = params.get('fields') if params.get('fields') is not None else list() - params['fields'].extend(field for field in fields if field not in params['fields']) - - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdReportRun, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdReportRun, api=self._api), - include_summary=False, - ) - request.add_params(params) - - if batch is 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_targeting_sentence_lines(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.targetingsentenceline import TargetingSentenceLine - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/targetingsentencelines', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=TargetingSentenceLine, - api_type='EDGE', - response_parser=ObjectParser(target_class=TargetingSentenceLine, 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', - 'adlabels': 'list', - 'adset_schedule': 'list', - 'asset_feed_id': 'string', - 'attribution_spec': 'list', - 'bid_adjustments': 'AdBidAdjustments', - 'bid_amount': 'unsigned int', - 'bid_constraints': 'AdCampaignBidConstraint', - 'bid_info': 'map', - 'bid_strategy': 'BidStrategy', - 'billing_event': 'BillingEvent', - 'budget_remaining': 'string', - 'campaign': 'Campaign', - 'campaign_active_time': 'string', - 'campaign_attribution': 'string', - 'campaign_id': 'string', - 'configured_status': 'ConfiguredStatus', - 'created_time': 'datetime', - 'creative_sequence': 'list', - 'daily_budget': 'string', - 'daily_min_spend_target': 'string', - 'daily_spend_cap': 'string', - 'destination_type': 'string', - 'dsa_beneficiary': 'string', - 'dsa_payor': 'string', - 'effective_status': 'EffectiveStatus', - 'end_time': 'datetime', - 'existing_customer_budget_percentage': 'unsigned int', - 'frequency_control_specs': 'list', - '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', - 'lifetime_budget': 'string', - 'lifetime_imps': 'int', - 'lifetime_min_spend_target': 'string', - 'lifetime_spend_cap': 'string', - 'multi_optimization_goal_weight': 'string', - 'name': 'string', - 'optimization_goal': 'OptimizationGoal', - 'optimization_sub_event': 'string', - 'pacing_type': 'list', - 'promoted_object': 'AdPromotedObject', - 'recommendations': 'list', - 'recurring_budget_semantics': 'bool', - 'review_feedback': 'string', - 'rf_prediction_id': 'string', - 'source_adset': 'AdSet', - 'source_adset_id': 'string', - 'start_time': 'datetime', - 'status': 'Status', - 'targeting': 'Targeting', - 'targeting_optimization_types': 'list>', - 'time_based_ad_rotation_id_blocks': 'list>', - 'time_based_ad_rotation_intervals': 'list', - 'updated_time': 'datetime', - 'use_new_app_click': 'bool', - 'campaign_spec': 'Object', - 'daily_imps': 'unsigned int', - 'date_format': 'string', - 'execution_options': 'list', - 'line_number': 'unsigned int', - 'rb_prediction_id': 'string', - 'time_start': 'datetime', - 'time_stop': 'datetime', - 'topline_id': 'string', - 'tune_for_category': 'TuneForCategory', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['BidStrategy'] = AdSet.BidStrategy.__dict__.values() - field_enum_info['BillingEvent'] = AdSet.BillingEvent.__dict__.values() - field_enum_info['ConfiguredStatus'] = AdSet.ConfiguredStatus.__dict__.values() - field_enum_info['EffectiveStatus'] = AdSet.EffectiveStatus.__dict__.values() - field_enum_info['OptimizationGoal'] = AdSet.OptimizationGoal.__dict__.values() - field_enum_info['Status'] = AdSet.Status.__dict__.values() - field_enum_info['DatePreset'] = AdSet.DatePreset.__dict__.values() - field_enum_info['DestinationType'] = AdSet.DestinationType.__dict__.values() - field_enum_info['ExecutionOptions'] = AdSet.ExecutionOptions.__dict__.values() - 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['TuneForCategory'] = AdSet.TuneForCategory.__dict__.values() - field_enum_info['Operator'] = AdSet.Operator.__dict__.values() - field_enum_info['StatusOption'] = AdSet.StatusOption.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adshistogramstats.py b/tap_facebook/facebook_business/adobjects/adshistogramstats.py deleted file mode 100644 index ad5c6a3..0000000 --- a/tap_facebook/facebook_business/adobjects/adshistogramstats.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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_ev = '1d_ev' - field_1d_view = '1d_view' - field_28d_click = '28d_click' - field_28d_view = '28d_view' - field_7d_click = '7d_click' - field_7d_view = '7d_view' - 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_ev': 'list', - '1d_view': 'list', - '28d_click': 'list', - '28d_view': 'list', - '7d_click': 'list', - '7d_view': '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/tap_facebook/facebook_business/adobjects/adsimagecrops.py b/tap_facebook/facebook_business/adobjects/adsimagecrops.py deleted file mode 100644 index d2135fc..0000000 --- a/tap_facebook/facebook_business/adobjects/adsimagecrops.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdsImageCrops( - AbstractObject, -): - - def __init__(self, api=None): - super(AdsImageCrops, self).__init__() - self._isAdsImageCrops = True - self._api = api - - class Field(AbstractObject.Field): - field_100x100 = '100x100' - field_100x72 = '100x72' - field_191x100 = '191x100' - field_400x150 = '400x150' - field_400x500 = '400x500' - field_600x360 = '600x360' - field_90x160 = '90x160' - - _field_types = { - '100x100': 'list', - '100x72': 'list', - '191x100': 'list', - '400x150': 'list', - '400x500': 'list', - '600x360': 'list', - '90x160': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adsinsights.py b/tap_facebook/facebook_business/adobjects/adsinsights.py deleted file mode 100644 index ced5893..0000000 --- a/tap_facebook/facebook_business/adobjects/adsinsights.py +++ /dev/null @@ -1,449 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license 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 - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdsInsights( - AdsInsightsMixin, - AbstractObject, -): - - def __init__(self, api=None): - super(AdsInsights, self).__init__() - self._isAdsInsights = True - self._api = api - - class Field(AbstractObject.Field): - account_currency = 'account_currency' - account_id = 'account_id' - account_name = 'account_name' - action_values = 'action_values' - actions = 'actions' - ad_click_actions = 'ad_click_actions' - ad_id = 'ad_id' - ad_impression_actions = 'ad_impression_actions' - ad_name = 'ad_name' - adset_end = 'adset_end' - adset_id = 'adset_id' - adset_name = 'adset_name' - adset_start = 'adset_start' - age_targeting = 'age_targeting' - attribution_setting = 'attribution_setting' - auction_bid = 'auction_bid' - auction_competitiveness = 'auction_competitiveness' - auction_max_competitor_bid = 'auction_max_competitor_bid' - buying_type = 'buying_type' - campaign_id = 'campaign_id' - campaign_name = 'campaign_name' - canvas_avg_view_percent = 'canvas_avg_view_percent' - canvas_avg_view_time = 'canvas_avg_view_time' - catalog_segment_actions = 'catalog_segment_actions' - catalog_segment_value = 'catalog_segment_value' - catalog_segment_value_mobile_purchase_roas = 'catalog_segment_value_mobile_purchase_roas' - catalog_segment_value_omni_purchase_roas = 'catalog_segment_value_omni_purchase_roas' - catalog_segment_value_website_purchase_roas = 'catalog_segment_value_website_purchase_roas' - clicks = 'clicks' - conversion_lead_rate = 'conversion_lead_rate' - conversion_rate_ranking = 'conversion_rate_ranking' - conversion_values = 'conversion_values' - conversions = 'conversions' - converted_product_quantity = 'converted_product_quantity' - converted_product_value = 'converted_product_value' - cost_per_15_sec_video_view = 'cost_per_15_sec_video_view' - cost_per_2_sec_continuous_video_view = 'cost_per_2_sec_continuous_video_view' - cost_per_action_type = 'cost_per_action_type' - cost_per_ad_click = 'cost_per_ad_click' - cost_per_conversion = 'cost_per_conversion' - cost_per_conversion_lead = 'cost_per_conversion_lead' - cost_per_dda_countby_convs = 'cost_per_dda_countby_convs' - cost_per_estimated_ad_recallers = 'cost_per_estimated_ad_recallers' - cost_per_inline_link_click = 'cost_per_inline_link_click' - cost_per_inline_post_engagement = 'cost_per_inline_post_engagement' - cost_per_one_thousand_ad_impression = 'cost_per_one_thousand_ad_impression' - cost_per_outbound_click = 'cost_per_outbound_click' - cost_per_thruplay = 'cost_per_thruplay' - cost_per_unique_action_type = 'cost_per_unique_action_type' - cost_per_unique_click = 'cost_per_unique_click' - cost_per_unique_conversion = 'cost_per_unique_conversion' - cost_per_unique_inline_link_click = 'cost_per_unique_inline_link_click' - cost_per_unique_outbound_click = 'cost_per_unique_outbound_click' - cpc = 'cpc' - cpm = 'cpm' - cpp = 'cpp' - created_time = 'created_time' - creative_media_type = 'creative_media_type' - ctr = 'ctr' - date_start = 'date_start' - date_stop = 'date_stop' - dda_countby_convs = 'dda_countby_convs' - dda_results = 'dda_results' - engagement_rate_ranking = 'engagement_rate_ranking' - estimated_ad_recall_rate = 'estimated_ad_recall_rate' - estimated_ad_recall_rate_lower_bound = 'estimated_ad_recall_rate_lower_bound' - estimated_ad_recall_rate_upper_bound = 'estimated_ad_recall_rate_upper_bound' - estimated_ad_recallers = 'estimated_ad_recallers' - estimated_ad_recallers_lower_bound = 'estimated_ad_recallers_lower_bound' - estimated_ad_recallers_upper_bound = 'estimated_ad_recallers_upper_bound' - frequency = 'frequency' - full_view_impressions = 'full_view_impressions' - full_view_reach = 'full_view_reach' - gender_targeting = 'gender_targeting' - impressions = 'impressions' - inline_link_click_ctr = 'inline_link_click_ctr' - inline_link_clicks = 'inline_link_clicks' - inline_post_engagement = 'inline_post_engagement' - instagram_upcoming_event_reminders_set = 'instagram_upcoming_event_reminders_set' - instant_experience_clicks_to_open = 'instant_experience_clicks_to_open' - instant_experience_clicks_to_start = 'instant_experience_clicks_to_start' - instant_experience_outbound_clicks = 'instant_experience_outbound_clicks' - 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' - optimization_goal = 'optimization_goal' - outbound_clicks = 'outbound_clicks' - outbound_clicks_ctr = 'outbound_clicks_ctr' - place_page_name = 'place_page_name' - purchase_roas = 'purchase_roas' - qualifying_question_qualify_answer_rate = 'qualifying_question_qualify_answer_rate' - quality_ranking = 'quality_ranking' - reach = 'reach' - social_spend = 'social_spend' - spend = 'spend' - total_postbacks = 'total_postbacks' - total_postbacks_detailed = 'total_postbacks_detailed' - total_postbacks_detailed_v4 = 'total_postbacks_detailed_v4' - unique_actions = 'unique_actions' - unique_clicks = 'unique_clicks' - unique_conversions = 'unique_conversions' - unique_ctr = 'unique_ctr' - unique_inline_link_click_ctr = 'unique_inline_link_click_ctr' - unique_inline_link_clicks = 'unique_inline_link_clicks' - unique_link_clicks_ctr = 'unique_link_clicks_ctr' - unique_outbound_clicks = 'unique_outbound_clicks' - unique_outbound_clicks_ctr = 'unique_outbound_clicks_ctr' - unique_video_continuous_2_sec_watched_actions = 'unique_video_continuous_2_sec_watched_actions' - unique_video_view_15_sec = 'unique_video_view_15_sec' - updated_time = 'updated_time' - video_15_sec_watched_actions = 'video_15_sec_watched_actions' - video_30_sec_watched_actions = 'video_30_sec_watched_actions' - video_avg_time_watched_actions = 'video_avg_time_watched_actions' - video_continuous_2_sec_watched_actions = 'video_continuous_2_sec_watched_actions' - video_p100_watched_actions = 'video_p100_watched_actions' - video_p25_watched_actions = 'video_p25_watched_actions' - video_p50_watched_actions = 'video_p50_watched_actions' - video_p75_watched_actions = 'video_p75_watched_actions' - video_p95_watched_actions = 'video_p95_watched_actions' - video_play_actions = 'video_play_actions' - video_play_curve_actions = 'video_play_curve_actions' - video_play_retention_0_to_15s_actions = 'video_play_retention_0_to_15s_actions' - video_play_retention_20_to_60s_actions = 'video_play_retention_20_to_60s_actions' - video_play_retention_graph_actions = 'video_play_retention_graph_actions' - video_thruplay_watched_actions = 'video_thruplay_watched_actions' - video_time_watched_actions = 'video_time_watched_actions' - website_ctr = 'website_ctr' - website_purchase_roas = 'website_purchase_roas' - wish_bid = 'wish_bid' - - 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' - skan_view = 'skan_view' - - class ActionBreakdowns: - 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_destination = 'action_destination' - action_device = 'action_device' - action_reaction = 'action_reaction' - action_target_id = 'action_target_id' - 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' - impression = 'impression' - mixed = 'mixed' - - class Breakdowns: - ad_format_asset = 'ad_format_asset' - age = 'age' - app_id = 'app_id' - 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' - dma = 'dma' - fidelity_type = 'fidelity_type' - frequency_value = 'frequency_value' - gender = 'gender' - hourly_stats_aggregated_by_advertiser_time_zone = 'hourly_stats_aggregated_by_advertiser_time_zone' - hourly_stats_aggregated_by_audience_time_zone = 'hourly_stats_aggregated_by_audience_time_zone' - hsid = 'hsid' - 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' - postback_sequence_index = 'postback_sequence_index' - product_id = 'product_id' - publisher_platform = 'publisher_platform' - redownload = 'redownload' - region = 'region' - 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' - video_asset = 'video_asset' - - 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' - - class Level: - account = 'account' - ad = 'ad' - adset = 'adset' - campaign = 'campaign' - - class SummaryActionBreakdowns: - 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_destination = 'action_destination' - action_device = 'action_device' - action_reaction = 'action_reaction' - action_target_id = 'action_target_id' - 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 - def get_endpoint(cls): - return 'insights' - - _field_types = { - 'account_currency': 'string', - 'account_id': 'string', - 'account_name': 'string', - 'action_values': 'list', - 'actions': 'list', - 'ad_click_actions': 'list', - 'ad_id': 'string', - 'ad_impression_actions': 'list', - 'ad_name': 'string', - 'adset_end': 'string', - 'adset_id': 'string', - 'adset_name': 'string', - 'adset_start': 'string', - 'age_targeting': 'string', - 'attribution_setting': 'string', - 'auction_bid': 'string', - 'auction_competitiveness': 'string', - 'auction_max_competitor_bid': 'string', - 'buying_type': 'string', - 'campaign_id': 'string', - 'campaign_name': 'string', - 'canvas_avg_view_percent': 'string', - 'canvas_avg_view_time': 'string', - 'catalog_segment_actions': 'list', - 'catalog_segment_value': 'list', - 'catalog_segment_value_mobile_purchase_roas': 'list', - 'catalog_segment_value_omni_purchase_roas': 'list', - 'catalog_segment_value_website_purchase_roas': 'list', - 'clicks': 'string', - 'conversion_lead_rate': 'string', - 'conversion_rate_ranking': 'string', - 'conversion_values': 'list', - 'conversions': 'list', - 'converted_product_quantity': 'list', - 'converted_product_value': 'list', - 'cost_per_15_sec_video_view': 'list', - 'cost_per_2_sec_continuous_video_view': 'list', - 'cost_per_action_type': 'list', - 'cost_per_ad_click': 'list', - 'cost_per_conversion': 'list', - 'cost_per_conversion_lead': 'string', - 'cost_per_dda_countby_convs': 'string', - 'cost_per_estimated_ad_recallers': 'string', - 'cost_per_inline_link_click': 'string', - 'cost_per_inline_post_engagement': 'string', - 'cost_per_one_thousand_ad_impression': 'list', - 'cost_per_outbound_click': 'list', - 'cost_per_thruplay': 'list', - 'cost_per_unique_action_type': 'list', - 'cost_per_unique_click': 'string', - 'cost_per_unique_conversion': 'list', - 'cost_per_unique_inline_link_click': 'string', - 'cost_per_unique_outbound_click': 'list', - 'cpc': 'string', - 'cpm': 'string', - 'cpp': 'string', - 'created_time': 'string', - 'creative_media_type': 'string', - 'ctr': 'string', - 'date_start': 'string', - 'date_stop': 'string', - 'dda_countby_convs': 'string', - 'dda_results': 'list', - 'engagement_rate_ranking': 'string', - 'estimated_ad_recall_rate': 'string', - 'estimated_ad_recall_rate_lower_bound': 'string', - 'estimated_ad_recall_rate_upper_bound': 'string', - 'estimated_ad_recallers': 'string', - 'estimated_ad_recallers_lower_bound': 'string', - 'estimated_ad_recallers_upper_bound': 'string', - 'frequency': 'string', - 'full_view_impressions': 'string', - 'full_view_reach': 'string', - 'gender_targeting': 'string', - 'impressions': 'string', - 'inline_link_click_ctr': 'string', - 'inline_link_clicks': 'string', - 'inline_post_engagement': 'string', - 'instagram_upcoming_event_reminders_set': 'string', - 'instant_experience_clicks_to_open': 'string', - 'instant_experience_clicks_to_start': 'string', - 'instant_experience_outbound_clicks': 'list', - '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', - 'optimization_goal': 'string', - 'outbound_clicks': 'list', - 'outbound_clicks_ctr': 'list', - 'place_page_name': 'string', - 'purchase_roas': 'list', - 'qualifying_question_qualify_answer_rate': 'string', - 'quality_ranking': 'string', - 'reach': 'string', - 'social_spend': 'string', - 'spend': 'string', - 'total_postbacks': 'string', - 'total_postbacks_detailed': 'list', - 'total_postbacks_detailed_v4': 'list', - 'unique_actions': 'list', - 'unique_clicks': 'string', - 'unique_conversions': 'list', - 'unique_ctr': 'string', - 'unique_inline_link_click_ctr': 'string', - 'unique_inline_link_clicks': 'string', - 'unique_link_clicks_ctr': 'string', - 'unique_outbound_clicks': 'list', - 'unique_outbound_clicks_ctr': 'list', - 'unique_video_continuous_2_sec_watched_actions': 'list', - 'unique_video_view_15_sec': 'list', - 'updated_time': 'string', - 'video_15_sec_watched_actions': 'list', - 'video_30_sec_watched_actions': 'list', - 'video_avg_time_watched_actions': 'list', - 'video_continuous_2_sec_watched_actions': 'list', - 'video_p100_watched_actions': 'list', - 'video_p25_watched_actions': 'list', - 'video_p50_watched_actions': 'list', - '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_thruplay_watched_actions': 'list', - 'video_time_watched_actions': 'list', - 'website_ctr': 'list', - 'website_purchase_roas': 'list', - 'wish_bid': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ActionAttributionWindows'] = AdsInsights.ActionAttributionWindows.__dict__.values() - field_enum_info['ActionBreakdowns'] = AdsInsights.ActionBreakdowns.__dict__.values() - field_enum_info['ActionReportTime'] = AdsInsights.ActionReportTime.__dict__.values() - field_enum_info['Breakdowns'] = AdsInsights.Breakdowns.__dict__.values() - field_enum_info['DatePreset'] = AdsInsights.DatePreset.__dict__.values() - field_enum_info['Level'] = AdsInsights.Level.__dict__.values() - field_enum_info['SummaryActionBreakdowns'] = AdsInsights.SummaryActionBreakdowns.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py b/tap_facebook/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py deleted file mode 100644 index 3c47058..0000000 --- a/tap_facebook/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdsOptimalDeliveryGrowthOpportunity( - AbstractObject, -): - - def __init__(self, api=None): - super(AdsOptimalDeliveryGrowthOpportunity, self).__init__() - self._isAdsOptimalDeliveryGrowthOpportunity = True - self._api = api - - class Field(AbstractObject.Field): - child_metadata = 'child_metadata' - metadata = 'metadata' - optimization_type = 'optimization_type' - - _field_types = { - 'child_metadata': 'list>', - 'metadata': 'Object', - 'optimization_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adspixel.py b/tap_facebook/facebook_business/adobjects/adspixel.py deleted file mode 100644 index 5829c34..0000000 --- a/tap_facebook/facebook_business/adobjects/adspixel.py +++ /dev/null @@ -1,748 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdsPixel( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdsPixel = True - super(AdsPixel, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - automatic_matching_fields = 'automatic_matching_fields' - can_proxy = 'can_proxy' - code = 'code' - config = 'config' - creation_time = 'creation_time' - creator = 'creator' - data_use_setting = 'data_use_setting' - description = 'description' - duplicate_entries = 'duplicate_entries' - enable_auto_assign_to_accounts = 'enable_auto_assign_to_accounts' - enable_automatic_matching = 'enable_automatic_matching' - event_stats = 'event_stats' - event_time_max = 'event_time_max' - event_time_min = 'event_time_min' - first_party_cookie_status = 'first_party_cookie_status' - id = 'id' - is_consolidated_container = 'is_consolidated_container' - is_created_by_business = 'is_created_by_business' - is_crm = 'is_crm' - 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' - match_rate_approx = 'match_rate_approx' - matched_entries = 'matched_entries' - name = 'name' - 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: - last_fired_time = 'LAST_FIRED_TIME' - name = 'NAME' - - class AutomaticMatchingFields: - country = 'country' - ct = 'ct' - db = 'db' - em = 'em' - external_id = 'external_id' - fn = 'fn' - ge = 'ge' - ln = 'ln' - ph = 'ph' - st = 'st' - zp = 'zp' - - class DataUseSetting: - advertising_and_analytics = 'ADVERTISING_AND_ANALYTICS' - analytics_only = 'ANALYTICS_ONLY' - empty = 'EMPTY' - - class FirstPartyCookieStatus: - empty = 'EMPTY' - first_party_cookie_disabled = 'FIRST_PARTY_COOKIE_DISABLED' - first_party_cookie_enabled = 'FIRST_PARTY_COOKIE_ENABLED' - - class Tasks: - aa_analyze = 'AA_ANALYZE' - advertise = 'ADVERTISE' - analyze = 'ANALYZE' - edit = 'EDIT' - upload = 'UPLOAD' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adspixels' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ads_pixel(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=AdsPixel, - 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 = { - 'automatic_matching_fields': 'list', - 'data_use_setting': 'data_use_setting_enum', - 'enable_automatic_matching': 'bool', - 'first_party_cookie_status': 'first_party_cookie_status_enum', - 'name': 'string', - 'server_events_business_ids': 'list', - } - enums = { - 'automatic_matching_fields_enum': AdsPixel.AutomaticMatchingFields.__dict__.values(), - 'data_use_setting_enum': AdsPixel.DataUseSetting.__dict__.values(), - 'first_party_cookie_status_enum': AdsPixel.FirstPartyCookieStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdsPixel, - 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 = { - 'business': 'string', - } - 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() - - 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): - 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='/agencies', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.assigneduser import AssignedUser - param_types = { - 'business': 'string', - } - 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() - - def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'tasks': 'list', - 'user': 'int', - } - enums = { - 'tasks_enum': AdsPixel.Tasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/assigned_users', - 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_da_checks(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.dacheck import DACheck - param_types = { - 'checks': 'list', - 'connection_method': 'connection_method_enum', - } - enums = { - 'connection_method_enum': DACheck.ConnectionMethod.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/da_checks', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=DACheck, - api_type='EDGE', - response_parser=ObjectParser(target_class=DACheck, 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_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.') - param_types = { - 'data': 'list', - 'namespace_id': 'string', - 'partner_agent': 'string', - 'platforms': 'list', - 'progress': 'Object', - 'test_event_code': 'string', - 'trace': 'unsigned int', - 'upload_id': 'string', - 'upload_source': 'string', - 'upload_tag': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.offlineconversiondatasetupload import OfflineConversionDataSetUpload - param_types = { - 'end_time': 'datetime', - 'order': 'order_enum', - 'sort_by': 'sort_by_enum', - 'start_time': 'datetime', - 'upload_tag': 'string', - } - enums = { - 'order_enum': OfflineConversionDataSetUpload.Order.__dict__.values(), - 'sort_by_enum': OfflineConversionDataSetUpload.SortBy.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/offline_event_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 get_open_bridge_configurations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.openbridgeconfiguration import OpenBridgeConfiguration - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/openbridge_configurations', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OpenBridgeConfiguration, - api_type='EDGE', - response_parser=ObjectParser(target_class=OpenBridgeConfiguration, 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_shadow_traffic_helper(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/shadowtraffichelper', - 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_shared_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.') - param_types = { - 'account_id': 'string', - 'business': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/shared_accounts', - 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_shared_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 = { - 'business': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/shared_accounts', - 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 create_shared_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', - 'business': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/shared_accounts', - 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_shared_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.') - from facebook_business.adobjects.business import Business - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/shared_agencies', - 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_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.adspixelstatsresult import AdsPixelStatsResult - param_types = { - 'aggregation': 'aggregation_enum', - 'end_time': 'datetime', - 'event': 'string', - 'event_source': 'string', - 'start_time': 'datetime', - } - enums = { - 'aggregation_enum': AdsPixelStatsResult.Aggregation.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/stats', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdsPixelStatsResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdsPixelStatsResult, 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_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', - 'code': 'string', - 'config': 'string', - 'creation_time': 'datetime', - 'creator': 'User', - 'data_use_setting': 'string', - 'description': 'string', - 'duplicate_entries': 'int', - 'enable_auto_assign_to_accounts': 'bool', - 'enable_automatic_matching': 'bool', - 'event_stats': 'string', - 'event_time_max': 'int', - 'event_time_min': 'int', - 'first_party_cookie_status': 'string', - 'id': 'string', - 'is_consolidated_container': 'bool', - 'is_created_by_business': 'bool', - 'is_crm': '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', - 'match_rate_approx': 'int', - 'matched_entries': 'int', - 'name': 'string', - 'owner_ad_account': 'AdAccount', - 'owner_business': 'Business', - 'usage': 'OfflineConversionDataSetUsage', - 'user_access_expire_time': 'datetime', - 'valid_entries': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['SortBy'] = AdsPixel.SortBy.__dict__.values() - 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['Tasks'] = AdsPixel.Tasks.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adspixelstats.py b/tap_facebook/facebook_business/adobjects/adspixelstats.py deleted file mode 100644 index 6d1acf2..0000000 --- a/tap_facebook/facebook_business/adobjects/adspixelstats.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdsPixelStats( - AbstractObject, -): - - def __init__(self, api=None): - super(AdsPixelStats, self).__init__() - self._isAdsPixelStats = True - self._api = api - - class Field(AbstractObject.Field): - count = 'count' - diagnostics_hourly_last_timestamp = 'diagnostics_hourly_last_timestamp' - event = 'event' - value = 'value' - - _field_types = { - 'count': 'int', - 'diagnostics_hourly_last_timestamp': 'datetime', - 'event': 'string', - 'value': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adspixelstatsresult.py b/tap_facebook/facebook_business/adobjects/adspixelstatsresult.py deleted file mode 100644 index 6e8499a..0000000 --- a/tap_facebook/facebook_business/adobjects/adspixelstatsresult.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AdsPixelStatsResult( - AbstractObject, -): - - def __init__(self, api=None): - super(AdsPixelStatsResult, self).__init__() - self._isAdsPixelStatsResult = True - self._api = api - - class Field(AbstractObject.Field): - aggregation = 'aggregation' - data = 'data' - start_time = 'start_time' - - class Aggregation: - browser_type = 'browser_type' - custom_data_field = 'custom_data_field' - device_os = 'device_os' - device_type = 'device_type' - event = 'event' - event_detection_method = 'event_detection_method' - event_processing_results = 'event_processing_results' - event_source = 'event_source' - event_total_counts = 'event_total_counts' - event_value_count = 'event_value_count' - had_pii = 'had_pii' - host = 'host' - match_keys = 'match_keys' - pixel_fire = 'pixel_fire' - url = 'url' - url_by_rule = 'url_by_rule' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'stats' - - _field_types = { - 'aggregation': 'string', - 'data': 'list', - 'start_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Aggregation'] = AdsPixelStatsResult.Aggregation.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adstudy.py b/tap_facebook/facebook_business/adobjects/adstudy.py deleted file mode 100644 index a58172c..0000000 --- a/tap_facebook/facebook_business/adobjects/adstudy.py +++ /dev/null @@ -1,363 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdStudy( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdStudy = True - super(AdStudy, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - business = 'business' - canceled_time = 'canceled_time' - client_business = 'client_business' - cooldown_start_time = 'cooldown_start_time' - created_by = 'created_by' - created_time = 'created_time' - description = 'description' - end_time = 'end_time' - id = 'id' - measurement_contact = 'measurement_contact' - name = 'name' - observation_end_time = 'observation_end_time' - results_first_available_date = 'results_first_available_date' - sales_contact = 'sales_contact' - start_time = 'start_time' - type = 'type' - updated_by = 'updated_by' - updated_time = 'updated_time' - cells = 'cells' - confidence_level = 'confidence_level' - objectives = 'objectives' - viewers = 'viewers' - - class Type: - continuous_lift_config = 'CONTINUOUS_LIFT_CONFIG' - geo_lift = 'GEO_LIFT' - lift = 'LIFT' - split_test = 'SPLIT_TEST' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'ad_studies' - - # @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_ad_study(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 - if batch 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=AdStudy, - 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 = { - 'cells': 'list', - 'client_business': 'string', - 'confidence_level': 'float', - 'cooldown_start_time': 'int', - 'description': 'string', - 'end_time': 'int', - 'name': 'string', - 'objectives': 'list', - 'observation_end_time': 'int', - 'start_time': 'int', - 'type': 'type_enum', - 'viewers': 'list', - } - enums = { - 'type_enum': AdStudy.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - 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_cells(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudycell import AdStudyCell - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/cells', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudyCell, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudyCell, 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_check_point(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'checkpoint_data': 'string', - 'checkpoint_name': 'string', - 'component': 'string', - 'instance_id': 'string', - 'run_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/checkpoint', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_instances(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.privateliftstudyinstance import PrivateLiftStudyInstance - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/instances', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PrivateLiftStudyInstance, - api_type='EDGE', - response_parser=ObjectParser(target_class=PrivateLiftStudyInstance, 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_instance(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.privateliftstudyinstance import PrivateLiftStudyInstance - param_types = { - 'breakdown_key': 'map', - 'run_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/instances', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PrivateLiftStudyInstance, - api_type='EDGE', - response_parser=ObjectParser(target_class=PrivateLiftStudyInstance, 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_objectives(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudyobjective import AdStudyObjective - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/objectives', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudyObjective, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudyObjective, 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', - 'canceled_time': 'datetime', - 'client_business': 'Business', - 'cooldown_start_time': 'datetime', - 'created_by': 'User', - 'created_time': 'datetime', - 'description': 'string', - 'end_time': 'datetime', - 'id': 'string', - 'measurement_contact': 'User', - 'name': 'string', - 'observation_end_time': 'datetime', - 'results_first_available_date': 'string', - 'sales_contact': 'User', - 'start_time': 'datetime', - 'type': 'string', - 'updated_by': 'User', - 'updated_time': 'datetime', - 'cells': 'list', - 'confidence_level': 'float', - 'objectives': 'list', - 'viewers': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Type'] = AdStudy.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adstudycell.py b/tap_facebook/facebook_business/adobjects/adstudycell.py deleted file mode 100644 index 1685810..0000000 --- a/tap_facebook/facebook_business/adobjects/adstudycell.py +++ /dev/null @@ -1,229 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdStudyCell( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdStudyCell = True - super(AdStudyCell, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad_entities_count = 'ad_entities_count' - control_percentage = 'control_percentage' - id = 'id' - name = 'name' - treatment_percentage = 'treatment_percentage' - - class CreationTemplate: - automatic_placements = 'AUTOMATIC_PLACEMENTS' - brand_awareness = 'BRAND_AWARENESS' - facebook = 'FACEBOOK' - facebook_audience_network = 'FACEBOOK_AUDIENCE_NETWORK' - facebook_instagram = 'FACEBOOK_INSTAGRAM' - facebook_news_feed = 'FACEBOOK_NEWS_FEED' - facebook_news_feed_in_stream_video = 'FACEBOOK_NEWS_FEED_IN_STREAM_VIDEO' - high_frequency = 'HIGH_FREQUENCY' - instagram = 'INSTAGRAM' - in_stream_video = 'IN_STREAM_VIDEO' - low_frequency = 'LOW_FREQUENCY' - medium_frequency = 'MEDIUM_FREQUENCY' - mobile_optimized_video = 'MOBILE_OPTIMIZED_VIDEO' - page_post_engagement = 'PAGE_POST_ENGAGEMENT' - reach = 'REACH' - tv_commercial = 'TV_COMMERCIAL' - tv_facebook = 'TV_FACEBOOK' - video_view_optimization = 'VIDEO_VIEW_OPTIMIZATION' - - 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=AdStudyCell, - 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 = { - 'adaccounts': 'list', - 'adsets': 'list', - 'campaigns': 'list', - 'creation_template': 'creation_template_enum', - 'description': 'string', - 'name': 'string', - } - enums = { - 'creation_template_enum': AdStudyCell.CreationTemplate.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudyCell, - 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() - - def get_ad_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.adset import AdSet - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.campaign import Campaign - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/campaigns', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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_entities_count': 'unsigned int', - 'control_percentage': 'float', - 'id': 'string', - 'name': 'string', - 'treatment_percentage': 'float', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['CreationTemplate'] = AdStudyCell.CreationTemplate.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adstudyobjective.py b/tap_facebook/facebook_business/adobjects/adstudyobjective.py deleted file mode 100644 index 8857560..0000000 --- a/tap_facebook/facebook_business/adobjects/adstudyobjective.py +++ /dev/null @@ -1,360 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdStudyObjective( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdStudyObjective = True - super(AdStudyObjective, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - is_primary = 'is_primary' - last_updated_results = 'last_updated_results' - name = 'name' - results = 'results' - type = 'type' - - class Type: - brand = 'BRAND' - brandlift = 'BRANDLIFT' - conversions = 'CONVERSIONS' - ftl = 'FTL' - mae = 'MAE' - mai = 'MAI' - mpc_conversion = 'MPC_CONVERSION' - nonsales = 'NONSALES' - partner = 'PARTNER' - sales = 'SALES' - telco = 'TELCO' - - 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 = { - 'breakdowns': 'list', - 'ds': 'string', - } - enums = { - 'breakdowns_enum': [ - 'age', - 'cell_id', - 'country', - 'gender', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudyObjective, - 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 = { - 'adspixels': 'list', - 'applications': 'list', - 'customconversions': 'list', - 'is_primary': 'bool', - 'name': 'string', - 'offline_conversion_data_sets': 'list', - 'offsite_datasets': 'list', - 'product_catalogs': 'list', - 'product_sets': 'list', - 'type': 'type_enum', - } - enums = { - 'type_enum': AdStudyObjective.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudyObjective, - 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_ads_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/adspixels', - 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_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='/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_brand_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.brandrequest import BrandRequest - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/brand_requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BrandRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=BrandRequest, 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customconversion import CustomConversion - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/customconversions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversion, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomConversion, 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 get_partner_private_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/partner_private_studies', - 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_partner_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.partnerstudy import PartnerStudy - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/partnerstudies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PartnerStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=PartnerStudy, 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', - 'is_primary': 'bool', - 'last_updated_results': 'string', - 'name': 'string', - 'results': 'list', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Type'] = AdStudyObjective.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adstudyobjectiveid.py b/tap_facebook/facebook_business/adobjects/adstudyobjectiveid.py deleted file mode 100644 index cccc982..0000000 --- a/tap_facebook/facebook_business/adobjects/adstudyobjectiveid.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdStudyObjectiveID( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdStudyObjectiveID = True - super(AdStudyObjectiveID, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - event_names = 'event_names' - id = 'id' - type = 'type' - - _field_types = { - 'event_names': 'list', - 'id': 'string', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py b/tap_facebook/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py deleted file mode 100644 index 9ef9ece..0000000 --- a/tap_facebook/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdStudyObjectiveOffsiteDatasets( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdStudyObjectiveOffsiteDatasets = True - super(AdStudyObjectiveOffsiteDatasets, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - event_names = 'event_names' - id = 'id' - - _field_types = { - 'event_names': 'list', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/advideo.py b/tap_facebook/facebook_business/adobjects/advideo.py deleted file mode 100644 index 59b35fa..0000000 --- a/tap_facebook/facebook_business/adobjects/advideo.py +++ /dev/null @@ -1,1354 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AdVideo( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAdVideo = True - super(AdVideo, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad_breaks = 'ad_breaks' - admin_creator = 'admin_creator' - audio_isrc = 'audio_isrc' - backdated_time = 'backdated_time' - backdated_time_granularity = 'backdated_time_granularity' - 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' - description = 'description' - embed_html = 'embed_html' - embeddable = 'embeddable' - event = 'event' - expiration = 'expiration' - format = 'format' - field_from = 'from' - icon = 'icon' - id = 'id' - is_crosspost_video = 'is_crosspost_video' - is_crossposting_eligible = 'is_crossposting_eligible' - is_episode = 'is_episode' - is_instagram_eligible = 'is_instagram_eligible' - is_reference_only = 'is_reference_only' - length = 'length' - live_audience_count = 'live_audience_count' - live_status = 'live_status' - music_video_copyright = 'music_video_copyright' - 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' - published = 'published' - scheduled_publish_time = 'scheduled_publish_time' - source = 'source' - spherical = 'spherical' - status = 'status' - title = 'title' - 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' - audio_story_wave_animation_handle = 'audio_story_wave_animation_handle' - chunk_session_id = 'chunk_session_id' - composer_entry_picker = 'composer_entry_picker' - composer_entry_point = 'composer_entry_point' - composer_entry_time = 'composer_entry_time' - composer_session_events_log = 'composer_session_events_log' - composer_session_id = 'composer_session_id' - composer_source_surface = 'composer_source_surface' - composer_type = 'composer_type' - container_type = 'container_type' - creative_tools = 'creative_tools' - end_offset = 'end_offset' - fbuploader_video_file_chunk = 'fbuploader_video_file_chunk' - file_size = 'file_size' - file_url = 'file_url' - fisheye_video_cropped = 'fisheye_video_cropped' - formatting = 'formatting' - fov = 'fov' - front_z_rotation = 'front_z_rotation' - fun_fact_prompt_id = 'fun_fact_prompt_id' - fun_fact_toastee_id = 'fun_fact_toastee_id' - guide = 'guide' - guide_enabled = 'guide_enabled' - holiday_card = 'holiday_card' - initial_heading = 'initial_heading' - initial_pitch = 'initial_pitch' - instant_game_entry_point_data = 'instant_game_entry_point_data' - is_boost_intended = 'is_boost_intended' - is_group_linking_post = 'is_group_linking_post' - is_voice_clip = 'is_voice_clip' - location_source_id = 'location_source_id' - name = 'name' - offer_like_post_id = 'offer_like_post_id' - og_action_type_id = 'og_action_type_id' - og_icon_id = 'og_icon_id' - og_object_id = 'og_object_id' - og_phrase = 'og_phrase' - og_suggestion_mechanism = 'og_suggestion_mechanism' - 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' - source_instagram_media_id = 'source_instagram_media_id' - start_offset = 'start_offset' - swap_mode = 'swap_mode' - text_format_metadata = 'text_format_metadata' - throwback_camera_roll_media = 'throwback_camera_roll_media' - thumb = 'thumb' - time_since_original_post = 'time_since_original_post' - transcode_setting_properties = 'transcode_setting_properties' - unpublished_content_type = 'unpublished_content_type' - upload_phase = 'upload_phase' - upload_session_id = 'upload_session_id' - upload_setting_properties = 'upload_setting_properties' - video_file_chunk = 'video_file_chunk' - 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' - - class ContainerType: - aco_autoextracted_video = 'ACO_AUTOEXTRACTED_VIDEO' - aco_video_variation = 'ACO_VIDEO_VARIATION' - ads_ai_generated = 'ADS_AI_GENERATED' - ad_break_preview = 'AD_BREAK_PREVIEW' - ad_derivative = 'AD_DERIVATIVE' - ad_library_watermark = 'AD_LIBRARY_WATERMARK' - age_up = 'AGE_UP' - album_multimedia_post = 'ALBUM_MULTIMEDIA_POST' - aloha_call_video = 'ALOHA_CALL_VIDEO' - aloha_superframe = 'ALOHA_SUPERFRAME' - app_rereview_screencast = 'APP_REREVIEW_SCREENCAST' - app_review_screencast = 'APP_REVIEW_SCREENCAST' - asset_manager = 'ASSET_MANAGER' - audio_brief = 'AUDIO_BRIEF' - audio_broadcast = 'AUDIO_BROADCAST' - audio_comment = 'AUDIO_COMMENT' - broadcast = 'BROADCAST' - bulletin_article_audio = 'BULLETIN_ARTICLE_AUDIO' - canvas = 'CANVAS' - cfc_video = 'CFC_VIDEO' - cms_media_manager = 'CMS_MEDIA_MANAGER' - contained_post_attachment = 'CONTAINED_POST_ATTACHMENT' - 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' - dim_sum = 'DIM_SUM' - directed_post_attachment = 'DIRECTED_POST_ATTACHMENT' - direct_inbox = 'DIRECT_INBOX' - direct_inbox_reaction = 'DIRECT_INBOX_REACTION' - drops_shopping_event_page = 'DROPS_SHOPPING_EVENT_PAGE' - dynamic_item_display_bundle = 'DYNAMIC_ITEM_DISPLAY_BUNDLE' - dynamic_item_video = 'DYNAMIC_ITEM_VIDEO' - dynamic_template_video = 'DYNAMIC_TEMPLATE_VIDEO' - event_cover_video = 'EVENT_COVER_VIDEO' - event_tour = 'EVENT_TOUR' - facecast_dvr = 'FACECAST_DVR' - fb_avatar_animated_satp = 'FB_AVATAR_ANIMATED_SATP' - fb_collectible_video = 'FB_COLLECTIBLE_VIDEO' - fb_shorts = 'FB_SHORTS' - 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' - fb_shorts_remix_post = 'FB_SHORTS_REMIX_POST' - fundraiser_cover_video = 'FUNDRAISER_COVER_VIDEO' - game_clip = 'GAME_CLIP' - gemstone = 'GEMSTONE' - gif_to_video = 'GIF_TO_VIDEO' - goodwill_anniversary_deprecated = 'GOODWILL_ANNIVERSARY_DEPRECATED' - goodwill_anniversary_promotion_deprecated = 'GOODWILL_ANNIVERSARY_PROMOTION_DEPRECATED' - goodwill_video_contained_share = 'GOODWILL_VIDEO_CONTAINED_SHARE' - goodwill_video_promotion = 'GOODWILL_VIDEO_PROMOTION' - goodwill_video_share = 'GOODWILL_VIDEO_SHARE' - goodwill_video_token_required = 'GOODWILL_VIDEO_TOKEN_REQUIRED' - group_post = 'GROUP_POST' - hack_tv = 'HACK_TV' - heuristic_cluster_video = 'HEURISTIC_CLUSTER_VIDEO' - highlight_clip_video = 'HIGHLIGHT_CLIP_VIDEO' - huddle_broadcast = 'HUDDLE_BROADCAST' - ig_reels_xpv = 'IG_REELS_XPV' - ig_stories_reader = 'IG_STORIES_READER' - injectable = 'INJECTABLE' - inspiration_video = 'INSPIRATION_VIDEO' - 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' - learn = 'LEARN' - legacy = 'LEGACY' - legacy_contained_post_broadcast = 'LEGACY_CONTAINED_POST_BROADCAST' - live_audio_room_broadcast = 'LIVE_AUDIO_ROOM_BROADCAST' - live_clip_preview = 'LIVE_CLIP_PREVIEW' - live_clip_workchat = 'LIVE_CLIP_WORKCHAT' - live_creative_kit_video = 'LIVE_CREATIVE_KIT_VIDEO' - live_photo = 'LIVE_PHOTO' - look_now_deprecated = 'LOOK_NOW_DEPRECATED' - marketplace_listing_video = 'MARKETPLACE_LISTING_VIDEO' - marketplace_pre_recorded_video = 'MARKETPLACE_PRE_RECORDED_VIDEO' - messenger_watch_together = 'MESSENGER_WATCH_TOGETHER' - moments_video = 'MOMENTS_VIDEO' - music_clip = 'MUSIC_CLIP' - 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' - new_contained_post_broadcast = 'NEW_CONTAINED_POST_BROADCAST' - no_story = 'NO_STORY' - no_story_with_entpost = 'NO_STORY_WITH_ENTPOST' - npe_collab_copyright_check = 'NPE_COLLAB_COPYRIGHT_CHECK' - oculus_creator_portal = 'OCULUS_CREATOR_PORTAL' - oculus_venues_broadcast = 'OCULUS_VENUES_BROADCAST' - offers_video = 'OFFERS_VIDEO' - pages_cover_video = 'PAGES_COVER_VIDEO' - page_review_screencast = 'PAGE_REVIEW_SCREENCAST' - page_slideshow_video = 'PAGE_SLIDESHOW_VIDEO' - paid_content_preview = 'PAID_CONTENT_PREVIEW' - paid_content_video = 'PAID_CONTENT_VIDEO' - paid_content_video__post = 'PAID_CONTENT_VIDEO__POST' - paper_document_audio = 'PAPER_DOCUMENT_AUDIO' - paper_document_video = 'PAPER_DOCUMENT_VIDEO' - pixelcloud = 'PIXELCLOUD' - podcast_highlight = 'PODCAST_HIGHLIGHT' - podcast_ml_preview = 'PODCAST_ML_PREVIEW' - podcast_ml_preview_no_newsfeed_story = 'PODCAST_ML_PREVIEW_NO_NEWSFEED_STORY' - podcast_rss = 'PODCAST_RSS' - podcast_rss_ephemeral = 'PODCAST_RSS_EPHEMERAL' - podcast_rss_no_newsfeed_story = 'PODCAST_RSS_NO_NEWSFEED_STORY' - podcast_voices = 'PODCAST_VOICES' - podcast_voices_no_newsfeed_story = 'PODCAST_VOICES_NO_NEWSFEED_STORY' - premiere_source = 'PREMIERE_SOURCE' - premium_music_video_clip = 'PREMIUM_MUSIC_VIDEO_CLIP' - premium_music_video_cropped_clip = 'PREMIUM_MUSIC_VIDEO_CROPPED_CLIP' - premium_music_video_no_newsfeed_story = 'PREMIUM_MUSIC_VIDEO_NO_NEWSFEED_STORY' - premium_music_video_with_newsfeed_story = 'PREMIUM_MUSIC_VIDEO_WITH_NEWSFEED_STORY' - private_gallery_video = 'PRIVATE_GALLERY_VIDEO' - product_video = 'PRODUCT_VIDEO' - profile_cover_video = 'PROFILE_COVER_VIDEO' - 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' - say_thanks_deprecated = 'SAY_THANKS_DEPRECATED' - showreel_native_dummy_video = 'SHOWREEL_NATIVE_DUMMY_VIDEO' - slideshow_animoto = 'SLIDESHOW_ANIMOTO' - slideshow_shakr = 'SLIDESHOW_SHAKR' - slideshow_variation_video = 'SLIDESHOW_VARIATION_VIDEO' - 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' - storyline_with_external_music = 'STORYLINE_WITH_EXTERNAL_MUSIC' - story_archive_video = 'STORY_ARCHIVE_VIDEO' - story_card_template = 'STORY_CARD_TEMPLATE' - stream_highlights_video = 'STREAM_HIGHLIGHTS_VIDEO' - tarot_digest = 'TAROT_DIGEST' - 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' - video_composition_variation = 'VIDEO_COMPOSITION_VARIATION' - video_creative_editor_autogen_ad_video = 'VIDEO_CREATIVE_EDITOR_AUTOGEN_AD_VIDEO' - video_superres = 'VIDEO_SUPERRES' - voices_article_video = 'VOICES_ARTICLE_VIDEO' - vu_generated_video = 'VU_GENERATED_VIDEO' - woodhenge = 'WOODHENGE' - work_knowledge_video = 'WORK_KNOWLEDGE_VIDEO' - your_day = 'YOUR_DAY' - - class ContentCategory: - beauty_fashion = 'BEAUTY_FASHION' - business = 'BUSINESS' - cars_trucks = 'CARS_TRUCKS' - comedy = 'COMEDY' - cute_animals = 'CUTE_ANIMALS' - entertainment = 'ENTERTAINMENT' - family = 'FAMILY' - food_health = 'FOOD_HEALTH' - home = 'HOME' - lifestyle = 'LIFESTYLE' - music = 'MUSIC' - news = 'NEWS' - other = 'OTHER' - politics = 'POLITICS' - science = 'SCIENCE' - sports = 'SPORTS' - technology = 'TECHNOLOGY' - video_gaming = 'VIDEO_GAMING' - - class Formatting: - markdown = 'MARKDOWN' - plaintext = 'PLAINTEXT' - - class OriginalProjectionType: - cubemap = 'cubemap' - equirectangular = 'equirectangular' - half_equirectangular = 'half_equirectangular' - - class SwapMode: - replace = 'replace' - - class UnpublishedContentType: - ads_post = 'ADS_POST' - draft = 'DRAFT' - inline_created = 'INLINE_CREATED' - published = 'PUBLISHED' - reviewable_branded_content = 'REVIEWABLE_BRANDED_CONTENT' - scheduled = 'SCHEDULED' - scheduled_recurring = 'SCHEDULED_RECURRING' - - class UploadPhase: - cancel = 'cancel' - finish = 'finish' - 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' - - class VideoState: - draft = 'DRAFT' - published = 'PUBLISHED' - scheduled = 'SCHEDULED' - - class BackdatedTimeGranularity: - day = 'day' - hour = 'hour' - min = 'min' - month = 'month' - none = 'none' - year = 'year' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'advideos' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad_video(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 - if batch 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=AdVideo, - 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_breaks': 'list', - 'allow_bm_crossposting': 'bool', - 'allow_crossposting_for_pages': 'list', - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'backdated_time_granularity_enum', - 'call_to_action': 'Object', - 'content_category': 'content_category_enum', - 'content_tags': 'list', - 'custom_labels': 'list', - 'description': 'string', - 'direct_share_status': 'unsigned int', - 'embeddable': 'bool', - 'expiration': 'Object', - 'expire_now': 'bool', - 'increment_play_count': 'bool', - 'name': 'string', - 'preferred_thumbnail_id': 'string', - 'privacy': 'string', - 'publish_to_news_feed': 'bool', - 'publish_to_videos_tab': 'bool', - 'published': 'bool', - 'scheduled_publish_time': 'unsigned int', - 'social_actions': 'bool', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'tags': 'list', - 'target': 'string', - 'universal_video_id': 'string', - } - enums = { - 'backdated_time_granularity_enum': AdVideo.BackdatedTimeGranularity.__dict__.values(), - 'content_category_enum': AdVideo.ContentCategory.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdVideo, - 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_captions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/captions', - 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_caption(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'captions_file': 'file', - 'default_locale': 'string', - 'locales_to_delete': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/captions', - 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) - - if batch is 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_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/collaborators', - 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_collaborator(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'target_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/collaborators', - 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) - - if batch is 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.comment import Comment - param_types = { - 'filter': 'filter_enum', - 'live_filter': 'live_filter_enum', - 'order': 'order_enum', - 'since': 'datetime', - } - enums = { - 'filter_enum': Comment.Filter.__dict__.values(), - 'live_filter_enum': Comment.LiveFilter.__dict__.values(), - '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() - - 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.comment import Comment - param_types = { - 'attachment_id': 'string', - 'attachment_share_url': 'string', - 'attachment_url': 'string', - 'comment_privacy_value': 'comment_privacy_value_enum', - 'facepile_mentioned_ids': 'list', - 'feedback_source': 'string', - 'is_offline': 'bool', - 'message': 'string', - 'nectar_module': 'string', - 'object_id': 'string', - 'parent_comment_id': 'Object', - 'text': 'string', - 'tracking': 'string', - } - enums = { - 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - 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() - - def get_crosspost_shared_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.') - from facebook_business.adobjects.page import Page - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/crosspost_shared_pages', - 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 create_gaming_clip_create(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'duration_seconds': 'float', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/gaming_clip_create', - 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) - - if batch is 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_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=AdVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdVideo, 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_poll_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/poll_settings', - 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_polls(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.videopoll import VideoPoll - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/polls', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoPoll, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoPoll, 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_poll(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.videopoll import VideoPoll - param_types = { - 'close_after_voting': 'bool', - 'correct_option': 'unsigned int', - 'default_open': 'bool', - 'options': 'list', - 'question': 'string', - 'show_gradient': 'bool', - 'show_results': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/polls', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoPoll, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoPoll, 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_sponsor_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/sponsor_tags', - 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_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/tags', - 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_tag(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'tag_uid': 'int', - 'uid': 'int', - 'vid': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/tags', - 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) - - if batch is 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_thumbnails(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.videothumbnail import VideoThumbnail - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/thumbnails', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoThumbnail, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoThumbnail, 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_thumbnail(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_preferred': 'bool', - 'source': 'file', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/thumbnails', - 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) - - if batch is 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_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.') - from facebook_business.adobjects.insightsresult import InsightsResult - param_types = { - 'metric': 'list', - 'period': 'period_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'period_enum': InsightsResult.Period.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/video_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), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is 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_breaks': 'list', - 'admin_creator': 'User', - 'audio_isrc': 'Object', - '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', - 'description': 'string', - 'embed_html': 'Object', - 'embeddable': 'bool', - 'event': 'Event', - 'expiration': 'Object', - 'format': 'list', - 'from': 'Object', - 'icon': 'string', - 'id': 'string', - 'is_crosspost_video': 'bool', - 'is_crossposting_eligible': 'bool', - 'is_episode': 'bool', - 'is_instagram_eligible': 'bool', - 'is_reference_only': 'bool', - 'length': 'float', - 'live_audience_count': 'unsigned int', - 'live_status': 'string', - 'music_video_copyright': 'MusicVideoCopyright', - 'permalink_url': 'string', - 'picture': 'string', - 'place': 'Place', - 'post_id': 'string', - 'post_views': 'unsigned int', - 'premiere_living_room_status': 'string', - 'privacy': 'Privacy', - 'published': 'bool', - 'scheduled_publish_time': 'datetime', - 'source': 'string', - 'spherical': 'bool', - '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', - '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': 'ContainerType', - 'creative_tools': 'string', - 'end_offset': 'unsigned int', - 'fbuploader_video_file_chunk': 'string', - 'file_size': 'unsigned int', - 'file_url': 'string', - 'fisheye_video_cropped': 'bool', - 'formatting': 'Formatting', - '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', - 'name': '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': 'OriginalProjectionType', - 'publish_event_id': 'unsigned int', - 'react_mode_metadata': 'string', - 'referenced_sticker_id': 'string', - 'replace_video_id': 'string', - 'slideshow_spec': 'map', - 'source_instagram_media_id': 'string', - 'start_offset': 'unsigned int', - 'swap_mode': 'SwapMode', - 'text_format_metadata': 'string', - 'throwback_camera_roll_media': 'string', - 'thumb': 'file', - 'time_since_original_post': 'unsigned int', - 'transcode_setting_properties': 'string', - 'unpublished_content_type': 'UnpublishedContentType', - 'upload_phase': 'UploadPhase', - 'upload_session_id': 'string', - 'upload_setting_properties': 'string', - 'video_file_chunk': 'string', - '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 - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ContainerType'] = AdVideo.ContainerType.__dict__.values() - field_enum_info['ContentCategory'] = AdVideo.ContentCategory.__dict__.values() - field_enum_info['Formatting'] = AdVideo.Formatting.__dict__.values() - field_enum_info['OriginalProjectionType'] = AdVideo.OriginalProjectionType.__dict__.values() - 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() - return field_enum_info - - - def remote_create( - self, - batch=None, - failure=None, - params=None, - success=None, - ): - """ - Uploads filepath and creates the AdVideo object from it. - It has same arguments as AbstractCrudObject.remote_create except it - does not have the files argument but requires the 'filepath' property - to be defined. - """ - from facebook_business.exceptions import FacebookBadObjectError - from facebook_business.video_uploader import ( - VideoUploader, - VideoUploadRequest, - ) - - if (self.Field.slideshow_spec in self and - self[self.Field.slideshow_spec] is not None): - request = VideoUploadRequest(self.get_api_assured()) - request.setParams(params={'slideshow_spec': { - 'images_urls': self[self.Field.slideshow_spec]['images_urls'], - 'duration_ms': self[self.Field.slideshow_spec]['duration_ms'], - 'transition_ms': self[self.Field.slideshow_spec]['transition_ms'], - }}) - response = request.send((self.get_parent_id_assured(), 'advideos')).json() - elif not (self.Field.filepath in self): - raise FacebookBadObjectError( - "AdVideo requires a filepath or slideshow_spec to be defined.", - ) - else: - video_uploader = VideoUploader() - response = video_uploader.upload(self) - self._set_data(response) - return response - - def waitUntilEncodingReady(self, interval=30, timeout=600): - from facebook_business.video_uploader import VideoEncodingStatusChecker - from facebook_business.exceptions import FacebookError - - if 'id' not in self: - raise FacebookError( - 'Invalid Video ID', - ) - VideoEncodingStatusChecker.waitUntilReady( - self.get_api_assured(), - self['id'], - interval, - timeout, - ) diff --git a/tap_facebook/facebook_business/adobjects/agencyclientdeclaration.py b/tap_facebook/facebook_business/adobjects/agencyclientdeclaration.py deleted file mode 100644 index 06ff215..0000000 --- a/tap_facebook/facebook_business/adobjects/agencyclientdeclaration.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AgencyClientDeclaration( - AbstractObject, -): - - def __init__(self, api=None): - super(AgencyClientDeclaration, self).__init__() - self._isAgencyClientDeclaration = True - self._api = api - - class Field(AbstractObject.Field): - agency_representing_client = 'agency_representing_client' - client_based_in_france = 'client_based_in_france' - client_city = 'client_city' - client_country_code = 'client_country_code' - client_email_address = 'client_email_address' - client_name = 'client_name' - client_postal_code = 'client_postal_code' - client_province = 'client_province' - client_street = 'client_street' - client_street2 = 'client_street2' - has_written_mandate_from_advertiser = 'has_written_mandate_from_advertiser' - is_client_paying_invoices = 'is_client_paying_invoices' - - _field_types = { - 'agency_representing_client': 'unsigned int', - 'client_based_in_france': 'unsigned int', - 'client_city': 'string', - 'client_country_code': 'string', - 'client_email_address': 'string', - 'client_name': 'string', - 'client_postal_code': 'string', - 'client_province': 'string', - 'client_street': 'string', - 'client_street2': 'string', - 'has_written_mandate_from_advertiser': 'unsigned int', - 'is_client_paying_invoices': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/agerange.py b/tap_facebook/facebook_business/adobjects/agerange.py deleted file mode 100644 index 59dfe8e..0000000 --- a/tap_facebook/facebook_business/adobjects/agerange.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AgeRange( - AbstractObject, -): - - def __init__(self, api=None): - super(AgeRange, self).__init__() - self._isAgeRange = True - self._api = api - - class Field(AbstractObject.Field): - max = 'max' - min = 'min' - - _field_types = { - 'max': 'unsigned int', - 'min': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/album.py b/tap_facebook/facebook_business/adobjects/album.py deleted file mode 100644 index f7de684..0000000 --- a/tap_facebook/facebook_business/adobjects/album.py +++ /dev/null @@ -1,410 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Album( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAlbum = True - super(Album, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - backdated_time = 'backdated_time' - backdated_time_granularity = 'backdated_time_granularity' - can_backdate = 'can_backdate' - can_upload = 'can_upload' - count = 'count' - cover_photo = 'cover_photo' - created_time = 'created_time' - description = 'description' - edit_link = 'edit_link' - event = 'event' - field_from = 'from' - id = 'id' - is_user_facing = 'is_user_facing' - link = 'link' - location = 'location' - modified_major = 'modified_major' - name = 'name' - photo_count = 'photo_count' - place = 'place' - privacy = 'privacy' - type = 'type' - updated_time = 'updated_time' - video_count = 'video_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=Album, - 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.comment import Comment - param_types = { - 'filter': 'filter_enum', - 'live_filter': 'live_filter_enum', - 'order': 'order_enum', - 'since': 'datetime', - } - enums = { - 'filter_enum': Comment.Filter.__dict__.values(), - 'live_filter_enum': Comment.LiveFilter.__dict__.values(), - '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() - - 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.comment import Comment - param_types = { - 'attachment_id': 'string', - 'attachment_share_url': 'string', - 'attachment_url': 'string', - 'comment_privacy_value': 'comment_privacy_value_enum', - 'facepile_mentioned_ids': 'list', - 'feedback_source': 'string', - 'is_offline': 'bool', - 'message': 'string', - 'nectar_module': 'string', - 'object_id': 'string', - 'parent_comment_id': 'Object', - 'text': 'string', - 'tracking': 'string', - } - enums = { - 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - 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() - - def get_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_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=Album, - api_type='EDGE', - response_parser=ObjectParser(target_class=Album, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.photo import Photo - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/photos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Photo, - api_type='EDGE', - response_parser=ObjectParser(target_class=Photo, 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_photo(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.photo import Photo - param_types = { - 'aid': 'string', - 'allow_spherical_photo': 'bool', - 'alt_text_custom': 'string', - 'android_key_hash': 'string', - 'application_id': 'string', - 'attempt': 'unsigned int', - 'audience_exp': 'bool', - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'backdated_time_granularity_enum', - 'caption': 'string', - 'composer_session_id': 'string', - 'direct_share_status': 'unsigned int', - 'feed_targeting': 'Object', - 'filter_type': 'unsigned int', - 'full_res_is_coming_later': 'bool', - 'initial_view_heading_override_degrees': 'unsigned int', - 'initial_view_pitch_override_degrees': 'unsigned int', - 'initial_view_vertical_fov_override_degrees': 'unsigned int', - 'ios_bundle_id': 'string', - 'is_explicit_location': 'bool', - 'is_explicit_place': 'bool', - 'manual_privacy': 'bool', - 'message': 'string', - 'name': 'string', - 'no_story': 'bool', - 'offline_id': 'unsigned int', - 'og_action_type_id': 'string', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'place': 'Object', - 'privacy': 'string', - 'profile_id': 'int', - 'proxied_app_id': 'string', - 'published': 'bool', - 'qn': 'string', - 'spherical_metadata': 'map', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'tags': 'list', - 'target_id': 'int', - 'targeting': 'Object', - 'time_since_original_post': 'unsigned int', - 'uid': 'int', - 'unpublished_content_type': 'unpublished_content_type_enum', - 'url': 'string', - 'user_selected_tags': 'bool', - 'vault_image_id': 'string', - } - enums = { - 'backdated_time_granularity_enum': Photo.BackdatedTimeGranularity.__dict__.values(), - 'unpublished_content_type_enum': Photo.UnpublishedContentType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/photos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Photo, - api_type='EDGE', - response_parser=ObjectParser(target_class=Photo, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profilepicturesource import ProfilePictureSource - param_types = { - 'redirect': 'bool', - 'type': 'type_enum', - } - enums = { - 'type_enum': ProfilePictureSource.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/picture', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProfilePictureSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProfilePictureSource, 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 = { - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'string', - 'can_backdate': 'bool', - 'can_upload': 'bool', - 'count': 'unsigned int', - 'cover_photo': 'Photo', - 'created_time': 'datetime', - 'description': 'string', - 'edit_link': 'string', - 'event': 'Event', - 'from': 'Object', - 'id': 'string', - 'is_user_facing': 'bool', - 'link': 'string', - 'location': 'string', - 'modified_major': 'datetime', - 'name': 'string', - 'photo_count': 'unsigned int', - 'place': 'Place', - 'privacy': 'string', - 'type': 'string', - 'updated_time': 'datetime', - 'video_count': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/analyticssegment.py b/tap_facebook/facebook_business/adobjects/analyticssegment.py deleted file mode 100644 index 641c1d7..0000000 --- a/tap_facebook/facebook_business/adobjects/analyticssegment.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/androidapplink.py b/tap_facebook/facebook_business/adobjects/androidapplink.py deleted file mode 100644 index 279a141..0000000 --- a/tap_facebook/facebook_business/adobjects/androidapplink.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AndroidAppLink( - AbstractObject, -): - - def __init__(self, api=None): - super(AndroidAppLink, self).__init__() - self._isAndroidAppLink = True - self._api = api - - class Field(AbstractObject.Field): - app_name = 'app_name' - field_class = 'class' - package = 'package' - url = 'url' - - _field_types = { - 'app_name': 'string', - 'class': 'string', - 'package': 'string', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/application.py b/tap_facebook/facebook_business/adobjects/application.py deleted file mode 100644 index 37acf2a..0000000 --- a/tap_facebook/facebook_business/adobjects/application.py +++ /dev/null @@ -1,2315 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Application( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isApplication = True - super(Application, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - aam_rules = 'aam_rules' - an_ad_space_limit = 'an_ad_space_limit' - an_platforms = 'an_platforms' - android_key_hash = 'android_key_hash' - android_sdk_error_categories = 'android_sdk_error_categories' - app_domains = 'app_domains' - app_events_config = 'app_events_config' - app_events_feature_bitmask = 'app_events_feature_bitmask' - app_events_session_timeout = 'app_events_session_timeout' - app_install_tracked = 'app_install_tracked' - app_name = 'app_name' - app_signals_binding_ios = 'app_signals_binding_ios' - app_type = 'app_type' - auth_dialog_data_help_url = 'auth_dialog_data_help_url' - auth_dialog_headline = 'auth_dialog_headline' - auth_dialog_perms_explanation = 'auth_dialog_perms_explanation' - auth_referral_default_activity_privacy = 'auth_referral_default_activity_privacy' - auth_referral_enabled = 'auth_referral_enabled' - auth_referral_extended_perms = 'auth_referral_extended_perms' - auth_referral_friend_perms = 'auth_referral_friend_perms' - auth_referral_response_type = 'auth_referral_response_type' - auth_referral_user_perms = 'auth_referral_user_perms' - 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' - canvas_url = 'canvas_url' - category = 'category' - client_config = 'client_config' - company = 'company' - configured_ios_sso = 'configured_ios_sso' - contact_email = 'contact_email' - created_time = 'created_time' - creator_uid = 'creator_uid' - daily_active_users = 'daily_active_users' - daily_active_users_rank = 'daily_active_users_rank' - deauth_callback_url = 'deauth_callback_url' - default_share_mode = 'default_share_mode' - description = 'description' - financial_id = 'financial_id' - gdpv4_chrome_custom_tabs_enabled = 'gdpv4_chrome_custom_tabs_enabled' - gdpv4_enabled = 'gdpv4_enabled' - gdpv4_nux_content = 'gdpv4_nux_content' - gdpv4_nux_enabled = 'gdpv4_nux_enabled' - has_messenger_product = 'has_messenger_product' - hosting_url = 'hosting_url' - icon_url = 'icon_url' - id = 'id' - ios_bundle_id = 'ios_bundle_id' - ios_sdk_dialog_flows = 'ios_sdk_dialog_flows' - ios_sdk_error_categories = 'ios_sdk_error_categories' - ios_sfvc_attr = 'ios_sfvc_attr' - ios_supports_native_proxy_auth_flow = 'ios_supports_native_proxy_auth_flow' - ios_supports_system_auth = 'ios_supports_system_auth' - ipad_app_store_id = 'ipad_app_store_id' - iphone_app_store_id = 'iphone_app_store_id' - latest_sdk_version = 'latest_sdk_version' - link = 'link' - logging_token = 'logging_token' - logo_url = 'logo_url' - migrations = 'migrations' - mobile_profile_section_url = 'mobile_profile_section_url' - mobile_web_url = 'mobile_web_url' - monthly_active_users = 'monthly_active_users' - monthly_active_users_rank = 'monthly_active_users_rank' - name = 'name' - namespace = 'namespace' - object_store_urls = 'object_store_urls' - owner_business = 'owner_business' - page_tab_default_name = 'page_tab_default_name' - page_tab_url = 'page_tab_url' - photo_url = 'photo_url' - 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' - restrictive_data_filter_rules = 'restrictive_data_filter_rules' - sdk_update_message = 'sdk_update_message' - seamless_login = 'seamless_login' - secure_canvas_url = 'secure_canvas_url' - secure_page_tab_url = 'secure_page_tab_url' - server_ip_whitelist = 'server_ip_whitelist' - smart_login_bookmark_icon_url = 'smart_login_bookmark_icon_url' - smart_login_menu_icon_url = 'smart_login_menu_icon_url' - social_discovery = 'social_discovery' - subcategory = 'subcategory' - suggested_events_setting = 'suggested_events_setting' - supported_platforms = 'supported_platforms' - supports_apprequests_fast_app_switch = 'supports_apprequests_fast_app_switch' - supports_attribution = 'supports_attribution' - supports_implicit_sdk_logging = 'supports_implicit_sdk_logging' - suppress_native_ios_gdp = 'suppress_native_ios_gdp' - terms_of_service_url = 'terms_of_service_url' - url_scheme_suffix = 'url_scheme_suffix' - user_support_email = 'user_support_email' - user_support_url = 'user_support_url' - website_url = 'website_url' - weekly_active_users = 'weekly_active_users' - - class SupportedPlatforms: - amazon = 'AMAZON' - android = 'ANDROID' - canvas = 'CANVAS' - gameroom = 'GAMEROOM' - instant_game = 'INSTANT_GAME' - ipad = 'IPAD' - iphone = 'IPHONE' - mobile_web = 'MOBILE_WEB' - oculus = 'OCULUS' - samsung = 'SAMSUNG' - supplementary_images = 'SUPPLEMENTARY_IMAGES' - web = 'WEB' - windows = 'WINDOWS' - xiaomi = 'XIAOMI' - - class AnPlatforms: - android = 'ANDROID' - desktop = 'DESKTOP' - galaxy = 'GALAXY' - instant_articles = 'INSTANT_ARTICLES' - ios = 'IOS' - mobile_web = 'MOBILE_WEB' - oculus = 'OCULUS' - unknown = 'UNKNOWN' - xiaomi = 'XIAOMI' - - class Platform: - android = 'ANDROID' - ios = 'IOS' - - class RequestType: - app_indexing = 'APP_INDEXING' - button_sampling = 'BUTTON_SAMPLING' - plugin = 'PLUGIN' - - class MutationMethod: - add = 'ADD' - delete = 'DELETE' - replace = 'REPLACE' - - class PostMethod: - codeless = 'CODELESS' - eymt = 'EYMT' - - class LoggingSource: - detection = 'DETECTION' - messenger_bot = 'MESSENGER_BOT' - - class LoggingTarget: - app = 'APP' - app_and_page = 'APP_AND_PAGE' - page = 'PAGE' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adnetwork_applications' - - # @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_ad_network_application(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 = { - 'advertiser_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Application, - 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 = { - 'allow_cycle_app_secret': 'bool', - 'an_platforms': 'list', - 'app_domains': 'list', - 'app_name': 'string', - 'app_type': 'bool', - 'auth_dialog_headline': 'string', - 'auth_dialog_perms_explanation': 'string', - 'auth_referral_default_activity_privacy': 'string', - 'auth_referral_enabled': 'bool', - 'auth_referral_extended_perms': 'list', - 'auth_referral_friend_perms': 'list', - 'auth_referral_response_type': 'string', - 'auth_referral_user_perms': 'list', - 'canvas_fluid_height': 'bool', - 'canvas_fluid_width': 'bool', - 'canvas_url': 'string', - 'contact_email': 'string', - 'deauth_callback_url': 'string', - 'mobile_web_url': 'string', - 'namespace': 'string', - 'page_tab_default_name': 'string', - 'privacy_policy_url': 'string', - 'restrictions': 'string', - 'secure_canvas_url': 'string', - 'secure_page_tab_url': 'string', - 'server_ip_whitelist': 'list', - 'terms_of_service_url': 'string', - 'url_scheme_suffix': 'string', - 'user_support_email': 'string', - 'user_support_url': 'string', - 'website_url': 'string', - } - enums = { - 'an_platforms_enum': Application.AnPlatforms.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Application, - 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_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.') - param_types = { - 'type': 'type_enum', - 'uid': 'int', - } - enums = { - 'type_enum': [ - 'test-users', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/accounts', - 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_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.') - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': [ - 'test-users', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/accounts', - 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_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 = { - 'installed': 'bool', - 'minor': 'bool', - 'name': 'string', - 'owner_access_token': 'string', - 'permissions': 'list', - 'type': 'type_enum', - 'uid': 'int', - } - enums = { - 'type_enum': [ - 'test-users', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/accounts', - 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_activity(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'advertiser_id': 'string', - 'advertiser_tracking_enabled': 'bool', - 'anon_id': 'string', - 'app_user_id': 'string', - 'application_tracking_enabled': 'bool', - 'attribution': 'string', - 'auto_publish': 'bool', - 'bundle_id': 'string', - 'bundle_short_version': 'string', - 'bundle_version': 'string', - 'campaign_ids': 'string', - 'click_id': 'string', - 'consider_views': 'bool', - 'custom_events': 'list', - 'custom_events_file': 'file', - 'data_processing_options': 'list', - 'data_processing_options_country': 'unsigned int', - 'data_processing_options_state': 'unsigned int', - 'device_token': 'string', - 'event': 'event_enum', - 'extinfo': 'Object', - 'include_dwell_data': 'bool', - 'include_video_data': 'bool', - 'install_referrer': 'string', - 'install_timestamp': 'unsigned int', - 'installer_package': 'string', - 'limited_data_use': 'bool', - 'migration_bundle': 'string', - 'page_id': 'unsigned int', - 'page_scoped_user_id': 'unsigned int', - 'receipt_data': 'string', - 'ud': 'map', - 'url_schemes': 'list', - 'user_id': 'string', - 'user_id_type': 'user_id_type_enum', - 'vendor_id': 'string', - 'windows_attribution_id': 'string', - } - enums = { - 'event_enum': [ - 'CUSTOM_APP_EVENTS', - 'DEFERRED_APP_LINK', - 'MOBILE_APP_INSTALL', - ], - 'user_id_type_enum': [ - 'INSTANT_GAMES_PLAYER_ID', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/activities', - 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_ad_placement_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ad_placement_groups', - 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_ad_network_placements(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adplacement import AdPlacement - param_types = { - 'request_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adnetwork_placements', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdPlacement, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdPlacement, 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_ad_network_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.') - from facebook_business.adobjects.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult - param_types = { - 'aggregation_period': 'aggregation_period_enum', - 'breakdowns': 'list', - 'filters': 'list', - 'limit': 'unsigned int', - 'metrics': 'list', - 'ordering_column': 'ordering_column_enum', - 'ordering_type': 'ordering_type_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), - 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), - 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), - 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), - 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adnetworkanalytics', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdNetworkAnalyticsSyncQueryResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdNetworkAnalyticsSyncQueryResult, 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_ad_network_analytic(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult - param_types = { - 'aggregation_period': 'aggregation_period_enum', - 'breakdowns': 'list', - 'filters': 'list', - 'limit': 'int', - 'metrics': 'list', - 'ordering_column': 'ordering_column_enum', - 'ordering_type': 'ordering_type_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), - 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), - 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), - 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), - 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adnetworkanalytics', - 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_ad_network_analytics_results(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adnetworkanalyticsasyncqueryresult import AdNetworkAnalyticsAsyncQueryResult - param_types = { - 'query_ids': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adnetworkanalytics_results', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdNetworkAnalyticsAsyncQueryResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdNetworkAnalyticsAsyncQueryResult, 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_aem_attribution(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'advertiser_ids': 'list', - 'fb_content_data': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/aem_attribution', - 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_aem_conversion_configs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'advertiser_ids': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/aem_conversion_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_aem_conversion_filter(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'catalog_id': 'string', - 'fb_content_ids': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/aem_conversion_filter', - 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_aem_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'aem_conversions': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/aem_conversions', - 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_aem_skan_readiness(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'app_id': 'int', - 'is_aem_ready': 'bool', - 'is_app_aem_install_ready': 'bool', - 'is_app_aem_ready': 'bool', - 'is_skan_ready': 'bool', - 'message': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/aem_skan_readiness', - 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): - 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='/agencies', - 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_aggregate_revenue(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'ecpms': 'list', - 'query_ids': 'list', - 'request_id': 'string', - 'sync_api': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/aggregate_revenue', - 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_android_dialog_configs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/android_dialog_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_app_capi_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/app_capi_settings', - 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_app_event_types(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/app_event_types', - 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_app_indexing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'app_version': 'string', - 'device_session_id': 'string', - 'extra_info': 'string', - 'platform': 'platform_enum', - 'request_type': 'request_type_enum', - 'tree': 'map', - } - enums = { - 'platform_enum': Application.Platform.__dict__.values(), - 'request_type_enum': Application.RequestType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/app_indexing', - 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 create_app_indexing_session(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'device_session_id': 'string', - 'extinfo': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/app_indexing_session', - 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_app_installed_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.group import Group - param_types = { - 'group_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/app_installed_groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - api_type='EDGE', - response_parser=ObjectParser(target_class=Group, 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_app_push_device_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 = { - 'device_id': 'string', - 'device_token': 'string', - 'platform': 'platform_enum', - } - enums = { - 'platform_enum': Application.Platform.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/app_push_device_token', - 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_app_assets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/appassets', - 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_asset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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': 'file', - 'comment': 'string', - 'type': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/assets', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.adaccount import AdAccount - param_types = { - 'business': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/authorized_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() - - def get_button_auto_detection_device_selection(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'device_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/button_auto_detection_device_selection', - 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_cloudbridge_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/cloudbridge_settings', - 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_codeless_event_mapping(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'mappings': 'list', - 'mutation_method': 'mutation_method_enum', - 'platform': 'platform_enum', - 'post_method': 'post_method_enum', - } - enums = { - 'mutation_method_enum': Application.MutationMethod.__dict__.values(), - 'platform_enum': Application.Platform.__dict__.values(), - 'post_method_enum': Application.PostMethod.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/codeless_event_mappings', - 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_da_checks(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.dacheck import DACheck - param_types = { - 'checks': 'list', - 'connection_method': 'connection_method_enum', - } - enums = { - 'connection_method_enum': DACheck.ConnectionMethod.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/da_checks', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=DACheck, - api_type='EDGE', - response_parser=ObjectParser(target_class=DACheck, 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): - 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', - } - enums = { - 'type_enum': Event.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/events', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Event, - api_type='EDGE', - response_parser=ObjectParser(target_class=Event, 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_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='/iap_purchases', - 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_insights_push_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/insights_push_schedule', - 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_ios_dialog_configs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/ios_dialog_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_linked_dataset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/linked_dataset', - 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_mmp_auditing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'advertiser_id': 'string', - 'attribution': 'string', - 'attribution_model': 'string', - 'auditing_token': 'string', - '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', - 'fb_click_time': 'unsigned int', - 'fb_view_time': 'unsigned int', - 'is_fb': 'bool', - 'used_install_referrer': 'bool', - 'view_attr_window': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/mmp_auditing', - 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_mobile_sdk_gk(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'device_id': 'string', - 'extinfo': 'Object', - 'os_version': 'string', - 'platform': 'platform_enum', - 'sdk_version': 'string', - } - enums = { - 'platform_enum': [ - 'ANDROID', - 'IOS', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/mobile_sdk_gk', - 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_monetized_digital_store_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/monetized_digital_store_objects', - 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_monetized_digital_store_object(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'content_id': 'string', - 'store': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/monetized_digital_store_objects', - 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_object_types(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/object_types', - 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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'flash': 'bool', - 'unity': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/occludespopups', - 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_page_activity(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'advertiser_tracking_enabled': 'bool', - 'application_tracking_enabled': 'bool', - 'custom_events': 'list', - 'logging_source': 'logging_source_enum', - 'logging_target': 'logging_target_enum', - 'page_id': 'unsigned int', - 'page_scoped_user_id': 'unsigned int', - } - enums = { - 'logging_source_enum': Application.LoggingSource.__dict__.values(), - 'logging_target_enum': Application.LoggingTarget.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/page_activities', - 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 create_payment_currency(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'currency_url': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/payment_currencies', - 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_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.') - param_types = { - 'android_key_hash': 'string', - 'ios_bundle_id': 'string', - 'permission': 'list', - 'proxied_app_id': 'int', - 'status': 'list', - } - enums = { - 'status_enum': [ - 'live', - 'unapproved', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/permissions', - 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'product_ids': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/products', - 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_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 = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/purchases', - 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_roles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/roles', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/subscribed_domains', - 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_subscribed_domain(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'subscribe': 'list', - 'unsubscribe': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/subscribed_domains', - 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_subscribed_domains_phishing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/subscribed_domains_phishing', - 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_subscribed_domains_phishing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'subscribe': 'list', - 'unsubscribe': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/subscribed_domains_phishing', - 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 delete_subscriptions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - 'object': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/subscriptions', - 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_subscription(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'callback_url': 'string', - 'fields': 'list', - 'include_values': 'bool', - 'object': 'string', - 'verify_token': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/subscriptions', - 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_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.') - param_types = { - 'file_length': 'unsigned int', - 'file_name': 'Object', - 'file_type': 'Object', - 'session_type': 'session_type_enum', - } - enums = { - 'session_type_enum': [ - 'attachment', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/uploads', - 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', - 'an_platforms': 'list', - 'android_key_hash': 'list', - 'android_sdk_error_categories': 'list', - 'app_domains': 'list', - 'app_events_config': 'Object', - 'app_events_feature_bitmask': 'unsigned int', - 'app_events_session_timeout': 'unsigned int', - 'app_install_tracked': 'bool', - 'app_name': 'string', - 'app_signals_binding_ios': 'list', - 'app_type': 'unsigned int', - 'auth_dialog_data_help_url': 'string', - 'auth_dialog_headline': 'string', - 'auth_dialog_perms_explanation': 'string', - 'auth_referral_default_activity_privacy': 'string', - 'auth_referral_enabled': 'unsigned int', - 'auth_referral_extended_perms': 'list', - 'auth_referral_friend_perms': 'list', - 'auth_referral_response_type': 'string', - 'auth_referral_user_perms': 'list', - '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', - 'canvas_url': 'string', - 'category': 'string', - 'client_config': 'map', - 'company': 'string', - 'configured_ios_sso': 'bool', - 'contact_email': 'string', - 'created_time': 'datetime', - 'creator_uid': 'string', - 'daily_active_users': 'string', - 'daily_active_users_rank': 'unsigned int', - 'deauth_callback_url': 'string', - 'default_share_mode': 'string', - 'description': 'string', - 'financial_id': 'string', - 'gdpv4_chrome_custom_tabs_enabled': 'bool', - 'gdpv4_enabled': 'bool', - 'gdpv4_nux_content': 'string', - 'gdpv4_nux_enabled': 'bool', - 'has_messenger_product': 'bool', - 'hosting_url': 'string', - 'icon_url': 'string', - 'id': 'string', - 'ios_bundle_id': 'list', - 'ios_sdk_dialog_flows': 'Object', - 'ios_sdk_error_categories': 'list', - 'ios_sfvc_attr': 'bool', - 'ios_supports_native_proxy_auth_flow': 'bool', - 'ios_supports_system_auth': 'bool', - 'ipad_app_store_id': 'string', - 'iphone_app_store_id': 'string', - 'latest_sdk_version': 'Object', - 'link': 'string', - 'logging_token': 'string', - 'logo_url': 'string', - 'migrations': 'map', - 'mobile_profile_section_url': 'string', - 'mobile_web_url': 'string', - 'monthly_active_users': 'string', - 'monthly_active_users_rank': 'unsigned int', - 'name': 'string', - 'namespace': 'string', - 'object_store_urls': 'Object', - 'owner_business': 'Business', - 'page_tab_default_name': 'string', - 'page_tab_url': 'string', - 'photo_url': 'string', - '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', - 'restrictive_data_filter_rules': 'string', - 'sdk_update_message': 'string', - 'seamless_login': 'int', - 'secure_canvas_url': 'string', - 'secure_page_tab_url': 'string', - 'server_ip_whitelist': 'string', - 'smart_login_bookmark_icon_url': 'string', - 'smart_login_menu_icon_url': 'string', - 'social_discovery': 'unsigned int', - 'subcategory': 'string', - 'suggested_events_setting': 'string', - 'supported_platforms': 'list', - 'supports_apprequests_fast_app_switch': 'Object', - 'supports_attribution': 'bool', - 'supports_implicit_sdk_logging': 'bool', - 'suppress_native_ios_gdp': 'bool', - 'terms_of_service_url': 'string', - 'url_scheme_suffix': 'string', - 'user_support_email': 'string', - 'user_support_url': 'string', - 'website_url': 'string', - 'weekly_active_users': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['SupportedPlatforms'] = Application.SupportedPlatforms.__dict__.values() - field_enum_info['AnPlatforms'] = Application.AnPlatforms.__dict__.values() - field_enum_info['Platform'] = Application.Platform.__dict__.values() - field_enum_info['RequestType'] = Application.RequestType.__dict__.values() - field_enum_info['MutationMethod'] = Application.MutationMethod.__dict__.values() - field_enum_info['PostMethod'] = Application.PostMethod.__dict__.values() - field_enum_info['LoggingSource'] = Application.LoggingSource.__dict__.values() - field_enum_info['LoggingTarget'] = Application.LoggingTarget.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/apprequest.py b/tap_facebook/facebook_business/adobjects/apprequest.py deleted file mode 100644 index 810cc61..0000000 --- a/tap_facebook/facebook_business/adobjects/apprequest.py +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AppRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAppRequest = True - super(AppRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - action_type = 'action_type' - application = 'application' - created_time = 'created_time' - data = 'data' - field_from = 'from' - id = 'id' - message = 'message' - object = 'object' - to = 'to' - - 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 = { - 'ids': 'list', - } - 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=AppRequest, - 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_type': 'string', - 'application': 'Application', - 'created_time': 'datetime', - 'data': 'string', - 'from': 'Object', - 'id': 'string', - 'message': 'string', - 'object': 'Object', - 'to': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/apprequestformerrecipient.py b/tap_facebook/facebook_business/adobjects/apprequestformerrecipient.py deleted file mode 100644 index 9cabe83..0000000 --- a/tap_facebook/facebook_business/adobjects/apprequestformerrecipient.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AppRequestFormerRecipient( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAppRequestFormerRecipient = True - super(AppRequestFormerRecipient, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - recipient_id = 'recipient_id' - - _field_types = { - 'id': 'string', - 'recipient_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/assigneduser.py b/tap_facebook/facebook_business/adobjects/assigneduser.py deleted file mode 100644 index 04fde57..0000000 --- a/tap_facebook/facebook_business/adobjects/assigneduser.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AssignedUser( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAssignedUser = True - super(AssignedUser, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - business = 'business' - id = 'id' - name = 'name' - user_type = 'user_type' - - _field_types = { - 'business': 'Business', - 'id': 'string', - 'name': 'string', - 'user_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/asyncrequest.py b/tap_facebook/facebook_business/adobjects/asyncrequest.py deleted file mode 100644 index 1db67e6..0000000 --- a/tap_facebook/facebook_business/adobjects/asyncrequest.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AsyncRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAsyncRequest = True - super(AsyncRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - result = 'result' - status = 'status' - type = 'type' - - class Status: - error = 'ERROR' - executing = 'EXECUTING' - finished = 'FINISHED' - initialized = 'INITIALIZED' - - class Type: - async_adgroup_creation = 'ASYNC_ADGROUP_CREATION' - batch_api = 'BATCH_API' - drafts = 'DRAFTS' - - _field_types = { - 'id': 'int', - 'result': 'string', - 'status': 'int', - 'type': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Status'] = AsyncRequest.Status.__dict__.values() - field_enum_info['Type'] = AsyncRequest.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/asyncsession.py b/tap_facebook/facebook_business/adobjects/asyncsession.py deleted file mode 100644 index 01c84eb..0000000 --- a/tap_facebook/facebook_business/adobjects/asyncsession.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AsyncSession( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAsyncSession = True - super(AsyncSession, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - app = 'app' - complete_time = 'complete_time' - error_code = 'error_code' - exception = 'exception' - id = 'id' - method = 'method' - name = 'name' - page = 'page' - percent_completed = 'percent_completed' - platform_version = 'platform_version' - result = 'result' - start_time = 'start_time' - status = 'status' - uri = '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=AsyncSession, - 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': 'Application', - 'complete_time': 'datetime', - 'error_code': 'int', - 'exception': 'string', - 'id': 'string', - 'method': 'string', - 'name': 'string', - 'page': 'Page', - 'percent_completed': 'int', - 'platform_version': 'string', - 'result': 'string', - 'start_time': 'datetime', - 'status': 'string', - 'uri': 'string', - 'user': 'User', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/attributionspec.py b/tap_facebook/facebook_business/adobjects/attributionspec.py deleted file mode 100644 index 1d4c409..0000000 --- a/tap_facebook/facebook_business/adobjects/attributionspec.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AttributionSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(AttributionSpec, self).__init__() - self._isAttributionSpec = True - self._api = api - - class Field(AbstractObject.Field): - event_type = 'event_type' - window_days = 'window_days' - - _field_types = { - 'event_type': 'string', - 'window_days': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/audiencepermissionforactions.py b/tap_facebook/facebook_business/adobjects/audiencepermissionforactions.py deleted file mode 100644 index 93db153..0000000 --- a/tap_facebook/facebook_business/adobjects/audiencepermissionforactions.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class AudiencePermissionForActions( - AbstractObject, -): - - def __init__(self, api=None): - super(AudiencePermissionForActions, self).__init__() - self._isAudiencePermissionForActions = True - self._api = api - - class Field(AbstractObject.Field): - can_edit = 'can_edit' - can_see_insight = 'can_see_insight' - can_share = 'can_share' - subtype_supports_lookalike = 'subtype_supports_lookalike' - supports_recipient_lookalike = 'supports_recipient_lookalike' - - _field_types = { - 'can_edit': 'bool', - 'can_see_insight': 'bool', - 'can_share': 'bool', - 'subtype_supports_lookalike': 'bool', - 'supports_recipient_lookalike': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/audiocopyright.py b/tap_facebook/facebook_business/adobjects/audiocopyright.py deleted file mode 100644 index e22f705..0000000 --- a/tap_facebook/facebook_business/adobjects/audiocopyright.py +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AudioCopyright( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAudioCopyright = True - super(AudioCopyright, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - creation_time = 'creation_time' - displayed_matches_count = 'displayed_matches_count' - id = 'id' - in_conflict = 'in_conflict' - isrc = 'isrc' - match_rule = 'match_rule' - ownership_countries = 'ownership_countries' - reference_file_status = 'reference_file_status' - ridge_monitoring_status = 'ridge_monitoring_status' - tags = 'tags' - update_time = 'update_time' - whitelisted_fb_users = 'whitelisted_fb_users' - whitelisted_ig_users = 'whitelisted_ig_users' - - 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=AudioCopyright, - 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_update_records(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/update_records', - 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 = { - 'creation_time': 'datetime', - 'displayed_matches_count': 'int', - 'id': 'string', - 'in_conflict': 'bool', - 'isrc': 'string', - 'match_rule': 'VideoCopyrightRule', - 'ownership_countries': 'list', - 'reference_file_status': 'string', - 'ridge_monitoring_status': 'string', - 'tags': 'list', - 'update_time': 'datetime', - 'whitelisted_fb_users': 'list', - 'whitelisted_ig_users': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/automotivemodel.py b/tap_facebook/facebook_business/adobjects/automotivemodel.py deleted file mode 100644 index 9879083..0000000 --- a/tap_facebook/facebook_business/adobjects/automotivemodel.py +++ /dev/null @@ -1,234 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 AutomotiveModel( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isAutomotiveModel = True - super(AutomotiveModel, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - applinks = 'applinks' - automotive_model_id = 'automotive_model_id' - availability = 'availability' - body_style = 'body_style' - category_specific_fields = 'category_specific_fields' - currency = 'currency' - custom_label_0 = 'custom_label_0' - description = 'description' - drivetrain = 'drivetrain' - exterior_color = 'exterior_color' - finance_description = 'finance_description' - finance_type = 'finance_type' - fuel_type = 'fuel_type' - generation = 'generation' - id = 'id' - image_fetch_status = 'image_fetch_status' - images = 'images' - interior_color = 'interior_color' - interior_upholstery = 'interior_upholstery' - make = 'make' - model = 'model' - price = 'price' - sanitized_images = 'sanitized_images' - title = 'title' - transmission = 'transmission' - trim = 'trim' - unit_price = 'unit_price' - url = 'url' - visibility = 'visibility' - year = 'year' - - 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=AutomotiveModel, - 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.') - 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=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_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 = { - 'applinks': 'CatalogItemAppLinks', - 'automotive_model_id': 'string', - 'availability': 'string', - 'body_style': 'string', - 'category_specific_fields': 'CatalogSubVerticalList', - 'currency': 'string', - 'custom_label_0': 'string', - 'description': 'string', - 'drivetrain': 'string', - 'exterior_color': 'string', - 'finance_description': 'string', - 'finance_type': 'string', - 'fuel_type': 'string', - 'generation': 'string', - 'id': 'string', - 'image_fetch_status': 'ImageFetchStatus', - 'images': 'list', - 'interior_color': 'string', - 'interior_upholstery': 'string', - 'make': 'string', - 'model': 'string', - 'price': 'string', - 'sanitized_images': 'list', - 'title': 'string', - 'transmission': 'string', - 'trim': 'string', - 'unit_price': 'Object', - 'url': 'string', - 'visibility': 'Visibility', - 'year': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ImageFetchStatus'] = AutomotiveModel.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = AutomotiveModel.Visibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/avatar.py b/tap_facebook/facebook_business/adobjects/avatar.py deleted file mode 100644 index fc62b6c..0000000 --- a/tap_facebook/facebook_business/adobjects/avatar.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/avatarprofilepicture.py b/tap_facebook/facebook_business/adobjects/avatarprofilepicture.py deleted file mode 100644 index a6b2b9b..0000000 --- a/tap_facebook/facebook_business/adobjects/avatarprofilepicture.py +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/brandedcontentshadowigmediaid.py b/tap_facebook/facebook_business/adobjects/brandedcontentshadowigmediaid.py deleted file mode 100644 index 1889814..0000000 --- a/tap_facebook/facebook_business/adobjects/brandedcontentshadowigmediaid.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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' - id = 'id' - owner_id = 'owner_id' - permalink = 'permalink' - - _field_types = { - 'eligibility_errors': 'list', - 'id': 'string', - 'owner_id': 'string', - 'permalink': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/brandedcontentshadowiguserid.py b/tap_facebook/facebook_business/adobjects/brandedcontentshadowiguserid.py deleted file mode 100644 index 8373a76..0000000 --- a/tap_facebook/facebook_business/adobjects/brandedcontentshadowiguserid.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/brandrequest.py b/tap_facebook/facebook_business/adobjects/brandrequest.py deleted file mode 100644 index d6e2299..0000000 --- a/tap_facebook/facebook_business/adobjects/brandrequest.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BrandRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBrandRequest = True - super(BrandRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad_countries = 'ad_countries' - additional_contacts = 'additional_contacts' - approval_level = 'approval_level' - cells = 'cells' - countries = 'countries' - deny_reason = 'deny_reason' - end_time = 'end_time' - estimated_reach = 'estimated_reach' - id = 'id' - is_multicell = 'is_multicell' - locale = 'locale' - max_age = 'max_age' - min_age = 'min_age' - questions = 'questions' - region = 'region' - request_status = 'request_status' - review_date = 'review_date' - start_time = 'start_time' - status = 'status' - submit_date = 'submit_date' - total_budget = 'total_budget' - - 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=BrandRequest, - 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_countries': 'list', - 'additional_contacts': 'list', - 'approval_level': 'unsigned int', - 'cells': 'list', - 'countries': 'list', - 'deny_reason': 'string', - 'end_time': 'datetime', - 'estimated_reach': 'unsigned int', - 'id': 'string', - 'is_multicell': 'bool', - 'locale': 'string', - 'max_age': 'unsigned int', - 'min_age': 'unsigned int', - 'questions': 'list', - 'region': 'string', - 'request_status': 'string', - 'review_date': 'datetime', - 'start_time': 'datetime', - 'status': 'string', - 'submit_date': 'datetime', - 'total_budget': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/brandsafetyblocklistusage.py b/tap_facebook/facebook_business/adobjects/brandsafetyblocklistusage.py deleted file mode 100644 index fef0d72..0000000 --- a/tap_facebook/facebook_business/adobjects/brandsafetyblocklistusage.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class BrandSafetyBlockListUsage( - AbstractObject, -): - - def __init__(self, api=None): - super(BrandSafetyBlockListUsage, self).__init__() - self._isBrandSafetyBlockListUsage = True - self._api = api - - class Field(AbstractObject.Field): - current_usage = 'current_usage' - new_usage = 'new_usage' - platform = 'platform' - position = 'position' - threshold = 'threshold' - - _field_types = { - 'current_usage': 'int', - 'new_usage': 'int', - 'platform': 'string', - 'position': 'string', - 'threshold': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/broadtargetingcategories.py b/tap_facebook/facebook_business/adobjects/broadtargetingcategories.py deleted file mode 100644 index aa1b1aa..0000000 --- a/tap_facebook/facebook_business/adobjects/broadtargetingcategories.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BroadTargetingCategories( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBroadTargetingCategories = True - super(BroadTargetingCategories, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - category_description = 'category_description' - id = 'id' - name = 'name' - parent_category = 'parent_category' - path = 'path' - size_lower_bound = 'size_lower_bound' - size_upper_bound = 'size_upper_bound' - source = 'source' - type = 'type' - type_name = 'type_name' - untranslated_name = 'untranslated_name' - untranslated_parent_name = 'untranslated_parent_name' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'broadtargetingcategories' - - _field_types = { - 'category_description': 'string', - 'id': 'string', - 'name': 'string', - 'parent_category': 'string', - 'path': 'list', - 'size_lower_bound': 'int', - 'size_upper_bound': 'int', - 'source': 'string', - 'type': 'int', - 'type_name': 'string', - 'untranslated_name': 'string', - 'untranslated_parent_name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/business.py b/tap_facebook/facebook_business/adobjects/business.py deleted file mode 100644 index 18f6803..0000000 --- a/tap_facebook/facebook_business/adobjects/business.py +++ /dev/null @@ -1,3981 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.adobjects.helpers.businessmixin import BusinessMixin - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Business( - BusinessMixin, - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusiness = True - super(Business, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - block_offline_analytics = 'block_offline_analytics' - collaborative_ads_managed_partner_business_info = 'collaborative_ads_managed_partner_business_info' - collaborative_ads_managed_partner_eligibility = 'collaborative_ads_managed_partner_eligibility' - collaborative_ads_partner_premium_options = 'collaborative_ads_partner_premium_options' - created_by = 'created_by' - created_time = 'created_time' - extended_updated_time = 'extended_updated_time' - id = 'id' - is_hidden = 'is_hidden' - link = 'link' - name = 'name' - payment_account_id = 'payment_account_id' - primary_page = 'primary_page' - profile_picture_uri = 'profile_picture_uri' - timezone_id = 'timezone_id' - 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' - - class TwoFactorType: - admin_required = 'admin_required' - all_required = 'all_required' - none = 'none' - - class Vertical: - advertising = 'ADVERTISING' - automotive = 'AUTOMOTIVE' - consumer_packaged_goods = 'CONSUMER_PACKAGED_GOODS' - ecommerce = 'ECOMMERCE' - education = 'EDUCATION' - energy_and_utilities = 'ENERGY_AND_UTILITIES' - entertainment_and_media = 'ENTERTAINMENT_AND_MEDIA' - financial_services = 'FINANCIAL_SERVICES' - gaming = 'GAMING' - government_and_politics = 'GOVERNMENT_AND_POLITICS' - health = 'HEALTH' - luxury = 'LUXURY' - marketing = 'MARKETING' - non_profit = 'NON_PROFIT' - not_set = 'NOT_SET' - organizations_and_associations = 'ORGANIZATIONS_AND_ASSOCIATIONS' - other = 'OTHER' - professional_services = 'PROFESSIONAL_SERVICES' - restaurant = 'RESTAURANT' - retail = 'RETAIL' - technology = 'TECHNOLOGY' - telecom = 'TELECOM' - travel = 'TRAVEL' - - class PermittedTasks: - advertise = 'ADVERTISE' - analyze = 'ANALYZE' - cashier_role = 'CASHIER_ROLE' - create_content = 'CREATE_CONTENT' - manage = 'MANAGE' - manage_jobs = 'MANAGE_JOBS' - manage_leads = 'MANAGE_LEADS' - messaging = 'MESSAGING' - moderate = 'MODERATE' - moderate_community = 'MODERATE_COMMUNITY' - pages_messaging = 'PAGES_MESSAGING' - pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' - profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' - profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' - profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' - profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' - profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' - profile_plus_manage = 'PROFILE_PLUS_MANAGE' - profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' - profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' - profile_plus_moderate = 'PROFILE_PLUS_MODERATE' - profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' - profile_plus_revenue = 'PROFILE_PLUS_REVENUE' - read_page_mailboxes = 'READ_PAGE_MAILBOXES' - view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' - - class SurveyBusinessType: - advertiser = 'ADVERTISER' - agency = 'AGENCY' - app_developer = 'APP_DEVELOPER' - publisher = 'PUBLISHER' - - class PagePermittedTasks: - advertise = 'ADVERTISE' - analyze = 'ANALYZE' - cashier_role = 'CASHIER_ROLE' - create_content = 'CREATE_CONTENT' - manage = 'MANAGE' - manage_jobs = 'MANAGE_JOBS' - manage_leads = 'MANAGE_LEADS' - messaging = 'MESSAGING' - moderate = 'MODERATE' - moderate_community = 'MODERATE_COMMUNITY' - pages_messaging = 'PAGES_MESSAGING' - pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' - profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' - profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' - profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' - profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' - profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' - profile_plus_manage = 'PROFILE_PLUS_MANAGE' - profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' - profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' - profile_plus_moderate = 'PROFILE_PLUS_MODERATE' - profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' - profile_plus_revenue = 'PROFILE_PLUS_REVENUE' - read_page_mailboxes = 'READ_PAGE_MAILBOXES' - view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' - - class SubverticalV2: - accounting_and_tax = 'ACCOUNTING_AND_TAX' - activities_and_leisure = 'ACTIVITIES_AND_LEISURE' - air = 'AIR' - apparel_and_accessories = 'APPAREL_AND_ACCESSORIES' - arts_and_heritage_and_education = 'ARTS_AND_HERITAGE_AND_EDUCATION' - ar_or_vr_gaming = 'AR_OR_VR_GAMING' - audio_streaming = 'AUDIO_STREAMING' - auto = 'AUTO' - auto_insurance = 'AUTO_INSURANCE' - auto_rental = 'AUTO_RENTAL' - baby = 'BABY' - ballot_initiative_or_referendum = 'BALLOT_INITIATIVE_OR_REFERENDUM' - beauty = 'BEAUTY' - beauty_and_fashion = 'BEAUTY_AND_FASHION' - beer_and_wine_and_liquor_and_malt_beverages = 'BEER_AND_WINE_AND_LIQUOR_AND_MALT_BEVERAGES' - bookstores = 'BOOKSTORES' - broadcast_television = 'BROADCAST_TELEVISION' - business_consultants = 'BUSINESS_CONSULTANTS' - buying_agency = 'BUYING_AGENCY' - cable_and_satellite = 'CABLE_AND_SATELLITE' - cable_television = 'CABLE_TELEVISION' - call_center_and_messaging_services = 'CALL_CENTER_AND_MESSAGING_SERVICES' - candidate_or_politician = 'CANDIDATE_OR_POLITICIAN' - career = 'CAREER' - career_and_tech = 'CAREER_AND_TECH' - casual_dining = 'CASUAL_DINING' - chronic_conditions_and_medical_causes = 'CHRONIC_CONDITIONS_AND_MEDICAL_CAUSES' - civic_influencers = 'CIVIC_INFLUENCERS' - clinical_trials = 'CLINICAL_TRIALS' - coffee = 'COFFEE' - computer_and_software_and_hardware = 'COMPUTER_AND_SOFTWARE_AND_HARDWARE' - console_and_cross_platform_gaming = 'CONSOLE_AND_CROSS_PLATFORM_GAMING' - consulting = 'CONSULTING' - consumer_electronics = 'CONSUMER_ELECTRONICS' - counseling_and_psychotherapy = 'COUNSELING_AND_PSYCHOTHERAPY' - creative_agency = 'CREATIVE_AGENCY' - credit_and_financing_and_mortages = 'CREDIT_AND_FINANCING_AND_MORTAGES' - cruises_and_marine = 'CRUISES_AND_MARINE' - culture_and_lifestyle = 'CULTURE_AND_LIFESTYLE' - data_analytics_and_data_management = 'DATA_ANALYTICS_AND_DATA_MANAGEMENT' - dating_and_technology_apps = 'DATING_AND_TECHNOLOGY_APPS' - department_store = 'DEPARTMENT_STORE' - desktop_software = 'DESKTOP_SOFTWARE' - dieting_and_fitness_programs = 'DIETING_AND_FITNESS_PROGRAMS' - digital_native_education_or_training = 'DIGITAL_NATIVE_EDUCATION_OR_TRAINING' - drinking_places = 'DRINKING_PLACES' - education_resources = 'EDUCATION_RESOURCES' - ed_tech = 'ED_TECH' - elearning_and_massive_online_open_courses = 'ELEARNING_AND_MASSIVE_ONLINE_OPEN_COURSES' - election_commission = 'ELECTION_COMMISSION' - electronics_and_appliances = 'ELECTRONICS_AND_APPLIANCES' - engineering_and_design = 'ENGINEERING_AND_DESIGN' - environment_and_animal_welfare = 'ENVIRONMENT_AND_ANIMAL_WELFARE' - esports = 'ESPORTS' - events = 'EVENTS' - farming_and_ranching = 'FARMING_AND_RANCHING' - file_storage_and_cloud_and_data_services = 'FILE_STORAGE_AND_CLOUD_AND_DATA_SERVICES' - finance = 'FINANCE' - fin_tech = 'FIN_TECH' - fishing_and_hunting_and_forestry_and_logging = 'FISHING_AND_HUNTING_AND_FORESTRY_AND_LOGGING' - fitness = 'FITNESS' - food = 'FOOD' - footwear = 'FOOTWEAR' - for_profit_colleges_and_universities = 'FOR_PROFIT_COLLEGES_AND_UNIVERSITIES' - full_service_agency = 'FULL_SERVICE_AGENCY' - government_controlled_entity = 'GOVERNMENT_CONTROLLED_ENTITY' - government_department_or_agency = 'GOVERNMENT_DEPARTMENT_OR_AGENCY' - government_official = 'GOVERNMENT_OFFICIAL' - government_owned_media = 'GOVERNMENT_OWNED_MEDIA' - grocery_and_drug_and_convenience = 'GROCERY_AND_DRUG_AND_CONVENIENCE' - head_of_state = 'HEAD_OF_STATE' - health_insurance = 'HEALTH_INSURANCE' - health_systems_and_practitioners = 'HEALTH_SYSTEMS_AND_PRACTITIONERS' - health_tech = 'HEALTH_TECH' - home_and_furniture_and_office = 'HOME_AND_FURNITURE_AND_OFFICE' - home_improvement = 'HOME_IMPROVEMENT' - home_insurance = 'HOME_INSURANCE' - home_tech = 'HOME_TECH' - hotel_and_accomodation = 'HOTEL_AND_ACCOMODATION' - household_goods_durable = 'HOUSEHOLD_GOODS_DURABLE' - household_goods_non_durable = 'HOUSEHOLD_GOODS_NON_DURABLE' - hr_and_financial_management = 'HR_AND_FINANCIAL_MANAGEMENT' - humanitarian_or_disaster_relief = 'HUMANITARIAN_OR_DISASTER_RELIEF' - independent_expenditure_group = 'INDEPENDENT_EXPENDITURE_GROUP' - insurance_tech = 'INSURANCE_TECH' - international_organizaton = 'INTERNATIONAL_ORGANIZATON' - investment_bank_and_brokerage = 'INVESTMENT_BANK_AND_BROKERAGE' - issue_advocacy = 'ISSUE_ADVOCACY' - legal = 'LEGAL' - life_insurance = 'LIFE_INSURANCE' - logistics_and_transportation_and_fleet_management = 'LOGISTICS_AND_TRANSPORTATION_AND_FLEET_MANAGEMENT' - manufacturing = 'MANUFACTURING' - medical_devices_and_supplies_and_equipment = 'MEDICAL_DEVICES_AND_SUPPLIES_AND_EQUIPMENT' - medspa_and_elective_surgeries_and_alternative_medicine = 'MEDSPA_AND_ELECTIVE_SURGERIES_AND_ALTERNATIVE_MEDICINE' - mining_and_quarrying = 'MINING_AND_QUARRYING' - mobile_gaming = 'MOBILE_GAMING' - movies = 'MOVIES' - museums_and_parks_and_libraries = 'MUSEUMS_AND_PARKS_AND_LIBRARIES' - music = 'MUSIC' - network_security_products = 'NETWORK_SECURITY_PRODUCTS' - news_and_current_events = 'NEWS_AND_CURRENT_EVENTS' - non_prescription = 'NON_PRESCRIPTION' - not_for_profit_colleges_and_universities = 'NOT_FOR_PROFIT_COLLEGES_AND_UNIVERSITIES' - office = 'OFFICE' - office_or_business_supplies = 'OFFICE_OR_BUSINESS_SUPPLIES' - oil_and_gas_and_consumable_fuel = 'OIL_AND_GAS_AND_CONSUMABLE_FUEL' - online_only_publications = 'ONLINE_ONLY_PUBLICATIONS' - package_or_freight_delivery = 'PACKAGE_OR_FREIGHT_DELIVERY' - party_independent_expenditure_group_us = 'PARTY_INDEPENDENT_EXPENDITURE_GROUP_US' - payment_processing_and_gateway_solutions = 'PAYMENT_PROCESSING_AND_GATEWAY_SOLUTIONS' - pc_gaming = 'PC_GAMING' - people = 'PEOPLE' - personal_care = 'PERSONAL_CARE' - pet = 'PET' - photography_and_filming_services = 'PHOTOGRAPHY_AND_FILMING_SERVICES' - pizza = 'PIZZA' - planning_agency = 'PLANNING_AGENCY' - political_party_or_committee = 'POLITICAL_PARTY_OR_COMMITTEE' - prescription = 'PRESCRIPTION' - professional_associations = 'PROFESSIONAL_ASSOCIATIONS' - property_and_casualty = 'PROPERTY_AND_CASUALTY' - quick_service = 'QUICK_SERVICE' - radio = 'RADIO' - railroads = 'RAILROADS' - real_estate = 'REAL_ESTATE' - real_money_gaming = 'REAL_MONEY_GAMING' - recreational = 'RECREATIONAL' - religious = 'RELIGIOUS' - reseller = 'RESELLER' - residential_and_long_term_care_facilities_and_outpatient_care_centers = 'RESIDENTIAL_AND_LONG_TERM_CARE_FACILITIES_AND_OUTPATIENT_CARE_CENTERS' - retail_and_credit_union_and_commercial_bank = 'RETAIL_AND_CREDIT_UNION_AND_COMMERCIAL_BANK' - ride_sharing_or_taxi_services = 'RIDE_SHARING_OR_TAXI_SERVICES' - safety_services = 'SAFETY_SERVICES' - scholarly = 'SCHOLARLY' - school_and_early_children_edcation = 'SCHOOL_AND_EARLY_CHILDREN_EDCATION' - social_media = 'SOCIAL_MEDIA' - software_as_a_service = 'SOFTWARE_AS_A_SERVICE' - sporting = 'SPORTING' - sporting_and_outdoor = 'SPORTING_AND_OUTDOOR' - sports = 'SPORTS' - superstores = 'SUPERSTORES' - t1_automotive_manufacturer = 'T1_AUTOMOTIVE_MANUFACTURER' - t1_motorcycle = 'T1_MOTORCYCLE' - t2_dealer_associations = 'T2_DEALER_ASSOCIATIONS' - t3_auto_agency = 'T3_AUTO_AGENCY' - t3_auto_resellers = 'T3_AUTO_RESELLERS' - t3_dealer_groups = 'T3_DEALER_GROUPS' - t3_franchise_dealer = 'T3_FRANCHISE_DEALER' - t3_independent_dealer = 'T3_INDEPENDENT_DEALER' - t3_parts_and_services = 'T3_PARTS_AND_SERVICES' - t3_portals = 'T3_PORTALS' - telecommunications_equipment_and_accessories = 'TELECOMMUNICATIONS_EQUIPMENT_AND_ACCESSORIES' - telephone_service_providers_and_carriers = 'TELEPHONE_SERVICE_PROVIDERS_AND_CARRIERS' - ticketing = 'TICKETING' - tobacco = 'TOBACCO' - tourism_and_travel_services = 'TOURISM_AND_TRAVEL_SERVICES' - tourism_board = 'TOURISM_BOARD' - toy_and_hobby = 'TOY_AND_HOBBY' - trade_school = 'TRADE_SCHOOL' - travel_agencies_and_guides_and_otas = 'TRAVEL_AGENCIES_AND_GUIDES_AND_OTAS' - utilities_and_energy_equipment_and_services = 'UTILITIES_AND_ENERGY_EQUIPMENT_AND_SERVICES' - veterinary_clinics_and_services = 'VETERINARY_CLINICS_AND_SERVICES' - video_streaming = 'VIDEO_STREAMING' - virtual_services = 'VIRTUAL_SERVICES' - vitamins_or_wellness = 'VITAMINS_OR_WELLNESS' - warehousing_and_storage = 'WAREHOUSING_AND_STORAGE' - water_and_soft_drink_and_baverage = 'WATER_AND_SOFT_DRINK_AND_BAVERAGE' - website_designers_or_graphic_designers = 'WEBSITE_DESIGNERS_OR_GRAPHIC_DESIGNERS' - wholesale = 'WHOLESALE' - wireless_services = 'WIRELESS_SERVICES' - - class VerticalV2: - advertising_and_marketing = 'ADVERTISING_AND_MARKETING' - agriculture = 'AGRICULTURE' - automotive = 'AUTOMOTIVE' - banking_and_credit_cards = 'BANKING_AND_CREDIT_CARDS' - business_to_business = 'BUSINESS_TO_BUSINESS' - consumer_packaged_goods = 'CONSUMER_PACKAGED_GOODS' - ecommerce = 'ECOMMERCE' - education = 'EDUCATION' - energy_and_natural_resources_and_utilities = 'ENERGY_AND_NATURAL_RESOURCES_AND_UTILITIES' - entertainment_and_media = 'ENTERTAINMENT_AND_MEDIA' - gaming = 'GAMING' - government = 'GOVERNMENT' - healthcare_and_pharmaceuticals_and_biotech = 'HEALTHCARE_AND_PHARMACEUTICALS_AND_BIOTECH' - insurance = 'INSURANCE' - non_profit = 'NON_PROFIT' - organizations_and_associations = 'ORGANIZATIONS_AND_ASSOCIATIONS' - politics = 'POLITICS' - professional_services = 'PROFESSIONAL_SERVICES' - publishing = 'PUBLISHING' - restaurants = 'RESTAURANTS' - retail = 'RETAIL' - technology = 'TECHNOLOGY' - telecom = 'TELECOM' - travel = 'TRAVEL' - - class ActionSource: - physical_store = 'PHYSICAL_STORE' - website = 'WEBSITE' - - 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=Business, - 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 = { - 'entry_point': 'string', - 'name': 'string', - 'primary_page': 'string', - 'timezone_id': 'unsigned int', - 'two_factor_type': 'two_factor_type_enum', - 'vertical': 'vertical_enum', - } - enums = { - 'two_factor_type_enum': Business.TwoFactorType.__dict__.values(), - 'vertical_enum': Business.Vertical.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Business, - 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_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 = { - 'app_id': 'string', - 'fbe_external_business_id': 'string', - 'scope': 'list', - 'system_user_name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/access_token', - 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 delete_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.') - param_types = { - 'adaccount_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/ad_accounts', - 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_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudy import AdStudy - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ad_studies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_ad_study(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudy import AdStudy - param_types = { - 'cells': 'list', - 'client_business': 'string', - 'confidence_level': 'float', - 'cooldown_start_time': 'int', - 'description': 'string', - 'end_time': 'int', - 'name': 'string', - 'objectives': 'list', - 'observation_end_time': 'int', - 'start_time': 'int', - 'type': 'type_enum', - 'viewers': 'list', - } - enums = { - 'type_enum': AdStudy.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/ad_studies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_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.') - from facebook_business.adobjects.adaccount import AdAccount - param_types = { - 'ad_account_created_from_bm_flag': 'bool', - 'currency': 'string', - 'end_advertiser': 'Object', - 'funding_id': 'string', - 'invoice': 'bool', - 'invoice_group_id': 'string', - 'invoicing_emails': 'list', - 'io': 'bool', - 'media_agency': 'string', - 'name': 'string', - 'partner': 'string', - 'po_number': 'string', - 'timezone_id': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adaccount', - 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 create_add_phone_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 = { - 'phone_number': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/add_phone_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_ad_network_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.application import Application - param_types = { - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adnetwork_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_ad_network_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.') - from facebook_business.adobjects.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult - param_types = { - 'aggregation_period': 'aggregation_period_enum', - 'breakdowns': 'list', - 'filters': 'list', - 'limit': 'unsigned int', - 'metrics': 'list', - 'ordering_column': 'ordering_column_enum', - 'ordering_type': 'ordering_type_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), - 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), - 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), - 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), - 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adnetworkanalytics', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdNetworkAnalyticsSyncQueryResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdNetworkAnalyticsSyncQueryResult, 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_ad_network_analytic(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adnetworkanalyticssyncqueryresult import AdNetworkAnalyticsSyncQueryResult - param_types = { - 'aggregation_period': 'aggregation_period_enum', - 'breakdowns': 'list', - 'filters': 'list', - 'limit': 'int', - 'metrics': 'list', - 'ordering_column': 'ordering_column_enum', - 'ordering_type': 'ordering_type_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'aggregation_period_enum': AdNetworkAnalyticsSyncQueryResult.AggregationPeriod.__dict__.values(), - 'breakdowns_enum': AdNetworkAnalyticsSyncQueryResult.Breakdowns.__dict__.values(), - 'metrics_enum': AdNetworkAnalyticsSyncQueryResult.Metrics.__dict__.values(), - 'ordering_column_enum': AdNetworkAnalyticsSyncQueryResult.OrderingColumn.__dict__.values(), - 'ordering_type_enum': AdNetworkAnalyticsSyncQueryResult.OrderingType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adnetworkanalytics', - 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_ad_network_analytics_results(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adnetworkanalyticsasyncqueryresult import AdNetworkAnalyticsAsyncQueryResult - param_types = { - 'query_ids': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adnetworkanalytics_results', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdNetworkAnalyticsAsyncQueryResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdNetworkAnalyticsAsyncQueryResult, 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.') - param_types = { - 'filtering': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads_reporting_mmm_reports', - 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_schedulers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/ads_reporting_mmm_schedulers', - 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_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'id_filter': 'string', - 'name_filter': 'string', - 'sort_by': 'sort_by_enum', - } - enums = { - 'sort_by_enum': AdsPixel.SortBy.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adspixels', - 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_ads_pixel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'is_crm': 'bool', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adspixels', - 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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/agencies', - 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_an_placements(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adplacement import AdPlacement - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/an_placements', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdPlacement, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdPlacement, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'publisher_urls_file': 'file', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/block_list_drafts', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.businessassetgroup import BusinessAssetGroup - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/business_asset_groups', - 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 get_business_invoices(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.omegacustomertrx import OmegaCustomerTrx - param_types = { - 'end_date': 'string', - 'invoice_id': 'string', - 'issue_end_date': 'string', - 'issue_start_date': 'string', - 'root_id': 'unsigned int', - 'start_date': 'string', - 'type': 'type_enum', - } - enums = { - 'type_enum': OmegaCustomerTrx.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/business_invoices', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OmegaCustomerTrx, - api_type='EDGE', - response_parser=ObjectParser(target_class=OmegaCustomerTrx, 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_business_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.businessuser import BusinessUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/business_users', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessUser, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessUser, 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_business_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.businessuser import BusinessUser - param_types = { - 'email': 'string', - 'role': 'role_enum', - } - enums = { - 'role_enum': BusinessUser.Role.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/business_users', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessUser, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessUser, 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_business_projects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/businessprojects', - 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_claim_custom_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customconversion import CustomConversion - param_types = { - 'custom_conversion_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/claim_custom_conversions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversion, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomConversion, 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_client_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 = { - 'search_query': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/client_ad_accounts', - 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_client_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.') - from facebook_business.adobjects.application import Application - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/client_apps', - 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 create_client_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.') - param_types = { - 'app_id': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/client_apps', - 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_client_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/client_offsite_signal_container_business_objects', - 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_client_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.') - from facebook_business.adobjects.page import Page - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/client_pages', - 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 create_client_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.') - param_types = { - 'page_id': 'int', - 'permitted_tasks': 'list', - } - enums = { - 'permitted_tasks_enum': Business.PermittedTasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/client_pages', - 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_client_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/client_pixels', - 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_client_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/client_product_catalogs', - 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() - - def get_client_whats_app_business_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.whatsappbusinessaccount import WhatsAppBusinessAccount - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/client_whatsapp_business_accounts', - 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 delete_clients(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/clients', - 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_clients(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/clients', - 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_collaborative_ads_collaboration_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.cpascollaborationrequest import CPASCollaborationRequest - param_types = { - 'status': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/collaborative_ads_collaboration_requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CPASCollaborationRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=CPASCollaborationRequest, 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_collaborative_ads_collaboration_request(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.cpascollaborationrequest import CPASCollaborationRequest - param_types = { - 'brands': 'list', - 'contact_email': 'string', - 'contact_first_name': 'string', - 'contact_last_name': 'string', - 'phone_number': 'string', - 'receiver_business': 'string', - 'requester_agency_or_brand': 'requester_agency_or_brand_enum', - 'sender_client_business': 'string', - } - enums = { - 'requester_agency_or_brand_enum': CPASCollaborationRequest.RequesterAgencyOrBrand.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/collaborative_ads_collaboration_requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CPASCollaborationRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=CPASCollaborationRequest, 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_collaborative_ads_suggested_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.cpasadvertiserpartnershiprecommendation import CPASAdvertiserPartnershipRecommendation - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/collaborative_ads_suggested_partners', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CPASAdvertiserPartnershipRecommendation, - api_type='EDGE', - response_parser=ObjectParser(target_class=CPASAdvertiserPartnershipRecommendation, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.commercemerchantsettings import CommerceMerchantSettings - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_merchant_settings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommerceMerchantSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommerceMerchantSettings, 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_cpas_business_setup_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.') - from facebook_business.adobjects.cpasbusinesssetupconfig import CPASBusinessSetupConfig - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/cpas_business_setup_config', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CPASBusinessSetupConfig, - api_type='EDGE', - response_parser=ObjectParser(target_class=CPASBusinessSetupConfig, 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_cpas_business_setup_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.') - from facebook_business.adobjects.cpasbusinesssetupconfig import CPASBusinessSetupConfig - param_types = { - 'accepted_collab_ads_tos': 'bool', - 'ad_accounts': 'list', - 'business_capabilities_status': 'map', - 'capabilities_compliance_status': 'map', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/cpas_business_setup_config', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CPASBusinessSetupConfig, - api_type='EDGE', - response_parser=ObjectParser(target_class=CPASBusinessSetupConfig, 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_cpas_merchant_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.') - from facebook_business.adobjects.cpasmerchantconfig import CPASMerchantConfig - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/cpas_merchant_config', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CPASMerchantConfig, - api_type='EDGE', - response_parser=ObjectParser(target_class=CPASMerchantConfig, 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.creditcard import CreditCard - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/creditcards', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CreditCard, - api_type='EDGE', - response_parser=ObjectParser(target_class=CreditCard, 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_custom_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customconversion import CustomConversion - param_types = { - 'advanced_rule': 'string', - 'custom_event_type': 'custom_event_type_enum', - 'default_conversion_value': 'float', - 'description': 'string', - 'event_source_id': 'string', - 'name': 'string', - 'rule': 'string', - } - enums = { - 'custom_event_type_enum': CustomConversion.CustomEventType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/customconversions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversion, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomConversion, 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_draft_negative_keyword_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.') - param_types = { - 'negative_keyword_list_file': 'file', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/draft_negative_keyword_lists', - 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_event_source_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.eventsourcegroup import EventSourceGroup - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/event_source_groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=EventSourceGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=EventSourceGroup, 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_event_source_group(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.eventsourcegroup import EventSourceGroup - param_types = { - 'event_sources': 'list', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/event_source_groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=EventSourceGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=EventSourceGroup, 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_extended_credit_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.') - param_types = { - 'only_show_pending': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/extendedcreditapplications', - 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_extended_credits(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.extendedcredit import ExtendedCredit - param_types = { - 'order_by_is_owned_credential': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/extendedcredits', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ExtendedCredit, - api_type='EDGE', - response_parser=ObjectParser(target_class=ExtendedCredit, 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.businessassetsharingagreement import BusinessAssetSharingAgreement - param_types = { - 'recipient_id': 'string', - 'request_status': 'request_status_enum', - } - enums = { - 'request_status_enum': BusinessAssetSharingAgreement.RequestStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/initiated_audience_sharing_requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessAssetSharingAgreement, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessAssetSharingAgreement, 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_instagram_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.') - param_types = { - 'instagram_account': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/instagram_accounts', - 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_instagram_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.instagramuser import InstagramUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/instagram_accounts', - 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_instagram_business_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.iguser import IGUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/instagram_business_accounts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGUser, - api_type='EDGE', - response_parser=ObjectParser(target_class=IGUser, 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_managed_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.') - param_types = { - 'existing_client_business_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/managed_businesses', - 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_managed_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.') - param_types = { - 'child_business_external_id': 'string', - 'existing_client_business_id': 'string', - 'name': 'string', - 'sales_rep_email': 'string', - 'survey_business_type': 'survey_business_type_enum', - 'survey_num_assets': 'unsigned int', - 'survey_num_people': 'unsigned int', - 'timezone_id': 'unsigned int', - 'vertical': 'vertical_enum', - } - enums = { - 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), - 'vertical_enum': Business.Vertical.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/managed_businesses', - 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_managed_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.') - param_types = { - 'active_ad_account_id': 'string', - 'active_page_id': 'int', - 'partner_facebook_page_url': 'string', - 'partner_registration_countries': 'list', - 'seller_email_address': 'string', - 'seller_external_website_url': 'string', - 'template': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/managed_partner_business_setup', - 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 delete_managed_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.') - param_types = { - 'child_business_external_id': 'string', - 'child_business_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/managed_partner_businesses', - 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_managed_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.') - param_types = { - 'ad_account_currency': 'string', - 'catalog_id': 'string', - 'child_business_external_id': 'string', - 'credit_limit': 'unsigned int', - 'line_of_credit_id': 'string', - 'name': 'string', - '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', - 'vertical': 'vertical_enum', - } - enums = { - 'partition_type_enum': [ - 'AUTH', - 'FIXED', - 'FIXED_WITHOUT_PARTITION', - ], - 'survey_business_type_enum': [ - 'ADVERTISER', - 'AGENCY', - 'APP_DEVELOPER', - 'PUBLISHER', - ], - 'vertical_enum': [ - 'ADVERTISING', - 'AUTOMOTIVE', - 'CONSUMER_PACKAGED_GOODS', - 'ECOMMERCE', - 'EDUCATION', - 'ENERGY_AND_UTILITIES', - 'ENTERTAINMENT_AND_MEDIA', - 'FINANCIAL_SERVICES', - 'GAMING', - 'GOVERNMENT_AND_POLITICS', - 'HEALTH', - 'LUXURY', - 'MARKETING', - 'NON_PROFIT', - 'NOT_SET', - 'ORGANIZATIONS_AND_ASSOCIATIONS', - 'OTHER', - 'PROFESSIONAL_SERVICES', - 'RESTAURANT', - 'RETAIL', - 'TECHNOLOGY', - 'TELECOM', - 'TRAVEL', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/managed_partner_businesses', - 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_negative_keyword_lists(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/negative_keyword_lists', - 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_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), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is 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_open_bridge_configurations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.openbridgeconfiguration import OpenBridgeConfiguration - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/openbridge_configurations', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OpenBridgeConfiguration, - api_type='EDGE', - response_parser=ObjectParser(target_class=OpenBridgeConfiguration, 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_open_bridge_configuration(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.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', - 'pixel_id': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/openbridge_configurations', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OpenBridgeConfiguration, - api_type='EDGE', - response_parser=ObjectParser(target_class=OpenBridgeConfiguration, 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_owned_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 = { - 'search_query': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owned_ad_accounts', - 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 create_owned_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 = { - 'adaccount_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/owned_ad_accounts', - 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_owned_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.') - from facebook_business.adobjects.application import Application - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owned_apps', - 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 create_owned_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.') - param_types = { - 'app_id': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/owned_apps', - 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 delete_owned_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.') - param_types = { - 'client_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/owned_businesses', - 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_owned_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.') - param_types = { - 'child_business_external_id': 'string', - 'client_user_id': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owned_businesses', - 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_owned_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.') - param_types = { - 'child_business_external_id': 'string', - 'name': 'string', - 'page_permitted_tasks': 'list', - 'sales_rep_email': 'string', - 'shared_page_id': 'string', - 'survey_business_type': 'survey_business_type_enum', - 'survey_num_assets': 'unsigned int', - 'survey_num_people': 'unsigned int', - 'timezone_id': 'unsigned int', - 'vertical': 'vertical_enum', - } - enums = { - 'page_permitted_tasks_enum': Business.PagePermittedTasks.__dict__.values(), - 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), - 'vertical_enum': Business.Vertical.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/owned_businesses', - 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_owned_instagram_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.instagramuser import InstagramUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owned_instagram_accounts', - 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_owned_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owned_offsite_signal_container_business_objects', - 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_owned_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.') - from facebook_business.adobjects.page import Page - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owned_pages', - 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 create_owned_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.') - param_types = { - 'code': 'string', - 'entry_point': 'string', - 'page_id': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/owned_pages', - 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_owned_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/owned_pixels', - 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_owned_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owned_product_catalogs', - 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() - - def create_owned_product_catalog(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.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', - 'destination_catalog_settings': 'map', - 'flight_catalog_settings': 'map', - 'name': 'string', - 'parent_catalog_id': 'string', - 'partner_integration': 'map', - 'store_catalog_settings': 'map', - 'vertical': 'vertical_enum', - } - enums = { - 'additional_vertical_option_enum': ProductCatalog.AdditionalVerticalOption.__dict__.values(), - 'vertical_enum': ProductCatalog.Vertical.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/owned_product_catalogs', - 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() - - def get_owned_whats_app_business_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.whatsappbusinessaccount import WhatsAppBusinessAccount - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owned_whatsapp_business_accounts', - 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 delete_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.') - param_types = { - 'page_id': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/pages', - 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_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.') - 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=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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'catalog_segment_id': 'string', - 'enable_basket_insight': 'bool', - 'enable_extended_audience_retargeting': 'bool', - 'partner_business_id': 'string', - 'retailer_custom_audience_config': 'map', - 'vendor_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/partner_premium_options', - 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_pending_client_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.businessadaccountrequest import BusinessAdAccountRequest - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pending_client_ad_accounts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessAdAccountRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessAdAccountRequest, 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_pending_client_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.') - from facebook_business.adobjects.businessapplicationrequest import BusinessApplicationRequest - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pending_client_apps', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessApplicationRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessApplicationRequest, 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_pending_client_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.') - from facebook_business.adobjects.businesspagerequest import BusinessPageRequest - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pending_client_pages', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessPageRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessPageRequest, 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_pending_owned_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.businessadaccountrequest import BusinessAdAccountRequest - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pending_owned_ad_accounts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessAdAccountRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessAdAccountRequest, 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_pending_owned_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.') - from facebook_business.adobjects.businesspagerequest import BusinessPageRequest - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pending_owned_pages', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessPageRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessPageRequest, 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_pending_shared_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pending_shared_offsite_signal_container_business_objects', - 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_pending_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.businessrolerequest import BusinessRoleRequest - param_types = { - 'email': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pending_users', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessRoleRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessRoleRequest, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profilepicturesource import ProfilePictureSource - param_types = { - 'height': 'int', - 'redirect': 'bool', - 'type': 'type_enum', - 'width': 'int', - } - enums = { - 'type_enum': ProfilePictureSource.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/picture', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProfilePictureSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProfilePictureSource, 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_pixel_to(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/pixel_tos', - 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_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.') - from facebook_business.adobjects.whatsappbusinesspreverifiedphonenumber import WhatsAppBusinessPreVerifiedPhoneNumber - param_types = { - 'code_verification_status': 'code_verification_status_enum', - 'phone_number': 'string', - } - enums = { - 'code_verification_status_enum': WhatsAppBusinessPreVerifiedPhoneNumber.CodeVerificationStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/preverified_numbers', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=WhatsAppBusinessPreVerifiedPhoneNumber, - api_type='EDGE', - response_parser=ObjectParser(target_class=WhatsAppBusinessPreVerifiedPhoneNumber, 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_received_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.businessassetsharingagreement import BusinessAssetSharingAgreement - param_types = { - 'initiator_id': 'string', - 'request_status': 'request_status_enum', - } - enums = { - 'request_status_enum': BusinessAssetSharingAgreement.RequestStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/received_audience_sharing_requests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessAssetSharingAgreement, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessAssetSharingAgreement, 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_managed_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.') - param_types = { - 'credit_line_id': 'string', - 'marketplace_business_id': 'string', - 'subvertical_v2': 'subvertical_v2_enum', - 'vendor_id': 'string', - 'vertical_v2': 'vertical_v2_enum', - } - enums = { - 'subvertical_v2_enum': Business.SubverticalV2.__dict__.values(), - 'vertical_v2_enum': Business.VerticalV2.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/setup_managed_partner_adaccounts', - 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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.systemuser import SystemUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/system_users', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=SystemUser, - api_type='EDGE', - response_parser=ObjectParser(target_class=SystemUser, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.systemuser import SystemUser - param_types = { - 'name': 'string', - 'role': 'role_enum', - 'system_user_id': 'int', - } - enums = { - 'role_enum': SystemUser.Role.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/system_users', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=SystemUser, - api_type='EDGE', - response_parser=ObjectParser(target_class=SystemUser, 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_third_party_measurement_report_dataset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/third_party_measurement_report_dataset', - 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_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', - 'adaptive_type': 'string', - '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', - 'react_mode_metadata': 'string', - '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) - - if batch is 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_offline_analytics': 'bool', - 'collaborative_ads_managed_partner_business_info': 'ManagedPartnerBusiness', - 'collaborative_ads_managed_partner_eligibility': 'BusinessManagedPartnerEligibility', - 'collaborative_ads_partner_premium_options': 'BusinessPartnerPremiumOptions', - 'created_by': 'Object', - 'created_time': 'datetime', - 'extended_updated_time': 'datetime', - 'id': 'string', - 'is_hidden': 'bool', - 'link': 'string', - 'name': 'string', - 'payment_account_id': 'string', - 'primary_page': 'Page', - 'profile_picture_uri': 'string', - 'timezone_id': 'unsigned int', - 'two_factor_type': 'string', - 'updated_by': 'Object', - 'updated_time': 'datetime', - 'user_access_expire_time': 'datetime', - 'verification_status': 'string', - 'vertical': 'string', - 'vertical_id': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['TwoFactorType'] = Business.TwoFactorType.__dict__.values() - 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['PagePermittedTasks'] = Business.PagePermittedTasks.__dict__.values() - field_enum_info['SubverticalV2'] = Business.SubverticalV2.__dict__.values() - field_enum_info['VerticalV2'] = Business.VerticalV2.__dict__.values() - field_enum_info['ActionSource'] = Business.ActionSource.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businessadaccountrequest.py b/tap_facebook/facebook_business/adobjects/businessadaccountrequest.py deleted file mode 100644 index bf95511..0000000 --- a/tap_facebook/facebook_business/adobjects/businessadaccountrequest.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessAdAccountRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessAdAccountRequest = True - super(BusinessAdAccountRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad_account = 'ad_account' - id = 'id' - - _field_types = { - 'ad_account': 'AdAccount', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businessapplicationrequest.py b/tap_facebook/facebook_business/adobjects/businessapplicationrequest.py deleted file mode 100644 index ffa916d..0000000 --- a/tap_facebook/facebook_business/adobjects/businessapplicationrequest.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessApplicationRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessApplicationRequest = True - super(BusinessApplicationRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - application = 'application' - id = 'id' - - _field_types = { - 'application': 'Application', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businessassetgroup.py b/tap_facebook/facebook_business/adobjects/businessassetgroup.py deleted file mode 100644 index c36a4a9..0000000 --- a/tap_facebook/facebook_business/adobjects/businessassetgroup.py +++ /dev/null @@ -1,1003 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessAssetGroup( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessAssetGroup = True - super(BusinessAssetGroup, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - name = 'name' - owner_business = 'owner_business' - - class AdaccountTasks: - aa_analyze = 'AA_ANALYZE' - advertise = 'ADVERTISE' - analyze = 'ANALYZE' - draft = 'DRAFT' - manage = 'MANAGE' - - class OfflineConversionDataSetTasks: - aa_analyze = 'AA_ANALYZE' - advertise = 'ADVERTISE' - manage = 'MANAGE' - upload = 'UPLOAD' - view = 'VIEW' - - class PageTasks: - advertise = 'ADVERTISE' - analyze = 'ANALYZE' - cashier_role = 'CASHIER_ROLE' - create_content = 'CREATE_CONTENT' - manage = 'MANAGE' - manage_jobs = 'MANAGE_JOBS' - manage_leads = 'MANAGE_LEADS' - messaging = 'MESSAGING' - moderate = 'MODERATE' - moderate_community = 'MODERATE_COMMUNITY' - pages_messaging = 'PAGES_MESSAGING' - pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' - profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' - profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' - profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' - profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' - profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' - profile_plus_manage = 'PROFILE_PLUS_MANAGE' - profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' - profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' - profile_plus_moderate = 'PROFILE_PLUS_MODERATE' - profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' - profile_plus_revenue = 'PROFILE_PLUS_REVENUE' - read_page_mailboxes = 'READ_PAGE_MAILBOXES' - view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' - - class PixelTasks: - aa_analyze = 'AA_ANALYZE' - advertise = 'ADVERTISE' - analyze = 'ANALYZE' - edit = 'EDIT' - upload = 'UPLOAD' - - 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=BusinessAssetGroup, - 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 = { - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessAssetGroup, - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'user': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/assigned_users', - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.assigneduser import AssignedUser - param_types = { - 'business': 'string', - } - 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() - - def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'adaccount_tasks': 'list', - 'offline_conversion_data_set_tasks': 'list', - 'page_tasks': 'list', - 'pixel_tasks': 'list', - 'user': 'int', - } - enums = { - 'adaccount_tasks_enum': BusinessAssetGroup.AdaccountTasks.__dict__.values(), - 'offline_conversion_data_set_tasks_enum': BusinessAssetGroup.OfflineConversionDataSetTasks.__dict__.values(), - 'page_tasks_enum': BusinessAssetGroup.PageTasks.__dict__.values(), - 'pixel_tasks_enum': BusinessAssetGroup.PixelTasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/assigned_users', - 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_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.') - param_types = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/contained_adaccounts', - 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_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='/contained_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() - - def create_contained_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 = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/contained_adaccounts', - 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_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.') - param_types = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/contained_applications', - 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_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='/contained_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 create_contained_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.') - param_types = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/contained_applications', - 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_custom_conversions', - 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customconversion import CustomConversion - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/contained_custom_conversions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversion, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomConversion, 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_custom_conversion(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_custom_conversions', - 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_instagram_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.') - param_types = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/contained_instagram_accounts', - 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_instagram_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.instagramuser import InstagramUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/contained_instagram_accounts', - 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 create_contained_instagram_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 = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/contained_instagram_accounts', - 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_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): - 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_pages', - 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_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.') - from facebook_business.adobjects.page import Page - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/contained_pages', - 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 create_contained_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.') - param_types = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/contained_pages', - 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_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_pixels', - 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_pixels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/contained_pixels', - 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_contained_pixel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_pixels', - 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_product_catalogs', - 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/contained_product_catalogs', - 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() - - def create_contained_product_catalog(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_product_catalogs', - 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() - - _field_types = { - 'id': 'string', - 'name': 'string', - 'owner_business': 'Business', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['AdaccountTasks'] = BusinessAssetGroup.AdaccountTasks.__dict__.values() - field_enum_info['OfflineConversionDataSetTasks'] = BusinessAssetGroup.OfflineConversionDataSetTasks.__dict__.values() - field_enum_info['PageTasks'] = BusinessAssetGroup.PageTasks.__dict__.values() - field_enum_info['PixelTasks'] = BusinessAssetGroup.PixelTasks.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businessassetsharingagreement.py b/tap_facebook/facebook_business/adobjects/businessassetsharingagreement.py deleted file mode 100644 index 6381f7f..0000000 --- a/tap_facebook/facebook_business/adobjects/businessassetsharingagreement.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessAssetSharingAgreement( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessAssetSharingAgreement = True - super(BusinessAssetSharingAgreement, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - initiator = 'initiator' - recipient = 'recipient' - relationship_type = 'relationship_type' - request_status = 'request_status' - request_type = 'request_type' - - 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=BusinessAssetSharingAgreement, - 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 = { - 'request_response': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessAssetSharingAgreement, - 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', - 'initiator': 'Business', - 'recipient': 'Business', - 'relationship_type': 'list', - 'request_status': 'string', - 'request_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['RequestStatus'] = BusinessAssetSharingAgreement.RequestStatus.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businesscreativefolder.py b/tap_facebook/facebook_business/adobjects/businesscreativefolder.py deleted file mode 100644 index d17d76c..0000000 --- a/tap_facebook/facebook_business/adobjects/businesscreativefolder.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/businessimage.py b/tap_facebook/facebook_business/adobjects/businessimage.py deleted file mode 100644 index 6885113..0000000 --- a/tap_facebook/facebook_business/adobjects/businessimage.py +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessImage( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessImage = True - super(BusinessImage, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - business = 'business' - creation_time = 'creation_time' - hash = 'hash' - height = 'height' - id = 'id' - media_library_url = 'media_library_url' - name = 'name' - 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 - if batch 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=BusinessImage, - 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', - 'hash': 'string', - 'height': 'int', - 'id': 'string', - 'media_library_url': 'string', - 'name': 'string', - '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/tap_facebook/facebook_business/adobjects/businessmanagedpartnereligibility.py b/tap_facebook/facebook_business/adobjects/businessmanagedpartnereligibility.py deleted file mode 100644 index f51971c..0000000 --- a/tap_facebook/facebook_business/adobjects/businessmanagedpartnereligibility.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class BusinessManagedPartnerEligibility( - AbstractObject, -): - - def __init__(self, api=None): - super(BusinessManagedPartnerEligibility, self).__init__() - self._isBusinessManagedPartnerEligibility = True - self._api = api - - class Field(AbstractObject.Field): - is_eligible = 'is_eligible' - reason_code = 'reason_code' - reason_description = 'reason_description' - - _field_types = { - 'is_eligible': 'bool', - 'reason_code': 'string', - 'reason_description': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py b/tap_facebook/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py deleted file mode 100644 index bd7b22f..0000000 --- a/tap_facebook/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessOwnedObjectOnBehalfOfRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessOwnedObjectOnBehalfOfRequest = True - super(BusinessOwnedObjectOnBehalfOfRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - business_owned_object = 'business_owned_object' - id = 'id' - receiving_business = 'receiving_business' - requesting_business = 'requesting_business' - status = 'status' - - class Status: - 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=BusinessOwnedObjectOnBehalfOfRequest, - 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_owned_object': 'string', - 'id': 'string', - 'receiving_business': 'Business', - 'requesting_business': 'Business', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Status'] = BusinessOwnedObjectOnBehalfOfRequest.Status.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businesspagerequest.py b/tap_facebook/facebook_business/adobjects/businesspagerequest.py deleted file mode 100644 index 4d87741..0000000 --- a/tap_facebook/facebook_business/adobjects/businesspagerequest.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessPageRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessPageRequest = True - super(BusinessPageRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - page = 'page' - - _field_types = { - 'id': 'string', - 'page': 'Page', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businesspartnerpremiumoptions.py b/tap_facebook/facebook_business/adobjects/businesspartnerpremiumoptions.py deleted file mode 100644 index f64ff8e..0000000 --- a/tap_facebook/facebook_business/adobjects/businesspartnerpremiumoptions.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class BusinessPartnerPremiumOptions( - AbstractObject, -): - - def __init__(self, api=None): - super(BusinessPartnerPremiumOptions, self).__init__() - self._isBusinessPartnerPremiumOptions = True - self._api = api - - class Field(AbstractObject.Field): - enable_basket_insight = 'enable_basket_insight' - enable_extended_audience_retargeting = 'enable_extended_audience_retargeting' - retailer_custom_audience_config = 'retailer_custom_audience_config' - - _field_types = { - 'enable_basket_insight': 'bool', - 'enable_extended_audience_retargeting': 'bool', - 'retailer_custom_audience_config': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businessrolerequest.py b/tap_facebook/facebook_business/adobjects/businessrolerequest.py deleted file mode 100644 index 249111f..0000000 --- a/tap_facebook/facebook_business/adobjects/businessrolerequest.py +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessRoleRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessRoleRequest = True - super(BusinessRoleRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - created_by = 'created_by' - created_time = 'created_time' - email = 'email' - expiration_time = 'expiration_time' - expiry_time = 'expiry_time' - finance_role = 'finance_role' - id = 'id' - invite_link = 'invite_link' - ip_role = 'ip_role' - owner = 'owner' - role = 'role' - status = 'status' - updated_by = 'updated_by' - updated_time = 'updated_time' - - class Role: - admin = 'ADMIN' - ads_rights_reviewer = 'ADS_RIGHTS_REVIEWER' - value_default = 'DEFAULT' - developer = 'DEVELOPER' - employee = 'EMPLOYEE' - finance_analyst = 'FINANCE_ANALYST' - finance_edit = 'FINANCE_EDIT' - finance_editor = 'FINANCE_EDITOR' - finance_view = 'FINANCE_VIEW' - manage = 'MANAGE' - partner_center_admin = 'PARTNER_CENTER_ADMIN' - partner_center_analyst = 'PARTNER_CENTER_ANALYST' - partner_center_education = 'PARTNER_CENTER_EDUCATION' - partner_center_marketing = 'PARTNER_CENTER_MARKETING' - partner_center_operations = 'PARTNER_CENTER_OPERATIONS' - - 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=BusinessRoleRequest, - 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 = { - 'role': 'role_enum', - } - enums = { - 'role_enum': BusinessRoleRequest.Role.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessRoleRequest, - 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_by': 'Object', - 'created_time': 'datetime', - 'email': 'string', - 'expiration_time': 'datetime', - 'expiry_time': 'datetime', - 'finance_role': 'string', - 'id': 'string', - 'invite_link': 'string', - 'ip_role': 'string', - 'owner': 'Business', - 'role': 'string', - 'status': 'string', - 'updated_by': 'Object', - 'updated_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Role'] = BusinessRoleRequest.Role.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businessuser.py b/tap_facebook/facebook_business/adobjects/businessuser.py deleted file mode 100644 index fd302ec..0000000 --- a/tap_facebook/facebook_business/adobjects/businessuser.py +++ /dev/null @@ -1,319 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 BusinessUser( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isBusinessUser = True - super(BusinessUser, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - business = 'business' - business_role_request = 'business_role_request' - email = 'email' - finance_permission = 'finance_permission' - first_name = 'first_name' - id = 'id' - ip_permission = 'ip_permission' - last_name = 'last_name' - marked_for_removal = 'marked_for_removal' - name = 'name' - pending_email = 'pending_email' - role = 'role' - title = 'title' - two_fac_status = 'two_fac_status' - - class Role: - admin = 'ADMIN' - ads_rights_reviewer = 'ADS_RIGHTS_REVIEWER' - value_default = 'DEFAULT' - developer = 'DEVELOPER' - employee = 'EMPLOYEE' - finance_analyst = 'FINANCE_ANALYST' - finance_edit = 'FINANCE_EDIT' - finance_editor = 'FINANCE_EDITOR' - finance_view = 'FINANCE_VIEW' - manage = 'MANAGE' - partner_center_admin = 'PARTNER_CENTER_ADMIN' - partner_center_analyst = 'PARTNER_CENTER_ANALYST' - partner_center_education = 'PARTNER_CENTER_EDUCATION' - partner_center_marketing = 'PARTNER_CENTER_MARKETING' - partner_center_operations = 'PARTNER_CENTER_OPERATIONS' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'business_users' - - # @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_business_user(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 - if batch 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=BusinessUser, - 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 = { - 'clear_pending_email': 'bool', - 'email': 'string', - 'first_name': 'string', - 'last_name': 'string', - 'pending_email': 'string', - 'role': 'role_enum', - 'skip_verification_email': 'bool', - 'title': 'string', - } - enums = { - 'role_enum': BusinessUser.Role.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessUser, - 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_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='/assigned_ad_accounts', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.businessassetgroup import BusinessAssetGroup - param_types = { - 'contained_asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_business_asset_groups', - 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 get_assigned_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.') - from facebook_business.adobjects.page import Page - param_types = { - 'pages': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_pages', - 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_assigned_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_product_catalogs', - 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 = { - 'business': 'Business', - 'business_role_request': 'BusinessRoleRequest', - 'email': 'string', - 'finance_permission': 'string', - 'first_name': 'string', - 'id': 'string', - 'ip_permission': 'string', - 'last_name': 'string', - 'marked_for_removal': 'bool', - 'name': 'string', - 'pending_email': 'string', - 'role': 'string', - 'title': 'string', - 'two_fac_status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Role'] = BusinessUser.Role.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/businessvideo.py b/tap_facebook/facebook_business/adobjects/businessvideo.py deleted file mode 100644 index 29c4c37..0000000 --- a/tap_facebook/facebook_business/adobjects/businessvideo.py +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/campaign.py b/tap_facebook/facebook_business/adobjects/campaign.py deleted file mode 100644 index ca56877..0000000 --- a/tap_facebook/facebook_business/adobjects/campaign.py +++ /dev/null @@ -1,1058 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.mixins import HasAdLabels -from facebook_business.mixins import CanValidate - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Campaign( - AbstractCrudObject, - HasAdLabels, - CanValidate, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCampaign = True - super(Campaign, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - adlabels = 'adlabels' - bid_strategy = 'bid_strategy' - boosted_object_id = 'boosted_object_id' - brand_lift_studies = 'brand_lift_studies' - 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' - created_time = 'created_time' - daily_budget = 'daily_budget' - 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' - lifetime_budget = 'lifetime_budget' - name = 'name' - objective = 'objective' - pacing_type = 'pacing_type' - primary_attribution = 'primary_attribution' - promoted_object = 'promoted_object' - recommendations = 'recommendations' - smart_promotion_type = 'smart_promotion_type' - source_campaign = 'source_campaign' - source_campaign_id = 'source_campaign_id' - special_ad_categories = 'special_ad_categories' - special_ad_category = 'special_ad_category' - special_ad_category_country = 'special_ad_category_country' - spend_cap = 'spend_cap' - start_time = 'start_time' - status = 'status' - stop_time = 'stop_time' - topline_id = 'topline_id' - updated_time = 'updated_time' - adbatch = 'adbatch' - execution_options = 'execution_options' - iterative_split_test_configs = 'iterative_split_test_configs' - - 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' - archived = 'ARCHIVED' - deleted = 'DELETED' - paused = 'PAUSED' - - class EffectiveStatus: - active = 'ACTIVE' - archived = 'ARCHIVED' - deleted = 'DELETED' - in_process = 'IN_PROCESS' - paused = 'PAUSED' - with_issues = 'WITH_ISSUES' - - class Status: - active = 'ACTIVE' - archived = 'ARCHIVED' - deleted = 'DELETED' - 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' - - class ExecutionOptions: - include_recommendations = 'include_recommendations' - validate_only = 'validate_only' - - class Objective: - app_installs = 'APP_INSTALLS' - brand_awareness = 'BRAND_AWARENESS' - conversions = 'CONVERSIONS' - 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' - - class SmartPromotionType: - guided_creation = 'GUIDED_CREATION' - smart_app_promotion = 'SMART_APP_PROMOTION' - - class SpecialAdCategories: - credit = 'CREDIT' - employment = 'EMPLOYMENT' - housing = 'HOUSING' - issues_elections_politics = 'ISSUES_ELECTIONS_POLITICS' - none = 'NONE' - online_gambling_and_gaming = 'ONLINE_GAMBLING_AND_GAMING' - - class SpecialAdCategoryCountry: - ad = 'AD' - ae = 'AE' - af = 'AF' - ag = 'AG' - ai = 'AI' - al = 'AL' - am = 'AM' - an = 'AN' - ao = 'AO' - aq = 'AQ' - ar = 'AR' - value_as = 'AS' - at = 'AT' - au = 'AU' - aw = 'AW' - ax = 'AX' - az = 'AZ' - ba = 'BA' - bb = 'BB' - bd = 'BD' - be = 'BE' - bf = 'BF' - bg = 'BG' - bh = 'BH' - bi = 'BI' - bj = 'BJ' - bl = 'BL' - bm = 'BM' - bn = 'BN' - bo = 'BO' - bq = 'BQ' - br = 'BR' - bs = 'BS' - bt = 'BT' - bv = 'BV' - bw = 'BW' - by = 'BY' - bz = 'BZ' - ca = 'CA' - cc = 'CC' - cd = 'CD' - cf = 'CF' - cg = 'CG' - ch = 'CH' - ci = 'CI' - ck = 'CK' - cl = 'CL' - cm = 'CM' - cn = 'CN' - co = 'CO' - cr = 'CR' - cu = 'CU' - cv = 'CV' - cw = 'CW' - cx = 'CX' - cy = 'CY' - cz = 'CZ' - de = 'DE' - dj = 'DJ' - dk = 'DK' - dm = 'DM' - do = 'DO' - dz = 'DZ' - ec = 'EC' - ee = 'EE' - eg = 'EG' - eh = 'EH' - er = 'ER' - es = 'ES' - et = 'ET' - fi = 'FI' - fj = 'FJ' - fk = 'FK' - fm = 'FM' - fo = 'FO' - fr = 'FR' - ga = 'GA' - gb = 'GB' - gd = 'GD' - ge = 'GE' - gf = 'GF' - gg = 'GG' - gh = 'GH' - gi = 'GI' - gl = 'GL' - gm = 'GM' - gn = 'GN' - gp = 'GP' - gq = 'GQ' - gr = 'GR' - gs = 'GS' - gt = 'GT' - gu = 'GU' - gw = 'GW' - gy = 'GY' - hk = 'HK' - hm = 'HM' - hn = 'HN' - hr = 'HR' - ht = 'HT' - hu = 'HU' - id = 'ID' - ie = 'IE' - il = 'IL' - im = 'IM' - value_in = 'IN' - io = 'IO' - iq = 'IQ' - ir = 'IR' - value_is = 'IS' - it = 'IT' - je = 'JE' - jm = 'JM' - jo = 'JO' - jp = 'JP' - ke = 'KE' - kg = 'KG' - kh = 'KH' - ki = 'KI' - km = 'KM' - kn = 'KN' - kp = 'KP' - kr = 'KR' - kw = 'KW' - ky = 'KY' - kz = 'KZ' - la = 'LA' - lb = 'LB' - lc = 'LC' - li = 'LI' - lk = 'LK' - lr = 'LR' - ls = 'LS' - lt = 'LT' - lu = 'LU' - lv = 'LV' - ly = 'LY' - ma = 'MA' - mc = 'MC' - md = 'MD' - me = 'ME' - mf = 'MF' - mg = 'MG' - mh = 'MH' - mk = 'MK' - ml = 'ML' - mm = 'MM' - mn = 'MN' - mo = 'MO' - mp = 'MP' - mq = 'MQ' - mr = 'MR' - ms = 'MS' - mt = 'MT' - mu = 'MU' - mv = 'MV' - mw = 'MW' - mx = 'MX' - my = 'MY' - mz = 'MZ' - na = 'NA' - nc = 'NC' - ne = 'NE' - nf = 'NF' - ng = 'NG' - ni = 'NI' - nl = 'NL' - no = 'NO' - np = 'NP' - nr = 'NR' - nu = 'NU' - nz = 'NZ' - om = 'OM' - pa = 'PA' - pe = 'PE' - pf = 'PF' - pg = 'PG' - ph = 'PH' - pk = 'PK' - pl = 'PL' - pm = 'PM' - pn = 'PN' - pr = 'PR' - ps = 'PS' - pt = 'PT' - pw = 'PW' - py = 'PY' - qa = 'QA' - re = 'RE' - ro = 'RO' - rs = 'RS' - ru = 'RU' - rw = 'RW' - sa = 'SA' - sb = 'SB' - sc = 'SC' - sd = 'SD' - se = 'SE' - sg = 'SG' - sh = 'SH' - si = 'SI' - sj = 'SJ' - sk = 'SK' - sl = 'SL' - sm = 'SM' - sn = 'SN' - so = 'SO' - sr = 'SR' - ss = 'SS' - st = 'ST' - sv = 'SV' - sx = 'SX' - sy = 'SY' - sz = 'SZ' - tc = 'TC' - td = 'TD' - tf = 'TF' - tg = 'TG' - th = 'TH' - tj = 'TJ' - tk = 'TK' - tl = 'TL' - tm = 'TM' - tn = 'TN' - to = 'TO' - tr = 'TR' - tt = 'TT' - tv = 'TV' - tw = 'TW' - tz = 'TZ' - ua = 'UA' - ug = 'UG' - um = 'UM' - us = 'US' - uy = 'UY' - uz = 'UZ' - va = 'VA' - vc = 'VC' - ve = 'VE' - vg = 'VG' - vi = 'VI' - vn = 'VN' - vu = 'VU' - wf = 'WF' - ws = 'WS' - xk = 'XK' - ye = 'YE' - yt = 'YT' - za = 'ZA' - zm = 'ZM' - zw = 'ZW' - - class Operator: - all = 'ALL' - any = 'ANY' - - class SpecialAdCategory: - credit = 'CREDIT' - employment = 'EMPLOYMENT' - housing = 'HOUSING' - issues_elections_politics = 'ISSUES_ELECTIONS_POLITICS' - none = 'NONE' - online_gambling_and_gaming = 'ONLINE_GAMBLING_AND_GAMING' - - class StatusOption: - active = 'ACTIVE' - inherited_from_source = 'INHERITED_FROM_SOURCE' - paused = 'PAUSED' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'campaigns' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_campaign(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 - if batch 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 = { - 'am_call_tags': 'map', - 'date_preset': 'date_preset_enum', - 'from_adtable': 'bool', - 'time_range': 'map', - } - enums = { - 'date_preset_enum': [ - 'data_maximum', - 'last_14d', - 'last_28d', - 'last_30d', - 'last_3d', - 'last_7d', - 'last_90d', - 'last_month', - 'last_quarter', - 'last_week_mon_sun', - 'last_week_sun_sat', - 'last_year', - 'maximum', - 'this_month', - 'this_quarter', - 'this_week_mon_today', - 'this_week_sun_today', - 'this_year', - 'today', - 'yesterday', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - 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 = { - 'adlabels': 'list', - 'adset_bid_amounts': 'map', - 'adset_budgets': 'list', - 'bid_strategy': 'bid_strategy_enum', - 'budget_rebalance_flag': 'bool', - 'daily_budget': 'unsigned int', - 'execution_options': 'list', - 'is_skadnetwork_attribution': 'bool', - 'iterative_split_test_configs': 'list', - 'lifetime_budget': 'unsigned int', - 'name': 'string', - 'objective': 'objective_enum', - 'pacing_type': 'list', - 'promoted_object': 'Object', - 'smart_promotion_type': 'smart_promotion_type_enum', - 'special_ad_categories': 'list', - 'special_ad_category': 'special_ad_category_enum', - 'special_ad_category_country': 'list', - 'spend_cap': 'unsigned int', - 'start_time': 'datetime', - 'status': 'status_enum', - 'stop_time': 'datetime', - } - enums = { - 'bid_strategy_enum': Campaign.BidStrategy.__dict__.values(), - 'execution_options_enum': Campaign.ExecutionOptions.__dict__.values(), - 'objective_enum': Campaign.Objective.__dict__.values(), - 'smart_promotion_type_enum': Campaign.SmartPromotionType.__dict__.values(), - 'special_ad_categories_enum': Campaign.SpecialAdCategories.__dict__.values(), - 'special_ad_category_enum': Campaign.SpecialAdCategory.__dict__.values(), - 'special_ad_category_country_enum': Campaign.SpecialAdCategoryCountry.__dict__.values(), - 'status_enum': Campaign.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - 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_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudy import AdStudy - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ad_studies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_ad_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'adlabels': 'list', - 'execution_options': 'list', - } - enums = { - 'execution_options_enum': Campaign.ExecutionOptions.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adlabels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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_ad_rules_governed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adrule import AdRule - param_types = { - 'pass_evaluation': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adrules_governed', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdRule, 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(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.ad import Ad - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'time_range': 'map', - 'updated_since': 'int', - } - enums = { - 'date_preset_enum': Ad.DatePreset.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_ad_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.adset import AdSet - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'is_completed': 'bool', - 'time_range': 'map', - } - enums = { - 'date_preset_enum': AdSet.DatePreset.__dict__.values(), - 'effective_status_enum': AdSet.EffectiveStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/adsets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdSet, 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'date_preset': 'date_preset_enum', - 'effective_status': 'list', - 'is_completed': 'bool', - 'time_range': 'map', - } - enums = { - 'date_preset_enum': Campaign.DatePreset.__dict__.values(), - 'effective_status_enum': Campaign.EffectiveStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/copies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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_copy(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'deep_copy': 'bool', - 'end_time': 'datetime', - 'rename_options': 'Object', - 'start_time': 'datetime', - 'status_option': 'status_option_enum', - } - enums = { - 'status_option_enum': Campaign.StatusOption.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/copies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Campaign, - api_type='EDGE', - response_parser=ObjectParser(target_class=Campaign, 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_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.adsinsights import AdsInsights - if is_async: - return self.get_insights_async(fields, params, batch, success, failure, pending) - param_types = { - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'action_report_time_enum', - 'breakdowns': 'list', - 'date_preset': 'date_preset_enum', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'level_enum', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - enums = { - 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), - 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), - 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), - 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), - 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), - 'level_enum': AdsInsights.Level.__dict__.values(), - 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdsInsights, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdsInsights, 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() - - def get_insights_async(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adreportrun import AdReportRun - from facebook_business.adobjects.adsinsights import AdsInsights - param_types = { - 'action_attribution_windows': 'list', - 'action_breakdowns': 'list', - 'action_report_time': 'action_report_time_enum', - 'breakdowns': 'list', - 'date_preset': 'date_preset_enum', - 'default_summary': 'bool', - 'export_columns': 'list', - 'export_format': 'string', - 'export_name': 'string', - 'fields': 'list', - 'filtering': 'list', - 'level': 'level_enum', - 'product_id_limit': 'int', - 'sort': 'list', - 'summary': 'list', - 'summary_action_breakdowns': 'list', - 'time_increment': 'string', - 'time_range': 'map', - 'time_ranges': 'list', - 'use_account_attribution_setting': 'bool', - 'use_unified_attribution_setting': 'bool', - } - enums = { - 'action_attribution_windows_enum': AdsInsights.ActionAttributionWindows.__dict__.values(), - 'action_breakdowns_enum': AdsInsights.ActionBreakdowns.__dict__.values(), - 'action_report_time_enum': AdsInsights.ActionReportTime.__dict__.values(), - 'breakdowns_enum': AdsInsights.Breakdowns.__dict__.values(), - 'date_preset_enum': AdsInsights.DatePreset.__dict__.values(), - 'level_enum': AdsInsights.Level.__dict__.values(), - 'summary_action_breakdowns_enum': AdsInsights.SummaryActionBreakdowns.__dict__.values(), - } - - if fields is not None: - params['fields'] = params.get('fields') if params.get('fields') is not None else list() - params['fields'].extend(field for field in fields if field not in params['fields']) - - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdReportRun, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdReportRun, api=self._api), - include_summary=False, - ) - request.add_params(params) - - if batch is 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', - 'adlabels': 'list', - 'bid_strategy': 'BidStrategy', - 'boosted_object_id': 'string', - 'brand_lift_studies': 'list', - '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', - 'created_time': 'datetime', - 'daily_budget': 'string', - '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', - 'lifetime_budget': 'string', - 'name': 'string', - 'objective': 'string', - 'pacing_type': 'list', - 'primary_attribution': 'string', - 'promoted_object': 'AdPromotedObject', - 'recommendations': 'list', - 'smart_promotion_type': 'string', - 'source_campaign': 'Campaign', - 'source_campaign_id': 'string', - 'special_ad_categories': 'list', - 'special_ad_category': 'string', - 'special_ad_category_country': 'list', - 'spend_cap': 'string', - 'start_time': 'datetime', - 'status': 'Status', - 'stop_time': 'datetime', - 'topline_id': 'string', - 'updated_time': 'datetime', - 'adbatch': 'list', - 'execution_options': 'list', - 'iterative_split_test_configs': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['BidStrategy'] = Campaign.BidStrategy.__dict__.values() - field_enum_info['ConfiguredStatus'] = Campaign.ConfiguredStatus.__dict__.values() - field_enum_info['EffectiveStatus'] = Campaign.EffectiveStatus.__dict__.values() - field_enum_info['Status'] = Campaign.Status.__dict__.values() - field_enum_info['DatePreset'] = Campaign.DatePreset.__dict__.values() - field_enum_info['ExecutionOptions'] = Campaign.ExecutionOptions.__dict__.values() - field_enum_info['Objective'] = Campaign.Objective.__dict__.values() - field_enum_info['SmartPromotionType'] = Campaign.SmartPromotionType.__dict__.values() - field_enum_info['SpecialAdCategories'] = Campaign.SpecialAdCategories.__dict__.values() - field_enum_info['SpecialAdCategoryCountry'] = Campaign.SpecialAdCategoryCountry.__dict__.values() - field_enum_info['Operator'] = Campaign.Operator.__dict__.values() - field_enum_info['SpecialAdCategory'] = Campaign.SpecialAdCategory.__dict__.values() - field_enum_info['StatusOption'] = Campaign.StatusOption.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/campaigngroupbrandconfiguration.py b/tap_facebook/facebook_business/adobjects/campaigngroupbrandconfiguration.py deleted file mode 100644 index 1222b37..0000000 --- a/tap_facebook/facebook_business/adobjects/campaigngroupbrandconfiguration.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CampaignGroupBrandConfiguration( - AbstractObject, -): - - def __init__(self, api=None): - super(CampaignGroupBrandConfiguration, self).__init__() - self._isCampaignGroupBrandConfiguration = True - self._api = api - - class Field(AbstractObject.Field): - brand_product_name = 'brand_product_name' - locale = 'locale' - vertical = 'vertical' - - _field_types = { - 'brand_product_name': 'string', - 'locale': 'string', - 'vertical': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py b/tap_facebook/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py deleted file mode 100644 index 5810147..0000000 --- a/tap_facebook/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CampaignGroupCollaborativeAdsPartnerInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(CampaignGroupCollaborativeAdsPartnerInfo, self).__init__() - self._isCampaignGroupCollaborativeAdsPartnerInfo = 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/tap_facebook/facebook_business/adobjects/canvas.py b/tap_facebook/facebook_business/adobjects/canvas.py deleted file mode 100644 index 041456f..0000000 --- a/tap_facebook/facebook_business/adobjects/canvas.py +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Canvas( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCanvas = True - super(Canvas, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - background_color = 'background_color' - body_elements = 'body_elements' - business_id = 'business_id' - canvas_link = 'canvas_link' - collection_hero_image = 'collection_hero_image' - collection_hero_video = 'collection_hero_video' - collection_thumbnails = 'collection_thumbnails' - dynamic_setting = 'dynamic_setting' - element_payload = 'element_payload' - elements = 'elements' - fb_body_elements = 'fb_body_elements' - id = 'id' - is_hidden = 'is_hidden' - is_published = 'is_published' - last_editor = 'last_editor' - linked_documents = 'linked_documents' - name = 'name' - owner = 'owner' - property_list = 'property_list' - source_template = 'source_template' - store_url = 'store_url' - style_list = 'style_list' - tags = 'tags' - ui_property_list = 'ui_property_list' - unused_body_elements = 'unused_body_elements' - update_time = 'update_time' - use_retailer_item_ids = 'use_retailer_item_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=Canvas, - 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 = { - 'background_color': 'string', - 'body_element_ids': 'list', - 'enable_swipe_to_open': 'bool', - 'is_hidden': 'bool', - 'is_published': 'bool', - 'name': 'string', - 'source_template_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Canvas, - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.textwithentities import TextWithEntities - param_types = { - 'user_ids': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/previews', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=TextWithEntities, - api_type='EDGE', - response_parser=ObjectParser(target_class=TextWithEntities, 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 = { - 'background_color': 'string', - 'body_elements': 'list', - 'business_id': 'string', - 'canvas_link': 'string', - 'collection_hero_image': 'Photo', - 'collection_hero_video': 'AdVideo', - 'collection_thumbnails': 'list', - 'dynamic_setting': 'CanvasDynamicSetting', - 'element_payload': 'string', - 'elements': 'list', - 'fb_body_elements': 'list', - 'id': 'string', - 'is_hidden': 'bool', - 'is_published': 'bool', - 'last_editor': 'User', - 'linked_documents': 'list', - 'name': 'string', - 'owner': 'Page', - 'property_list': 'list', - 'source_template': 'Object', - 'store_url': 'string', - 'style_list': 'list', - 'tags': 'list', - 'ui_property_list': 'list', - 'unused_body_elements': 'list', - 'update_time': 'int', - 'use_retailer_item_ids': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/canvasadsettings.py b/tap_facebook/facebook_business/adobjects/canvasadsettings.py deleted file mode 100644 index 75ad368..0000000 --- a/tap_facebook/facebook_business/adobjects/canvasadsettings.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CanvasAdSettings( - AbstractObject, -): - - def __init__(self, api=None): - super(CanvasAdSettings, self).__init__() - self._isCanvasAdSettings = True - self._api = api - - class Field(AbstractObject.Field): - is_canvas_collection_eligible = 'is_canvas_collection_eligible' - lead_form_created_time = 'lead_form_created_time' - lead_form_name = 'lead_form_name' - lead_gen_form_id = 'lead_gen_form_id' - leads_count = 'leads_count' - product_set_id = 'product_set_id' - use_retailer_item_ids = 'use_retailer_item_ids' - - _field_types = { - 'is_canvas_collection_eligible': 'bool', - 'lead_form_created_time': 'unsigned int', - 'lead_form_name': 'string', - 'lead_gen_form_id': 'string', - 'leads_count': 'int', - 'product_set_id': 'string', - 'use_retailer_item_ids': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/canvasbodyelement.py b/tap_facebook/facebook_business/adobjects/canvasbodyelement.py deleted file mode 100644 index 66c1466..0000000 --- a/tap_facebook/facebook_business/adobjects/canvasbodyelement.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CanvasBodyElement( - AbstractObject, -): - - def __init__(self, api=None): - super(CanvasBodyElement, self).__init__() - self._isCanvasBodyElement = True - self._api = api - - class Field(AbstractObject.Field): - element = 'element' - - _field_types = { - 'element': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/canvascollectionthumbnail.py b/tap_facebook/facebook_business/adobjects/canvascollectionthumbnail.py deleted file mode 100644 index 25b6be7..0000000 --- a/tap_facebook/facebook_business/adobjects/canvascollectionthumbnail.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CanvasCollectionThumbnail( - AbstractObject, -): - - def __init__(self, api=None): - super(CanvasCollectionThumbnail, self).__init__() - self._isCanvasCollectionThumbnail = True - self._api = api - - class Field(AbstractObject.Field): - element_child_index = 'element_child_index' - element_id = 'element_id' - photo = 'photo' - - _field_types = { - 'element_child_index': 'int', - 'element_id': 'string', - 'photo': 'Photo', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/canvasdynamicsetting.py b/tap_facebook/facebook_business/adobjects/canvasdynamicsetting.py deleted file mode 100644 index 791b9d6..0000000 --- a/tap_facebook/facebook_business/adobjects/canvasdynamicsetting.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CanvasDynamicSetting( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCanvasDynamicSetting = True - super(CanvasDynamicSetting, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - child_documents = 'child_documents' - product_set_id = 'product_set_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=CanvasDynamicSetting, - 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 = { - 'child_documents': 'list', - 'product_set_id': 'string', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/canvaspreview.py b/tap_facebook/facebook_business/adobjects/canvaspreview.py deleted file mode 100644 index 2ddfe45..0000000 --- a/tap_facebook/facebook_business/adobjects/canvaspreview.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/catalogbasedtargeting.py b/tap_facebook/facebook_business/adobjects/catalogbasedtargeting.py deleted file mode 100644 index 043f710..0000000 --- a/tap_facebook/facebook_business/adobjects/catalogbasedtargeting.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CatalogBasedTargeting( - AbstractObject, -): - - def __init__(self, api=None): - super(CatalogBasedTargeting, self).__init__() - self._isCatalogBasedTargeting = True - self._api = api - - class Field(AbstractObject.Field): - geo_targeting_type = 'geo_targeting_type' - - _field_types = { - 'geo_targeting_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/catalogitemappealstatus.py b/tap_facebook/facebook_business/adobjects/catalogitemappealstatus.py deleted file mode 100644 index 6f67a42..0000000 --- a/tap_facebook/facebook_business/adobjects/catalogitemappealstatus.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CatalogItemAppealStatus( - AbstractObject, -): - - def __init__(self, api=None): - super(CatalogItemAppealStatus, self).__init__() - self._isCatalogItemAppealStatus = True - self._api = api - - class Field(AbstractObject.Field): - handle = 'handle' - item_id = 'item_id' - status = 'status' - use_cases = 'use_cases' - - 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' - 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 = { - 'handle': 'string', - 'item_id': 'int', - 'status': 'Status', - 'use_cases': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Status'] = CatalogItemAppealStatus.Status.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/catalogitemapplinks.py b/tap_facebook/facebook_business/adobjects/catalogitemapplinks.py deleted file mode 100644 index 8be06f4..0000000 --- a/tap_facebook/facebook_business/adobjects/catalogitemapplinks.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CatalogItemAppLinks( - AbstractObject, -): - - def __init__(self, api=None): - super(CatalogItemAppLinks, self).__init__() - self._isCatalogItemAppLinks = True - self._api = api - - class Field(AbstractObject.Field): - android = 'android' - ios = 'ios' - ipad = 'ipad' - iphone = 'iphone' - web = 'web' - windows = 'windows' - windows_phone = 'windows_phone' - windows_universal = 'windows_universal' - - _field_types = { - 'android': 'list', - '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/tap_facebook/facebook_business/adobjects/catalogitemchannelstointegritystatus.py b/tap_facebook/facebook_business/adobjects/catalogitemchannelstointegritystatus.py deleted file mode 100644 index 4f436ad..0000000 --- a/tap_facebook/facebook_business/adobjects/catalogitemchannelstointegritystatus.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CatalogItemChannelsToIntegrityStatus( - AbstractObject, -): - - def __init__(self, api=None): - super(CatalogItemChannelsToIntegrityStatus, self).__init__() - self._isCatalogItemChannelsToIntegrityStatus = True - self._api = api - - class Field(AbstractObject.Field): - channels = 'channels' - rejection_information = 'rejection_information' - - _field_types = { - 'channels': 'list', - 'rejection_information': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py b/tap_facebook/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py deleted file mode 100644 index afdc083..0000000 --- a/tap_facebook/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/catalogsubverticallist.py b/tap_facebook/facebook_business/adobjects/catalogsubverticallist.py deleted file mode 100644 index 04b78ac..0000000 --- a/tap_facebook/facebook_business/adobjects/catalogsubverticallist.py +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CatalogSubVerticalList( - AbstractObject, -): - - def __init__(self, api=None): - super(CatalogSubVerticalList, self).__init__() - self._isCatalogSubVerticalList = True - self._api = api - - class Field(AbstractObject.Field): - appliances = 'appliances' - baby_feeding = 'baby_feeding' - baby_transport = 'baby_transport' - beauty = 'beauty' - bedding = 'bedding' - cameras = 'cameras' - cameras_and_photos = 'cameras_and_photos' - cell_phones_and_smart_watches = 'cell_phones_and_smart_watches' - cleaning_supplies = 'cleaning_supplies' - clo_offer = 'clo_offer' - clothing = 'clothing' - clothing_accessories = 'clothing_accessories' - computer_components = 'computer_components' - computers_and_tablets = 'computers_and_tablets' - computers_laptops_and_tablets = 'computers_laptops_and_tablets' - diapering_and_potty_training = 'diapering_and_potty_training' - digital_product_offer = 'digital_product_offer' - electronic_accessories_and_cables = 'electronic_accessories_and_cables' - electronics_accessories = 'electronics_accessories' - furniture = 'furniture' - health = 'health' - home = 'home' - home_goods = 'home_goods' - household_and_cleaning_supplies = 'household_and_cleaning_supplies' - jewelry = 'jewelry' - large_appliances = 'large_appliances' - local_service_business_item = 'local_service_business_item' - local_service_business_restaurant = 'local_service_business_restaurant' - loyalty_offer = 'loyalty_offer' - nursery = 'nursery' - printers_and_scanners = 'printers_and_scanners' - printers_scanners_and_fax_machines = 'printers_scanners_and_fax_machines' - product_discount = 'product_discount' - projectors = 'projectors' - shoes = 'shoes' - shoes_and_footwear = 'shoes_and_footwear' - software = 'software' - televisions_and_monitors = 'televisions_and_monitors' - test_child_sub_vertical = 'test_child_sub_vertical' - test_grand_child_sub_vertical = 'test_grand_child_sub_vertical' - test_sub_vertical = 'test_sub_vertical' - test_sub_vertical_alias = 'test_sub_vertical_alias' - test_sub_vertical_data_object = 'test_sub_vertical_data_object' - third_party_electronics = 'third_party_electronics' - third_party_toys_and_games = 'third_party_toys_and_games' - toys = 'toys' - toys_and_games = 'toys_and_games' - tvs_and_monitors = 'tvs_and_monitors' - vehicle_manufacturer = 'vehicle_manufacturer' - video_game_consoles_and_video_games = 'video_game_consoles_and_video_games' - video_games_and_consoles = 'video_games_and_consoles' - video_projectors = 'video_projectors' - watches = 'watches' - - _field_types = { - 'appliances': 'Object', - 'baby_feeding': 'Object', - 'baby_transport': 'Object', - 'beauty': 'Object', - 'bedding': 'Object', - 'cameras': 'Object', - 'cameras_and_photos': 'Object', - 'cell_phones_and_smart_watches': 'Object', - 'cleaning_supplies': 'Object', - 'clo_offer': 'Object', - 'clothing': 'Object', - 'clothing_accessories': 'Object', - 'computer_components': 'Object', - 'computers_and_tablets': 'Object', - 'computers_laptops_and_tablets': 'Object', - 'diapering_and_potty_training': 'Object', - 'digital_product_offer': 'Object', - 'electronic_accessories_and_cables': 'Object', - 'electronics_accessories': 'Object', - 'furniture': 'Object', - 'health': 'Object', - 'home': 'Object', - 'home_goods': 'Object', - 'household_and_cleaning_supplies': 'Object', - 'jewelry': 'Object', - 'large_appliances': 'Object', - 'local_service_business_item': 'Object', - 'local_service_business_restaurant': 'Object', - 'loyalty_offer': 'Object', - 'nursery': 'Object', - 'printers_and_scanners': 'Object', - 'printers_scanners_and_fax_machines': 'Object', - 'product_discount': 'Object', - 'projectors': 'Object', - 'shoes': 'Object', - 'shoes_and_footwear': 'Object', - 'software': 'Object', - 'televisions_and_monitors': 'Object', - 'test_child_sub_vertical': 'Object', - 'test_grand_child_sub_vertical': 'Object', - 'test_sub_vertical': 'Object', - 'test_sub_vertical_alias': 'Object', - 'test_sub_vertical_data_object': 'Object', - 'third_party_electronics': 'Object', - 'third_party_toys_and_games': 'Object', - 'toys': 'Object', - 'toys_and_games': 'Object', - 'tvs_and_monitors': 'Object', - 'vehicle_manufacturer': 'Object', - 'video_game_consoles_and_video_games': 'Object', - 'video_games_and_consoles': 'Object', - 'video_projectors': 'Object', - 'watches': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/chatplugin.py b/tap_facebook/facebook_business/adobjects/chatplugin.py deleted file mode 100644 index dc28f74..0000000 --- a/tap_facebook/facebook_business/adobjects/chatplugin.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ChatPlugin( - AbstractObject, -): - - def __init__(self, api=None): - super(ChatPlugin, self).__init__() - self._isChatPlugin = True - self._api = api - - class Field(AbstractObject.Field): - alignment = 'alignment' - desktop_bottom_spacing = 'desktop_bottom_spacing' - desktop_side_spacing = 'desktop_side_spacing' - entry_point_icon = 'entry_point_icon' - entry_point_label = 'entry_point_label' - greeting_dialog_display = 'greeting_dialog_display' - guest_chat_mode = 'guest_chat_mode' - mobile_bottom_spacing = 'mobile_bottom_spacing' - mobile_chat_display = 'mobile_chat_display' - mobile_side_spacing = 'mobile_side_spacing' - theme_color = 'theme_color' - welcome_screen_greeting = 'welcome_screen_greeting' - - _field_types = { - 'alignment': 'string', - 'desktop_bottom_spacing': 'string', - 'desktop_side_spacing': 'string', - 'entry_point_icon': 'string', - 'entry_point_label': 'string', - 'greeting_dialog_display': 'string', - 'guest_chat_mode': 'string', - 'mobile_bottom_spacing': 'string', - 'mobile_chat_display': 'string', - 'mobile_side_spacing': 'string', - 'theme_color': 'string', - 'welcome_screen_greeting': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/checkbatchrequeststatus.py b/tap_facebook/facebook_business/adobjects/checkbatchrequeststatus.py deleted file mode 100644 index a9c62c6..0000000 --- a/tap_facebook/facebook_business/adobjects/checkbatchrequeststatus.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CheckBatchRequestStatus( - AbstractObject, -): - - def __init__(self, api=None): - super(CheckBatchRequestStatus, self).__init__() - self._isCheckBatchRequestStatus = True - self._api = api - - class Field(AbstractObject.Field): - errors = 'errors' - errors_total_count = 'errors_total_count' - handle = 'handle' - ids_of_invalid_requests = 'ids_of_invalid_requests' - status = 'status' - warnings = 'warnings' - warnings_total_count = 'warnings_total_count' - - class ErrorPriority: - high = 'HIGH' - low = 'LOW' - medium = 'MEDIUM' - - _field_types = { - 'errors': 'list', - 'errors_total_count': 'int', - 'handle': 'string', - 'ids_of_invalid_requests': 'list', - 'status': 'string', - 'warnings': 'list', - 'warnings_total_count': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ErrorPriority'] = CheckBatchRequestStatus.ErrorPriority.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/childevent.py b/tap_facebook/facebook_business/adobjects/childevent.py deleted file mode 100644 index fc7a671..0000000 --- a/tap_facebook/facebook_business/adobjects/childevent.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ChildEvent( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isChildEvent = True - super(ChildEvent, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - end_time = 'end_time' - id = 'id' - start_time = 'start_time' - ticket_uri = 'ticket_uri' - - _field_types = { - 'end_time': 'string', - 'id': 'string', - 'start_time': 'string', - 'ticket_uri': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/clicktrackingtag.py b/tap_facebook/facebook_business/adobjects/clicktrackingtag.py deleted file mode 100644 index 6660123..0000000 --- a/tap_facebook/facebook_business/adobjects/clicktrackingtag.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This 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 - -class ClickTrackingTag(AbstractCrudObject): - - class Field(object): - add_template_param = 'add_template_param' - ad_id = 'ad_id' - id = 'id' - url = 'url' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'trackingtag' - - def get_node_path(self): - return ( - self.get_parent_id_assured(), - self.get_endpoint() - ) - - def remote_delete(self, params=None): - return self.get_api_assured().call( - 'DELETE', - self.get_node_path(), - params=params, - ) diff --git a/tap_facebook/facebook_business/adobjects/cloudgame.py b/tap_facebook/facebook_business/adobjects/cloudgame.py deleted file mode 100644 index 35d2abf..0000000 --- a/tap_facebook/facebook_business/adobjects/cloudgame.py +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CloudGame( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCloudGame = True - super(CloudGame, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - name = 'name' - owner = 'owner' - playable_ad_file_size = 'playable_ad_file_size' - playable_ad_orientation = 'playable_ad_orientation' - playable_ad_package_name = 'playable_ad_package_name' - playable_ad_reject_reason = 'playable_ad_reject_reason' - playable_ad_status = 'playable_ad_status' - playable_ad_upload_time = 'playable_ad_upload_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=CloudGame, - 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', - 'owner': 'Profile', - 'playable_ad_file_size': 'unsigned int', - 'playable_ad_orientation': 'string', - 'playable_ad_package_name': 'string', - 'playable_ad_reject_reason': 'string', - 'playable_ad_status': 'string', - 'playable_ad_upload_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py b/tap_facebook/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py deleted file mode 100644 index bd20701..0000000 --- a/tap_facebook/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CollaborativeAdsPartnerInfoListItem( - AbstractObject, -): - - def __init__(self, api=None): - super(CollaborativeAdsPartnerInfoListItem, self).__init__() - self._isCollaborativeAdsPartnerInfoListItem = 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/tap_facebook/facebook_business/adobjects/collaborativeadssharesettings.py b/tap_facebook/facebook_business/adobjects/collaborativeadssharesettings.py deleted file mode 100644 index 7f3172d..0000000 --- a/tap_facebook/facebook_business/adobjects/collaborativeadssharesettings.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CollaborativeAdsShareSettings( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCollaborativeAdsShareSettings = True - super(CollaborativeAdsShareSettings, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - agency_business = 'agency_business' - id = 'id' - product_catalog_proxy_id = 'product_catalog_proxy_id' - utm_campaign = 'utm_campaign' - utm_medium = 'utm_medium' - utm_source = 'utm_source' - - 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=CollaborativeAdsShareSettings, - 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 = { - 'agency_business': 'Business', - 'id': 'string', - 'product_catalog_proxy_id': 'string', - 'utm_campaign': 'string', - 'utm_medium': 'string', - 'utm_source': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/comment.py b/tap_facebook/facebook_business/adobjects/comment.py deleted file mode 100644 index 0167f90..0000000 --- a/tap_facebook/facebook_business/adobjects/comment.py +++ /dev/null @@ -1,419 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Comment( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isComment = True - super(Comment, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - admin_creator = 'admin_creator' - application = 'application' - attachment = 'attachment' - can_comment = 'can_comment' - can_hide = 'can_hide' - can_like = 'can_like' - can_remove = 'can_remove' - can_reply_privately = 'can_reply_privately' - comment_count = 'comment_count' - created_time = 'created_time' - field_from = 'from' - id = 'id' - is_hidden = 'is_hidden' - is_private = 'is_private' - like_count = 'like_count' - live_broadcast_timestamp = 'live_broadcast_timestamp' - message = 'message' - message_tags = 'message_tags' - object = 'object' - parent = 'parent' - permalink_url = 'permalink_url' - private_reply_conversation = 'private_reply_conversation' - user_likes = 'user_likes' - - class CommentPrivacyValue: - declined_by_admin_assistant = 'DECLINED_BY_ADMIN_ASSISTANT' - default_privacy = 'DEFAULT_PRIVACY' - friends_and_post_owner = 'FRIENDS_AND_POST_OWNER' - friends_only = 'FRIENDS_ONLY' - graphql_multiple_value_hack_do_not_use = 'GRAPHQL_MULTIPLE_VALUE_HACK_DO_NOT_USE' - owner_or_commenter = 'OWNER_OR_COMMENTER' - pending_approval = 'PENDING_APPROVAL' - removed_by_admin_assistant = 'REMOVED_BY_ADMIN_ASSISTANT' - side_conversation = 'SIDE_CONVERSATION' - side_conversation_and_post_owner = 'SIDE_CONVERSATION_AND_POST_OWNER' - spotlight_tab = 'SPOTLIGHT_TAB' - - class Filter: - stream = 'stream' - toplevel = 'toplevel' - - 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): - 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=Comment, - 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 = { - 'attachment_id': 'string', - 'attachment_share_url': 'string', - 'attachment_url': 'string', - 'is_hidden': 'bool', - 'message': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Comment, - 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.') - param_types = { - 'filter': 'filter_enum', - 'live_filter': 'live_filter_enum', - 'order': 'order_enum', - 'since': 'datetime', - } - enums = { - 'filter_enum': Comment.Filter.__dict__.values(), - 'live_filter_enum': Comment.LiveFilter.__dict__.values(), - '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() - - 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.') - param_types = { - 'attachment_id': 'string', - 'attachment_share_url': 'string', - 'attachment_url': 'string', - 'comment_privacy_value': 'comment_privacy_value_enum', - 'facepile_mentioned_ids': 'list', - 'feedback_source': 'string', - 'is_offline': 'bool', - 'message': 'string', - 'nectar_module': 'string', - 'object_id': 'string', - 'parent_comment_id': 'Object', - 'text': 'string', - 'tracking': 'string', - } - enums = { - 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - 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() - - def delete_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - 'tracking': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/likes', - 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_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', - 'tracking': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/likes', - 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() - - def get_reactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': Profile.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/reactions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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 = { - 'admin_creator': 'User', - 'application': 'Application', - 'attachment': 'Object', - 'can_comment': 'bool', - 'can_hide': 'bool', - 'can_like': 'bool', - 'can_remove': 'bool', - 'can_reply_privately': 'bool', - 'comment_count': 'unsigned int', - 'created_time': 'datetime', - 'from': 'Object', - 'id': 'string', - 'is_hidden': 'bool', - 'is_private': 'bool', - 'like_count': 'unsigned int', - 'live_broadcast_timestamp': 'unsigned int', - 'message': 'string', - 'message_tags': 'list', - 'object': 'Object', - 'parent': 'Comment', - 'permalink_url': 'string', - 'private_reply_conversation': 'Object', - 'user_likes': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - 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/tap_facebook/facebook_business/adobjects/commercemerchantsettings.py b/tap_facebook/facebook_business/adobjects/commercemerchantsettings.py deleted file mode 100644 index d71f526..0000000 --- a/tap_facebook/facebook_business/adobjects/commercemerchantsettings.py +++ /dev/null @@ -1,612 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CommerceMerchantSettings( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCommerceMerchantSettings = True - super(CommerceMerchantSettings, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - braintree_merchant_id = 'braintree_merchant_id' - checkout_message = 'checkout_message' - 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 - if batch 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=CommerceMerchantSettings, - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'idempotency_key': 'string', - 'orders': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/acknowledge_orders', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommerceMerchantSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommerceMerchantSettings, 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_orders(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.commerceorder import CommerceOrder - param_types = { - 'filters': 'list', - 'state': 'list', - 'updated_after': 'datetime', - 'updated_before': 'datetime', - } - enums = { - 'filters_enum': CommerceOrder.Filters.__dict__.values(), - 'state_enum': CommerceOrder.State.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_orders', - 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() - - def get_commerce_payouts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.commercepayout import CommercePayout - param_types = { - 'end_time': 'datetime', - 'start_time': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_payouts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommercePayout, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommercePayout, 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_transactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.commerceordertransactiondetail import CommerceOrderTransactionDetail - param_types = { - 'end_time': 'datetime', - 'payout_reference_id': 'string', - 'start_time': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_transactions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommerceOrderTransactionDetail, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommerceOrderTransactionDetail, 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): - from facebook_business.utils import api_utils - if batch 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='/order_management_apps', - 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 create_order_management_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/order_management_apps', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommerceMerchantSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommerceMerchantSettings, 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_catalogs', - 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() - - def get_returns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_created': 'datetime', - 'merchant_return_id': 'string', - 'start_time_created': 'datetime', - 'statuses': 'list', - } - enums = { - 'statuses_enum': [ - 'APPROVED', - 'DISAPPROVED', - 'MERCHANT_MARKED_COMPLETED', - 'REFUNDED', - 'REQUESTED', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/returns', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.commercemerchantsettingssetupstatus import CommerceMerchantSettingsSetupStatus - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/setup_status', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommerceMerchantSettingsSetupStatus, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommerceMerchantSettingsSetupStatus, 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_shipping_profiles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'reference_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/shipping_profiles', - 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_shipping_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 = { - 'handling_time': 'map', - 'is_default': 'bool', - 'is_default_shipping_profile': 'bool', - 'name': 'string', - 'reference_id': 'string', - 'shipping_destinations': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/shipping_profiles', - 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_shops(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.shop import Shop - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/shops', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Shop, - api_type='EDGE', - response_parser=ObjectParser(target_class=Shop, 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_tax_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/tax_settings', - 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_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', - '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): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/commercemerchantsettingssetupstatus.py b/tap_facebook/facebook_business/adobjects/commercemerchantsettingssetupstatus.py deleted file mode 100644 index 99e4209..0000000 --- a/tap_facebook/facebook_business/adobjects/commercemerchantsettingssetupstatus.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CommerceMerchantSettingsSetupStatus( - AbstractObject, -): - - def __init__(self, api=None): - super(CommerceMerchantSettingsSetupStatus, self).__init__() - self._isCommerceMerchantSettingsSetupStatus = True - self._api = api - - class Field(AbstractObject.Field): - deals_setup = 'deals_setup' - marketplace_approval_status = 'marketplace_approval_status' - marketplace_approval_status_details = 'marketplace_approval_status_details' - payment_setup = 'payment_setup' - review_status = 'review_status' - shop_setup = 'shop_setup' - - _field_types = { - 'deals_setup': 'string', - 'marketplace_approval_status': 'string', - 'marketplace_approval_status_details': 'Object', - 'payment_setup': 'string', - 'review_status': 'Object', - 'shop_setup': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/commerceorder.py b/tap_facebook/facebook_business/adobjects/commerceorder.py deleted file mode 100644 index 5c48c87..0000000 --- a/tap_facebook/facebook_business/adobjects/commerceorder.py +++ /dev/null @@ -1,620 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CommerceOrder( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCommerceOrder = True - super(CommerceOrder, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - buyer_details = 'buyer_details' - channel = 'channel' - created = 'created' - estimated_payment_details = 'estimated_payment_details' - id = 'id' - is_group_buy = 'is_group_buy' - is_test_order = 'is_test_order' - last_updated = 'last_updated' - merchant_order_id = 'merchant_order_id' - order_status = 'order_status' - selected_shipping_option = 'selected_shipping_option' - ship_by_date = 'ship_by_date' - shipping_address = 'shipping_address' - - class Filters: - has_cancellations = 'HAS_CANCELLATIONS' - has_fulfillments = 'HAS_FULFILLMENTS' - has_refunds = 'HAS_REFUNDS' - no_cancellations = 'NO_CANCELLATIONS' - no_refunds = 'NO_REFUNDS' - no_shipments = 'NO_SHIPMENTS' - - class State: - completed = 'COMPLETED' - created = 'CREATED' - fb_processing = 'FB_PROCESSING' - in_progress = 'IN_PROGRESS' - - class ReasonCode: - buyers_remorse = 'BUYERS_REMORSE' - damaged_goods = 'DAMAGED_GOODS' - facebook_initiated = 'FACEBOOK_INITIATED' - not_as_described = 'NOT_AS_DESCRIBED' - quality_issue = 'QUALITY_ISSUE' - refund_compromised = 'REFUND_COMPROMISED' - refund_for_return = 'REFUND_FOR_RETURN' - refund_reason_other = 'REFUND_REASON_OTHER' - refund_sfi_fake = 'REFUND_SFI_FAKE' - refund_sfi_real = 'REFUND_SFI_REAL' - wrong_item = 'WRONG_ITEM' - - 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=CommerceOrder, - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'idempotency_key': 'string', - 'merchant_order_reference': 'string', - 'return_error_response': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/acknowledge_order', - 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() - - def get_cancellations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/cancellations', - 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_cancellation(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_reason': 'map', - 'idempotency_key': 'string', - 'items': 'list', - 'restock_items': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/cancellations', - 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() - - def create_fulfill_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'idempotency_key': 'string', - 'items': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/fulfill_order', - 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() - - def get_items(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/items', - 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_payments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/payments', - 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_promotion_details(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/promotion_details', - 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_promotions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/promotions', - 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_refunds(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/refunds', - 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_refund(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - 'reason_code': 'reason_code_enum', - 'reason_text': 'string', - 'return_id': 'string', - 'shipping': 'map', - } - enums = { - 'reason_code_enum': CommerceOrder.ReasonCode.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/refunds', - 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() - - def get_returns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'merchant_return_id': 'string', - 'statuses': 'list', - } - enums = { - 'statuses_enum': [ - 'APPROVED', - 'DISAPPROVED', - 'MERCHANT_MARKED_COMPLETED', - 'REFUNDED', - 'REQUESTED', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/returns', - 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_return(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'items': 'list', - 'merchant_return_id': 'string', - 'return_message': 'string', - 'update': 'map', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/returns', - 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() - - def get_shipments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/shipments', - 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_shipment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'external_redemption_link': 'string', - 'external_shipment_id': 'string', - 'fulfillment': 'map', - 'idempotency_key': 'string', - 'items': 'list', - 'merchant_order_reference': 'string', - 'shipment_origin_postal_code': 'string', - 'shipping_tax_details': 'map', - 'should_use_default_fulfillment_location': 'bool', - 'tracking_info': 'map', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/shipments', - 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() - - def create_update_shipment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'external_shipment_id': 'string', - 'fulfillment_id': 'string', - 'idempotency_key': 'string', - 'shipment_id': 'string', - 'tracking_info': 'map', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/update_shipment', - 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', - 'created': 'string', - 'estimated_payment_details': 'Object', - 'id': 'string', - 'is_group_buy': 'bool', - 'is_test_order': 'bool', - 'last_updated': 'string', - 'merchant_order_id': 'string', - 'order_status': 'Object', - 'selected_shipping_option': 'Object', - 'ship_by_date': 'string', - 'shipping_address': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Filters'] = CommerceOrder.Filters.__dict__.values() - field_enum_info['State'] = CommerceOrder.State.__dict__.values() - field_enum_info['ReasonCode'] = CommerceOrder.ReasonCode.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/commerceordertransactiondetail.py b/tap_facebook/facebook_business/adobjects/commerceordertransactiondetail.py deleted file mode 100644 index b179496..0000000 --- a/tap_facebook/facebook_business/adobjects/commerceordertransactiondetail.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CommerceOrderTransactionDetail( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCommerceOrderTransactionDetail = True - super(CommerceOrderTransactionDetail, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - net_payment_amount = 'net_payment_amount' - order_details = 'order_details' - payout_reference_id = 'payout_reference_id' - processing_fee = 'processing_fee' - tax_rate = 'tax_rate' - transaction_date = 'transaction_date' - transaction_type = 'transaction_type' - transfer_id = 'transfer_id' - id = 'id' - - def get_items(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/items', - 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_tax_details(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/tax_details', - 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 = { - 'net_payment_amount': 'Object', - 'order_details': 'CommerceOrder', - 'payout_reference_id': 'string', - 'processing_fee': 'Object', - 'tax_rate': 'string', - 'transaction_date': 'string', - 'transaction_type': 'string', - 'transfer_id': 'string', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/commercepayout.py b/tap_facebook/facebook_business/adobjects/commercepayout.py deleted file mode 100644 index e55bd75..0000000 --- a/tap_facebook/facebook_business/adobjects/commercepayout.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CommercePayout( - AbstractObject, -): - - def __init__(self, api=None): - super(CommercePayout, self).__init__() - self._isCommercePayout = True - self._api = api - - class Field(AbstractObject.Field): - amount = 'amount' - payout_date = 'payout_date' - payout_reference_id = 'payout_reference_id' - status = 'status' - transfer_id = 'transfer_id' - - _field_types = { - 'amount': 'Object', - 'payout_date': 'string', - 'payout_reference_id': 'string', - 'status': 'string', - 'transfer_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/commercesettings.py b/tap_facebook/facebook_business/adobjects/commercesettings.py deleted file mode 100644 index 88727d8..0000000 --- a/tap_facebook/facebook_business/adobjects/commercesettings.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CommerceSettings( - AbstractObject, -): - - def __init__(self, api=None): - super(CommerceSettings, self).__init__() - self._isCommerceSettings = True - self._api = api - - class Field(AbstractObject.Field): - inventory = 'inventory' - total_inventory = 'total_inventory' - - _field_types = { - 'inventory': 'int', - 'total_inventory': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/connectionstargeting.py b/tap_facebook/facebook_business/adobjects/connectionstargeting.py deleted file mode 100644 index cc3b9ca..0000000 --- a/tap_facebook/facebook_business/adobjects/connectionstargeting.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ConnectionsTargeting( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isConnectionsTargeting = True - super(ConnectionsTargeting, 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/tap_facebook/facebook_business/adobjects/contentpublishinglimitresponse.py b/tap_facebook/facebook_business/adobjects/contentpublishinglimitresponse.py deleted file mode 100644 index bdcabfe..0000000 --- a/tap_facebook/facebook_business/adobjects/contentpublishinglimitresponse.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/contextualbundlingspec.py b/tap_facebook/facebook_business/adobjects/contextualbundlingspec.py deleted file mode 100644 index a52ab3d..0000000 --- a/tap_facebook/facebook_business/adobjects/contextualbundlingspec.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ContextualBundlingSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(ContextualBundlingSpec, self).__init__() - self._isContextualBundlingSpec = True - self._api = api - - class Field(AbstractObject.Field): - status = 'status' - - _field_types = { - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/conversionactionquery.py b/tap_facebook/facebook_business/adobjects/conversionactionquery.py deleted file mode 100644 index 2086083..0000000 --- a/tap_facebook/facebook_business/adobjects/conversionactionquery.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ConversionActionQuery( - AbstractObject, -): - - def __init__(self, api=None): - super(ConversionActionQuery, self).__init__() - self._isConversionActionQuery = True - self._api = api - - class Field(AbstractObject.Field): - field_action_type = 'action.type' - application = 'application' - conversion_id = 'conversion_id' - creative = 'creative' - dataset = 'dataset' - event = 'event' - field_event_creator = 'event.creator' - event_type = 'event_type' - fb_pixel = 'fb_pixel' - fb_pixel_event = 'fb_pixel_event' - leadgen = 'leadgen' - object = 'object' - field_object_domain = 'object.domain' - offer = 'offer' - field_offer_creator = 'offer.creator' - offsite_pixel = 'offsite_pixel' - page = 'page' - field_page_parent = 'page.parent' - post = 'post' - field_post_object = 'post.object' - field_post_object_wall = 'post.object.wall' - field_post_wall = 'post.wall' - question = 'question' - field_question_creator = 'question.creator' - response = 'response' - subtype = 'subtype' - - _field_types = { - 'action.type': 'list', - 'application': 'list', - 'conversion_id': 'list', - 'creative': 'list', - 'dataset': 'list', - 'event': 'list', - 'event.creator': 'list', - 'event_type': 'list', - 'fb_pixel': 'list', - 'fb_pixel_event': 'list', - 'leadgen': 'list', - 'object': 'list', - 'object.domain': 'list', - 'offer': 'list', - 'offer.creator': 'list', - 'offsite_pixel': 'list', - 'page': 'list', - 'page.parent': 'list', - 'post': 'list', - 'post.object': 'list', - 'post.object.wall': 'list', - 'post.wall': 'list', - 'question': 'list', - 'question.creator': 'list', - 'response': 'list', - 'subtype': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/copyrightreferencecontainer.py b/tap_facebook/facebook_business/adobjects/copyrightreferencecontainer.py deleted file mode 100644 index 6b2b158..0000000 --- a/tap_facebook/facebook_business/adobjects/copyrightreferencecontainer.py +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CopyrightReferenceContainer( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCopyrightReferenceContainer = True - super(CopyrightReferenceContainer, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - content_type = 'content_type' - copyright_creation_time = 'copyright_creation_time' - download_hd_url = 'download_hd_url' - duration_in_sec = 'duration_in_sec' - id = 'id' - iswc = 'iswc' - metadata = 'metadata' - published_time = 'published_time' - thumbnail_url = 'thumbnail_url' - title = 'title' - universal_content_id = 'universal_content_id' - writer_names = 'writer_names' - - _field_types = { - 'content_type': 'string', - 'copyright_creation_time': 'datetime', - 'download_hd_url': 'string', - 'duration_in_sec': 'float', - 'id': 'string', - 'iswc': 'string', - 'metadata': 'Object', - 'published_time': 'datetime', - 'thumbnail_url': 'string', - 'title': 'string', - 'universal_content_id': 'string', - 'writer_names': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/coverphoto.py b/tap_facebook/facebook_business/adobjects/coverphoto.py deleted file mode 100644 index bb2e0c0..0000000 --- a/tap_facebook/facebook_business/adobjects/coverphoto.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CoverPhoto( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCoverPhoto = True - super(CoverPhoto, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - cover_id = 'cover_id' - id = 'id' - offset_x = 'offset_x' - offset_y = 'offset_y' - source = 'source' - - _field_types = { - 'cover_id': 'string', - 'id': 'string', - 'offset_x': 'float', - 'offset_y': 'float', - 'source': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py b/tap_facebook/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py deleted file mode 100644 index 5013daf..0000000 --- a/tap_facebook/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CPASAdvertiserPartnershipRecommendation( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCPASAdvertiserPartnershipRecommendation = True - super(CPASAdvertiserPartnershipRecommendation, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - advertiser_business_id = 'advertiser_business_id' - brand_business_id = 'brand_business_id' - brands = 'brands' - countries = 'countries' - id = 'id' - merchant_business_id = 'merchant_business_id' - merchant_categories = 'merchant_categories' - status = 'status' - status_reason = 'status_reason' - - 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=CPASAdvertiserPartnershipRecommendation, - 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 = { - 'advertiser_business_id': 'string', - 'brand_business_id': 'string', - 'brands': 'list', - 'countries': 'list', - 'id': 'string', - 'merchant_business_id': 'string', - 'merchant_categories': 'list', - 'status': 'string', - 'status_reason': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/cpasbusinesssetupconfig.py b/tap_facebook/facebook_business/adobjects/cpasbusinesssetupconfig.py deleted file mode 100644 index 6f71ddc..0000000 --- a/tap_facebook/facebook_business/adobjects/cpasbusinesssetupconfig.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CPASBusinessSetupConfig( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCPASBusinessSetupConfig = True - super(CPASBusinessSetupConfig, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - accepted_collab_ads_tos = 'accepted_collab_ads_tos' - business = 'business' - business_capabilities_status = 'business_capabilities_status' - capabilities_compliance_status = 'capabilities_compliance_status' - id = 'id' - ad_accounts = 'ad_accounts' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'cpas_business_setup_config' - - # @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_cpas_business_setup_config(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=CPASBusinessSetupConfig, - 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='/ad_accounts', - 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 = { - 'accepted_collab_ads_tos': 'bool', - 'business': 'Business', - 'business_capabilities_status': 'list>', - 'capabilities_compliance_status': 'list>', - 'id': 'string', - 'ad_accounts': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/cpascollaborationrequest.py b/tap_facebook/facebook_business/adobjects/cpascollaborationrequest.py deleted file mode 100644 index 463a3d1..0000000 --- a/tap_facebook/facebook_business/adobjects/cpascollaborationrequest.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CPASCollaborationRequest( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCPASCollaborationRequest = True - super(CPASCollaborationRequest, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - brands = 'brands' - contact_email = 'contact_email' - contact_first_name = 'contact_first_name' - contact_last_name = 'contact_last_name' - id = 'id' - phone_number = 'phone_number' - receiver_business = 'receiver_business' - requester_agency_or_brand = 'requester_agency_or_brand' - sender_client_business = 'sender_client_business' - status = 'status' - - class RequesterAgencyOrBrand: - agency = 'AGENCY' - brand = 'BRAND' - merchant = 'MERCHANT' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'collaborative_ads_collaboration_requests' - - # @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_collaborative_ads_collaboration_request(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=CPASCollaborationRequest, - 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 = { - 'brands': 'list', - 'contact_email': 'string', - 'contact_first_name': 'string', - 'contact_last_name': 'string', - 'id': 'string', - 'phone_number': 'string', - 'receiver_business': 'Business', - 'requester_agency_or_brand': 'string', - 'sender_client_business': 'Business', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['RequesterAgencyOrBrand'] = CPASCollaborationRequest.RequesterAgencyOrBrand.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/cpasmerchantconfig.py b/tap_facebook/facebook_business/adobjects/cpasmerchantconfig.py deleted file mode 100644 index 2f171f5..0000000 --- a/tap_facebook/facebook_business/adobjects/cpasmerchantconfig.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CPASMerchantConfig( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCPASMerchantConfig = True - super(CPASMerchantConfig, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - accepted_tos = 'accepted_tos' - beta_features = 'beta_features' - business_outcomes_status = 'business_outcomes_status' - id = 'id' - is_test_merchant = 'is_test_merchant' - outcomes_compliance_status = 'outcomes_compliance_status' - qualified_to_onboard = 'qualified_to_onboard' - - 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=CPASMerchantConfig, - 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 = { - 'accepted_tos': 'bool', - 'beta_features': 'list', - 'business_outcomes_status': 'list>', - 'id': 'string', - 'is_test_merchant': 'bool', - 'outcomes_compliance_status': 'list>', - 'qualified_to_onboard': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/creativehistory.py b/tap_facebook/facebook_business/adobjects/creativehistory.py deleted file mode 100644 index b49d6e9..0000000 --- a/tap_facebook/facebook_business/adobjects/creativehistory.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CreativeHistory( - AbstractObject, -): - - def __init__(self, api=None): - super(CreativeHistory, self).__init__() - self._isCreativeHistory = True - self._api = api - - class Field(AbstractObject.Field): - creative_fingerprint = 'creative_fingerprint' - time_ranges = 'time_ranges' - - _field_types = { - 'creative_fingerprint': 'int', - 'time_ranges': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/creditcard.py b/tap_facebook/facebook_business/adobjects/creditcard.py deleted file mode 100644 index 78ad74e..0000000 --- a/tap_facebook/facebook_business/adobjects/creditcard.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CreditCard( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCreditCard = True - super(CreditCard, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - billing_address = 'billing_address' - card_cobadging = 'card_cobadging' - card_holder_name = 'card_holder_name' - card_type = 'card_type' - credential_id = 'credential_id' - default_receiving_method_products = 'default_receiving_method_products' - expiry_month = 'expiry_month' - expiry_year = 'expiry_year' - id = 'id' - is_cvv_tricky_bin = 'is_cvv_tricky_bin' - is_enabled = 'is_enabled' - is_last_used = 'is_last_used' - is_network_tokenized_in_india = 'is_network_tokenized_in_india' - is_soft_disabled = 'is_soft_disabled' - is_user_verified = 'is_user_verified' - is_zip_verified = 'is_zip_verified' - last4 = 'last4' - readable_card_type = 'readable_card_type' - time_created = 'time_created' - time_created_ts = 'time_created_ts' - type = '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=CreditCard, - 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_address': 'Object', - 'card_cobadging': 'string', - 'card_holder_name': 'string', - 'card_type': 'string', - 'credential_id': 'int', - 'default_receiving_method_products': 'list', - 'expiry_month': 'string', - 'expiry_year': 'string', - 'id': 'string', - 'is_cvv_tricky_bin': 'bool', - 'is_enabled': 'bool', - 'is_last_used': 'bool', - 'is_network_tokenized_in_india': 'bool', - 'is_soft_disabled': 'bool', - 'is_user_verified': 'bool', - 'is_zip_verified': 'bool', - 'last4': 'string', - 'readable_card_type': 'string', - 'time_created': 'datetime', - 'time_created_ts': 'int', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/creditpartitionactionoptions.py b/tap_facebook/facebook_business/adobjects/creditpartitionactionoptions.py deleted file mode 100644 index 93433d9..0000000 --- a/tap_facebook/facebook_business/adobjects/creditpartitionactionoptions.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CreditPartitionActionOptions( - AbstractObject, -): - - def __init__(self, api=None): - super(CreditPartitionActionOptions, self).__init__() - self._isCreditPartitionActionOptions = True - self._api = api - - class Field(AbstractObject.Field): - liability_type = 'liability_type' - partition_type = 'partition_type' - send_bill_to = 'send_bill_to' - - _field_types = { - 'liability_type': 'Object', - 'partition_type': 'Object', - 'send_bill_to': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/crmaddress.py b/tap_facebook/facebook_business/adobjects/crmaddress.py deleted file mode 100644 index 5dbf23c..0000000 --- a/tap_facebook/facebook_business/adobjects/crmaddress.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CRMAddress( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCRMAddress = True - super(CRMAddress, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - city = 'city' - cnpj_tax_id = 'cnpj_tax_id' - country = 'country' - id = 'id' - postal_code = 'postal_code' - registration_label = 'registration_label' - registration_number = 'registration_number' - state = 'state' - street1 = 'street1' - street2 = 'street2' - street3 = 'street3' - street4 = 'street4' - validation_status = 'validation_status' - vat_tax_id = 'vat_tax_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=CRMAddress, - 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 = { - 'city': 'string', - 'cnpj_tax_id': 'string', - 'country': 'string', - 'id': 'string', - 'postal_code': 'string', - 'registration_label': 'string', - 'registration_number': 'string', - 'state': 'string', - 'street1': 'string', - 'street2': 'string', - 'street3': 'string', - 'street4': 'string', - 'validation_status': 'string', - 'vat_tax_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py b/tap_facebook/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py deleted file mode 100644 index 581d04c..0000000 --- a/tap_facebook/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/currency.py b/tap_facebook/facebook_business/adobjects/currency.py deleted file mode 100644 index ba6070c..0000000 --- a/tap_facebook/facebook_business/adobjects/currency.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Currency( - AbstractObject, -): - - def __init__(self, api=None): - super(Currency, self).__init__() - self._isCurrency = True - self._api = api - - class Field(AbstractObject.Field): - currency_offset = 'currency_offset' - usd_exchange = 'usd_exchange' - usd_exchange_inverse = 'usd_exchange_inverse' - user_currency = 'user_currency' - - _field_types = { - 'currency_offset': 'unsigned int', - 'usd_exchange': 'float', - 'usd_exchange_inverse': 'float', - 'user_currency': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/currencyamount.py b/tap_facebook/facebook_business/adobjects/currencyamount.py deleted file mode 100644 index 5fdb4b6..0000000 --- a/tap_facebook/facebook_business/adobjects/currencyamount.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CurrencyAmount( - AbstractObject, -): - - def __init__(self, api=None): - super(CurrencyAmount, self).__init__() - self._isCurrencyAmount = True - self._api = api - - class Field(AbstractObject.Field): - amount = 'amount' - amount_in_hundredths = 'amount_in_hundredths' - currency = 'currency' - offsetted_amount = 'offsetted_amount' - - _field_types = { - 'amount': 'string', - 'amount_in_hundredths': 'string', - 'currency': 'string', - 'offsetted_amount': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customaudience.py b/tap_facebook/facebook_business/adobjects/customaudience.py deleted file mode 100644 index aa5355f..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudience.py +++ /dev/null @@ -1,703 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.adobjects.helpers.customaudiencemixin import CustomAudienceMixin - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomAudience( - CustomAudienceMixin, - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCustomAudience = True - super(CustomAudience, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - approximate_count_lower_bound = 'approximate_count_lower_bound' - approximate_count_upper_bound = 'approximate_count_upper_bound' - customer_file_source = 'customer_file_source' - data_source = 'data_source' - data_source_types = 'data_source_types' - datafile_custom_audience_uploading_status = 'datafile_custom_audience_uploading_status' - delete_time = 'delete_time' - delivery_status = 'delivery_status' - description = 'description' - excluded_custom_audiences = 'excluded_custom_audiences' - external_event_source = 'external_event_source' - household_audience = 'household_audience' - id = 'id' - included_custom_audiences = 'included_custom_audiences' - is_household = 'is_household' - is_snapshot = 'is_snapshot' - is_value_based = 'is_value_based' - lookalike_audience_ids = 'lookalike_audience_ids' - lookalike_spec = 'lookalike_spec' - name = 'name' - operation_status = 'operation_status' - opt_out_link = 'opt_out_link' - owner_business = 'owner_business' - page_deletion_marked_delete_time = 'page_deletion_marked_delete_time' - permission_for_actions = 'permission_for_actions' - pixel_id = 'pixel_id' - regulated_audience_spec = 'regulated_audience_spec' - retention_days = 'retention_days' - rev_share_policy_id = 'rev_share_policy_id' - rule = 'rule' - rule_aggregation = 'rule_aggregation' - rule_v2 = 'rule_v2' - seed_audience = 'seed_audience' - sharing_status = 'sharing_status' - subtype = 'subtype' - time_content_updated = 'time_content_updated' - time_created = 'time_created' - time_updated = 'time_updated' - allowed_domains = 'allowed_domains' - associated_audience_id = 'associated_audience_id' - claim_objective = 'claim_objective' - content_type = 'content_type' - countries = 'countries' - creation_params = 'creation_params' - dataset_id = 'dataset_id' - enable_fetch_or_create = 'enable_fetch_or_create' - event_source_group = 'event_source_group' - event_sources = 'event_sources' - exclusions = 'exclusions' - inclusions = 'inclusions' - list_of_accounts = 'list_of_accounts' - origin_audience_id = 'origin_audience_id' - parent_audience_id = 'parent_audience_id' - partner_reference_key = 'partner_reference_key' - prefill = 'prefill' - 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' - collaborative_ads = 'COLLABORATIVE_ADS' - home_listing = 'HOME_LISTING' - media_title = 'MEDIA_TITLE' - product = 'PRODUCT' - travel = 'TRAVEL' - vehicle = 'VEHICLE' - vehicle_offer = 'VEHICLE_OFFER' - - class ContentType: - automotive_model = 'AUTOMOTIVE_MODEL' - destination = 'DESTINATION' - flight = 'FLIGHT' - 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' - vehicle = 'VEHICLE' - vehicle_offer = 'VEHICLE_OFFER' - - class CustomerFileSource: - both_user_and_partner_provided = 'BOTH_USER_AND_PARTNER_PROVIDED' - partner_provided_only = 'PARTNER_PROVIDED_ONLY' - user_provided_only = 'USER_PROVIDED_ONLY' - - class Subtype: - app = 'APP' - bag_of_accounts = 'BAG_OF_ACCOUNTS' - bidding = 'BIDDING' - claim = 'CLAIM' - custom = 'CUSTOM' - engagement = 'ENGAGEMENT' - fox = 'FOX' - lookalike = 'LOOKALIKE' - managed = 'MANAGED' - measurement = 'MEASUREMENT' - offline_conversion = 'OFFLINE_CONVERSION' - partner = 'PARTNER' - primary = 'PRIMARY' - regulated_categories_audience = 'REGULATED_CATEGORIES_AUDIENCE' - study_rule_audience = 'STUDY_RULE_AUDIENCE' - subscriber_segment = 'SUBSCRIBER_SEGMENT' - video = 'VIDEO' - website = 'WEBSITE' - - class ActionSource: - physical_store = 'PHYSICAL_STORE' - website = 'WEBSITE' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'customaudiences' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_custom_audience(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 - if batch 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_account_id': 'string', - 'target_countries': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomAudience, - 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 = { - 'allowed_domains': 'list', - 'claim_objective': 'claim_objective_enum', - 'content_type': 'content_type_enum', - 'countries': 'string', - 'customer_file_source': 'customer_file_source_enum', - 'description': 'string', - 'enable_fetch_or_create': 'bool', - 'event_source_group': 'string', - 'event_sources': 'list', - 'exclusions': 'list', - 'inclusions': 'list', - 'lookalike_spec': 'string', - 'name': 'string', - 'opt_out_link': 'string', - 'parent_audience_id': 'unsigned int', - 'product_set_id': 'string', - 'retention_days': 'unsigned int', - 'rev_share_policy_id': 'unsigned int', - 'rule': 'string', - 'rule_aggregation': 'string', - 'tags': 'list', - 'use_in_campaigns': 'bool', - } - enums = { - 'claim_objective_enum': CustomAudience.ClaimObjective.__dict__.values(), - 'content_type_enum': CustomAudience.ContentType.__dict__.values(), - 'customer_file_source_enum': CustomAudience.CustomerFileSource.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomAudience, - 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_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.') - param_types = { - 'adaccounts': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/adaccounts', - 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_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 = { - 'permissions': 'string', - } - 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() - - 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 = { - 'adaccounts': 'list', - 'permissions': 'string', - 'relationship_type': 'list', - 'replace': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adaccounts', - 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_ads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.ad import Ad - param_types = { - 'effective_status': 'list', - 'status': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Ad, - api_type='EDGE', - response_parser=ObjectParser(target_class=Ad, 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.customaudiencesession import CustomAudienceSession - param_types = { - 'session_id': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/sessions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomAudienceSession, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomAudienceSession, 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_shared_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.') - from facebook_business.adobjects.customaudiencesharedaccountinfo import CustomAudiencesharedAccountInfo - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/shared_account_info', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomAudiencesharedAccountInfo, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomAudiencesharedAccountInfo, 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_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.') - param_types = { - 'namespace': 'string', - 'payload': 'Object', - 'session': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/users', - 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_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'namespace': 'string', - 'payload': 'Object', - 'session': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/users', - 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 create_users_replace(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'namespace': 'string', - 'payload': 'Object', - 'session': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/usersreplace', - 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() - - _field_types = { - 'account_id': 'string', - 'approximate_count_lower_bound': 'int', - 'approximate_count_upper_bound': 'int', - 'customer_file_source': 'string', - 'data_source': 'CustomAudienceDataSource', - 'data_source_types': 'string', - 'datafile_custom_audience_uploading_status': 'string', - 'delete_time': 'int', - 'delivery_status': 'CustomAudienceStatus', - 'description': 'string', - 'excluded_custom_audiences': 'list', - 'external_event_source': 'AdsPixel', - 'household_audience': 'int', - 'id': 'string', - 'included_custom_audiences': 'list', - 'is_household': 'bool', - 'is_snapshot': 'bool', - 'is_value_based': 'bool', - 'lookalike_audience_ids': 'list', - 'lookalike_spec': 'LookalikeSpec', - 'name': 'string', - 'operation_status': 'CustomAudienceStatus', - 'opt_out_link': 'string', - 'owner_business': 'Business', - 'page_deletion_marked_delete_time': 'int', - 'permission_for_actions': 'AudiencePermissionForActions', - 'pixel_id': 'string', - 'regulated_audience_spec': 'LookalikeSpec', - 'retention_days': 'int', - 'rev_share_policy_id': 'unsigned int', - 'rule': 'string', - 'rule_aggregation': 'string', - 'rule_v2': 'string', - 'seed_audience': 'int', - 'sharing_status': 'CustomAudienceSharingStatus', - 'subtype': 'string', - 'time_content_updated': 'unsigned int', - 'time_created': 'unsigned int', - 'time_updated': 'unsigned int', - 'allowed_domains': 'list', - 'associated_audience_id': 'unsigned int', - 'claim_objective': 'ClaimObjective', - 'content_type': 'ContentType', - 'countries': 'string', - 'creation_params': 'map', - 'dataset_id': 'string', - 'enable_fetch_or_create': 'bool', - 'event_source_group': 'string', - 'event_sources': 'list', - 'exclusions': 'list', - 'inclusions': 'list', - 'list_of_accounts': 'list', - 'origin_audience_id': 'string', - 'parent_audience_id': 'unsigned int', - 'partner_reference_key': 'string', - 'prefill': 'bool', - '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): - field_enum_info = {} - field_enum_info['ClaimObjective'] = CustomAudience.ClaimObjective.__dict__.values() - field_enum_info['ContentType'] = CustomAudience.ContentType.__dict__.values() - field_enum_info['CustomerFileSource'] = CustomAudience.CustomerFileSource.__dict__.values() - field_enum_info['Subtype'] = CustomAudience.Subtype.__dict__.values() - field_enum_info['ActionSource'] = CustomAudience.ActionSource.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customaudienceadaccount.py b/tap_facebook/facebook_business/adobjects/customaudienceadaccount.py deleted file mode 100644 index ab10e99..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudienceadaccount.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CustomAudienceAdAccount( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCustomAudienceAdAccount = True - super(CustomAudienceAdAccount, 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/tap_facebook/facebook_business/adobjects/customaudiencedatasource.py b/tap_facebook/facebook_business/adobjects/customaudiencedatasource.py deleted file mode 100644 index 19afe6a..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudiencedatasource.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomAudienceDataSource( - AbstractObject, -): - - def __init__(self, api=None): - super(CustomAudienceDataSource, self).__init__() - self._isCustomAudienceDataSource = True - self._api = api - - class Field(AbstractObject.Field): - creation_params = 'creation_params' - sub_type = 'sub_type' - type = 'type' - - class SubType: - anything = 'ANYTHING' - app_users = 'APP_USERS' - ar_effects_events = 'AR_EFFECTS_EVENTS' - ar_experience_events = 'AR_EXPERIENCE_EVENTS' - campaign_conversions = 'CAMPAIGN_CONVERSIONS' - combination_custom_audience_users = 'COMBINATION_CUSTOM_AUDIENCE_USERS' - constant_contacts_email_hashes = 'CONSTANT_CONTACTS_EMAIL_HASHES' - contact_importer = 'CONTACT_IMPORTER' - conversion_pixel_hits = 'CONVERSION_PIXEL_HITS' - copy_paste_email_hashes = 'COPY_PASTE_EMAIL_HASHES' - custom_audience_users = 'CUSTOM_AUDIENCE_USERS' - custom_data_targeting = 'CUSTOM_DATA_TARGETING' - data_file = 'DATA_FILE' - dynamic_rule = 'DYNAMIC_RULE' - engagement_event_users = 'ENGAGEMENT_EVENT_USERS' - expanded_audience = 'EXPANDED_AUDIENCE' - external_ids = 'EXTERNAL_IDS' - external_ids_mix = 'EXTERNAL_IDS_MIX' - facebook_wifi_events = 'FACEBOOK_WIFI_EVENTS' - fb_event_signals = 'FB_EVENT_SIGNALS' - fb_pixel_hits = 'FB_PIXEL_HITS' - hashes = 'HASHES' - hashes_or_user_ids = 'HASHES_OR_USER_IDS' - household_expansion = 'HOUSEHOLD_EXPANSION' - ig_business_events = 'IG_BUSINESS_EVENTS' - ig_promoted_post = 'IG_PROMOTED_POST' - 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' - mobile_app_events = 'MOBILE_APP_EVENTS' - multicountry_combination = 'MULTICOUNTRY_COMBINATION' - multi_data_events = 'MULTI_DATA_EVENTS' - multi_event_source = 'MULTI_EVENT_SOURCE' - multi_hashes = 'MULTI_HASHES' - nothing = 'NOTHING' - offline_event_users = 'OFFLINE_EVENT_USERS' - page_fans = 'PAGE_FANS' - page_smart_audience = 'PAGE_SMART_AUDIENCE' - partner_category_users = 'PARTNER_CATEGORY_USERS' - place_visits = 'PLACE_VISITS' - platform = 'PLATFORM' - platform_users = 'PLATFORM_USERS' - seed_list = 'SEED_LIST' - signal_source = 'SIGNAL_SOURCE' - smart_audience = 'SMART_AUDIENCE' - store_visit_events = 'STORE_VISIT_EVENTS' - subscriber_list = 'SUBSCRIBER_LIST' - s_expr = 'S_EXPR' - tokens = 'TOKENS' - user_ids = 'USER_IDS' - video_events = 'VIDEO_EVENTS' - video_event_users = 'VIDEO_EVENT_USERS' - 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' - copy_paste = 'COPY_PASTE' - event_based = 'EVENT_BASED' - file_imported = 'FILE_IMPORTED' - household_audience = 'HOUSEHOLD_AUDIENCE' - seed_based = 'SEED_BASED' - third_party_imported = 'THIRD_PARTY_IMPORTED' - unknown = 'UNKNOWN' - - _field_types = { - 'creation_params': 'string', - 'sub_type': 'SubType', - 'type': 'Type', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['SubType'] = CustomAudienceDataSource.SubType.__dict__.values() - field_enum_info['Type'] = CustomAudienceDataSource.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customaudiencegroup.py b/tap_facebook/facebook_business/adobjects/customaudiencegroup.py deleted file mode 100644 index 5f36692..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudiencegroup.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomAudienceGroup( - AbstractObject, -): - - def __init__(self, api=None): - super(CustomAudienceGroup, self).__init__() - self._isCustomAudienceGroup = True - self._api = api - - class Field(AbstractObject.Field): - audience_type_param_name = 'audience_type_param_name' - existing_customer_tag = 'existing_customer_tag' - new_customer_tag = 'new_customer_tag' - - _field_types = { - 'audience_type_param_name': 'string', - 'existing_customer_tag': 'string', - 'new_customer_tag': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customaudiencesalts.py b/tap_facebook/facebook_business/adobjects/customaudiencesalts.py deleted file mode 100644 index 7d4b6bb..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudiencesalts.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/customaudiencesession.py b/tap_facebook/facebook_business/adobjects/customaudiencesession.py deleted file mode 100644 index 3b7198e..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudiencesession.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomAudienceSession( - AbstractObject, -): - - def __init__(self, api=None): - super(CustomAudienceSession, self).__init__() - self._isCustomAudienceSession = True - self._api = api - - class Field(AbstractObject.Field): - end_time = 'end_time' - num_invalid_entries = 'num_invalid_entries' - num_matched = 'num_matched' - num_received = 'num_received' - progress = 'progress' - session_id = 'session_id' - stage = 'stage' - start_time = 'start_time' - - _field_types = { - 'end_time': 'string', - 'num_invalid_entries': 'string', - 'num_matched': 'string', - 'num_received': 'string', - 'progress': 'string', - 'session_id': 'string', - 'stage': 'string', - 'start_time': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customaudiencesharedaccountinfo.py b/tap_facebook/facebook_business/adobjects/customaudiencesharedaccountinfo.py deleted file mode 100644 index 221e919..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudiencesharedaccountinfo.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomAudiencesharedAccountInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(CustomAudiencesharedAccountInfo, self).__init__() - self._isCustomAudiencesharedAccountInfo = True - self._api = api - - class Field(AbstractObject.Field): - account_id = 'account_id' - account_name = 'account_name' - business_id = 'business_id' - business_name = 'business_name' - sharing_status = 'sharing_status' - - _field_types = { - 'account_id': 'string', - 'account_name': 'string', - 'business_id': 'string', - 'business_name': 'string', - 'sharing_status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customaudiencesharingstatus.py b/tap_facebook/facebook_business/adobjects/customaudiencesharingstatus.py deleted file mode 100644 index b6f9cb4..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudiencesharingstatus.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomAudienceSharingStatus( - AbstractObject, -): - - def __init__(self, api=None): - super(CustomAudienceSharingStatus, self).__init__() - self._isCustomAudienceSharingStatus = True - self._api = api - - class Field(AbstractObject.Field): - sharing_relationship_id = 'sharing_relationship_id' - status = 'status' - - _field_types = { - 'sharing_relationship_id': 'unsigned int', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customaudiencestatus.py b/tap_facebook/facebook_business/adobjects/customaudiencestatus.py deleted file mode 100644 index 2408ab3..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudiencestatus.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomAudienceStatus( - AbstractObject, -): - - def __init__(self, api=None): - super(CustomAudienceStatus, self).__init__() - self._isCustomAudienceStatus = True - self._api = api - - class Field(AbstractObject.Field): - code = 'code' - description = 'description' - - _field_types = { - 'code': 'unsigned int', - 'description': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customaudiencestos.py b/tap_facebook/facebook_business/adobjects/customaudiencestos.py deleted file mode 100644 index a70f4fa..0000000 --- a/tap_facebook/facebook_business/adobjects/customaudiencestos.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CustomAudiencesTOS( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCustomAudiencesTOS = True - super(CustomAudiencesTOS, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - content = 'content' - id = 'id' - type = 'type' - - _field_types = { - 'content': 'string', - 'id': 'string', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customconversion.py b/tap_facebook/facebook_business/adobjects/customconversion.py deleted file mode 100644 index bc17888..0000000 --- a/tap_facebook/facebook_business/adobjects/customconversion.py +++ /dev/null @@ -1,243 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 CustomConversion( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isCustomConversion = True - super(CustomConversion, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - aggregation_rule = 'aggregation_rule' - business = 'business' - creation_time = 'creation_time' - custom_event_type = 'custom_event_type' - data_sources = 'data_sources' - default_conversion_value = 'default_conversion_value' - description = 'description' - event_source_type = 'event_source_type' - first_fired_time = 'first_fired_time' - id = 'id' - is_archived = 'is_archived' - is_unavailable = 'is_unavailable' - last_fired_time = 'last_fired_time' - name = 'name' - offline_conversion_data_set = 'offline_conversion_data_set' - pixel = 'pixel' - retention_days = 'retention_days' - rule = 'rule' - advanced_rule = 'advanced_rule' - event_source_id = 'event_source_id' - custom_conversion_id = 'custom_conversion_id' - - class CustomEventType: - add_payment_info = 'ADD_PAYMENT_INFO' - add_to_cart = 'ADD_TO_CART' - add_to_wishlist = 'ADD_TO_WISHLIST' - complete_registration = 'COMPLETE_REGISTRATION' - contact = 'CONTACT' - content_view = 'CONTENT_VIEW' - customize_product = 'CUSTOMIZE_PRODUCT' - donate = 'DONATE' - facebook_selected = 'FACEBOOK_SELECTED' - find_location = 'FIND_LOCATION' - initiated_checkout = 'INITIATED_CHECKOUT' - lead = 'LEAD' - listing_interaction = 'LISTING_INTERACTION' - other = 'OTHER' - purchase = 'PURCHASE' - schedule = 'SCHEDULE' - search = 'SEARCH' - start_trial = 'START_TRIAL' - submit_application = 'SUBMIT_APPLICATION' - subscribe = 'SUBSCRIBE' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'customconversions' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_custom_conversion(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 - if batch 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=CustomConversion, - 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 = { - 'default_conversion_value': 'float', - 'description': 'string', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversion, - 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_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.customconversionstatsresult import CustomConversionStatsResult - param_types = { - 'aggregation': 'aggregation_enum', - 'end_time': 'datetime', - 'start_time': 'datetime', - } - enums = { - 'aggregation_enum': CustomConversionStatsResult.Aggregation.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/stats', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversionStatsResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomConversionStatsResult, 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', - 'aggregation_rule': 'string', - 'business': 'Business', - 'creation_time': 'datetime', - 'custom_event_type': 'CustomEventType', - 'data_sources': 'list', - 'default_conversion_value': 'int', - 'description': 'string', - 'event_source_type': 'string', - 'first_fired_time': 'datetime', - 'id': 'string', - 'is_archived': 'bool', - 'is_unavailable': 'bool', - 'last_fired_time': 'datetime', - 'name': 'string', - 'offline_conversion_data_set': 'OfflineConversionDataSet', - 'pixel': 'AdsPixel', - 'retention_days': 'unsigned int', - 'rule': 'string', - 'advanced_rule': 'string', - 'event_source_id': 'string', - 'custom_conversion_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['CustomEventType'] = CustomConversion.CustomEventType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customconversionstatsresult.py b/tap_facebook/facebook_business/adobjects/customconversionstatsresult.py deleted file mode 100644 index 585b693..0000000 --- a/tap_facebook/facebook_business/adobjects/customconversionstatsresult.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomConversionStatsResult( - AbstractObject, -): - - def __init__(self, api=None): - super(CustomConversionStatsResult, self).__init__() - self._isCustomConversionStatsResult = True - self._api = api - - class Field(AbstractObject.Field): - aggregation = 'aggregation' - data = 'data' - timestamp = 'timestamp' - - class Aggregation: - count = 'count' - device_type = 'device_type' - host = 'host' - pixel_fire = 'pixel_fire' - unmatched_count = 'unmatched_count' - unmatched_usd_amount = 'unmatched_usd_amount' - url = 'url' - usd_amount = 'usd_amount' - - _field_types = { - 'aggregation': 'Aggregation', - 'data': 'list', - 'timestamp': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Aggregation'] = CustomConversionStatsResult.Aggregation.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/customusersettings.py b/tap_facebook/facebook_business/adobjects/customusersettings.py deleted file mode 100644 index 4c40e98..0000000 --- a/tap_facebook/facebook_business/adobjects/customusersettings.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class CustomUserSettings( - AbstractObject, -): - - def __init__(self, api=None): - super(CustomUserSettings, self).__init__() - self._isCustomUserSettings = True - self._api = api - - class Field(AbstractObject.Field): - page_level_persistent_menu = 'page_level_persistent_menu' - user_level_persistent_menu = 'user_level_persistent_menu' - - _field_types = { - 'page_level_persistent_menu': 'list', - 'user_level_persistent_menu': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/dacheck.py b/tap_facebook/facebook_business/adobjects/dacheck.py deleted file mode 100644 index 665bb3a..0000000 --- a/tap_facebook/facebook_business/adobjects/dacheck.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class DACheck( - AbstractObject, -): - - def __init__(self, api=None): - super(DACheck, self).__init__() - self._isDACheck = True - self._api = api - - class Field(AbstractObject.Field): - action_uri = 'action_uri' - description = 'description' - key = 'key' - result = 'result' - title = 'title' - user_message = 'user_message' - - class ConnectionMethod: - all = 'ALL' - app = 'APP' - browser = 'BROWSER' - server = 'SERVER' - - _field_types = { - 'action_uri': 'string', - 'description': 'string', - 'key': 'string', - 'result': 'string', - 'title': 'string', - 'user_message': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ConnectionMethod'] = DACheck.ConnectionMethod.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/dataset.py b/tap_facebook/facebook_business/adobjects/dataset.py deleted file mode 100644 index 8cfd46c..0000000 --- a/tap_facebook/facebook_business/adobjects/dataset.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Dataset( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isDataset = True - super(Dataset, 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/tap_facebook/facebook_business/adobjects/daypart.py b/tap_facebook/facebook_business/adobjects/daypart.py deleted file mode 100644 index 8ed1824..0000000 --- a/tap_facebook/facebook_business/adobjects/daypart.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class DayPart( - AbstractObject, -): - - def __init__(self, api=None): - super(DayPart, self).__init__() - self._isDayPart = 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/tap_facebook/facebook_business/adobjects/deliverycheck.py b/tap_facebook/facebook_business/adobjects/deliverycheck.py deleted file mode 100644 index 637cefc..0000000 --- a/tap_facebook/facebook_business/adobjects/deliverycheck.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class DeliveryCheck( - AbstractObject, -): - - def __init__(self, api=None): - super(DeliveryCheck, self).__init__() - self._isDeliveryCheck = True - self._api = api - - class Field(AbstractObject.Field): - check_name = 'check_name' - description = 'description' - extra_info = 'extra_info' - summary = 'summary' - - _field_types = { - 'check_name': 'string', - 'description': 'string', - 'extra_info': 'DeliveryCheckExtraInfo', - 'summary': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/deliverycheckextrainfo.py b/tap_facebook/facebook_business/adobjects/deliverycheckextrainfo.py deleted file mode 100644 index bcfa040..0000000 --- a/tap_facebook/facebook_business/adobjects/deliverycheckextrainfo.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class DeliveryCheckExtraInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(DeliveryCheckExtraInfo, self).__init__() - self._isDeliveryCheckExtraInfo = True - self._api = api - - class Field(AbstractObject.Field): - adgroup_ids = 'adgroup_ids' - campaign_ids = 'campaign_ids' - countries = 'countries' - - _field_types = { - 'adgroup_ids': 'list', - 'campaign_ids': 'list', - 'countries': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/deliverywindow.py b/tap_facebook/facebook_business/adobjects/deliverywindow.py deleted file mode 100644 index f6d8542..0000000 --- a/tap_facebook/facebook_business/adobjects/deliverywindow.py +++ /dev/null @@ -1,542 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 DeliveryWindow( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isDeliveryWindow = True - super(DeliveryWindow, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad = 'ad' - ae = 'ae' - af = 'af' - ag = 'ag' - ai = 'ai' - al = 'al' - all = 'all' - am = 'am' - an = 'an' - ao = 'ao' - aq = 'aq' - ar = 'ar' - field_as = 'as' - at = 'at' - au = 'au' - aw = 'aw' - ax = 'ax' - az = 'az' - ba = 'ba' - bb = 'bb' - bd = 'bd' - be = 'be' - bf = 'bf' - bg = 'bg' - bh = 'bh' - bi = 'bi' - bj = 'bj' - bl = 'bl' - bm = 'bm' - bn = 'bn' - bo = 'bo' - bq = 'bq' - br = 'br' - bs = 'bs' - bt = 'bt' - bv = 'bv' - bw = 'bw' - by = 'by' - bz = 'bz' - ca = 'ca' - cc = 'cc' - cd = 'cd' - cf = 'cf' - cg = 'cg' - ch = 'ch' - ci = 'ci' - ck = 'ck' - cl = 'cl' - cm = 'cm' - cn = 'cn' - co = 'co' - cr = 'cr' - cu = 'cu' - cv = 'cv' - cw = 'cw' - cx = 'cx' - cy = 'cy' - cz = 'cz' - de = 'de' - dj = 'dj' - dk = 'dk' - dm = 'dm' - do = 'do' - dz = 'dz' - ec = 'ec' - ee = 'ee' - eg = 'eg' - eh = 'eh' - er = 'er' - es = 'es' - et = 'et' - fi = 'fi' - fj = 'fj' - fk = 'fk' - fm = 'fm' - fo = 'fo' - fr = 'fr' - ga = 'ga' - gb = 'gb' - gd = 'gd' - ge = 'ge' - gf = 'gf' - gg = 'gg' - gh = 'gh' - gi = 'gi' - gl = 'gl' - gm = 'gm' - gn = 'gn' - gp = 'gp' - gq = 'gq' - gr = 'gr' - gs = 'gs' - gt = 'gt' - gu = 'gu' - gw = 'gw' - gy = 'gy' - hk = 'hk' - hm = 'hm' - hn = 'hn' - hr = 'hr' - ht = 'ht' - hu = 'hu' - id = 'id' - ie = 'ie' - il = 'il' - im = 'im' - field_in = 'in' - io = 'io' - iq = 'iq' - ir = 'ir' - field_is = 'is' - it = 'it' - je = 'je' - jm = 'jm' - jo = 'jo' - jp = 'jp' - ke = 'ke' - kg = 'kg' - kh = 'kh' - ki = 'ki' - km = 'km' - kn = 'kn' - kp = 'kp' - kr = 'kr' - kw = 'kw' - ky = 'ky' - kz = 'kz' - la = 'la' - lb = 'lb' - lc = 'lc' - li = 'li' - lk = 'lk' - lr = 'lr' - ls = 'ls' - lt = 'lt' - lu = 'lu' - lv = 'lv' - ly = 'ly' - ma = 'ma' - mc = 'mc' - md = 'md' - me = 'me' - mf = 'mf' - mg = 'mg' - mh = 'mh' - mk = 'mk' - ml = 'ml' - mm = 'mm' - mn = 'mn' - mo = 'mo' - mp = 'mp' - mq = 'mq' - mr = 'mr' - ms = 'ms' - mt = 'mt' - mu = 'mu' - mv = 'mv' - mw = 'mw' - mx = 'mx' - my = 'my' - mz = 'mz' - na = 'na' - nc = 'nc' - ne = 'ne' - nf = 'nf' - ng = 'ng' - ni = 'ni' - nl = 'nl' - no = 'no' - np = 'np' - nr = 'nr' - nu = 'nu' - nz = 'nz' - om = 'om' - pa = 'pa' - pe = 'pe' - pf = 'pf' - pg = 'pg' - ph = 'ph' - pk = 'pk' - pl = 'pl' - pm = 'pm' - pn = 'pn' - pr = 'pr' - ps = 'ps' - pt = 'pt' - pw = 'pw' - py = 'py' - qa = 'qa' - re = 're' - ro = 'ro' - rs = 'rs' - ru = 'ru' - rw = 'rw' - sa = 'sa' - sb = 'sb' - sc = 'sc' - sd = 'sd' - se = 'se' - sg = 'sg' - sh = 'sh' - si = 'si' - sj = 'sj' - sk = 'sk' - sl = 'sl' - sm = 'sm' - sn = 'sn' - so = 'so' - sr = 'sr' - ss = 'ss' - st = 'st' - sv = 'sv' - sx = 'sx' - sy = 'sy' - sz = 'sz' - tc = 'tc' - td = 'td' - tf = 'tf' - tg = 'tg' - th = 'th' - tj = 'tj' - tk = 'tk' - tl = 'tl' - tm = 'tm' - tn = 'tn' - to = 'to' - tr = 'tr' - tt = 'tt' - tv = 'tv' - tw = 'tw' - tz = 'tz' - ua = 'ua' - ug = 'ug' - um = 'um' - us = 'us' - uy = 'uy' - uz = 'uz' - va = 'va' - vc = 'vc' - ve = 've' - vg = 'vg' - vi = 'vi' - vn = 'vn' - vu = 'vu' - wf = 'wf' - ws = 'ws' - xk = 'xk' - ye = 'ye' - yt = 'yt' - za = 'za' - zm = 'zm' - zw = 'zw' - - _field_types = { - 'ad': 'int', - 'ae': 'int', - 'af': 'int', - 'ag': 'int', - 'ai': 'int', - 'al': 'int', - 'all': 'int', - 'am': 'int', - 'an': 'int', - 'ao': 'int', - 'aq': 'int', - 'ar': 'int', - 'as': 'int', - 'at': 'int', - 'au': 'int', - 'aw': 'int', - 'ax': 'int', - 'az': 'int', - 'ba': 'int', - 'bb': 'int', - 'bd': 'int', - 'be': 'int', - 'bf': 'int', - 'bg': 'int', - 'bh': 'int', - 'bi': 'int', - 'bj': 'int', - 'bl': 'int', - 'bm': 'int', - 'bn': 'int', - 'bo': 'int', - 'bq': 'int', - 'br': 'int', - 'bs': 'int', - 'bt': 'int', - 'bv': 'int', - 'bw': 'int', - 'by': 'int', - 'bz': 'int', - 'ca': 'int', - 'cc': 'int', - 'cd': 'int', - 'cf': 'int', - 'cg': 'int', - 'ch': 'int', - 'ci': 'int', - 'ck': 'int', - 'cl': 'int', - 'cm': 'int', - 'cn': 'int', - 'co': 'int', - 'cr': 'int', - 'cu': 'int', - 'cv': 'int', - 'cw': 'int', - 'cx': 'int', - 'cy': 'int', - 'cz': 'int', - 'de': 'int', - 'dj': 'int', - 'dk': 'int', - 'dm': 'int', - 'do': 'int', - 'dz': 'int', - 'ec': 'int', - 'ee': 'int', - 'eg': 'int', - 'eh': 'int', - 'er': 'int', - 'es': 'int', - 'et': 'int', - 'fi': 'int', - 'fj': 'int', - 'fk': 'int', - 'fm': 'int', - 'fo': 'int', - 'fr': 'int', - 'ga': 'int', - 'gb': 'int', - 'gd': 'int', - 'ge': 'int', - 'gf': 'int', - 'gg': 'int', - 'gh': 'int', - 'gi': 'int', - 'gl': 'int', - 'gm': 'int', - 'gn': 'int', - 'gp': 'int', - 'gq': 'int', - 'gr': 'int', - 'gs': 'int', - 'gt': 'int', - 'gu': 'int', - 'gw': 'int', - 'gy': 'int', - 'hk': 'int', - 'hm': 'int', - 'hn': 'int', - 'hr': 'int', - 'ht': 'int', - 'hu': 'int', - 'id': 'int', - 'ie': 'int', - 'il': 'int', - 'im': 'int', - 'in': 'int', - 'io': 'int', - 'iq': 'int', - 'ir': 'int', - 'is': 'int', - 'it': 'int', - 'je': 'int', - 'jm': 'int', - 'jo': 'int', - 'jp': 'int', - 'ke': 'int', - 'kg': 'int', - 'kh': 'int', - 'ki': 'int', - 'km': 'int', - 'kn': 'int', - 'kp': 'int', - 'kr': 'int', - 'kw': 'int', - 'ky': 'int', - 'kz': 'int', - 'la': 'int', - 'lb': 'int', - 'lc': 'int', - 'li': 'int', - 'lk': 'int', - 'lr': 'int', - 'ls': 'int', - 'lt': 'int', - 'lu': 'int', - 'lv': 'int', - 'ly': 'int', - 'ma': 'int', - 'mc': 'int', - 'md': 'int', - 'me': 'int', - 'mf': 'int', - 'mg': 'int', - 'mh': 'int', - 'mk': 'int', - 'ml': 'int', - 'mm': 'int', - 'mn': 'int', - 'mo': 'int', - 'mp': 'int', - 'mq': 'int', - 'mr': 'int', - 'ms': 'int', - 'mt': 'int', - 'mu': 'int', - 'mv': 'int', - 'mw': 'int', - 'mx': 'int', - 'my': 'int', - 'mz': 'int', - 'na': 'int', - 'nc': 'int', - 'ne': 'int', - 'nf': 'int', - 'ng': 'int', - 'ni': 'int', - 'nl': 'int', - 'no': 'int', - 'np': 'int', - 'nr': 'int', - 'nu': 'int', - 'nz': 'int', - 'om': 'int', - 'pa': 'int', - 'pe': 'int', - 'pf': 'int', - 'pg': 'int', - 'ph': 'int', - 'pk': 'int', - 'pl': 'int', - 'pm': 'int', - 'pn': 'int', - 'pr': 'int', - 'ps': 'int', - 'pt': 'int', - 'pw': 'int', - 'py': 'int', - 'qa': 'int', - 're': 'int', - 'ro': 'int', - 'rs': 'int', - 'ru': 'int', - 'rw': 'int', - 'sa': 'int', - 'sb': 'int', - 'sc': 'int', - 'sd': 'int', - 'se': 'int', - 'sg': 'int', - 'sh': 'int', - 'si': 'int', - 'sj': 'int', - 'sk': 'int', - 'sl': 'int', - 'sm': 'int', - 'sn': 'int', - 'so': 'int', - 'sr': 'int', - 'ss': 'int', - 'st': 'int', - 'sv': 'int', - 'sx': 'int', - 'sy': 'int', - 'sz': 'int', - 'tc': 'int', - 'td': 'int', - 'tf': 'int', - 'tg': 'int', - 'th': 'int', - 'tj': 'int', - 'tk': 'int', - 'tl': 'int', - 'tm': 'int', - 'tn': 'int', - 'to': 'int', - 'tr': 'int', - 'tt': 'int', - 'tv': 'int', - 'tw': 'int', - 'tz': 'int', - 'ua': 'int', - 'ug': 'int', - 'um': 'int', - 'us': 'int', - 'uy': 'int', - 'uz': 'int', - 'va': 'int', - 'vc': 'int', - 've': 'int', - 'vg': 'int', - 'vi': 'int', - 'vn': 'int', - 'vu': 'int', - 'wf': 'int', - 'ws': 'int', - 'xk': 'int', - 'ye': 'int', - 'yt': 'int', - 'za': 'int', - 'zm': 'int', - 'zw': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/destination.py b/tap_facebook/facebook_business/adobjects/destination.py deleted file mode 100644 index c95c7ac..0000000 --- a/tap_facebook/facebook_business/adobjects/destination.py +++ /dev/null @@ -1,208 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Destination( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isDestination = True - super(Destination, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - address = 'address' - applinks = 'applinks' - category_specific_fields = 'category_specific_fields' - currency = 'currency' - description = 'description' - destination_id = 'destination_id' - id = 'id' - image_fetch_status = 'image_fetch_status' - images = 'images' - name = 'name' - price = 'price' - price_change = 'price_change' - sanitized_images = 'sanitized_images' - types = 'types' - unit_price = 'unit_price' - 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=Destination, - 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.') - 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=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_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 = { - 'address': 'string', - 'applinks': 'CatalogItemAppLinks', - 'category_specific_fields': 'CatalogSubVerticalList', - 'currency': 'string', - 'description': 'string', - 'destination_id': 'string', - 'id': 'string', - 'image_fetch_status': 'ImageFetchStatus', - 'images': 'list', - 'name': 'string', - 'price': 'string', - 'price_change': 'string', - 'sanitized_images': 'list', - 'types': 'list', - 'unit_price': 'Object', - 'url': 'string', - 'visibility': 'Visibility', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ImageFetchStatus'] = Destination.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = Destination.Visibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/dynamicpostchildattachment.py b/tap_facebook/facebook_business/adobjects/dynamicpostchildattachment.py deleted file mode 100644 index cfd34b9..0000000 --- a/tap_facebook/facebook_business/adobjects/dynamicpostchildattachment.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class DynamicPostChildAttachment( - AbstractObject, -): - - def __init__(self, api=None): - super(DynamicPostChildAttachment, self).__init__() - self._isDynamicPostChildAttachment = True - self._api = api - - class Field(AbstractObject.Field): - description = 'description' - image_url = 'image_url' - link = 'link' - place_id = 'place_id' - product_id = 'product_id' - title = 'title' - - _field_types = { - 'description': 'string', - 'image_url': 'string', - 'link': 'string', - 'place_id': 'string', - 'product_id': 'string', - 'title': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/dynamicpriceconfigbydate.py b/tap_facebook/facebook_business/adobjects/dynamicpriceconfigbydate.py deleted file mode 100644 index 694b982..0000000 --- a/tap_facebook/facebook_business/adobjects/dynamicpriceconfigbydate.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 DynamicPriceConfigByDate( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isDynamicPriceConfigByDate = True - super(DynamicPriceConfigByDate, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - checkin_date = 'checkin_date' - prices = 'prices' - prices_pretty = 'prices_pretty' - 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=DynamicPriceConfigByDate, - 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 = { - 'checkin_date': 'string', - 'prices': 'string', - 'prices_pretty': 'list', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/dynamicvideometadata.py b/tap_facebook/facebook_business/adobjects/dynamicvideometadata.py deleted file mode 100644 index 849ccb2..0000000 --- a/tap_facebook/facebook_business/adobjects/dynamicvideometadata.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/engagement.py b/tap_facebook/facebook_business/adobjects/engagement.py deleted file mode 100644 index e96347e..0000000 --- a/tap_facebook/facebook_business/adobjects/engagement.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Engagement( - AbstractObject, -): - - def __init__(self, api=None): - super(Engagement, self).__init__() - self._isEngagement = True - self._api = api - - class Field(AbstractObject.Field): - count = 'count' - count_string = 'count_string' - count_string_with_like = 'count_string_with_like' - count_string_without_like = 'count_string_without_like' - social_sentence = 'social_sentence' - social_sentence_with_like = 'social_sentence_with_like' - social_sentence_without_like = 'social_sentence_without_like' - - _field_types = { - 'count': 'unsigned int', - 'count_string': 'string', - 'count_string_with_like': 'string', - 'count_string_without_like': 'string', - 'social_sentence': 'string', - 'social_sentence_with_like': 'string', - 'social_sentence_without_like': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/entityattextrange.py b/tap_facebook/facebook_business/adobjects/entityattextrange.py deleted file mode 100644 index 0b2700e..0000000 --- a/tap_facebook/facebook_business/adobjects/entityattextrange.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 EntityAtTextRange( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isEntityAtTextRange = True - super(EntityAtTextRange, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - length = 'length' - name = 'name' - object = 'object' - offset = 'offset' - type = 'type' - - class Type: - application = 'application' - event = 'event' - group = 'group' - page = 'page' - user = 'user' - - _field_types = { - 'id': 'string', - 'length': 'unsigned int', - 'name': 'string', - 'object': 'Profile', - 'offset': 'unsigned int', - 'type': 'Type', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Type'] = EntityAtTextRange.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/event.py b/tap_facebook/facebook_business/adobjects/event.py deleted file mode 100644 index ced539d..0000000 --- a/tap_facebook/facebook_business/adobjects/event.py +++ /dev/null @@ -1,528 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Event( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isEvent = True - super(Event, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - attending_count = 'attending_count' - can_guests_invite = 'can_guests_invite' - category = 'category' - cover = 'cover' - created_time = 'created_time' - declined_count = 'declined_count' - description = 'description' - discount_code_enabled = 'discount_code_enabled' - end_time = 'end_time' - event_times = 'event_times' - guest_list_enabled = 'guest_list_enabled' - id = 'id' - interested_count = 'interested_count' - is_canceled = 'is_canceled' - is_draft = 'is_draft' - is_online = 'is_online' - is_page_owned = 'is_page_owned' - maybe_count = 'maybe_count' - name = 'name' - noreply_count = 'noreply_count' - online_event_format = 'online_event_format' - online_event_third_party_url = 'online_event_third_party_url' - owner = 'owner' - parent_group = 'parent_group' - place = 'place' - registration_setting = 'registration_setting' - scheduled_publish_time = 'scheduled_publish_time' - start_time = 'start_time' - ticket_setting = 'ticket_setting' - ticket_uri = 'ticket_uri' - ticket_uri_start_sales_time = 'ticket_uri_start_sales_time' - ticketing_privacy_uri = 'ticketing_privacy_uri' - ticketing_terms_uri = 'ticketing_terms_uri' - timezone = 'timezone' - type = 'type' - updated_time = 'updated_time' - - class Category: - classic_literature = 'CLASSIC_LITERATURE' - comedy = 'COMEDY' - crafts = 'CRAFTS' - dance = 'DANCE' - drinks = 'DRINKS' - fitness_and_workouts = 'FITNESS_AND_WORKOUTS' - foods = 'FOODS' - games = 'GAMES' - gardening = 'GARDENING' - healthy_living_and_self_care = 'HEALTHY_LIVING_AND_SELF_CARE' - health_and_medical = 'HEALTH_AND_MEDICAL' - home_and_garden = 'HOME_AND_GARDEN' - music_and_audio = 'MUSIC_AND_AUDIO' - parties = 'PARTIES' - professional_networking = 'PROFESSIONAL_NETWORKING' - religions = 'RELIGIONS' - shopping_event = 'SHOPPING_EVENT' - social_issues = 'SOCIAL_ISSUES' - sports = 'SPORTS' - theater = 'THEATER' - tv_and_movies = 'TV_AND_MOVIES' - visual_arts = 'VISUAL_ARTS' - - class OnlineEventFormat: - fb_live = 'fb_live' - messenger_room = 'messenger_room' - none = 'none' - other = 'other' - third_party = 'third_party' - - class Type: - community = 'community' - friends = 'friends' - group = 'group' - private = 'private' - public = 'public' - work_company = 'work_company' - - class EventStateFilter: - canceled = 'canceled' - draft = 'draft' - published = 'published' - scheduled_draft_for_publication = 'scheduled_draft_for_publication' - - class TimeFilter: - past = 'past' - upcoming = 'upcoming' - - 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=Event, - 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.nullnode import NullNode - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/comments', - 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 get_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/feed', - 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 get_live_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): - 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='/live_videos', - 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_live_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.livevideo import LiveVideo - param_types = { - 'content_tags': 'list', - 'description': 'string', - 'enable_backup_ingest': 'bool', - 'encoding_settings': 'string', - 'event_params': 'Object', - 'fisheye_video_cropped': 'bool', - 'front_z_rotation': 'float', - 'is_audio_only': 'bool', - 'is_spherical': 'bool', - 'original_fov': 'unsigned int', - 'privacy': 'string', - 'projection': 'projection_enum', - 'published': 'bool', - 'schedule_custom_profile_image': 'file', - 'spatial_audio_format': 'spatial_audio_format_enum', - 'status': 'status_enum', - 'stereoscopic_mode': 'stereoscopic_mode_enum', - 'stop_on_delete_stream': 'bool', - 'stream_type': 'stream_type_enum', - 'title': 'string', - } - enums = { - 'projection_enum': LiveVideo.Projection.__dict__.values(), - 'spatial_audio_format_enum': LiveVideo.SpatialAudioFormat.__dict__.values(), - 'status_enum': LiveVideo.Status.__dict__.values(), - 'stereoscopic_mode_enum': LiveVideo.StereoscopicMode.__dict__.values(), - 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/live_videos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideo, 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): - 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='/photos', - 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 get_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/picture', - 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 get_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.') - from facebook_business.adobjects.nullnode import NullNode - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/posts', - 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 get_roles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/roles', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_ticket_tiers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/ticket_tiers', - 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): - 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='/videos', - 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() - - _field_types = { - 'attending_count': 'int', - 'can_guests_invite': 'bool', - 'category': 'Category', - 'cover': 'CoverPhoto', - 'created_time': 'datetime', - 'declined_count': 'int', - 'description': 'string', - 'discount_code_enabled': 'bool', - 'end_time': 'string', - 'event_times': 'list', - 'guest_list_enabled': 'bool', - 'id': 'string', - 'interested_count': 'int', - 'is_canceled': 'bool', - 'is_draft': 'bool', - 'is_online': 'bool', - 'is_page_owned': 'bool', - 'maybe_count': 'int', - 'name': 'string', - 'noreply_count': 'int', - 'online_event_format': 'OnlineEventFormat', - 'online_event_third_party_url': 'string', - 'owner': 'Object', - 'parent_group': 'Group', - 'place': 'Place', - 'registration_setting': 'Object', - 'scheduled_publish_time': 'string', - 'start_time': 'string', - 'ticket_setting': 'Object', - 'ticket_uri': 'string', - 'ticket_uri_start_sales_time': 'string', - 'ticketing_privacy_uri': 'string', - 'ticketing_terms_uri': 'string', - 'timezone': 'string', - 'type': 'Type', - 'updated_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Category'] = Event.Category.__dict__.values() - field_enum_info['OnlineEventFormat'] = Event.OnlineEventFormat.__dict__.values() - field_enum_info['Type'] = Event.Type.__dict__.values() - field_enum_info['EventStateFilter'] = Event.EventStateFilter.__dict__.values() - field_enum_info['TimeFilter'] = Event.TimeFilter.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/eventsourcegroup.py b/tap_facebook/facebook_business/adobjects/eventsourcegroup.py deleted file mode 100644 index 6bc6d59..0000000 --- a/tap_facebook/facebook_business/adobjects/eventsourcegroup.py +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 EventSourceGroup( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isEventSourceGroup = True - super(EventSourceGroup, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - business = 'business' - event_sources = 'event_sources' - id = 'id' - name = 'name' - owner_business = 'owner_business' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'event_source_groups' - - # @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_event_source_group(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=EventSourceGroup, - 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 = { - 'event_sources': 'list', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=EventSourceGroup, - 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_shared_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='/shared_accounts', - 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 create_shared_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 = { - 'accounts': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/shared_accounts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=EventSourceGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=EventSourceGroup, 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', - 'event_sources': 'list', - 'id': 'string', - 'name': 'string', - 'owner_business': 'Business', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/experience.py b/tap_facebook/facebook_business/adobjects/experience.py deleted file mode 100644 index 872d6e9..0000000 --- a/tap_facebook/facebook_business/adobjects/experience.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Experience( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isExperience = True - super(Experience, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - description = 'description' - field_from = 'from' - id = 'id' - name = 'name' - field_with = 'with' - - _field_types = { - 'description': 'string', - 'from': 'Object', - 'id': 'string', - 'name': 'string', - 'with': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/extendedcredit.py b/tap_facebook/facebook_business/adobjects/extendedcredit.py deleted file mode 100644 index f931012..0000000 --- a/tap_facebook/facebook_business/adobjects/extendedcredit.py +++ /dev/null @@ -1,273 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ExtendedCredit( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isExtendedCredit = True - super(ExtendedCredit, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - allocated_amount = 'allocated_amount' - balance = 'balance' - credit_available = 'credit_available' - credit_type = 'credit_type' - id = 'id' - is_access_revoked = 'is_access_revoked' - is_automated_experience = 'is_automated_experience' - legal_entity_name = 'legal_entity_name' - liable_address = 'liable_address' - liable_biz_name = 'liable_biz_name' - max_balance = 'max_balance' - online_max_balance = 'online_max_balance' - owner_business = 'owner_business' - owner_business_name = 'owner_business_name' - partition_from = 'partition_from' - receiving_credit_allocation_config = 'receiving_credit_allocation_config' - send_bill_to_address = 'send_bill_to_address' - send_bill_to_biz_name = 'send_bill_to_biz_name' - sold_to_address = 'sold_to_address' - - 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=ExtendedCredit, - 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_extended_credit_invoice_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.extendedcreditinvoicegroup import ExtendedCreditInvoiceGroup - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/extended_credit_invoice_groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ExtendedCreditInvoiceGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=ExtendedCreditInvoiceGroup, 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_extended_credit_invoice_group(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.extendedcreditinvoicegroup import ExtendedCreditInvoiceGroup - param_types = { - 'emails': 'list', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/extended_credit_invoice_groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ExtendedCreditInvoiceGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=ExtendedCreditInvoiceGroup, 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_owning_credit_allocation_configs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.extendedcreditallocationconfig import ExtendedCreditAllocationConfig - param_types = { - 'receiving_business_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/owning_credit_allocation_configs', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ExtendedCreditAllocationConfig, - api_type='EDGE', - response_parser=ObjectParser(target_class=ExtendedCreditAllocationConfig, 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_owning_credit_allocation_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.') - from facebook_business.adobjects.extendedcreditallocationconfig import ExtendedCreditAllocationConfig - param_types = { - 'amount': 'Object', - 'liability_type': 'liability_type_enum', - 'partition_type': 'partition_type_enum', - 'receiving_business_id': 'string', - 'send_bill_to': 'send_bill_to_enum', - } - enums = { - 'liability_type_enum': ExtendedCreditAllocationConfig.LiabilityType.__dict__.values(), - 'partition_type_enum': ExtendedCreditAllocationConfig.PartitionType.__dict__.values(), - 'send_bill_to_enum': ExtendedCreditAllocationConfig.SendBillTo.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/owning_credit_allocation_configs', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ExtendedCreditAllocationConfig, - api_type='EDGE', - response_parser=ObjectParser(target_class=ExtendedCreditAllocationConfig, 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_whatsapp_credit_sharing_and_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.') - param_types = { - 'waba_currency': 'string', - 'waba_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/whatsapp_credit_sharing_and_attach', - 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 = { - 'allocated_amount': 'CurrencyAmount', - 'balance': 'CurrencyAmount', - 'credit_available': 'CurrencyAmount', - 'credit_type': 'string', - 'id': 'string', - 'is_access_revoked': 'bool', - 'is_automated_experience': 'bool', - 'legal_entity_name': 'string', - 'liable_address': 'CRMAddress', - 'liable_biz_name': 'string', - 'max_balance': 'CurrencyAmount', - 'online_max_balance': 'CurrencyAmount', - 'owner_business': 'Business', - 'owner_business_name': 'string', - 'partition_from': 'string', - 'receiving_credit_allocation_config': 'ExtendedCreditAllocationConfig', - 'send_bill_to_address': 'CRMAddress', - 'send_bill_to_biz_name': 'string', - 'sold_to_address': 'CRMAddress', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/extendedcreditallocationconfig.py b/tap_facebook/facebook_business/adobjects/extendedcreditallocationconfig.py deleted file mode 100644 index e640bd0..0000000 --- a/tap_facebook/facebook_business/adobjects/extendedcreditallocationconfig.py +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ExtendedCreditAllocationConfig( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isExtendedCreditAllocationConfig = True - super(ExtendedCreditAllocationConfig, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - currency_amount = 'currency_amount' - id = 'id' - liability_type = 'liability_type' - owning_business = 'owning_business' - owning_credential = 'owning_credential' - partition_type = 'partition_type' - receiving_business = 'receiving_business' - receiving_credential = 'receiving_credential' - request_status = 'request_status' - send_bill_to = 'send_bill_to' - - class LiabilityType: - msa = 'MSA' - normal = 'Normal' - sequential = 'Sequential' - - class PartitionType: - auth = 'AUTH' - fixed = 'FIXED' - fixed_without_partition = 'FIXED_WITHOUT_PARTITION' - - class SendBillTo: - advertiser = 'Advertiser' - agency = 'Agency' - - 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=ExtendedCreditAllocationConfig, - 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 = { - 'amount': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ExtendedCreditAllocationConfig, - 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_amount': 'CurrencyAmount', - 'id': 'string', - 'liability_type': 'string', - 'owning_business': 'Business', - 'owning_credential': 'ExtendedCredit', - 'partition_type': 'string', - 'receiving_business': 'Business', - 'receiving_credential': 'ExtendedCredit', - 'request_status': 'string', - 'send_bill_to': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['LiabilityType'] = ExtendedCreditAllocationConfig.LiabilityType.__dict__.values() - field_enum_info['PartitionType'] = ExtendedCreditAllocationConfig.PartitionType.__dict__.values() - field_enum_info['SendBillTo'] = ExtendedCreditAllocationConfig.SendBillTo.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/extendedcreditinvoicegroup.py b/tap_facebook/facebook_business/adobjects/extendedcreditinvoicegroup.py deleted file mode 100644 index cbb6493..0000000 --- a/tap_facebook/facebook_business/adobjects/extendedcreditinvoicegroup.py +++ /dev/null @@ -1,242 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ExtendedCreditInvoiceGroup( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isExtendedCreditInvoiceGroup = True - super(ExtendedCreditInvoiceGroup, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - auto_enroll = 'auto_enroll' - bill_to_address = 'bill_to_address' - customer_po_number = 'customer_po_number' - email = 'email' - emails = 'emails' - id = 'id' - liable_address = 'liable_address' - name = 'name' - sold_to_address = 'sold_to_address' - - 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=ExtendedCreditInvoiceGroup, - 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 = { - 'emails': 'list', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ExtendedCreditInvoiceGroup, - 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_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.') - param_types = { - 'ad_account_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/ad_accounts', - 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_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='/ad_accounts', - 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 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.') - from facebook_business.adobjects.adaccount import AdAccount - param_types = { - 'ad_account_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/ad_accounts', - 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 = { - 'auto_enroll': 'bool', - 'bill_to_address': 'CRMAddress', - 'customer_po_number': 'string', - 'email': 'Object', - 'emails': 'list', - 'id': 'string', - 'liable_address': 'CRMAddress', - 'name': 'string', - 'sold_to_address': 'CRMAddress', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/externaleventsource.py b/tap_facebook/facebook_business/adobjects/externaleventsource.py deleted file mode 100644 index ca0c984..0000000 --- a/tap_facebook/facebook_business/adobjects/externaleventsource.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ExternalEventSource( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isExternalEventSource = True - super(ExternalEventSource, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - name = 'name' - source_type = 'source_type' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'external_event_sources' - - _field_types = { - 'id': 'string', - 'name': 'string', - 'source_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/fameexportconfig.py b/tap_facebook/facebook_business/adobjects/fameexportconfig.py deleted file mode 100644 index 977c443..0000000 --- a/tap_facebook/facebook_business/adobjects/fameexportconfig.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/flexibletargeting.py b/tap_facebook/facebook_business/adobjects/flexibletargeting.py deleted file mode 100644 index 89cb680..0000000 --- a/tap_facebook/facebook_business/adobjects/flexibletargeting.py +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class FlexibleTargeting( - AbstractObject, -): - - def __init__(self, api=None): - super(FlexibleTargeting, self).__init__() - self._isFlexibleTargeting = True - self._api = api - - class Field(AbstractObject.Field): - behaviors = 'behaviors' - college_years = 'college_years' - connections = 'connections' - custom_audiences = 'custom_audiences' - education_majors = 'education_majors' - education_schools = 'education_schools' - education_statuses = 'education_statuses' - ethnic_affinity = 'ethnic_affinity' - family_statuses = 'family_statuses' - friends_of_connections = 'friends_of_connections' - generation = 'generation' - home_ownership = 'home_ownership' - home_type = 'home_type' - home_value = 'home_value' - household_composition = 'household_composition' - income = 'income' - industries = 'industries' - interested_in = 'interested_in' - interests = 'interests' - life_events = 'life_events' - moms = 'moms' - net_worth = 'net_worth' - office_type = 'office_type' - politics = 'politics' - relationship_statuses = 'relationship_statuses' - user_adclusters = 'user_adclusters' - work_employers = 'work_employers' - work_positions = 'work_positions' - - _field_types = { - 'behaviors': 'list', - 'college_years': 'list', - 'connections': 'list', - 'custom_audiences': 'list', - 'education_majors': 'list', - 'education_schools': 'list', - 'education_statuses': 'list', - 'ethnic_affinity': 'list', - 'family_statuses': 'list', - 'friends_of_connections': 'list', - 'generation': 'list', - 'home_ownership': 'list', - 'home_type': 'list', - 'home_value': 'list', - 'household_composition': 'list', - 'income': 'list', - 'industries': 'list', - 'interested_in': 'list', - 'interests': 'list', - 'life_events': 'list', - 'moms': 'list', - 'net_worth': 'list', - 'office_type': 'list', - 'politics': 'list', - 'relationship_statuses': 'list', - 'user_adclusters': 'list', - 'work_employers': 'list', - 'work_positions': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/flight.py b/tap_facebook/facebook_business/adobjects/flight.py deleted file mode 100644 index 0072291..0000000 --- a/tap_facebook/facebook_business/adobjects/flight.py +++ /dev/null @@ -1,251 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Flight( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isFlight = True - super(Flight, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - applinks = 'applinks' - category_specific_fields = 'category_specific_fields' - currency = 'currency' - description = 'description' - destination_airport = 'destination_airport' - destination_city = 'destination_city' - flight_id = 'flight_id' - id = 'id' - image_fetch_status = 'image_fetch_status' - images = 'images' - oneway_currency = 'oneway_currency' - oneway_price = 'oneway_price' - origin_airport = 'origin_airport' - origin_city = 'origin_city' - price = 'price' - sanitized_images = 'sanitized_images' - unit_price = 'unit_price' - 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=Flight, - 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 = { - 'currency': 'string', - 'description': 'string', - 'destination_airport': 'string', - 'destination_city': 'string', - 'images': 'list', - 'origin_airport': 'string', - 'origin_city': 'string', - 'price': 'unsigned int', - 'url': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Flight, - 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.') - 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=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_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 = { - 'applinks': 'CatalogItemAppLinks', - 'category_specific_fields': 'CatalogSubVerticalList', - 'currency': 'string', - 'description': 'string', - 'destination_airport': 'string', - 'destination_city': 'string', - 'flight_id': 'string', - 'id': 'string', - 'image_fetch_status': 'ImageFetchStatus', - 'images': 'list', - 'oneway_currency': 'string', - 'oneway_price': 'string', - 'origin_airport': 'string', - 'origin_city': 'string', - 'price': 'string', - 'sanitized_images': 'list', - 'unit_price': 'Object', - 'url': 'string', - 'visibility': 'Visibility', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ImageFetchStatus'] = Flight.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = Flight.Visibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/fundingsourcedetails.py b/tap_facebook/facebook_business/adobjects/fundingsourcedetails.py deleted file mode 100644 index 8509f02..0000000 --- a/tap_facebook/facebook_business/adobjects/fundingsourcedetails.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 FundingSourceDetails( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isFundingSourceDetails = True - super(FundingSourceDetails, self).__init__(fbid, parent_id, api) - - 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', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/fundingsourcedetailscoupon.py b/tap_facebook/facebook_business/adobjects/fundingsourcedetailscoupon.py deleted file mode 100644 index fc18926..0000000 --- a/tap_facebook/facebook_business/adobjects/fundingsourcedetailscoupon.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class FundingSourceDetailsCoupon( - AbstractObject, -): - - def __init__(self, api=None): - super(FundingSourceDetailsCoupon, self).__init__() - self._isFundingSourceDetailsCoupon = True - self._api = api - - 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', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/fundraiserpersontocharity.py b/tap_facebook/facebook_business/adobjects/fundraiserpersontocharity.py deleted file mode 100644 index 5c56fde..0000000 --- a/tap_facebook/facebook_business/adobjects/fundraiserpersontocharity.py +++ /dev/null @@ -1,280 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 FundraiserPersonToCharity( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isFundraiserPersonToCharity = True - super(FundraiserPersonToCharity, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - amount_raised = 'amount_raised' - charity_id = 'charity_id' - currency = 'currency' - description = 'description' - donations_count = 'donations_count' - donors_count = 'donors_count' - end_time = 'end_time' - external_amount_raised = 'external_amount_raised' - external_donations_count = 'external_donations_count' - external_donors_count = 'external_donors_count' - external_event_name = 'external_event_name' - external_event_start_time = 'external_event_start_time' - external_event_uri = 'external_event_uri' - external_fundraiser_uri = 'external_fundraiser_uri' - external_id = 'external_id' - goal_amount = 'goal_amount' - id = 'id' - internal_amount_raised = 'internal_amount_raised' - internal_donations_count = 'internal_donations_count' - internal_donors_count = 'internal_donors_count' - name = 'name' - uri = 'uri' - - class FundraiserType: - person_for_charity = 'person_for_charity' - - 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=FundraiserPersonToCharity, - 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 = { - 'description': 'string', - 'end_time': 'datetime', - 'external_event_name': 'string', - 'external_event_start_time': 'datetime', - 'external_event_uri': 'string', - 'external_fundraiser_uri': 'string', - 'external_id': 'string', - 'goal_amount': 'unsigned int', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=FundraiserPersonToCharity, - 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_donations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/donations', - 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_end_fundraiser(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/end_fundraiser', - 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_external_donations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/external_donations', - 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_external_donation(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'amount_received': 'unsigned int', - 'currency': 'string', - 'donation_id_hash': 'string', - 'donation_time': 'unsigned int', - 'donor_id_hash': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/external_donations', - 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 = { - 'amount_raised': 'int', - 'charity_id': 'string', - 'currency': 'string', - 'description': 'string', - 'donations_count': 'int', - 'donors_count': 'int', - 'end_time': 'datetime', - 'external_amount_raised': 'int', - 'external_donations_count': 'int', - 'external_donors_count': 'int', - 'external_event_name': 'string', - 'external_event_start_time': 'datetime', - 'external_event_uri': 'string', - 'external_fundraiser_uri': 'string', - 'external_id': 'string', - 'goal_amount': 'int', - 'id': 'string', - 'internal_amount_raised': 'int', - 'internal_donations_count': 'int', - 'internal_donors_count': 'int', - 'name': 'string', - 'uri': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['FundraiserType'] = FundraiserPersonToCharity.FundraiserType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/group.py b/tap_facebook/facebook_business/adobjects/group.py deleted file mode 100644 index 52b9475..0000000 --- a/tap_facebook/facebook_business/adobjects/group.py +++ /dev/null @@ -1,1175 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Group( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isGroup = True - super(Group, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - archived = 'archived' - cover = 'cover' - created_time = 'created_time' - description = 'description' - email = 'email' - icon = 'icon' - id = 'id' - install = 'install' - link = 'link' - member_count = 'member_count' - member_request_count = 'member_request_count' - name = 'name' - parent = 'parent' - permissions = 'permissions' - privacy = 'privacy' - purpose = 'purpose' - subdomain = 'subdomain' - updated_time = 'updated_time' - venue = 'venue' - - class JoinSetting: - admin_only = 'ADMIN_ONLY' - anyone = 'ANYONE' - none = 'NONE' - - class PostPermissions: - admin_only = 'ADMIN_ONLY' - anyone = 'ANYONE' - none = 'NONE' - - class Purpose: - casual = 'CASUAL' - coworkers = 'COWORKERS' - custom = 'CUSTOM' - for_sale = 'FOR_SALE' - for_work = 'FOR_WORK' - game = 'GAME' - health_support = 'HEALTH_SUPPORT' - jobs = 'JOBS' - learning = 'LEARNING' - none = 'NONE' - parenting = 'PARENTING' - streamer = 'STREAMER' - work_announcement = 'WORK_ANNOUNCEMENT' - work_demo_group = 'WORK_DEMO_GROUP' - work_discussion = 'WORK_DISCUSSION' - work_ephemeral = 'WORK_EPHEMERAL' - work_feedback = 'WORK_FEEDBACK' - work_for_sale = 'WORK_FOR_SALE' - work_garden = 'WORK_GARDEN' - work_integrity = 'WORK_INTEGRITY' - work_learning = 'WORK_LEARNING' - work_mentorship = 'WORK_MENTORSHIP' - work_multi_company = 'WORK_MULTI_COMPANY' - work_recruiting = 'WORK_RECRUITING' - work_social = 'WORK_SOCIAL' - work_stages = 'WORK_STAGES' - work_team = 'WORK_TEAM' - work_teamwork = 'WORK_TEAMWORK' - - class GroupType: - casual = 'CASUAL' - coworkers = 'COWORKERS' - custom = 'CUSTOM' - for_sale = 'FOR_SALE' - for_work = 'FOR_WORK' - game = 'GAME' - health_support = 'HEALTH_SUPPORT' - jobs = 'JOBS' - learning = 'LEARNING' - none = 'NONE' - parenting = 'PARENTING' - streamer = 'STREAMER' - work_announcement = 'WORK_ANNOUNCEMENT' - work_demo_group = 'WORK_DEMO_GROUP' - work_discussion = 'WORK_DISCUSSION' - work_ephemeral = 'WORK_EPHEMERAL' - work_feedback = 'WORK_FEEDBACK' - work_for_sale = 'WORK_FOR_SALE' - work_garden = 'WORK_GARDEN' - work_integrity = 'WORK_INTEGRITY' - work_learning = 'WORK_LEARNING' - work_mentorship = 'WORK_MENTORSHIP' - work_multi_company = 'WORK_MULTI_COMPANY' - work_recruiting = 'WORK_RECRUITING' - work_social = 'WORK_SOCIAL' - work_stages = 'WORK_STAGES' - work_team = 'WORK_TEAM' - work_teamwork = 'WORK_TEAMWORK' - - 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 = { - 'icon_size': 'icon_size_enum', - } - enums = { - 'icon_size_enum': [ - '16', - '34', - '50', - '68', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - 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 = { - 'cover': 'string', - 'cover_url': 'string', - 'description': 'string', - 'focus_x': 'float', - 'focus_y': 'float', - 'group_icon': 'string', - 'is_official_group': 'bool', - 'join_setting': 'join_setting_enum', - 'name': 'string', - 'no_feed_story': 'bool', - 'offset_y': 'int', - 'post_permissions': 'post_permissions_enum', - 'post_requires_admin_approval': 'bool', - 'privacy': 'string', - 'purpose': 'purpose_enum', - 'update_view_time': 'bool', - } - enums = { - 'join_setting_enum': Group.JoinSetting.__dict__.values(), - 'post_permissions_enum': Group.PostPermissions.__dict__.values(), - 'purpose_enum': Group.Purpose.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - 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_admins(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'uid': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/admins', - 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_admin(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'uid': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/admins', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - api_type='EDGE', - response_parser=ObjectParser(target_class=Group, 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_albums(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.album import Album - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/albums', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Album, - api_type='EDGE', - response_parser=ObjectParser(target_class=Album, 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_album(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.album import Album - param_types = { - 'contributors': 'list', - 'description': 'string', - 'is_default': 'bool', - 'location': 'string', - 'make_shared_album': 'bool', - 'message': 'string', - 'name': 'string', - 'place': 'Object', - 'privacy': 'string', - 'session_id': 'string', - 'tags': 'list', - 'visible': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/albums', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Album, - api_type='EDGE', - response_parser=ObjectParser(target_class=Album, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/docs', - 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_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.event import Event - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/events', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Event, - api_type='EDGE', - response_parser=ObjectParser(target_class=Event, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.post import Post - param_types = { - 'include_hidden': 'bool', - 'q': 'string', - 'show_expired': 'bool', - 'since': 'datetime', - 'until': 'datetime', - 'with': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/feed', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - api_type='EDGE', - response_parser=ObjectParser(target_class=Post, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.post import Post - param_types = { - 'actions': 'Object', - 'adaptive_type': 'string', - 'album_id': 'string', - 'android_key_hash': 'string', - 'animated_effect_id': 'unsigned int', - 'application_id': 'string', - 'asked_fun_fact_prompt_id': 'unsigned int', - 'asset3d_id': 'unsigned int', - 'associated_id': 'string', - 'attach_place_suggestion': 'bool', - 'attached_media': 'list', - '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', - 'child_attachments': 'list', - 'client_mutation_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', - 'connection_class': 'string', - 'content_attachment': 'string', - 'coordinates': 'Object', - 'cta_link': 'string', - 'cta_type': 'string', - 'description': 'string', - 'direct_share_status': 'unsigned int', - 'expanded_height': 'unsigned int', - 'expanded_width': 'unsigned int', - 'feed_targeting': 'Object', - 'formatting': 'formatting_enum', - 'fun_fact_prompt_id': 'unsigned int', - 'fun_fact_toastee_id': 'unsigned int', - 'height': 'unsigned int', - 'holiday_card': 'string', - 'home_checkin_city_id': 'Object', - 'image_crops': 'map', - 'implicit_with_tags': 'list', - 'instant_game_entry_point_data': 'string', - 'ios_bundle_id': 'string', - 'is_backout_draft': 'bool', - 'is_boost_intended': 'bool', - 'is_explicit_location': 'bool', - 'is_explicit_share': 'bool', - 'is_group_linking_post': 'bool', - 'is_photo_container': 'bool', - 'link': 'string', - 'location_source_id': 'string', - 'manual_privacy': 'bool', - 'message': 'string', - 'multi_share_end_card': 'bool', - 'multi_share_optimized': 'bool', - 'name': 'string', - 'nectar_module': 'string', - 'object_attachment': 'string', - 'offer_like_post_id': 'unsigned int', - 'og_action_type_id': 'string', - 'og_hide_object_attachment': 'bool', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'page_recommendation': 'string', - 'picture': 'string', - 'place': 'Object', - 'place_attachment_setting': 'place_attachment_setting_enum', - 'place_list': 'string', - 'place_list_data': 'list', - 'post_surfaces_blacklist': 'list', - 'posting_to_redspace': 'posting_to_redspace_enum', - 'privacy': 'string', - 'prompt_id': 'string', - 'prompt_tracking_string': 'string', - 'properties': 'Object', - 'proxied_app_id': 'string', - 'publish_event_id': 'unsigned int', - 'published': 'bool', - 'quote': 'string', - 'react_mode_metadata': 'string', - 'ref': 'list', - 'referenceable_image_ids': 'list', - 'referral_id': 'string', - 'scheduled_publish_time': 'datetime', - 'source': 'string', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'suggested_place_id': 'Object', - 'tags': 'list', - 'target_surface': 'target_surface_enum', - 'targeting': 'Object', - 'text_format_metadata': 'string', - 'text_format_preset_id': 'string', - 'text_only_place': 'string', - 'throwback_camera_roll_media': 'string', - 'thumbnail': 'file', - 'time_since_original_post': 'unsigned int', - 'title': 'string', - 'tracking_info': 'string', - 'unpublished_content_type': 'unpublished_content_type_enum', - 'user_selected_tags': 'bool', - 'video_start_time_ms': 'unsigned int', - 'viewer_coordinates': 'Object', - 'width': 'unsigned int', - } - enums = { - 'backdated_time_granularity_enum': Post.BackdatedTimeGranularity.__dict__.values(), - 'formatting_enum': Post.Formatting.__dict__.values(), - 'place_attachment_setting_enum': Post.PlaceAttachmentSetting.__dict__.values(), - 'post_surfaces_blacklist_enum': Post.PostSurfacesBlacklist.__dict__.values(), - 'posting_to_redspace_enum': Post.PostingToRedspace.__dict__.values(), - 'target_surface_enum': Post.TargetSurface.__dict__.values(), - 'unpublished_content_type_enum': Post.UnpublishedContentType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/feed', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - api_type='EDGE', - response_parser=ObjectParser(target_class=Post, 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_files(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/files', - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - api_type='EDGE', - response_parser=ObjectParser(target_class=Group, 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_group(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'admin': 'int', - 'description': 'string', - 'group_icon_id': 'string', - 'group_type': 'group_type_enum', - 'join_setting': 'join_setting_enum', - 'name': 'string', - 'parent_id': 'string', - 'post_permissions': 'post_permissions_enum', - 'post_requires_admin_approval': 'bool', - 'privacy': 'string', - 'ref': 'string', - } - enums = { - 'group_type_enum': Group.GroupType.__dict__.values(), - 'join_setting_enum': Group.JoinSetting.__dict__.values(), - 'post_permissions_enum': Group.PostPermissions.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - api_type='EDGE', - response_parser=ObjectParser(target_class=Group, 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_live_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.livevideo import LiveVideo - param_types = { - 'broadcast_status': 'list', - 'source': 'source_enum', - } - enums = { - 'broadcast_status_enum': LiveVideo.BroadcastStatus.__dict__.values(), - 'source_enum': LiveVideo.Source.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/live_videos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideo, 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_live_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.livevideo import LiveVideo - param_types = { - 'content_tags': 'list', - 'description': 'string', - 'enable_backup_ingest': 'bool', - 'encoding_settings': 'string', - 'event_params': 'Object', - 'fisheye_video_cropped': 'bool', - 'front_z_rotation': 'float', - 'is_audio_only': 'bool', - 'is_spherical': 'bool', - 'original_fov': 'unsigned int', - 'privacy': 'string', - 'projection': 'projection_enum', - 'published': 'bool', - 'schedule_custom_profile_image': 'file', - 'spatial_audio_format': 'spatial_audio_format_enum', - 'status': 'status_enum', - 'stereoscopic_mode': 'stereoscopic_mode_enum', - 'stop_on_delete_stream': 'bool', - 'stream_type': 'stream_type_enum', - 'title': 'string', - } - enums = { - 'projection_enum': LiveVideo.Projection.__dict__.values(), - 'spatial_audio_format_enum': LiveVideo.SpatialAudioFormat.__dict__.values(), - 'status_enum': LiveVideo.Status.__dict__.values(), - 'stereoscopic_mode_enum': LiveVideo.StereoscopicMode.__dict__.values(), - 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/live_videos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideo, 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_members(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'email': 'string', - 'member': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/members', - 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_member(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'email': 'string', - 'from': 'int', - 'member': 'int', - 'rate': 'unsigned int', - 'source': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/members', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - api_type='EDGE', - response_parser=ObjectParser(target_class=Group, 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_opted_in_members(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/opted_in_members', - 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() - - def create_photo(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.photo import Photo - param_types = { - 'aid': 'string', - 'allow_spherical_photo': 'bool', - 'alt_text_custom': 'string', - 'android_key_hash': 'string', - 'application_id': 'string', - 'attempt': 'unsigned int', - 'audience_exp': 'bool', - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'backdated_time_granularity_enum', - 'caption': 'string', - 'composer_session_id': 'string', - 'direct_share_status': 'unsigned int', - 'feed_targeting': 'Object', - 'filter_type': 'unsigned int', - 'full_res_is_coming_later': 'bool', - 'initial_view_heading_override_degrees': 'unsigned int', - 'initial_view_pitch_override_degrees': 'unsigned int', - 'initial_view_vertical_fov_override_degrees': 'unsigned int', - 'ios_bundle_id': 'string', - 'is_explicit_location': 'bool', - 'is_explicit_place': 'bool', - 'manual_privacy': 'bool', - 'message': 'string', - 'name': 'string', - 'no_story': 'bool', - 'offline_id': 'unsigned int', - 'og_action_type_id': 'string', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'place': 'Object', - 'privacy': 'string', - 'profile_id': 'int', - 'proxied_app_id': 'string', - 'published': 'bool', - 'qn': 'string', - 'spherical_metadata': 'map', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'tags': 'list', - 'target_id': 'int', - 'targeting': 'Object', - 'time_since_original_post': 'unsigned int', - 'uid': 'int', - 'unpublished_content_type': 'unpublished_content_type_enum', - 'url': 'string', - 'user_selected_tags': 'bool', - 'vault_image_id': 'string', - } - enums = { - 'backdated_time_granularity_enum': Photo.BackdatedTimeGranularity.__dict__.values(), - 'unpublished_content_type_enum': Photo.UnpublishedContentType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/photos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Photo, - api_type='EDGE', - response_parser=ObjectParser(target_class=Photo, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profilepicturesource import ProfilePictureSource - param_types = { - 'height': 'int', - 'redirect': 'bool', - 'type': 'type_enum', - 'width': 'int', - } - enums = { - 'type_enum': ProfilePictureSource.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/picture', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProfilePictureSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProfilePictureSource, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.advideo import AdVideo - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': AdVideo.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - 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) - - if batch is 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 = { - 'adaptive_type': 'string', - 'animated_effect_id': 'unsigned int', - 'application_id': 'string', - 'asked_fun_fact_prompt_id': 'unsigned int', - 'audio_story_wave_animation_handle': '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_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_explicit_share': 'bool', - 'is_group_linking_post': 'bool', - 'is_voice_clip': 'bool', - 'location_source_id': 'string', - 'manual_privacy': 'bool', - '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', - 'published': 'bool', - 'react_mode_metadata': 'string', - 'referenced_sticker_id': 'string', - 'replace_video_id': 'string', - 'scheduled_publish_time': 'unsigned int', - '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', - '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(), - } - 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) - - if batch is 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 = { - 'archived': 'bool', - 'cover': 'CoverPhoto', - 'created_time': 'datetime', - 'description': 'string', - 'email': 'string', - 'icon': 'string', - 'id': 'string', - 'install': 'Object', - 'link': 'string', - 'member_count': 'unsigned int', - 'member_request_count': 'unsigned int', - 'name': 'string', - 'parent': 'Object', - 'permissions': 'list', - 'privacy': 'string', - 'purpose': 'string', - 'subdomain': 'string', - 'updated_time': 'datetime', - 'venue': 'Location', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['JoinSetting'] = Group.JoinSetting.__dict__.values() - field_enum_info['PostPermissions'] = Group.PostPermissions.__dict__.values() - field_enum_info['Purpose'] = Group.Purpose.__dict__.values() - field_enum_info['GroupType'] = Group.GroupType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/hasleadaccess.py b/tap_facebook/facebook_business/adobjects/hasleadaccess.py deleted file mode 100644 index 5d8a6c4..0000000 --- a/tap_facebook/facebook_business/adobjects/hasleadaccess.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/helpers/__init__.py b/tap_facebook/facebook_business/adobjects/helpers/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tap_facebook/facebook_business/adobjects/helpers/adaccountmixin.py b/tap_facebook/facebook_business/adobjects/helpers/adaccountmixin.py deleted file mode 100644 index f891465..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/adaccountmixin.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This 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 - -class AdAccountMixin: - class AccountStatus(object): - active = 1 - disabled = 2 - in_grace_period = 9 - pending_closure = 100 - pending_review = 7 - temporarily_unavailable = 101 - unsettled = 3 - - class AgencyClientDeclaration(agencyclientdeclaration.AgencyClientDeclaration.Field): - pass - - class Capabilities(object): - bulk_account = 'BULK_ACCOUNT' - can_use_reach_and_frequency = 'CAN_USE_REACH_AND_FREQUENCY' - direct_sales = 'DIRECT_SALES' - view_tags = 'VIEW_TAGS' - - class TaxIdStatus(object): - account_is_personal = 5 - offline_vat_validation_failed = 4 - unknown = 0 - vat_information_required = 3 - vat_not_required = 1 - - @classmethod - def get_my_account(cls, api=None): - from facebook_business.adobjects.adaccountuser import AdAccountUser - """Returns first AdAccount associated with 'me' given api instance.""" - # Setup user and read the object from the server - me = AdAccountUser(fbid='me', api=api) - - # Get first account connected to the user - return me.edge_object(cls) - - def opt_out_user_from_targeting(self, - schema, - users, - is_raw=False, - app_ids=None, - pre_hashed=None): - from facebook_business.adobjects.customaudience import CustomAudience - """Opts out users from being targeted by this ad account. - - Args: - schema: A CustomAudience.Schema value - users: a list of identites that follow the schema given - - Returns: - Return FacebookResponse object - """ - return self.get_api_assured().call( - 'DELETE', - (self.get_id_assured(), 'usersofanyaudience'), - params=CustomAudience.format_params(schema, - users, - is_raw, - app_ids, - pre_hashed), - ) diff --git a/tap_facebook/facebook_business/adobjects/helpers/adaccountusermixin.py b/tap_facebook/facebook_business/adobjects/helpers/adaccountusermixin.py deleted file mode 100644 index 6021ded..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/adaccountusermixin.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This 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 -from facebook_business.adobjects.objectparser import ObjectParser -from facebook_business.api import FacebookRequest -from facebook_business.typechecker import TypeChecker - -class AdAccountUserMixin: - - class Field(object): - id = 'id' - name = 'name' - permissions = 'permissions' - role = 'role' - class Permission(object): - account_admin = 1 - admanager_read = 2 - admanager_write = 3 - billing_read = 4 - billing_write = 5 - reports = 7 - - class Role(object): - administrator = 1001 - analyst = 1003 - manager = 1002 - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'users' - - def get_ad_accounts(self, fields=None, params=None): - """Returns iterator over AdAccounts associated with this user.""" - return self.iterate_edge(AdAccount, fields, params, endpoint='adaccounts') - - def get_ad_account(self, fields=None, params=None): - """Returns first AdAccount associated with this user.""" - return self.edge_object(AdAccount, fields, params) - - def get_pages(self, fields=None, params=None): - """Returns iterator over Pages's associated with this user.""" - return self.iterate_edge(Page, fields, params) diff --git a/tap_facebook/facebook_business/adobjects/helpers/adimagemixin.py b/tap_facebook/facebook_business/adobjects/helpers/adimagemixin.py deleted file mode 100644 index 4269224..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/adimagemixin.py +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This 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 -from facebook_business.exceptions import FacebookBadObjectError -from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject - -class AdImageMixin: - @classmethod - def remote_create_from_zip(cls, filename, parent_id, api=None): - api = api or FacebookAdsApi.get_default_api() - with open(filename, 'rb') as open_file: - response = api.call( - 'POST', - (parent_id, cls.get_endpoint()), - files={filename: open_file}, - ) - data = response.json() - - objs = [] - for image_filename in data['images']: - image = cls(parent_id=parent_id) - image.update(data['images'][image_filename]) - image[cls.Field.id] = '%s:%s' % ( - parent_id[4:], - data['images'][image_filename][cls.Field.hash], - ) - objs.append(image) - - return objs - - def get_node_path(self): - return (self.get_parent_id_assured(), self.get_endpoint()) - - def _set_data(self, data): - """ - `data` may have a different structure depending if you're creating - new AdImages or iterating over existing ones using something like - AdAccount.get_ad_images(). - While reading existing images, _set_data from AbstractCrudObject - handles everything correctly, but we need to treat the - remote_create case. - remote_create sample response: - { - "images": { - "8cf726a44ab7008c5cc6b4ebd2491234": { - "hash":"8cf726a44ab7008c5cc6b4ebd2491234", - "url":"https://fbcdn-photos-a.akamaihd.net/..." - } - } - } - Sample response when calling act_/adimages, used internally - by AdAccount.get_ad_images(): - { - "data": [ - { - "hash": "181b88e3cdf6464af7ed52fe488fe559", - "id": "1739564149602806:181b88e3cdf6464af7ed52fe488fe559" - } - ], - "paging": { - "cursors": { - "before": "MTczOTU2NDE0OTYwMjgwNjoxODFiODh==", - "after": "MTczOTU2NDE0OTYwMjgwNjoxODFiODhl==" - } - } - } - """ - - if 'images' not in data: - return AbstractCrudObject._set_data(self, data) - - _, data = data['images'].popitem() - - for key in map(str, data): - self._data[key] = data[key] - - # clear history due to the update - self._changes.pop(key, None) - - self._data[self.Field.id] = '%s:%s' % ( - self.get_parent_id_assured()[4:], - self[self.Field.hash], - ) - - return self - - def remote_create( - self, - batch=None, - failure=None, - files=None, - params=None, - success=None, - api_version=None, - ): - """Uploads filename and creates the AdImage object from it. - It has same arguments as AbstractCrudObject.remote_create except it - does not have the files argument but requires the 'filename' property - to be defined. - """ - if not self[self.Field.filename]: - raise FacebookBadObjectError( - "AdImage required a filename to be defined.", - ) - filename = self[self.Field.filename] - with open(filename, 'rb') as open_file: - return_val = AbstractCrudObject.remote_create( - self, - files={filename: open_file}, - batch=batch, - failure=failure, - params=params, - success=success, - api_version=api_version, - ) - return return_val - - def get_hash(self): - """Returns the image hash to which AdCreative's can refer.""" - return self[self.Field.hash] - - def remote_read( - self, - batch=None, - failure=None, - fields=None, - params=None, - success=None, - api_version=None, - ): - if self[self.__class__.Field.id]: - _, image_hash = self[self.__class__.Field.id].split(':') - account = AdAccount(fbid=self.get_parent_id_assured()) - params = { - 'hashes': [ - image_hash, - ], - } - images = account.get_ad_images(fields=fields, params=params) - if images: - self._set_data(images[0]._data) diff --git a/tap_facebook/facebook_business/adobjects/helpers/adpreviewmixin.py b/tap_facebook/facebook_business/adobjects/helpers/adpreviewmixin.py deleted file mode 100644 index b292d1f..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/adpreviewmixin.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 AdPreviewMixin: - def get_html(self): - """Returns the preview html.""" - return self[self.Field.body] diff --git a/tap_facebook/facebook_business/adobjects/helpers/adreportrunmixin.py b/tap_facebook/facebook_business/adobjects/helpers/adreportrunmixin.py deleted file mode 100644 index c9a70ab..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/adreportrunmixin.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 AdReportRunMixin: - - def get_result(self, fields=None, params=None): - """ - Gets the final result from an async job - Accepts params such as limit - """ - return self.get_insights(fields=fields, params=params) - - def __nonzero__(self): - return self[self.Field.async_percent_completion] == 100 - - def _setitem_trigger(self, key, value): - if key == 'report_run_id': - self._data['id'] = self['report_run_id'] diff --git a/tap_facebook/facebook_business/adobjects/helpers/adsinsightsmixin.py b/tap_facebook/facebook_business/adobjects/helpers/adsinsightsmixin.py deleted file mode 100644 index 2eab923..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/adsinsightsmixin.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 AdsInsightsMixin: - - class Increment(object): - monthly = 'monthly' - all_days = 'all_days' - - class Operator(object): - all = 'ALL' - any = 'ANY' - contain = 'CONTAIN' - equal = 'EQUAL' - greater_than = 'GREATER_THAN' - greater_than_or_equal = 'GREATER_THAN_OR_EQUAL' - in_ = 'IN' - in_range = 'IN_RANGE' - less_than = 'LESS_THAN' - less_than_or_equal = 'LESS_THAN_OR_EQUAL' - none = 'NONE' - not_contain = 'NOT_CONTAIN' - not_equal = 'NOT_EQUAL' - not_in = 'NOT_IN' - not_in_range = 'NOT_IN_RANGE' diff --git a/tap_facebook/facebook_business/adobjects/helpers/businessmixin.py b/tap_facebook/facebook_business/adobjects/helpers/businessmixin.py deleted file mode 100644 index bd2bc93..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/businessmixin.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This 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 - -class BusinessMixin: - - def get_insights(self, fields=None, params=None, is_async=False): - return self.iterate_edge_async( - AdsInsights, - fields, - params, - is_async, - include_summary=False, - ) diff --git a/tap_facebook/facebook_business/adobjects/helpers/customaudiencemixin.py b/tap_facebook/facebook_business/adobjects/helpers/customaudiencemixin.py deleted file mode 100644 index b34946b..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/customaudiencemixin.py +++ /dev/null @@ -1,257 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# 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 - -import hashlib -import six -import re - -class CustomAudienceMixin: - - class Schema(object): - uid = 'UID' - email_hash = 'EMAIL_SHA256' - phone_hash = 'PHONE_SHA256' - mobile_advertiser_id = 'MOBILE_ADVERTISER_ID' - - class MultiKeySchema(object): - extern_id = 'EXTERN_ID' - email = 'EMAIL' - phone = 'PHONE' - gen = 'GEN' - doby = 'DOBY' - dobm = 'DOBM' - dobd = 'DOBD' - ln = 'LN' - fn = 'FN' - fi = 'FI' - ct = 'CT' - st = 'ST' - zip = 'ZIP' - madid = 'MADID' - country = 'COUNTRY' - appuid = 'APPUID' - - @classmethod - def format_params(cls, - schema, - users, - is_raw=False, - app_ids=None, - pre_hashed=None, - session=None): - hashed_users = [] - if schema in (cls.Schema.phone_hash, - cls.Schema.email_hash, - cls.Schema.mobile_advertiser_id): - for user in users: - if schema == cls.Schema.email_hash: - user = user.strip(" \t\r\n\0\x0B.").lower() - if isinstance(user, six.text_type) and not(pre_hashed) and schema != cls.Schema.mobile_advertiser_id: - user = user.encode('utf8') # required for hashlib - # for mobile_advertiser_id, don't hash it - if pre_hashed or schema == cls.Schema.mobile_advertiser_id: - hashed_users.append(user) - else: - hashed_users.append(hashlib.sha256(user).hexdigest()) - elif isinstance(schema, list): - # SDK will support only single PII - if not is_raw: - raise FacebookBadObjectError( - "Please send single PIIs i.e. is_raw should be true. " + - "The combining of the keys will be done internally.", - ) - # users is array of array - for user in users: - if len(schema) != len(user): - raise FacebookBadObjectError( - "Number of keys in each list in the data should " + - "match the number of keys specified in scheme", - ) - break - - # If the keys are already hashed then send as it is - if pre_hashed: - hashed_users.append(user) - else: - counter = 0 - hashed_user = [] - for key in user: - key = key.strip(" \t\r\n\0\x0B.").lower() - key = cls.normalize_key(schema[counter], - str(key)) - if schema[counter] != \ - cls.Schema.MultiKeySchema.extern_id: - if isinstance(key, six.text_type): - key = key.encode('utf8') - key = hashlib.sha256(key).hexdigest() - counter = counter + 1 - hashed_user.append(key) - hashed_users.append(hashed_user) - - payload = { - 'schema': schema, - 'is_raw': is_raw, - 'data': hashed_users or users, - } - - if schema == cls.Schema.uid: - if not app_ids: - raise FacebookBadObjectError( - "Custom Audiences with type " + cls.Schema.uid + - "require at least one app_id", - ) - - if app_ids: - payload['app_ids'] = app_ids - - params = { - 'payload': payload, - } - if session: - params['session'] = session - return params - - @classmethod - def normalize_key(cls, key_name, key_value=None): - """ - Normalize the value based on the key - """ - if key_value is None: - return key_value - - if(key_name == cls.Schema.MultiKeySchema.extern_id or - key_name == cls.Schema.MultiKeySchema.email or - key_name == cls.Schema.MultiKeySchema.madid or - key_name == cls.Schema.MultiKeySchema.appuid): - return key_value - - if(key_name == cls.Schema.MultiKeySchema.phone): - key_value = re.sub(r'[^0-9]', '', key_value) - return key_value - - if(key_name == cls.Schema.MultiKeySchema.gen): - key_value = key_value.strip()[:1] - return key_value - - if(key_name == cls.Schema.MultiKeySchema.doby): - key_value = re.sub(r'[^0-9]', '', key_value) - return key_value - - if(key_name == cls.Schema.MultiKeySchema.dobm or - key_name == cls.Schema.MultiKeySchema.dobd): - - key_value = re.sub(r'[^0-9]', '', key_value) - if len(key_value) == 1: - key_value = '0' + key_value - return key_value - - if(key_name == cls.Schema.MultiKeySchema.ln or - key_name == cls.Schema.MultiKeySchema.fn or - key_name == cls.Schema.MultiKeySchema.ct or - key_name == cls.Schema.MultiKeySchema.fi or - key_name == cls.Schema.MultiKeySchema.st): - key_value = re.sub(r'[^a-zA-Z]', '', key_value) - return key_value - - if(key_name == cls.Schema.MultiKeySchema.zip): - key_value = re.split('-', key_value)[0] - return key_value - - if(key_name == cls.Schema.MultiKeySchema.country): - key_value = re.sub(r'[^a-zA-Z]', '', key_value)[:2] - return key_value - - def add_users(self, - schema, - users, - is_raw=False, - app_ids=None, - pre_hashed=None, - session=None): - """Adds users to this CustomAudience. - - Args: - schema: A CustomAudience.Schema value specifying the type of values - in the users list. - users: A list of identities respecting the schema specified. - - Returns: - The FacebookResponse object. - """ - return self.get_api_assured().call( - 'POST', - (self.get_id_assured(), 'users'), - params=self.format_params( - schema, - users, - is_raw, - app_ids, - pre_hashed, - session, - ), - ) - - def remove_users(self, - schema, - users, - is_raw=False, - app_ids=None, - pre_hashed=None, - session=None): - """Deletes users from this CustomAudience. - - Args: - schema: A CustomAudience.Schema value specifying the type of values - in the users list. - users: A list of identities respecting the schema specified. - - Returns: - The FacebookResponse object. - """ - return self.get_api_assured().call( - 'DELETE', - (self.get_id_assured(), 'users'), - params=self.format_params( - schema, - users, - is_raw, - app_ids, - pre_hashed, - session, - ), - ) - - def share_audience(self, account_ids): - """Shares this CustomAudience with the specified account_ids. - - Args: - account_ids: A list of account ids. - - Returns: - The FacebookResponse object. - """ - return self.get_api_assured().call( - 'POST', - (self.get_id_assured(), 'adaccounts'), - params={'adaccounts': account_ids}, - ) - - def unshare_audience(self, account_ids): - """Unshares this CustomAudience with the specified account_ids. - - Args: - account_ids: A list of account ids. - - Returns: - The FacebookResponse object. - """ - return self.get_api_assured().call( - 'DELETE', - (self.get_id_assured(), 'adaccounts'), - params={'adaccounts': account_ids}, - ) diff --git a/tap_facebook/facebook_business/adobjects/helpers/productcatalogmixin.py b/tap_facebook/facebook_business/adobjects/helpers/productcatalogmixin.py deleted file mode 100644 index 77f7f58..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/productcatalogmixin.py +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 -from facebook_business.session import FacebookSession -from facebook_business.exceptions import FacebookError - -class ProductCatalogMixin: - - class Role(object): - admin = 'ADMIN' - - class Availability(object): - available_for_order = 'available for order' - in_stock = 'in stock' - out_of_stock = 'out of stock' - preorder = 'preorder' - - class AgeGroup(object): - adult = 'adult' - infant = 'infant' - kids = 'kids' - newborn = 'newborn' - toddler = 'toddler' - - class Gender(object): - men = 'men' - women = 'women' - unisex = 'unisex' - - class Condition(object): - new = 'new' - refurbished = 'refurbished' - used = 'used' - - def add_user(self, user, role): - params = { - 'user': user, - 'role': role, - } - return self.get_api_assured().call( - 'POST', - (self.get_id_assured(), 'userpermissions'), - params=params, - ) - - def remove_user(self, user): - params = { - 'user': user, - } - return self.get_api_assured().call( - 'DELETE', - (self.get_id_assured(), 'userpermissions'), - params=params, - ) - - def add_external_event_sources(self, pixel_ids): - params = { - 'external_event_sources': pixel_ids, - } - return self.get_api_assured().call( - 'POST', - (self.get_id_assured(), 'external_event_sources'), - params=params, - ) - - def remove_external_event_sources(self, pixel_ids): - params = { - 'external_event_sources': pixel_ids, - } - return self.get_api_assured().call( - 'DELETE', - (self.get_id_assured(), 'external_event_sources'), - params=params, - ) - - def update_product(self, retailer_id, **kwargs): - """Updates a product stored in a product catalog - - Args: - retailer_id: product id from product feed. g:price tag in Google - Shopping feed - kwargs: key-value pairs to update on the object, being key the - field name and value the updated value - - Returns: - The FacebookResponse object. - """ - if not kwargs: - raise FacebookError( - """No fields to update provided. Example: - catalog = ProductCatalog('catalog_id') - catalog.update_product( - retailer_id, - price=100, - availability=Product.Availability.out_of_stock - ) - """, - ) - - product_endpoint = ':'.join(( - 'catalog', - self.get_id_assured(), - self.b64_encoded_id(retailer_id), - )) - - url = '/'.join(( - FacebookSession.GRAPH, - FacebookAdsApi.API_VERSION, - product_endpoint, - )) - - return self.get_api_assured().call( - 'POST', - url, - params=kwargs, - ) - - def b64_encoded_id(self, retailer_id): - # # we need a byte string for base64.b64encode argument - b64_id = base64.urlsafe_b64encode(retailer_id.encode('utf8')) - - # and we need a str to join with other url snippets - return b64_id.decode('utf8') diff --git a/tap_facebook/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py b/tap_facebook/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py deleted file mode 100644 index b73c0f8..0000000 --- a/tap_facebook/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 ReachFrequencyPredictionMixin: - def reserve( - self, - prediction_to_release=None, - reach=None, - budget=None, - impression=None, - ): - params = { - self.Field.prediction_id: self.get_id_assured(), - self.Field.prediction_id_to_release: prediction_to_release, - self.Field.budget: budget, - self.Field.reach: reach, - self.Field.impression: impression, - self.Field.action: self.Action.reserve, - } - # Filter out None values. - params = {k: v for k, v in params.items() if v is not None} - - response = self.get_api_assured().call( - 'POST', - (self.get_parent_id_assured(), self.get_endpoint()), - params=params, - ) - - return self.__class__(response.body(), self.get_parent_id_assured()) - - def cancel(self): - params = { - self.Field.prediction_id: self.get_id_assured(), - self.Field.action: self.Action.cancel, - } - self.get_api_assured().call( - 'POST', - (self.get_parent_id_assured(), self.get_endpoint()), - params=params, - ) - return self diff --git a/tap_facebook/facebook_business/adobjects/highdemandperiod.py b/tap_facebook/facebook_business/adobjects/highdemandperiod.py deleted file mode 100644 index e4c4e8f..0000000 --- a/tap_facebook/facebook_business/adobjects/highdemandperiod.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py b/tap_facebook/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py deleted file mode 100644 index 369b1dc..0000000 --- a/tap_facebook/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/homelisting.py b/tap_facebook/facebook_business/adobjects/homelisting.py deleted file mode 100644 index 2096480..0000000 --- a/tap_facebook/facebook_business/adobjects/homelisting.py +++ /dev/null @@ -1,350 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 HomeListing( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isHomeListing = True - super(HomeListing, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ac_type = 'ac_type' - additional_fees_description = 'additional_fees_description' - address = 'address' - agent_company = 'agent_company' - agent_email = 'agent_email' - agent_fb_page_id = 'agent_fb_page_id' - agent_name = 'agent_name' - agent_phone = 'agent_phone' - applinks = 'applinks' - area_size = 'area_size' - area_unit = 'area_unit' - availability = 'availability' - category_specific_fields = 'category_specific_fields' - co_2_emission_rating_eu = 'co_2_emission_rating_eu' - currency = 'currency' - days_on_market = 'days_on_market' - description = 'description' - energy_rating_eu = 'energy_rating_eu' - furnish_type = 'furnish_type' - group_id = 'group_id' - heating_type = 'heating_type' - home_listing_id = 'home_listing_id' - id = 'id' - image_fetch_status = 'image_fetch_status' - images = 'images' - laundry_type = 'laundry_type' - listing_type = 'listing_type' - max_currency = 'max_currency' - max_price = 'max_price' - min_currency = 'min_currency' - min_price = 'min_price' - name = 'name' - num_baths = 'num_baths' - num_beds = 'num_beds' - num_rooms = 'num_rooms' - num_units = 'num_units' - parking_type = 'parking_type' - partner_verification = 'partner_verification' - pet_policy = 'pet_policy' - price = 'price' - property_type = 'property_type' - sanitized_images = 'sanitized_images' - unit_price = 'unit_price' - url = 'url' - visibility = 'visibility' - year_built = 'year_built' - - 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' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'home_listings' - - # @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_home_listing(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 - if batch 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=HomeListing, - 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 = { - 'address': 'Object', - 'availability': 'string', - 'currency': 'string', - 'description': 'string', - 'images': 'list', - 'listing_type': 'string', - 'name': 'string', - 'num_baths': 'float', - 'num_beds': 'float', - 'num_units': 'float', - 'price': 'float', - 'property_type': 'string', - 'url': 'string', - 'year_built': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=HomeListing, - 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.') - 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=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_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 = { - 'ac_type': 'string', - 'additional_fees_description': 'string', - 'address': 'Object', - 'agent_company': 'string', - 'agent_email': 'string', - 'agent_fb_page_id': 'Page', - 'agent_name': 'string', - 'agent_phone': 'string', - 'applinks': 'CatalogItemAppLinks', - 'area_size': 'unsigned int', - 'area_unit': 'string', - 'availability': 'string', - 'category_specific_fields': 'CatalogSubVerticalList', - 'co_2_emission_rating_eu': 'Object', - 'currency': 'string', - 'days_on_market': 'unsigned int', - 'description': 'string', - 'energy_rating_eu': 'Object', - 'furnish_type': 'string', - 'group_id': 'string', - 'heating_type': 'string', - 'home_listing_id': 'string', - 'id': 'string', - 'image_fetch_status': 'ImageFetchStatus', - 'images': 'list', - 'laundry_type': 'string', - 'listing_type': 'string', - 'max_currency': 'string', - 'max_price': 'string', - 'min_currency': 'string', - 'min_price': 'string', - 'name': 'string', - 'num_baths': 'float', - 'num_beds': 'float', - 'num_rooms': 'float', - 'num_units': 'unsigned int', - 'parking_type': 'string', - 'partner_verification': 'string', - 'pet_policy': 'string', - 'price': 'string', - 'property_type': 'string', - 'sanitized_images': 'list', - 'unit_price': 'Object', - 'url': 'string', - 'visibility': 'Visibility', - 'year_built': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ImageFetchStatus'] = HomeListing.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = HomeListing.Visibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/hotel.py b/tap_facebook/facebook_business/adobjects/hotel.py deleted file mode 100644 index 0f77917..0000000 --- a/tap_facebook/facebook_business/adobjects/hotel.py +++ /dev/null @@ -1,335 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Hotel( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isHotel = True - super(Hotel, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - address = 'address' - applinks = 'applinks' - brand = 'brand' - category = 'category' - category_specific_fields = 'category_specific_fields' - currency = 'currency' - description = 'description' - guest_ratings = 'guest_ratings' - hotel_id = 'hotel_id' - id = 'id' - image_fetch_status = 'image_fetch_status' - images = 'images' - lowest_base_price = 'lowest_base_price' - loyalty_program = 'loyalty_program' - margin_level = 'margin_level' - name = 'name' - phone = 'phone' - sale_price = 'sale_price' - sanitized_images = 'sanitized_images' - star_rating = 'star_rating' - unit_price = 'unit_price' - url = 'url' - visibility = 'visibility' - base_price = 'base_price' - - 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' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'hotels' - - # @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_hotel(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 - if batch 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=Hotel, - 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 = { - 'address': 'Object', - 'applinks': 'Object', - 'base_price': 'unsigned int', - 'brand': 'string', - 'currency': 'string', - 'description': 'string', - 'guest_ratings': 'list', - 'images': 'list', - 'name': 'string', - 'phone': 'string', - 'star_rating': 'float', - 'url': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Hotel, - 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.') - 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=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_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_hotel_rooms(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.hotelroom import HotelRoom - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/hotel_rooms', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=HotelRoom, - api_type='EDGE', - response_parser=ObjectParser(target_class=HotelRoom, 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 = { - 'address': 'string', - 'applinks': 'CatalogItemAppLinks', - 'brand': 'string', - 'category': 'string', - 'category_specific_fields': 'CatalogSubVerticalList', - 'currency': 'string', - 'description': 'string', - 'guest_ratings': 'string', - 'hotel_id': 'string', - 'id': 'string', - 'image_fetch_status': 'ImageFetchStatus', - 'images': 'list', - 'lowest_base_price': 'string', - 'loyalty_program': 'string', - 'margin_level': 'unsigned int', - 'name': 'string', - 'phone': 'string', - 'sale_price': 'string', - 'sanitized_images': 'list', - 'star_rating': 'float', - 'unit_price': 'Object', - 'url': 'string', - 'visibility': 'Visibility', - 'base_price': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ImageFetchStatus'] = Hotel.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = Hotel.Visibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/hotelroom.py b/tap_facebook/facebook_business/adobjects/hotelroom.py deleted file mode 100644 index 976e627..0000000 --- a/tap_facebook/facebook_business/adobjects/hotelroom.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 HotelRoom( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isHotelRoom = True - super(HotelRoom, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - applinks = 'applinks' - base_price = 'base_price' - currency = 'currency' - description = 'description' - id = 'id' - images = 'images' - margin_level = 'margin_level' - name = 'name' - room_id = 'room_id' - sale_price = 'sale_price' - 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=HotelRoom, - 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_pricing_variables(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.dynamicpriceconfigbydate import DynamicPriceConfigByDate - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pricing_variables', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=DynamicPriceConfigByDate, - api_type='EDGE', - response_parser=ObjectParser(target_class=DynamicPriceConfigByDate, 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', - 'base_price': 'string', - 'currency': 'string', - 'description': 'string', - 'id': 'string', - 'images': 'list', - 'margin_level': 'string', - 'name': 'string', - 'room_id': 'string', - 'sale_price': 'string', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/idname.py b/tap_facebook/facebook_business/adobjects/idname.py deleted file mode 100644 index 050ec09..0000000 --- a/tap_facebook/facebook_business/adobjects/idname.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 IDName( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isIDName = True - super(IDName, 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/tap_facebook/facebook_business/adobjects/igbcadspermission.py b/tap_facebook/facebook_business/adobjects/igbcadspermission.py deleted file mode 100644 index 2a6a502..0000000 --- a/tap_facebook/facebook_business/adobjects/igbcadspermission.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 IGBCAdsPermission( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isIGBCAdsPermission = True - super(IGBCAdsPermission, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - permission_type = 'permission_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=IGBCAdsPermission, - 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', - 'permission_type': 'string', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/igcomment.py b/tap_facebook/facebook_business/adobjects/igcomment.py deleted file mode 100644 index 04f46fe..0000000 --- a/tap_facebook/facebook_business/adobjects/igcomment.py +++ /dev/null @@ -1,210 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 IGComment( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isIGComment = True - super(IGComment, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - field_from = 'from' - hidden = 'hidden' - id = 'id' - like_count = 'like_count' - media = 'media' - parent_id = 'parent_id' - text = 'text' - timestamp = 'timestamp' - user = 'user' - 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 = { - } - 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=IGComment, - 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 = { - 'hide': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGComment, - 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=IGComment, - api_type='EDGE', - response_parser=ObjectParser(target_class=IGComment, 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 = { - 'message': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/replies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGComment, - api_type='EDGE', - response_parser=ObjectParser(target_class=IGComment, 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 = { - 'from': 'IGCommentFromUser', - 'hidden': 'bool', - 'id': 'string', - 'like_count': 'int', - 'media': 'IGMedia', - 'parent_id': 'string', - 'text': 'string', - 'timestamp': 'datetime', - 'user': 'IGUser', - 'username': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/igcommentfromuser.py b/tap_facebook/facebook_business/adobjects/igcommentfromuser.py deleted file mode 100644 index e6ff45c..0000000 --- a/tap_facebook/facebook_business/adobjects/igcommentfromuser.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/igmedia.py b/tap_facebook/facebook_business/adobjects/igmedia.py deleted file mode 100644 index 3960756..0000000 --- a/tap_facebook/facebook_business/adobjects/igmedia.py +++ /dev/null @@ -1,461 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 IGMedia( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isIGMedia = True - super(IGMedia, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - caption = 'caption' - comments_count = 'comments_count' - copyright_check_information = 'copyright_check_information' - id = 'id' - ig_id = 'ig_id' - is_comment_enabled = 'is_comment_enabled' - 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 = { - 'primary_fb_page_id': 'string', - 'primary_ig_user_id': 'string', - 'secondary_fb_page_id': 'string', - 'secondary_ig_user_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGMedia, - 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 = { - 'comment_enabled': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGMedia, - 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_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): - 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=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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.igcomment import IGComment - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/comments', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGComment, - api_type='EDGE', - response_parser=ObjectParser(target_class=IGComment, 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.igcomment import IGComment - param_types = { - 'message': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/comments', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGComment, - api_type='EDGE', - response_parser=ObjectParser(target_class=IGComment, 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_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.instagraminsightsresult import InstagramInsightsResult - if is_async: - return self.get_insights_async(fields, params, batch, success, failure, pending) - param_types = { - 'breakdown': 'list', - 'metric': 'list', - 'period': 'list', - } - enums = { - 'breakdown_enum': InstagramInsightsResult.Breakdown.__dict__.values(), - 'metric_enum': InstagramInsightsResult.Metric.__dict__.values(), - 'period_enum': InstagramInsightsResult.Period.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=InstagramInsightsResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=InstagramInsightsResult, 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() - - def delete_product_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'child_index': 'unsigned int', - 'deleted_tags': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/product_tags', - 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_product_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.shadowigmediaproducttags import ShadowIGMediaProductTags - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_tags', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ShadowIGMediaProductTags, - api_type='EDGE', - response_parser=ObjectParser(target_class=ShadowIGMediaProductTags, 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_product_tag(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.shadowigmediaproducttags import ShadowIGMediaProductTags - param_types = { - 'child_index': 'unsigned int', - 'updated_tags': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/product_tags', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ShadowIGMediaProductTags, - api_type='EDGE', - response_parser=ObjectParser(target_class=ShadowIGMediaProductTags, 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', - 'comments_count': 'int', - 'copyright_check_information': 'IGVideoCopyrightCheckMatchesInformation', - 'id': 'string', - 'ig_id': 'string', - 'is_comment_enabled': 'bool', - 'is_shared_to_feed': 'bool', - 'like_count': 'int', - 'media_product_type': 'string', - 'media_type': 'string', - 'media_url': 'string', - 'owner': 'IGUser', - '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/tap_facebook/facebook_business/adobjects/igshoppingproductappeal.py b/tap_facebook/facebook_business/adobjects/igshoppingproductappeal.py deleted file mode 100644 index 12f1878..0000000 --- a/tap_facebook/facebook_business/adobjects/igshoppingproductappeal.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/igshoppingreviewstatus.py b/tap_facebook/facebook_business/adobjects/igshoppingreviewstatus.py deleted file mode 100644 index c311e66..0000000 --- a/tap_facebook/facebook_business/adobjects/igshoppingreviewstatus.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py b/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py deleted file mode 100644 index d8acdd6..0000000 --- a/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py b/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py deleted file mode 100644 index ba780e2..0000000 --- a/tap_facebook/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/iguser.py b/tap_facebook/facebook_business/adobjects/iguser.py deleted file mode 100644 index 60437d9..0000000 --- a/tap_facebook/facebook_business/adobjects/iguser.py +++ /dev/null @@ -1,833 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 IGUser( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isIGUser = True - super(IGUser, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - biography = 'biography' - business_discovery = 'business_discovery' - followers_count = 'followers_count' - follows_count = 'follows_count' - id = 'id' - ig_id = 'ig_id' - media_count = 'media_count' - mentioned_comment = 'mentioned_comment' - mentioned_media = 'mentioned_media' - name = 'name' - owner_business = 'owner_business' - profile_picture_url = 'profile_picture_url' - shopping_product_tag_eligibility = 'shopping_product_tag_eligibility' - shopping_review_status = 'shopping_review_status' - username = 'username' - website = 'website' - - 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 = { - 'adgroup_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGUser, - 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_available_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - 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', - '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), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is 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_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', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/catalog_product_search', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ShadowIGUserCatalogProductSearch, - api_type='EDGE', - response_parser=ObjectParser(target_class=ShadowIGUserCatalogProductSearch, 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_content_publishing_limit(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/content_publishing_limit', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ContentPublishingLimitResponse, - api_type='EDGE', - 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_dataset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.dataset import Dataset - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/dataset', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Dataset, - api_type='EDGE', - response_parser=ObjectParser(target_class=Dataset, 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_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.instagraminsightsresult import InstagramInsightsResult - if is_async: - return self.get_insights_async(fields, params, batch, success, failure, pending) - param_types = { - 'breakdown': 'list', - 'metric': 'list', - 'metric_type': 'metric_type_enum', - 'period': 'list', - 'since': 'datetime', - 'timeframe': 'timeframe_enum', - 'until': 'datetime', - } - enums = { - 'breakdown_enum': InstagramInsightsResult.Breakdown.__dict__.values(), - 'metric_enum': InstagramInsightsResult.Metric.__dict__.values(), - 'metric_type_enum': InstagramInsightsResult.MetricType.__dict__.values(), - 'period_enum': InstagramInsightsResult.Period.__dict__.values(), - 'timeframe_enum': InstagramInsightsResult.Timeframe.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/insights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=InstagramInsightsResult, - api_type='EDGE', - response_parser=ObjectParser(target_class=InstagramInsightsResult, 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() - - 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.') - from facebook_business.adobjects.igmedia import IGMedia - param_types = { - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/live_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_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 = { - '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=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 create_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 = { - 'audio_name': 'string', - 'caption': 'string', - 'children': 'list', - 'collaborators': 'list', - 'cover_url': 'string', - 'image_url': 'string', - 'is_carousel_item': 'bool', - 'location_id': 'string', - 'media_type': 'string', - 'product_tags': 'list', - 'share_to_feed': 'bool', - 'thumb_offset': 'string', - 'upload_type': 'string', - 'user_tags': 'list', - 'video_url': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/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 create_media_publish(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'creation_id': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/media_publish', - 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 create_mention(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'comment_id': 'string', - 'media_id': 'string', - 'message': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/mentions', - 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_notification_message_tokens(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.userpageonetimeoptintokensettings import UserPageOneTimeOptInTokenSettings - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/notification_message_tokens', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=UserPageOneTimeOptInTokenSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=UserPageOneTimeOptInTokenSettings, 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_product_appeal(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_appeal', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGShoppingProductAppeal, - api_type='EDGE', - response_parser=ObjectParser(target_class=IGShoppingProductAppeal, 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_product_appeal(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/product_appeal', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=IGShoppingProductAppeal, - api_type='EDGE', - response_parser=ObjectParser(target_class=IGShoppingProductAppeal, 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_recently_searched_hashtags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/recently_searched_hashtags', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ShadowIGHashtag, - api_type='EDGE', - response_parser=ObjectParser(target_class=ShadowIGHashtag, 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.') - from facebook_business.adobjects.igmedia import IGMedia - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/stories', - 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_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/tags', - 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 = { - 'biography': 'string', - 'business_discovery': 'IGUser', - 'followers_count': 'int', - 'follows_count': 'int', - 'id': 'string', - 'ig_id': 'int', - 'media_count': 'int', - 'mentioned_comment': 'IGComment', - 'mentioned_media': 'IGMedia', - 'name': 'string', - 'owner_business': 'Business', - 'profile_picture_url': 'string', - 'shopping_product_tag_eligibility': 'bool', - 'shopping_review_status': 'string', - 'username': 'string', - 'website': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py b/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py deleted file mode 100644 index 64c478e..0000000 --- a/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckstatus.py b/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckstatus.py deleted file mode 100644 index a40f635..0000000 --- a/tap_facebook/facebook_business/adobjects/igvideocopyrightcheckstatus.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/imagecopyright.py b/tap_facebook/facebook_business/adobjects/imagecopyright.py deleted file mode 100644 index f039911..0000000 --- a/tap_facebook/facebook_business/adobjects/imagecopyright.py +++ /dev/null @@ -1,391 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ImageCopyright( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isImageCopyright = True - super(ImageCopyright, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - artist = 'artist' - copyright_monitoring_status = 'copyright_monitoring_status' - creation_time = 'creation_time' - creator = 'creator' - custom_id = 'custom_id' - description = 'description' - filename = 'filename' - id = 'id' - image = 'image' - matches_count = 'matches_count' - original_content_creation_date = 'original_content_creation_date' - ownership_countries = 'ownership_countries' - tags = 'tags' - title = 'title' - update_time = 'update_time' - - class GeoOwnership: - ad = 'AD' - ae = 'AE' - af = 'AF' - ag = 'AG' - ai = 'AI' - al = 'AL' - am = 'AM' - an = 'AN' - ao = 'AO' - aq = 'AQ' - ar = 'AR' - value_as = 'AS' - at = 'AT' - au = 'AU' - aw = 'AW' - ax = 'AX' - az = 'AZ' - ba = 'BA' - bb = 'BB' - bd = 'BD' - be = 'BE' - bf = 'BF' - bg = 'BG' - bh = 'BH' - bi = 'BI' - bj = 'BJ' - bl = 'BL' - bm = 'BM' - bn = 'BN' - bo = 'BO' - bq = 'BQ' - br = 'BR' - bs = 'BS' - bt = 'BT' - bv = 'BV' - bw = 'BW' - by = 'BY' - bz = 'BZ' - ca = 'CA' - cc = 'CC' - cd = 'CD' - cf = 'CF' - cg = 'CG' - ch = 'CH' - ci = 'CI' - ck = 'CK' - cl = 'CL' - cm = 'CM' - cn = 'CN' - co = 'CO' - cr = 'CR' - cu = 'CU' - cv = 'CV' - cw = 'CW' - cx = 'CX' - cy = 'CY' - cz = 'CZ' - de = 'DE' - dj = 'DJ' - dk = 'DK' - dm = 'DM' - do = 'DO' - dz = 'DZ' - ec = 'EC' - ee = 'EE' - eg = 'EG' - eh = 'EH' - er = 'ER' - es = 'ES' - et = 'ET' - fi = 'FI' - fj = 'FJ' - fk = 'FK' - fm = 'FM' - fo = 'FO' - fr = 'FR' - ga = 'GA' - gb = 'GB' - gd = 'GD' - ge = 'GE' - gf = 'GF' - gg = 'GG' - gh = 'GH' - gi = 'GI' - gl = 'GL' - gm = 'GM' - gn = 'GN' - gp = 'GP' - gq = 'GQ' - gr = 'GR' - gs = 'GS' - gt = 'GT' - gu = 'GU' - gw = 'GW' - gy = 'GY' - hk = 'HK' - hm = 'HM' - hn = 'HN' - hr = 'HR' - ht = 'HT' - hu = 'HU' - id = 'ID' - ie = 'IE' - il = 'IL' - im = 'IM' - value_in = 'IN' - io = 'IO' - iq = 'IQ' - ir = 'IR' - value_is = 'IS' - it = 'IT' - je = 'JE' - jm = 'JM' - jo = 'JO' - jp = 'JP' - ke = 'KE' - kg = 'KG' - kh = 'KH' - ki = 'KI' - km = 'KM' - kn = 'KN' - kp = 'KP' - kr = 'KR' - kw = 'KW' - ky = 'KY' - kz = 'KZ' - la = 'LA' - lb = 'LB' - lc = 'LC' - li = 'LI' - lk = 'LK' - lr = 'LR' - ls = 'LS' - lt = 'LT' - lu = 'LU' - lv = 'LV' - ly = 'LY' - ma = 'MA' - mc = 'MC' - md = 'MD' - me = 'ME' - mf = 'MF' - mg = 'MG' - mh = 'MH' - mk = 'MK' - ml = 'ML' - mm = 'MM' - mn = 'MN' - mo = 'MO' - mp = 'MP' - mq = 'MQ' - mr = 'MR' - ms = 'MS' - mt = 'MT' - mu = 'MU' - mv = 'MV' - mw = 'MW' - mx = 'MX' - my = 'MY' - mz = 'MZ' - na = 'NA' - nc = 'NC' - ne = 'NE' - nf = 'NF' - ng = 'NG' - ni = 'NI' - nl = 'NL' - no = 'NO' - np = 'NP' - nr = 'NR' - nu = 'NU' - nz = 'NZ' - om = 'OM' - pa = 'PA' - pe = 'PE' - pf = 'PF' - pg = 'PG' - ph = 'PH' - pk = 'PK' - pl = 'PL' - pm = 'PM' - pn = 'PN' - pr = 'PR' - ps = 'PS' - pt = 'PT' - pw = 'PW' - py = 'PY' - qa = 'QA' - re = 'RE' - ro = 'RO' - rs = 'RS' - ru = 'RU' - rw = 'RW' - sa = 'SA' - sb = 'SB' - sc = 'SC' - sd = 'SD' - se = 'SE' - sg = 'SG' - sh = 'SH' - si = 'SI' - sj = 'SJ' - sk = 'SK' - sl = 'SL' - sm = 'SM' - sn = 'SN' - so = 'SO' - sr = 'SR' - ss = 'SS' - st = 'ST' - sv = 'SV' - sx = 'SX' - sy = 'SY' - sz = 'SZ' - tc = 'TC' - td = 'TD' - tf = 'TF' - tg = 'TG' - th = 'TH' - tj = 'TJ' - tk = 'TK' - tl = 'TL' - tm = 'TM' - tn = 'TN' - to = 'TO' - tp = 'TP' - tr = 'TR' - tt = 'TT' - tv = 'TV' - tw = 'TW' - tz = 'TZ' - ua = 'UA' - ug = 'UG' - um = 'UM' - us = 'US' - uy = 'UY' - uz = 'UZ' - va = 'VA' - vc = 'VC' - ve = 'VE' - vg = 'VG' - vi = 'VI' - vn = 'VN' - vu = 'VU' - wf = 'WF' - ws = 'WS' - xk = 'XK' - ye = 'YE' - yt = 'YT' - za = 'ZA' - zm = 'ZM' - zw = 'ZW' - - 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=ImageCopyright, - 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 = { - 'artist': 'string', - 'creator': 'string', - 'custom_id': 'string', - 'description': 'string', - 'geo_ownership': 'list', - 'original_content_creation_date': 'unsigned int', - 'title': 'string', - } - enums = { - 'geo_ownership_enum': ImageCopyright.GeoOwnership.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ImageCopyright, - 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 = { - 'artist': 'string', - 'copyright_monitoring_status': 'string', - 'creation_time': 'datetime', - 'creator': 'string', - 'custom_id': 'string', - 'description': 'string', - 'filename': 'string', - 'id': 'string', - 'image': 'Photo', - 'matches_count': 'unsigned int', - 'original_content_creation_date': 'datetime', - 'ownership_countries': 'VideoCopyrightGeoGate', - 'tags': 'list', - 'title': 'string', - 'update_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['GeoOwnership'] = ImageCopyright.GeoOwnership.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/insightsresult.py b/tap_facebook/facebook_business/adobjects/insightsresult.py deleted file mode 100644 index 722a359..0000000 --- a/tap_facebook/facebook_business/adobjects/insightsresult.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 InsightsResult( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isInsightsResult = True - super(InsightsResult, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - description = 'description' - description_from_api_doc = 'description_from_api_doc' - id = 'id' - name = 'name' - period = 'period' - title = 'title' - values = 'values' - - 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' - - class Period: - day = 'day' - days_28 = 'days_28' - lifetime = 'lifetime' - month = 'month' - total_over_range = 'total_over_range' - week = 'week' - - _field_types = { - 'description': 'string', - 'description_from_api_doc': 'string', - 'id': 'string', - 'name': 'string', - 'period': 'string', - 'title': 'string', - '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() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/insightsvalue.py b/tap_facebook/facebook_business/adobjects/insightsvalue.py deleted file mode 100644 index 5b28043..0000000 --- a/tap_facebook/facebook_business/adobjects/insightsvalue.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/instagramcarousel.py b/tap_facebook/facebook_business/adobjects/instagramcarousel.py deleted file mode 100644 index 62b89ab..0000000 --- a/tap_facebook/facebook_business/adobjects/instagramcarousel.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/instagramcomment.py b/tap_facebook/facebook_business/adobjects/instagramcomment.py deleted file mode 100644 index 035d973..0000000 --- a/tap_facebook/facebook_business/adobjects/instagramcomment.py +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/instagraminsightsresult.py b/tap_facebook/facebook_business/adobjects/instagraminsightsresult.py deleted file mode 100644 index 2ddd6c2..0000000 --- a/tap_facebook/facebook_business/adobjects/instagraminsightsresult.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 InstagramInsightsResult( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isInstagramInsightsResult = True - super(InstagramInsightsResult, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - description = 'description' - id = 'id' - name = 'name' - period = 'period' - title = 'title' - total_value = 'total_value' - values = 'values' - - class Breakdown: - action_type = 'action_type' - follow_type = 'follow_type' - story_navigation_action_type = 'story_navigation_action_type' - surface_type = 'surface_type' - - class Metric: - 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' - plays = 'plays' - profile_activity = 'profile_activity' - profile_visits = 'profile_visits' - reach = 'reach' - replies = 'replies' - saved = 'saved' - shares = 'shares' - taps_back = 'taps_back' - taps_forward = 'taps_forward' - total_interactions = 'total_interactions' - video_views = 'video_views' - - class Period: - day = 'day' - days_28 = 'days_28' - lifetime = 'lifetime' - month = 'month' - total_over_range = 'total_over_range' - week = 'week' - - class MetricType: - value_default = 'default' - time_series = 'time_series' - total_value = 'total_value' - - class Timeframe: - last_14_days = 'last_14_days' - last_30_days = 'last_30_days' - last_90_days = 'last_90_days' - prev_month = 'prev_month' - this_month = 'this_month' - this_week = 'this_week' - - _field_types = { - 'description': 'string', - 'id': 'string', - 'name': 'string', - 'period': 'string', - 'title': 'string', - 'total_value': 'Object', - 'values': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Breakdown'] = InstagramInsightsResult.Breakdown.__dict__.values() - field_enum_info['Metric'] = InstagramInsightsResult.Metric.__dict__.values() - field_enum_info['Period'] = InstagramInsightsResult.Period.__dict__.values() - field_enum_info['MetricType'] = InstagramInsightsResult.MetricType.__dict__.values() - field_enum_info['Timeframe'] = InstagramInsightsResult.Timeframe.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/instagraminsightsvalue.py b/tap_facebook/facebook_business/adobjects/instagraminsightsvalue.py deleted file mode 100644 index b066b8a..0000000 --- a/tap_facebook/facebook_business/adobjects/instagraminsightsvalue.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class InstagramInsightsValue( - AbstractObject, -): - - def __init__(self, api=None): - super(InstagramInsightsValue, self).__init__() - self._isInstagramInsightsValue = True - self._api = api - - class Field(AbstractObject.Field): - end_time = 'end_time' - value = 'value' - - _field_types = { - 'end_time': 'datetime', - 'value': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/instagrammedia.py b/tap_facebook/facebook_business/adobjects/instagrammedia.py deleted file mode 100644 index e8b8e5e..0000000 --- a/tap_facebook/facebook_business/adobjects/instagrammedia.py +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py b/tap_facebook/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py deleted file mode 100644 index 6bd83e6..0000000 --- a/tap_facebook/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/instagramuser.py b/tap_facebook/facebook_business/adobjects/instagramuser.py deleted file mode 100644 index 9d85898..0000000 --- a/tap_facebook/facebook_business/adobjects/instagramuser.py +++ /dev/null @@ -1,246 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 InstagramUser( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isInstagramUser = True - super(InstagramUser, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - follow_count = 'follow_count' - followed_by_count = 'followed_by_count' - has_profile_picture = 'has_profile_picture' - id = 'id' - is_private = 'is_private' - is_published = 'is_published' - media_count = 'media_count' - mini_shop_storefront = 'mini_shop_storefront' - owner_business = 'owner_business' - profile_pic = 'profile_pic' - 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 = { - 'adgroup_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=InstagramUser, - 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_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.') - from facebook_business.adobjects.business import Business - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/agencies', - 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_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.') - 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=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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.adaccount import AdAccount - param_types = { - 'business': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/authorized_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() - - def create_authorized_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', - 'business': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/authorized_adaccounts', - 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_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.') - 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=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 = { - 'follow_count': 'int', - 'followed_by_count': 'int', - 'has_profile_picture': 'bool', - 'id': 'string', - 'is_private': 'bool', - 'is_published': 'bool', - 'media_count': 'int', - 'mini_shop_storefront': 'Shop', - 'owner_business': 'Business', - 'profile_pic': 'string', - 'username': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/instagramvideometadata.py b/tap_facebook/facebook_business/adobjects/instagramvideometadata.py deleted file mode 100644 index 7c6b393..0000000 --- a/tap_facebook/facebook_business/adobjects/instagramvideometadata.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/iosapplink.py b/tap_facebook/facebook_business/adobjects/iosapplink.py deleted file mode 100644 index d1276ce..0000000 --- a/tap_facebook/facebook_business/adobjects/iosapplink.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class IosAppLink( - AbstractObject, -): - - def __init__(self, api=None): - super(IosAppLink, self).__init__() - self._isIosAppLink = True - self._api = api - - class Field(AbstractObject.Field): - app_name = 'app_name' - app_store_id = 'app_store_id' - url = 'url' - - _field_types = { - 'app_name': 'string', - 'app_store_id': 'string', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/jobopening.py b/tap_facebook/facebook_business/adobjects/jobopening.py deleted file mode 100644 index b364d59..0000000 --- a/tap_facebook/facebook_business/adobjects/jobopening.py +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 JobOpening( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isJobOpening = True - super(JobOpening, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - address = 'address' - application_callback_url = 'application_callback_url' - created_time = 'created_time' - description = 'description' - errors = 'errors' - external_company_facebook_url = 'external_company_facebook_url' - external_company_full_address = 'external_company_full_address' - external_company_id = 'external_company_id' - external_company_name = 'external_company_name' - external_id = 'external_id' - id = 'id' - job_status = 'job_status' - latitude = 'latitude' - longitude = 'longitude' - offsite_application_url = 'offsite_application_url' - page = 'page' - photo = 'photo' - platform_review_status = 'platform_review_status' - post = 'post' - remote_type = 'remote_type' - review_rejection_reasons = 'review_rejection_reasons' - title = 'title' - type = 'type' - - class JobStatus: - closed = 'CLOSED' - draft = 'DRAFT' - open = 'OPEN' - provisional = 'PROVISIONAL' - - class PlatformReviewStatus: - approved = 'APPROVED' - pending = 'PENDING' - rejected = 'REJECTED' - - class ReviewRejectionReasons: - adult_content = 'ADULT_CONTENT' - discrimination = 'DISCRIMINATION' - drugs = 'DRUGS' - generic_default = 'GENERIC_DEFAULT' - illegal = 'ILLEGAL' - impersonation = 'IMPERSONATION' - misleading = 'MISLEADING' - multilevel_marketing = 'MULTILEVEL_MARKETING' - personal_info = 'PERSONAL_INFO' - sexual = 'SEXUAL' - - class Type: - contract = 'CONTRACT' - full_time = 'FULL_TIME' - internship = 'INTERNSHIP' - part_time = 'PART_TIME' - volunteer = 'VOLUNTEER' - - 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=JobOpening, - 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 = { - 'address': 'string', - 'application_callback_url': 'string', - 'created_time': 'datetime', - 'description': 'string', - 'errors': 'list', - 'external_company_facebook_url': 'string', - 'external_company_full_address': 'string', - 'external_company_id': 'string', - 'external_company_name': 'string', - 'external_id': 'string', - 'id': 'string', - 'job_status': 'JobStatus', - 'latitude': 'float', - 'longitude': 'float', - 'offsite_application_url': 'string', - 'page': 'Page', - 'photo': 'Photo', - 'platform_review_status': 'PlatformReviewStatus', - 'post': 'Post', - 'remote_type': 'string', - 'review_rejection_reasons': 'list', - 'title': 'string', - 'type': 'Type', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['JobStatus'] = JobOpening.JobStatus.__dict__.values() - field_enum_info['PlatformReviewStatus'] = JobOpening.PlatformReviewStatus.__dict__.values() - field_enum_info['ReviewRejectionReasons'] = JobOpening.ReviewRejectionReasons.__dict__.values() - field_enum_info['Type'] = JobOpening.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/keyvalue.py b/tap_facebook/facebook_business/adobjects/keyvalue.py deleted file mode 100644 index 18e4990..0000000 --- a/tap_facebook/facebook_business/adobjects/keyvalue.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class KeyValue( - AbstractObject, -): - - def __init__(self, api=None): - super(KeyValue, self).__init__() - self._isKeyValue = True - self._api = api - - class Field(AbstractObject.Field): - key = 'key' - value = 'value' - - _field_types = { - 'key': 'string', - 'value': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/lead.py b/tap_facebook/facebook_business/adobjects/lead.py deleted file mode 100644 index 546d122..0000000 --- a/tap_facebook/facebook_business/adobjects/lead.py +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Lead( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLead = True - super(Lead, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad_id = 'ad_id' - ad_name = 'ad_name' - adset_id = 'adset_id' - adset_name = 'adset_name' - campaign_id = 'campaign_id' - campaign_name = 'campaign_name' - created_time = 'created_time' - custom_disclaimer_responses = 'custom_disclaimer_responses' - field_data = 'field_data' - form_id = 'form_id' - home_listing = 'home_listing' - id = 'id' - is_organic = 'is_organic' - partner_name = 'partner_name' - platform = 'platform' - post = 'post' - post_submission_check_result = 'post_submission_check_result' - retailer_item_id = 'retailer_item_id' - vehicle = 'vehicle' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'leads' - - 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=Lead, - 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_name': 'string', - 'adset_id': 'string', - 'adset_name': 'string', - 'campaign_id': 'string', - 'campaign_name': 'string', - 'created_time': 'datetime', - 'custom_disclaimer_responses': 'list', - 'field_data': 'list', - 'form_id': 'string', - 'home_listing': 'HomeListing', - 'id': 'string', - 'is_organic': 'bool', - 'partner_name': 'string', - 'platform': 'string', - 'post': 'Link', - 'post_submission_check_result': 'LeadGenPostSubmissionCheckResult', - 'retailer_item_id': 'string', - 'vehicle': 'Vehicle', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgenappointmentbookinginfo.py b/tap_facebook/facebook_business/adobjects/leadgenappointmentbookinginfo.py deleted file mode 100644 index 714bfd4..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenappointmentbookinginfo.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LeadGenAppointmentBookingInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(LeadGenAppointmentBookingInfo, self).__init__() - self._isLeadGenAppointmentBookingInfo = True - self._api = api - - class Field(AbstractObject.Field): - advertiser_timezone_offset = 'advertiser_timezone_offset' - appointment_durations = 'appointment_durations' - appointment_slots_by_day = 'appointment_slots_by_day' - - _field_types = { - 'advertiser_timezone_offset': 'string', - 'appointment_durations': 'list', - 'appointment_slots_by_day': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgenappointmentslotsbyday.py b/tap_facebook/facebook_business/adobjects/leadgenappointmentslotsbyday.py deleted file mode 100644 index 59b0f6d..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenappointmentslotsbyday.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/leadgenappointmenttimeslot.py b/tap_facebook/facebook_business/adobjects/leadgenappointmenttimeslot.py deleted file mode 100644 index 2027248..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenappointmenttimeslot.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py b/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py deleted file mode 100644 index 6c26843..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LeadGenConditionalQuestionsGroupChoices( - AbstractObject, -): - - def __init__(self, api=None): - super(LeadGenConditionalQuestionsGroupChoices, self).__init__() - self._isLeadGenConditionalQuestionsGroupChoices = True - self._api = api - - class Field(AbstractObject.Field): - customized_token = 'customized_token' - next_question_choices = 'next_question_choices' - value = 'value' - - _field_types = { - 'customized_token': 'string', - 'next_question_choices': 'list', - 'value': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py b/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py deleted file mode 100644 index 0013477..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LeadGenConditionalQuestionsGroupQuestions( - AbstractObject, -): - - def __init__(self, api=None): - super(LeadGenConditionalQuestionsGroupQuestions, self).__init__() - self._isLeadGenConditionalQuestionsGroupQuestions = True - self._api = api - - class Field(AbstractObject.Field): - field_key = 'field_key' - input_type = 'input_type' - name = 'name' - - _field_types = { - 'field_key': 'string', - 'input_type': 'string', - 'name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgencontextcard.py b/tap_facebook/facebook_business/adobjects/leadgencontextcard.py deleted file mode 100644 index 0ee3d8f..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgencontextcard.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimer.py b/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimer.py deleted file mode 100644 index 6632f15..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimer.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimerbody.py b/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimerbody.py deleted file mode 100644 index 53c2e85..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgencustomdisclaimerbody.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/leadgendraftquestion.py b/tap_facebook/facebook_business/adobjects/leadgendraftquestion.py deleted file mode 100644 index dca6f0e..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgendraftquestion.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LeadGenDraftQuestion( - AbstractObject, -): - - def __init__(self, api=None): - super(LeadGenDraftQuestion, self).__init__() - self._isLeadGenDraftQuestion = True - self._api = api - - class Field(AbstractObject.Field): - conditional_questions_choices = 'conditional_questions_choices' - conditional_questions_group_id = 'conditional_questions_group_id' - dependent_conditional_questions = 'dependent_conditional_questions' - inline_context = 'inline_context' - key = 'key' - label = 'label' - options = 'options' - type = 'type' - - _field_types = { - 'conditional_questions_choices': 'list', - 'conditional_questions_group_id': 'string', - 'dependent_conditional_questions': 'list', - 'inline_context': 'string', - 'key': 'string', - 'label': 'string', - 'options': 'list', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgenform.py b/tap_facebook/facebook_business/adobjects/leadgenform.py deleted file mode 100644 index 4b3c22c..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenform.py +++ /dev/null @@ -1,288 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 LeadgenForm( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLeadgenForm = True - super(LeadgenForm, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - allow_organic_lead = 'allow_organic_lead' - block_display_for_non_targeted_viewer = 'block_display_for_non_targeted_viewer' - context_card = 'context_card' - created_time = 'created_time' - creator = 'creator' - expired_leads_count = 'expired_leads_count' - follow_up_action_text = 'follow_up_action_text' - follow_up_action_url = 'follow_up_action_url' - id = 'id' - is_optimized_for_quality = 'is_optimized_for_quality' - leads_count = 'leads_count' - legal_content = 'legal_content' - locale = 'locale' - name = 'name' - organic_leads_count = 'organic_leads_count' - page = 'page' - page_id = 'page_id' - privacy_policy_url = 'privacy_policy_url' - question_page_custom_headline = 'question_page_custom_headline' - questions = 'questions' - status = 'status' - thank_you_page = 'thank_you_page' - tracking_parameters = 'tracking_parameters' - - class Status: - active = 'ACTIVE' - archived = 'ARCHIVED' - deleted = 'DELETED' - draft = 'DRAFT' - - class Locale: - ar_ar = 'AR_AR' - cs_cz = 'CS_CZ' - da_dk = 'DA_DK' - de_de = 'DE_DE' - el_gr = 'EL_GR' - en_gb = 'EN_GB' - en_us = 'EN_US' - es_es = 'ES_ES' - es_la = 'ES_LA' - fi_fi = 'FI_FI' - fr_fr = 'FR_FR' - he_il = 'HE_IL' - hi_in = 'HI_IN' - hu_hu = 'HU_HU' - id_id = 'ID_ID' - it_it = 'IT_IT' - ja_jp = 'JA_JP' - ko_kr = 'KO_KR' - nb_no = 'NB_NO' - nl_nl = 'NL_NL' - pl_pl = 'PL_PL' - pt_br = 'PT_BR' - pt_pt = 'PT_PT' - ro_ro = 'RO_RO' - ru_ru = 'RU_RU' - sv_se = 'SV_SE' - th_th = 'TH_TH' - tr_tr = 'TR_TR' - vi_vn = 'VI_VN' - zh_cn = 'ZH_CN' - zh_hk = 'ZH_HK' - zh_tw = 'ZH_TW' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'leadgen_forms' - - 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=LeadgenForm, - 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 = { - 'status': 'status_enum', - } - enums = { - 'status_enum': LeadgenForm.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LeadgenForm, - 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_leads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.lead import Lead - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/leads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Lead, - api_type='EDGE', - response_parser=ObjectParser(target_class=Lead, 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_test_leads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.lead import Lead - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/test_leads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Lead, - api_type='EDGE', - response_parser=ObjectParser(target_class=Lead, 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_test_lead(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.lead import Lead - param_types = { - 'custom_disclaimer_responses': 'list', - 'field_data': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/test_leads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Lead, - api_type='EDGE', - response_parser=ObjectParser(target_class=Lead, 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 = { - 'allow_organic_lead': 'bool', - 'block_display_for_non_targeted_viewer': 'bool', - 'context_card': 'LeadGenContextCard', - 'created_time': 'datetime', - 'creator': 'User', - 'expired_leads_count': 'unsigned int', - 'follow_up_action_text': 'string', - 'follow_up_action_url': 'string', - 'id': 'string', - 'is_optimized_for_quality': 'bool', - 'leads_count': 'unsigned int', - 'legal_content': 'LeadGenLegalContent', - 'locale': 'string', - 'name': 'string', - 'organic_leads_count': 'unsigned int', - 'page': 'Page', - 'page_id': 'string', - 'privacy_policy_url': 'string', - 'question_page_custom_headline': 'string', - 'questions': 'list', - 'status': 'string', - 'thank_you_page': 'LeadGenThankYouPage', - 'tracking_parameters': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Status'] = LeadgenForm.Status.__dict__.values() - field_enum_info['Locale'] = LeadgenForm.Locale.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgenlegalcontent.py b/tap_facebook/facebook_business/adobjects/leadgenlegalcontent.py deleted file mode 100644 index 1ca4bec..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenlegalcontent.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/leadgenlegalcontentcheckbox.py b/tap_facebook/facebook_business/adobjects/leadgenlegalcontentcheckbox.py deleted file mode 100644 index 1b41e69..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenlegalcontentcheckbox.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py b/tap_facebook/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py deleted file mode 100644 index e2f850c..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LeadGenPostSubmissionCheckResult( - AbstractObject, -): - - def __init__(self, api=None): - super(LeadGenPostSubmissionCheckResult, self).__init__() - self._isLeadGenPostSubmissionCheckResult = True - self._api = api - - class Field(AbstractObject.Field): - api_call_result = 'api_call_result' - api_error_message = 'api_error_message' - shown_thank_you_page = 'shown_thank_you_page' - - _field_types = { - 'api_call_result': 'string', - 'api_error_message': 'string', - 'shown_thank_you_page': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgenprivacypolicy.py b/tap_facebook/facebook_business/adobjects/leadgenprivacypolicy.py deleted file mode 100644 index 2a8ad4a..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenprivacypolicy.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/leadgenquestion.py b/tap_facebook/facebook_business/adobjects/leadgenquestion.py deleted file mode 100644 index ea55476..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenquestion.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 LeadGenQuestion( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLeadGenQuestion = True - super(LeadGenQuestion, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - conditional_questions_choices = 'conditional_questions_choices' - conditional_questions_group_id = 'conditional_questions_group_id' - dependent_conditional_questions = 'dependent_conditional_questions' - id = 'id' - inline_context = 'inline_context' - key = 'key' - label = 'label' - options = 'options' - type = 'type' - - _field_types = { - 'conditional_questions_choices': 'list', - 'conditional_questions_group_id': 'string', - 'dependent_conditional_questions': 'list', - 'id': 'string', - 'inline_context': 'string', - 'key': 'string', - 'label': 'string', - 'options': 'list', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgenquestionoption.py b/tap_facebook/facebook_business/adobjects/leadgenquestionoption.py deleted file mode 100644 index 913295d..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenquestionoption.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LeadGenQuestionOption( - AbstractObject, -): - - def __init__(self, api=None): - super(LeadGenQuestionOption, self).__init__() - self._isLeadGenQuestionOption = True - self._api = api - - class Field(AbstractObject.Field): - key = 'key' - value = 'value' - - _field_types = { - 'key': 'string', - 'value': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/leadgenthankyoupage.py b/tap_facebook/facebook_business/adobjects/leadgenthankyoupage.py deleted file mode 100644 index 8598d02..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenthankyoupage.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/leadgenurlentityatranges.py b/tap_facebook/facebook_business/adobjects/leadgenurlentityatranges.py deleted file mode 100644 index b9e1efc..0000000 --- a/tap_facebook/facebook_business/adobjects/leadgenurlentityatranges.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/lifeevent.py b/tap_facebook/facebook_business/adobjects/lifeevent.py deleted file mode 100644 index 397158a..0000000 --- a/tap_facebook/facebook_business/adobjects/lifeevent.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 LifeEvent( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLifeEvent = True - super(LifeEvent, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - description = 'description' - end_time = 'end_time' - field_from = 'from' - id = 'id' - is_hidden = 'is_hidden' - start_time = 'start_time' - title = 'title' - 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=LifeEvent, - 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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 = { - 'description': 'string', - 'end_time': 'datetime', - 'from': 'Page', - 'id': 'string', - 'is_hidden': 'bool', - 'start_time': 'datetime', - 'title': 'string', - 'updated_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/link.py b/tap_facebook/facebook_business/adobjects/link.py deleted file mode 100644 index 46dbe5c..0000000 --- a/tap_facebook/facebook_business/adobjects/link.py +++ /dev/null @@ -1,168 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Link( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLink = True - super(Link, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - caption = 'caption' - created_time = 'created_time' - description = 'description' - field_from = 'from' - icon = 'icon' - id = 'id' - link = 'link' - message = 'message' - multi_share_optimized = 'multi_share_optimized' - name = 'name' - privacy = 'privacy' - via = 'via' - - 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=Link, - 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_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.comment import Comment - param_types = { - 'attachment_id': 'string', - 'attachment_share_url': 'string', - 'attachment_url': 'string', - 'comment_privacy_value': 'comment_privacy_value_enum', - 'facepile_mentioned_ids': 'list', - 'feedback_source': 'string', - 'is_offline': 'bool', - 'message': 'string', - 'nectar_module': 'string', - 'object_id': 'string', - 'parent_comment_id': 'Object', - 'text': 'string', - 'tracking': 'string', - } - enums = { - 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - 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() - - def get_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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', - 'created_time': 'datetime', - 'description': 'string', - 'from': 'Object', - 'icon': 'string', - 'id': 'string', - 'link': 'string', - 'message': 'string', - 'multi_share_optimized': 'bool', - 'name': 'string', - 'privacy': 'Privacy', - 'via': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/livevideo.py b/tap_facebook/facebook_business/adobjects/livevideo.py deleted file mode 100644 index b62255b..0000000 --- a/tap_facebook/facebook_business/adobjects/livevideo.py +++ /dev/null @@ -1,577 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 LiveVideo( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLiveVideo = True - super(LiveVideo, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad_break_config = 'ad_break_config' - ad_break_failure_reason = 'ad_break_failure_reason' - broadcast_start_time = 'broadcast_start_time' - copyright = 'copyright' - creation_time = 'creation_time' - dash_ingest_url = 'dash_ingest_url' - dash_preview_url = 'dash_preview_url' - description = 'description' - embed_html = 'embed_html' - field_from = 'from' - id = 'id' - ingest_streams = 'ingest_streams' - is_manual_mode = 'is_manual_mode' - is_reference_only = 'is_reference_only' - live_views = 'live_views' - overlay_url = 'overlay_url' - permalink_url = 'permalink_url' - planned_start_time = 'planned_start_time' - recommended_encoder_settings = 'recommended_encoder_settings' - seconds_left = 'seconds_left' - secure_stream_url = 'secure_stream_url' - status = 'status' - stream_url = 'stream_url' - targeting = 'targeting' - title = 'title' - total_views = 'total_views' - video = 'video' - - class Projection: - cubemap = 'CUBEMAP' - equirectangular = 'EQUIRECTANGULAR' - half_equirectangular = 'HALF_EQUIRECTANGULAR' - - class SpatialAudioFormat: - ambix_4 = 'ambiX_4' - - class Status: - live_now = 'LIVE_NOW' - scheduled_canceled = 'SCHEDULED_CANCELED' - scheduled_live = 'SCHEDULED_LIVE' - scheduled_unpublished = 'SCHEDULED_UNPUBLISHED' - unpublished = 'UNPUBLISHED' - - class StereoscopicMode: - left_right = 'LEFT_RIGHT' - mono = 'MONO' - top_bottom = 'TOP_BOTTOM' - - class StreamType: - ambient = 'AMBIENT' - regular = 'REGULAR' - - class BroadcastStatus: - live = 'LIVE' - live_stopped = 'LIVE_STOPPED' - processing = 'PROCESSING' - scheduled_canceled = 'SCHEDULED_CANCELED' - scheduled_expired = 'SCHEDULED_EXPIRED' - scheduled_live = 'SCHEDULED_LIVE' - scheduled_unpublished = 'SCHEDULED_UNPUBLISHED' - unpublished = 'UNPUBLISHED' - vod = 'VOD' - - class Source: - owner = 'owner' - target = 'target' - - class LiveCommentModerationSetting: - value_default = 'DEFAULT' - discussion = 'DISCUSSION' - followed = 'FOLLOWED' - follower = 'FOLLOWER' - no_hyperlink = 'NO_HYPERLINK' - protected_mode = 'PROTECTED_MODE' - restricted = 'RESTRICTED' - slow = 'SLOW' - supporter = 'SUPPORTER' - tagged = 'TAGGED' - - class PersistentStreamKeyStatus: - disable = 'DISABLE' - enable = 'ENABLE' - regenerate = 'REGENERATE' - - 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 = { - 'target_token': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - 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 = { - 'allow_bm_crossposting': 'bool', - 'content_tags': 'list', - 'cross_share_to_group_ids': 'list', - 'crossposting_actions': 'list', - 'custom_labels': 'list', - 'description': 'string', - 'direct_share_status': 'unsigned int', - 'embeddable': 'bool', - 'end_live_video': 'bool', - 'event_params': 'Object', - 'is_audio_only': 'bool', - 'is_manual_mode': 'bool', - 'live_comment_moderation_setting': 'list', - 'master_ingest_stream_id': 'string', - 'og_icon_id': 'string', - 'og_phrase': 'string', - 'persistent_stream_key_status': 'persistent_stream_key_status_enum', - 'place': 'Object', - 'planned_start_time': 'datetime', - 'privacy': 'string', - 'published': 'bool', - 'schedule_custom_profile_image': 'file', - 'schedule_feed_background_image': 'file', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'status': 'status_enum', - 'stream_type': 'stream_type_enum', - 'tags': 'list', - 'targeting': 'Object', - 'title': 'string', - } - enums = { - 'live_comment_moderation_setting_enum': LiveVideo.LiveCommentModerationSetting.__dict__.values(), - 'persistent_stream_key_status_enum': LiveVideo.PersistentStreamKeyStatus.__dict__.values(), - 'status_enum': LiveVideo.Status.__dict__.values(), - 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - 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_blocked_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 = { - 'uid': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/blocked_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() - - 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 = { - 'filter': 'filter_enum', - 'live_filter': 'live_filter_enum', - 'order': 'order_enum', - 'since': 'datetime', - } - enums = { - 'filter_enum': Comment.Filter.__dict__.values(), - 'live_filter_enum': Comment.LiveFilter.__dict__.values(), - '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() - - def get_crosspost_shared_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.') - from facebook_business.adobjects.page import Page - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/crosspost_shared_pages', - 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_crossposted_broadcasts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/crossposted_broadcasts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideo, 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_errors(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.livevideoerror import LiveVideoError - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/errors', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideoError, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideoError, 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_input_stream(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.livevideoinputstream import LiveVideoInputStream - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/input_streams', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideoInputStream, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideoInputStream, 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_polls(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.videopoll import VideoPoll - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/polls', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoPoll, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoPoll, 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_poll(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.videopoll import VideoPoll - param_types = { - 'close_after_voting': 'bool', - 'correct_option': 'unsigned int', - 'default_open': 'bool', - 'options': 'list', - 'question': 'string', - 'show_gradient': 'bool', - 'show_results': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/polls', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoPoll, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoPoll, 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_reactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': Profile.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/reactions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_break_config': 'LiveVideoAdBreakConfig', - 'ad_break_failure_reason': 'string', - 'broadcast_start_time': 'datetime', - 'copyright': 'VideoCopyright', - 'creation_time': 'datetime', - 'dash_ingest_url': 'string', - 'dash_preview_url': 'string', - 'description': 'string', - 'embed_html': 'Object', - 'from': 'Object', - 'id': 'string', - 'ingest_streams': 'list', - 'is_manual_mode': 'bool', - 'is_reference_only': 'bool', - 'live_views': 'unsigned int', - 'overlay_url': 'string', - 'permalink_url': 'string', - 'planned_start_time': 'datetime', - 'recommended_encoder_settings': 'LiveVideoRecommendedEncoderSettings', - 'seconds_left': 'int', - 'secure_stream_url': 'string', - 'status': 'string', - 'stream_url': 'string', - 'targeting': 'LiveVideoTargeting', - 'title': 'string', - 'total_views': 'string', - 'video': 'AdVideo', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Projection'] = LiveVideo.Projection.__dict__.values() - field_enum_info['SpatialAudioFormat'] = LiveVideo.SpatialAudioFormat.__dict__.values() - field_enum_info['Status'] = LiveVideo.Status.__dict__.values() - field_enum_info['StereoscopicMode'] = LiveVideo.StereoscopicMode.__dict__.values() - field_enum_info['StreamType'] = LiveVideo.StreamType.__dict__.values() - field_enum_info['BroadcastStatus'] = LiveVideo.BroadcastStatus.__dict__.values() - field_enum_info['Source'] = LiveVideo.Source.__dict__.values() - field_enum_info['LiveCommentModerationSetting'] = LiveVideo.LiveCommentModerationSetting.__dict__.values() - field_enum_info['PersistentStreamKeyStatus'] = LiveVideo.PersistentStreamKeyStatus.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/livevideoadbreakconfig.py b/tap_facebook/facebook_business/adobjects/livevideoadbreakconfig.py deleted file mode 100644 index 01893bb..0000000 --- a/tap_facebook/facebook_business/adobjects/livevideoadbreakconfig.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LiveVideoAdBreakConfig( - AbstractObject, -): - - def __init__(self, api=None): - super(LiveVideoAdBreakConfig, self).__init__() - self._isLiveVideoAdBreakConfig = True - self._api = api - - class Field(AbstractObject.Field): - default_ad_break_duration = 'default_ad_break_duration' - failure_reason_polling_interval = 'failure_reason_polling_interval' - first_break_eligible_secs = 'first_break_eligible_secs' - guide_url = 'guide_url' - is_eligible_to_onboard = 'is_eligible_to_onboard' - is_enabled = 'is_enabled' - onboarding_url = 'onboarding_url' - preparing_duration = 'preparing_duration' - time_between_ad_breaks_secs = 'time_between_ad_breaks_secs' - viewer_count_threshold = 'viewer_count_threshold' - - _field_types = { - 'default_ad_break_duration': 'unsigned int', - 'failure_reason_polling_interval': 'unsigned int', - 'first_break_eligible_secs': 'unsigned int', - 'guide_url': 'string', - 'is_eligible_to_onboard': 'bool', - 'is_enabled': 'bool', - 'onboarding_url': 'string', - 'preparing_duration': 'unsigned int', - 'time_between_ad_breaks_secs': 'unsigned int', - 'viewer_count_threshold': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/livevideoerror.py b/tap_facebook/facebook_business/adobjects/livevideoerror.py deleted file mode 100644 index aa053bf..0000000 --- a/tap_facebook/facebook_business/adobjects/livevideoerror.py +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 LiveVideoError( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLiveVideoError = True - super(LiveVideoError, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - creation_time = 'creation_time' - error_code = 'error_code' - error_message = 'error_message' - error_type = 'error_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=LiveVideoError, - 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', - 'error_code': 'int', - 'error_message': 'string', - 'error_type': 'string', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/livevideoinputstream.py b/tap_facebook/facebook_business/adobjects/livevideoinputstream.py deleted file mode 100644 index 64c8f98..0000000 --- a/tap_facebook/facebook_business/adobjects/livevideoinputstream.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 LiveVideoInputStream( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLiveVideoInputStream = True - super(LiveVideoInputStream, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - dash_ingest_url = 'dash_ingest_url' - dash_preview_url = 'dash_preview_url' - id = 'id' - is_master = 'is_master' - secure_stream_url = 'secure_stream_url' - stream_health = 'stream_health' - stream_id = 'stream_id' - stream_url = 'stream_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 = { - 'target_token': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideoInputStream, - 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 = { - 'dash_ingest_url': 'string', - 'dash_preview_url': 'string', - 'id': 'string', - 'is_master': 'bool', - 'secure_stream_url': 'string', - 'stream_health': 'Object', - 'stream_id': 'string', - 'stream_url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/livevideorecommendedencodersettings.py b/tap_facebook/facebook_business/adobjects/livevideorecommendedencodersettings.py deleted file mode 100644 index fa7d490..0000000 --- a/tap_facebook/facebook_business/adobjects/livevideorecommendedencodersettings.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LiveVideoRecommendedEncoderSettings( - AbstractObject, -): - - def __init__(self, api=None): - super(LiveVideoRecommendedEncoderSettings, self).__init__() - self._isLiveVideoRecommendedEncoderSettings = True - self._api = api - - class Field(AbstractObject.Field): - audio_codec_settings = 'audio_codec_settings' - streaming_protocol = 'streaming_protocol' - video_codec_settings = 'video_codec_settings' - - _field_types = { - 'audio_codec_settings': 'Object', - 'streaming_protocol': 'string', - 'video_codec_settings': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/livevideotargeting.py b/tap_facebook/facebook_business/adobjects/livevideotargeting.py deleted file mode 100644 index 5df48e7..0000000 --- a/tap_facebook/facebook_business/adobjects/livevideotargeting.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LiveVideoTargeting( - AbstractObject, -): - - def __init__(self, api=None): - super(LiveVideoTargeting, self).__init__() - self._isLiveVideoTargeting = True - self._api = api - - class Field(AbstractObject.Field): - age_max = 'age_max' - age_min = 'age_min' - excluded_countries = 'excluded_countries' - geo_locations = 'geo_locations' - - _field_types = { - 'age_max': 'unsigned int', - 'age_min': 'unsigned int', - 'excluded_countries': 'list', - 'geo_locations': 'TargetingGeoLocation', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/localservicebusiness.py b/tap_facebook/facebook_business/adobjects/localservicebusiness.py deleted file mode 100644 index eb5ed88..0000000 --- a/tap_facebook/facebook_business/adobjects/localservicebusiness.py +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 LocalServiceBusiness( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isLocalServiceBusiness = True - super(LocalServiceBusiness, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - address = 'address' - applinks = 'applinks' - availability = 'availability' - brand = 'brand' - category = 'category' - category_specific_fields = 'category_specific_fields' - condition = 'condition' - cuisine_type = 'cuisine_type' - currency = 'currency' - custom_label_0 = 'custom_label_0' - custom_label_1 = 'custom_label_1' - custom_label_2 = 'custom_label_2' - custom_label_3 = 'custom_label_3' - custom_label_4 = 'custom_label_4' - custom_number_0 = 'custom_number_0' - custom_number_1 = 'custom_number_1' - custom_number_2 = 'custom_number_2' - custom_number_3 = 'custom_number_3' - custom_number_4 = 'custom_number_4' - description = 'description' - expiration_date = 'expiration_date' - gtin = 'gtin' - 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' - title = 'title' - unit_price = 'unit_price' - url = 'url' - vendor_id = 'vendor_id' - visibility = 'visibility' - - 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' - - class Condition: - pc_cpo = 'PC_CPO' - pc_new = 'PC_NEW' - pc_open_box_new = 'PC_OPEN_BOX_NEW' - pc_refurbished = 'PC_REFURBISHED' - pc_used = 'PC_USED' - pc_used_fair = 'PC_USED_FAIR' - pc_used_good = 'PC_USED_GOOD' - pc_used_like_new = 'PC_USED_LIKE_NEW' - - 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=LocalServiceBusiness, - 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 = { - 'address': 'Object', - 'applinks': 'CatalogItemAppLinks', - 'availability': 'Availability', - 'brand': 'string', - 'category': 'string', - 'category_specific_fields': 'CatalogSubVerticalList', - 'condition': 'Condition', - 'cuisine_type': 'string', - 'currency': 'string', - 'custom_label_0': 'string', - 'custom_label_1': 'string', - 'custom_label_2': 'string', - 'custom_label_3': 'string', - 'custom_label_4': 'string', - 'custom_number_0': 'unsigned int', - 'custom_number_1': 'unsigned int', - 'custom_number_2': 'unsigned int', - 'custom_number_3': 'unsigned int', - 'custom_number_4': 'unsigned int', - 'description': 'string', - 'expiration_date': 'string', - 'gtin': 'string', - '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', - 'title': 'string', - 'unit_price': 'Object', - 'url': 'string', - 'vendor_id': 'string', - 'visibility': 'Visibility', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Availability'] = LocalServiceBusiness.Availability.__dict__.values() - field_enum_info['Condition'] = LocalServiceBusiness.Condition.__dict__.values() - field_enum_info['ImageFetchStatus'] = LocalServiceBusiness.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = LocalServiceBusiness.Visibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/location.py b/tap_facebook/facebook_business/adobjects/location.py deleted file mode 100644 index fe4a461..0000000 --- a/tap_facebook/facebook_business/adobjects/location.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Location( - AbstractObject, -): - - def __init__(self, api=None): - super(Location, self).__init__() - self._isLocation = True - self._api = api - - class Field(AbstractObject.Field): - city = 'city' - city_id = 'city_id' - country = 'country' - country_code = 'country_code' - latitude = 'latitude' - located_in = 'located_in' - longitude = 'longitude' - name = 'name' - region = 'region' - region_id = 'region_id' - state = 'state' - street = 'street' - zip = 'zip' - - _field_types = { - 'city': 'string', - 'city_id': 'unsigned int', - 'country': 'string', - 'country_code': 'string', - 'latitude': 'float', - 'located_in': 'string', - 'longitude': 'float', - 'name': 'string', - 'region': 'string', - 'region_id': 'unsigned int', - 'state': 'string', - 'street': 'string', - 'zip': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/lookalikespec.py b/tap_facebook/facebook_business/adobjects/lookalikespec.py deleted file mode 100644 index 9e6b8a6..0000000 --- a/tap_facebook/facebook_business/adobjects/lookalikespec.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class LookalikeSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(LookalikeSpec, self).__init__() - self._isLookalikeSpec = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - is_financial_service = 'is_financial_service' - origin = 'origin' - origin_event_name = 'origin_event_name' - origin_event_source_name = 'origin_event_source_name' - origin_event_source_type = 'origin_event_source_type' - product_set_name = 'product_set_name' - ratio = 'ratio' - starting_ratio = 'starting_ratio' - target_countries = 'target_countries' - target_country_names = 'target_country_names' - type = 'type' - - _field_types = { - 'country': 'string', - 'is_financial_service': 'bool', - 'origin': 'list', - 'origin_event_name': 'string', - 'origin_event_source_name': 'string', - 'origin_event_source_type': 'string', - 'product_set_name': 'string', - 'ratio': 'float', - 'starting_ratio': 'float', - 'target_countries': 'list', - 'target_country_names': 'list', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/mailingaddress.py b/tap_facebook/facebook_business/adobjects/mailingaddress.py deleted file mode 100644 index d6c00b2..0000000 --- a/tap_facebook/facebook_business/adobjects/mailingaddress.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 MailingAddress( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isMailingAddress = True - super(MailingAddress, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - city = 'city' - city_page = 'city_page' - country = 'country' - id = 'id' - postal_code = 'postal_code' - region = 'region' - street1 = 'street1' - street2 = 'street2' - - 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=MailingAddress, - 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 = { - 'city': 'string', - 'city_page': 'Page', - 'country': 'string', - 'id': 'string', - 'postal_code': 'string', - 'region': 'string', - 'street1': 'string', - 'street2': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/managedpartnerbusiness.py b/tap_facebook/facebook_business/adobjects/managedpartnerbusiness.py deleted file mode 100644 index 19bea08..0000000 --- a/tap_facebook/facebook_business/adobjects/managedpartnerbusiness.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ManagedPartnerBusiness( - AbstractObject, -): - - def __init__(self, api=None): - super(ManagedPartnerBusiness, self).__init__() - self._isManagedPartnerBusiness = True - self._api = api - - class Field(AbstractObject.Field): - ad_account = 'ad_account' - catalog_segment = 'catalog_segment' - extended_credit = 'extended_credit' - page = 'page' - seller_business_info = 'seller_business_info' - seller_business_status = 'seller_business_status' - template = 'template' - - _field_types = { - 'ad_account': 'AdAccount', - 'catalog_segment': 'ProductCatalog', - 'extended_credit': 'ManagedPartnerExtendedCredit', - 'page': 'Page', - 'seller_business_info': 'Object', - 'seller_business_status': 'string', - 'template': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/managedpartnerextendedcredit.py b/tap_facebook/facebook_business/adobjects/managedpartnerextendedcredit.py deleted file mode 100644 index ddbaf7b..0000000 --- a/tap_facebook/facebook_business/adobjects/managedpartnerextendedcredit.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/mediafingerprint.py b/tap_facebook/facebook_business/adobjects/mediafingerprint.py deleted file mode 100644 index eca48c2..0000000 --- a/tap_facebook/facebook_business/adobjects/mediafingerprint.py +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 MediaFingerprint( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isMediaFingerprint = True - super(MediaFingerprint, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - duration_in_sec = 'duration_in_sec' - fingerprint_content_type = 'fingerprint_content_type' - fingerprint_type = 'fingerprint_type' - id = 'id' - metadata = 'metadata' - title = 'title' - universal_content_id = 'universal_content_id' - - class FingerprintContentType: - am_songtrack = 'AM_SONGTRACK' - episode = 'EPISODE' - movie = 'MOVIE' - other = 'OTHER' - songtrack = 'SONGTRACK' - - 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=MediaFingerprint, - 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 = { - 'metadata': 'list', - 'source': 'file', - 'title': 'string', - 'universal_content_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MediaFingerprint, - 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 = { - 'duration_in_sec': 'float', - 'fingerprint_content_type': 'string', - 'fingerprint_type': 'string', - 'id': 'string', - 'metadata': 'Object', - 'title': 'string', - 'universal_content_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['FingerprintContentType'] = MediaFingerprint.FingerprintContentType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/mediatitle.py b/tap_facebook/facebook_business/adobjects/mediatitle.py deleted file mode 100644 index c0de7e5..0000000 --- a/tap_facebook/facebook_business/adobjects/mediatitle.py +++ /dev/null @@ -1,295 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 MediaTitle( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isMediaTitle = True - super(MediaTitle, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - applinks = 'applinks' - category_specific_fields = 'category_specific_fields' - content_category = 'content_category' - currency = 'currency' - description = 'description' - fb_page_alias = 'fb_page_alias' - fb_page_id = 'fb_page_id' - genres = 'genres' - id = 'id' - image_fetch_status = 'image_fetch_status' - images = 'images' - kg_fb_id = 'kg_fb_id' - media_title_id = 'media_title_id' - price = 'price' - sanitized_images = 'sanitized_images' - title = 'title' - title_display_name = 'title_display_name' - unit_price = 'unit_price' - url = 'url' - visibility = 'visibility' - wiki_data_item = 'wiki_data_item' - - 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' - - class ContentCategory: - movie = 'MOVIE' - music = 'MUSIC' - tv_show = 'TV_SHOW' - - 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=MediaTitle, - 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 = { - 'applinks': 'Object', - 'content_category': 'content_category_enum', - 'currency': 'string', - 'description': 'string', - 'fb_page_id': 'string', - 'genres': 'list', - 'images': 'list', - 'kg_fb_id': 'string', - 'price': 'unsigned int', - 'title': 'string', - 'title_display_name': 'string', - 'url': 'string', - } - enums = { - 'content_category_enum': MediaTitle.ContentCategory.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MediaTitle, - 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.') - 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=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_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 = { - 'applinks': 'CatalogItemAppLinks', - 'category_specific_fields': 'CatalogSubVerticalList', - 'content_category': 'string', - 'currency': 'string', - 'description': 'string', - 'fb_page_alias': 'string', - 'fb_page_id': 'Page', - 'genres': 'list', - 'id': 'string', - 'image_fetch_status': 'ImageFetchStatus', - 'images': 'list', - 'kg_fb_id': 'string', - 'media_title_id': 'string', - 'price': 'string', - 'sanitized_images': 'list', - 'title': 'string', - 'title_display_name': 'string', - 'unit_price': 'Object', - 'url': 'string', - 'visibility': 'Visibility', - 'wiki_data_item': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ImageFetchStatus'] = MediaTitle.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = MediaTitle.Visibility.__dict__.values() - field_enum_info['ContentCategory'] = MediaTitle.ContentCategory.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/messagingfeaturereview.py b/tap_facebook/facebook_business/adobjects/messagingfeaturereview.py deleted file mode 100644 index 9889591..0000000 --- a/tap_facebook/facebook_business/adobjects/messagingfeaturereview.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class MessagingFeatureReview( - AbstractObject, -): - - def __init__(self, api=None): - super(MessagingFeatureReview, self).__init__() - self._isMessagingFeatureReview = True - self._api = api - - class Field(AbstractObject.Field): - feature = 'feature' - status = 'status' - - _field_types = { - 'feature': 'string', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/messagingfeaturestatus.py b/tap_facebook/facebook_business/adobjects/messagingfeaturestatus.py deleted file mode 100644 index 195627b..0000000 --- a/tap_facebook/facebook_business/adobjects/messagingfeaturestatus.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class MessagingFeatureStatus( - AbstractObject, -): - - def __init__(self, api=None): - super(MessagingFeatureStatus, self).__init__() - self._isMessagingFeatureStatus = True - self._api = api - - 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): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/messengeradspartialautomatedsteplist.py b/tap_facebook/facebook_business/adobjects/messengeradspartialautomatedsteplist.py deleted file mode 100644 index 80cfe12..0000000 --- a/tap_facebook/facebook_business/adobjects/messengeradspartialautomatedsteplist.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/messengerprofile.py b/tap_facebook/facebook_business/adobjects/messengerprofile.py deleted file mode 100644 index b38bb26..0000000 --- a/tap_facebook/facebook_business/adobjects/messengerprofile.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class MessengerProfile( - AbstractObject, -): - - def __init__(self, api=None): - super(MessengerProfile, self).__init__() - self._isMessengerProfile = True - self._api = api - - class Field(AbstractObject.Field): - account_linking_url = 'account_linking_url' - commands = 'commands' - get_started = 'get_started' - greeting = 'greeting' - ice_breakers = 'ice_breakers' - payment_settings = 'payment_settings' - persistent_menu = 'persistent_menu' - subject_to_new_eu_privacy_rules = 'subject_to_new_eu_privacy_rules' - target_audience = 'target_audience' - whitelisted_domains = 'whitelisted_domains' - - _field_types = { - 'account_linking_url': 'string', - 'commands': 'list', - 'get_started': 'Object', - 'greeting': 'list', - 'ice_breakers': 'list', - 'payment_settings': 'Object', - 'persistent_menu': 'list', - 'subject_to_new_eu_privacy_rules': 'bool', - 'target_audience': 'Object', - 'whitelisted_domains': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/minimumbudget.py b/tap_facebook/facebook_business/adobjects/minimumbudget.py deleted file mode 100644 index accd5ae..0000000 --- a/tap_facebook/facebook_business/adobjects/minimumbudget.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class MinimumBudget( - AbstractObject, -): - - def __init__(self, api=None): - super(MinimumBudget, self).__init__() - self._isMinimumBudget = True - self._api = api - - class Field(AbstractObject.Field): - currency = 'currency' - min_daily_budget_high_freq = 'min_daily_budget_high_freq' - min_daily_budget_imp = 'min_daily_budget_imp' - min_daily_budget_low_freq = 'min_daily_budget_low_freq' - min_daily_budget_video_views = 'min_daily_budget_video_views' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'minimum_budgets' - - _field_types = { - 'currency': 'string', - 'min_daily_budget_high_freq': 'int', - 'min_daily_budget_imp': 'int', - 'min_daily_budget_low_freq': 'int', - 'min_daily_budget_video_views': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/musicvideocopyright.py b/tap_facebook/facebook_business/adobjects/musicvideocopyright.py deleted file mode 100644 index 07f2bbd..0000000 --- a/tap_facebook/facebook_business/adobjects/musicvideocopyright.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 MusicVideoCopyright( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isMusicVideoCopyright = True - super(MusicVideoCopyright, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - creation_time = 'creation_time' - displayed_matches_count = 'displayed_matches_count' - id = 'id' - in_conflict = 'in_conflict' - isrc = 'isrc' - match_rule = 'match_rule' - ownership_countries = 'ownership_countries' - reference_file_status = 'reference_file_status' - ridge_monitoring_status = 'ridge_monitoring_status' - tags = 'tags' - update_time = 'update_time' - video_asset = 'video_asset' - whitelisted_fb_users = 'whitelisted_fb_users' - whitelisted_ig_users = 'whitelisted_ig_users' - - 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=MusicVideoCopyright, - 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', - 'displayed_matches_count': 'int', - 'id': 'string', - 'in_conflict': 'bool', - 'isrc': 'string', - 'match_rule': 'VideoCopyrightRule', - 'ownership_countries': 'list', - 'reference_file_status': 'string', - 'ridge_monitoring_status': 'string', - 'tags': 'list', - 'update_time': 'datetime', - 'video_asset': 'CopyrightReferenceContainer', - 'whitelisted_fb_users': 'list', - 'whitelisted_ig_users': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/nullnode.py b/tap_facebook/facebook_business/adobjects/nullnode.py deleted file mode 100644 index 93662da..0000000 --- a/tap_facebook/facebook_business/adobjects/nullnode.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class NullNode( - AbstractObject, -): - - def __init__(self, api=None): - super(NullNode, self).__init__() - self._isNullNode = 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/tap_facebook/facebook_business/adobjects/objectparser.py b/tap_facebook/facebook_business/adobjects/objectparser.py deleted file mode 100644 index d8466f5..0000000 --- a/tap_facebook/facebook_business/adobjects/objectparser.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# 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 - """ - - def __init__( - self, - api=None, - target_class=None, - reuse_object=None, - custom_parse_method=None, - ): - """ Initialize an ObjectParser. - To Initialize, you need to provide either a reuse_object, target_class, - or an custom_parse_method. - Args: - api: FacebookAdsApi object. - target_class (optional): The expected return object type. - reuse_object (optional): Reuse existing object to populate response. - custom_parse_method (optional): Custom parsing method. - """ - if not any([target_class, reuse_object is not None, custom_parse_method]): - raise FacebookBadObjectError( - 'Must specify either target class calling object' + - 'or custom parse method for parser') - self._reuse_object = reuse_object - self._target_class = target_class - self._custom_parse_method = custom_parse_method - self._api = api - - 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() - - 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, - target_class) - else: - raise FacebookBadObjectError( - 'Must specify either target class calling object' + - 'or custom parse method for parser') - - def parse_multiple(self, response): - if 'data' in response and isinstance(response['data'], list): - ret = [] - if isinstance(response['data'], list): - for json_obj in response['data']: - ret.append(self.parse_single(json_obj)) - else: - ret.append(self.parse_single(response['data'])) - else: - data = response['data'] if 'data' in response else response - ret = [AbstractObject.create_object(self._api, data, - self._target_class)] - - return ret diff --git a/tap_facebook/facebook_business/adobjects/offlineconversiondataset.py b/tap_facebook/facebook_business/adobjects/offlineconversiondataset.py deleted file mode 100644 index 8816587..0000000 --- a/tap_facebook/facebook_business/adobjects/offlineconversiondataset.py +++ /dev/null @@ -1,665 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 OfflineConversionDataSet( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isOfflineConversionDataSet = True - super(OfflineConversionDataSet, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - automatic_matching_fields = 'automatic_matching_fields' - business = 'business' - can_proxy = 'can_proxy' - config = 'config' - creation_time = 'creation_time' - creator = 'creator' - data_use_setting = 'data_use_setting' - description = 'description' - duplicate_entries = 'duplicate_entries' - enable_auto_assign_to_accounts = 'enable_auto_assign_to_accounts' - enable_automatic_matching = 'enable_automatic_matching' - event_stats = 'event_stats' - event_time_max = 'event_time_max' - event_time_min = 'event_time_min' - first_party_cookie_status = 'first_party_cookie_status' - id = 'id' - is_consolidated_container = 'is_consolidated_container' - is_created_by_business = 'is_created_by_business' - is_crm = 'is_crm' - 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' - match_rate_approx = 'match_rate_approx' - matched_entries = 'matched_entries' - name = 'name' - owner_ad_account = 'owner_ad_account' - 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 - if batch 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=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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.adaccount import AdAccount - param_types = { - 'business': 'string', - } - 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() - - 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): - 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='/agencies', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.customaudience import CustomAudience - param_types = { - 'action_source': 'action_source_enum', - 'ad_account': 'string', - } - enums = { - 'action_source_enum': CustomAudience.ActionSource.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/audiences', - 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_custom_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.customconversion import CustomConversion - param_types = { - 'ad_account': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/customconversions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomConversion, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomConversion, 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_server_events_permitted_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.') - from facebook_business.adobjects.business import Business - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/server_events_permitted_business', - 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_shared_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 = { - 'action_source': 'action_source_enum', - 'business': 'string', - } - enums = { - 'action_source_enum': AdAccount.ActionSource.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/shared_accounts', - 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_shared_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.') - from facebook_business.adobjects.business import Business - param_types = { - 'action_source': 'action_source_enum', - } - enums = { - 'action_source_enum': Business.ActionSource.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/shared_agencies', - 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_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.') - param_types = { - 'aggr_time': 'aggr_time_enum', - 'end': 'int', - 'granularity': 'granularity_enum', - 'skip_empty_values': 'bool', - 'start': 'int', - 'user_timezone_id': 'unsigned int', - } - enums = { - 'aggr_time_enum': [ - 'event_time', - 'upload_time', - ], - 'granularity_enum': [ - 'daily', - 'hourly', - 'six_hourly', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/stats', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.offlineconversiondatasetupload import OfflineConversionDataSetUpload - param_types = { - 'end_time': 'datetime', - 'order': 'order_enum', - 'sort_by': 'sort_by_enum', - 'start_time': 'datetime', - 'upload_tag': 'string', - } - enums = { - 'order_enum': OfflineConversionDataSetUpload.Order.__dict__.values(), - 'sort_by_enum': OfflineConversionDataSetUpload.SortBy.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - 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_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', - 'can_proxy': 'bool', - 'config': 'string', - 'creation_time': 'datetime', - 'creator': 'User', - 'data_use_setting': 'string', - 'description': 'string', - 'duplicate_entries': 'int', - 'enable_auto_assign_to_accounts': 'bool', - 'enable_automatic_matching': 'bool', - 'event_stats': 'string', - 'event_time_max': 'int', - 'event_time_min': 'int', - 'first_party_cookie_status': 'string', - 'id': 'string', - 'is_consolidated_container': 'bool', - 'is_created_by_business': 'bool', - 'is_crm': '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', - 'match_rate_approx': 'int', - 'matched_entries': 'int', - 'name': 'string', - 'owner_ad_account': 'AdAccount', - '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/tap_facebook/facebook_business/adobjects/offlineconversiondatasetpermissions.py b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetpermissions.py deleted file mode 100644 index 0463f56..0000000 --- a/tap_facebook/facebook_business/adobjects/offlineconversiondatasetpermissions.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class OfflineConversionDataSetPermissions( - AbstractObject, -): - - def __init__(self, api=None): - super(OfflineConversionDataSetPermissions, self).__init__() - self._isOfflineConversionDataSetPermissions = True - self._api = api - - class Field(AbstractObject.Field): - can_edit = 'can_edit' - can_edit_or_upload = 'can_edit_or_upload' - can_upload = 'can_upload' - should_block_vanilla_business_employee_access = 'should_block_vanilla_business_employee_access' - - _field_types = { - 'can_edit': 'bool', - 'can_edit_or_upload': 'bool', - 'can_upload': 'bool', - 'should_block_vanilla_business_employee_access': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/offlineconversiondatasetupload.py b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetupload.py deleted file mode 100644 index 57132d3..0000000 --- a/tap_facebook/facebook_business/adobjects/offlineconversiondatasetupload.py +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 OfflineConversionDataSetUpload( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isOfflineConversionDataSetUpload = True - super(OfflineConversionDataSetUpload, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - api_calls = 'api_calls' - creation_time = 'creation_time' - duplicate_entries = 'duplicate_entries' - event_stats = 'event_stats' - event_time_max = 'event_time_max' - event_time_min = 'event_time_min' - first_upload_time = 'first_upload_time' - id = 'id' - is_excluded_for_lift = 'is_excluded_for_lift' - last_upload_time = 'last_upload_time' - match_rate_approx = 'match_rate_approx' - matched_entries = 'matched_entries' - upload_tag = 'upload_tag' - valid_entries = 'valid_entries' - - class Order: - ascending = 'ASCENDING' - descending = 'DESCENDING' - - class SortBy: - api_calls = 'API_CALLS' - creation_time = 'CREATION_TIME' - event_time_max = 'EVENT_TIME_MAX' - event_time_min = 'EVENT_TIME_MIN' - first_upload_time = 'FIRST_UPLOAD_TIME' - is_excluded_for_lift = 'IS_EXCLUDED_FOR_LIFT' - last_upload_time = 'LAST_UPLOAD_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=OfflineConversionDataSetUpload, - 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_progress(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/progress', - 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_pull_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pull_sessions', - 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 = { - 'api_calls': 'int', - 'creation_time': 'int', - 'duplicate_entries': 'int', - 'event_stats': 'string', - 'event_time_max': 'int', - 'event_time_min': 'int', - 'first_upload_time': 'int', - 'id': 'string', - 'is_excluded_for_lift': 'bool', - 'last_upload_time': 'int', - 'match_rate_approx': 'int', - 'matched_entries': 'int', - 'upload_tag': 'string', - 'valid_entries': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Order'] = OfflineConversionDataSetUpload.Order.__dict__.values() - field_enum_info['SortBy'] = OfflineConversionDataSetUpload.SortBy.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/offlineconversiondatasetusage.py b/tap_facebook/facebook_business/adobjects/offlineconversiondatasetusage.py deleted file mode 100644 index ee0f483..0000000 --- a/tap_facebook/facebook_business/adobjects/offlineconversiondatasetusage.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class OfflineConversionDataSetUsage( - AbstractObject, -): - - def __init__(self, api=None): - super(OfflineConversionDataSetUsage, self).__init__() - self._isOfflineConversionDataSetUsage = True - self._api = api - - class Field(AbstractObject.Field): - num_lift_studies = 'num_lift_studies' - - _field_types = { - 'num_lift_studies': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/offsitepixel.py b/tap_facebook/facebook_business/adobjects/offsitepixel.py deleted file mode 100644 index 89e8030..0000000 --- a/tap_facebook/facebook_business/adobjects/offsitepixel.py +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 OffsitePixel( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isOffsitePixel = True - super(OffsitePixel, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - creator = 'creator' - id = 'id' - js_pixel = 'js_pixel' - last_firing_time = 'last_firing_time' - name = 'name' - tag = 'tag' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'offsitepixels' - - 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 = { - 'value': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OffsitePixel, - 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 = { - 'creator': 'string', - 'id': 'string', - 'js_pixel': 'string', - 'last_firing_time': 'datetime', - 'name': 'string', - 'tag': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/omegacustomertrx.py b/tap_facebook/facebook_business/adobjects/omegacustomertrx.py deleted file mode 100644 index a91c7de..0000000 --- a/tap_facebook/facebook_business/adobjects/omegacustomertrx.py +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 OmegaCustomerTrx( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isOmegaCustomerTrx = True - super(OmegaCustomerTrx, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad_account_ids = 'ad_account_ids' - advertiser_name = 'advertiser_name' - amount = 'amount' - amount_due = 'amount_due' - billed_amount_details = 'billed_amount_details' - billing_period = 'billing_period' - cdn_download_uri = 'cdn_download_uri' - currency = 'currency' - download_uri = 'download_uri' - due_date = 'due_date' - entity = 'entity' - id = 'id' - invoice_date = 'invoice_date' - invoice_id = 'invoice_id' - invoice_type = 'invoice_type' - liability_type = 'liability_type' - payment_status = 'payment_status' - payment_term = 'payment_term' - type = 'type' - - class Type: - cm = 'CM' - dm = 'DM' - inv = 'INV' - pro_forma = 'PRO_FORMA' - - 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=OmegaCustomerTrx, - 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_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/campaigns', - 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_ids': 'list', - 'advertiser_name': 'string', - 'amount': 'string', - 'amount_due': 'CurrencyAmount', - 'billed_amount_details': 'Object', - 'billing_period': 'string', - 'cdn_download_uri': 'string', - 'currency': 'string', - 'download_uri': 'string', - 'due_date': 'datetime', - 'entity': 'string', - 'id': 'string', - 'invoice_date': 'datetime', - 'invoice_id': 'string', - 'invoice_type': 'string', - 'liability_type': 'string', - 'payment_status': 'string', - 'payment_term': 'string', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Type'] = OmegaCustomerTrx.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/openbridgeconfiguration.py b/tap_facebook/facebook_business/adobjects/openbridgeconfiguration.py deleted file mode 100644 index 8b28389..0000000 --- a/tap_facebook/facebook_business/adobjects/openbridgeconfiguration.py +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 OpenBridgeConfiguration( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isOpenBridgeConfiguration = True - 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' - pixel_id = 'pixel_id' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'openbridge_configurations' - - # @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_open_bridge_configuration(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 - if batch 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=OpenBridgeConfiguration, - 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 = { - 'access_key': 'string', - 'active': 'bool', - 'endpoint': 'string', - 'fallback_domain': 'string', - 'fallback_domain_enabled': 'bool', - 'host_business_id': 'unsigned int', - 'host_external_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OpenBridgeConfiguration, - 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_key': 'string', - 'active': 'bool', - 'endpoint': 'string', - 'fallback_domain': 'string', - 'fallback_domain_enabled': 'bool', - 'host_business_id': 'string', - 'host_external_id': 'string', - 'id': 'string', - 'pixel_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/opengraphcontext.py b/tap_facebook/facebook_business/adobjects/opengraphcontext.py deleted file mode 100644 index f864f21..0000000 --- a/tap_facebook/facebook_business/adobjects/opengraphcontext.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 OpenGraphContext( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isOpenGraphContext = True - super(OpenGraphContext, 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=OpenGraphContext, - 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/tap_facebook/facebook_business/adobjects/outcomepredictionpoint.py b/tap_facebook/facebook_business/adobjects/outcomepredictionpoint.py deleted file mode 100644 index f47f6fc..0000000 --- a/tap_facebook/facebook_business/adobjects/outcomepredictionpoint.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class OutcomePredictionPoint( - AbstractObject, -): - - def __init__(self, api=None): - super(OutcomePredictionPoint, self).__init__() - self._isOutcomePredictionPoint = True - self._api = api - - class Field(AbstractObject.Field): - actions = 'actions' - impressions = 'impressions' - reach = 'reach' - spend = 'spend' - - _field_types = { - 'actions': 'float', - 'impressions': 'float', - 'reach': 'float', - 'spend': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/page.py b/tap_facebook/facebook_business/adobjects/page.py deleted file mode 100644 index b476ff3..0000000 --- a/tap_facebook/facebook_business/adobjects/page.py +++ /dev/null @@ -1,5273 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Page( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPage = True - super(Page, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - about = 'about' - access_token = 'access_token' - ad_campaign = 'ad_campaign' - affiliation = 'affiliation' - 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' - best_page = 'best_page' - bio = 'bio' - birthday = 'birthday' - booking_agent = 'booking_agent' - breaking_news_usage = 'breaking_news_usage' - built = 'built' - business = 'business' - can_checkin = 'can_checkin' - can_post = 'can_post' - category = 'category' - category_list = 'category_list' - checkins = 'checkins' - company_overview = 'company_overview' - connected_instagram_account = 'connected_instagram_account' - connected_page_backed_instagram_account = 'connected_page_backed_instagram_account' - contact_address = 'contact_address' - copyright_whitelisted_ig_partners = 'copyright_whitelisted_ig_partners' - country_page_likes = 'country_page_likes' - cover = 'cover' - culinary_team = 'culinary_team' - current_location = 'current_location' - delivery_and_pickup_option_info = 'delivery_and_pickup_option_info' - description = 'description' - description_html = 'description_html' - differently_open_offerings = 'differently_open_offerings' - 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' - featured_video = 'featured_video' - features = 'features' - followers_count = 'followers_count' - food_styles = 'food_styles' - founded = 'founded' - general_info = 'general_info' - general_manager = 'general_manager' - genre = 'genre' - 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' - hometown = 'hometown' - hours = 'hours' - id = 'id' - impressum = 'impressum' - influences = 'influences' - instagram_business_account = 'instagram_business_account' - is_always_open = 'is_always_open' - 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' - is_permanently_closed = 'is_permanently_closed' - is_published = 'is_published' - is_unclaimed = 'is_unclaimed' - is_verified = 'is_verified' - is_webhooks_subscribed = 'is_webhooks_subscribed' - keywords = 'keywords' - leadgen_tos_acceptance_time = 'leadgen_tos_acceptance_time' - leadgen_tos_accepted = 'leadgen_tos_accepted' - leadgen_tos_accepting_user = 'leadgen_tos_accepting_user' - link = 'link' - location = 'location' - members = 'members' - merchant_id = 'merchant_id' - merchant_review_status = 'merchant_review_status' - messaging_feature_status = 'messaging_feature_status' - messenger_ads_default_icebreakers = 'messenger_ads_default_icebreakers' - 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' - mission = 'mission' - mpg = 'mpg' - name = 'name' - name_with_location_descriptor = 'name_with_location_descriptor' - network = 'network' - new_like_count = 'new_like_count' - offer_eligible = 'offer_eligible' - overall_star_rating = 'overall_star_rating' - owner_business = 'owner_business' - page_token = 'page_token' - parent_page = 'parent_page' - parking = 'parking' - payment_options = 'payment_options' - personal_info = 'personal_info' - personal_interests = 'personal_interests' - pharma_safety_info = 'pharma_safety_info' - phone = 'phone' - pickup_options = 'pickup_options' - place_type = 'place_type' - plot_outline = 'plot_outline' - preferred_audience = 'preferred_audience' - press_contact = 'press_contact' - price_range = 'price_range' - privacy_info_url = 'privacy_info_url' - produced_by = 'produced_by' - products = 'products' - promotion_eligible = 'promotion_eligible' - promotion_ineligible_reason = 'promotion_ineligible_reason' - public_transit = 'public_transit' - rating_count = 'rating_count' - recipient = 'recipient' - record_label = 'record_label' - release_date = 'release_date' - restaurant_services = 'restaurant_services' - restaurant_specialties = 'restaurant_specialties' - schedule = 'schedule' - screenplay_by = 'screenplay_by' - season = 'season' - single_line_address = 'single_line_address' - starring = 'starring' - start_info = 'start_info' - store_code = 'store_code' - store_location_descriptor = 'store_location_descriptor' - store_number = 'store_number' - studio = 'studio' - supports_donate_button_in_live_video = 'supports_donate_button_in_live_video' - talking_about_count = 'talking_about_count' - temporary_status = 'temporary_status' - 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' - website = 'website' - were_here_count = 'were_here_count' - whatsapp_number = 'whatsapp_number' - written_by = 'written_by' - - class Attire: - casual = 'Casual' - dressy = 'Dressy' - unspecified = 'Unspecified' - - class FoodStyles: - afghani = 'Afghani' - american_new_ = 'American (New)' - american_traditional_ = 'American (Traditional)' - asian_fusion = 'Asian Fusion' - barbeque = 'Barbeque' - brazilian = 'Brazilian' - breakfast = 'Breakfast' - british = 'British' - brunch = 'Brunch' - buffets = 'Buffets' - burgers = 'Burgers' - burmese = 'Burmese' - cajun_creole = 'Cajun/Creole' - caribbean = 'Caribbean' - chinese = 'Chinese' - creperies = 'Creperies' - cuban = 'Cuban' - delis = 'Delis' - diners = 'Diners' - ethiopian = 'Ethiopian' - fast_food = 'Fast Food' - filipino = 'Filipino' - fondue = 'Fondue' - food_stands = 'Food Stands' - french = 'French' - german = 'German' - greek_and_mediterranean = 'Greek and Mediterranean' - hawaiian = 'Hawaiian' - himalayan_nepalese = 'Himalayan/Nepalese' - hot_dogs = 'Hot Dogs' - indian_pakistani = 'Indian/Pakistani' - irish = 'Irish' - italian = 'Italian' - japanese = 'Japanese' - korean = 'Korean' - latin_american = 'Latin American' - mexican = 'Mexican' - middle_eastern = 'Middle Eastern' - moroccan = 'Moroccan' - pizza = 'Pizza' - russian = 'Russian' - sandwiches = 'Sandwiches' - seafood = 'Seafood' - singaporean = 'Singaporean' - soul_food = 'Soul Food' - southern = 'Southern' - spanish_basque = 'Spanish/Basque' - steakhouses = 'Steakhouses' - sushi_bars = 'Sushi Bars' - taiwanese = 'Taiwanese' - tapas_bars = 'Tapas Bars' - tex_mex = 'Tex-Mex' - thai = 'Thai' - turkish = 'Turkish' - vegan = 'Vegan' - vegetarian = 'Vegetarian' - vietnamese = 'Vietnamese' - - class PickupOptions: - curbside = 'CURBSIDE' - in_store = 'IN_STORE' - other = 'OTHER' - - class TemporaryStatus: - differently_open = 'DIFFERENTLY_OPEN' - no_data = 'NO_DATA' - operating_as_usual = 'OPERATING_AS_USUAL' - temporarily_closed = 'TEMPORARILY_CLOSED' - - class PermittedTasks: - advertise = 'ADVERTISE' - analyze = 'ANALYZE' - cashier_role = 'CASHIER_ROLE' - create_content = 'CREATE_CONTENT' - manage = 'MANAGE' - manage_jobs = 'MANAGE_JOBS' - manage_leads = 'MANAGE_LEADS' - messaging = 'MESSAGING' - moderate = 'MODERATE' - moderate_community = 'MODERATE_COMMUNITY' - pages_messaging = 'PAGES_MESSAGING' - pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' - profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' - profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' - profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' - profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' - profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' - profile_plus_manage = 'PROFILE_PLUS_MANAGE' - profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' - profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' - profile_plus_moderate = 'PROFILE_PLUS_MODERATE' - profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' - profile_plus_revenue = 'PROFILE_PLUS_REVENUE' - read_page_mailboxes = 'READ_PAGE_MAILBOXES' - view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' - - class Tasks: - advertise = 'ADVERTISE' - analyze = 'ANALYZE' - cashier_role = 'CASHIER_ROLE' - create_content = 'CREATE_CONTENT' - manage = 'MANAGE' - manage_jobs = 'MANAGE_JOBS' - manage_leads = 'MANAGE_LEADS' - messaging = 'MESSAGING' - moderate = 'MODERATE' - moderate_community = 'MODERATE_COMMUNITY' - pages_messaging = 'PAGES_MESSAGING' - pages_messaging_subscriptions = 'PAGES_MESSAGING_SUBSCRIPTIONS' - profile_plus_advertise = 'PROFILE_PLUS_ADVERTISE' - profile_plus_analyze = 'PROFILE_PLUS_ANALYZE' - profile_plus_create_content = 'PROFILE_PLUS_CREATE_CONTENT' - profile_plus_facebook_access = 'PROFILE_PLUS_FACEBOOK_ACCESS' - profile_plus_full_control = 'PROFILE_PLUS_FULL_CONTROL' - profile_plus_manage = 'PROFILE_PLUS_MANAGE' - profile_plus_manage_leads = 'PROFILE_PLUS_MANAGE_LEADS' - profile_plus_messaging = 'PROFILE_PLUS_MESSAGING' - profile_plus_moderate = 'PROFILE_PLUS_MODERATE' - profile_plus_moderate_delegate_community = 'PROFILE_PLUS_MODERATE_DELEGATE_COMMUNITY' - profile_plus_revenue = 'PROFILE_PLUS_REVENUE' - read_page_mailboxes = 'READ_PAGE_MAILBOXES' - view_monetization_insights = 'VIEW_MONETIZATION_INSIGHTS' - - class Alignment: - left = 'LEFT' - right = 'RIGHT' - - class EntryPointIcon: - chat_angular_icon = 'CHAT_ANGULAR_ICON' - chat_round_icon = 'CHAT_ROUND_ICON' - messenger_icon = 'MESSENGER_ICON' - none = 'NONE' - - class EntryPointLabel: - ask_us = 'ASK_US' - chat = 'CHAT' - help = 'HELP' - none = 'NONE' - - class GreetingDialogDisplay: - hide = 'HIDE' - show = 'SHOW' - welcome_message = 'WELCOME_MESSAGE' - - class GuestChatMode: - disabled = 'DISABLED' - enabled = 'ENABLED' - - class MobileChatDisplay: - app_switch = 'APP_SWITCH' - chat_tab = 'CHAT_TAB' - - class BackdatedTimeGranularity: - day = 'day' - hour = 'hour' - min = 'min' - month = 'month' - none = 'none' - year = 'year' - - class Formatting: - markdown = 'MARKDOWN' - plaintext = 'PLAINTEXT' - - class PlaceAttachmentSetting: - value_1 = '1' - value_2 = '2' - - class PostSurfacesBlacklist: - value_1 = '1' - value_2 = '2' - value_3 = '3' - value_4 = '4' - value_5 = '5' - - class PostingToRedspace: - disabled = 'disabled' - enabled = 'enabled' - - class TargetSurface: - story = 'STORY' - timeline = 'TIMELINE' - - class UnpublishedContentType: - ads_post = 'ADS_POST' - draft = 'DRAFT' - inline_created = 'INLINE_CREATED' - published = 'PUBLISHED' - reviewable_branded_content = 'REVIEWABLE_BRANDED_CONTENT' - scheduled = 'SCHEDULED' - scheduled_recurring = 'SCHEDULED_RECURRING' - - class MessagingType: - message_tag = 'MESSAGE_TAG' - response = 'RESPONSE' - update = 'UPDATE' - - class NotificationType: - no_push = 'NO_PUSH' - regular = 'REGULAR' - silent_push = 'SILENT_PUSH' - - class SenderAction: - mark_seen = 'MARK_SEEN' - react = 'REACT' - typing_off = 'TYPING_OFF' - typing_on = 'TYPING_ON' - unreact = 'UNREACT' - - class SuggestionAction: - accept = 'ACCEPT' - dismiss = 'DISMISS' - impression = 'IMPRESSION' - - class Platform: - instagram = 'INSTAGRAM' - messenger = 'MESSENGER' - - class Model: - arabic = 'ARABIC' - chinese = 'CHINESE' - croatian = 'CROATIAN' - custom = 'CUSTOM' - danish = 'DANISH' - dutch = 'DUTCH' - english = 'ENGLISH' - french_standard = 'FRENCH_STANDARD' - georgian = 'GEORGIAN' - german_standard = 'GERMAN_STANDARD' - greek = 'GREEK' - hebrew = 'HEBREW' - hungarian = 'HUNGARIAN' - irish = 'IRISH' - italian_standard = 'ITALIAN_STANDARD' - korean = 'KOREAN' - norwegian_bokmal = 'NORWEGIAN_BOKMAL' - polish = 'POLISH' - portuguese = 'PORTUGUESE' - romanian = 'ROMANIAN' - spanish = 'SPANISH' - swedish = 'SWEDISH' - vietnamese = 'VIETNAMESE' - - class DeveloperAction: - enable_followup_message = 'ENABLE_FOLLOWUP_MESSAGE' - - class SubscribedFields: - affiliation = 'affiliation' - attire = 'attire' - awards = 'awards' - bio = 'bio' - birthday = 'birthday' - calls = 'calls' - category = 'category' - checkins = 'checkins' - company_overview = 'company_overview' - conversations = 'conversations' - culinary_team = 'culinary_team' - current_location = 'current_location' - description = 'description' - email = 'email' - feature_access_list = 'feature_access_list' - feed = 'feed' - founded = 'founded' - general_info = 'general_info' - general_manager = 'general_manager' - group_feed = 'group_feed' - hometown = 'hometown' - hours = 'hours' - 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' - invoice_access_onboarding_status_active = 'invoice_access_onboarding_status_active' - leadgen = 'leadgen' - leadgen_fat = 'leadgen_fat' - live_videos = 'live_videos' - local_delivery = 'local_delivery' - location = 'location' - mcom_invoice_change = 'mcom_invoice_change' - members = 'members' - mention = 'mention' - merchant_review = 'merchant_review' - 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' - messages = 'messages' - messaging_account_linking = 'messaging_account_linking' - messaging_appointments = 'messaging_appointments' - messaging_checkout_updates = 'messaging_checkout_updates' - messaging_customer_information = 'messaging_customer_information' - messaging_direct_sends = 'messaging_direct_sends' - messaging_fblogin_account_linking = 'messaging_fblogin_account_linking' - 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' - messaging_policy_enforcement = 'messaging_policy_enforcement' - messaging_postbacks = 'messaging_postbacks' - messaging_pre_checkouts = 'messaging_pre_checkouts' - 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' - picture = 'picture' - price_range = 'price_range' - product_review = 'product_review' - products = 'products' - public_transit = 'public_transit' - publisher_subscriptions = 'publisher_subscriptions' - ratings = 'ratings' - registration = 'registration' - send_cart = 'send_cart' - standby = 'standby' - user_action = 'user_action' - video_text_question_responses = 'video_text_question_responses' - 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): - return '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 = { - 'account_linking_token': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Page, - 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 = { - 'about': 'string', - 'accept_crossposting_handshake': 'list', - 'allow_spherical_photo': 'bool', - 'attire': 'attire_enum', - 'begin_crossposting_handshake': 'list', - 'bio': 'string', - 'category_list': 'list', - 'company_overview': 'string', - 'contact_address': 'Object', - 'cover': 'string', - 'culinary_team': 'string', - 'delivery_and_pickup_option_info': 'list', - 'description': 'string', - 'differently_open_offerings': 'map', - 'directed_by': 'string', - 'displayed_message_response_time': 'string', - 'emails': 'list', - 'focus_x': 'float', - 'focus_y': 'float', - 'food_styles': 'list', - 'general_info': 'string', - 'general_manager': 'string', - 'genre': 'string', - 'hours': 'map', - 'ignore_coordinate_warnings': 'bool', - 'impressum': 'string', - 'is_always_open': 'bool', - 'is_permanently_closed': 'bool', - 'is_published': 'bool', - 'is_webhooks_subscribed': 'bool', - 'location': 'Object', - 'menu': 'string', - 'mission': 'string', - 'no_feed_story': 'bool', - 'no_notification': 'bool', - 'offset_x': 'int', - 'offset_y': 'int', - 'parking': 'map', - 'payment_options': 'map', - 'phone': 'string', - 'pickup_options': 'list', - 'plot_outline': 'string', - 'price_range': 'string', - 'public_transit': 'string', - 'restaurant_services': 'map', - 'restaurant_specialties': 'map', - 'scrape': 'bool', - 'service_details': 'string', - 'spherical_metadata': 'map', - 'start_info': 'Object', - 'store_location_descriptor': 'string', - 'temporary_status': 'temporary_status_enum', - 'website': 'string', - 'zoom_scale_x': 'float', - 'zoom_scale_y': 'float', - } - enums = { - 'attire_enum': Page.Attire.__dict__.values(), - 'food_styles_enum': Page.FoodStyles.__dict__.values(), - 'pickup_options_enum': Page.PickupOptions.__dict__.values(), - 'temporary_status_enum': Page.TemporaryStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Page, - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'idempotency_key': 'string', - 'orders': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/acknowledge_orders', - 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_ads_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.') - from facebook_business.adobjects.pagepost import PagePost - param_types = { - 'exclude_dynamic_ads': 'bool', - 'include_inline_create': 'bool', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ads_posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - api_type='EDGE', - response_parser=ObjectParser(target_class=PagePost, 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_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): - 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='/agencies', - 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_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': Page.PermittedTasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/agencies', - 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_albums(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.album import Album - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/albums', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Album, - api_type='EDGE', - response_parser=ObjectParser(target_class=Album, 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_ar_experience(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/ar_experience', - 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_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.') - param_types = { - 'user': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/assigned_users', - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.assigneduser import AssignedUser - param_types = { - 'business': 'string', - } - 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() - - def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'tasks': 'list', - 'user': 'int', - } - enums = { - 'tasks_enum': Page.Tasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/assigned_users', - 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_blocked(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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': 'string', - 'psid': 'int', - 'uid': 'int', - 'user': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/blocked', - 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_blocked(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - 'uid': 'int', - 'user': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/blocked', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_blocked(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - 'psid': 'list', - 'uid': 'list', - 'user': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/blocked', - 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_business_datum(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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', - 'partner_agent': 'string', - 'processing_type': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/business_data', - 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_business_projects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='GET', - endpoint='/businessprojects', - 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_call_to_actions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.pagecalltoaction import PageCallToAction - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/call_to_actions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageCallToAction, - api_type='EDGE', - response_parser=ObjectParser(target_class=PageCallToAction, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.canvasbodyelement import CanvasBodyElement - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/canvas_elements', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CanvasBodyElement, - api_type='EDGE', - response_parser=ObjectParser(target_class=CanvasBodyElement, 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_canvas_element(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.canvasbodyelement import CanvasBodyElement - param_types = { - 'canvas_button': 'Object', - 'canvas_carousel': 'Object', - 'canvas_footer': 'Object', - 'canvas_header': 'Object', - 'canvas_lead_form': 'Object', - 'canvas_photo': 'Object', - 'canvas_product_list': 'Object', - 'canvas_product_set': 'Object', - 'canvas_store_locator': 'Object', - 'canvas_template_video': 'Object', - 'canvas_text': 'Object', - 'canvas_video': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/canvas_elements', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CanvasBodyElement, - api_type='EDGE', - response_parser=ObjectParser(target_class=CanvasBodyElement, 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_canvases(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.canvas import Canvas - param_types = { - 'is_hidden': 'bool', - 'is_published': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/canvases', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Canvas, - api_type='EDGE', - response_parser=ObjectParser(target_class=Canvas, 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_canvase(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.canvas import Canvas - param_types = { - 'background_color': 'string', - 'body_element_ids': 'list', - 'enable_swipe_to_open': 'bool', - 'is_hidden': 'bool', - 'is_published': 'bool', - 'name': 'string', - 'source_template_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/canvases', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Canvas, - api_type='EDGE', - response_parser=ObjectParser(target_class=Canvas, 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_chat_plugin(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.chatplugin import ChatPlugin - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/chat_plugin', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ChatPlugin, - api_type='EDGE', - response_parser=ObjectParser(target_class=ChatPlugin, 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_chat_plugin(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'alignment': 'alignment_enum', - 'desktop_bottom_spacing': 'unsigned int', - 'desktop_side_spacing': 'unsigned int', - 'entry_point_icon': 'entry_point_icon_enum', - 'entry_point_label': 'entry_point_label_enum', - 'greeting_dialog_display': 'greeting_dialog_display_enum', - 'guest_chat_mode': 'guest_chat_mode_enum', - 'mobile_bottom_spacing': 'unsigned int', - 'mobile_chat_display': 'mobile_chat_display_enum', - 'mobile_side_spacing': 'unsigned int', - 'theme_color': 'string', - 'welcome_screen_greeting': 'string', - } - enums = { - 'alignment_enum': Page.Alignment.__dict__.values(), - 'entry_point_icon_enum': Page.EntryPointIcon.__dict__.values(), - 'entry_point_label_enum': Page.EntryPointLabel.__dict__.values(), - 'greeting_dialog_display_enum': Page.GreetingDialogDisplay.__dict__.values(), - 'guest_chat_mode_enum': Page.GuestChatMode.__dict__.values(), - 'mobile_chat_display_enum': Page.MobileChatDisplay.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/chat_plugin', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.commercemerchantsettings import CommerceMerchantSettings - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_merchant_settings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommerceMerchantSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommerceMerchantSettings, 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_orders(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.commerceorder import CommerceOrder - param_types = { - 'filters': 'list', - 'state': 'list', - 'updated_after': 'datetime', - 'updated_before': 'datetime', - } - enums = { - 'filters_enum': CommerceOrder.Filters.__dict__.values(), - 'state_enum': CommerceOrder.State.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_orders', - 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() - - def get_commerce_payouts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.commercepayout import CommercePayout - param_types = { - 'end_time': 'datetime', - 'start_time': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_payouts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommercePayout, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommercePayout, 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_transactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.commerceordertransactiondetail import CommerceOrderTransactionDetail - param_types = { - 'end_time': 'datetime', - 'payout_reference_id': 'string', - 'start_time': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_transactions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommerceOrderTransactionDetail, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommerceOrderTransactionDetail, 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_conversations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.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'], - method='GET', - endpoint='/conversations', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=UnifiedThread, - api_type='EDGE', - response_parser=ObjectParser(target_class=UnifiedThread, 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_copyright_manual_claim(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_reason': 'action_reason_enum', - 'countries': 'Object', - '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', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/copyright_manual_claims', - 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_crosspost_whitelisted_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/crosspost_whitelisted_pages', - 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_custom_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.pageusermessagethreadlabel import PageUserMessageThreadLabel - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/custom_labels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageUserMessageThreadLabel, - api_type='EDGE', - response_parser=ObjectParser(target_class=PageUserMessageThreadLabel, 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_custom_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.pageusermessagethreadlabel import PageUserMessageThreadLabel - param_types = { - 'name': 'string', - 'page_label_name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/custom_labels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageUserMessageThreadLabel, - api_type='EDGE', - response_parser=ObjectParser(target_class=PageUserMessageThreadLabel, 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_custom_user_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.') - param_types = { - 'params': 'list', - 'psid': 'string', - } - enums = { - 'params_enum': [ - 'PERSISTENT_MENU', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/custom_user_settings', - 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_custom_user_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.customusersettings import CustomUserSettings - param_types = { - 'psid': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/custom_user_settings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CustomUserSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=CustomUserSettings, 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_custom_user_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 = { - 'persistent_menu': 'list', - 'psid': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/custom_user_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_dataset(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.dataset import Dataset - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/dataset', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Dataset, - api_type='EDGE', - response_parser=ObjectParser(target_class=Dataset, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.event import Event - param_types = { - 'event_state_filter': 'list', - 'include_canceled': 'bool', - 'time_filter': 'time_filter_enum', - 'type': 'type_enum', - } - enums = { - 'event_state_filter_enum': Event.EventStateFilter.__dict__.values(), - 'time_filter_enum': Event.TimeFilter.__dict__.values(), - 'type_enum': Event.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/events', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Event, - api_type='EDGE', - response_parser=ObjectParser(target_class=Event, 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_extend_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'duration': 'unsigned int', - 'recipient': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/extend_thread_control', - 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_fantasy_games(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/fantasy_games', - 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.pagepost import PagePost - param_types = { - 'include_hidden': 'bool', - 'limit': 'unsigned int', - 'show_expired': 'bool', - 'with': 'with_enum', - } - enums = { - 'with_enum': PagePost.With.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/feed', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - api_type='EDGE', - response_parser=ObjectParser(target_class=PagePost, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'actions': 'Object', - 'adaptive_type': 'string', - 'album_id': 'string', - 'android_key_hash': 'string', - 'animated_effect_id': 'unsigned int', - 'application_id': 'string', - 'asked_fun_fact_prompt_id': 'unsigned int', - 'asset3d_id': 'unsigned int', - 'associated_id': 'string', - 'attach_place_suggestion': 'bool', - 'attached_media': 'list', - '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', - 'child_attachments': 'list', - 'client_mutation_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', - 'connection_class': 'string', - 'content_attachment': 'string', - 'coordinates': 'Object', - 'cta_link': 'string', - 'cta_type': 'string', - 'description': 'string', - 'direct_share_status': 'unsigned int', - 'enforce_link_ownership': 'bool', - 'expanded_height': 'unsigned int', - 'expanded_width': 'unsigned int', - 'feed_targeting': 'Object', - 'formatting': 'formatting_enum', - 'fun_fact_prompt_id': 'unsigned int', - 'fun_fact_toastee_id': 'unsigned int', - 'height': 'unsigned int', - 'holiday_card': 'string', - 'home_checkin_city_id': 'Object', - 'image_crops': 'map', - 'implicit_with_tags': 'list', - 'instant_game_entry_point_data': 'string', - 'ios_bundle_id': 'string', - 'is_backout_draft': 'bool', - 'is_boost_intended': 'bool', - 'is_explicit_location': 'bool', - 'is_explicit_share': 'bool', - 'is_group_linking_post': 'bool', - 'is_photo_container': 'bool', - 'link': 'string', - 'location_source_id': 'string', - 'manual_privacy': 'bool', - 'message': 'string', - 'multi_share_end_card': 'bool', - 'multi_share_optimized': 'bool', - 'name': 'string', - 'nectar_module': 'string', - 'object_attachment': 'string', - 'offer_like_post_id': 'unsigned int', - 'og_action_type_id': 'string', - 'og_hide_object_attachment': 'bool', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'page_recommendation': 'string', - 'picture': 'string', - 'place': 'Object', - 'place_attachment_setting': 'place_attachment_setting_enum', - 'place_list': 'string', - 'place_list_data': 'list', - 'post_surfaces_blacklist': 'list', - 'posting_to_redspace': 'posting_to_redspace_enum', - 'privacy': 'string', - 'prompt_id': 'string', - 'prompt_tracking_string': 'string', - 'properties': 'Object', - 'proxied_app_id': 'string', - 'publish_event_id': 'unsigned int', - 'published': 'bool', - 'quote': 'string', - 'react_mode_metadata': 'string', - 'ref': 'list', - 'referenceable_image_ids': 'list', - 'referral_id': 'string', - 'scheduled_publish_time': 'datetime', - 'source': 'string', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'suggested_place_id': 'Object', - 'tags': 'list', - 'target_surface': 'target_surface_enum', - 'targeting': 'Object', - 'text_format_metadata': 'string', - 'text_format_preset_id': 'string', - 'text_only_place': 'string', - 'throwback_camera_roll_media': 'string', - 'thumbnail': 'file', - 'time_since_original_post': 'unsigned int', - 'title': 'string', - 'tracking_info': 'string', - 'unpublished_content_type': 'unpublished_content_type_enum', - 'user_selected_tags': 'bool', - 'video_start_time_ms': 'unsigned int', - 'viewer_coordinates': 'Object', - 'width': 'unsigned int', - } - enums = { - 'backdated_time_granularity_enum': Page.BackdatedTimeGranularity.__dict__.values(), - 'formatting_enum': Page.Formatting.__dict__.values(), - 'place_attachment_setting_enum': Page.PlaceAttachmentSetting.__dict__.values(), - 'post_surfaces_blacklist_enum': Page.PostSurfacesBlacklist.__dict__.values(), - 'posting_to_redspace_enum': Page.PostingToRedspace.__dict__.values(), - 'target_surface_enum': Page.TargetSurface.__dict__.values(), - 'unpublished_content_type_enum': Page.UnpublishedContentType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/feed', - 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_global_brand_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='/global_brand_children', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.group import Group - param_types = { - 'admin_only': 'bool', - 'parent': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - api_type='EDGE', - response_parser=ObjectParser(target_class=Group, 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_image_copyrights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.imagecopyright import ImageCopyright - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/image_copyrights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ImageCopyright, - api_type='EDGE', - response_parser=ObjectParser(target_class=ImageCopyright, 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_image_copyright(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.imagecopyright import ImageCopyright - param_types = { - 'artist': 'string', - 'attribution_link': 'string', - 'creator': 'string', - 'custom_id': 'string', - 'description': 'string', - 'filename': 'string', - 'geo_ownership': 'list', - 'original_content_creation_date': 'unsigned int', - 'reference_photo': 'string', - 'title': 'string', - } - enums = { - 'geo_ownership_enum': ImageCopyright.GeoOwnership.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/image_copyrights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ImageCopyright, - api_type='EDGE', - response_parser=ObjectParser(target_class=ImageCopyright, 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_indexed_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.advideo import AdVideo - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/indexed_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) - - if batch is 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 = { - 'breakdown': 'list', - 'date_preset': 'date_preset_enum', - 'metric': 'list', - 'period': 'period_enum', - 'show_description_from_api_doc': 'bool', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'date_preset_enum': InsightsResult.DatePreset.__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() - - def get_instagram_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.instagramuser import InstagramUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/instagram_accounts', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.leadgenform import LeadgenForm - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/leadgen_forms', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LeadgenForm, - api_type='EDGE', - response_parser=ObjectParser(target_class=LeadgenForm, 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_lead_gen_form(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.leadgenform import LeadgenForm - param_types = { - 'allow_organic_lead_retrieval': 'bool', - 'block_display_for_non_targeted_viewer': 'bool', - 'context_card': 'Object', - 'cover_photo': 'file', - 'custom_disclaimer': 'Object', - 'follow_up_action_url': 'string', - 'is_for_canvas': 'bool', - 'is_optimized_for_quality': 'bool', - 'locale': 'locale_enum', - 'name': 'string', - 'privacy_policy': 'Object', - 'question_page_custom_headline': 'string', - 'questions': 'list', - 'thank_you_page': 'Object', - 'tracking_parameters': 'map', - } - enums = { - 'locale_enum': LeadgenForm.Locale.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/leadgen_forms', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LeadgenForm, - api_type='EDGE', - response_parser=ObjectParser(target_class=LeadgenForm, 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'target_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - 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_live_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.livevideo import LiveVideo - param_types = { - 'broadcast_status': 'list', - 'source': 'source_enum', - } - enums = { - 'broadcast_status_enum': LiveVideo.BroadcastStatus.__dict__.values(), - 'source_enum': LiveVideo.Source.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/live_videos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideo, 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_live_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.livevideo import LiveVideo - param_types = { - 'content_tags': 'list', - 'crossposting_actions': 'list', - 'custom_labels': 'list', - 'description': 'string', - 'enable_backup_ingest': 'bool', - 'encoding_settings': 'string', - 'event_params': 'Object', - 'fisheye_video_cropped': 'bool', - 'front_z_rotation': 'float', - 'game_show': 'map', - 'is_audio_only': 'bool', - 'is_spherical': 'bool', - 'original_fov': 'unsigned int', - 'privacy': 'string', - 'projection': 'projection_enum', - 'published': 'bool', - 'schedule_custom_profile_image': 'file', - 'spatial_audio_format': 'spatial_audio_format_enum', - 'status': 'status_enum', - 'stereoscopic_mode': 'stereoscopic_mode_enum', - 'stop_on_delete_stream': 'bool', - 'stream_type': 'stream_type_enum', - 'targeting': 'Object', - 'title': 'string', - } - enums = { - 'projection_enum': LiveVideo.Projection.__dict__.values(), - 'spatial_audio_format_enum': LiveVideo.SpatialAudioFormat.__dict__.values(), - 'status_enum': LiveVideo.Status.__dict__.values(), - 'stereoscopic_mode_enum': LiveVideo.StereoscopicMode.__dict__.values(), - 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/live_videos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideo, 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_locations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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_ids': 'list', - 'store_numbers': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/locations', - 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_locations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/locations', - 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 create_location(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'always_open': 'bool', - 'delivery_and_pickup_option_info': 'list', - 'differently_open_offerings': 'map', - 'hours': 'map', - 'ignore_warnings': 'bool', - 'location': 'Object', - 'location_page_id': 'string', - 'old_store_number': 'unsigned int', - 'page_username': 'string', - 'permanently_closed': 'bool', - 'phone': 'string', - 'pickup_options': 'list', - 'place_topics': 'list', - 'price_range': 'string', - 'store_code': 'string', - 'store_location_descriptor': 'string', - 'store_name': 'string', - 'store_number': 'unsigned int', - 'temporary_status': 'temporary_status_enum', - 'website': 'string', - } - enums = { - 'pickup_options_enum': Page.PickupOptions.__dict__.values(), - 'temporary_status_enum': Page.TemporaryStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/locations', - 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_media_fingerprints(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.mediafingerprint import MediaFingerprint - param_types = { - 'universal_content_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/media_fingerprints', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MediaFingerprint, - api_type='EDGE', - response_parser=ObjectParser(target_class=MediaFingerprint, 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_media_fingerprint(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.mediafingerprint import MediaFingerprint - param_types = { - 'fingerprint_content_type': 'fingerprint_content_type_enum', - 'metadata': 'list', - 'source': 'string', - 'title': 'string', - 'universal_content_id': 'string', - } - enums = { - 'fingerprint_content_type_enum': MediaFingerprint.FingerprintContentType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/media_fingerprints', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MediaFingerprint, - api_type='EDGE', - response_parser=ObjectParser(target_class=MediaFingerprint, 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_message_attachment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'message': 'Object', - 'platform': 'platform_enum', - } - enums = { - 'platform_enum': [ - 'INSTAGRAM', - 'MESSENGER', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/message_attachments', - 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_message(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'message': 'Object', - 'messaging_type': 'messaging_type_enum', - 'notification_type': 'notification_type_enum', - 'payload': 'string', - 'persona_id': 'string', - 'recipient': 'Object', - 'sender_action': 'sender_action_enum', - 'suggestion_action': 'suggestion_action_enum', - 'tag': 'Object', - 'thread_control': 'Object', - } - enums = { - 'messaging_type_enum': Page.MessagingType.__dict__.values(), - 'notification_type_enum': Page.NotificationType.__dict__.values(), - 'sender_action_enum': Page.SenderAction.__dict__.values(), - 'suggestion_action_enum': Page.SuggestionAction.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/messages', - 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_messaging_feature_review(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.messagingfeaturereview import MessagingFeatureReview - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/messaging_feature_review', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MessagingFeatureReview, - api_type='EDGE', - response_parser=ObjectParser(target_class=MessagingFeatureReview, 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_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): - 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_form(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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(), - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/messenger_profile', - 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_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.') - from facebook_business.adobjects.messengerprofile import MessengerProfile - param_types = { - 'platform': 'platform_enum', - } - enums = { - 'platform_enum': Page.Platform.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/messenger_profile', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MessengerProfile, - api_type='EDGE', - response_parser=ObjectParser(target_class=MessengerProfile, 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_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 = { - 'account_linking_url': 'string', - 'commands': 'list', - 'description': 'list', - 'get_started': 'Object', - 'greeting': 'list', - 'ice_breakers': 'list', - 'payment_settings': 'Object', - 'persistent_menu': 'list', - 'platform': 'platform_enum', - 'target_audience': 'Object', - 'title': 'list', - 'whitelisted_domains': 'list', - } - enums = { - 'platform_enum': Page.Platform.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/messenger_profile', - 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 create_nlp_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 = { - 'api_version': 'Object', - 'custom_token': 'string', - 'model': 'model_enum', - 'n_best': 'unsigned int', - 'nlp_enabled': 'bool', - 'other_language_support': 'map', - 'verbose': 'bool', - } - enums = { - 'model_enum': Page.Model.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/nlp_configs', - 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_notification_message_tokens(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.userpageonetimeoptintokensettings import UserPageOneTimeOptInTokenSettings - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/notification_message_tokens', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=UserPageOneTimeOptInTokenSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=UserPageOneTimeOptInTokenSettings, 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_notification_messages_dev_support(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'developer_action': 'developer_action_enum', - 'recipient': 'Object', - } - enums = { - 'developer_action_enum': Page.DeveloperAction.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/notification_messages_dev_support', - 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_page_backed_instagram_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.instagramuser import InstagramUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/page_backed_instagram_accounts', - 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 create_page_backed_instagram_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.') - from facebook_business.adobjects.instagramuser import InstagramUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/page_backed_instagram_accounts', - 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 create_page_whatsapp_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.') - param_types = { - 'verification_code': 'string', - 'whatsapp_number': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/page_whatsapp_number_verification', - 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 create_pass_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'metadata': 'string', - 'recipient': 'Object', - 'target_app_id': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/pass_thread_control', - 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 create_pass_thread_metadatum(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'metadata': 'string', - 'recipient': 'Object', - 'target_app_id': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/pass_thread_metadata', - 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_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.') - from facebook_business.adobjects.persona import Persona - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/personas', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Persona, - api_type='EDGE', - response_parser=ObjectParser(target_class=Persona, 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_persona(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.persona import Persona - param_types = { - 'name': 'string', - 'profile_picture_url': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/personas', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Persona, - api_type='EDGE', - response_parser=ObjectParser(target_class=Persona, 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.photo import Photo - param_types = { - 'biz_tag_id': 'unsigned int', - 'business_id': 'string', - 'type': 'type_enum', - } - enums = { - 'type_enum': Photo.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/photos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Photo, - api_type='EDGE', - response_parser=ObjectParser(target_class=Photo, 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_photo(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.photo import Photo - param_types = { - 'aid': 'string', - 'allow_spherical_photo': 'bool', - 'alt_text_custom': 'string', - 'android_key_hash': 'string', - 'application_id': 'string', - 'attempt': 'unsigned int', - 'audience_exp': 'bool', - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'backdated_time_granularity_enum', - 'caption': 'string', - 'composer_session_id': 'string', - 'direct_share_status': 'unsigned int', - 'feed_targeting': 'Object', - 'filter_type': 'unsigned int', - 'full_res_is_coming_later': 'bool', - 'initial_view_heading_override_degrees': 'unsigned int', - 'initial_view_pitch_override_degrees': 'unsigned int', - 'initial_view_vertical_fov_override_degrees': 'unsigned int', - 'ios_bundle_id': 'string', - 'is_explicit_location': 'bool', - 'is_explicit_place': 'bool', - 'location_source_id': 'string', - 'manual_privacy': 'bool', - 'message': 'string', - 'name': 'string', - 'nectar_module': 'string', - 'no_story': 'bool', - 'offline_id': 'unsigned int', - 'og_action_type_id': 'string', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'parent_media_id': 'unsigned int', - 'place': 'Object', - 'privacy': 'string', - 'profile_id': 'int', - 'proxied_app_id': 'string', - 'published': 'bool', - 'qn': 'string', - 'scheduled_publish_time': 'unsigned int', - 'spherical_metadata': 'map', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'tags': 'list', - 'target_id': 'int', - 'targeting': 'Object', - 'temporary': 'bool', - 'time_since_original_post': 'unsigned int', - 'uid': 'int', - 'unpublished_content_type': 'unpublished_content_type_enum', - 'url': 'string', - 'user_selected_tags': 'bool', - 'vault_image_id': 'string', - } - enums = { - 'backdated_time_granularity_enum': Photo.BackdatedTimeGranularity.__dict__.values(), - 'unpublished_content_type_enum': Photo.UnpublishedContentType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/photos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Photo, - api_type='EDGE', - response_parser=ObjectParser(target_class=Photo, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profilepicturesource import ProfilePictureSource - param_types = { - 'height': 'int', - 'redirect': 'bool', - 'type': 'type_enum', - 'width': 'int', - } - enums = { - 'type_enum': ProfilePictureSource.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/picture', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProfilePictureSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProfilePictureSource, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profilepicturesource import ProfilePictureSource - param_types = { - 'android_key_hash': 'string', - 'burn_media_effect': 'bool', - 'caption': 'string', - 'composer_session_id': 'string', - 'frame_entrypoint': 'string', - 'has_umg': 'bool', - 'height': 'unsigned int', - 'ios_bundle_id': 'string', - 'media_effect_ids': 'list', - 'media_effect_source_object_id': 'int', - 'msqrd_mask_id': 'string', - 'photo': 'string', - 'picture': 'string', - 'profile_pic_method': 'string', - 'profile_pic_source': 'string', - 'proxied_app_id': 'int', - 'qn': 'string', - 'reuse': 'bool', - 'scaled_crop_rect': 'Object', - 'set_profile_photo_shield': 'string', - 'sticker_id': 'int', - 'sticker_source_object_id': 'int', - 'suppress_stories': 'bool', - 'width': 'unsigned int', - 'x': 'unsigned int', - 'y': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/picture', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProfilePictureSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProfilePictureSource, 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_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.') - from facebook_business.adobjects.pagepost import PagePost - param_types = { - 'include_hidden': 'bool', - 'limit': 'unsigned int', - 'q': 'string', - 'show_expired': 'bool', - 'with': 'with_enum', - } - enums = { - 'with_enum': PagePost.With.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - api_type='EDGE', - response_parser=ObjectParser(target_class=PagePost, 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_catalogs', - 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() - - def get_published_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.') - from facebook_business.adobjects.pagepost import PagePost - param_types = { - 'include_hidden': 'bool', - 'limit': 'unsigned int', - 'show_expired': 'bool', - 'with': 'with_enum', - } - enums = { - 'with_enum': PagePost.With.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/published_posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - api_type='EDGE', - response_parser=ObjectParser(target_class=PagePost, 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_ratings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.recommendation import Recommendation - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ratings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Recommendation, - api_type='EDGE', - response_parser=ObjectParser(target_class=Recommendation, 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_release_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'recipient': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/release_thread_control', - 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 create_request_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'metadata': 'string', - 'recipient': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/request_thread_control', - 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_roles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'include_deactivated': 'bool', - 'uid': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/roles', - 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() - - def get_rtb_dynamic_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.') - from facebook_business.adobjects.rtbdynamicpost import RTBDynamicPost - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/rtb_dynamic_posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=RTBDynamicPost, - api_type='EDGE', - response_parser=ObjectParser(target_class=RTBDynamicPost, 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_scheduled_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.') - from facebook_business.adobjects.pagepost import PagePost - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/scheduled_posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - api_type='EDGE', - response_parser=ObjectParser(target_class=PagePost, 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_secondary_receivers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'platform': 'platform_enum', - } - enums = { - 'platform_enum': Application.Platform.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/secondary_receivers', - 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_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.pagesettings import PageSettings - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/settings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=PageSettings, 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_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 = { - 'option': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/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_shop_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.commercemerchantsettingssetupstatus import CommerceMerchantSettingsSetupStatus - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/shop_setup_status', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CommerceMerchantSettingsSetupStatus, - api_type='EDGE', - response_parser=ObjectParser(target_class=CommerceMerchantSettingsSetupStatus, 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.') - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/subscribed_apps', - 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_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.') - from facebook_business.adobjects.application import Application - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/subscribed_apps', - 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 create_subscribed_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.') - param_types = { - 'subscribed_fields': 'list', - } - enums = { - 'subscribed_fields_enum': Page.SubscribedFields.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/subscribed_apps', - 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_tabs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.tab import Tab - param_types = { - 'tab': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/tabs', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Tab, - api_type='EDGE', - response_parser=ObjectParser(target_class=Tab, 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_tagged(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.pagepost import PagePost - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/tagged', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - api_type='EDGE', - response_parser=ObjectParser(target_class=PagePost, 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_take_thread_control(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'metadata': 'string', - 'recipient': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/take_thread_control', - 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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.pagethreadowner import PageThreadOwner - param_types = { - 'recipient': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/thread_owner', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageThreadOwner, - api_type='EDGE', - response_parser=ObjectParser(target_class=PageThreadOwner, 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_threads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.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'], - method='GET', - endpoint='/threads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=UnifiedThread, - api_type='EDGE', - response_parser=ObjectParser(target_class=UnifiedThread, 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_unlink_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 = { - 'psid': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/unlink_accounts', - 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_video_copyright_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.videocopyrightrule import VideoCopyrightRule - param_types = { - 'selected_rule_id': 'string', - 'source': 'source_enum', - } - enums = { - 'source_enum': VideoCopyrightRule.Source.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/video_copyright_rules', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoCopyrightRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoCopyrightRule, 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_copyright_rule(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.videocopyrightrule import VideoCopyrightRule - param_types = { - 'condition_groups': 'list', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/video_copyright_rules', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoCopyrightRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoCopyrightRule, 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_copyright(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.videocopyright import VideoCopyright - param_types = { - 'attribution_id': 'string', - 'content_category': 'content_category_enum', - 'copyright_content_id': 'string', - 'excluded_ownership_countries': 'list', - 'excluded_ownership_segments': 'list', - 'is_reference_disabled': 'bool', - 'is_reference_video': 'bool', - 'monitoring_type': 'monitoring_type_enum', - 'ownership_countries': 'list', - 'rule_id': 'string', - 'tags': 'list', - 'whitelisted_ids': 'list', - 'whitelisted_ig_user_ids': 'list', - } - enums = { - 'content_category_enum': VideoCopyright.ContentCategory.__dict__.values(), - 'monitoring_type_enum': VideoCopyright.MonitoringType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/video_copyrights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoCopyright, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoCopyright, 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_video_lists(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.videolist import VideoList - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/video_lists', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoList, - api_type='EDGE', - response_parser=ObjectParser(target_class=VideoList, 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_video_reels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/video_reels', - 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) - - if batch is 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_reel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - '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': AdVideo.UploadPhase.__dict__.values(), - 'video_state_enum': AdVideo.VideoState.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/video_reels', - 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) - - if batch is 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.advideo import AdVideo - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': AdVideo.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - 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) - - if batch is 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_breaks': 'list', - 'adaptive_type': 'string', - 'animated_effect_id': 'unsigned int', - 'application_id': 'string', - 'asked_fun_fact_prompt_id': 'unsigned int', - 'audio_story_wave_animation_handle': 'string', - 'backdated_post': 'list', - 'call_to_action': 'Object', - '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', - 'content_tags': 'list', - 'creative_tools': 'string', - 'crossposted_video_id': 'string', - 'custom_labels': 'list', - 'description': 'string', - 'direct_share_status': 'unsigned int', - 'embeddable': 'bool', - 'end_offset': 'unsigned int', - 'expiration': 'Object', - 'fbuploader_video_file_chunk': 'string', - 'feed_targeting': 'Object', - '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_explicit_share': 'bool', - 'is_group_linking_post': 'bool', - 'is_voice_clip': 'bool', - 'location_source_id': 'string', - 'manual_privacy': 'bool', - 'multilingual_data': 'list', - 'no_story': 'bool', - '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', - 'published': 'bool', - 'react_mode_metadata': 'string', - 'reference_only': 'bool', - 'referenced_sticker_id': 'string', - 'replace_video_id': 'string', - 'scheduled_publish_time': 'unsigned int', - 'secret': 'bool', - 'slideshow_spec': 'map', - 'social_actions': 'bool', - 'source': 'string', - 'source_instagram_media_id': 'string', - 'specified_dialect': 'string', - 'spherical': 'bool', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'start_offset': 'unsigned int', - 'swap_mode': 'swap_mode_enum', - 'targeting': 'Object', - 'text_format_metadata': 'string', - 'throwback_camera_roll_media': 'string', - 'thumb': 'file', - 'time_since_original_post': 'unsigned int', - 'title': 'string', - 'transcode_setting_properties': 'string', - 'universal_video_id': 'string', - 'unpublished_content_type': 'unpublished_content_type_enum', - 'upload_phase': 'upload_phase_enum', - 'upload_session_id': 'string', - 'upload_setting_properties': 'string', - 'video_asset_id': 'string', - '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(), - } - 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) - - if batch is 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_visitor_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.') - from facebook_business.adobjects.pagepost import PagePost - param_types = { - 'include_hidden': 'bool', - 'limit': 'unsigned int', - 'show_expired': 'bool', - 'with': 'with_enum', - } - enums = { - 'with_enum': PagePost.With.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/visitor_posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - api_type='EDGE', - response_parser=ObjectParser(target_class=PagePost, 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_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 = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - 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), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is 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 = { - 'about': 'string', - 'access_token': 'string', - 'ad_campaign': 'AdSet', - 'affiliation': 'string', - 'app_id': 'string', - 'artists_we_like': 'string', - 'attire': 'string', - 'available_promo_offer_ids': 'list>>>', - 'awards': 'string', - 'band_interests': 'string', - 'band_members': 'string', - 'best_page': 'Page', - 'bio': 'string', - 'birthday': 'string', - 'booking_agent': 'string', - 'breaking_news_usage': 'Object', - 'built': 'string', - 'business': 'Object', - 'can_checkin': 'bool', - 'can_post': 'bool', - 'category': 'string', - 'category_list': 'list', - 'checkins': 'unsigned int', - 'company_overview': 'string', - 'connected_instagram_account': 'IGUser', - 'connected_page_backed_instagram_account': 'IGUser', - 'contact_address': 'MailingAddress', - 'copyright_whitelisted_ig_partners': 'list', - 'country_page_likes': 'unsigned int', - 'cover': 'CoverPhoto', - 'culinary_team': 'string', - 'current_location': 'string', - 'delivery_and_pickup_option_info': 'list', - 'description': 'string', - 'description_html': 'string', - 'differently_open_offerings': 'list>', - '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', - 'featured_video': 'AdVideo', - 'features': 'string', - 'followers_count': 'unsigned int', - 'food_styles': 'list', - 'founded': 'string', - 'general_info': 'string', - 'general_manager': 'string', - 'genre': 'string', - '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', - 'hometown': 'string', - 'hours': 'map', - 'id': 'string', - 'impressum': 'string', - 'influences': 'string', - 'instagram_business_account': 'IGUser', - 'is_always_open': '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', - 'is_permanently_closed': 'bool', - 'is_published': 'bool', - 'is_unclaimed': 'bool', - 'is_verified': 'bool', - 'is_webhooks_subscribed': 'bool', - 'keywords': 'Object', - 'leadgen_tos_acceptance_time': 'datetime', - 'leadgen_tos_accepted': 'bool', - 'leadgen_tos_accepting_user': 'User', - 'link': 'string', - 'location': 'Location', - 'members': 'string', - 'merchant_id': 'string', - 'merchant_review_status': 'string', - 'messaging_feature_status': 'MessagingFeatureStatus', - 'messenger_ads_default_icebreakers': 'list', - 'messenger_ads_default_quick_replies': 'list', - 'messenger_ads_quick_replies_type': 'string', - 'mini_shop_storefront': 'Shop', - 'mission': 'string', - 'mpg': 'string', - 'name': 'string', - 'name_with_location_descriptor': 'string', - 'network': 'string', - 'new_like_count': 'unsigned int', - 'offer_eligible': 'bool', - 'overall_star_rating': 'float', - 'owner_business': 'Business', - 'page_token': 'string', - 'parent_page': 'Page', - 'parking': 'PageParking', - 'payment_options': 'PagePaymentOptions', - 'personal_info': 'string', - 'personal_interests': 'string', - 'pharma_safety_info': 'string', - 'phone': 'string', - 'pickup_options': 'list', - 'place_type': 'string', - 'plot_outline': 'string', - 'preferred_audience': 'Targeting', - 'press_contact': 'string', - 'price_range': 'string', - 'privacy_info_url': 'string', - 'produced_by': 'string', - 'products': 'string', - 'promotion_eligible': 'bool', - 'promotion_ineligible_reason': 'string', - 'public_transit': 'string', - 'rating_count': 'unsigned int', - 'recipient': 'string', - 'record_label': 'string', - 'release_date': 'string', - 'restaurant_services': 'PageRestaurantServices', - 'restaurant_specialties': 'PageRestaurantSpecialties', - 'schedule': 'string', - 'screenplay_by': 'string', - 'season': 'string', - 'single_line_address': 'string', - 'starring': 'string', - 'start_info': 'PageStartInfo', - 'store_code': 'string', - 'store_location_descriptor': 'string', - 'store_number': 'unsigned int', - 'studio': 'string', - 'supports_donate_button_in_live_video': 'bool', - 'talking_about_count': 'unsigned int', - 'temporary_status': 'string', - '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', - 'website': 'string', - 'were_here_count': 'unsigned int', - 'whatsapp_number': 'string', - 'written_by': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Attire'] = Page.Attire.__dict__.values() - field_enum_info['FoodStyles'] = Page.FoodStyles.__dict__.values() - field_enum_info['PickupOptions'] = Page.PickupOptions.__dict__.values() - field_enum_info['TemporaryStatus'] = Page.TemporaryStatus.__dict__.values() - field_enum_info['PermittedTasks'] = Page.PermittedTasks.__dict__.values() - field_enum_info['Tasks'] = Page.Tasks.__dict__.values() - field_enum_info['Alignment'] = Page.Alignment.__dict__.values() - field_enum_info['EntryPointIcon'] = Page.EntryPointIcon.__dict__.values() - field_enum_info['EntryPointLabel'] = Page.EntryPointLabel.__dict__.values() - field_enum_info['GreetingDialogDisplay'] = Page.GreetingDialogDisplay.__dict__.values() - 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['Formatting'] = Page.Formatting.__dict__.values() - field_enum_info['PlaceAttachmentSetting'] = Page.PlaceAttachmentSetting.__dict__.values() - field_enum_info['PostSurfacesBlacklist'] = Page.PostSurfacesBlacklist.__dict__.values() - field_enum_info['PostingToRedspace'] = Page.PostingToRedspace.__dict__.values() - field_enum_info['TargetSurface'] = Page.TargetSurface.__dict__.values() - field_enum_info['UnpublishedContentType'] = Page.UnpublishedContentType.__dict__.values() - field_enum_info['MessagingType'] = Page.MessagingType.__dict__.values() - field_enum_info['NotificationType'] = Page.NotificationType.__dict__.values() - field_enum_info['SenderAction'] = Page.SenderAction.__dict__.values() - field_enum_info['SuggestionAction'] = Page.SuggestionAction.__dict__.values() - field_enum_info['Platform'] = Page.Platform.__dict__.values() - 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/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblock.py b/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblock.py deleted file mode 100644 index 1f40064..0000000 --- a/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblock.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py b/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py deleted file mode 100644 index f75f61a..0000000 --- a/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py b/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py deleted file mode 100644 index a0dcf3f..0000000 --- a/tap_facebook/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/pagecalltoaction.py b/tap_facebook/facebook_business/adobjects/pagecalltoaction.py deleted file mode 100644 index e207dd5..0000000 --- a/tap_facebook/facebook_business/adobjects/pagecalltoaction.py +++ /dev/null @@ -1,265 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PageCallToAction( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPageCallToAction = True - super(PageCallToAction, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - android_app = 'android_app' - android_deeplink = 'android_deeplink' - android_destination_type = 'android_destination_type' - android_package_name = 'android_package_name' - android_url = 'android_url' - created_time = 'created_time' - email_address = 'email_address' - field_from = 'from' - id = 'id' - intl_number_with_plus = 'intl_number_with_plus' - iphone_app = 'iphone_app' - iphone_deeplink = 'iphone_deeplink' - iphone_destination_type = 'iphone_destination_type' - iphone_url = 'iphone_url' - status = 'status' - type = 'type' - updated_time = 'updated_time' - web_destination_type = 'web_destination_type' - web_url = 'web_url' - - class AndroidDestinationType: - app_deeplink = 'APP_DEEPLINK' - become_a_volunteer = 'BECOME_A_VOLUNTEER' - email = 'EMAIL' - facebook_app = 'FACEBOOK_APP' - follow = 'FOLLOW' - marketplace_inventory_page = 'MARKETPLACE_INVENTORY_PAGE' - menu_on_facebook = 'MENU_ON_FACEBOOK' - messenger = 'MESSENGER' - mini_shop = 'MINI_SHOP' - mobile_center = 'MOBILE_CENTER' - none = 'NONE' - phone_call = 'PHONE_CALL' - shop_on_facebook = 'SHOP_ON_FACEBOOK' - website = 'WEBSITE' - - class IphoneDestinationType: - app_deeplink = 'APP_DEEPLINK' - become_a_volunteer = 'BECOME_A_VOLUNTEER' - email = 'EMAIL' - facebook_app = 'FACEBOOK_APP' - follow = 'FOLLOW' - marketplace_inventory_page = 'MARKETPLACE_INVENTORY_PAGE' - menu_on_facebook = 'MENU_ON_FACEBOOK' - messenger = 'MESSENGER' - mini_shop = 'MINI_SHOP' - none = 'NONE' - phone_call = 'PHONE_CALL' - shop_on_facebook = 'SHOP_ON_FACEBOOK' - website = 'WEBSITE' - - class Type: - become_a_volunteer = 'BECOME_A_VOLUNTEER' - book_appointment = 'BOOK_APPOINTMENT' - book_now = 'BOOK_NOW' - buy_tickets = 'BUY_TICKETS' - call_now = 'CALL_NOW' - charity_donate = 'CHARITY_DONATE' - contact_us = 'CONTACT_US' - donate_now = 'DONATE_NOW' - email = 'EMAIL' - follow_page = 'FOLLOW_PAGE' - get_directions = 'GET_DIRECTIONS' - get_offer = 'GET_OFFER' - get_offer_view = 'GET_OFFER_VIEW' - interested = 'INTERESTED' - learn_more = 'LEARN_MORE' - listen = 'LISTEN' - local_dev_platform = 'LOCAL_DEV_PLATFORM' - message = 'MESSAGE' - mobile_center = 'MOBILE_CENTER' - open_app = 'OPEN_APP' - order_food = 'ORDER_FOOD' - play_music = 'PLAY_MUSIC' - play_now = 'PLAY_NOW' - purchase_gift_cards = 'PURCHASE_GIFT_CARDS' - request_appointment = 'REQUEST_APPOINTMENT' - request_quote = 'REQUEST_QUOTE' - shop_now = 'SHOP_NOW' - shop_on_facebook = 'SHOP_ON_FACEBOOK' - sign_up = 'SIGN_UP' - view_inventory = 'VIEW_INVENTORY' - view_menu = 'VIEW_MENU' - view_shop = 'VIEW_SHOP' - visit_group = 'VISIT_GROUP' - watch_now = 'WATCH_NOW' - woodhenge_support = 'WOODHENGE_SUPPORT' - - class WebDestinationType: - become_a_volunteer = 'BECOME_A_VOLUNTEER' - become_supporter = 'BECOME_SUPPORTER' - email = 'EMAIL' - follow = 'FOLLOW' - messenger = 'MESSENGER' - mobile_center = 'MOBILE_CENTER' - none = 'NONE' - shop_on_facebook = 'SHOP_ON_FACEBOOK' - website = 'WEBSITE' - - 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=PageCallToAction, - 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 = { - 'android_app_id': 'int', - 'android_destination_type': 'android_destination_type_enum', - 'android_package_name': 'string', - 'android_url': 'string', - 'email_address': 'string', - 'intl_number_with_plus': 'string', - 'iphone_app_id': 'int', - 'iphone_destination_type': 'iphone_destination_type_enum', - 'iphone_url': 'string', - 'type': 'type_enum', - 'web_destination_type': 'web_destination_type_enum', - 'web_url': 'string', - } - enums = { - 'android_destination_type_enum': PageCallToAction.AndroidDestinationType.__dict__.values(), - 'iphone_destination_type_enum': PageCallToAction.IphoneDestinationType.__dict__.values(), - 'type_enum': PageCallToAction.Type.__dict__.values(), - 'web_destination_type_enum': PageCallToAction.WebDestinationType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageCallToAction, - 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_app': 'Application', - 'android_deeplink': 'string', - 'android_destination_type': 'string', - 'android_package_name': 'string', - 'android_url': 'string', - 'created_time': 'datetime', - 'email_address': 'string', - 'from': 'Page', - 'id': 'string', - 'intl_number_with_plus': 'string', - 'iphone_app': 'Application', - 'iphone_deeplink': 'string', - 'iphone_destination_type': 'string', - 'iphone_url': 'string', - 'status': 'string', - 'type': 'string', - 'updated_time': 'datetime', - 'web_destination_type': 'string', - 'web_url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['AndroidDestinationType'] = PageCallToAction.AndroidDestinationType.__dict__.values() - field_enum_info['IphoneDestinationType'] = PageCallToAction.IphoneDestinationType.__dict__.values() - field_enum_info['Type'] = PageCallToAction.Type.__dict__.values() - field_enum_info['WebDestinationType'] = PageCallToAction.WebDestinationType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagecategory.py b/tap_facebook/facebook_business/adobjects/pagecategory.py deleted file mode 100644 index 5c884f2..0000000 --- a/tap_facebook/facebook_business/adobjects/pagecategory.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PageCategory( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPageCategory = True - super(PageCategory, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - api_enum = 'api_enum' - fb_page_categories = 'fb_page_categories' - id = 'id' - name = 'name' - - _field_types = { - 'api_enum': 'string', - 'fb_page_categories': 'list', - 'id': 'string', - 'name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagechangeproposal.py b/tap_facebook/facebook_business/adobjects/pagechangeproposal.py deleted file mode 100644 index dd3df51..0000000 --- a/tap_facebook/facebook_business/adobjects/pagechangeproposal.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PageChangeProposal( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPageChangeProposal = True - super(PageChangeProposal, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - acceptance_status = 'acceptance_status' - category = 'category' - current_value = 'current_value' - id = 'id' - proposed_value = 'proposed_value' - upcoming_change_info = 'upcoming_change_info' - - _field_types = { - 'acceptance_status': 'string', - 'category': 'string', - 'current_value': 'string', - 'id': 'string', - 'proposed_value': 'string', - 'upcoming_change_info': 'PageUpcomingChange', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagecommerceeligibility.py b/tap_facebook/facebook_business/adobjects/pagecommerceeligibility.py deleted file mode 100644 index b83bcb6..0000000 --- a/tap_facebook/facebook_business/adobjects/pagecommerceeligibility.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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 - - diff --git a/tap_facebook/facebook_business/adobjects/pageparking.py b/tap_facebook/facebook_business/adobjects/pageparking.py deleted file mode 100644 index 625a75b..0000000 --- a/tap_facebook/facebook_business/adobjects/pageparking.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PageParking( - AbstractObject, -): - - def __init__(self, api=None): - super(PageParking, self).__init__() - self._isPageParking = True - self._api = api - - class Field(AbstractObject.Field): - lot = 'lot' - street = 'street' - valet = 'valet' - - _field_types = { - 'lot': 'unsigned int', - 'street': 'unsigned int', - 'valet': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagepaymentoptions.py b/tap_facebook/facebook_business/adobjects/pagepaymentoptions.py deleted file mode 100644 index 46a4738..0000000 --- a/tap_facebook/facebook_business/adobjects/pagepaymentoptions.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PagePaymentOptions( - AbstractObject, -): - - def __init__(self, api=None): - super(PagePaymentOptions, self).__init__() - self._isPagePaymentOptions = True - self._api = api - - class Field(AbstractObject.Field): - amex = 'amex' - cash_only = 'cash_only' - discover = 'discover' - mastercard = 'mastercard' - visa = 'visa' - - _field_types = { - 'amex': 'unsigned int', - 'cash_only': 'unsigned int', - 'discover': 'unsigned int', - 'mastercard': 'unsigned int', - 'visa': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagepost.py b/tap_facebook/facebook_business/adobjects/pagepost.py deleted file mode 100644 index 8012fc6..0000000 --- a/tap_facebook/facebook_business/adobjects/pagepost.py +++ /dev/null @@ -1,703 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PagePost( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPagePost = True - super(PagePost, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - actions = 'actions' - admin_creator = 'admin_creator' - allowed_advertising_objectives = 'allowed_advertising_objectives' - application = 'application' - backdated_time = 'backdated_time' - call_to_action = 'call_to_action' - can_reply_privately = 'can_reply_privately' - child_attachments = 'child_attachments' - comments_mirroring_domain = 'comments_mirroring_domain' - coordinates = 'coordinates' - created_time = 'created_time' - event = 'event' - expanded_height = 'expanded_height' - expanded_width = 'expanded_width' - feed_targeting = 'feed_targeting' - field_from = 'from' - full_picture = 'full_picture' - height = 'height' - icon = 'icon' - id = 'id' - instagram_eligibility = 'instagram_eligibility' - is_app_share = 'is_app_share' - is_eligible_for_promotion = 'is_eligible_for_promotion' - is_expired = 'is_expired' - is_hidden = 'is_hidden' - is_inline_created = 'is_inline_created' - is_instagram_eligible = 'is_instagram_eligible' - is_popular = 'is_popular' - is_published = 'is_published' - is_spherical = 'is_spherical' - message = 'message' - message_tags = 'message_tags' - multi_share_end_card = 'multi_share_end_card' - multi_share_optimized = 'multi_share_optimized' - parent_id = 'parent_id' - permalink_url = 'permalink_url' - picture = 'picture' - place = 'place' - privacy = 'privacy' - promotable_id = 'promotable_id' - promotion_status = 'promotion_status' - properties = 'properties' - scheduled_publish_time = 'scheduled_publish_time' - shares = 'shares' - status_type = 'status_type' - story = 'story' - story_tags = 'story_tags' - subscribed = 'subscribed' - target = 'target' - targeting = 'targeting' - timeline_visibility = 'timeline_visibility' - updated_time = 'updated_time' - via = 'via' - video_buying_eligibility = 'video_buying_eligibility' - width = 'width' - - class With: - location = 'LOCATION' - - class BackdatedTimeGranularity: - day = 'day' - hour = 'hour' - min = 'min' - month = 'month' - none = 'none' - year = 'year' - - class FeedStoryVisibility: - hidden = 'hidden' - visible = 'visible' - - class TimelineVisibility: - forced_allow = 'forced_allow' - hidden = 'hidden' - normal = 'normal' - - 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 = { - 'primary_fb_page_id': 'string', - 'primary_ig_user_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - 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 = { - 'attached_media': 'list', - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'backdated_time_granularity_enum', - 'composer_session_id': 'string', - 'direct_share_status': 'unsigned int', - 'explicitly_added_mentionee_ids': 'list', - 'feed_story_visibility': 'feed_story_visibility_enum', - 'is_explicit_location': 'bool', - 'is_hidden': 'bool', - 'is_pinned': 'bool', - 'is_published': 'bool', - 'message': 'string', - 'og_action_type_id': 'string', - 'og_hide_object_attachment': 'bool', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'place': 'Object', - 'privacy': 'string', - 'product_item': 'Object', - 'scheduled_publish_time': 'unsigned int', - 'should_sync_product_edit': 'bool', - 'source_type': 'string', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'tags': 'list', - 'text_format_preset_id': 'string', - 'timeline_visibility': 'timeline_visibility_enum', - 'tracking': 'string', - } - enums = { - 'backdated_time_granularity_enum': PagePost.BackdatedTimeGranularity.__dict__.values(), - 'feed_story_visibility_enum': PagePost.FeedStoryVisibility.__dict__.values(), - 'timeline_visibility_enum': PagePost.TimelineVisibility.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - 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_attachments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/attachments', - 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_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 = { - 'filter': 'filter_enum', - 'live_filter': 'live_filter_enum', - 'order': 'order_enum', - 'since': 'datetime', - } - enums = { - 'filter_enum': Comment.Filter.__dict__.values(), - 'live_filter_enum': Comment.LiveFilter.__dict__.values(), - '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() - - 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.comment import Comment - param_types = { - 'attachment_id': 'string', - 'attachment_share_url': 'string', - 'attachment_url': 'string', - 'comment': 'string', - 'comment_privacy_value': 'comment_privacy_value_enum', - 'feedback_source': 'string', - 'message': 'string', - 'nectar_module': 'string', - 'parent_comment_id': 'Object', - 'post_id': 'string', - 'tracking': 'string', - } - enums = { - 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - 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() - - def get_dynamic_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.') - from facebook_business.adobjects.rtbdynamicpost import RTBDynamicPost - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/dynamic_posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=RTBDynamicPost, - api_type='EDGE', - response_parser=ObjectParser(target_class=RTBDynamicPost, 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_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 = { - 'date_preset': 'date_preset_enum', - 'metric': 'list', - 'period': 'period_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'date_preset_enum': InsightsResult.DatePreset.__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() - - def delete_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'nectar_module': 'string', - 'tracking': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/likes', - 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_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', - 'tracking': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PagePost, - api_type='EDGE', - response_parser=ObjectParser(target_class=PagePost, 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_reactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': Profile.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/reactions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_shared_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.') - from facebook_business.adobjects.post import Post - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/sharedposts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - api_type='EDGE', - response_parser=ObjectParser(target_class=Post, 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_sponsor_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/sponsor_tags', - 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_to(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/to', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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 = { - 'actions': 'list', - 'admin_creator': 'Object', - 'allowed_advertising_objectives': 'list', - 'application': 'Application', - 'backdated_time': 'datetime', - 'call_to_action': 'Object', - 'can_reply_privately': 'bool', - 'child_attachments': 'list', - 'comments_mirroring_domain': 'string', - 'coordinates': 'Object', - 'created_time': 'datetime', - 'event': 'Event', - 'expanded_height': 'unsigned int', - 'expanded_width': 'unsigned int', - 'feed_targeting': 'Object', - 'from': 'Object', - 'full_picture': 'string', - 'height': 'unsigned int', - 'icon': 'string', - 'id': 'string', - 'instagram_eligibility': 'string', - 'is_app_share': 'bool', - 'is_eligible_for_promotion': 'bool', - 'is_expired': 'bool', - 'is_hidden': 'bool', - 'is_inline_created': 'bool', - 'is_instagram_eligible': 'bool', - 'is_popular': 'bool', - 'is_published': 'bool', - 'is_spherical': 'bool', - 'message': 'string', - 'message_tags': 'list', - 'multi_share_end_card': 'bool', - 'multi_share_optimized': 'bool', - 'parent_id': 'string', - 'permalink_url': 'string', - 'picture': 'string', - 'place': 'Place', - 'privacy': 'Privacy', - 'promotable_id': 'string', - 'promotion_status': 'string', - 'properties': 'list', - 'scheduled_publish_time': 'float', - 'shares': 'Object', - 'status_type': 'string', - 'story': 'string', - 'story_tags': 'list', - 'subscribed': 'bool', - 'target': 'Profile', - 'targeting': 'Object', - 'timeline_visibility': 'string', - 'updated_time': 'datetime', - 'via': 'Object', - 'video_buying_eligibility': 'list', - 'width': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['With'] = PagePost.With.__dict__.values() - field_enum_info['BackdatedTimeGranularity'] = PagePost.BackdatedTimeGranularity.__dict__.values() - field_enum_info['FeedStoryVisibility'] = PagePost.FeedStoryVisibility.__dict__.values() - field_enum_info['TimelineVisibility'] = PagePost.TimelineVisibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagepostexperiment.py b/tap_facebook/facebook_business/adobjects/pagepostexperiment.py deleted file mode 100644 index efff1ba..0000000 --- a/tap_facebook/facebook_business/adobjects/pagepostexperiment.py +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PagePostExperiment( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPagePostExperiment = True - super(PagePostExperiment, self).__init__(fbid, parent_id, api) - - 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' - optimization_goal = 'optimization_goal' - publish_status = 'publish_status' - publish_time = 'publish_time' - 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): - 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=PagePostExperiment, - 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_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', - 'optimization_goal': 'string', - 'publish_status': 'string', - 'publish_time': 'datetime', - 'scheduled_experiment_timestamp': 'datetime', - 'updated_time': 'datetime', - } - @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/tap_facebook/facebook_business/adobjects/pagerestaurantservices.py b/tap_facebook/facebook_business/adobjects/pagerestaurantservices.py deleted file mode 100644 index 28cd05b..0000000 --- a/tap_facebook/facebook_business/adobjects/pagerestaurantservices.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PageRestaurantServices( - AbstractObject, -): - - def __init__(self, api=None): - super(PageRestaurantServices, self).__init__() - self._isPageRestaurantServices = True - self._api = api - - class Field(AbstractObject.Field): - catering = 'catering' - delivery = 'delivery' - groups = 'groups' - kids = 'kids' - outdoor = 'outdoor' - pickup = 'pickup' - reserve = 'reserve' - takeout = 'takeout' - waiter = 'waiter' - walkins = 'walkins' - - _field_types = { - 'catering': 'bool', - 'delivery': 'bool', - 'groups': 'bool', - 'kids': 'bool', - 'outdoor': 'bool', - 'pickup': 'bool', - 'reserve': 'bool', - 'takeout': 'bool', - 'waiter': 'bool', - 'walkins': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagerestaurantspecialties.py b/tap_facebook/facebook_business/adobjects/pagerestaurantspecialties.py deleted file mode 100644 index 9fd4536..0000000 --- a/tap_facebook/facebook_business/adobjects/pagerestaurantspecialties.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PageRestaurantSpecialties( - AbstractObject, -): - - def __init__(self, api=None): - super(PageRestaurantSpecialties, self).__init__() - self._isPageRestaurantSpecialties = True - self._api = api - - class Field(AbstractObject.Field): - breakfast = 'breakfast' - coffee = 'coffee' - dinner = 'dinner' - drinks = 'drinks' - lunch = 'lunch' - - _field_types = { - 'breakfast': 'unsigned int', - 'coffee': 'unsigned int', - 'dinner': 'unsigned int', - 'drinks': 'unsigned int', - 'lunch': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagesavedfilter.py b/tap_facebook/facebook_business/adobjects/pagesavedfilter.py deleted file mode 100644 index cdfbac5..0000000 --- a/tap_facebook/facebook_business/adobjects/pagesavedfilter.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PageSavedFilter( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPageSavedFilter = True - super(PageSavedFilter, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - display_name = 'display_name' - filters = 'filters' - id = 'id' - page_id = 'page_id' - section = 'section' - 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=PageSavedFilter, - 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 = { - 'display_name': 'string', - 'filters': 'list', - 'id': 'string', - 'page_id': 'string', - 'section': 'string', - 'time_created': 'int', - 'time_updated': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagesettings.py b/tap_facebook/facebook_business/adobjects/pagesettings.py deleted file mode 100644 index 16fdc0e..0000000 --- a/tap_facebook/facebook_business/adobjects/pagesettings.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PageSettings( - AbstractObject, -): - - def __init__(self, api=None): - super(PageSettings, self).__init__() - self._isPageSettings = True - self._api = api - - class Field(AbstractObject.Field): - setting = 'setting' - value = 'value' - - _field_types = { - 'setting': 'string', - 'value': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagestartinfo.py b/tap_facebook/facebook_business/adobjects/pagestartinfo.py deleted file mode 100644 index 327af91..0000000 --- a/tap_facebook/facebook_business/adobjects/pagestartinfo.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PageStartInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(PageStartInfo, self).__init__() - self._isPageStartInfo = True - self._api = api - - class Field(AbstractObject.Field): - date = 'date' - type = 'type' - - _field_types = { - 'date': 'Object', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pagethreadowner.py b/tap_facebook/facebook_business/adobjects/pagethreadowner.py deleted file mode 100644 index 6ccb770..0000000 --- a/tap_facebook/facebook_business/adobjects/pagethreadowner.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PageThreadOwner( - AbstractObject, -): - - def __init__(self, api=None): - super(PageThreadOwner, self).__init__() - self._isPageThreadOwner = True - self._api = api - - class Field(AbstractObject.Field): - thread_owner = 'thread_owner' - - _field_types = { - 'thread_owner': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pageupcomingchange.py b/tap_facebook/facebook_business/adobjects/pageupcomingchange.py deleted file mode 100644 index 1229194..0000000 --- a/tap_facebook/facebook_business/adobjects/pageupcomingchange.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PageUpcomingChange( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPageUpcomingChange = True - super(PageUpcomingChange, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - change_type = 'change_type' - effective_time = 'effective_time' - id = 'id' - page = 'page' - proposal = 'proposal' - timer_status = 'timer_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=PageUpcomingChange, - 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 = { - 'change_type': 'string', - 'effective_time': 'datetime', - 'id': 'string', - 'page': 'Page', - 'proposal': 'PageChangeProposal', - 'timer_status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/pageusermessagethreadlabel.py b/tap_facebook/facebook_business/adobjects/pageusermessagethreadlabel.py deleted file mode 100644 index a05391b..0000000 --- a/tap_facebook/facebook_business/adobjects/pageusermessagethreadlabel.py +++ /dev/null @@ -1,164 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PageUserMessageThreadLabel( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPageUserMessageThreadLabel = True - super(PageUserMessageThreadLabel, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - page_label_name = 'page_label_name' - - 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=PageUserMessageThreadLabel, - 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_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/label', - 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_label(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/label', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageUserMessageThreadLabel, - api_type='EDGE', - response_parser=ObjectParser(target_class=PageUserMessageThreadLabel, 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', - 'page_label_name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/partnerstudy.py b/tap_facebook/facebook_business/adobjects/partnerstudy.py deleted file mode 100644 index 1397142..0000000 --- a/tap_facebook/facebook_business/adobjects/partnerstudy.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PartnerStudy( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPartnerStudy = True - super(PartnerStudy, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - additional_info = 'additional_info' - brand = 'brand' - client_name = 'client_name' - emails = 'emails' - id = 'id' - input_ids = 'input_ids' - is_export = 'is_export' - lift_study = 'lift_study' - location = 'location' - match_file_ds = 'match_file_ds' - name = 'name' - partner_defined_id = 'partner_defined_id' - partner_household_graph_dataset_id = 'partner_household_graph_dataset_id' - status = 'status' - study_end_date = 'study_end_date' - study_start_date = 'study_start_date' - study_type = 'study_type' - submit_date = 'submit_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=PartnerStudy, - 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_info': 'string', - 'brand': 'string', - 'client_name': 'string', - 'emails': 'string', - 'id': 'string', - 'input_ids': 'list', - 'is_export': 'bool', - 'lift_study': 'AdStudy', - 'location': 'string', - 'match_file_ds': 'string', - 'name': 'string', - 'partner_defined_id': 'string', - 'partner_household_graph_dataset_id': 'string', - 'status': 'string', - 'study_end_date': 'datetime', - 'study_start_date': 'datetime', - 'study_type': 'string', - 'submit_date': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/paymentenginepayment.py b/tap_facebook/facebook_business/adobjects/paymentenginepayment.py deleted file mode 100644 index d698e43..0000000 --- a/tap_facebook/facebook_business/adobjects/paymentenginepayment.py +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PaymentEnginePayment( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPaymentEnginePayment = True - super(PaymentEnginePayment, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - actions = 'actions' - application = 'application' - country = 'country' - created_time = 'created_time' - disputes = 'disputes' - fraud_status = 'fraud_status' - fulfillment_status = 'fulfillment_status' - id = 'id' - is_from_ad = 'is_from_ad' - is_from_page_post = 'is_from_page_post' - items = 'items' - payout_foreign_exchange_rate = 'payout_foreign_exchange_rate' - phone_support_eligible = 'phone_support_eligible' - platform = 'platform' - refundable_amount = 'refundable_amount' - request_id = 'request_id' - tax = 'tax' - tax_country = 'tax_country' - test = 'test' - user = 'user' - - class Reason: - banned_user = 'BANNED_USER' - denied_refund = 'DENIED_REFUND' - granted_replacement_item = 'GRANTED_REPLACEMENT_ITEM' - - 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=PaymentEnginePayment, - 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_dispute(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'reason': 'reason_enum', - } - enums = { - 'reason_enum': PaymentEnginePayment.Reason.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/dispute', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PaymentEnginePayment, - api_type='EDGE', - response_parser=ObjectParser(target_class=PaymentEnginePayment, 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_refund(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'amount': 'float', - 'currency': 'string', - 'reason': 'reason_enum', - } - enums = { - 'reason_enum': PaymentEnginePayment.Reason.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/refunds', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PaymentEnginePayment, - api_type='EDGE', - response_parser=ObjectParser(target_class=PaymentEnginePayment, 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 = { - 'actions': 'list', - 'application': 'Application', - 'country': 'string', - 'created_time': 'datetime', - 'disputes': 'list', - 'fraud_status': 'string', - 'fulfillment_status': 'string', - 'id': 'string', - 'is_from_ad': 'bool', - 'is_from_page_post': 'bool', - 'items': 'list', - 'payout_foreign_exchange_rate': 'float', - 'phone_support_eligible': 'bool', - 'platform': 'string', - 'refundable_amount': 'CurrencyAmount', - 'request_id': 'string', - 'tax': 'string', - 'tax_country': 'string', - 'test': 'unsigned int', - 'user': 'User', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Reason'] = PaymentEnginePayment.Reason.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/paymentpricepoints.py b/tap_facebook/facebook_business/adobjects/paymentpricepoints.py deleted file mode 100644 index 0ebfce9..0000000 --- a/tap_facebook/facebook_business/adobjects/paymentpricepoints.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PaymentPricepoints( - AbstractObject, -): - - def __init__(self, api=None): - super(PaymentPricepoints, self).__init__() - self._isPaymentPricepoints = True - self._api = api - - class Field(AbstractObject.Field): - mobile = 'mobile' - - _field_types = { - 'mobile': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/paymentsubscription.py b/tap_facebook/facebook_business/adobjects/paymentsubscription.py deleted file mode 100644 index a2a72ec..0000000 --- a/tap_facebook/facebook_business/adobjects/paymentsubscription.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PaymentSubscription( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPaymentSubscription = True - super(PaymentSubscription, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - amount = 'amount' - app_param_data = 'app_param_data' - application = 'application' - billing_period = 'billing_period' - canceled_reason = 'canceled_reason' - created_time = 'created_time' - currency = 'currency' - id = 'id' - last_payment = 'last_payment' - next_bill_time = 'next_bill_time' - next_period_amount = 'next_period_amount' - next_period_currency = 'next_period_currency' - next_period_product = 'next_period_product' - payment_status = 'payment_status' - pending_cancel = 'pending_cancel' - period_start_time = 'period_start_time' - product = 'product' - status = 'status' - test = 'test' - trial_amount = 'trial_amount' - trial_currency = 'trial_currency' - trial_expiry_time = 'trial_expiry_time' - updated_time = 'updated_time' - 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=PaymentSubscription, - 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 = { - 'amount': 'string', - 'app_param_data': 'string', - 'application': 'Application', - 'billing_period': 'string', - 'canceled_reason': 'string', - 'created_time': 'datetime', - 'currency': 'string', - 'id': 'string', - 'last_payment': 'PaymentEnginePayment', - 'next_bill_time': 'datetime', - 'next_period_amount': 'string', - 'next_period_currency': 'string', - 'next_period_product': 'string', - 'payment_status': 'string', - 'pending_cancel': 'bool', - 'period_start_time': 'datetime', - 'product': 'string', - 'status': 'string', - 'test': 'unsigned int', - 'trial_amount': 'string', - 'trial_currency': 'string', - 'trial_expiry_time': 'datetime', - 'updated_time': 'datetime', - 'user': 'User', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/permission.py b/tap_facebook/facebook_business/adobjects/permission.py deleted file mode 100644 index 867bfd7..0000000 --- a/tap_facebook/facebook_business/adobjects/permission.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Permission( - AbstractObject, -): - - def __init__(self, api=None): - super(Permission, self).__init__() - self._isPermission = True - self._api = api - - class Field(AbstractObject.Field): - permission = 'permission' - status = 'status' - - class Status: - declined = 'declined' - expired = 'expired' - granted = 'granted' - - _field_types = { - 'permission': 'string', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Status'] = Permission.Status.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/persona.py b/tap_facebook/facebook_business/adobjects/persona.py deleted file mode 100644 index 6cbf5f4..0000000 --- a/tap_facebook/facebook_business/adobjects/persona.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Persona( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPersona = True - super(Persona, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - name = 'name' - profile_picture_url = 'profile_picture_url' - - 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=Persona, - 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', - 'profile_picture_url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/photo.py b/tap_facebook/facebook_business/adobjects/photo.py deleted file mode 100644 index c09cb35..0000000 --- a/tap_facebook/facebook_business/adobjects/photo.py +++ /dev/null @@ -1,397 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Photo( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPhoto = True - super(Photo, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - album = 'album' - alt_text = 'alt_text' - alt_text_custom = 'alt_text_custom' - backdated_time = 'backdated_time' - backdated_time_granularity = 'backdated_time_granularity' - can_backdate = 'can_backdate' - can_delete = 'can_delete' - can_tag = 'can_tag' - created_time = 'created_time' - event = 'event' - field_from = 'from' - height = 'height' - icon = 'icon' - id = 'id' - images = 'images' - link = 'link' - name = 'name' - name_tags = 'name_tags' - page_story_id = 'page_story_id' - picture = 'picture' - place = 'place' - position = 'position' - source = 'source' - target = 'target' - updated_time = 'updated_time' - webp_images = 'webp_images' - width = 'width' - - class BackdatedTimeGranularity: - day = 'day' - hour = 'hour' - min = 'min' - month = 'month' - none = 'none' - year = 'year' - - class UnpublishedContentType: - ads_post = 'ADS_POST' - draft = 'DRAFT' - inline_created = 'INLINE_CREATED' - published = 'PUBLISHED' - reviewable_branded_content = 'REVIEWABLE_BRANDED_CONTENT' - scheduled = 'SCHEDULED' - scheduled_recurring = 'SCHEDULED_RECURRING' - - class Type: - profile = 'profile' - tagged = 'tagged' - uploaded = 'uploaded' - - 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=Photo, - 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.comment import Comment - param_types = { - 'filter': 'filter_enum', - 'live_filter': 'live_filter_enum', - 'order': 'order_enum', - 'since': 'datetime', - } - enums = { - 'filter_enum': Comment.Filter.__dict__.values(), - 'live_filter_enum': Comment.LiveFilter.__dict__.values(), - '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() - - 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.comment import Comment - param_types = { - 'attachment_id': 'string', - 'attachment_share_url': 'string', - 'attachment_url': 'string', - 'comment_privacy_value': 'comment_privacy_value_enum', - 'facepile_mentioned_ids': 'list', - 'feedback_source': 'string', - 'is_offline': 'bool', - 'message': 'string', - 'nectar_module': 'string', - 'object_id': 'string', - 'parent_comment_id': 'Object', - 'text': 'string', - 'tracking': 'string', - } - enums = { - 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - 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() - - 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 = { - 'date_preset': 'date_preset_enum', - 'metric': 'list', - 'period': 'period_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'date_preset_enum': InsightsResult.DatePreset.__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() - - def get_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_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=Photo, - api_type='EDGE', - response_parser=ObjectParser(target_class=Photo, 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_sponsor_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/sponsor_tags', - 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 = { - 'album': 'Album', - 'alt_text': 'string', - 'alt_text_custom': 'string', - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'string', - 'can_backdate': 'bool', - 'can_delete': 'bool', - 'can_tag': 'bool', - 'created_time': 'datetime', - 'event': 'Event', - 'from': 'Object', - 'height': 'unsigned int', - 'icon': 'string', - 'id': 'string', - 'images': 'list', - 'link': 'string', - 'name': 'string', - 'name_tags': 'list', - 'page_story_id': 'string', - 'picture': 'string', - 'place': 'Place', - 'position': 'unsigned int', - 'source': 'string', - 'target': 'Profile', - 'updated_time': 'datetime', - 'webp_images': 'list', - 'width': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['BackdatedTimeGranularity'] = Photo.BackdatedTimeGranularity.__dict__.values() - field_enum_info['UnpublishedContentType'] = Photo.UnpublishedContentType.__dict__.values() - field_enum_info['Type'] = Photo.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/place.py b/tap_facebook/facebook_business/adobjects/place.py deleted file mode 100644 index 1ba9ca8..0000000 --- a/tap_facebook/facebook_business/adobjects/place.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Place( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPlace = True - super(Place, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - location = 'location' - name = 'name' - overall_rating = 'overall_rating' - - 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=Place, - 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', - 'location': 'Location', - 'name': 'string', - 'overall_rating': 'float', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/placetopic.py b/tap_facebook/facebook_business/adobjects/placetopic.py deleted file mode 100644 index 1023cd9..0000000 --- a/tap_facebook/facebook_business/adobjects/placetopic.py +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PlaceTopic( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPlaceTopic = True - super(PlaceTopic, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - count = 'count' - has_children = 'has_children' - icon_url = 'icon_url' - id = 'id' - name = 'name' - parent_ids = 'parent_ids' - plural_name = 'plural_name' - top_subtopic_names = 'top_subtopic_names' - - 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 = { - 'icon_size': 'icon_size_enum', - } - enums = { - 'icon_size_enum': [ - '24', - '36', - '48', - '72', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PlaceTopic, - 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 = { - 'count': 'unsigned int', - 'has_children': 'bool', - 'icon_url': 'string', - 'id': 'string', - 'name': 'string', - 'parent_ids': 'list', - 'plural_name': 'string', - 'top_subtopic_names': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/platformimagesource.py b/tap_facebook/facebook_business/adobjects/platformimagesource.py deleted file mode 100644 index 3198891..0000000 --- a/tap_facebook/facebook_business/adobjects/platformimagesource.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class PlatformImageSource( - AbstractObject, -): - - def __init__(self, api=None): - super(PlatformImageSource, self).__init__() - self._isPlatformImageSource = True - self._api = api - - class Field(AbstractObject.Field): - height = 'height' - source = 'source' - width = 'width' - - _field_types = { - 'height': 'unsigned int', - 'source': 'string', - 'width': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/playablecontent.py b/tap_facebook/facebook_business/adobjects/playablecontent.py deleted file mode 100644 index 2ec60a9..0000000 --- a/tap_facebook/facebook_business/adobjects/playablecontent.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PlayableContent( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPlayableContent = True - super(PlayableContent, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - name = 'name' - owner = 'owner' - app_id = 'app_id' - session_id = 'session_id' - source = 'source' - source_url = 'source_url' - source_zip = 'source_zip' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'adplayables' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_ad_playable(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=PlayableContent, - 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', - 'owner': 'Profile', - 'app_id': 'string', - 'session_id': 'string', - 'source': 'file', - 'source_url': 'string', - 'source_zip': 'file', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/post.py b/tap_facebook/facebook_business/adobjects/post.py deleted file mode 100644 index 2f371af..0000000 --- a/tap_facebook/facebook_business/adobjects/post.py +++ /dev/null @@ -1,719 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Post( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPost = True - super(Post, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - actions = 'actions' - admin_creator = 'admin_creator' - allowed_advertising_objectives = 'allowed_advertising_objectives' - application = 'application' - backdated_time = 'backdated_time' - call_to_action = 'call_to_action' - can_reply_privately = 'can_reply_privately' - caption = 'caption' - child_attachments = 'child_attachments' - comments_mirroring_domain = 'comments_mirroring_domain' - coordinates = 'coordinates' - created_time = 'created_time' - description = 'description' - event = 'event' - expanded_height = 'expanded_height' - expanded_width = 'expanded_width' - feed_targeting = 'feed_targeting' - field_from = 'from' - full_picture = 'full_picture' - height = 'height' - icon = 'icon' - id = 'id' - instagram_eligibility = 'instagram_eligibility' - is_app_share = 'is_app_share' - is_eligible_for_promotion = 'is_eligible_for_promotion' - is_expired = 'is_expired' - is_hidden = 'is_hidden' - is_inline_created = 'is_inline_created' - is_instagram_eligible = 'is_instagram_eligible' - is_popular = 'is_popular' - is_published = 'is_published' - is_spherical = 'is_spherical' - link = 'link' - message = 'message' - message_tags = 'message_tags' - multi_share_end_card = 'multi_share_end_card' - multi_share_optimized = 'multi_share_optimized' - name = 'name' - object_id = 'object_id' - parent_id = 'parent_id' - permalink_url = 'permalink_url' - picture = 'picture' - place = 'place' - privacy = 'privacy' - promotable_id = 'promotable_id' - promotion_status = 'promotion_status' - properties = 'properties' - scheduled_publish_time = 'scheduled_publish_time' - shares = 'shares' - source = 'source' - status_type = 'status_type' - story = 'story' - story_tags = 'story_tags' - subscribed = 'subscribed' - target = 'target' - targeting = 'targeting' - timeline_visibility = 'timeline_visibility' - type = 'type' - updated_time = 'updated_time' - via = 'via' - video_buying_eligibility = 'video_buying_eligibility' - width = 'width' - - class BackdatedTimeGranularity: - day = 'day' - hour = 'hour' - min = 'min' - month = 'month' - none = 'none' - year = 'year' - - class Formatting: - markdown = 'MARKDOWN' - plaintext = 'PLAINTEXT' - - class PlaceAttachmentSetting: - value_1 = '1' - value_2 = '2' - - class PostSurfacesBlacklist: - value_1 = '1' - value_2 = '2' - value_3 = '3' - value_4 = '4' - value_5 = '5' - - class PostingToRedspace: - disabled = 'disabled' - enabled = 'enabled' - - class TargetSurface: - story = 'STORY' - timeline = 'TIMELINE' - - class UnpublishedContentType: - ads_post = 'ADS_POST' - draft = 'DRAFT' - inline_created = 'INLINE_CREATED' - published = 'PUBLISHED' - reviewable_branded_content = 'REVIEWABLE_BRANDED_CONTENT' - scheduled = 'SCHEDULED' - scheduled_recurring = 'SCHEDULED_RECURRING' - - class FeedStoryVisibility: - hidden = 'hidden' - visible = 'visible' - - class TimelineVisibility: - forced_allow = 'forced_allow' - hidden = 'hidden' - normal = 'normal' - - 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 = { - 'primary_fb_page_id': 'string', - 'primary_ig_user_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - 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 = { - 'attached_media': 'list', - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'backdated_time_granularity_enum', - 'composer_session_id': 'string', - 'direct_share_status': 'unsigned int', - 'explicitly_added_mentionee_ids': 'list', - 'feed_story_visibility': 'feed_story_visibility_enum', - 'is_explicit_location': 'bool', - 'is_hidden': 'bool', - 'is_pinned': 'bool', - 'is_published': 'bool', - 'message': 'string', - 'og_action_type_id': 'string', - 'og_hide_object_attachment': 'bool', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'place': 'Object', - 'privacy': 'string', - 'product_item': 'Object', - 'scheduled_publish_time': 'unsigned int', - 'should_sync_product_edit': 'bool', - 'source_type': 'string', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'tags': 'list', - 'text_format_preset_id': 'string', - 'timeline_visibility': 'timeline_visibility_enum', - 'tracking': 'string', - } - enums = { - 'backdated_time_granularity_enum': Post.BackdatedTimeGranularity.__dict__.values(), - 'feed_story_visibility_enum': Post.FeedStoryVisibility.__dict__.values(), - 'timeline_visibility_enum': Post.TimelineVisibility.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - 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_attachments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/attachments', - 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_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 = { - 'filter': 'filter_enum', - 'live_filter': 'live_filter_enum', - 'order': 'order_enum', - 'since': 'datetime', - } - enums = { - 'filter_enum': Comment.Filter.__dict__.values(), - 'live_filter_enum': Comment.LiveFilter.__dict__.values(), - '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() - - 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.comment import Comment - param_types = { - 'attachment_id': 'string', - 'attachment_share_url': 'string', - 'attachment_url': 'string', - 'comment': 'string', - 'comment_privacy_value': 'comment_privacy_value_enum', - 'feedback_source': 'string', - 'message': 'string', - 'nectar_module': 'string', - 'parent_comment_id': 'Object', - 'post_id': 'string', - 'tracking': 'string', - } - enums = { - 'comment_privacy_value_enum': Comment.CommentPrivacyValue.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - 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() - - def get_dynamic_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.') - from facebook_business.adobjects.rtbdynamicpost import RTBDynamicPost - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/dynamic_posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=RTBDynamicPost, - api_type='EDGE', - response_parser=ObjectParser(target_class=RTBDynamicPost, 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_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 = { - 'date_preset': 'date_preset_enum', - 'metric': 'list', - 'period': 'period_enum', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - 'date_preset_enum': InsightsResult.DatePreset.__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() - - def delete_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'nectar_module': 'string', - 'tracking': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/likes', - 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_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', - 'tracking': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - api_type='EDGE', - response_parser=ObjectParser(target_class=Post, 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_reactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': Profile.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/reactions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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_shared_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/sharedposts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - api_type='EDGE', - response_parser=ObjectParser(target_class=Post, 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_sponsor_tags(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/sponsor_tags', - 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_to(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/to', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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 = { - 'actions': 'list', - 'admin_creator': 'Object', - 'allowed_advertising_objectives': 'list', - 'application': 'Application', - 'backdated_time': 'datetime', - 'call_to_action': 'Object', - 'can_reply_privately': 'bool', - 'caption': 'string', - 'child_attachments': 'list', - 'comments_mirroring_domain': 'string', - 'coordinates': 'Object', - 'created_time': 'datetime', - 'description': 'string', - 'event': 'Event', - 'expanded_height': 'unsigned int', - 'expanded_width': 'unsigned int', - 'feed_targeting': 'Object', - 'from': 'Object', - 'full_picture': 'string', - 'height': 'unsigned int', - 'icon': 'string', - 'id': 'string', - 'instagram_eligibility': 'string', - 'is_app_share': 'bool', - 'is_eligible_for_promotion': 'bool', - 'is_expired': 'bool', - 'is_hidden': 'bool', - 'is_inline_created': 'bool', - 'is_instagram_eligible': 'bool', - 'is_popular': 'bool', - 'is_published': 'bool', - 'is_spherical': 'bool', - 'link': 'string', - 'message': 'string', - 'message_tags': 'list', - 'multi_share_end_card': 'bool', - 'multi_share_optimized': 'bool', - 'name': 'string', - 'object_id': 'string', - 'parent_id': 'string', - 'permalink_url': 'string', - 'picture': 'string', - 'place': 'Place', - 'privacy': 'Privacy', - 'promotable_id': 'string', - 'promotion_status': 'string', - 'properties': 'list', - 'scheduled_publish_time': 'float', - 'shares': 'Object', - 'source': 'string', - 'status_type': 'string', - 'story': 'string', - 'story_tags': 'list', - 'subscribed': 'bool', - 'target': 'Profile', - 'targeting': 'Object', - 'timeline_visibility': 'string', - 'type': 'string', - 'updated_time': 'datetime', - 'via': 'Object', - 'video_buying_eligibility': 'list', - 'width': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['BackdatedTimeGranularity'] = Post.BackdatedTimeGranularity.__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() - field_enum_info['PostingToRedspace'] = Post.PostingToRedspace.__dict__.values() - field_enum_info['TargetSurface'] = Post.TargetSurface.__dict__.values() - field_enum_info['UnpublishedContentType'] = Post.UnpublishedContentType.__dict__.values() - field_enum_info['FeedStoryVisibility'] = Post.FeedStoryVisibility.__dict__.values() - field_enum_info['TimelineVisibility'] = Post.TimelineVisibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/privacy.py b/tap_facebook/facebook_business/adobjects/privacy.py deleted file mode 100644 index 8c49c50..0000000 --- a/tap_facebook/facebook_business/adobjects/privacy.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Privacy( - AbstractObject, -): - - def __init__(self, api=None): - super(Privacy, self).__init__() - self._isPrivacy = True - self._api = api - - class Field(AbstractObject.Field): - allow = 'allow' - deny = 'deny' - description = 'description' - friends = 'friends' - networks = 'networks' - value = 'value' - - _field_types = { - 'allow': 'string', - 'deny': 'string', - 'description': 'string', - 'friends': 'string', - 'networks': 'string', - 'value': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/privateliftstudyinstance.py b/tap_facebook/facebook_business/adobjects/privateliftstudyinstance.py deleted file mode 100644 index ddc80b8..0000000 --- a/tap_facebook/facebook_business/adobjects/privateliftstudyinstance.py +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PrivateLiftStudyInstance( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPrivateLiftStudyInstance = True - super(PrivateLiftStudyInstance, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - breakdown_key = 'breakdown_key' - created_time = 'created_time' - feature_list = 'feature_list' - id = 'id' - issuer_certificate = 'issuer_certificate' - latest_status_update_time = 'latest_status_update_time' - run_id = 'run_id' - server_hostnames = 'server_hostnames' - server_ips = 'server_ips' - status = 'status' - tier = 'tier' - - class Operation: - aggregate = 'AGGREGATE' - cancel = 'CANCEL' - compute = 'COMPUTE' - id_match = 'ID_MATCH' - next = 'NEXT' - none = 'NONE' - - 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=PrivateLiftStudyInstance, - 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 = { - 'operation': 'operation_enum', - 'run_id': 'string', - } - enums = { - 'operation_enum': PrivateLiftStudyInstance.Operation.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PrivateLiftStudyInstance, - 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 = { - 'breakdown_key': 'string', - 'created_time': 'datetime', - 'feature_list': 'list', - 'id': 'string', - 'issuer_certificate': 'string', - 'latest_status_update_time': 'datetime', - 'run_id': 'string', - 'server_hostnames': 'list', - 'server_ips': 'list', - 'status': 'string', - 'tier': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Operation'] = PrivateLiftStudyInstance.Operation.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcatalog.py b/tap_facebook/facebook_business/adobjects/productcatalog.py deleted file mode 100644 index 20691dc..0000000 --- a/tap_facebook/facebook_business/adobjects/productcatalog.py +++ /dev/null @@ -1,1982 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.adobjects.helpers.productcatalogmixin import ProductCatalogMixin - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductCatalog( - ProductCatalogMixin, - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductCatalog = True - super(ProductCatalog, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - ad_account_to_collaborative_ads_share_settings = 'ad_account_to_collaborative_ads_share_settings' - agency_collaborative_ads_share_settings = 'agency_collaborative_ads_share_settings' - business = 'business' - catalog_store = 'catalog_store' - commerce_merchant_settings = 'commerce_merchant_settings' - creator_user = 'creator_user' - da_display_settings = 'da_display_settings' - default_image_url = 'default_image_url' - fallback_image_url = 'fallback_image_url' - 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' - flight_catalog_settings = 'flight_catalog_settings' - 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' - 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' - transactable_items = 'transactable_items' - vehicles = 'vehicles' - - class PermittedRoles: - admin = 'ADMIN' - 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' - - class Standard: - google = 'google' - - class ItemSubType: - appliances = 'APPLIANCES' - baby_feeding = 'BABY_FEEDING' - baby_transport = 'BABY_TRANSPORT' - beauty = 'BEAUTY' - bedding = 'BEDDING' - cameras = 'CAMERAS' - cell_phones_and_smart_watches = 'CELL_PHONES_AND_SMART_WATCHES' - cleaning_supplies = 'CLEANING_SUPPLIES' - clothing = 'CLOTHING' - clothing_accessories = 'CLOTHING_ACCESSORIES' - computers_and_tablets = 'COMPUTERS_AND_TABLETS' - diapering_and_potty_training = 'DIAPERING_AND_POTTY_TRAINING' - electronics_accessories = 'ELECTRONICS_ACCESSORIES' - furniture = 'FURNITURE' - health = 'HEALTH' - home_goods = 'HOME_GOODS' - jewelry = 'JEWELRY' - nursery = 'NURSERY' - printers_and_scanners = 'PRINTERS_AND_SCANNERS' - projectors = 'PROJECTORS' - shoes_and_footwear = 'SHOES_AND_FOOTWEAR' - software = 'SOFTWARE' - toys = 'TOYS' - tvs_and_monitors = 'TVS_AND_MONITORS' - video_game_consoles_and_video_games = 'VIDEO_GAME_CONSOLES_AND_VIDEO_GAMES' - watches = 'WATCHES' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'owned_product_catalogs' - - # @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_owned_product_catalog(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 = { - 'allow_delete_catalog_with_live_product_set': 'bool', - } - 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 = { - 'segment_use_cases': 'list', - } - enums = { - 'segment_use_cases_enum': [ - 'AFFILIATE_SELLER_STOREFRONT', - 'AFFILIATE_TAGGED_ONLY_DEPRECATED', - 'COLLAB_ADS', - 'COLLAB_ADS_FOR_MARKETPLACE_PARTNER', - 'COLLAB_ADS_SEGMENT_WITHOUT_SEGMENT_SYNCING', - 'CREATORS_AS_SELLERS', - 'DIGITAL_CIRCULARS', - 'FB_LIVE_SHOPPING', - 'IG_SHOPPING', - 'IG_SHOPPING_SUGGESTED_PRODUCTS', - 'MARKETPLACE_SHOPS', - 'TEST', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalog, - 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 = { - 'additional_vertical_option': 'additional_vertical_option_enum', - 'da_display_settings': 'Object', - 'default_image_url': 'string', - 'destination_catalog_settings': 'map', - 'fallback_image_url': 'string', - 'flight_catalog_settings': 'map', - 'name': 'string', - 'partner_integration': 'map', - 'store_catalog_settings': 'map', - } - enums = { - 'additional_vertical_option_enum': ProductCatalog.AdditionalVerticalOption.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalog, - 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_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): - 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='/agencies', - 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_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_roles': 'list', - 'permitted_tasks': 'list', - 'utm_settings': 'map', - } - enums = { - 'permitted_roles_enum': ProductCatalog.PermittedRoles.__dict__.values(), - 'permitted_tasks_enum': ProductCatalog.PermittedTasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/agencies', - 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() - - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'user': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/assigned_users', - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.assigneduser import AssignedUser - param_types = { - 'business': 'string', - } - 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() - - def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'tasks': 'list', - 'user': 'int', - } - enums = { - 'tasks_enum': ProductCatalog.Tasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/assigned_users', - 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() - - def get_automotive_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.') - from facebook_business.adobjects.automotivemodel import AutomotiveModel - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/automotive_models', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AutomotiveModel, - api_type='EDGE', - response_parser=ObjectParser(target_class=AutomotiveModel, 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_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', - 'fbe_external_business_id': 'string', - 'requests': 'list', - 'version': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/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() - - def create_catalog_store(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.storecatalogsettings import StoreCatalogSettings - param_types = { - 'page': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/catalog_store', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=StoreCatalogSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=StoreCatalogSettings, 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_categories(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalogcategory import ProductCatalogCategory - param_types = { - 'categorization_criteria': 'categorization_criteria_enum', - 'filter': 'Object', - } - enums = { - 'categorization_criteria_enum': ProductCatalogCategory.CategorizationCriteria.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/categories', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalogCategory, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductCatalogCategory, 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_category(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalogcategory import ProductCatalogCategory - param_types = { - 'data': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/categories', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalogCategory, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductCatalogCategory, 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_check_batch_request_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.checkbatchrequeststatus import CheckBatchRequestStatus - param_types = { - 'error_priority': 'error_priority_enum', - 'handle': 'string', - 'load_ids_of_invalid_requests': 'bool', - } - enums = { - 'error_priority_enum': CheckBatchRequestStatus.ErrorPriority.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/check_batch_request_status', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CheckBatchRequestStatus, - api_type='EDGE', - response_parser=ObjectParser(target_class=CheckBatchRequestStatus, 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_collaborative_ads_event_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.catalogsegmentallmatchcountlaser import CatalogSegmentAllMatchCountLaser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/collaborative_ads_event_stats', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CatalogSegmentAllMatchCountLaser, - api_type='EDGE', - response_parser=ObjectParser(target_class=CatalogSegmentAllMatchCountLaser, 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_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/collaborative_ads_lsb_image_bank', - 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_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 = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/collaborative_ads_share_settings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=CollaborativeAdsShareSettings, - api_type='EDGE', - response_parser=ObjectParser(target_class=CollaborativeAdsShareSettings, 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_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.') - param_types = { - 'ad_group_id': 'unsigned int', - 'agency_business_id': 'unsigned int', - 'backup_image_urls': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/cpas_lsb_image_bank', - 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_data_sources(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalogdatasource import ProductCatalogDataSource - param_types = { - 'ingestion_source_type': 'ingestion_source_type_enum', - } - enums = { - 'ingestion_source_type_enum': ProductCatalogDataSource.IngestionSourceType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/data_sources', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalogDataSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductCatalogDataSource, 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_destinations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.destination import Destination - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/destinations', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Destination, - api_type='EDGE', - response_parser=ObjectParser(target_class=Destination, 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_diagnostics(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalogdiagnosticgroup import ProductCatalogDiagnosticGroup - param_types = { - 'affected_channels': 'list', - 'affected_entities': 'list', - 'affected_features': 'list', - 'severities': 'list', - 'types': 'list', - } - enums = { - 'affected_channels_enum': ProductCatalogDiagnosticGroup.AffectedChannels.__dict__.values(), - 'affected_entities_enum': ProductCatalogDiagnosticGroup.AffectedEntities.__dict__.values(), - 'affected_features_enum': ProductCatalogDiagnosticGroup.AffectedFeatures.__dict__.values(), - 'severities_enum': ProductCatalogDiagnosticGroup.Severities.__dict__.values(), - 'types_enum': ProductCatalogDiagnosticGroup.Types.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/diagnostics', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalogDiagnosticGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductCatalogDiagnosticGroup, 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_event_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.producteventstat import ProductEventStat - param_types = { - 'breakdowns': 'list', - } - enums = { - 'breakdowns_enum': ProductEventStat.Breakdowns.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/event_stats', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductEventStat, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductEventStat, 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_external_event_sources(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'external_event_sources': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/external_event_sources', - 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_external_event_sources(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.externaleventsource import ExternalEventSource - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/external_event_sources', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ExternalEventSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ExternalEventSource, 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_external_event_source(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'external_event_sources': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/external_event_sources', - 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() - - def get_flights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.flight import Flight - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/flights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Flight, - api_type='EDGE', - response_parser=ObjectParser(target_class=Flight, 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_home_listings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.homelisting import HomeListing - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/home_listings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=HomeListing, - api_type='EDGE', - response_parser=ObjectParser(target_class=HomeListing, 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_home_listing(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.homelisting import HomeListing - param_types = { - 'address': 'Object', - 'availability': 'string', - 'currency': 'string', - 'description': 'string', - 'home_listing_id': 'string', - 'images': 'list', - 'listing_type': 'string', - 'name': 'string', - 'num_baths': 'float', - 'num_beds': 'float', - 'num_units': 'float', - 'price': 'float', - 'property_type': 'string', - 'url': 'string', - 'year_built': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/home_listings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=HomeListing, - api_type='EDGE', - response_parser=ObjectParser(target_class=HomeListing, 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_hotel_rooms_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.') - from facebook_business.adobjects.productcataloghotelroomsbatch import ProductCatalogHotelRoomsBatch - param_types = { - 'handle': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/hotel_rooms_batch', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalogHotelRoomsBatch, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductCatalogHotelRoomsBatch, 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_hotel_rooms_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 = { - 'file': 'file', - 'password': 'string', - 'standard': 'standard_enum', - 'update_only': 'bool', - 'url': 'string', - 'username': 'string', - } - enums = { - 'standard_enum': ProductCatalog.Standard.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/hotel_rooms_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() - - def get_hotels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.hotel import Hotel - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/hotels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Hotel, - api_type='EDGE', - response_parser=ObjectParser(target_class=Hotel, 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_hotel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.hotel import Hotel - param_types = { - 'address': 'Object', - 'applinks': 'Object', - 'base_price': 'unsigned int', - 'brand': 'string', - 'currency': 'string', - 'description': 'string', - 'guest_ratings': 'list', - 'hotel_id': 'string', - 'images': 'list', - 'name': 'string', - 'phone': 'string', - 'star_rating': 'float', - 'url': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/hotels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Hotel, - api_type='EDGE', - response_parser=ObjectParser(target_class=Hotel, 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_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_sub_type': 'item_sub_type_enum', - 'item_type': 'string', - 'requests': 'map', - 'version': 'unsigned int', - } - enums = { - 'item_sub_type_enum': ProductCatalog.ItemSubType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/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() - - def create_localized_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', - 'requests': 'map', - 'version': 'unsigned int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/localized_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() - - def get_pricing_variables_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.') - from facebook_business.adobjects.productcatalogpricingvariablesbatch import ProductCatalogPricingVariablesBatch - param_types = { - 'handle': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/pricing_variables_batch', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalogPricingVariablesBatch, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductCatalogPricingVariablesBatch, 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_pricing_variables_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 = { - 'file': 'file', - 'password': 'string', - 'standard': 'standard_enum', - 'update_only': 'bool', - 'url': 'string', - 'username': 'string', - } - enums = { - 'standard_enum': ProductCatalog.Standard.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/pricing_variables_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() - - def get_product_feeds(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productfeed import ProductFeed - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_feeds', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeed, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeed, 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_product_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productfeed import ProductFeed - param_types = { - 'country': 'string', - 'default_currency': 'string', - 'deletion_enabled': 'bool', - 'delimiter': 'delimiter_enum', - 'encoding': 'encoding_enum', - 'feed_type': 'feed_type_enum', - 'file_name': 'string', - 'ingestion_source_type': 'ingestion_source_type_enum', - 'item_sub_type': 'item_sub_type_enum', - 'migrated_from_feed_id': 'string', - 'name': 'string', - 'override_type': 'override_type_enum', - 'override_value': 'string', - 'primary_feed_ids': 'list', - 'quoted_fields_mode': 'quoted_fields_mode_enum', - 'rules': 'list', - 'schedule': 'string', - 'selected_override_fields': 'list', - 'update_schedule': 'string', - } - enums = { - 'delimiter_enum': ProductFeed.Delimiter.__dict__.values(), - 'encoding_enum': ProductFeed.Encoding.__dict__.values(), - 'feed_type_enum': ProductFeed.FeedType.__dict__.values(), - 'ingestion_source_type_enum': ProductFeed.IngestionSourceType.__dict__.values(), - 'item_sub_type_enum': ProductFeed.ItemSubType.__dict__.values(), - 'override_type_enum': ProductFeed.OverrideType.__dict__.values(), - 'quoted_fields_mode_enum': ProductFeed.QuotedFieldsMode.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/product_feeds', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeed, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeed, 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_product_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.productgroup import ProductGroup - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductGroup, 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_product_group(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productgroup import ProductGroup - param_types = { - 'retailer_id': 'string', - 'variants': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/product_groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductGroup, 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_product_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.productset import ProductSet - param_types = { - 'ancestor_id': 'string', - 'has_children': 'bool', - 'parent_id': 'string', - 'retailer_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductSet, 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_product_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.productset import ProductSet - param_types = { - 'filter': 'Object', - 'metadata': 'map', - 'name': 'string', - 'ordering_info': 'list', - 'publish_to_shops': 'list', - 'retailer_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/product_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductSet, 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_product_sets_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.') - from facebook_business.adobjects.productcatalogproductsetsbatch import ProductCatalogProductSetsBatch - param_types = { - 'handle': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_sets_batch', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductCatalogProductSetsBatch, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductCatalogProductSetsBatch, 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productitem import ProductItem - param_types = { - 'bulk_pagination': 'bool', - 'error_priority': 'error_priority_enum', - 'error_type': 'error_type_enum', - 'filter': 'Object', - 'return_only_approved_products': 'bool', - } - enums = { - 'error_priority_enum': ProductItem.ErrorPriority.__dict__.values(), - 'error_type_enum': ProductItem.ErrorType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/products', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductItem, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductItem, 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_product(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productitem import ProductItem - param_types = { - 'additional_image_urls': 'list', - 'additional_uploaded_image_ids': 'list', - 'additional_variant_attributes': 'map', - 'android_app_name': 'string', - 'android_class': 'string', - 'android_package': 'string', - 'android_url': 'string', - 'availability': 'availability_enum', - 'brand': 'string', - 'category': 'string', - 'category_specific_fields': 'map', - 'checkout_url': 'string', - 'color': 'string', - 'commerce_tax_category': 'commerce_tax_category_enum', - 'condition': 'condition_enum', - 'currency': 'string', - 'custom_data': 'map', - 'custom_label_0': 'string', - 'custom_label_1': 'string', - 'custom_label_2': 'string', - 'custom_label_3': 'string', - 'custom_label_4': 'string', - 'custom_number_0': 'unsigned int', - 'custom_number_1': 'unsigned int', - 'custom_number_2': 'unsigned int', - 'custom_number_3': 'unsigned int', - 'custom_number_4': 'unsigned int', - 'description': 'string', - 'expiration_date': 'string', - 'fb_product_category': 'string', - 'gender': 'gender_enum', - 'gtin': 'string', - 'image_url': 'string', - 'importer_address': 'map', - 'importer_name': 'string', - 'inventory': 'unsigned int', - 'ios_app_name': 'string', - 'ios_app_store_id': 'unsigned int', - 'ios_url': 'string', - 'ipad_app_name': 'string', - 'ipad_app_store_id': 'unsigned int', - 'ipad_url': 'string', - 'iphone_app_name': 'string', - 'iphone_app_store_id': 'unsigned int', - 'iphone_url': 'string', - 'launch_date': 'string', - 'manufacturer_info': 'string', - 'manufacturer_part_number': 'string', - 'marked_for_product_launch': 'marked_for_product_launch_enum', - 'material': 'string', - 'mobile_link': 'string', - 'name': 'string', - 'ordering_index': 'unsigned int', - 'origin_country': 'origin_country_enum', - 'pattern': 'string', - 'price': 'unsigned int', - 'product_type': 'string', - 'quantity_to_sell_on_facebook': 'unsigned int', - 'retailer_id': 'string', - 'retailer_product_group_id': 'string', - 'return_policy_days': 'unsigned int', - 'sale_price': 'unsigned int', - 'sale_price_end_date': 'datetime', - 'sale_price_start_date': 'datetime', - 'short_description': 'string', - 'size': 'string', - 'start_date': 'string', - 'url': 'string', - 'visibility': 'visibility_enum', - 'wa_compliance_category': 'wa_compliance_category_enum', - 'windows_phone_app_id': 'string', - 'windows_phone_app_name': 'string', - 'windows_phone_url': 'string', - } - enums = { - 'availability_enum': ProductItem.Availability.__dict__.values(), - 'commerce_tax_category_enum': ProductItem.CommerceTaxCategory.__dict__.values(), - 'condition_enum': ProductItem.Condition.__dict__.values(), - 'gender_enum': ProductItem.Gender.__dict__.values(), - 'marked_for_product_launch_enum': ProductItem.MarkedForProductLaunch.__dict__.values(), - 'origin_country_enum': ProductItem.OriginCountry.__dict__.values(), - 'visibility_enum': ProductItem.Visibility.__dict__.values(), - 'wa_compliance_category_enum': ProductItem.WaComplianceCategory.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/products', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductItem, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductItem, 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_vehicle_offers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.vehicleoffer import VehicleOffer - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/vehicle_offers', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VehicleOffer, - api_type='EDGE', - response_parser=ObjectParser(target_class=VehicleOffer, 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_vehicles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.vehicle import Vehicle - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/vehicles', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Vehicle, - api_type='EDGE', - response_parser=ObjectParser(target_class=Vehicle, 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_vehicle(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.vehicle import Vehicle - param_types = { - 'address': 'map', - 'applinks': 'Object', - 'availability': 'availability_enum', - 'body_style': 'body_style_enum', - 'condition': 'condition_enum', - 'currency': 'string', - 'date_first_on_lot': 'string', - 'dealer_id': 'string', - 'dealer_name': 'string', - 'dealer_phone': 'string', - 'description': 'string', - 'drivetrain': 'drivetrain_enum', - 'exterior_color': 'string', - 'fb_page_id': 'string', - 'fuel_type': 'fuel_type_enum', - 'images': 'list', - 'interior_color': 'string', - 'make': 'string', - 'mileage': 'map', - 'model': 'string', - 'price': 'unsigned int', - 'state_of_vehicle': 'state_of_vehicle_enum', - 'title': 'string', - 'transmission': 'transmission_enum', - 'trim': 'string', - 'url': 'string', - 'vehicle_id': 'string', - 'vehicle_type': 'vehicle_type_enum', - 'vin': 'string', - 'year': 'unsigned int', - } - enums = { - 'availability_enum': Vehicle.Availability.__dict__.values(), - 'body_style_enum': Vehicle.BodyStyle.__dict__.values(), - 'condition_enum': Vehicle.Condition.__dict__.values(), - 'drivetrain_enum': Vehicle.Drivetrain.__dict__.values(), - 'fuel_type_enum': Vehicle.FuelType.__dict__.values(), - 'state_of_vehicle_enum': Vehicle.StateOfVehicle.__dict__.values(), - 'transmission_enum': Vehicle.Transmission.__dict__.values(), - 'vehicle_type_enum': Vehicle.VehicleType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/vehicles', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Vehicle, - api_type='EDGE', - response_parser=ObjectParser(target_class=Vehicle, 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', - 'business': 'Business', - 'catalog_store': 'StoreCatalogSettings', - 'commerce_merchant_settings': 'CommerceMerchantSettings', - 'creator_user': 'User', - 'da_display_settings': 'ProductCatalogImageSettings', - 'default_image_url': 'string', - 'fallback_image_url': 'list', - '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', - 'flight_catalog_settings': 'map', - 'parent_catalog_id': 'string', - 'partner_integration': 'map', - } - @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() - field_enum_info['Tasks'] = ProductCatalog.Tasks.__dict__.values() - field_enum_info['Standard'] = ProductCatalog.Standard.__dict__.values() - field_enum_info['ItemSubType'] = ProductCatalog.ItemSubType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcatalogcategory.py b/tap_facebook/facebook_business/adobjects/productcatalogcategory.py deleted file mode 100644 index 301b0e6..0000000 --- a/tap_facebook/facebook_business/adobjects/productcatalogcategory.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductCatalogCategory( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductCatalogCategory = True - super(ProductCatalogCategory, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - criteria_value = 'criteria_value' - description = 'description' - destination_uri = 'destination_uri' - image_url = 'image_url' - name = 'name' - num_items = 'num_items' - tokens = 'tokens' - data = 'data' - - class CategorizationCriteria: - brand = 'BRAND' - category = 'CATEGORY' - product_type = 'PRODUCT_TYPE' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'categories' - - # @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_category(fields, params, batch, success, failure, pending) - - _field_types = { - 'criteria_value': 'string', - 'description': 'string', - 'destination_uri': 'string', - 'image_url': 'string', - 'name': 'string', - 'num_items': 'int', - 'tokens': 'list>', - 'data': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['CategorizationCriteria'] = ProductCatalogCategory.CategorizationCriteria.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcatalogdatasource.py b/tap_facebook/facebook_business/adobjects/productcatalogdatasource.py deleted file mode 100644 index 2b0b307..0000000 --- a/tap_facebook/facebook_business/adobjects/productcatalogdatasource.py +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductCatalogDataSource( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductCatalogDataSource = True - super(ProductCatalogDataSource, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - app_id = 'app_id' - id = 'id' - ingestion_source_type = 'ingestion_source_type' - name = 'name' - upload_type = 'upload_type' - - class IngestionSourceType: - all = 'ALL' - primary = 'PRIMARY' - supplementary = 'SUPPLEMENTARY' - - _field_types = { - 'app_id': 'string', - 'id': 'string', - 'ingestion_source_type': 'string', - 'name': 'string', - 'upload_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['IngestionSourceType'] = ProductCatalogDataSource.IngestionSourceType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcatalogdiagnosticgroup.py b/tap_facebook/facebook_business/adobjects/productcatalogdiagnosticgroup.py deleted file mode 100644 index 0fbc65d..0000000 --- a/tap_facebook/facebook_business/adobjects/productcatalogdiagnosticgroup.py +++ /dev/null @@ -1,127 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductCatalogDiagnosticGroup( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductCatalogDiagnosticGroup, self).__init__() - self._isProductCatalogDiagnosticGroup = True - self._api = api - - class Field(AbstractObject.Field): - affected_channels = 'affected_channels' - affected_entity = 'affected_entity' - affected_features = 'affected_features' - diagnostics = 'diagnostics' - error_code = 'error_code' - number_of_affected_entities = 'number_of_affected_entities' - number_of_affected_items = 'number_of_affected_items' - severity = 'severity' - subtitle = 'subtitle' - title = 'title' - type = 'type' - - class AffectedChannels: - 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' - - class AffectedEntity: - product_catalog = 'product_catalog' - product_item = 'product_item' - product_set = 'product_set' - - class AffectedFeatures: - augmented_reality = 'augmented_reality' - checkout = 'checkout' - - class Severity: - must_fix = 'MUST_FIX' - opportunity = 'OPPORTUNITY' - - class Type: - ar_visibility_issues = 'AR_VISIBILITY_ISSUES' - attributes_invalid = 'ATTRIBUTES_INVALID' - attributes_missing = 'ATTRIBUTES_MISSING' - category = 'CATEGORY' - checkout = 'CHECKOUT' - da_visibility_issues = 'DA_VISIBILITY_ISSUES' - image_quality = 'IMAGE_QUALITY' - low_quality_title_and_description = 'LOW_QUALITY_TITLE_AND_DESCRIPTION' - policy_violation = 'POLICY_VIOLATION' - shops_visibility_issues = 'SHOPS_VISIBILITY_ISSUES' - - class AffectedEntities: - product_catalog = 'product_catalog' - product_item = 'product_item' - product_set = 'product_set' - - class Severities: - must_fix = 'MUST_FIX' - opportunity = 'OPPORTUNITY' - - class Types: - ar_visibility_issues = 'AR_VISIBILITY_ISSUES' - attributes_invalid = 'ATTRIBUTES_INVALID' - attributes_missing = 'ATTRIBUTES_MISSING' - category = 'CATEGORY' - checkout = 'CHECKOUT' - da_visibility_issues = 'DA_VISIBILITY_ISSUES' - image_quality = 'IMAGE_QUALITY' - low_quality_title_and_description = 'LOW_QUALITY_TITLE_AND_DESCRIPTION' - policy_violation = 'POLICY_VIOLATION' - shops_visibility_issues = 'SHOPS_VISIBILITY_ISSUES' - - _field_types = { - 'affected_channels': 'list', - 'affected_entity': 'AffectedEntity', - 'affected_features': 'list', - 'diagnostics': 'list', - 'error_code': 'int', - 'number_of_affected_entities': 'int', - 'number_of_affected_items': 'int', - 'severity': 'Severity', - 'subtitle': 'string', - 'title': 'string', - 'type': 'Type', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['AffectedChannels'] = ProductCatalogDiagnosticGroup.AffectedChannels.__dict__.values() - field_enum_info['AffectedEntity'] = ProductCatalogDiagnosticGroup.AffectedEntity.__dict__.values() - field_enum_info['AffectedFeatures'] = ProductCatalogDiagnosticGroup.AffectedFeatures.__dict__.values() - field_enum_info['Severity'] = ProductCatalogDiagnosticGroup.Severity.__dict__.values() - field_enum_info['Type'] = ProductCatalogDiagnosticGroup.Type.__dict__.values() - field_enum_info['AffectedEntities'] = ProductCatalogDiagnosticGroup.AffectedEntities.__dict__.values() - field_enum_info['Severities'] = ProductCatalogDiagnosticGroup.Severities.__dict__.values() - field_enum_info['Types'] = ProductCatalogDiagnosticGroup.Types.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcataloghotelroomsbatch.py b/tap_facebook/facebook_business/adobjects/productcataloghotelroomsbatch.py deleted file mode 100644 index 2c1a5b8..0000000 --- a/tap_facebook/facebook_business/adobjects/productcataloghotelroomsbatch.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductCatalogHotelRoomsBatch( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductCatalogHotelRoomsBatch, self).__init__() - self._isProductCatalogHotelRoomsBatch = True - self._api = api - - class Field(AbstractObject.Field): - errors = 'errors' - errors_total_count = 'errors_total_count' - handle = 'handle' - status = 'status' - - _field_types = { - 'errors': 'list', - 'errors_total_count': 'int', - 'handle': 'string', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcatalogimagesettings.py b/tap_facebook/facebook_business/adobjects/productcatalogimagesettings.py deleted file mode 100644 index df420d4..0000000 --- a/tap_facebook/facebook_business/adobjects/productcatalogimagesettings.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductCatalogImageSettings( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductCatalogImageSettings, self).__init__() - self._isProductCatalogImageSettings = True - self._api = api - - class Field(AbstractObject.Field): - carousel_ad = 'carousel_ad' - single_ad = 'single_ad' - - _field_types = { - 'carousel_ad': 'ProductCatalogImageSettingsOperation', - 'single_ad': 'ProductCatalogImageSettingsOperation', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcatalogimagesettingsoperation.py b/tap_facebook/facebook_business/adobjects/productcatalogimagesettingsoperation.py deleted file mode 100644 index 1aacbfa..0000000 --- a/tap_facebook/facebook_business/adobjects/productcatalogimagesettingsoperation.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductCatalogImageSettingsOperation( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductCatalogImageSettingsOperation, self).__init__() - self._isProductCatalogImageSettingsOperation = True - self._api = api - - class Field(AbstractObject.Field): - transformation_type = 'transformation_type' - - _field_types = { - 'transformation_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcatalogpricingvariablesbatch.py b/tap_facebook/facebook_business/adobjects/productcatalogpricingvariablesbatch.py deleted file mode 100644 index baff08e..0000000 --- a/tap_facebook/facebook_business/adobjects/productcatalogpricingvariablesbatch.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductCatalogPricingVariablesBatch( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductCatalogPricingVariablesBatch, self).__init__() - self._isProductCatalogPricingVariablesBatch = True - self._api = api - - class Field(AbstractObject.Field): - errors = 'errors' - errors_total_count = 'errors_total_count' - handle = 'handle' - status = 'status' - - _field_types = { - 'errors': 'list', - 'errors_total_count': 'int', - 'handle': 'string', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productcatalogproductsetsbatch.py b/tap_facebook/facebook_business/adobjects/productcatalogproductsetsbatch.py deleted file mode 100644 index 3e01a68..0000000 --- a/tap_facebook/facebook_business/adobjects/productcatalogproductsetsbatch.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductCatalogProductSetsBatch( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductCatalogProductSetsBatch, self).__init__() - self._isProductCatalogProductSetsBatch = True - self._api = api - - class Field(AbstractObject.Field): - errors = 'errors' - errors_total_count = 'errors_total_count' - handle = 'handle' - status = 'status' - - _field_types = { - 'errors': 'list', - 'errors_total_count': 'int', - 'handle': 'string', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/producteventstat.py b/tap_facebook/facebook_business/adobjects/producteventstat.py deleted file mode 100644 index bc7d170..0000000 --- a/tap_facebook/facebook_business/adobjects/producteventstat.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductEventStat( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductEventStat, self).__init__() - self._isProductEventStat = True - self._api = api - - class Field(AbstractObject.Field): - date_start = 'date_start' - date_stop = 'date_stop' - device_type = 'device_type' - event = 'event' - event_source = 'event_source' - total_content_ids_matched_other_catalogs = 'total_content_ids_matched_other_catalogs' - total_matched_content_ids = 'total_matched_content_ids' - total_unmatched_content_ids = 'total_unmatched_content_ids' - unique_content_ids_matched_other_catalogs = 'unique_content_ids_matched_other_catalogs' - unique_matched_content_ids = 'unique_matched_content_ids' - unique_unmatched_content_ids = 'unique_unmatched_content_ids' - - class DeviceType: - desktop = 'desktop' - mobile_android_phone = 'mobile_android_phone' - mobile_android_tablet = 'mobile_android_tablet' - mobile_ipad = 'mobile_ipad' - mobile_iphone = 'mobile_iphone' - mobile_ipod = 'mobile_ipod' - mobile_phone = 'mobile_phone' - mobile_tablet = 'mobile_tablet' - mobile_windows_phone = 'mobile_windows_phone' - unknown = 'unknown' - - class Event: - addtocart = 'AddToCart' - addtowishlist = 'AddToWishlist' - initiatecheckout = 'InitiateCheckout' - lead = 'Lead' - purchase = 'Purchase' - search = 'Search' - subscribe = 'Subscribe' - viewcontent = 'ViewContent' - - class Breakdowns: - device_type = 'DEVICE_TYPE' - - _field_types = { - 'date_start': 'string', - 'date_stop': 'string', - 'device_type': 'DeviceType', - 'event': 'Event', - 'event_source': 'ExternalEventSource', - 'total_content_ids_matched_other_catalogs': 'int', - 'total_matched_content_ids': 'int', - 'total_unmatched_content_ids': 'int', - 'unique_content_ids_matched_other_catalogs': 'int', - 'unique_matched_content_ids': 'int', - 'unique_unmatched_content_ids': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['DeviceType'] = ProductEventStat.DeviceType.__dict__.values() - field_enum_info['Event'] = ProductEventStat.Event.__dict__.values() - field_enum_info['Breakdowns'] = ProductEventStat.Breakdowns.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeed.py b/tap_facebook/facebook_business/adobjects/productfeed.py deleted file mode 100644 index 3b60ec5..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeed.py +++ /dev/null @@ -1,814 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductFeed( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductFeed = True - super(ProductFeed, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - country = 'country' - created_time = 'created_time' - default_currency = 'default_currency' - deletion_enabled = 'deletion_enabled' - delimiter = 'delimiter' - encoding = 'encoding' - file_name = 'file_name' - id = 'id' - ingestion_source_type = 'ingestion_source_type' - item_sub_type = 'item_sub_type' - latest_upload = 'latest_upload' - migrated_from_feed_id = 'migrated_from_feed_id' - name = 'name' - override_type = 'override_type' - primary_feeds = 'primary_feeds' - product_count = 'product_count' - quoted_fields_mode = 'quoted_fields_mode' - schedule = 'schedule' - supplementary_feeds = 'supplementary_feeds' - update_schedule = 'update_schedule' - feed_type = 'feed_type' - override_value = 'override_value' - primary_feed_ids = 'primary_feed_ids' - rules = 'rules' - selected_override_fields = 'selected_override_fields' - - class Delimiter: - autodetect = 'AUTODETECT' - bar = 'BAR' - comma = 'COMMA' - semicolon = 'SEMICOLON' - tab = 'TAB' - tilde = 'TILDE' - - class IngestionSourceType: - primary_feed = 'primary_feed' - supplementary_feed = 'supplementary_feed' - - class QuotedFieldsMode: - autodetect = 'AUTODETECT' - off = 'OFF' - on = 'ON' - - class Encoding: - autodetect = 'AUTODETECT' - latin1 = 'LATIN1' - utf16be = 'UTF16BE' - utf16le = 'UTF16LE' - utf32be = 'UTF32BE' - utf32le = 'UTF32LE' - utf8 = 'UTF8' - - class FeedType: - automotive_model = 'AUTOMOTIVE_MODEL' - destination = 'DESTINATION' - flight = 'FLIGHT' - home_listing = 'HOME_LISTING' - hotel = 'HOTEL' - hotel_room = 'HOTEL_ROOM' - local_inventory = 'LOCAL_INVENTORY' - media_title = 'MEDIA_TITLE' - offer = 'OFFER' - products = 'PRODUCTS' - transactable_items = 'TRANSACTABLE_ITEMS' - vehicles = 'VEHICLES' - vehicle_offer = 'VEHICLE_OFFER' - - class ItemSubType: - appliances = 'APPLIANCES' - baby_feeding = 'BABY_FEEDING' - baby_transport = 'BABY_TRANSPORT' - beauty = 'BEAUTY' - bedding = 'BEDDING' - cameras = 'CAMERAS' - cell_phones_and_smart_watches = 'CELL_PHONES_AND_SMART_WATCHES' - cleaning_supplies = 'CLEANING_SUPPLIES' - clothing = 'CLOTHING' - clothing_accessories = 'CLOTHING_ACCESSORIES' - computers_and_tablets = 'COMPUTERS_AND_TABLETS' - diapering_and_potty_training = 'DIAPERING_AND_POTTY_TRAINING' - electronics_accessories = 'ELECTRONICS_ACCESSORIES' - furniture = 'FURNITURE' - health = 'HEALTH' - home_goods = 'HOME_GOODS' - jewelry = 'JEWELRY' - nursery = 'NURSERY' - printers_and_scanners = 'PRINTERS_AND_SCANNERS' - projectors = 'PROJECTORS' - shoes_and_footwear = 'SHOES_AND_FOOTWEAR' - software = 'SOFTWARE' - toys = 'TOYS' - tvs_and_monitors = 'TVS_AND_MONITORS' - video_game_consoles_and_video_games = 'VIDEO_GAME_CONSOLES_AND_VIDEO_GAMES' - watches = 'WATCHES' - - class OverrideType: - batch_api_language_or_country = 'BATCH_API_LANGUAGE_OR_COUNTRY' - catalog_segment_customize_default = 'CATALOG_SEGMENT_CUSTOMIZE_DEFAULT' - country = 'COUNTRY' - 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 - def get_endpoint(cls): - return 'product_feeds' - - # @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_product_feed(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 - if batch 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=ProductFeed, - 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 = { - 'default_currency': 'string', - 'deletion_enabled': 'bool', - 'delimiter': 'delimiter_enum', - 'encoding': 'encoding_enum', - 'migrated_from_feed_id': 'string', - 'name': 'string', - 'quoted_fields_mode': 'quoted_fields_mode_enum', - 'schedule': 'string', - 'update_schedule': 'string', - } - enums = { - 'delimiter_enum': ProductFeed.Delimiter.__dict__.values(), - 'encoding_enum': ProductFeed.Encoding.__dict__.values(), - 'quoted_fields_mode_enum': ProductFeed.QuotedFieldsMode.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeed, - 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_automotive_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.') - from facebook_business.adobjects.automotivemodel import AutomotiveModel - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/automotive_models', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AutomotiveModel, - api_type='EDGE', - response_parser=ObjectParser(target_class=AutomotiveModel, 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_destinations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.destination import Destination - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/destinations', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Destination, - api_type='EDGE', - response_parser=ObjectParser(target_class=Destination, 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_flights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.flight import Flight - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/flights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Flight, - api_type='EDGE', - response_parser=ObjectParser(target_class=Flight, 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_home_listings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.homelisting import HomeListing - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/home_listings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=HomeListing, - api_type='EDGE', - response_parser=ObjectParser(target_class=HomeListing, 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_hotels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.hotel import Hotel - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/hotels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Hotel, - api_type='EDGE', - response_parser=ObjectParser(target_class=Hotel, 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_titles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.mediatitle import MediaTitle - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/media_titles', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MediaTitle, - api_type='EDGE', - response_parser=ObjectParser(target_class=MediaTitle, 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productitem import ProductItem - param_types = { - 'bulk_pagination': 'bool', - 'error_priority': 'error_priority_enum', - 'error_type': 'error_type_enum', - 'filter': 'Object', - } - enums = { - 'error_priority_enum': ProductItem.ErrorPriority.__dict__.values(), - 'error_type_enum': ProductItem.ErrorType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/products', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductItem, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductItem, 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_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.productfeedrule import ProductFeedRule - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/rules', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedRule, 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_rule(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productfeedrule import ProductFeedRule - param_types = { - 'attribute': 'string', - 'params': 'map', - 'rule_type': 'rule_type_enum', - } - enums = { - 'rule_type_enum': ProductFeedRule.RuleType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/rules', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedRule, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedRule, 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_supplementary_feed_assoc(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'assoc_data': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/supplementary_feed_assocs', - 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_upload_schedules(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productfeedschedule import ProductFeedSchedule - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/upload_schedules', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedSchedule, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedSchedule, 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_upload_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.') - param_types = { - 'upload_schedule': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/upload_schedules', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeed, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeed, 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.productfeedupload import ProductFeedUpload - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/uploads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedUpload, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedUpload, 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_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.productfeedupload import ProductFeedUpload - param_types = { - 'fbe_external_business_id': 'string', - 'file': 'file', - 'password': 'string', - 'update_only': 'bool', - 'url': 'string', - 'username': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/uploads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedUpload, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedUpload, 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_vehicle_offers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.vehicleoffer import VehicleOffer - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/vehicle_offers', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VehicleOffer, - api_type='EDGE', - response_parser=ObjectParser(target_class=VehicleOffer, 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_vehicles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.vehicle import Vehicle - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/vehicles', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Vehicle, - api_type='EDGE', - response_parser=ObjectParser(target_class=Vehicle, 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 = { - 'country': 'string', - 'created_time': 'datetime', - 'default_currency': 'string', - 'deletion_enabled': 'bool', - 'delimiter': 'Delimiter', - 'encoding': 'string', - 'file_name': 'string', - 'id': 'string', - 'ingestion_source_type': 'IngestionSourceType', - 'item_sub_type': 'string', - 'latest_upload': 'ProductFeedUpload', - 'migrated_from_feed_id': 'string', - 'name': 'string', - 'override_type': 'string', - 'primary_feeds': 'list', - 'product_count': 'int', - 'quoted_fields_mode': 'QuotedFieldsMode', - 'schedule': 'ProductFeedSchedule', - 'supplementary_feeds': 'list', - 'update_schedule': 'ProductFeedSchedule', - 'feed_type': 'FeedType', - 'override_value': 'string', - 'primary_feed_ids': 'list', - 'rules': 'list', - 'selected_override_fields': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Delimiter'] = ProductFeed.Delimiter.__dict__.values() - field_enum_info['IngestionSourceType'] = ProductFeed.IngestionSourceType.__dict__.values() - field_enum_info['QuotedFieldsMode'] = ProductFeed.QuotedFieldsMode.__dict__.values() - field_enum_info['Encoding'] = ProductFeed.Encoding.__dict__.values() - field_enum_info['FeedType'] = ProductFeed.FeedType.__dict__.values() - field_enum_info['ItemSubType'] = ProductFeed.ItemSubType.__dict__.values() - field_enum_info['OverrideType'] = ProductFeed.OverrideType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py b/tap_facebook/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py deleted file mode 100644 index ed6bbca..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductFeedMissingFeedItemReplacement( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductFeedMissingFeedItemReplacement, self).__init__() - self._isProductFeedMissingFeedItemReplacement = True - self._api = api - - class Field(AbstractObject.Field): - home_listing = 'home_listing' - product_item = 'product_item' - vehicle = 'vehicle' - - _field_types = { - 'home_listing': 'Object', - 'product_item': 'Object', - 'vehicle': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeedrule.py b/tap_facebook/facebook_business/adobjects/productfeedrule.py deleted file mode 100644 index 340d2c1..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeedrule.py +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductFeedRule( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductFeedRule = True - super(ProductFeedRule, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - attribute = 'attribute' - id = 'id' - params = 'params' - rule_type = 'rule_type' - - class RuleType: - fallback_rule = 'fallback_rule' - letter_case_rule = 'letter_case_rule' - mapping_rule = 'mapping_rule' - regex_replace_rule = 'regex_replace_rule' - value_mapping_rule = 'value_mapping_rule' - - 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=ProductFeedRule, - 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 = { - 'params': 'map', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedRule, - 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 = { - 'attribute': 'string', - 'id': 'string', - 'params': 'list>', - 'rule_type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['RuleType'] = ProductFeedRule.RuleType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeedrulesuggestion.py b/tap_facebook/facebook_business/adobjects/productfeedrulesuggestion.py deleted file mode 100644 index 509824b..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeedrulesuggestion.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductFeedRuleSuggestion( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductFeedRuleSuggestion, self).__init__() - self._isProductFeedRuleSuggestion = True - self._api = api - - class Field(AbstractObject.Field): - attribute = 'attribute' - params = 'params' - type = 'type' - - _field_types = { - 'attribute': 'string', - 'params': 'list>', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeedschedule.py b/tap_facebook/facebook_business/adobjects/productfeedschedule.py deleted file mode 100644 index 4ffde4f..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeedschedule.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductFeedSchedule( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductFeedSchedule = True - super(ProductFeedSchedule, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - day_of_month = 'day_of_month' - day_of_week = 'day_of_week' - hour = 'hour' - id = 'id' - interval = 'interval' - interval_count = 'interval_count' - minute = 'minute' - timezone = 'timezone' - url = 'url' - username = 'username' - - class Interval: - daily = 'DAILY' - hourly = 'HOURLY' - monthly = 'MONTHLY' - weekly = 'WEEKLY' - - 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=ProductFeedSchedule, - 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 = { - 'day_of_month': 'unsigned int', - 'day_of_week': 'string', - 'hour': 'unsigned int', - 'id': 'string', - 'interval': 'Interval', - 'interval_count': 'unsigned int', - 'minute': 'unsigned int', - 'timezone': 'string', - 'url': 'string', - 'username': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Interval'] = ProductFeedSchedule.Interval.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeedupload.py b/tap_facebook/facebook_business/adobjects/productfeedupload.py deleted file mode 100644 index c62ab11..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeedupload.py +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductFeedUpload( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductFeedUpload = True - super(ProductFeedUpload, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - end_time = 'end_time' - error_count = 'error_count' - error_report = 'error_report' - filename = 'filename' - id = 'id' - input_method = 'input_method' - num_deleted_items = 'num_deleted_items' - num_detected_items = 'num_detected_items' - num_invalid_items = 'num_invalid_items' - num_persisted_items = 'num_persisted_items' - start_time = 'start_time' - url = 'url' - warning_count = 'warning_count' - - class InputMethod: - google_sheets_fetch = 'Google Sheets Fetch' - manual_upload = 'Manual Upload' - reupload_last_file = 'Reupload Last File' - server_fetch = 'Server Fetch' - user_initiated_server_fetch = 'User initiated server fetch' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'uploads' - - 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=ProductFeedUpload, - 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_error_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/error_report', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedUpload, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedUpload, 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_errors(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productfeeduploaderror import ProductFeedUploadError - param_types = { - 'error_priority': 'error_priority_enum', - } - enums = { - 'error_priority_enum': ProductFeedUploadError.ErrorPriority.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/errors', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedUploadError, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedUploadError, 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 = { - 'end_time': 'datetime', - 'error_count': 'int', - 'error_report': 'ProductFeedUploadErrorReport', - 'filename': 'string', - 'id': 'string', - 'input_method': 'InputMethod', - 'num_deleted_items': 'int', - 'num_detected_items': 'int', - 'num_invalid_items': 'int', - 'num_persisted_items': 'int', - 'start_time': 'datetime', - 'url': 'string', - 'warning_count': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['InputMethod'] = ProductFeedUpload.InputMethod.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeeduploaderror.py b/tap_facebook/facebook_business/adobjects/productfeeduploaderror.py deleted file mode 100644 index 5e051b9..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeeduploaderror.py +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductFeedUploadError( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductFeedUploadError = True - super(ProductFeedUploadError, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - affected_surfaces = 'affected_surfaces' - description = 'description' - error_type = 'error_type' - id = 'id' - severity = 'severity' - summary = 'summary' - total_count = 'total_count' - - class AffectedSurfaces: - dynamic_ads = 'Dynamic Ads' - marketplace = 'Marketplace' - us_marketplace = 'US Marketplace' - - class Severity: - fatal = 'fatal' - warning = 'warning' - - class ErrorPriority: - high = 'HIGH' - low = 'LOW' - medium = 'MEDIUM' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'errors' - - 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=ProductFeedUploadError, - 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_samples(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productfeeduploaderrorsample import ProductFeedUploadErrorSample - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/samples', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedUploadErrorSample, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedUploadErrorSample, 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_suggested_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.productfeedrulesuggestion import ProductFeedRuleSuggestion - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/suggested_rules', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductFeedRuleSuggestion, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductFeedRuleSuggestion, 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 = { - 'affected_surfaces': 'list', - 'description': 'string', - 'error_type': 'string', - 'id': 'string', - 'severity': 'Severity', - 'summary': 'string', - 'total_count': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['AffectedSurfaces'] = ProductFeedUploadError.AffectedSurfaces.__dict__.values() - field_enum_info['Severity'] = ProductFeedUploadError.Severity.__dict__.values() - field_enum_info['ErrorPriority'] = ProductFeedUploadError.ErrorPriority.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeeduploaderrorreport.py b/tap_facebook/facebook_business/adobjects/productfeeduploaderrorreport.py deleted file mode 100644 index 2c9773f..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeeduploaderrorreport.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductFeedUploadErrorReport( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductFeedUploadErrorReport, self).__init__() - self._isProductFeedUploadErrorReport = True - self._api = api - - class Field(AbstractObject.Field): - file_handle = 'file_handle' - report_status = 'report_status' - - _field_types = { - 'file_handle': 'string', - 'report_status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productfeeduploaderrorsample.py b/tap_facebook/facebook_business/adobjects/productfeeduploaderrorsample.py deleted file mode 100644 index 1c7720c..0000000 --- a/tap_facebook/facebook_business/adobjects/productfeeduploaderrorsample.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductFeedUploadErrorSample( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductFeedUploadErrorSample = True - super(ProductFeedUploadErrorSample, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - retailer_id = 'retailer_id' - row_number = 'row_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=ProductFeedUploadErrorSample, - 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', - 'retailer_id': 'string', - 'row_number': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productgroup.py b/tap_facebook/facebook_business/adobjects/productgroup.py deleted file mode 100644 index 3ca88e6..0000000 --- a/tap_facebook/facebook_business/adobjects/productgroup.py +++ /dev/null @@ -1,286 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductGroup( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductGroup = True - super(ProductGroup, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - product_catalog = 'product_catalog' - retailer_id = 'retailer_id' - variants = 'variants' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'product_groups' - - # @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_product_group(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 = { - 'deletion_method': 'deletion_method_enum', - } - enums = { - 'deletion_method_enum': [ - 'DELETE_ITEMS', - 'ONLY_IF_EMPTY', - ], - } - 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=ProductGroup, - 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 = { - 'default_product_id': 'string', - 'variants': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductGroup, - 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productitem import ProductItem - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/products', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductItem, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductItem, 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_product(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productitem import ProductItem - param_types = { - 'additional_image_urls': 'list', - 'additional_variant_attributes': 'map', - 'android_app_name': 'string', - 'android_class': 'string', - 'android_package': 'string', - 'android_url': 'string', - 'availability': 'availability_enum', - 'brand': 'string', - 'category': 'string', - 'checkout_url': 'string', - 'color': 'string', - 'commerce_tax_category': 'commerce_tax_category_enum', - 'condition': 'condition_enum', - 'currency': 'string', - 'custom_data': 'map', - 'custom_label_0': 'string', - 'custom_label_1': 'string', - 'custom_label_2': 'string', - 'custom_label_3': 'string', - 'custom_label_4': 'string', - 'custom_number_0': 'unsigned int', - 'custom_number_1': 'unsigned int', - 'custom_number_2': 'unsigned int', - 'custom_number_3': 'unsigned int', - 'custom_number_4': 'unsigned int', - 'description': 'string', - 'expiration_date': 'string', - 'fb_product_category': 'string', - 'gender': 'gender_enum', - 'gtin': 'string', - 'image_url': 'string', - 'inventory': 'unsigned int', - 'ios_app_name': 'string', - 'ios_app_store_id': 'unsigned int', - 'ios_url': 'string', - 'ipad_app_name': 'string', - 'ipad_app_store_id': 'unsigned int', - 'ipad_url': 'string', - 'iphone_app_name': 'string', - 'iphone_app_store_id': 'unsigned int', - 'iphone_url': 'string', - 'launch_date': 'string', - 'manufacturer_part_number': 'string', - 'marked_for_product_launch': 'marked_for_product_launch_enum', - 'material': 'string', - 'mobile_link': 'string', - 'name': 'string', - 'ordering_index': 'unsigned int', - 'pattern': 'string', - 'price': 'unsigned int', - 'product_type': 'string', - 'quantity_to_sell_on_facebook': 'unsigned int', - 'retailer_id': 'string', - 'return_policy_days': 'unsigned int', - 'sale_price': 'unsigned int', - 'sale_price_end_date': 'datetime', - 'sale_price_start_date': 'datetime', - 'short_description': 'string', - 'size': 'string', - 'start_date': 'string', - 'url': 'string', - 'visibility': 'visibility_enum', - 'windows_phone_app_id': 'string', - 'windows_phone_app_name': 'string', - 'windows_phone_url': 'string', - } - enums = { - 'availability_enum': ProductItem.Availability.__dict__.values(), - 'commerce_tax_category_enum': ProductItem.CommerceTaxCategory.__dict__.values(), - 'condition_enum': ProductItem.Condition.__dict__.values(), - 'gender_enum': ProductItem.Gender.__dict__.values(), - 'marked_for_product_launch_enum': ProductItem.MarkedForProductLaunch.__dict__.values(), - 'visibility_enum': ProductItem.Visibility.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/products', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductItem, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductItem, 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', - 'product_catalog': 'ProductCatalog', - 'retailer_id': 'string', - 'variants': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productimage.py b/tap_facebook/facebook_business/adobjects/productimage.py deleted file mode 100644 index 8c2c28a..0000000 --- a/tap_facebook/facebook_business/adobjects/productimage.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductImage( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductImage = True - 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 - if batch 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=ProductImage, - 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 = { - 'height': 'int', - 'id': 'string', - 'image_url': 'string', - 'width': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productitem.py b/tap_facebook/facebook_business/adobjects/productitem.py deleted file mode 100644 index df4c026..0000000 --- a/tap_facebook/facebook_business/adobjects/productitem.py +++ /dev/null @@ -1,1187 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductItem( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductItem = True - super(ProductItem, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - additional_image_cdn_urls = 'additional_image_cdn_urls' - additional_image_urls = 'additional_image_urls' - additional_variant_attributes = 'additional_variant_attributes' - age_group = 'age_group' - applinks = 'applinks' - availability = 'availability' - brand = 'brand' - capability_to_review_status = 'capability_to_review_status' - category = 'category' - category_specific_fields = 'category_specific_fields' - color = 'color' - commerce_insights = 'commerce_insights' - condition = 'condition' - currency = 'currency' - custom_data = 'custom_data' - custom_label_0 = 'custom_label_0' - custom_label_1 = 'custom_label_1' - custom_label_2 = 'custom_label_2' - custom_label_3 = 'custom_label_3' - custom_label_4 = 'custom_label_4' - custom_number_0 = 'custom_number_0' - custom_number_1 = 'custom_number_1' - custom_number_2 = 'custom_number_2' - custom_number_3 = 'custom_number_3' - custom_number_4 = 'custom_number_4' - description = 'description' - errors = 'errors' - expiration_date = 'expiration_date' - fb_product_category = 'fb_product_category' - gender = 'gender' - gtin = 'gtin' - id = 'id' - image_cdn_urls = 'image_cdn_urls' - image_fetch_status = 'image_fetch_status' - image_url = 'image_url' - images = 'images' - importer_address = 'importer_address' - importer_name = 'importer_name' - invalidation_errors = 'invalidation_errors' - inventory = 'inventory' - manufacturer_info = 'manufacturer_info' - manufacturer_part_number = 'manufacturer_part_number' - marked_for_product_launch = 'marked_for_product_launch' - material = 'material' - mobile_link = 'mobile_link' - name = 'name' - ordering_index = 'ordering_index' - origin_country = 'origin_country' - parent_product_id = 'parent_product_id' - pattern = 'pattern' - post_conversion_signal_based_enforcement_appeal_eligibility = 'post_conversion_signal_based_enforcement_appeal_eligibility' - price = 'price' - 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' - retailer_product_group_id = 'retailer_product_group_id' - review_rejection_reasons = 'review_rejection_reasons' - review_status = 'review_status' - sale_price = 'sale_price' - sale_price_end_date = 'sale_price_end_date' - sale_price_start_date = 'sale_price_start_date' - shipping_weight_unit = 'shipping_weight_unit' - shipping_weight_value = 'shipping_weight_value' - 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' - android_app_name = 'android_app_name' - android_class = 'android_class' - android_package = 'android_package' - android_url = 'android_url' - checkout_url = 'checkout_url' - commerce_tax_category = 'commerce_tax_category' - ios_app_name = 'ios_app_name' - ios_app_store_id = 'ios_app_store_id' - ios_url = 'ios_url' - ipad_app_name = 'ipad_app_name' - ipad_app_store_id = 'ipad_app_store_id' - ipad_url = 'ipad_url' - iphone_app_name = 'iphone_app_name' - iphone_app_store_id = 'iphone_app_store_id' - iphone_url = 'iphone_url' - launch_date = 'launch_date' - return_policy_days = 'return_policy_days' - windows_phone_app_id = 'windows_phone_app_id' - windows_phone_app_name = 'windows_phone_app_name' - windows_phone_url = 'windows_phone_url' - - class AgeGroup: - adult = 'adult' - all_ages = 'all ages' - infant = 'infant' - kids = 'kids' - newborn = 'newborn' - teen = 'teen' - toddler = 'toddler' - - 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' - - class Condition: - cpo = 'cpo' - new = 'new' - open_box_new = 'open_box_new' - refurbished = 'refurbished' - used = 'used' - used_fair = 'used_fair' - used_good = 'used_good' - used_like_new = 'used_like_new' - - class Gender: - female = 'female' - male = 'male' - unisex = 'unisex' - - class ImageFetchStatus: - direct_upload = 'DIRECT_UPLOAD' - fetched = 'FETCHED' - fetch_failed = 'FETCH_FAILED' - no_status = 'NO_STATUS' - outdated = 'OUTDATED' - partial_fetch = 'PARTIAL_FETCH' - - class ReviewStatus: - approved = 'approved' - outdated = 'outdated' - pending = 'pending' - rejected = 'rejected' - - class ShippingWeightUnit: - value_g = 'g' - kg = 'kg' - 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' - - class CommerceTaxCategory: - fb_animal = 'FB_ANIMAL' - fb_animal_supp = 'FB_ANIMAL_SUPP' - fb_aprl = 'FB_APRL' - fb_aprl_accessories = 'FB_APRL_ACCESSORIES' - fb_aprl_athl_unif = 'FB_APRL_ATHL_UNIF' - fb_aprl_cases = 'FB_APRL_CASES' - fb_aprl_clothing = 'FB_APRL_CLOTHING' - fb_aprl_costume = 'FB_APRL_COSTUME' - fb_aprl_cstm = 'FB_APRL_CSTM' - fb_aprl_formal = 'FB_APRL_FORMAL' - fb_aprl_handbag = 'FB_APRL_HANDBAG' - fb_aprl_jewelry = 'FB_APRL_JEWELRY' - fb_aprl_shoe = 'FB_APRL_SHOE' - fb_aprl_shoe_acc = 'FB_APRL_SHOE_ACC' - fb_aprl_swim = 'FB_APRL_SWIM' - fb_aprl_swim_chil = 'FB_APRL_SWIM_CHIL' - fb_aprl_swim_cvr = 'FB_APRL_SWIM_CVR' - fb_arts = 'FB_ARTS' - fb_arts_hobby = 'FB_ARTS_HOBBY' - fb_arts_party = 'FB_ARTS_PARTY' - fb_arts_party_gift_card = 'FB_ARTS_PARTY_GIFT_CARD' - fb_arts_ticket = 'FB_ARTS_TICKET' - fb_baby = 'FB_BABY' - fb_baby_bath = 'FB_BABY_BATH' - fb_baby_blanket = 'FB_BABY_BLANKET' - fb_baby_diaper = 'FB_BABY_DIAPER' - fb_baby_gift_set = 'FB_BABY_GIFT_SET' - fb_baby_health = 'FB_BABY_HEALTH' - fb_baby_nursing = 'FB_BABY_NURSING' - fb_baby_potty_trn = 'FB_BABY_POTTY_TRN' - fb_baby_safe = 'FB_BABY_SAFE' - fb_baby_toys = 'FB_BABY_TOYS' - fb_baby_transport = 'FB_BABY_TRANSPORT' - fb_baby_transport_acc = 'FB_BABY_TRANSPORT_ACC' - fb_bags = 'FB_BAGS' - fb_bags_bkpk = 'FB_BAGS_BKPK' - fb_bags_boxes = 'FB_BAGS_BOXES' - fb_bags_brfcs = 'FB_BAGS_BRFCS' - fb_bags_csmt_bag = 'FB_BAGS_CSMT_BAG' - fb_bags_dffl = 'FB_BAGS_DFFL' - fb_bags_dipr = 'FB_BAGS_DIPR' - fb_bags_fnny = 'FB_BAGS_FNNY' - fb_bags_grmt = 'FB_BAGS_GRMT' - fb_bags_lugg = 'FB_BAGS_LUGG' - fb_bags_lug_acc = 'FB_BAGS_LUG_ACC' - fb_bags_msgr = 'FB_BAGS_MSGR' - fb_bags_tote = 'FB_BAGS_TOTE' - fb_bags_trn_cas = 'FB_BAGS_TRN_CAS' - fb_bldg = 'FB_BLDG' - fb_bldg_acc = 'FB_BLDG_ACC' - fb_bldg_cnsmb = 'FB_BLDG_CNSMB' - fb_bldg_fence = 'FB_BLDG_FENCE' - fb_bldg_fuel_tnk = 'FB_BLDG_FUEL_TNK' - fb_bldg_ht_vnt = 'FB_BLDG_HT_VNT' - fb_bldg_lock = 'FB_BLDG_LOCK' - fb_bldg_matrl = 'FB_BLDG_MATRL' - fb_bldg_plmb = 'FB_BLDG_PLMB' - fb_bldg_pump = 'FB_BLDG_PUMP' - fb_bldg_pwrs = 'FB_BLDG_PWRS' - fb_bldg_str_tank = 'FB_BLDG_STR_TANK' - fb_bldg_s_eng = 'FB_BLDG_S_ENG' - fb_bldg_tl_acc = 'FB_BLDG_TL_ACC' - fb_bldg_tool = 'FB_BLDG_TOOL' - fb_busind = 'FB_BUSIND' - fb_busind_advertising = 'FB_BUSIND_ADVERTISING' - fb_busind_agriculture = 'FB_BUSIND_AGRICULTURE' - fb_busind_automation = 'FB_BUSIND_AUTOMATION' - fb_busind_heavy_mach = 'FB_BUSIND_HEAVY_MACH' - fb_busind_lab = 'FB_BUSIND_LAB' - fb_busind_medical = 'FB_BUSIND_MEDICAL' - fb_busind_retail = 'FB_BUSIND_RETAIL' - fb_busind_sanitary_ct = 'FB_BUSIND_SANITARY_CT' - fb_busind_sign = 'FB_BUSIND_SIGN' - fb_busind_storage = 'FB_BUSIND_STORAGE' - fb_busind_storage_acc = 'FB_BUSIND_STORAGE_ACC' - fb_busind_work_gear = 'FB_BUSIND_WORK_GEAR' - fb_camera_acc = 'FB_CAMERA_ACC' - fb_camera_camera = 'FB_CAMERA_CAMERA' - fb_camera_optic = 'FB_CAMERA_OPTIC' - fb_camera_optics = 'FB_CAMERA_OPTICS' - fb_camera_photo = 'FB_CAMERA_PHOTO' - fb_elec = 'FB_ELEC' - fb_elec_acc = 'FB_ELEC_ACC' - fb_elec_arcdade = 'FB_ELEC_ARCDADE' - fb_elec_audio = 'FB_ELEC_AUDIO' - fb_elec_circuit = 'FB_ELEC_CIRCUIT' - fb_elec_comm = 'FB_ELEC_COMM' - fb_elec_computer = 'FB_ELEC_COMPUTER' - fb_elec_gps_acc = 'FB_ELEC_GPS_ACC' - fb_elec_gps_nav = 'FB_ELEC_GPS_NAV' - fb_elec_gps_trk = 'FB_ELEC_GPS_TRK' - fb_elec_marine = 'FB_ELEC_MARINE' - fb_elec_network = 'FB_ELEC_NETWORK' - fb_elec_part = 'FB_ELEC_PART' - fb_elec_print = 'FB_ELEC_PRINT' - fb_elec_radar = 'FB_ELEC_RADAR' - fb_elec_sftwr = 'FB_ELEC_SFTWR' - fb_elec_speed_rdr = 'FB_ELEC_SPEED_RDR' - fb_elec_television = 'FB_ELEC_TELEVISION' - fb_elec_toll = 'FB_ELEC_TOLL' - fb_elec_video = 'FB_ELEC_VIDEO' - fb_elec_vid_gm_acc = 'FB_ELEC_VID_GM_ACC' - fb_elec_vid_gm_cnsl = 'FB_ELEC_VID_GM_CNSL' - fb_food = 'FB_FOOD' - fb_furn = 'FB_FURN' - fb_furn_baby = 'FB_FURN_BABY' - fb_furn_bench = 'FB_FURN_BENCH' - fb_furn_cart = 'FB_FURN_CART' - fb_furn_chair = 'FB_FURN_CHAIR' - fb_furn_chair_acc = 'FB_FURN_CHAIR_ACC' - fb_furn_divide = 'FB_FURN_DIVIDE' - fb_furn_divide_acc = 'FB_FURN_DIVIDE_ACC' - fb_furn_ent_ctr = 'FB_FURN_ENT_CTR' - fb_furn_futn = 'FB_FURN_FUTN' - fb_furn_futn_pad = 'FB_FURN_FUTN_PAD' - fb_furn_office = 'FB_FURN_OFFICE' - fb_furn_office_acc = 'FB_FURN_OFFICE_ACC' - fb_furn_otto = 'FB_FURN_OTTO' - fb_furn_outdoor = 'FB_FURN_OUTDOOR' - fb_furn_outdoor_acc = 'FB_FURN_OUTDOOR_ACC' - fb_furn_sets = 'FB_FURN_SETS' - fb_furn_shelve_acc = 'FB_FURN_SHELVE_ACC' - fb_furn_shlf = 'FB_FURN_SHLF' - fb_furn_sofa = 'FB_FURN_SOFA' - fb_furn_sofa_acc = 'FB_FURN_SOFA_ACC' - fb_furn_storage = 'FB_FURN_STORAGE' - fb_furn_tabl = 'FB_FURN_TABL' - fb_furn_tabl_acc = 'FB_FURN_TABL_ACC' - fb_generic_taxable = 'FB_GENERIC_TAXABLE' - fb_hlth = 'FB_HLTH' - fb_hlth_hlth = 'FB_HLTH_HLTH' - fb_hlth_jwl_cr = 'FB_HLTH_JWL_CR' - fb_hlth_lilp_blm = 'FB_HLTH_LILP_BLM' - fb_hlth_ltn_spf = 'FB_HLTH_LTN_SPF' - fb_hlth_prsl_cr = 'FB_HLTH_PRSL_CR' - fb_hlth_skn_cr = 'FB_HLTH_SKN_CR' - fb_hmgn = 'FB_HMGN' - fb_hmgn_bath = 'FB_HMGN_BATH' - fb_hmgn_dcor = 'FB_HMGN_DCOR' - fb_hmgn_emgy = 'FB_HMGN_EMGY' - fb_hmgn_fplc = 'FB_HMGN_FPLC' - fb_hmgn_fplc_acc = 'FB_HMGN_FPLC_ACC' - fb_hmgn_gs_sft = 'FB_HMGN_GS_SFT' - fb_hmgn_hs_acc = 'FB_HMGN_HS_ACC' - fb_hmgn_hs_app = 'FB_HMGN_HS_APP' - fb_hmgn_hs_spl = 'FB_HMGN_HS_SPL' - fb_hmgn_ktcn = 'FB_HMGN_KTCN' - fb_hmgn_lawn = 'FB_HMGN_LAWN' - fb_hmgn_lght = 'FB_HMGN_LGHT' - fb_hmgn_linn = 'FB_HMGN_LINN' - fb_hmgn_lt_acc = 'FB_HMGN_LT_ACC' - fb_hmgn_otdr = 'FB_HMGN_OTDR' - fb_hmgn_pool = 'FB_HMGN_POOL' - fb_hmgn_scty = 'FB_HMGN_SCTY' - fb_hmgn_smk_acc = 'FB_HMGN_SMK_ACC' - fb_hmgn_umbr = 'FB_HMGN_UMBR' - fb_hmgn_umbr_acc = 'FB_HMGN_UMBR_ACC' - fb_mdia = 'FB_MDIA' - fb_mdia_book = 'FB_MDIA_BOOK' - fb_mdia_dvds = 'FB_MDIA_DVDS' - fb_mdia_mag = 'FB_MDIA_MAG' - fb_mdia_manl = 'FB_MDIA_MANL' - fb_mdia_musc = 'FB_MDIA_MUSC' - fb_mdia_prj_pln = 'FB_MDIA_PRJ_PLN' - fb_mdia_sht_mus = 'FB_MDIA_SHT_MUS' - fb_offc = 'FB_OFFC' - fb_offc_bkac = 'FB_OFFC_BKAC' - fb_offc_crts = 'FB_OFFC_CRTS' - fb_offc_dskp = 'FB_OFFC_DSKP' - fb_offc_eqip = 'FB_OFFC_EQIP' - fb_offc_flng = 'FB_OFFC_FLNG' - fb_offc_gnrl = 'FB_OFFC_GNRL' - fb_offc_instm = 'FB_OFFC_INSTM' - fb_offc_lp_dsk = 'FB_OFFC_LP_DSK' - fb_offc_mats = 'FB_OFFC_MATS' - fb_offc_nm_plt = 'FB_OFFC_NM_PLT' - fb_offc_ppr_hndl = 'FB_OFFC_PPR_HNDL' - fb_offc_prsnt_spl = 'FB_OFFC_PRSNT_SPL' - fb_offc_sealr = 'FB_OFFC_SEALR' - fb_offc_ship_spl = 'FB_OFFC_SHIP_SPL' - fb_rlgn = 'FB_RLGN' - fb_rlgn_cmny = 'FB_RLGN_CMNY' - fb_rlgn_item = 'FB_RLGN_ITEM' - fb_rlgn_wedd = 'FB_RLGN_WEDD' - fb_sftwr = 'FB_SFTWR' - fb_sfwr_cmptr = 'FB_SFWR_CMPTR' - fb_sfwr_dgtl_gd = 'FB_SFWR_DGTL_GD' - fb_sfwr_game = 'FB_SFWR_GAME' - fb_shipping = 'FB_SHIPPING' - fb_spor = 'FB_SPOR' - fb_sport_athl = 'FB_SPORT_ATHL' - fb_sport_athl_clth = 'FB_SPORT_ATHL_CLTH' - fb_sport_athl_shoe = 'FB_SPORT_ATHL_SHOE' - fb_sport_athl_sprt = 'FB_SPORT_ATHL_SPRT' - fb_sport_exrcs = 'FB_SPORT_EXRCS' - fb_sport_indr_gm = 'FB_SPORT_INDR_GM' - fb_sport_otdr_gm = 'FB_SPORT_OTDR_GM' - fb_toys = 'FB_TOYS' - fb_toys_eqip = 'FB_TOYS_EQIP' - fb_toys_game = 'FB_TOYS_GAME' - fb_toys_pzzl = 'FB_TOYS_PZZL' - fb_toys_tmrs = 'FB_TOYS_TMRS' - fb_toys_toys = 'FB_TOYS_TOYS' - fb_vehi = 'FB_VEHI' - fb_vehi_part = 'FB_VEHI_PART' - - class ErrorPriority: - high = 'HIGH' - low = 'LOW' - medium = 'MEDIUM' - - class ErrorType: - address_blocklisted_in_market = 'ADDRESS_BLOCKLISTED_IN_MARKET' - ar_deleted_due_to_update = 'AR_DELETED_DUE_TO_UPDATE' - ar_policy_violated = 'AR_POLICY_VIOLATED' - available = 'AVAILABLE' - bad_quality_image = 'BAD_QUALITY_IMAGE' - biz_msg_ai_agent_disabled_by_user = 'BIZ_MSG_AI_AGENT_DISABLED_BY_USER' - cannot_edit_subscription_products = 'CANNOT_EDIT_SUBSCRIPTION_PRODUCTS' - checkout_disabled_by_user = 'CHECKOUT_DISABLED_BY_USER' - 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' - 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_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' - hidden_until_product_launch = 'HIDDEN_UNTIL_PRODUCT_LAUNCH' - 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' - image_fetch_failed_forbidden = 'IMAGE_FETCH_FAILED_FORBIDDEN' - image_fetch_failed_link_broken = 'IMAGE_FETCH_FAILED_LINK_BROKEN' - image_fetch_failed_timed_out = 'IMAGE_FETCH_FAILED_TIMED_OUT' - 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_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_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_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' - overlay_disclaimer_exceeded_max_length = 'OVERLAY_DISCLAIMER_EXCEEDED_MAX_LENGTH' - part_of_product_launch = 'PART_OF_PRODUCT_LAUNCH' - 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' - product_not_dominant_currency = 'PRODUCT_NOT_DOMINANT_CURRENCY' - product_out_of_stock = 'PRODUCT_OUT_OF_STOCK' - product_url_equals_domain = 'PRODUCT_URL_EQUALS_DOMAIN' - 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' - property_value_missing = 'PROPERTY_VALUE_MISSING' - property_value_missing_warning = 'PROPERTY_VALUE_MISSING_WARNING' - 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' - 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' - 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' - marked = 'marked' - not_marked = 'not_marked' - - class OriginCountry: - ad = 'AD' - ae = 'AE' - af = 'AF' - ag = 'AG' - ai = 'AI' - al = 'AL' - am = 'AM' - an = 'AN' - ao = 'AO' - aq = 'AQ' - ar = 'AR' - value_as = 'AS' - at = 'AT' - au = 'AU' - aw = 'AW' - ax = 'AX' - az = 'AZ' - ba = 'BA' - bb = 'BB' - bd = 'BD' - be = 'BE' - bf = 'BF' - bg = 'BG' - bh = 'BH' - bi = 'BI' - bj = 'BJ' - bl = 'BL' - bm = 'BM' - bn = 'BN' - bo = 'BO' - bq = 'BQ' - br = 'BR' - bs = 'BS' - bt = 'BT' - bv = 'BV' - bw = 'BW' - by = 'BY' - bz = 'BZ' - ca = 'CA' - cc = 'CC' - cd = 'CD' - cf = 'CF' - cg = 'CG' - ch = 'CH' - ci = 'CI' - ck = 'CK' - cl = 'CL' - cm = 'CM' - cn = 'CN' - co = 'CO' - cr = 'CR' - cu = 'CU' - cv = 'CV' - cw = 'CW' - cx = 'CX' - cy = 'CY' - cz = 'CZ' - de = 'DE' - dj = 'DJ' - dk = 'DK' - dm = 'DM' - do = 'DO' - dz = 'DZ' - ec = 'EC' - ee = 'EE' - eg = 'EG' - eh = 'EH' - er = 'ER' - es = 'ES' - et = 'ET' - fi = 'FI' - fj = 'FJ' - fk = 'FK' - fm = 'FM' - fo = 'FO' - fr = 'FR' - ga = 'GA' - gb = 'GB' - gd = 'GD' - ge = 'GE' - gf = 'GF' - gg = 'GG' - gh = 'GH' - gi = 'GI' - gl = 'GL' - gm = 'GM' - gn = 'GN' - gp = 'GP' - gq = 'GQ' - gr = 'GR' - gs = 'GS' - gt = 'GT' - gu = 'GU' - gw = 'GW' - gy = 'GY' - hk = 'HK' - hm = 'HM' - hn = 'HN' - hr = 'HR' - ht = 'HT' - hu = 'HU' - id = 'ID' - ie = 'IE' - il = 'IL' - im = 'IM' - value_in = 'IN' - io = 'IO' - iq = 'IQ' - ir = 'IR' - value_is = 'IS' - it = 'IT' - je = 'JE' - jm = 'JM' - jo = 'JO' - jp = 'JP' - ke = 'KE' - kg = 'KG' - kh = 'KH' - ki = 'KI' - km = 'KM' - kn = 'KN' - kp = 'KP' - kr = 'KR' - kw = 'KW' - ky = 'KY' - kz = 'KZ' - la = 'LA' - lb = 'LB' - lc = 'LC' - li = 'LI' - lk = 'LK' - lr = 'LR' - ls = 'LS' - lt = 'LT' - lu = 'LU' - lv = 'LV' - ly = 'LY' - ma = 'MA' - mc = 'MC' - md = 'MD' - me = 'ME' - mf = 'MF' - mg = 'MG' - mh = 'MH' - mk = 'MK' - ml = 'ML' - mm = 'MM' - mn = 'MN' - mo = 'MO' - mp = 'MP' - mq = 'MQ' - mr = 'MR' - ms = 'MS' - mt = 'MT' - mu = 'MU' - mv = 'MV' - mw = 'MW' - mx = 'MX' - my = 'MY' - mz = 'MZ' - na = 'NA' - nc = 'NC' - ne = 'NE' - nf = 'NF' - ng = 'NG' - ni = 'NI' - nl = 'NL' - no = 'NO' - np = 'NP' - nr = 'NR' - nu = 'NU' - nz = 'NZ' - om = 'OM' - pa = 'PA' - pe = 'PE' - pf = 'PF' - pg = 'PG' - ph = 'PH' - pk = 'PK' - pl = 'PL' - pm = 'PM' - pn = 'PN' - pr = 'PR' - ps = 'PS' - pt = 'PT' - pw = 'PW' - py = 'PY' - qa = 'QA' - re = 'RE' - ro = 'RO' - rs = 'RS' - ru = 'RU' - rw = 'RW' - sa = 'SA' - sb = 'SB' - sc = 'SC' - sd = 'SD' - se = 'SE' - sg = 'SG' - sh = 'SH' - si = 'SI' - sj = 'SJ' - sk = 'SK' - sl = 'SL' - sm = 'SM' - sn = 'SN' - so = 'SO' - sr = 'SR' - ss = 'SS' - st = 'ST' - sv = 'SV' - sx = 'SX' - sy = 'SY' - sz = 'SZ' - tc = 'TC' - td = 'TD' - tf = 'TF' - tg = 'TG' - th = 'TH' - tj = 'TJ' - tk = 'TK' - tl = 'TL' - tm = 'TM' - tn = 'TN' - to = 'TO' - tr = 'TR' - tt = 'TT' - tv = 'TV' - tw = 'TW' - tz = 'TZ' - ua = 'UA' - ug = 'UG' - um = 'UM' - us = 'US' - uy = 'UY' - uz = 'UZ' - va = 'VA' - vc = 'VC' - ve = 'VE' - vg = 'VG' - vi = 'VI' - vn = 'VN' - vu = 'VU' - wf = 'WF' - ws = 'WS' - xk = 'XK' - ye = 'YE' - yt = 'YT' - za = 'ZA' - zm = 'ZM' - zw = 'ZW' - - class WaComplianceCategory: - country_origin_exempt = 'COUNTRY_ORIGIN_EXEMPT' - value_default = 'DEFAULT' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'products' - - # @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_product(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 - if batch 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 = { - 'catalog_id': 'string', - 'image_height': 'unsigned int', - 'image_width': 'unsigned int', - 'override_country': 'string', - 'override_language': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductItem, - 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 = { - 'additional_image_urls': 'list', - 'additional_uploaded_image_ids': 'list', - 'additional_variant_attributes': 'map', - 'android_app_name': 'string', - 'android_class': 'string', - 'android_package': 'string', - 'android_url': 'string', - 'availability': 'availability_enum', - 'brand': 'string', - 'category': 'string', - 'category_specific_fields': 'map', - 'checkout_url': 'string', - 'color': 'string', - 'commerce_tax_category': 'commerce_tax_category_enum', - 'condition': 'condition_enum', - 'currency': 'string', - 'custom_data': 'map', - 'custom_label_0': 'string', - 'custom_label_1': 'string', - 'custom_label_2': 'string', - 'custom_label_3': 'string', - 'custom_label_4': 'string', - 'custom_number_0': 'unsigned int', - 'custom_number_1': 'unsigned int', - 'custom_number_2': 'unsigned int', - 'custom_number_3': 'unsigned int', - 'custom_number_4': 'unsigned int', - 'description': 'string', - 'expiration_date': 'string', - 'fb_product_category': 'string', - 'gender': 'gender_enum', - 'gtin': 'string', - 'image_url': 'string', - 'importer_address': 'map', - 'importer_name': 'string', - 'inventory': 'unsigned int', - 'ios_app_name': 'string', - 'ios_app_store_id': 'unsigned int', - 'ios_url': 'string', - 'ipad_app_name': 'string', - 'ipad_app_store_id': 'unsigned int', - 'ipad_url': 'string', - 'iphone_app_name': 'string', - 'iphone_app_store_id': 'unsigned int', - 'iphone_url': 'string', - 'launch_date': 'string', - 'manufacturer_info': 'string', - 'manufacturer_part_number': 'string', - 'marked_for_product_launch': 'marked_for_product_launch_enum', - 'material': 'string', - 'mobile_link': 'string', - 'name': 'string', - 'ordering_index': 'unsigned int', - 'origin_country': 'origin_country_enum', - 'pattern': 'string', - 'price': 'unsigned int', - 'product_type': 'string', - 'quantity_to_sell_on_facebook': 'unsigned int', - 'retailer_id': 'string', - 'return_policy_days': 'unsigned int', - 'sale_price': 'unsigned int', - 'sale_price_end_date': 'datetime', - 'sale_price_start_date': 'datetime', - 'short_description': 'string', - 'size': 'string', - 'start_date': 'string', - 'url': 'string', - 'visibility': 'visibility_enum', - 'wa_compliance_category': 'wa_compliance_category_enum', - 'windows_phone_app_id': 'string', - 'windows_phone_app_name': 'string', - 'windows_phone_url': 'string', - } - enums = { - 'availability_enum': ProductItem.Availability.__dict__.values(), - 'commerce_tax_category_enum': ProductItem.CommerceTaxCategory.__dict__.values(), - 'condition_enum': ProductItem.Condition.__dict__.values(), - 'gender_enum': ProductItem.Gender.__dict__.values(), - 'marked_for_product_launch_enum': ProductItem.MarkedForProductLaunch.__dict__.values(), - 'origin_country_enum': ProductItem.OriginCountry.__dict__.values(), - 'visibility_enum': ProductItem.Visibility.__dict__.values(), - 'wa_compliance_category_enum': ProductItem.WaComplianceCategory.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductItem, - 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() - - def get_product_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.productset import ProductSet - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductSet, 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 = { - 'additional_image_cdn_urls': 'list>>', - 'additional_image_urls': 'list', - 'additional_variant_attributes': 'list>', - 'age_group': 'AgeGroup', - 'applinks': 'CatalogItemAppLinks', - 'availability': 'Availability', - 'brand': 'string', - 'capability_to_review_status': 'list>', - 'category': 'string', - 'category_specific_fields': 'CatalogSubVerticalList', - 'color': 'string', - 'commerce_insights': 'ProductItemCommerceInsights', - 'condition': 'Condition', - 'currency': 'string', - 'custom_data': 'list>', - 'custom_label_0': 'string', - 'custom_label_1': 'string', - 'custom_label_2': 'string', - 'custom_label_3': 'string', - 'custom_label_4': 'string', - 'custom_number_0': 'string', - 'custom_number_1': 'string', - 'custom_number_2': 'string', - 'custom_number_3': 'string', - 'custom_number_4': 'string', - 'description': 'string', - 'errors': 'list', - 'expiration_date': 'string', - 'fb_product_category': 'string', - 'gender': 'Gender', - 'gtin': 'string', - 'id': 'string', - 'image_cdn_urls': 'list>', - 'image_fetch_status': 'ImageFetchStatus', - 'image_url': 'string', - 'images': 'list', - 'importer_address': 'ProductItemImporterAddress', - 'importer_name': 'string', - 'invalidation_errors': 'list', - 'inventory': 'int', - 'manufacturer_info': 'string', - 'manufacturer_part_number': 'string', - 'marked_for_product_launch': 'string', - 'material': 'string', - 'mobile_link': 'string', - 'name': 'string', - 'ordering_index': 'int', - 'origin_country': 'string', - 'parent_product_id': 'string', - 'pattern': 'string', - 'post_conversion_signal_based_enforcement_appeal_eligibility': 'bool', - 'price': 'string', - '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', - 'retailer_product_group_id': 'string', - 'review_rejection_reasons': 'list', - 'review_status': 'ReviewStatus', - 'sale_price': 'string', - 'sale_price_end_date': 'string', - 'sale_price_start_date': 'string', - 'shipping_weight_unit': 'ShippingWeightUnit', - 'shipping_weight_value': 'float', - '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', - 'android_app_name': 'string', - 'android_class': 'string', - 'android_package': 'string', - 'android_url': 'string', - 'checkout_url': 'string', - 'commerce_tax_category': 'CommerceTaxCategory', - 'ios_app_name': 'string', - 'ios_app_store_id': 'unsigned int', - 'ios_url': 'string', - 'ipad_app_name': 'string', - 'ipad_app_store_id': 'unsigned int', - 'ipad_url': 'string', - 'iphone_app_name': 'string', - 'iphone_app_store_id': 'unsigned int', - 'iphone_url': 'string', - 'launch_date': 'string', - 'return_policy_days': 'unsigned int', - 'windows_phone_app_id': 'string', - 'windows_phone_app_name': 'string', - 'windows_phone_url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['AgeGroup'] = ProductItem.AgeGroup.__dict__.values() - field_enum_info['Availability'] = ProductItem.Availability.__dict__.values() - field_enum_info['Condition'] = ProductItem.Condition.__dict__.values() - field_enum_info['Gender'] = ProductItem.Gender.__dict__.values() - 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() - field_enum_info['ErrorType'] = ProductItem.ErrorType.__dict__.values() - field_enum_info['MarkedForProductLaunch'] = ProductItem.MarkedForProductLaunch.__dict__.values() - field_enum_info['OriginCountry'] = ProductItem.OriginCountry.__dict__.values() - field_enum_info['WaComplianceCategory'] = ProductItem.WaComplianceCategory.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productitemcommerceinsights.py b/tap_facebook/facebook_business/adobjects/productitemcommerceinsights.py deleted file mode 100644 index 0f15e16..0000000 --- a/tap_facebook/facebook_business/adobjects/productitemcommerceinsights.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductItemCommerceInsights( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductItemCommerceInsights, self).__init__() - self._isProductItemCommerceInsights = True - self._api = api - - class Field(AbstractObject.Field): - message_sends = 'message_sends' - organic_impressions = 'organic_impressions' - paid_impressions = 'paid_impressions' - - _field_types = { - 'message_sends': 'unsigned int', - 'organic_impressions': 'unsigned int', - 'paid_impressions': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productitemerror.py b/tap_facebook/facebook_business/adobjects/productitemerror.py deleted file mode 100644 index 9e0b5f8..0000000 --- a/tap_facebook/facebook_business/adobjects/productitemerror.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductItemError( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductItemError, self).__init__() - self._isProductItemError = True - self._api = api - - class Field(AbstractObject.Field): - description = 'description' - error_priority = 'error_priority' - error_type = 'error_type' - title = 'title' - - _field_types = { - 'description': 'string', - 'error_priority': 'string', - 'error_type': 'string', - 'title': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productitemimporteraddress.py b/tap_facebook/facebook_business/adobjects/productitemimporteraddress.py deleted file mode 100644 index 1b1ae88..0000000 --- a/tap_facebook/facebook_business/adobjects/productitemimporteraddress.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductItemImporterAddress( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductItemImporterAddress, self).__init__() - self._isProductItemImporterAddress = True - self._api = api - - class Field(AbstractObject.Field): - city = 'city' - country = 'country' - postal_code = 'postal_code' - region = 'region' - street1 = 'street1' - street2 = 'street2' - - _field_types = { - 'city': 'string', - 'country': 'string', - 'postal_code': 'string', - 'region': 'string', - 'street1': 'string', - 'street2': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productitemlocalinfo.py b/tap_facebook/facebook_business/adobjects/productitemlocalinfo.py deleted file mode 100644 index d8b2bf2..0000000 --- a/tap_facebook/facebook_business/adobjects/productitemlocalinfo.py +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/productitemlocalinfolatlongshape.py b/tap_facebook/facebook_business/adobjects/productitemlocalinfolatlongshape.py deleted file mode 100644 index c4e5d5a..0000000 --- a/tap_facebook/facebook_business/adobjects/productitemlocalinfolatlongshape.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/productset.py b/tap_facebook/facebook_business/adobjects/productset.py deleted file mode 100644 index ed8e791..0000000 --- a/tap_facebook/facebook_business/adobjects/productset.py +++ /dev/null @@ -1,470 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ProductSet( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProductSet = True - super(ProductSet, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - auto_creation_url = 'auto_creation_url' - filter = 'filter' - id = 'id' - latest_metadata = 'latest_metadata' - live_metadata = 'live_metadata' - name = 'name' - ordering_info = 'ordering_info' - product_catalog = 'product_catalog' - product_count = 'product_count' - retailer_id = 'retailer_id' - metadata = 'metadata' - publish_to_shops = 'publish_to_shops' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'product_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.productcatalog import ProductCatalog - return ProductCatalog(api=self._api, fbid=parent_id).create_product_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 = { - 'allow_live_product_set_deletion': 'bool', - } - 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=ProductSet, - 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 = { - 'filter': 'Object', - 'metadata': 'map', - 'name': 'string', - 'ordering_info': 'list', - 'publish_to_shops': 'list', - 'retailer_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductSet, - 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_automotive_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.') - from facebook_business.adobjects.automotivemodel import AutomotiveModel - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/automotive_models', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AutomotiveModel, - api_type='EDGE', - response_parser=ObjectParser(target_class=AutomotiveModel, 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_destinations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.destination import Destination - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/destinations', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Destination, - api_type='EDGE', - response_parser=ObjectParser(target_class=Destination, 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_flights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.flight import Flight - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/flights', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Flight, - api_type='EDGE', - response_parser=ObjectParser(target_class=Flight, 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_home_listings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.homelisting import HomeListing - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/home_listings', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=HomeListing, - api_type='EDGE', - response_parser=ObjectParser(target_class=HomeListing, 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_hotels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.hotel import Hotel - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/hotels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Hotel, - api_type='EDGE', - response_parser=ObjectParser(target_class=Hotel, 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_titles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.mediatitle import MediaTitle - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/media_titles', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=MediaTitle, - api_type='EDGE', - response_parser=ObjectParser(target_class=MediaTitle, 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_products(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productitem import ProductItem - param_types = { - 'bulk_pagination': 'bool', - 'error_priority': 'error_priority_enum', - 'error_type': 'error_type_enum', - 'filter': 'Object', - } - enums = { - 'error_priority_enum': ProductItem.ErrorPriority.__dict__.values(), - 'error_type_enum': ProductItem.ErrorType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/products', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProductItem, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProductItem, 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_vehicle_offers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.vehicleoffer import VehicleOffer - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/vehicle_offers', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VehicleOffer, - api_type='EDGE', - response_parser=ObjectParser(target_class=VehicleOffer, 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_vehicles(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.vehicle import Vehicle - param_types = { - 'bulk_pagination': 'bool', - 'filter': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/vehicles', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Vehicle, - api_type='EDGE', - response_parser=ObjectParser(target_class=Vehicle, 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_creation_url': 'string', - 'filter': 'string', - 'id': 'string', - 'latest_metadata': 'ProductSetMetadata', - 'live_metadata': 'ProductSetMetadata', - 'name': 'string', - 'ordering_info': 'list', - 'product_catalog': 'ProductCatalog', - 'product_count': 'unsigned int', - 'retailer_id': 'string', - 'metadata': 'map', - 'publish_to_shops': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productsetmetadata.py b/tap_facebook/facebook_business/adobjects/productsetmetadata.py deleted file mode 100644 index 9a3977f..0000000 --- a/tap_facebook/facebook_business/adobjects/productsetmetadata.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductSetMetadata( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductSetMetadata, self).__init__() - self._isProductSetMetadata = True - self._api = api - - class Field(AbstractObject.Field): - cover_image_url = 'cover_image_url' - description = 'description' - external_url = 'external_url' - integrity_review_status = 'integrity_review_status' - - _field_types = { - 'cover_image_url': 'string', - 'description': 'string', - 'external_url': 'string', - 'integrity_review_status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/productvariant.py b/tap_facebook/facebook_business/adobjects/productvariant.py deleted file mode 100644 index e20ec91..0000000 --- a/tap_facebook/facebook_business/adobjects/productvariant.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProductVariant( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductVariant, self).__init__() - self._isProductVariant = True - self._api = api - - class Field(AbstractObject.Field): - label = 'label' - options = 'options' - product_field = 'product_field' - - _field_types = { - 'label': 'string', - 'options': 'list', - 'product_field': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/profile.py b/tap_facebook/facebook_business/adobjects/profile.py deleted file mode 100644 index db55e73..0000000 --- a/tap_facebook/facebook_business/adobjects/profile.py +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Profile( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isProfile = True - super(Profile, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - can_post = 'can_post' - id = 'id' - link = 'link' - name = 'name' - pic = 'pic' - pic_crop = 'pic_crop' - pic_large = 'pic_large' - pic_small = 'pic_small' - pic_square = 'pic_square' - profile_type = 'profile_type' - username = 'username' - - class ProfileType: - application = 'application' - event = 'event' - group = 'group' - page = 'page' - user = 'user' - - class Type: - angry = 'ANGRY' - care = 'CARE' - fire = 'FIRE' - haha = 'HAHA' - hundred = 'HUNDRED' - like = 'LIKE' - love = 'LOVE' - none = 'NONE' - pride = 'PRIDE' - sad = 'SAD' - thankful = 'THANKFUL' - wow = 'WOW' - - 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=Profile, - 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profilepicturesource import ProfilePictureSource - param_types = { - 'height': 'int', - 'redirect': 'bool', - 'type': 'type_enum', - 'width': 'int', - } - enums = { - 'type_enum': ProfilePictureSource.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/picture', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProfilePictureSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProfilePictureSource, 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 = { - 'can_post': 'bool', - 'id': 'string', - 'link': 'string', - 'name': 'string', - 'pic': 'string', - 'pic_crop': 'ProfilePictureSource', - 'pic_large': 'string', - 'pic_small': 'string', - 'pic_square': 'string', - 'profile_type': 'ProfileType', - 'username': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ProfileType'] = Profile.ProfileType.__dict__.values() - field_enum_info['Type'] = Profile.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/profilepicturesource.py b/tap_facebook/facebook_business/adobjects/profilepicturesource.py deleted file mode 100644 index e46a1c4..0000000 --- a/tap_facebook/facebook_business/adobjects/profilepicturesource.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ProfilePictureSource( - AbstractObject, -): - - def __init__(self, api=None): - super(ProfilePictureSource, self).__init__() - self._isProfilePictureSource = True - self._api = api - - class Field(AbstractObject.Field): - bottom = 'bottom' - cache_key = 'cache_key' - height = 'height' - is_silhouette = 'is_silhouette' - left = 'left' - right = 'right' - top = 'top' - url = 'url' - width = 'width' - - class Type: - album = 'album' - small = 'small' - thumbnail = 'thumbnail' - - _field_types = { - 'bottom': 'unsigned int', - 'cache_key': 'string', - 'height': 'unsigned int', - 'is_silhouette': 'bool', - 'left': 'unsigned int', - 'right': 'unsigned int', - 'top': 'unsigned int', - 'url': 'string', - 'width': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Type'] = ProfilePictureSource.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/publisherblocklist.py b/tap_facebook/facebook_business/adobjects/publisherblocklist.py deleted file mode 100644 index 43642bd..0000000 --- a/tap_facebook/facebook_business/adobjects/publisherblocklist.py +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 PublisherBlockList( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isPublisherBlockList = True - super(PublisherBlockList, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - app_publishers = 'app_publishers' - business_owner_id = 'business_owner_id' - id = 'id' - is_auto_blocking_on = 'is_auto_blocking_on' - is_eligible_at_campaign_level = 'is_eligible_at_campaign_level' - last_update_time = 'last_update_time' - last_update_user = 'last_update_user' - name = 'name' - owner_ad_account_id = 'owner_ad_account_id' - web_publishers = 'web_publishers' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'publisher_block_lists' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_publisher_block_list(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 - if batch 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', - 'business_id': 'string', - 'draft_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PublisherBlockList, - 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 = { - 'spec': 'Object', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PublisherBlockList, - 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_app_end_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.') - param_types = { - 'publisher_urls': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/append_publisher_urls', - 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_paged_web_publishers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'draft_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/paged_web_publishers', - 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 = { - 'app_publishers': 'list', - 'business_owner_id': 'string', - 'id': 'string', - 'is_auto_blocking_on': 'bool', - 'is_eligible_at_campaign_level': 'bool', - 'last_update_time': 'datetime', - 'last_update_user': 'string', - 'name': 'string', - 'owner_ad_account_id': 'string', - 'web_publishers': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/rawcustomaudience.py b/tap_facebook/facebook_business/adobjects/rawcustomaudience.py deleted file mode 100644 index ea2bc1a..0000000 --- a/tap_facebook/facebook_business/adobjects/rawcustomaudience.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 RawCustomAudience( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isRawCustomAudience = True - super(RawCustomAudience, 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/tap_facebook/facebook_business/adobjects/reachfrequencyactivity.py b/tap_facebook/facebook_business/adobjects/reachfrequencyactivity.py deleted file mode 100644 index 05782fb..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencyactivity.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencyActivity( - AbstractObject, -): - - def __init__(self, api=None): - super(ReachFrequencyActivity, self).__init__() - self._isReachFrequencyActivity = True - self._api = api - - class Field(AbstractObject.Field): - account_id = 'account_id' - campaign_active = 'campaign_active' - campaign_started = 'campaign_started' - creative_uploaded = 'creative_uploaded' - io_approved = 'io_approved' - sf_link = 'sf_link' - - _field_types = { - 'account_id': 'string', - 'campaign_active': 'bool', - 'campaign_started': 'bool', - 'creative_uploaded': 'bool', - 'io_approved': 'bool', - 'sf_link': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyadformat.py b/tap_facebook/facebook_business/adobjects/reachfrequencyadformat.py deleted file mode 100644 index 2be4db0..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencyadformat.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencyAdFormat( - AbstractObject, -): - - def __init__(self, api=None): - super(ReachFrequencyAdFormat, self).__init__() - self._isReachFrequencyAdFormat = True - self._api = api - - class Field(AbstractObject.Field): - details = 'details' - type = 'type' - - _field_types = { - 'details': 'Object', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py b/tap_facebook/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py deleted file mode 100644 index 8aa49e7..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencyCurveLowerConfidenceRange( - AbstractObject, -): - - def __init__(self, api=None): - super(ReachFrequencyCurveLowerConfidenceRange, self).__init__() - self._isReachFrequencyCurveLowerConfidenceRange = True - self._api = api - - class Field(AbstractObject.Field): - impression_lower = 'impression_lower' - num_points = 'num_points' - reach = 'reach' - reach_lower = 'reach_lower' - uniq_video_views_2s_lower = 'uniq_video_views_2s_lower' - video_views_2s_lower = 'video_views_2s_lower' - - _field_types = { - 'impression_lower': 'list', - 'num_points': 'unsigned int', - 'reach': 'list', - 'reach_lower': 'list', - 'uniq_video_views_2s_lower': 'list', - 'video_views_2s_lower': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py b/tap_facebook/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py deleted file mode 100644 index d2868f9..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencyCurveUpperConfidenceRange( - AbstractObject, -): - - def __init__(self, api=None): - super(ReachFrequencyCurveUpperConfidenceRange, self).__init__() - self._isReachFrequencyCurveUpperConfidenceRange = True - self._api = api - - class Field(AbstractObject.Field): - impression_upper = 'impression_upper' - num_points = 'num_points' - reach = 'reach' - reach_upper = 'reach_upper' - uniq_video_views_2s_upper = 'uniq_video_views_2s_upper' - video_views_2s_upper = 'video_views_2s_upper' - - _field_types = { - 'impression_upper': 'list', - 'num_points': 'unsigned int', - 'reach': 'list', - 'reach_upper': 'list', - 'uniq_video_views_2s_upper': 'list', - 'video_views_2s_upper': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencydaypart.py b/tap_facebook/facebook_business/adobjects/reachfrequencydaypart.py deleted file mode 100644 index b59493d..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencydaypart.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencyDayPart( - AbstractObject, -): - - def __init__(self, api=None): - super(ReachFrequencyDayPart, self).__init__() - self._isReachFrequencyDayPart = True - self._api = api - - class Field(AbstractObject.Field): - days = 'days' - end_minute = 'end_minute' - start_minute = 'start_minute' - - _field_types = { - 'days': 'list', - 'end_minute': 'int', - 'start_minute': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyestimatescurve.py b/tap_facebook/facebook_business/adobjects/reachfrequencyestimatescurve.py deleted file mode 100644 index cca3c2d..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencyestimatescurve.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencyEstimatesCurve( - AbstractObject, -): - - def __init__(self, api=None): - super(ReachFrequencyEstimatesCurve, self).__init__() - self._isReachFrequencyEstimatesCurve = True - self._api = api - - class Field(AbstractObject.Field): - budget = 'budget' - conversion = 'conversion' - impression = 'impression' - interpolated_reach = 'interpolated_reach' - num_points = 'num_points' - raw_impression = 'raw_impression' - raw_reach = 'raw_reach' - reach = 'reach' - - _field_types = { - 'budget': 'list', - 'conversion': 'list', - 'impression': 'list', - 'interpolated_reach': 'float', - 'num_points': 'unsigned int', - 'raw_impression': 'list', - 'raw_reach': 'list', - 'reach': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py b/tap_facebook/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py deleted file mode 100644 index 898c1aa..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencyEstimatesPlacementBreakdown( - AbstractObject, -): - - def __init__(self, api=None): - super(ReachFrequencyEstimatesPlacementBreakdown, self).__init__() - self._isReachFrequencyEstimatesPlacementBreakdown = True - self._api = api - - class Field(AbstractObject.Field): - android = 'android' - audience_network = 'audience_network' - desktop = 'desktop' - facebook_search = 'facebook_search' - fb_reels = 'fb_reels' - fb_reels_overlay = 'fb_reels_overlay' - ig_android = 'ig_android' - ig_ios = 'ig_ios' - ig_other = 'ig_other' - ig_reels = 'ig_reels' - ig_story = 'ig_story' - instant_articles = 'instant_articles' - instream_videos = 'instream_videos' - ios = 'ios' - msite = 'msite' - suggested_videos = 'suggested_videos' - - _field_types = { - 'android': 'list', - 'audience_network': 'list', - 'desktop': 'list', - 'facebook_search': 'list', - 'fb_reels': 'list', - 'fb_reels_overlay': 'list', - 'ig_android': 'list', - 'ig_ios': 'list', - 'ig_other': 'list', - 'ig_reels': 'list', - 'ig_story': 'list', - 'instant_articles': 'list', - 'instream_videos': 'list', - 'ios': 'list', - 'msite': 'list', - 'suggested_videos': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyprediction.py b/tap_facebook/facebook_business/adobjects/reachfrequencyprediction.py deleted file mode 100644 index cdfd508..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencyprediction.py +++ /dev/null @@ -1,323 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 -from facebook_business.adobjects.helpers.reachfrequencypredictionmixin import ReachFrequencyPredictionMixin - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencyPrediction( - ReachFrequencyPredictionMixin, - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isReachFrequencyPrediction = True - super(ReachFrequencyPrediction, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_id = 'account_id' - activity_status = 'activity_status' - ad_formats = 'ad_formats' - auction_entry_option_index = 'auction_entry_option_index' - audience_size_lower_bound = 'audience_size_lower_bound' - audience_size_upper_bound = 'audience_size_upper_bound' - business_id = 'business_id' - buying_type = 'buying_type' - campaign_group_id = 'campaign_group_id' - campaign_id = 'campaign_id' - campaign_time_start = 'campaign_time_start' - campaign_time_stop = 'campaign_time_stop' - currency = 'currency' - curve_budget_reach = 'curve_budget_reach' - curve_reach = 'curve_reach' - daily_grp_curve = 'daily_grp_curve' - daily_impression_curve = 'daily_impression_curve' - daily_impression_curve_map = 'daily_impression_curve_map' - day_parting_schedule = 'day_parting_schedule' - destination_id = 'destination_id' - end_time = 'end_time' - expiration_time = 'expiration_time' - external_budget = 'external_budget' - external_impression = 'external_impression' - external_maximum_budget = 'external_maximum_budget' - external_maximum_impression = 'external_maximum_impression' - external_maximum_reach = 'external_maximum_reach' - external_minimum_budget = 'external_minimum_budget' - external_minimum_impression = 'external_minimum_impression' - external_minimum_reach = 'external_minimum_reach' - external_reach = 'external_reach' - feed_ratio_0000 = 'feed_ratio_0000' - frequency_cap = 'frequency_cap' - frequency_distribution_map = 'frequency_distribution_map' - frequency_distribution_map_agg = 'frequency_distribution_map_agg' - grp_audience_size = 'grp_audience_size' - grp_avg_probability_map = 'grp_avg_probability_map' - grp_country_audience_size = 'grp_country_audience_size' - grp_curve = 'grp_curve' - grp_dmas_audience_size = 'grp_dmas_audience_size' - grp_filtering_threshold_00 = 'grp_filtering_threshold_00' - grp_points = 'grp_points' - grp_ratio = 'grp_ratio' - grp_reach_ratio = 'grp_reach_ratio' - grp_status = 'grp_status' - holdout_percentage = 'holdout_percentage' - id = 'id' - impression_curve = 'impression_curve' - instagram_destination_id = 'instagram_destination_id' - instream_packages = 'instream_packages' - interval_frequency_cap = 'interval_frequency_cap' - interval_frequency_cap_reset_period = 'interval_frequency_cap_reset_period' - is_bonus_media = 'is_bonus_media' - is_conversion_goal = 'is_conversion_goal' - is_higher_average_frequency = 'is_higher_average_frequency' - is_io = 'is_io' - is_reserved_buying = 'is_reserved_buying' - is_trp = 'is_trp' - name = 'name' - objective = 'objective' - objective_name = 'objective_name' - odax_objective = 'odax_objective' - odax_objective_name = 'odax_objective_name' - optimization_goal = 'optimization_goal' - optimization_goal_name = 'optimization_goal_name' - pause_periods = 'pause_periods' - placement_breakdown = 'placement_breakdown' - placement_breakdown_map = 'placement_breakdown_map' - plan_name = 'plan_name' - plan_type = 'plan_type' - prediction_mode = 'prediction_mode' - prediction_progress = 'prediction_progress' - reference_id = 'reference_id' - reservation_status = 'reservation_status' - start_time = 'start_time' - status = 'status' - story_event_type = 'story_event_type' - target_cpm = 'target_cpm' - target_spec = 'target_spec' - time_created = 'time_created' - time_updated = 'time_updated' - timezone_id = 'timezone_id' - timezone_name = 'timezone_name' - topline_id = 'topline_id' - video_view_length_constraint = 'video_view_length_constraint' - viewtag = 'viewtag' - action = 'action' - budget = 'budget' - deal_id = 'deal_id' - destination_ids = 'destination_ids' - exceptions = 'exceptions' - 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' - reach = 'reach' - rf_prediction_id = 'rf_prediction_id' - 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' - quote = 'quote' - reserve = 'reserve' - - class BuyingType: - auction = 'AUCTION' - deprecated_reach_block = 'DEPRECATED_REACH_BLOCK' - fixed_cpm = 'FIXED_CPM' - mixed = 'MIXED' - reachblock = 'REACHBLOCK' - research_poll = 'RESEARCH_POLL' - reserved = 'RESERVED' - - class InstreamPackages: - beauty = 'BEAUTY' - entertainment = 'ENTERTAINMENT' - food = 'FOOD' - normal = 'NORMAL' - premium = 'PREMIUM' - regular_animals_pets = 'REGULAR_ANIMALS_PETS' - regular_food = 'REGULAR_FOOD' - regular_games = 'REGULAR_GAMES' - regular_politics = 'REGULAR_POLITICS' - regular_sports = 'REGULAR_SPORTS' - regular_style = 'REGULAR_STYLE' - regular_tv_movies = 'REGULAR_TV_MOVIES' - spanish = 'SPANISH' - sports = 'SPORTS' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'reachfrequencypredictions' - - # @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.adaccount import AdAccount - return AdAccount(api=self._api, fbid=parent_id).create_reach_frequency_prediction(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=ReachFrequencyPrediction, - 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': 'int', - 'activity_status': 'ReachFrequencyActivity', - 'ad_formats': 'list', - 'auction_entry_option_index': 'int', - 'audience_size_lower_bound': 'unsigned int', - 'audience_size_upper_bound': 'unsigned int', - 'business_id': 'int', - 'buying_type': 'string', - 'campaign_group_id': 'int', - 'campaign_id': 'string', - 'campaign_time_start': 'datetime', - 'campaign_time_stop': 'datetime', - 'currency': 'string', - 'curve_budget_reach': 'ReachFrequencyEstimatesCurve', - 'curve_reach': 'list', - 'daily_grp_curve': 'list', - 'daily_impression_curve': 'list', - 'daily_impression_curve_map': 'list>>', - 'day_parting_schedule': 'list', - 'destination_id': 'string', - 'end_time': 'datetime', - 'expiration_time': 'datetime', - 'external_budget': 'int', - 'external_impression': 'unsigned int', - 'external_maximum_budget': 'int', - 'external_maximum_impression': 'string', - 'external_maximum_reach': 'unsigned int', - 'external_minimum_budget': 'int', - 'external_minimum_impression': 'unsigned int', - 'external_minimum_reach': 'unsigned int', - 'external_reach': 'unsigned int', - 'feed_ratio_0000': 'unsigned int', - 'frequency_cap': 'unsigned int', - 'frequency_distribution_map': 'list>>', - 'frequency_distribution_map_agg': 'list>>', - 'grp_audience_size': 'float', - 'grp_avg_probability_map': 'string', - 'grp_country_audience_size': 'float', - 'grp_curve': 'list', - 'grp_dmas_audience_size': 'float', - 'grp_filtering_threshold_00': 'unsigned int', - 'grp_points': 'float', - 'grp_ratio': 'float', - 'grp_reach_ratio': 'float', - 'grp_status': 'string', - 'holdout_percentage': 'unsigned int', - 'id': 'string', - 'impression_curve': 'list', - 'instagram_destination_id': 'string', - 'instream_packages': 'list', - 'interval_frequency_cap': 'unsigned int', - 'interval_frequency_cap_reset_period': 'unsigned int', - 'is_bonus_media': 'unsigned int', - 'is_conversion_goal': 'unsigned int', - 'is_higher_average_frequency': 'bool', - 'is_io': 'bool', - 'is_reserved_buying': 'unsigned int', - 'is_trp': 'bool', - 'name': 'string', - 'objective': 'unsigned int', - 'objective_name': 'string', - 'odax_objective': 'unsigned int', - 'odax_objective_name': 'string', - 'optimization_goal': 'unsigned int', - 'optimization_goal_name': 'string', - 'pause_periods': 'list', - 'placement_breakdown': 'ReachFrequencyEstimatesPlacementBreakdown', - 'placement_breakdown_map': 'list>', - 'plan_name': 'string', - 'plan_type': 'string', - 'prediction_mode': 'unsigned int', - 'prediction_progress': 'unsigned int', - 'reference_id': 'string', - 'reservation_status': 'unsigned int', - 'start_time': 'datetime', - 'status': 'unsigned int', - 'story_event_type': 'unsigned int', - 'target_cpm': 'unsigned int', - 'target_spec': 'Targeting', - 'time_created': 'datetime', - 'time_updated': 'datetime', - 'timezone_id': 'unsigned int', - 'timezone_name': 'string', - 'topline_id': 'unsigned int', - 'video_view_length_constraint': 'unsigned int', - 'viewtag': 'string', - 'action': 'Action', - 'budget': 'unsigned int', - 'deal_id': 'string', - 'destination_ids': 'list', - 'exceptions': 'bool', - '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', - 'reach': 'unsigned int', - 'rf_prediction_id': 'string', - '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): - field_enum_info = {} - field_enum_info['Action'] = ReachFrequencyPrediction.Action.__dict__.values() - field_enum_info['BuyingType'] = ReachFrequencyPrediction.BuyingType.__dict__.values() - field_enum_info['InstreamPackages'] = ReachFrequencyPrediction.InstreamPackages.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/reachfrequencyspec.py b/tap_facebook/facebook_business/adobjects/reachfrequencyspec.py deleted file mode 100644 index 7618e6d..0000000 --- a/tap_facebook/facebook_business/adobjects/reachfrequencyspec.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ReachFrequencySpec( - AbstractObject, -): - - def __init__(self, api=None): - super(ReachFrequencySpec, self).__init__() - self._isReachFrequencySpec = True - self._api = api - - class Field(AbstractObject.Field): - countries = 'countries' - default_creation_data = 'default_creation_data' - global_io_max_campaign_duration = 'global_io_max_campaign_duration' - max_campaign_duration = 'max_campaign_duration' - max_days_to_finish = 'max_days_to_finish' - max_pause_without_prediction_rerun = 'max_pause_without_prediction_rerun' - min_campaign_duration = 'min_campaign_duration' - min_reach_limits = 'min_reach_limits' - - _field_types = { - 'countries': 'list', - 'default_creation_data': 'Object', - 'global_io_max_campaign_duration': 'unsigned int', - 'max_campaign_duration': 'Object', - 'max_days_to_finish': 'Object', - 'max_pause_without_prediction_rerun': 'Object', - 'min_campaign_duration': 'Object', - 'min_reach_limits': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/recommendation.py b/tap_facebook/facebook_business/adobjects/recommendation.py deleted file mode 100644 index 371e817..0000000 --- a/tap_facebook/facebook_business/adobjects/recommendation.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Recommendation( - AbstractObject, -): - - def __init__(self, api=None): - super(Recommendation, self).__init__() - self._isRecommendation = True - self._api = api - - class Field(AbstractObject.Field): - created_time = 'created_time' - has_rating = 'has_rating' - has_review = 'has_review' - open_graph_story = 'open_graph_story' - rating = 'rating' - recommendation_type = 'recommendation_type' - review_text = 'review_text' - reviewer = 'reviewer' - - _field_types = { - 'created_time': 'datetime', - 'has_rating': 'bool', - 'has_review': 'bool', - 'open_graph_story': 'Object', - 'rating': 'int', - 'recommendation_type': 'string', - 'review_text': 'string', - 'reviewer': 'User', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/revsharepolicy.py b/tap_facebook/facebook_business/adobjects/revsharepolicy.py deleted file mode 100644 index 7b0dddd..0000000 --- a/tap_facebook/facebook_business/adobjects/revsharepolicy.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class RevSharePolicy( - AbstractObject, -): - - def __init__(self, api=None): - super(RevSharePolicy, self).__init__() - self._isRevSharePolicy = True - self._api = api - - class Field(AbstractObject.Field): - policy_id = 'policy_id' - policy_name = 'policy_name' - - _field_types = { - 'policy_id': 'string', - 'policy_name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/richmediaelement.py b/tap_facebook/facebook_business/adobjects/richmediaelement.py deleted file mode 100644 index a47cb2c..0000000 --- a/tap_facebook/facebook_business/adobjects/richmediaelement.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class RichMediaElement( - AbstractObject, -): - - def __init__(self, api=None): - super(RichMediaElement, self).__init__() - self._isRichMediaElement = True - self._api = api - - class Field(AbstractObject.Field): - element = 'element' - element_type = 'element_type' - name = 'name' - - _field_types = { - 'element': 'Object', - 'element_type': 'string', - 'name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/rtbdynamicpost.py b/tap_facebook/facebook_business/adobjects/rtbdynamicpost.py deleted file mode 100644 index c563aee..0000000 --- a/tap_facebook/facebook_business/adobjects/rtbdynamicpost.py +++ /dev/null @@ -1,159 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 RTBDynamicPost( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isRTBDynamicPost = True - super(RTBDynamicPost, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - child_attachments = 'child_attachments' - created = 'created' - description = 'description' - id = 'id' - image_url = 'image_url' - link = 'link' - message = 'message' - owner_id = 'owner_id' - place_id = 'place_id' - product_id = 'product_id' - 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=RTBDynamicPost, - 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.comment import Comment - param_types = { - 'filter': 'filter_enum', - 'live_filter': 'live_filter_enum', - 'order': 'order_enum', - 'since': 'datetime', - } - enums = { - 'filter_enum': Comment.Filter.__dict__.values(), - 'live_filter_enum': Comment.LiveFilter.__dict__.values(), - '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() - - def get_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profile import Profile - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Profile, - api_type='EDGE', - response_parser=ObjectParser(target_class=Profile, 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 = { - 'child_attachments': 'list', - 'created': 'datetime', - 'description': 'string', - 'id': 'string', - 'image_url': 'string', - 'link': 'string', - 'message': 'string', - 'owner_id': 'string', - 'place_id': 'string', - 'product_id': 'string', - 'title': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/savedaudience.py b/tap_facebook/facebook_business/adobjects/savedaudience.py deleted file mode 100644 index b227892..0000000 --- a/tap_facebook/facebook_business/adobjects/savedaudience.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 SavedAudience( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isSavedAudience = True - super(SavedAudience, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account = 'account' - approximate_count_lower_bound = 'approximate_count_lower_bound' - approximate_count_upper_bound = 'approximate_count_upper_bound' - delete_time = 'delete_time' - description = 'description' - id = 'id' - name = 'name' - operation_status = 'operation_status' - owner_business = 'owner_business' - page_deletion_marked_delete_time = 'page_deletion_marked_delete_time' - permission_for_actions = 'permission_for_actions' - run_status = 'run_status' - sentence_lines = 'sentence_lines' - targeting = 'targeting' - 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=SavedAudience, - 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', - 'approximate_count_lower_bound': 'int', - 'approximate_count_upper_bound': 'int', - 'delete_time': 'int', - 'description': 'string', - 'id': 'string', - 'name': 'string', - 'operation_status': 'CustomAudienceStatus', - 'owner_business': 'Business', - 'page_deletion_marked_delete_time': 'int', - 'permission_for_actions': 'AudiencePermissionForActions', - 'run_status': 'string', - 'sentence_lines': 'list', - 'targeting': 'Targeting', - 'time_created': 'datetime', - 'time_updated': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/savedmessageresponse.py b/tap_facebook/facebook_business/adobjects/savedmessageresponse.py deleted file mode 100644 index 212334a..0000000 --- a/tap_facebook/facebook_business/adobjects/savedmessageresponse.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 SavedMessageResponse( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isSavedMessageResponse = True - super(SavedMessageResponse, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - category = 'category' - id = 'id' - image = 'image' - is_enabled = 'is_enabled' - message = 'message' - 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=SavedMessageResponse, - 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', - 'image': 'string', - 'is_enabled': 'bool', - 'message': 'string', - 'title': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/securitysettings.py b/tap_facebook/facebook_business/adobjects/securitysettings.py deleted file mode 100644 index cb13660..0000000 --- a/tap_facebook/facebook_business/adobjects/securitysettings.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class SecuritySettings( - AbstractObject, -): - - def __init__(self, api=None): - super(SecuritySettings, self).__init__() - self._isSecuritySettings = 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/tap_facebook/facebook_business/adobjects/serverside/__init__.py b/tap_facebook/facebook_business/adobjects/serverside/__init__.py deleted file mode 100644 index dfc80ec..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/__init__.py +++ /dev/null @@ -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/tap_facebook/facebook_business/adobjects/serverside/action_source.py b/tap_facebook/facebook_business/adobjects/serverside/action_source.py deleted file mode 100644 index 6610c3c..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/action_source.py +++ /dev/null @@ -1,71 +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 enum import Enum - - -# Used to specify where the conversion occurred. -# See https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/server-event#action-source -class ActionSource(Enum): - - """ - Conversion happened over email. - """ - EMAIL = 'email' - - """ - Conversion was made on your website. - """ - WEBSITE = 'website' - - """ - Conversion was made using your app. - """ - APP = 'app' - - """ - Conversion was made over the phone. - """ - PHONE_CALL = 'phone_call' - - """ - Conversion was made via a messaging app, SMS, or online messaging feature. - """ - CHAT = 'chat' - - """ - Conversion was made in person at your physical store. - """ - PHYSICAL_STORE = 'physical_store' - - """ - Conversion happened automatically, for example, a subscription renewal that's set on auto-pay each month. - """ - 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. - """ - OTHER = 'other' diff --git a/tap_facebook/facebook_business/adobjects/serverside/app_data.py b/tap_facebook/facebook_business/adobjects/serverside/app_data.py deleted file mode 100644 index 90d24e6..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/app_data.py +++ /dev/null @@ -1,253 +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. - -class AppData(object): - - param_types = { - 'application_tracking_enabled': 'bool', - 'advertiser_tracking_enabled': 'bool', - 'campaign_ids': 'str', - 'consider_views': 'bool', - 'extinfo': 'ExtendedDeviceInfo', - 'include_dwell_data': 'bool', - 'include_video_data': 'bool', - 'install_referrer': 'str', - 'installer_package': 'str', - 'receipt_data': 'str', - 'url_schemes': 'str', - 'windows_attribution_id': 'str', - } - - def __init__( - self, - application_tracking_enabled=None, - advertiser_tracking_enabled=None, - campaign_ids=None, - consider_views=None, - extinfo=None, - include_dwell_data=None, - include_video_data=None, - install_referrer=None, - installer_package=None, - receipt_data=None, - url_schemes=None, - windows_attribution_id=None, - ): - # type: (bool, bool, str, str, bool, ExtendedDeviceInfo, bool, bool, str, str, str, str, str) -> None - - """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._campaign_ids = None - self._consider_views = None - self._extinfo = None - self._include_dwell_data = None - self._include_video_data = None - self._install_referrer = None - self._installer_package = None - self._receipt_data = None - self._url_schemes = None - self._windows_attribution_id = None - - if application_tracking_enabled is not None: - self.application_tracking_enabled = application_tracking_enabled - if campaign_ids is not None: - self.campaign_ids = campaign_ids - if consider_views is not None: - self.consider_views = consider_views - if extinfo is not None: - self.extinfo = extinfo - if include_dwell_data is not None: - self.include_dwell_data = include_dwell_data - if include_video_data is not None: - self.include_video_data = include_video_data - if install_referrer is not None: - self.install_referrer = install_referrer - if installer_package is not None: - self.installer_package = installer_package - if receipt_data is not None: - self.receipt_data = receipt_data - if url_schemes is not None: - self.url_schemes = url_schemes - if windows_attribution_id is not None: - self.windows_attribution_id = windows_attribution_id - - @property - def application_tracking_enabled(self): - return self._application_tracking_enabled - - @application_tracking_enabled.setter - def application_tracking_enabled(self, application_tracking_enabled): - self._application_tracking_enabled = application_tracking_enabled - - @property - def advertiser_tracking_enabled(self): - return self._advertiser_tracking_enabled - - @advertiser_tracking_enabled.setter - def advertiser_tracking_enabled(self, advertiser_tracking_enabled): - self._advertiser_tracking_enabled = advertiser_tracking_enabled - - @property - def campaign_ids(self): - return self._campaign_ids - - @campaign_ids.setter - def campaign_ids(self, campaign_ids): - self._campaign_ids = campaign_ids - - @property - def consider_views(self): - return self._consider_views - - @consider_views.setter - def consider_views(self, consider_views): - self._consider_views = consider_views - - @property - def extinfo(self): - return self._extinfo - - @extinfo.setter - def extinfo(self, extinfo): - self._extinfo = extinfo - - @property - def include_dwell_data(self): - return self._include_dwell_data - - @include_dwell_data.setter - def include_dwell_data(self, include_dwell_data): - self._include_dwell_data = include_dwell_data - - @property - def include_video_data(self): - return self._include_video_data - - @include_video_data.setter - def include_video_data(self, include_video_data): - self._include_video_data = include_video_data - - @property - def install_referrer(self): - return self._install_referrer - - @install_referrer.setter - def install_referrer(self, install_referrer): - self._install_referrer = install_referrer - - @property - def installer_package(self): - return self._installer_package - - @installer_package.setter - def installer_package(self, installer_package): - self._installer_package = installer_package - - @property - def receipt_data(self): - return self._receipt_data - - @receipt_data.setter - def receipt_data(self, receipt_data): - self._receipt_data = receipt_data - - @property - def url_schemes(self): - return self._url_schemes - - @url_schemes.setter - def url_schemes(self, url_schemes): - self._url_schemes = url_schemes - - @property - def windows_attribution_id(self): - return self._windows_attribution_id - - @windows_attribution_id.setter - def windows_attribution_id(self, windows_attribution_id): - self._windows_attribution_id = windows_attribution_id - - def normalize(self): - 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 - - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.param_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AppData, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AppData): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/batch_processor.py b/tap_facebook/facebook_business/adobjects/serverside/batch_processor.py deleted file mode 100644 index ec8be8f..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/batch_processor.py +++ /dev/null @@ -1,69 +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.serverside.util import Util -if not Util.async_requests_available(): - raise Exception('BatchProcessor requires Python >= 3.5.3') - -import asyncio - -class BatchProcessor: - def __init__(self, batch_size=50, concurrent_requests=4): - self.batch_size = batch_size - self.concurrent_requests = concurrent_requests - - def process_event_requests(self, event_requests_async): - async def process(): - async for _ in self.process_event_requests_generator(event_requests_async): - pass - - asyncio.run(process()) - - async def process_event_requests_generator(self, event_requests_async): - index = 0 - while index < len(event_requests_async): - batch = event_requests_async[index:(index + self.concurrent_requests)] - responses = [] - for request in batch: - response = await request.execute() - responses.append(response) - yield responses - - index += self.concurrent_requests - - def process_events(self, event_request_async_to_clone, events): - async def process(): - async for _ in self.process_events_generator(event_request_async_to_clone, events): - pass - - asyncio.run(process()) - - async def process_events_generator(self, event_request_async_to_clone, events): - index = 0 - while index < len(events): - responses = [] - while index < len(events) and len(responses) < self.concurrent_requests: - event_request = event_request_async_to_clone.clone_without_events() - event_request.events = events[index:(index + self.batch_size)] - response = await event_request.execute() - responses.append(response) - index += self.batch_size - - yield responses diff --git a/tap_facebook/facebook_business/adobjects/serverside/content.py b/tap_facebook/facebook_business/adobjects/serverside/content.py deleted file mode 100644 index 29ebd23..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/content.py +++ /dev/null @@ -1,268 +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. - -import pprint -import six - -from facebook_business.adobjects.serverside.delivery_category import DeliveryCategory - -class Content(object): - """ - Content objects that contain the product IDs associated with the event plus information about the products. - """ - param_types = { - 'product_id': 'str', - 'quantity': 'str', - 'item_price': 'float', - 'title': 'str', - 'description': 'str', - 'brand': 'str', - 'category': 'str', - 'delivery_category': 'str', - } - - def __init__( - self, - product_id=None, - quantity=None, - item_price=None, - title=None, - description=None, - brand=None, - category=None, - delivery_category=None, - ): - # type: (str, int, float, str, str, str, str, str) -> None - - self._product_id = None - self._quantity = None - self._item_price = None - self._title = None - self._description = None - self._brand = None - self._category = None - self._delivery_category = None - if product_id is not None: - self.product_id = product_id - if quantity is not None: - self.quantity = quantity - if item_price is not None: - self.item_price = item_price - if title is not None: - self.title = title - if description is not None: - self.description = description - if brand is not None: - self.brand = brand - if category is not None: - self.category = category - if delivery_category is not None: - self.delivery_category = delivery_category - - @property - def product_id(self): - """ - Gets Product Id. - :rtype: str - """ - return self._product_id - - @product_id.setter - def product_id(self, product_id): - """ - Sets Product Id. - """ - self._product_id = product_id - - @property - def quantity(self): - """ - Gets number of product. - :rtype: int - """ - return self._quantity - - @quantity.setter - def quantity(self, quantity): - """ - Set number of product. - """ - self._quantity = quantity - - @property - def item_price(self): - """ - Gets Item Price. - :rtype: float - """ - return self._item_price - - @item_price.setter - def item_price(self, item_price): - """ - Sets Item Price. - """ - self._item_price = item_price - - @property - def title(self): - """ - Gets title. - :rtype: float - """ - return self._title - - @title.setter - def title(self, title): - """ - Sets title. - """ - self._title = title - - @property - def description(self): - """ - Gets description. - :rtype: float - """ - return self._description - - @description.setter - def description(self, description): - """ - Sets description. - """ - self._description = description - - @property - def brand(self): - """ - Gets brand. - :rtype: float - """ - return self._brand - - @brand.setter - def brand(self, brand): - """ - Sets brand. - """ - self._brand = brand - - @property - def category(self): - """ - Gets category. - :rtype: float - """ - return self._category - - @category.setter - def category(self, category): - """ - Sets category. - """ - self._category = category - - @property - def delivery_category(self): - """Gets the Type of Delivery Category. - - :return: The Delivery Category type. - :rtype: DeliveryCategory - """ - return self._delivery_category - - @delivery_category.setter - def delivery_category(self, delivery_category): - """Sets the Type of Delivery Category. - - Use with Purchase events. - - :param delivery_category: The Delivery Category type. - :type: DeliveryCategory - """ - if not isinstance(delivery_category, DeliveryCategory): - raise TypeError('delivery_category must be of type DeliveryCategory. Passed invalid category: ' + delivery_category) - - self._delivery_category = delivery_category - - def normalize(self): - normalized_payload = { - 'id': self.product_id, - 'quantity': self.quantity, - 'item_price': self.item_price, - 'title': self.title, - 'description': self.description, - 'brand': self.brand, - 'category': self.category, - } - - if self.delivery_category is not None: - normalized_payload['delivery_category'] = self.delivery_category.value - - normalized_payload = {k: v for k, v in normalized_payload.items() if v is not None} - return normalized_payload - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.param_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Content, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Content): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/custom_data.py b/tap_facebook/facebook_business/adobjects/serverside/custom_data.py deleted file mode 100644 index b6a56fe..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/custom_data.py +++ /dev/null @@ -1,556 +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. - -import pprint -import six - -from facebook_business.adobjects.serverside.content import Content -from facebook_business.adobjects.serverside.normalize import Normalize -from facebook_business.adobjects.serverside.delivery_category import DeliveryCategory - -class CustomData(object): - """ - CustomData includes additional business data about the event. - """ - param_types = { - 'value': 'float', - 'currency': 'str', - 'content_name': 'str', - 'content_category': 'str', - 'content_ids': 'list[str]', - 'contents': 'list[Content]', - 'content_type': 'str', - 'order_id': 'str', - 'predicted_ltv': 'float', - 'num_items': 'int', - 'status': 'str', - 'search_string' : 'str', - 'delivery_category' : 'DeliveryCategory', - 'item_number': 'str', - 'custom_properties' : 'dict' - } - - def __init__( - self, - value=None, - currency=None, - content_name=None, - content_category=None, - content_ids=None, - contents=None, - content_type=None, - order_id=None, - predicted_ltv=None, - num_items=None, - status=None, - search_string=None, - delivery_category=None, - item_number=None, - custom_properties={}, - ): - # type: (float, str, str, str, content_ids, List[str], List[Content], str, str, float, int, str, str, DeliveryCategory ,str, dict) -> None - - self._value = None - self._currency = None - self._content_name = None - self._content_category = None - self._content_ids = None - self._contents = None - self._content_type = None - self._order_id = None - self._predicted_ltv = None - self._num_items = None - self._status = None - self._search_string = None - self._delivery_category = None - self._item_number = None - self._custom_properties = None - if value is not None: - self.value = value - if currency is not None: - self.currency = currency - if content_name is not None: - self.content_name = content_name - if content_category is not None: - self.content_category = content_category - if content_ids is not None: - self.content_ids = content_ids - if contents is not None: - self.contents = contents - if content_type is not None: - self.content_type = content_type - if order_id is not None: - self.order_id = order_id - if predicted_ltv is not None: - self.predicted_ltv = predicted_ltv - if num_items is not None: - self.num_items = num_items - if status is not None: - self.status = status - if search_string is not None: - self.search_string = search_string - if delivery_category is not None: - self.delivery_category = delivery_category - if item_number is not None: - self.item_number = item_number - if custom_properties: - self.custom_properties = custom_properties - - @property - def value(self): - """Gets the value. - - A numeric value associated with this event. This could be a monetary value or a value in some other metric. - - :return: The value. - :rtype: float or int - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value. - - A numeric value associated with this event. This could be a monetary value or a value in some other metric. - - :param value: The value. - :type: float or int - """ - if not isinstance(value, (float, int)): - raise TypeError('CustomData.value must be a float or int. TypeError on value: %s' % value) - self._value = value - - @property - def currency(self): - """Gets the currency. - - The currency for the value specified, if applicable. Currency must be a valid ISO 4217 three digit currency code. - - :return: The currency. - :rtype: str - """ - return self._currency - - @currency.setter - def currency(self, currency): - """Sets the currency. - - The currency for the value specified, if applicable. Currency must be a valid ISO 4217 three digit currency code. - - :param currency: The currency. - :type: str - """ - - self._currency = currency - - @property - def content_name(self): - """Gets the content name. - - The name of the page or product associated with the event. Example: 'lettuce'. - - :return: The content name. - :rtype: str - """ - return self._content_name - - @content_name.setter - def content_name(self, content_name): - """Sets the content name. - - The name of the page or product associated with the event. Example: 'lettuce'. - - :param content_name: The content name. - :type: str - """ - - self._content_name = content_name - - @property - def content_category(self): - """Gets the content category. - - The category of the content associated with the event. Example: 'grocery' - - :return: The content category. - :rtype: str - """ - return self._content_category - - @content_category.setter - def content_category(self, content_category): - """Sets the content category. - - The category of the content associated with the event. Example: 'grocery' - - :param content_category: The content category. - :type: str - """ - - self._content_category = content_category - - @property - def content_ids(self): - """Gets the content ids. - - The content IDs associated with the event, such as product SKUs for items in an - AddToCart event: ['ABC123', 'XYZ789']. If content_type is a product, then your content IDs must - be an array with a single string value. Otherwise, this array can contain any number of string values. - - :return: The content ids. - :rtype: list[str] - """ - return self._content_ids - - @content_ids.setter - def content_ids(self, content_ids): - """Sets the content_ids. - - The content IDs associated with the event, such as product SKUs for items in an AddToCart event: - ['ABC123', 'XYZ789']. If content_type is a product, then your content IDs must be an array with - a single string value. Otherwise, this array can contain any number of string values. - - :param content_ids: The content_ids. - :type: list[str] - """ - - self._content_ids = content_ids - - @property - def contents(self): - """Gets the contents. - - A list of Content objects that contain the product IDs associated with the event plus information about - the products. id, quantity, and item_price are available fields. - - :return: The contents. - :rtype: list[Content] - """ - return self._contents - - @contents.setter - def contents(self, contents): - """Sets the contents. - - A list of Content objects that contain the product IDs associated with the event plus information about - the products. id, quantity, and item_price are available fields. - - :param contents: The contents. - :type: list[Content] - """ - - self._contents = contents - - @property - def content_type(self): - """Gets the content type. - - A String equal to either 'product' or 'product_group'. Set to product if the keys you send content_ids or - contents represent products. Set to product_group if the keys you send in content_ids represent product groups. - - :return: The content type. - :rtype: str - """ - return self._content_type - - @content_type.setter - def content_type(self, content_type): - """Sets the content type. - - A String equal to either 'product' or 'product_group'. Set to product if the keys you send content_ids or - contents represent products. Set to product_group if the keys you send in content_ids represent product groups. - - :param content_type: The content type. - :type: str - """ - - self._content_type = content_type - - @property - def order_id(self): - """Gets the order id. - - The order ID for this transaction as a String. - - :return: The order id. - :rtype: str - """ - return self._order_id - - @order_id.setter - def order_id(self, order_id): - """Sets the order id. - - The order ID for this transaction as a String. - - :param order_id: The order id. - :type: str - """ - - self._order_id = order_id - - @property - def predicted_ltv(self): - """Gets the predicted ltv. - - The predicted lifetime value of a conversion event - - :return: The predicted ltv. - :rtype: float or int - """ - return self._predicted_ltv - - @predicted_ltv.setter - def predicted_ltv(self, predicted_ltv): - """Sets the predicted_ltv. - - The predicted lifetime value of a conversion event - - :param predicted_ltv: The predicted_ltv. - :type: float or int - """ - if not isinstance(predicted_ltv, (float, int)): - raise TypeError('CustomData.predicted_ltv must be a float or int. TypeError on predicted_ltv: %s' % predicted_ltv) - self._predicted_ltv = predicted_ltv - - @property - def num_items(self): - """Gets the num items. - - Use only with InitiateCheckout events. The number of items that a user tries to buy during checkout. - - :return: The num_items. - :rtype: int - """ - return self._num_items - - @num_items.setter - def num_items(self, num_items): - """Sets the num items. - - Use only with InitiateCheckout events. The number of items that a user tries to buy during checkout. - - :param num_items: The num_items. - :type: int - """ - - self._num_items = num_items - - @property - def status(self): - """Gets the status. - - Use only with CompleteRegistration events. The status of the registration event, as a String. - - :return: The status. - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status. - - Use only with CompleteRegistration events. The status of the registration event, as a String. - - :param status: The status. - :type: str - """ - - self._status = status - - @property - def search_string(self): - """Gets the search query made by a user. - - :return: The search query. - :rtype: str - """ - return self._search_string - - @search_string.setter - def search_string(self, search_string): - """Sets the search query made by a user. - - Use only with Search events. A search query made by a user. - - :param search_string: The search query. - :type: str - """ - - self._search_string = search_string - - @property - def delivery_category(self): - """Gets the Type of Delivery Category. - - :return: The Delivery Category type. - :rtype: DeliveryCategory - """ - return self._delivery_category - - @delivery_category.setter - def delivery_category(self, delivery_category): - """Sets the Type of Delivery Category. - - Use with Purchase events. - - :param delivery_category: The Delivery Category type. - :type: DeliveryCategory - """ - if not isinstance(delivery_category, DeliveryCategory): - raise TypeError('delivery_category must be of type DeliveryCategory. Passed invalid category: ' + delivery_category) - - self._delivery_category = delivery_category - - @property - def item_number(self): - """Gets the item number. - - :return: The item number. - :rtype: str - """ - return self._item_number - - @item_number.setter - def item_number(self, item_number): - """Sets the item number. - - :param item_number: The item number. - :type: str - """ - - self._item_number = item_number - - @property - def custom_properties(self): - """Gets the custom properties to be included in the Custom Data. - - :return: The custom properties dictionary. - :rtype: dict - """ - return self._custom_properties - - @custom_properties.setter - def custom_properties(self, custom_properties): - """Sets the custom properties to be included in the Custom Data. - - These are properties that are not defined in the standard list of the custom data. - - :param custom_properties: The custom properties dictionary. - :type: dict - """ - - self._custom_properties = custom_properties - - def add_custom_property(self, key, value): - - """Adds the custom property (key, value) to the custom property bag. - - :param key: The Key for the property to be added. - :type: str - :param value: The Value for the property to be added. - :type: str - """ - - self.custom_properties[key] = value - - def normalize(self): - normalized_payload = { - 'value': self.value, - 'currency': Normalize.normalize_field_skip_hashing('currency', self.currency), - 'content_name': self.content_name, - 'content_category': self.content_category, - 'content_ids': self.content_ids, - 'content_type': self.content_type, - 'order_id': self.order_id, - 'predicted_ltv': self.predicted_ltv, - 'num_items': self.num_items, - 'status': self.status, - 'search_string': self.search_string, - 'item_number': self.item_number, - } - - if self.delivery_category is not None: - normalized_payload['delivery_category'] = self.delivery_category.value - - if self.contents is not None: - contents = [] - for content in self.contents: - if content is not None: - contents.append(content.normalize()) - - normalized_payload['contents'] = contents - - # Append the custom_properties to the custom_data normalized payload. - if self.custom_properties: - for key in self.custom_properties: - if key in normalized_payload.keys(): - raise Exception('Duplicate key in custom_properties:"' + key + '". Please make sure the keys defined in the custom_properties are not already available in standard custom_data property list.') - normalized_payload[key] = self.custom_properties[key] - - normalized_payload = {k: v for k, v in normalized_payload.items() if v is not None} - return normalized_payload - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.param_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CustomData, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CustomData): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/delivery_category.py b/tap_facebook/facebook_business/adobjects/serverside/delivery_category.py deleted file mode 100644 index f9793c7..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/delivery_category.py +++ /dev/null @@ -1,39 +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 enum import Enum - - -# Type of delivery for a purchase event -class DeliveryCategory(Enum): - """ - Customer needs to enter the store to get the purchased product. - """ - IN_STORE = 'in_store' - - """ - Customer picks up their order by driving to a store and waiting inside their vehicle. - """ - CURBSIDE = 'curbside' - - """ - Purchase is delivered to the customer's home. - """ - HOME_DELIVERY = 'home_delivery' diff --git a/tap_facebook/facebook_business/adobjects/serverside/event.py b/tap_facebook/facebook_business/adobjects/serverside/event.py deleted file mode 100644 index 20ef8b7..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/event.py +++ /dev/null @@ -1,517 +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. - -import pprint -import six - -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): - param_types = { - 'event_name': 'str', - 'event_time': 'int', - 'event_source_url': 'str', - 'opt_out': 'bool', - '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, - 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 - self._event_time = None - self._event_source_url = None - self._opt_out = 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 - self._action_source = 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: - self.opt_out = opt_out - if event_id is not None: - self.event_id = event_id - if user_data is not 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: - self.data_processing_options_country = data_processing_options_country - if data_processing_options_state is not None: - self.data_processing_options_state = data_processing_options_state - if action_source is not 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): - """Gets the event_name of this Event. - - A Facebook pixel Standard Event or Custom Event name. - - :return: The event_name of this Event. - :rtype: str - """ - return self._event_name - - @event_name.setter - def event_name(self, event_name): - """Sets the event_name of this Event. - - A Facebook pixel Standard Event or Custom Event name. - - :param event_name: The event_name of this Event. - :type: str - :return self - """ - if event_name is None: - raise ValueError("Invalid value for `event_name`, must not be `None`") - - self._event_name = event_name - - @property - def event_time(self): - """Gets the event_time of this Event. - - A Unix timestamp in seconds indicating when the actual event occurred. - - :return: The event_time of this Event. - :rtype: int - """ - return self._event_time - - @event_time.setter - def event_time(self, event_time): - """Sets the event_time of this Event. - - A Unix timestamp in seconds indicating when the actual event occurred. - - :param event_time: The event_time of this Event. - :type: int - """ - if event_time is None: - raise ValueError("Invalid value for `event_time`, must not be `None`") - - if not isinstance(event_time, int): - raise TypeError('Event.event_time must be an int') - - self._event_time = event_time - - @property - def event_source_url(self): - """Gets the event_source_url of this Event. - - The browser URL where the event happened. - - :return: The event_source_url of this Event. - :rtype: str - """ - return self._event_source_url - - @event_source_url.setter - def event_source_url(self, event_source_url): - """Sets the event_source_url of this Event. - - The browser URL where the event happened. - - :param event_source_url: The event_source_url of this Event. - :type: str - """ - - self._event_source_url = event_source_url - - @property - def opt_out(self): - """Gets the opt_out of this Event. - - A flag that indicates we should not use this event for ads delivery optimization. - If set to true, we only use the event for attribution. - - :return: The opt_out of this Event. - :rtype: bool - """ - return self._opt_out - - @opt_out.setter - def opt_out(self, opt_out): - """Sets the opt_out of this Event. - - A flag that indicates we should not use this event for ads delivery optimization. - If set to true, we only use the event for attribution. - - :param opt_out: The opt_out of this Event. - :type: bool - """ - - if not isinstance(opt_out, bool): - raise TypeError('Event.opt_out must be a bool') - self._opt_out = opt_out - - @property - def event_id(self): - """Gets the event_id of this Event. - - This ID can be any string chosen by the advertiser. - This is used with event_name to determine if events sent from - both server and browser are identical. - - :return: The event_id of this Event. - :rtype: str - """ - return self._event_id - - @event_id.setter - def event_id(self, event_id): - """Sets the event_id of this Event. - - This ID can be any string chosen by the advertiser. - This is used with event_name to determine if events sent from - both server and browser are identical. - - :param event_id: The event_id of this Event. - :type: str - """ - - self._event_id = event_id - - @property - def user_data(self): - """Gets the user_data of this Event. - - - :return: The user_data of this Event. - :rtype: UserData - """ - return self._user_data - - @user_data.setter - def user_data(self, user_data): - """Sets the user_data of this Event. - - - :param user_data: The user_data of this Event. - :type: UserData - """ - if user_data is None: - raise ValueError("Invalid value for `user_data`, must not be `None`") - - if not isinstance(user_data, UserData): - raise TypeError('Event.user_Data must be of type UserData') - - self._user_data = user_data - - @property - def custom_data(self): - """Gets the custom_data of this Event. - - - :return: The custom_data of this Event. - :rtype: CustomData - """ - return self._custom_data - - @custom_data.setter - def custom_data(self, custom_data): - """Sets the custom_data of this Event. - - - :param custom_data: The custom_data of this Event. - :type: CustomData - """ - - if not isinstance(custom_data, CustomData): - raise TypeError('Event.custom_data must be of type CustomData') - - 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. - - :return: The data_processing_options of this Event. - :rtype: list[str] - """ - return self._data_processing_options - - @data_processing_options.setter - def data_processing_options(self, data_processing_options): - """Sets the data_processing_options of this Event. - Processing options you would like to enable for a specific event. - For more details see https://developers.facebook.com/docs/marketing-apis/data-processing-options - - :param data_processing_options: The data_processing_options of this Event. - :type: list[str] - """ - - self._data_processing_options = data_processing_options - - @property - def data_processing_options_country(self): - """Gets the data_processing_options_country of this Event. - - :return: The data_processing_options_country of this Event. - :rtype: int - """ - return self._data_processing_options_country - - @data_processing_options_country.setter - def data_processing_options_country(self, data_processing_options_country): - """Sets the data_processing_options_country of this Event. - A country that you want to associate to this data processing option. - For more details: https://developers.intern.facebook.com/docs/marketing-apis/data-processing-options - - :param data_processing_options_country: The data_processing_options_country of this Event. - :type: int - """ - - if not isinstance(data_processing_options_country, int): - raise TypeError('Event.data_processing_options_country must be an int') - - self._data_processing_options_country = data_processing_options_country - - @property - def data_processing_options_state(self): - """Gets the data_processing_options_state of this Event. - - :return: The data_processing_options_state of this Event. - :rtype: int - """ - return self._data_processing_options_state - - @data_processing_options_state.setter - def data_processing_options_state(self, data_processing_options_state): - """Sets the data_processing_options_state of this Event. - A state that you want to associate with this data processing option. - For more details: https://developers.facebook.com/docs/marketing-apis/data-processing-options - - :param data_processing_options: The data_processing_options of this Event. - :type: int - """ - - self._data_processing_options_state = data_processing_options_state - - @property - def action_source(self): - """Gets the action_source. - - Allows you to specify where the conversion occurred. - - :return: The action_source. - :rtype: ActionSource - """ - return self._action_source - - @action_source.setter - def action_source(self, action_source): - """Sets the action_source. - - Allows you to specify where the conversion occurred. - - :param action_source: The action_source. - :type: ActionSource - """ - - self._action_source = action_source - - @property - def advanced_measurement_table(self): - """Gets the advanced_measurement_table. - - Only used for the Advanced Measurement API in the Advanced Analytics product. - - :return: The advanced_measurement_table. - :rtype: str - """ - return self._advanced_measurement_table - - @advanced_measurement_table.setter - def advanced_measurement_table(self, advanced_measurement_table): - """Sets the advanced_measurement_table. - - Only used for the Advanced Measurement API in the Advanced Analytics product. - - :param advanced_measurement_table: The advanced_measurement_table. - :type: str - """ - 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, - 'event_id': self.event_id, 'data_processing_options': self.data_processing_options, - 'data_processing_options_country' : self.data_processing_options_country, - 'data_processing_options_state': self.data_processing_options_state, - 'advanced_measurement_table': self.advanced_measurement_table } - - if self.user_data is not None: - normalized_payload['user_data'] = self.user_data.normalize() - - 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 - - def validate_action_source(self, action_source): - if not type(action_source) == ActionSource: - raise TypeError( - '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 = {} - - for attr, _ in six.iteritems(self.param_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Event, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Event): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/event_request.py b/tap_facebook/facebook_business/adobjects/serverside/event_request.py deleted file mode 100644 index b100f97..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/event_request.py +++ /dev/null @@ -1,363 +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. - -import json -import pprint -import six - -from facebook_business import FacebookAdsApi -from facebook_business.adobjects.adspixel import AdsPixel -from facebook_business.adobjects.serverside.event import Event -from facebook_business.adobjects.serverside.event_response import EventResponse -from facebook_business.adobjects.serverside.http_method import HttpMethod -from facebook_business.adobjects.serverside.request_options import RequestOptions -from facebook_business.adobjects.serverside.util import Util -from facebook_business.session import FacebookSession - - -class EventRequest(object): - """ - Conversions API Event Request. - """ - - param_types = { - 'events': 'list[Event]', - 'test_event_code': 'str', - 'namespace_id': 'str', - 'upload_id': 'str', - 'upload_tag': 'str', - 'upload_source': 'str', - 'partner_agent': 'str', - } - - def __init__( - self, - pixel_id=None, - events=None, - test_event_code=None, - namespace_id=None, - upload_id=None, - upload_tag=None, - upload_source=None, - partner_agent=None, - http_client=None, - access_token=None, - appsecret=None, - ): - # type: (str, List[Event], str) -> None - - self._events = None - self._test_event_code = None - self._namespace_id = None - self._upload_id = None - self._upload_tag = None - self._upload_source = None - self._partner_agent = None - self.__pixel_id = None - self.__http_client = None - self.__access_token = None - self.__appsecret = None - if pixel_id is None: - raise ValueError("Invalid value for `pixel_id`, must not be `None`") - self.__pixel_id = pixel_id - if http_client is not None and access_token is None: - raise ValueError("An access_token must also be passed in when passing in an http_client") - if http_client is not None: - self.__http_client = http_client - if access_token is not None: - self.__access_token = access_token - if appsecret is not None: - self.__appsecret = appsecret - self.events = events - if test_event_code is not None: - self.test_event_code = test_event_code - if namespace_id is not None: - self.namespace_id = namespace_id - if upload_id is not None: - self.upload_id = upload_id - if upload_tag is not None: - self.upload_tag = upload_tag - if upload_source is not None: - self.upload_source = upload_source - if partner_agent is not None: - self.partner_agent = partner_agent - - @property - def events(self): - """Gets the events. - - An array of Server Event objects - - :return: The events. - :rtype: list[Event] - """ - return self._events - - @events.setter - def events(self, events): - """Sets the events. - - An array of Server Event objects - - :param events: The events. - :type: list[Event] - """ - if events is None: - raise ValueError("Invalid value for `events`, must not be `None`") - - self._events = events - - @property - def test_event_code(self): - """Gets the test_event_code. - - Code used to verify that your server events are received correctly by Facebook. - Use this code to test your server events in the Test Events feature in Events Manager. - See Test Events Tool (https://developers.facebook.com/docs/marketing-api/conversions-api/using-the-api#testEvents) for an example. - - :return: The test_event_code. - :rtype: str - """ - return self._test_event_code - - @test_event_code.setter - def test_event_code(self, test_event_code): - """Sets the test_event_code. - - Code used to verify that your server events are received correctly by Facebook. - Use this code to test your server events in the Test Events feature in Events Manager. - See Test Events Tool (https://developers.facebook.com/docs/marketing-api/conversions-api/using-the-api#testEvents) for an example. - - :param test_event_code: The test_event_code. - :type: str - """ - - self._test_event_code = test_event_code - - @property - def namespace_id(self): - """Gets the namespace_id. - - :return: The namespace_id. - :rtype: str - """ - return self._namespace_id - - @namespace_id.setter - def namespace_id(self, namespace_id): - """Sets the namespace_id. - - :param namespace_id: The namespace_id. - :type: str - """ - - self._namespace_id = namespace_id - - @property - def upload_id(self): - """Gets the upload_id. - - :return: The upload_id. - :rtype: str - """ - return self._upload_id - - @upload_id.setter - def upload_id(self, upload_id): - """Sets the upload_id. - - :param upload_id: The upload_id. - :type: str - """ - - self._upload_id = upload_id - - @property - def upload_tag(self): - """Gets the upload_tag. - - :return: The upload_tag. - :rtype: str - """ - return self._upload_tag - - @upload_tag.setter - def upload_tag(self, upload_tag): - """Sets the upload_tag. - - :param upload_tag: The upload_tag. - :type: str - """ - - self._upload_tag = upload_tag - - @property - def upload_source(self): - """Gets the upload_source. - - :return: The upload_source. - :rtype: str - """ - return self._upload_source - - @upload_source.setter - def upload_source(self, upload_source): - """Sets the upload_source. - - :param upload_source: The upload_source. - :type: str - """ - - self._upload_source = upload_source - - @property - def partner_agent(self): - """Gets the partner_agent. - - Allows you to specify the platform from which the event is sent e.g. wordpress - - :return: The partner_agent. - :rtype: str - """ - return self._partner_agent - - @partner_agent.setter - def partner_agent(self, partner_agent): - """Sets the partner_agent. - - Allows you to specify the platform from which the event is sent e.g. wordpress - - :param partner_agent: The partner_agent. - :type: str - """ - - self._partner_agent = partner_agent - - def get_request_params(self): - params = {} - if self.test_event_code is not None: - params['test_event_code'] = self.test_event_code - if self.namespace_id is not None: - params['namespace_id'] = self.namespace_id - if self.upload_id is not None: - params['upload_id'] = self.upload_id - if self.upload_tag is not None: - params['upload_tag'] = self.upload_tag - if self.upload_source is not None: - params['upload_source'] = self.upload_source - if self.partner_agent is not None: - params['partner_agent'] = self.partner_agent - - return params - - def get_params(self): - params = self.get_request_params() - params["data"] = self.normalize() - return params - - def execute(self): - params = self.get_params() - - if self.__http_client is not None: - return self.execute_with_client(params) - - response = AdsPixel(self.__pixel_id).create_event( - fields=[], - params=params, - ) - return EventResponse(events_received=response['events_received'], - fbtrace_id=response['fbtrace_id'], - messages=response['messages']) - - def execute_with_client(self, params): - url = '/'.join([ - FacebookSession.GRAPH, - FacebookAdsApi.API_VERSION, - self.__pixel_id, - 'events', - ]) - params['access_token'] = self.__access_token - if self.__appsecret is not None: - params['appsecret_proof'] = Util.appsecret_proof(self.__appsecret, self.__access_token) - request_options = RequestOptions( - ca_bundle_path=Util.ca_bundle_path() - ) - - return self.__http_client.execute( - url=url, - method=HttpMethod.POST, - request_options=request_options, - headers=FacebookAdsApi.HTTP_DEFAULT_HEADERS, - params=params - ) - - def normalize(self): - normalized_events = [] - for event in self.events: - normalized_event = event.normalize() - normalized_events.append(json.dumps(normalized_event)) - - return normalized_events - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.param_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EventRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EventRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/event_request_async.py b/tap_facebook/facebook_business/adobjects/serverside/event_request_async.py deleted file mode 100644 index e97e809..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/event_request_async.py +++ /dev/null @@ -1,114 +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.serverside.util import Util -if not Util.async_requests_available(): - raise Exception('EventRequestAsync requires Python >= 3.5.3') - -from facebook_business.adobjects.serverside.event_request import EventRequest -from facebook_business.adobjects.serverside.event_response import EventResponse -from facebook_business.api import FacebookAdsApi -from facebook_business.session import FacebookSession - -import aiohttp -import json -import os -import ssl - -class EventRequestAsync(EventRequest): - def __init__( - self, - pixel_id=None, - events=None, - test_event_code=None, - namespace_id=None, - upload_id=None, - upload_tag=None, - upload_source=None, - partner_agent=None - ): - super().__init__( - pixel_id, - events, - test_event_code, - namespace_id, - upload_id, - upload_tag, - upload_source, - partner_agent - ) - self.pixel_id = pixel_id - - async def create_event(self, session): - api_version = FacebookAdsApi.get_default_api().API_VERSION - url = '/'.join([ - FacebookSession.GRAPH, - api_version, - self.pixel_id, - 'events' - ]) - - facebook_session = FacebookAdsApi.get_default_api()._session - access_token = facebook_session.access_token - params = self.get_params() - params['access_token'] = access_token - if facebook_session.app_secret: - params['appsecret_proof'] = facebook_session._gen_appsecret_proof() - cafile = os.path.join( - os.path.dirname(__file__), - '..', - '..', - 'fb_ca_chain_bundle.crt' - ) - sslcontext = ssl.create_default_context(cafile=cafile) - - async with session.post( - url=url, - data=params, - ssl=sslcontext, - headers=FacebookAdsApi.get_default_api().HTTP_DEFAULT_HEADERS - ) as response: - return await response.json() - - async def execute(self): - async with aiohttp.ClientSession() as session: - response = await self.create_event(session) - return EventResponse(events_received=response['events_received'], - fbtrace_id=response['fbtrace_id'], - messages=response['messages']) - - def normalize(self): - normalized_events = [] - for event in self.events: - normalized_event = event.normalize() - normalized_events.append(normalized_event) - - return json.dumps(normalized_events) - - def clone_without_events(self): - return EventRequestAsync( - pixel_id=self.pixel_id, - events=[], - test_event_code=self.test_event_code, - namespace_id=self.namespace_id, - upload_id=self.upload_id, - upload_tag=self.upload_tag, - upload_source=self.upload_source, - ) diff --git a/tap_facebook/facebook_business/adobjects/serverside/event_response.py b/tap_facebook/facebook_business/adobjects/serverside/event_response.py deleted file mode 100644 index 36ea645..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/event_response.py +++ /dev/null @@ -1,154 +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. - -import pprint -import re -import six - - -class EventResponse(object): - param_types = { - 'events_received': 'int', - 'messages': 'list[str]', - 'fbtrace_id': 'str' - } - - def __init__(self, events_received = None, messages = None, fbtrace_id = None): - # type: (int, List[str], str) -> None - - """Conversions API Event Response""" - self._events_received = None - self._messages = None - self._fbtrace_id = None - if events_received is not None: - self.events_received = events_received - if messages is not None: - self.messages = messages - if fbtrace_id is not None: - self.fbtrace_id = fbtrace_id - - @property - def events_received(self): - """Gets the count of events received. - - - :return: The count of events received.. - :rtype: int - """ - return self._events_received - - @events_received.setter - def events_received(self, events_received): - """Sets the count of events received. - - - :param events_received: The count of events received.. - :type: int - """ - - self._events_received = events_received - - @property - def messages(self): - """Gets the messages. - - - :return: The messages. - :rtype: list[str] - """ - return self._messages - - @messages.setter - def messages(self, messages): - """Sets the messages. - - - :param messages: The messages. - :type: list[str] - """ - - self._messages = messages - - @property - def fbtrace_id(self): - """Gets the Facebook API trace id. - - - :return: The Facebook API trace id. - :rtype: str - """ - return self._fbtrace_id - - @fbtrace_id.setter - def fbtrace_id(self, fbtrace_id): - """Sets the messages. - - - :param fbtrace_id: The Facebook API trace id. - :type: str - """ - - self._fbtrace_id = fbtrace_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.param_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EventResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EventResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/extended_device_info.py b/tap_facebook/facebook_business/adobjects/serverside/extended_device_info.py deleted file mode 100644 index f9a4c1b..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/extended_device_info.py +++ /dev/null @@ -1,323 +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. - -class ExtendedDeviceInfo(object): - - EXT_INFO_VERSION = 0 - APP_PACKAGE_NAME = 1 - SHORT_VERSION = 2 - LONG_VERSION = 3 - OS_VERSION = 4 - DEVICE_MODEL_NAME = 5 - LOCALE = 6 - TIMEZONE_ABBREVIATION = 7 - CARRIER = 8 - SCREEN_WIDTH = 9 - SCREEN_HEIGHT = 10 - SCREEN_DENSITY = 11 - CPU_CORE_COUNT = 12 - TOTAL_DISK_SPACE_GB = 13 - FREE_DISK_SPACE_GB = 14 - DEVICE_TIME_ZONE = 15 - - param_types = { - 'ext_info_version': 'str', - 'app_package_name': 'str', - 'short_version': 'str', - 'long_version': 'str', - 'os_version': 'str', - 'device_model_name': 'str', - 'locale': 'str', - 'timezone_abbreviation': 'str', - 'carrier': 'str', - 'screen_width': 'int', - 'screen_height': 'int', - 'screen_density': 'str', - 'cpu_core_count': 'int', - 'total_disk_space_gb': 'int', - 'free_disk_space_gb': 'int', - 'device_time_zone': 'str', - } - - def __init__( - self, - ext_info_version=None, - app_package_name=None, - short_version=None, - long_version=None, - os_version=None, - device_model_name=None, - locale=None, - timezone_abbreviation=None, - carrier=None, - screen_width=None, - screen_height=None, - screen_density=None, - cpu_core_count=None, - total_disk_space_gb=None, - free_disk_space_gb=None, - device_time_zone=None, - ): - # type: (str, str, str, str, str, str, str, str, str, int, int, str, int, int, int, str) -> None - - """ExtendedDeviceInfo""" - self._ext_info_version = None - self._app_package_name = None - self._short_version = None - self._long_version = None - self._os_version = None - self._device_model_name = None - self._locale = None - self._timezone_abbreviation = None - self._carrier = None - self._screen_width = None - self._screen_height = None - self._screen_density = None - self._cpu_core_count = None - self._total_disk_space_gb = None - self._free_disk_space_gb = None - self._device_time_zone = None - - if ext_info_version is not None: - self.ext_info_version = ext_info_version - if app_package_name is not None: - self.app_package_name = app_package_name - if short_version is not None: - self.short_version = short_version - if long_version is not None: - self.long_version = long_version - if os_version is not None: - self.os_version = os_version - if device_model_name is not None: - self.device_model_name = device_model_name - if locale is not None: - self.locale = locale - if timezone_abbreviation is not None: - self.timezone_abbreviation = timezone_abbreviation - if carrier is not None: - self.carrier = carrier - if screen_width is not None: - self.screen_width = screen_width - if screen_height is not None: - self.screen_height = screen_height - if screen_density is not None: - self.screen_density = screen_density - if cpu_core_count is not None: - self.cpu_core_count = cpu_core_count - if total_disk_space_gb is not None: - self.total_disk_space_gb = total_disk_space_gb - if free_disk_space_gb is not None: - self.free_disk_space_gb = free_disk_space_gb - if device_time_zone is not None: - self.device_time_zone = device_time_zone - - @property - def ext_info_version(self): - return self._ext_info_version - - @ext_info_version.setter - def ext_info_version(self, ext_info_version): - self._ext_info_version = ext_info_version - - @property - def app_package_name(self): - return self._app_package_name - - @app_package_name.setter - def app_package_name(self, app_package_name): - self._app_package_name = app_package_name - - @property - def short_version(self): - return self._short_version - - @short_version.setter - def short_version(self, short_version): - self._short_version = short_version - - @property - def long_version(self): - return self._long_version - - @long_version.setter - def long_version(self, long_version): - self._long_version = long_version - - @property - def os_version(self): - return self._os_version - - @os_version.setter - def os_version(self, os_version): - self._os_version = os_version - - @property - def device_model_name(self): - return self._device_model_name - - @device_model_name.setter - def device_model_name(self, device_model_name): - self._device_model_name = device_model_name - - @property - def locale(self): - return self._locale - - @locale.setter - def locale(self, locale): - self._locale = locale - - @property - def timezone_abbreviation(self): - return self._timezone_abbreviation - - @timezone_abbreviation.setter - def timezone_abbreviation(self, timezone_abbreviation): - self._timezone_abbreviation = timezone_abbreviation - - @property - def carrier(self): - return self._carrier - - @carrier.setter - def carrier(self, carrier): - self._carrier = carrier - - @property - def screen_width(self): - return self._screen_width - - @screen_width.setter - def screen_width(self, screen_width): - self._screen_width = screen_width - - @property - def screen_height(self): - return self._screen_height - - @screen_height.setter - def screen_height(self, screen_height): - self._screen_height = screen_height - - @property - def screen_density(self): - return self._screen_density - - @screen_density.setter - def screen_density(self, screen_density): - self._screen_density = screen_density - - @property - def cpu_core_count(self): - return self._cpu_core_count - - @cpu_core_count.setter - def cpu_core_count(self, cpu_core_count): - self._cpu_core_count = cpu_core_count - - @property - def total_disk_space_gb(self): - return self._total_disk_space_gb - - @total_disk_space_gb.setter - def total_disk_space_gb(self, total_disk_space_gb): - self._total_disk_space_gb = total_disk_space_gb - - @property - def free_disk_space_gb(self): - return self._free_disk_space_gb - - @free_disk_space_gb.setter - def free_disk_space_gb(self, free_disk_space_gb): - self._free_disk_space_gb = free_disk_space_gb - - @property - def device_time_zone(self): - return self._device_time_zone - - @device_time_zone.setter - def device_time_zone(self, device_time_zone): - self._device_time_zone = device_time_zone - - def normalize(self): - extended_device_info_array = [] - extended_device_info_array.insert(self.EXT_INFO_VERSION, self._ext_info_version) - extended_device_info_array.insert(self.APP_PACKAGE_NAME, self._app_package_name) - extended_device_info_array.insert(self.SHORT_VERSION, self._short_version) - extended_device_info_array.insert(self.LONG_VERSION, self._long_version) - extended_device_info_array.insert(self.OS_VERSION, self._os_version) - extended_device_info_array.insert(self.DEVICE_MODEL_NAME, self._device_model_name) - extended_device_info_array.insert(self.LOCALE, self._locale) - extended_device_info_array.insert(self.TIMEZONE_ABBREVIATION, self._timezone_abbreviation) - extended_device_info_array.insert(self.CARRIER, self._carrier) - extended_device_info_array.insert(self.SCREEN_WIDTH, self._screen_width) - extended_device_info_array.insert(self.SCREEN_HEIGHT, self._screen_height) - extended_device_info_array.insert(self.SCREEN_DENSITY, self._screen_density) - extended_device_info_array.insert(self.CPU_CORE_COUNT, self._cpu_core_count) - extended_device_info_array.insert(self.TOTAL_DISK_SPACE_GB, self._total_disk_space_gb) - extended_device_info_array.insert(self.FREE_DISK_SPACE_GB, self._free_disk_space_gb) - extended_device_info_array.insert(self.DEVICE_TIME_ZONE, self._device_time_zone) - return extended_device_info_array - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.param_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ExtendedDeviceInfo, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Event): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/gender.py b/tap_facebook/facebook_business/adobjects/serverside/gender.py deleted file mode 100644 index 6a5ab97..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/gender.py +++ /dev/null @@ -1,26 +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 enum import Enum - - -class Gender(Enum): - MALE = 'm' - FEMALE = 'f' diff --git a/tap_facebook/facebook_business/adobjects/serverside/http_method.py b/tap_facebook/facebook_business/adobjects/serverside/http_method.py deleted file mode 100644 index ea7783b..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/http_method.py +++ /dev/null @@ -1,25 +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. - -class HttpMethod: - POST = 'POST' - PUT = 'PUT' - GET = 'GET' - DELETE = 'DELETE' diff --git a/tap_facebook/facebook_business/adobjects/serverside/http_service_interface.py b/tap_facebook/facebook_business/adobjects/serverside/http_service_interface.py deleted file mode 100644 index 1c44541..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/http_service_interface.py +++ /dev/null @@ -1,26 +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 abc import ABC, abstractmethod - -class HttpServiceInterface(ABC): - @abstractmethod - def execute(self, url, method, request_options, headers, params): - pass diff --git a/tap_facebook/facebook_business/adobjects/serverside/messaging_channel.py b/tap_facebook/facebook_business/adobjects/serverside/messaging_channel.py deleted file mode 100644 index ce0572c..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/messaging_channel.py +++ /dev/null @@ -1,32 +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 enum import Enum - - -# 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/tap_facebook/facebook_business/adobjects/serverside/normalize.py b/tap_facebook/facebook_business/adobjects/serverside/normalize.py deleted file mode 100644 index 3fcd3a3..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/normalize.py +++ /dev/null @@ -1,203 +0,0 @@ -# coding=utf-8 -# Copyright 2014 Facebook, Inc. - -# You are hereby granted a non-exclusive, worldwide, royalty-free license to -# use, copy, modify, and distribute this software in source code or binary -# form for use in connection with the web services and APIs provided by -# Facebook. - -# As with any software that integrates with the Facebook platform, your use -# of this software is subject to the Facebook Developer Principles and -# Policies [http://developers.facebook.com/policy/]. This copyright notice -# shall be included in all copies or substantial portions of the software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -import datetime -import hashlib -import pycountry -import re - -# defined regex for normalization of data -location_excluded_chars = re.compile(r"[0-9.\s\-()]") -isocode_included_chars = re.compile(r"[^a-z]") -email_pattern = re.compile(r".+@.+\..+") -md5_pattern = re.compile(r"^[a-f0-9]{32}$") -sha256_pattern = re.compile(r"^[a-f0-9]{64}$") -year_pattern = re.compile(r"^[0-9]{4}$") - -class Normalize(object): - - - @staticmethod - def normalize_field(field, data): - return Normalize.normalize(field, data, True) - - @staticmethod - def normalize_field_skip_hashing(field, data): - return Normalize.normalize(field, data, False) - - @staticmethod - def normalize(field, data, hash_field): - """Computes the normalized value for the given field type and data. - - :param field: The field name that is being normalized. - :param data: The data that is being normalized. - :return: Normalized value. - :rtype: str - """ - if field is None: - raise TypeError('Field Type must be passed for Normalization') - if data is None or len(data) == 0: - return None - - normalized_data = data.lower().strip() - if Normalize.is_already_hashed(normalized_data): - return normalized_data - - if field == "em": - normalized_data = Normalize.validate_email(normalized_data) - - elif field == "ct": - # Remove numbers, space and period character - normalized_data = location_excluded_chars.sub("", normalized_data) - - elif field == "zp": - normalized_data = re.sub(r"\s","", normalized_data) - normalized_data = normalized_data.split("-")[0] - - elif field == "st": - # Remove numbers, space and period character - normalized_data = location_excluded_chars.sub("", normalized_data) - - elif field == "country": - # Remove any non-alpha characters from the data - normalized_data = isocode_included_chars.sub("", normalized_data) - if not Normalize.is_valid_country_code(normalized_data): - raise TypeError("Invalid format for country:'" + data + "'.Please follow ISO 2-letter ISO 3166-1 standard for representing country. eg: us") - - elif field == "currency": - # Remove any non-alpha characters from the data - normalized_data = isocode_included_chars.sub("", normalized_data) - if len(normalized_data) != 3: - raise TypeError("Invalid format for currency:'" + data + "'.Please follow ISO 3-letter ISO 4217 standard for representing currency. Eg: usd") - - elif field == "ph": - # Remove spaces and parenthesis within phone number - normalized_data = re.sub(r"[\s\-()]", "", normalized_data) - - # Removes the starting + and leading two 0's - normalized_data = re.sub(r"^\+?0{0,2}", "", normalized_data) - - international_number = Normalize.get_international_number(normalized_data) - - if international_number is None: - raise ValueError("Invalid format for phone number:'" + normalized_data + "'. Please check passed phone number.") - else: - normalized_data = international_number - - elif field == "f5first" or field == "f5last": - normalized_data = normalized_data[:5] - - elif field == "fi": - normalized_data = normalized_data[:1] - - elif field == "dobd": - if len(normalized_data) == 1: - normalized_data = '0' + normalized_data - - try: - dobd_int = int(normalized_data) - if dobd_int < 1 or dobd_int > 31: - raise ValueError - except ValueError: - raise ValueError("Invalid format for dobd: '%s'. Day should be specified in 'DD' format." % data) - - elif field == "dobm": - if len(normalized_data) == 1: - normalized_data = '0' + normalized_data - - try: - dobm_int = int(normalized_data) - if dobm_int < 1 or dobm_int > 12: - raise ValueError - except ValueError: - raise ValueError("Invalid format for dobm: '%s'. Month should be specified in 'MM' format." % data) - - elif field == "doby": - if not year_pattern.match(normalized_data): - raise ValueError("Invalid format for doby: '%s'. Year should be specified in 'YYYY' format." % data) - - if hash_field: - normalized_data = Normalize.hash_sha_256(normalized_data) - - return normalized_data - - """ - Validates the email field for RFC 5322 - :param token: The email token that is being validates. - :return: validated email value. - :rtype: str - """ - @staticmethod - def validate_email(email): - result = email_pattern.match(email) - if result is None: - raise TypeError('Invalid email format for the passed email:' + email + '.Please check the passed email format.') - return email - - """ - Checks if the given data is already hashed by MD5 or SHA256 Hash - :param data: The token that is being checked for hashed. - :return: boolean representing the {md5/sha256} hash state of the token. - :rtype: bool - """ - @staticmethod - def is_already_hashed(data): - md5_match = md5_pattern.match(data) - sha256_match = sha256_pattern.match(data) - if md5_match is None and sha256_match is None: - return False - return True - - @staticmethod - def hash_sha_256(input): - if input is None: - return None - input = input.encode('utf-8') - return hashlib.sha256(input).hexdigest() - - @staticmethod - def get_international_number(phone_number): - - # Removes the + and leading two 0's - phone_number = re.sub(r"^\+?0{0,2}", "", phone_number) - - if phone_number.startswith('0'): - return None - - # International Phone number with country calling code. - international_number_regex = re.compile(r'^\d{1,4}\(?\d{2,3}\)?\d{4,}$') - - matched_groups = international_number_regex.match(phone_number) - if matched_groups is None: - return None - - return matched_groups.group() - - """ - Checks if the given country code is present in the ISO list - :param country code: The code that is being checked for presence. - :return: boolean indicating whether country code is valid. - :rtype: bool - """ - @staticmethod - def is_valid_country_code(country_code): - country_data = pycountry.countries.get(alpha_2=country_code.upper()) - return country_data is not None diff --git a/tap_facebook/facebook_business/adobjects/serverside/request_options.py b/tap_facebook/facebook_business/adobjects/serverside/request_options.py deleted file mode 100644 index 97601ed..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/request_options.py +++ /dev/null @@ -1,30 +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. - -class RequestOptions: - def __init__(self, ca_bundle_path=None): - self.ca_bundle_path = ca_bundle_path - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RequestOptions): - return False - - return self.__dict__ == other.__dict__ diff --git a/tap_facebook/facebook_business/adobjects/serverside/user_data.py b/tap_facebook/facebook_business/adobjects/serverside/user_data.py deleted file mode 100644 index 8c7598d..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/user_data.py +++ /dev/null @@ -1,1209 +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. - -import pprint -import six - -from facebook_business.adobjects.serverside.gender import Gender -from facebook_business.adobjects.serverside.normalize import Normalize - - -class UserData(object): - multi_value_constructor_err = 'Cannot set both {} and {} parameters via constructor. Please set either the singular or plural parameter, not both.' - - param_types = { - 'emails': 'list[str]', - 'phones': 'list[str]', - 'genders': 'list[Gender]', - 'dates_of_birth': 'list[str]', - 'last_names': 'list[str]', - 'first_names': 'list[str]', - 'cities': 'list[str]', - 'states': 'list[str]', - 'country_codes': 'list[str]', - 'zip_codes': 'list[str]', - 'external_ids': 'list[str]', - 'client_ip_address': 'str', - 'client_user_agent': 'str', - 'fbc': 'str', - 'fbp': 'str', - 'subscription_id': 'str', - 'fb_login_id': 'str', - 'lead_id': 'str', - 'f5first': 'str', - 'f5last': 'str', - 'fi': 'str', - 'dobd': 'str', - 'dobm': 'str', - 'doby': 'str', - 'madid': 'str', - 'anon_id': 'str', - 'ctwa_clid': 'ctwa_clid', - 'page_id': 'page_id', - } - - def __init__( - self, - email=None, - phone=None, - gender=None, - date_of_birth=None, - last_name=None, - first_name=None, - city=None, - state=None, - country_code=None, - zip_code=None, - external_id=None, - client_ip_address=None, - client_user_agent=None, - fbc=None, - fbp=None, - subscription_id=None, - fb_login_id=None, - lead_id=None, - f5first=None, - f5last=None, - fi=None, - dobd=None, - dobm=None, - doby=None, - emails=None, - phones=None, - genders=None, - dates_of_birth=None, - last_names=None, - first_names=None, - cities=None, - states=None, - country_codes=None, - zip_codes=None, - 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, str, str) -> None - - """UserData is a set of identifiers Facebook can use for targeted attribution""" - self._emails = None - self._phones = None - self._genders = None - self._dates_of_birth = None - self._last_names = None - self._first_names = None - self._cities = None - self._states = None - self._country_codes = None - self._zip_codes = None - self._external_ids = None - self._client_ip_address = None - self._client_user_agent = None - self._fbc = None - self._fbp = None - self._subscription_id = None - self._fb_login_id = None - self._lead_id = None - self._f5first = None - self._f5last = None - self._fi = None - self._dobd = None - self._dobm = None - 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')) - if phone is not None and phones is not None: - raise ValueError(UserData.multi_value_constructor_err.format('phone', 'phones')) - if gender is not None and genders is not None: - raise ValueError(UserData.multi_value_constructor_err.format('gender', 'genders')) - if date_of_birth is not None and dates_of_birth is not None: - raise ValueError(UserData.multi_value_constructor_err.format('date_of_birth', 'dates_of_birth')) - if last_name is not None and last_names is not None: - raise ValueError(UserData.multi_value_constructor_err.format('last_name', 'last_names')) - if first_name is not None and first_names is not None: - raise ValueError(UserData.multi_value_constructor_err.format('first_name', 'first_names')) - if city is not None and cities is not None: - raise ValueError(UserData.multi_value_constructor_err.format('city', 'cities')) - if state is not None and states is not None: - raise ValueError(UserData.multi_value_constructor_err.format('state', 'states')) - if country_code is not None and country_codes is not None: - raise ValueError(UserData.multi_value_constructor_err.format('country_code', 'country_codes')) - if zip_code is not None and zip_codes is not None: - raise ValueError(UserData.multi_value_constructor_err.format('zip_code', 'zip_codes')) - if external_id is not None and external_ids is not None: - raise ValueError(UserData.multi_value_constructor_err.format('external_id', 'external_ids')) - - if email is not None: - self.email = email - elif emails is not None: - self.emails = emails - if phone is not None: - self.phone = phone - elif phones is not None: - self.phones = phones - if gender is not None: - self.gender = gender - elif genders is not None: - self.genders = genders - if date_of_birth is not None: - self.date_of_birth = date_of_birth - elif dates_of_birth is not None: - self.dates_of_birth = dates_of_birth - if last_name is not None: - self.last_name = last_name - elif last_names is not None: - self.last_names = last_names - if first_name is not None: - self.first_name = first_name - elif first_names is not None: - self.first_names = first_names - if city is not None: - self.city = city - elif cities is not None: - self.cities = cities - if state is not None: - self.state = state - elif states is not None: - self.states = states - if country_code is not None: - self.country_code = country_code - elif country_codes is not None: - self.country_codes = country_codes - if zip_code is not None: - self.zip_code = zip_code - elif zip_codes is not None: - self.zip_codes = zip_codes - if external_id is not None: - self.external_id = external_id - elif external_ids is not None: - self.external_ids = external_ids - - if client_ip_address is not None: - self.client_ip_address = client_ip_address - if client_user_agent is not None: - self.client_user_agent = client_user_agent - if fbc is not None: - self.fbc = fbc - if fbp is not None: - self.fbp = fbp - if subscription_id is not None: - self.subscription_id = subscription_id - if fb_login_id is not None: - self.fb_login_id = fb_login_id - if lead_id is not None: - self.lead_id = lead_id - if f5first is not None: - self.f5first = f5first - if f5last is not None: - self.f5last = f5last - if fi is not None: - self.fi = fi - if dobd is not None: - self.dobd = dobd - if dobm is not None: - self.dobm = dobm - if doby is not None: - self.doby = doby - if madid is not None: - 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): - """Gets the email. - - An email address, in lowercase. - - :return: The email. - :rtype: str - """ - return self._emails[0] if self._emails else None - - @email.setter - def email(self, email): - """Sets the email. - - An email address, in lowercase. - - :param email: The email. - :type: str - """ - - self._emails = [email] if email is not None else None - - @property - def emails(self): - """Gets the emails. - - A list of email addresses, in lowercase. - - :return: The emails. - :rtype: list[str] - """ - return self._emails - - @emails.setter - def emails(self, emails): - """Sets the emails. - - A list of email addresses, in lowercase. - - :param emails: A list of emails. - :type: list[str] - """ - - self._emails = emails - - @property - def phone(self): - """Gets the phone. - - A phoneone number. Include only digits with country code, area code, and number. - - :return: The phone. - :rtype: str - """ - return self._phones[0] if self._phones else None - - @phone.setter - def phone(self, phone): - """Sets the phone. - - A phone number. Include only digits with country code, area code, and number. - - :param phone: The phone. - :type: str - """ - - self._phones = [phone] if phone is not None else None - - @property - def phones(self): - """Gets the phones. - - A list of phone numbers. Include only digits with country code, area code, and number. - - :return: The phone numbers. - :rtype: list[str] - """ - return self._phones - - @phones.setter - def phones(self, phones): - """Sets the phones. - - A list of phone numbers. Include only digits with country code, area code, and number. - - :param phones: A list of phones. - :type: list[str] - """ - - self._phones = phones - - @property - def gender(self): - """Gets the gender. - - Gender, in lowercase. Either f or m. - - :return: The gender. - :rtype: Gender - """ - return self._genders[0] if self._genders else None - - @gender.setter - def gender(self, gender): - """Sets the gender. - - Gender, in lowercase. Either f or m. - - :param gender: The gender. - :type: Gender - """ - if gender is None: - return - if not isinstance(gender, Gender): - raise TypeError('UserData.gender must be of type Gender') - - self._genders = [gender] - - @property - def genders(self): - """Gets the genders. - - A list of genders, in lowercase. Either f or m. - - :return: A list of genders. - :rtype: list[Gender] - """ - return self._genders - - @genders.setter - def genders(self, genders): - """Sets the genders. - - A list of Genders, in lowercase. Either f or m. - - :param genders: The genders. - :type: Gender - """ - if genders and not (all(isinstance(gender, Gender) for gender in genders)): - raise TypeError('UserData.genders must be of type list[Gender]') - - self._genders = genders - - @property - def date_of_birth(self): - """Gets the date of birth. - - A date of birth given as YYYYMMDD. - - - :return: The date of birth. - :rtype: str - """ - return self._dates_of_birth[0] if self._dates_of_birth else None - - @date_of_birth.setter - def date_of_birth(self, date_of_birth): - """Sets the date of birth. - - A date of birth given as YYYYMMDD. - - :param date_of_birth: The date of birth. - :type: str - """ - - self._dates_of_birth = [date_of_birth] if date_of_birth is not None else None - - @property - def dates_of_birth(self): - """Gets the dates of birth. - - A list of dates of birth given as YYYYMMDD. - - - :return: The dates of birth. - :rtype: list[str] - """ - return self._dates_of_birth - - @dates_of_birth.setter - def dates_of_birth(self, dates_of_birth): - """Sets the dates of birth. - - A list of dates of birth given as YYYYMMDD. - - :param dates_of_birth: The dates of birth. - :type: list[str] - """ - - self._dates_of_birth = dates_of_birth - - @property - def last_name(self): - """Gets the last_name. - - A last name in lowercase. - - :return: The last name. - :rtype: str - """ - return self._last_names[0] if self._last_names else None - - @last_name.setter - def last_name(self, last_name): - """Sets the last name. - - A last name in lowercase. - - :param last_name: The last name. - :type: str - """ - - self._last_names = [last_name] if last_name is not None else None - - @property - def last_names(self): - """Gets the last_names. - - A list of last names in lowercase. - - :return: The last names. - :rtype: list[str] - """ - return self._last_names - - @last_names.setter - def last_names(self, last_names): - """Sets the last names. - - A list of last names in lowercase. - - :param last_names: The last names. - :type: list[str] - """ - - self._last_names = last_names - - @property - def first_name(self): - """Gets the first name. - - A first name in lowercase. - - :return: The first name. - :rtype: str - """ - return self._first_names[0] if self._first_names else None - - @first_name.setter - def first_name(self, first_name): - """Sets the first name. - - A first name in lowercase. - - :param first_name: The first name. - :type: str - """ - - self._first_names = [first_name] if first_name is not None else None - - @property - def first_names(self): - """Gets the first names. - - A list of first names in lowercase. - - :return: The first names. - :rtype: list[str] - """ - return self._first_names - - @first_names.setter - def first_names(self, first_names): - """Sets the first names. - - A list of first names in lowercase. - - :param first_names: The first names. - :type: list[str] - """ - - self._first_names = first_names - - @property - def city(self): - """Gets the city. - - A city in lower-case without spaces or punctuation. - - :return: The city. - :rtype: str - """ - return self._cities[0] if self._cities else None - - @city.setter - def city(self, city): - """Sets the city. - - A city in lower-case without spaces or punctuation. - - :param city: The city. - :type: str - """ - - self._cities = [city] if city is not None else None - - @property - def cities(self): - """Gets the cities. - - A list of cities in lower-case without spaces or punctuation. - - :return: The cities. - :rtype: list[str] - """ - return self._cities - - @cities.setter - def cities(self, cities): - """Sets the cities. - - A list of cities in lower-case without spaces or punctuation. - - :param cities: The cities. - :type: list[str] - """ - - self._cities = cities - - @property - def state(self): - """Gets the state. - - A two-letter state code in lowercase. - - :return: The state. - :rtype: str - """ - return self._states[0] if self._states else None - - @state.setter - def state(self, state): - """Sets the state. - - A two-letter state code in lowercase. - - :param state: The state. - :type: str - """ - - self._states = [state] if state is not None else None - - @property - def states(self): - """Gets the states. - - A list of two-letter state codes in lowercase. - - :return: The states. - :rtype: list[str] - """ - return self._states - - @states.setter - def states(self, states): - """Sets the states. - - A list of two-letter state codes in lowercase. - - :param states: The states. - :type: list[str] - """ - - self._states = states - - @property - def country_code(self): - """Gets the country code. - - A two-letter country code in lowercase - - :return: The country code. - :rtype: str - """ - return self._country_codes[0] if self._country_codes else None - - @country_code.setter - def country_code(self, country_code): - """Sets a two-letter country code in lowercase. - - :param country_code: The country code - :type: str - """ - - self._country_codes = [country_code] if country_code is not None else None - - @property - def country_codes(self): - """Gets the country codes. - - A list of two-letter country codes in lowercase - - :return: The country codes. - :rtype: list[str] - """ - return self._country_codes - - @country_codes.setter - def country_codes(self, country_codes): - """Sets a list of two-letter country codes in lowercase. - - :param country_codes: The country codes - :type: list[str] - """ - - self._country_codes = country_codes - - @property - def zip_code(self): - """Gets the zipcode. - - TFor the United States, this is a five-digit zip code. - For other locations, follow each country's standards. - - :return: The zipcode. - :rtype: str - """ - return self._zip_codes[0] if self._zip_codes else None - - @zip_code.setter - def zip_code(self, zip_code): - """Sets the zipcode. - - For the United States, this is a five-digit zip code. - For other locations, follow each country's standards. - - :param zip_code: The zipcode. - :type: str - """ - - self._zip_codes = [zip_code] if zip_code is not None else None - - @property - def zip_codes(self): - """Gets the zipcodes. - - For the United States, this is a list of five-digit zip codes. - For other locations, follow each country's standards. - - :return: The zipcodes. - :rtype: list[str] - """ - return self._zip_codes - - @zip_codes.setter - def zip_codes(self, zip_codes): - """Sets the zipcodes. - - For the United States, this is a list of five-digit zip codes. - For other locations, follow each country's standards. - - :param zip_codes: The zipcodes. - :type: list[str] - """ - - self._zip_codes = zip_codes - - @property - def external_id(self): - """Gets the external id. - - Any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. - In the Offline Conversions API (https://www.facebook.com/business/help/104039186799009), - this is known as extern_id. For more information, see Offline Conversions, Providing External IDs. If - External ID is being sent via other channels, then it should be sent in the same format via the Conversions API. - - :return: The external id. - :rtype: str - """ - return self._external_ids[0] if self._external_ids else None - - @external_id.setter - def external_id(self, external_id): - """Sets the external id. - - Any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. - In the Offline Conversions API (https://www.facebook.com/business/help/104039186799009), - this is known as extern_id. For more information, see Offline Conversions, Providing External IDs. If - External ID is being sent via other channels, then it should be sent in the same format via the Conversions API. - - :param external_id: The external id. - :type: str - """ - - self._external_ids = [external_id] if external_id is not None else None - - @property - def external_ids(self): - """Gets the external ids. - - A list of any unique IDs from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. - In the Offline Conversions API (https://www.facebook.com/business/help/104039186799009), - this is known as extern_id. For more information, see Offline Conversions, Providing External IDs. If - External ID is being sent via other channels, then it should be sent in the same format via the Conversions API. - - :return: The external ids. - :rtype: list[str] - """ - return self._external_ids - - @external_ids.setter - def external_ids(self, external_ids): - """Sets the external ids. - - A list of any unique IDs from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. - In the Offline Conversions API (https://www.facebook.com/business/help/104039186799009), - this is known as extern_id. For more information, see Offline Conversions, Providing External IDs. If - External ID is being sent via other channels, then it should be sent in the same format via the Conversions API. - - :param external_ids: The external ids. - :type: list[str] - """ - - self._external_ids = external_ids - - @property - def client_ip_address(self): - """Gets the client ip address. - - The IP address of the browser corresponding to the event. - - :return: The client ip address. - :rtype: str - """ - return self._client_ip_address - - @client_ip_address.setter - def client_ip_address(self, client_ip_address): - """Sets the client ip address. - - The IP address of the browser corresponding to the event. - - :param client_ip_address: The client ip address. - :type: str - """ - - self._client_ip_address = client_ip_address - - @property - def client_user_agent(self): - """Gets the client user agent. - - The user agent for the browser corresponding to the event. - - :return: The client user agent. - :rtype: str - """ - return self._client_user_agent - - @client_user_agent.setter - def client_user_agent(self, client_user_agent): - """Sets the client user agent. - - The user agent for the browser corresponding to the event. - - :param client_user_agent: The client user agent. - :type: str - """ - - self._client_user_agent = client_user_agent - - @property - def fbc(self): - """Gets the fbc. - - The Facebook click ID value stored in the _fbc browser cookie under your domain. - See Managing fbc and fbp Parameters for how to get this value - (https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc), - or generate this value from a fbclid query parameter. - - :return: The fbc. - :rtype: str - """ - return self._fbc - - @fbc.setter - def fbc(self, fbc): - """Sets the fbc. - - The Facebook click ID value stored in the _fbc browser cookie under your domain. - See Managing fbc and fbp Parameters for how to get this value - (https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc), - or generate this value from a fbclid query parameter. - - :param fbc: The fbc. - :type: str - """ - - self._fbc = fbc - - @property - def fbp(self): - """Gets the fbp. - - The Facebook browser ID value stored in the _fbp browser cookie under your domain. - See Managing fbc and fbp Parameters for how to get this value - (https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc), - or generate this value from a fbclid query parameter. - - :return: The fbp. - :rtype: str - """ - return self._fbp - - @fbp.setter - def fbp(self, fbp): - """Sets the fbp. - - The Facebook browser ID value stored in the _fbp browser cookie under your domain. - See Managing fbc and fbp Parameters for how to get this value - (https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc), - or generate this value from a fbclid query parameter. - - :param fbp: The fbp. - :type: str - """ - - self._fbp = fbp - - @property - def subscription_id(self): - """Gets the subscription id. - - The subscription ID for the user in this transaction. This is similar to the order ID for an individual product. - - :return: The subscription id. - :rtype: str - """ - return self._subscription_id - - @subscription_id.setter - def subscription_id(self, subscription_id): - """Sets the subscription id. - - The subscription ID for the user in this transaction. This is similar to the order ID for an individual product. - - :param subscription_id: The subscription id. - :type: str - """ - - self._subscription_id = subscription_id - - @property - def fb_login_id(self): - """Gets the Facebook login id. - - ID issued by Facebook when a person first logs into an instance of an app. This is also known as App-Scoped ID. - - :return: The Facebook login id. - :rtype: str - """ - return self._fb_login_id - - @fb_login_id.setter - def fb_login_id(self, fb_login_id): - """Sets the Facebook login id. - - ID issued by Facebook when a person first logs into an instance of an app. This is also known as App-Scoped ID. - - :param fb_login_id: The Facebook login id. - :type: str - """ - - self._fb_login_id = fb_login_id - - @property - def lead_id(self): - """Gets the lead_id. - - Lead ID is associated with a lead generated by Facebook's Lead Ads. - - :return: The lead_id. - :rtype: str - """ - return self._lead_id - - @lead_id.setter - def lead_id(self, lead_id): - """Sets the lead_id. - - Lead ID is associated with a lead generated by Facebook's Lead Ads. - - :param lead_id: The lead_id. - :type: str - """ - - self._lead_id = lead_id - - @property - def f5first(self): - """Gets the f5first. - - The first 5 characters of a first name. - - :return: f5first. - :rtype: str - """ - return self._f5first - - @f5first.setter - def f5first(self, f5first): - """Sets the f5first. - - The first 5 characters of a first name. - - :param f5first. - :type: str - """ - - self._f5first = f5first - - @property - def f5last(self): - """Gets the f5last. - - The first 5 characters of a last name. - - :return: f5last. - :rtype: str - """ - return self._f5last - - @f5last.setter - def f5last(self, f5last): - """Sets the f5last. - - The first 5 characters of a last name. - - :param f5last. - :type: str - """ - - self._f5last = f5last - - @property - def fi(self): - """Gets the fi. - - The first initial. - - :return: fi. - :rtype: str - """ - return self._fi - - @fi.setter - def fi(self, fi): - """Sets the fi. - - The first initial. - - :param fi. - :type: str - """ - - self._fi = fi - - @property - def dobd(self): - """Gets the dobd. - - The date of birth day. - - :return: dobd. - :rtype: str - """ - return self._dobd - - @dobd.setter - def dobd(self, dobd): - """Sets the dobd. - - The date of birth day. - - :param dobd. - :type: str - """ - - self._dobd = dobd - - @property - def dobm(self): - """Gets the dobm. - - The date of birth month. - - :return: dobm. - :rtype: str - """ - return self._dobm - - @dobm.setter - def dobm(self, dobm): - """Sets the dobm. - - The date of birth month. - - :param dobm. - :type: str - """ - - self._dobm = dobm - - @property - def doby(self): - """Gets the doby. - - The date of birth year. - - :return: doby. - :rtype: str - """ - return self._doby - - @doby.setter - def doby(self, doby): - """Sets the doby. - - The date of birth year. - - :param doby. - :type: str - """ - - self._doby = doby - - @property - def madid(self): - return self._madid - - @madid.setter - def madid(self, madid): - self._madid = madid - - @property - def anon_id(self): - return self._anon_id - - @anon_id.setter - 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), - 'db': self.__normalize_list('db', self.dates_of_birth), - 'ln': self.__normalize_list('ln', self.last_names), - 'fn': self.__normalize_list('fn', self.first_names), - 'ct': self.__normalize_list('ct', self.cities), - 'st': self.__normalize_list('st', self.states), - 'zp': self.__normalize_list('zp', self.zip_codes), - 'country': self.__normalize_list('country', self.country_codes), - 'external_id': self.__dedup_list(self.external_ids), - 'client_ip_address': self.client_ip_address, - 'client_user_agent': self.client_user_agent, - 'fbc': self.fbc, - 'fbp': self.fbp, - 'subscription_id': self.subscription_id, - 'fb_login_id': self.fb_login_id, - 'lead_id': self.lead_id, - 'f5first': Normalize.normalize_field('f5first', self.f5first), - 'f5last': Normalize.normalize_field('f5last', self.f5last), - 'fi': Normalize.normalize_field('fi', self.fi), - 'dobd': Normalize.normalize_field('dobd', self.dobd), - 'dobm': Normalize.normalize_field('dobm', self.dobm), - '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))) - - normalized_payload = {k: v for k, v in normalized_payload.items() if v is not None} - return normalized_payload - - def __normalize_list(self, field_name, value_list): - """Dedup, hash and normalize the given list. - - :type: field_name: str - :type value_list: list[str] - :rtype: dict - """ - if field_name is None or not value_list: - return None - normalized_list = list(map(lambda val: Normalize.normalize_field(field_name, val), value_list)) - return self.__dedup_list(normalized_list) - - def __dedup_list(self, value_list): - """Dedup the given list. - - :type value_list: list[str] - :rtype: dict - """ - if not value_list: - return None - return list(set(value_list)) - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.param_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UserData, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserData): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tap_facebook/facebook_business/adobjects/serverside/util.py b/tap_facebook/facebook_business/adobjects/serverside/util.py deleted file mode 100644 index ae78fc4..0000000 --- a/tap_facebook/facebook_business/adobjects/serverside/util.py +++ /dev/null @@ -1,49 +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. - -import hmac -import hashlib -import os -import sys - -class Util: - - @staticmethod - def async_requests_available(): - return sys.version_info >= (3, 5, 3) - - @staticmethod - def ca_bundle_path(): - return os.path.join( - os.path.dirname(__file__), - '..', - '..', - 'fb_ca_chain_bundle.crt', - ) - - @staticmethod - def appsecret_proof(appsecret, access_token): - hmac_object = hmac.new( - appsecret.encode('utf-8'), - msg=access_token.encode('utf-8'), - digestmod=hashlib.sha256 - ) - - return hmac_object.hexdigest() diff --git a/tap_facebook/facebook_business/adobjects/shadowighashtag.py b/tap_facebook/facebook_business/adobjects/shadowighashtag.py deleted file mode 100644 index 52be31d..0000000 --- a/tap_facebook/facebook_business/adobjects/shadowighashtag.py +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/shadowigmediabuilder.py b/tap_facebook/facebook_business/adobjects/shadowigmediabuilder.py deleted file mode 100644 index d620491..0000000 --- a/tap_facebook/facebook_business/adobjects/shadowigmediabuilder.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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' - - 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', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/shadowigmediacollaborators.py b/tap_facebook/facebook_business/adobjects/shadowigmediacollaborators.py deleted file mode 100644 index 8099781..0000000 --- a/tap_facebook/facebook_business/adobjects/shadowigmediacollaborators.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/shadowigmediaproducttags.py b/tap_facebook/facebook_business/adobjects/shadowigmediaproducttags.py deleted file mode 100644 index a73a19d..0000000 --- a/tap_facebook/facebook_business/adobjects/shadowigmediaproducttags.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class ShadowIGMediaProductTags( - AbstractObject, -): - - def __init__(self, api=None): - super(ShadowIGMediaProductTags, self).__init__() - self._isShadowIGMediaProductTags = True - self._api = api - - class Field(AbstractObject.Field): - image_url = 'image_url' - is_checkout = 'is_checkout' - merchant_id = 'merchant_id' - name = 'name' - price_string = 'price_string' - product_id = 'product_id' - review_status = 'review_status' - stripped_price_string = 'stripped_price_string' - stripped_sale_price_string = 'stripped_sale_price_string' - x = 'x' - y = 'y' - - _field_types = { - 'image_url': 'string', - 'is_checkout': 'bool', - 'merchant_id': 'int', - 'name': 'string', - 'price_string': 'string', - 'product_id': 'int', - 'review_status': 'string', - 'stripped_price_string': 'string', - 'stripped_sale_price_string': 'string', - 'x': 'float', - 'y': 'float', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductsearch.py b/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductsearch.py deleted file mode 100644 index 5aacd8f..0000000 --- a/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductsearch.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductvariant.py b/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductvariant.py deleted file mode 100644 index d65d778..0000000 --- a/tap_facebook/facebook_business/adobjects/shadowigusercatalogproductvariant.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/shop.py b/tap_facebook/facebook_business/adobjects/shop.py deleted file mode 100644 index b01e7fb..0000000 --- a/tap_facebook/facebook_business/adobjects/shop.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Shop( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isShop = True - 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): - from facebook_business.utils import api_utils - if batch 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=Shop, - 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 = { - 'commerce_merchant_settings': 'CommerceMerchantSettings', - 'fb_sales_channel': 'Object', - 'id': 'string', - 'ig_sales_channel': 'Object', - 'is_onsite_enabled': 'bool', - 'shop_status': 'string', - 'workspace': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/splittestwinner.py b/tap_facebook/facebook_business/adobjects/splittestwinner.py deleted file mode 100644 index 6bcb12d..0000000 --- a/tap_facebook/facebook_business/adobjects/splittestwinner.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class SplitTestWinner( - AbstractObject, -): - - def __init__(self, api=None): - super(SplitTestWinner, self).__init__() - self._isSplitTestWinner = True - self._api = api - - class Field(AbstractObject.Field): - ad_object_level = 'ad_object_level' - confidences = 'confidences' - winner_ad_object_id = 'winner_ad_object_id' - - _field_types = { - 'ad_object_level': 'string', - 'confidences': 'list>', - 'winner_ad_object_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/storecatalogsettings.py b/tap_facebook/facebook_business/adobjects/storecatalogsettings.py deleted file mode 100644 index bfdaa12..0000000 --- a/tap_facebook/facebook_business/adobjects/storecatalogsettings.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 StoreCatalogSettings( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isStoreCatalogSettings = True - super(StoreCatalogSettings, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - page = 'page' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'catalog_store' - - # @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_catalog_store(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 - if batch 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=StoreCatalogSettings, - 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/tap_facebook/facebook_business/adobjects/stories.py b/tap_facebook/facebook_business/adobjects/stories.py deleted file mode 100644 index d77d22a..0000000 --- a/tap_facebook/facebook_business/adobjects/stories.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/systemuser.py b/tap_facebook/facebook_business/adobjects/systemuser.py deleted file mode 100644 index 87a0a57..0000000 --- a/tap_facebook/facebook_business/adobjects/systemuser.py +++ /dev/null @@ -1,238 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 SystemUser( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isSystemUser = True - super(SystemUser, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - created_by = 'created_by' - created_time = 'created_time' - finance_permission = 'finance_permission' - id = 'id' - ip_permission = 'ip_permission' - name = 'name' - role = 'role' - system_user_id = 'system_user_id' - - class Role: - admin = 'ADMIN' - ads_rights_reviewer = 'ADS_RIGHTS_REVIEWER' - value_default = 'DEFAULT' - developer = 'DEVELOPER' - employee = 'EMPLOYEE' - finance_analyst = 'FINANCE_ANALYST' - finance_edit = 'FINANCE_EDIT' - finance_editor = 'FINANCE_EDITOR' - finance_view = 'FINANCE_VIEW' - manage = 'MANAGE' - partner_center_admin = 'PARTNER_CENTER_ADMIN' - partner_center_analyst = 'PARTNER_CENTER_ANALYST' - partner_center_education = 'PARTNER_CENTER_EDUCATION' - partner_center_marketing = 'PARTNER_CENTER_MARKETING' - partner_center_operations = 'PARTNER_CENTER_OPERATIONS' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'system_users' - - # @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_system_user(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=SystemUser, - 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_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='/assigned_ad_accounts', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.businessassetgroup import BusinessAssetGroup - param_types = { - 'contained_asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_business_asset_groups', - 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 get_assigned_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.') - from facebook_business.adobjects.page import Page - param_types = { - 'pages': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_pages', - 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_assigned_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_product_catalogs', - 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 = { - 'created_by': 'User', - 'created_time': 'datetime', - 'finance_permission': 'string', - 'id': 'string', - 'ip_permission': 'string', - 'name': 'string', - 'role': 'Role', - 'system_user_id': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Role'] = SystemUser.Role.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/tab.py b/tap_facebook/facebook_business/adobjects/tab.py deleted file mode 100644 index e65cc37..0000000 --- a/tap_facebook/facebook_business/adobjects/tab.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Tab( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isTab = True - super(Tab, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - application = 'application' - custom_image_url = 'custom_image_url' - custom_name = 'custom_name' - id = 'id' - image_url = 'image_url' - is_non_connection_landing_tab = 'is_non_connection_landing_tab' - is_permanent = 'is_permanent' - link = 'link' - name = 'name' - position = 'position' - - _field_types = { - 'application': 'Application', - 'custom_image_url': 'string', - 'custom_name': 'string', - 'id': 'string', - 'image_url': 'string', - 'is_non_connection_landing_tab': 'bool', - 'is_permanent': 'bool', - 'link': 'string', - 'name': 'string', - 'position': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targeting.py b/tap_facebook/facebook_business/adobjects/targeting.py deleted file mode 100644 index eba803e..0000000 --- a/tap_facebook/facebook_business/adobjects/targeting.py +++ /dev/null @@ -1,229 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class Targeting( - AbstractObject, -): - - def __init__(self, api=None): - super(Targeting, self).__init__() - self._isTargeting = True - self._api = api - - 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' - behaviors = 'behaviors' - brand_safety_content_filter_levels = 'brand_safety_content_filter_levels' - catalog_based_targeting = 'catalog_based_targeting' - cities = 'cities' - college_years = 'college_years' - connections = 'connections' - contextual_targeting_categories = 'contextual_targeting_categories' - countries = 'countries' - country = 'country' - country_groups = 'country_groups' - custom_audiences = 'custom_audiences' - device_platforms = 'device_platforms' - direct_install_devices = 'direct_install_devices' - dynamic_audience_ids = 'dynamic_audience_ids' - education_majors = 'education_majors' - education_schools = 'education_schools' - education_statuses = 'education_statuses' - effective_audience_network_positions = 'effective_audience_network_positions' - effective_device_platforms = 'effective_device_platforms' - effective_facebook_positions = 'effective_facebook_positions' - effective_instagram_positions = 'effective_instagram_positions' - effective_messenger_positions = 'effective_messenger_positions' - effective_publisher_platforms = 'effective_publisher_platforms' - engagement_specs = 'engagement_specs' - ethnic_affinity = 'ethnic_affinity' - exclude_reached_since = 'exclude_reached_since' - excluded_brand_safety_content_types = 'excluded_brand_safety_content_types' - excluded_connections = 'excluded_connections' - excluded_custom_audiences = 'excluded_custom_audiences' - excluded_dynamic_audience_ids = 'excluded_dynamic_audience_ids' - excluded_engagement_specs = 'excluded_engagement_specs' - excluded_geo_locations = 'excluded_geo_locations' - excluded_mobile_device_model = 'excluded_mobile_device_model' - excluded_product_audience_specs = 'excluded_product_audience_specs' - excluded_publisher_categories = 'excluded_publisher_categories' - excluded_publisher_list_ids = 'excluded_publisher_list_ids' - excluded_user_device = 'excluded_user_device' - exclusions = 'exclusions' - facebook_positions = 'facebook_positions' - family_statuses = 'family_statuses' - fb_deal_id = 'fb_deal_id' - flexible_spec = 'flexible_spec' - friends_of_connections = 'friends_of_connections' - genders = 'genders' - generation = 'generation' - geo_locations = 'geo_locations' - home_ownership = 'home_ownership' - home_type = 'home_type' - home_value = 'home_value' - household_composition = 'household_composition' - income = 'income' - industries = 'industries' - instagram_positions = 'instagram_positions' - instream_video_skippable_excluded = 'instream_video_skippable_excluded' - interested_in = 'interested_in' - interests = 'interests' - is_whatsapp_destination_ad = 'is_whatsapp_destination_ad' - keywords = 'keywords' - life_events = 'life_events' - locales = 'locales' - messenger_positions = 'messenger_positions' - moms = 'moms' - net_worth = 'net_worth' - office_type = 'office_type' - place_page_set_ids = 'place_page_set_ids' - political_views = 'political_views' - politics = 'politics' - product_audience_specs = 'product_audience_specs' - prospecting_audience = 'prospecting_audience' - publisher_platforms = 'publisher_platforms' - radius = 'radius' - 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' - user_device = 'user_device' - user_event = 'user_event' - user_os = 'user_os' - wireless_carrier = 'wireless_carrier' - work_employers = 'work_employers' - work_positions = 'work_positions' - zips = 'zips' - - class DevicePlatforms: - desktop = 'desktop' - mobile = 'mobile' - - class EffectiveDevicePlatforms: - desktop = 'desktop' - mobile = 'mobile' - - _field_types = { - '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', - 'behaviors': 'list', - 'brand_safety_content_filter_levels': 'list', - 'catalog_based_targeting': 'CatalogBasedTargeting', - 'cities': 'list', - 'college_years': 'list', - 'connections': 'list', - 'contextual_targeting_categories': 'list', - 'countries': 'list', - 'country': 'list', - 'country_groups': 'list', - 'custom_audiences': 'list', - 'device_platforms': 'list', - 'direct_install_devices': 'bool', - 'dynamic_audience_ids': 'list', - 'education_majors': 'list', - 'education_schools': 'list', - 'education_statuses': 'list', - 'effective_audience_network_positions': 'list', - 'effective_device_platforms': 'list', - 'effective_facebook_positions': 'list', - 'effective_instagram_positions': 'list', - 'effective_messenger_positions': 'list', - 'effective_publisher_platforms': 'list', - 'engagement_specs': 'list', - 'ethnic_affinity': 'list', - 'exclude_reached_since': 'list', - 'excluded_brand_safety_content_types': 'list', - 'excluded_connections': 'list', - 'excluded_custom_audiences': 'list', - 'excluded_dynamic_audience_ids': 'list', - 'excluded_engagement_specs': 'list', - 'excluded_geo_locations': 'TargetingGeoLocation', - 'excluded_mobile_device_model': 'list', - 'excluded_product_audience_specs': 'list', - 'excluded_publisher_categories': 'list', - 'excluded_publisher_list_ids': 'list', - 'excluded_user_device': 'list', - 'exclusions': 'FlexibleTargeting', - 'facebook_positions': 'list', - 'family_statuses': 'list', - 'fb_deal_id': 'string', - 'flexible_spec': 'list', - 'friends_of_connections': 'list', - 'genders': 'list', - 'generation': 'list', - 'geo_locations': 'TargetingGeoLocation', - 'home_ownership': 'list', - 'home_type': 'list', - 'home_value': 'list', - 'household_composition': 'list', - 'income': 'list', - 'industries': 'list', - 'instagram_positions': 'list', - 'instream_video_skippable_excluded': 'bool', - 'interested_in': 'list', - 'interests': 'list', - 'is_whatsapp_destination_ad': 'bool', - 'keywords': 'list', - 'life_events': 'list', - 'locales': 'list', - 'messenger_positions': 'list', - 'moms': 'list', - 'net_worth': 'list', - 'office_type': 'list', - 'place_page_set_ids': 'list', - 'political_views': 'list', - 'politics': 'list', - 'product_audience_specs': 'list', - 'prospecting_audience': 'TargetingProspectingAudience', - 'publisher_platforms': 'list', - 'radius': 'string', - 'regions': 'list', - 'relationship_statuses': 'list', - 'site_category': 'list', - 'targeting_automation': 'TargetingAutomation', - 'targeting_optimization': 'string', - 'targeting_relaxation_types': 'TargetingRelaxation', - 'user_adclusters': 'list', - 'user_device': 'list', - 'user_event': 'list', - 'user_os': 'list', - 'wireless_carrier': 'list', - 'work_employers': 'list', - 'work_positions': 'list', - 'zips': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['DevicePlatforms'] = Targeting.DevicePlatforms.__dict__.values() - field_enum_info['EffectiveDevicePlatforms'] = Targeting.EffectiveDevicePlatforms.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetingautomation.py b/tap_facebook/facebook_business/adobjects/targetingautomation.py deleted file mode 100644 index fea25b5..0000000 --- a/tap_facebook/facebook_business/adobjects/targetingautomation.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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' - shared_audiences = 'shared_audiences' - value_expression = 'value_expression' - - _field_types = { - 'advantage_audience': 'unsigned int', - '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/tap_facebook/facebook_business/adobjects/targetingdynamicrule.py b/tap_facebook/facebook_business/adobjects/targetingdynamicrule.py deleted file mode 100644 index 354900b..0000000 --- a/tap_facebook/facebook_business/adobjects/targetingdynamicrule.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingDynamicRule( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingDynamicRule, self).__init__() - self._isTargetingDynamicRule = True - self._api = api - - class Field(AbstractObject.Field): - field_action_type = 'action.type' - ad_group_id = 'ad_group_id' - campaign_group_id = 'campaign_group_id' - campaign_id = 'campaign_id' - impression_count = 'impression_count' - page_id = 'page_id' - post = 'post' - retention_seconds = 'retention_seconds' - - _field_types = { - 'action.type': 'string', - 'ad_group_id': 'string', - 'campaign_group_id': 'string', - 'campaign_id': 'string', - 'impression_count': 'string', - 'page_id': 'string', - 'post': 'string', - 'retention_seconds': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocation.py b/tap_facebook/facebook_business/adobjects/targetinggeolocation.py deleted file mode 100644 index e69a266..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocation.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocation( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocation, self).__init__() - self._isTargetingGeoLocation = True - self._api = api - - class Field(AbstractObject.Field): - cities = 'cities' - countries = 'countries' - country_groups = 'country_groups' - custom_locations = 'custom_locations' - electoral_districts = 'electoral_districts' - 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' - neighborhoods = 'neighborhoods' - places = 'places' - political_districts = 'political_districts' - regions = 'regions' - small_geo_areas = 'small_geo_areas' - subcities = 'subcities' - subneighborhoods = 'subneighborhoods' - zips = 'zips' - - _field_types = { - 'cities': 'list', - 'countries': 'list', - 'country_groups': 'list', - 'custom_locations': 'list', - 'electoral_districts': 'list', - 'geo_markets': 'list', - 'large_geo_areas': 'list', - 'location_cluster_ids': 'list', - 'location_expansion': 'TargetingGeoLocationLocationExpansion', - 'location_types': 'list', - 'medium_geo_areas': 'list', - 'metro_areas': 'list', - 'neighborhoods': 'list', - 'places': 'list', - 'political_districts': 'list', - 'regions': 'list', - 'small_geo_areas': 'list', - 'subcities': 'list', - 'subneighborhoods': 'list', - 'zips': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationcity.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationcity.py deleted file mode 100644 index 48fdb36..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationcity.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationCity( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationCity, self).__init__() - self._isTargetingGeoLocationCity = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - distance_unit = 'distance_unit' - key = 'key' - name = 'name' - radius = 'radius' - region = 'region' - region_id = 'region_id' - - _field_types = { - 'country': 'string', - 'distance_unit': 'string', - 'key': 'string', - 'name': 'string', - 'radius': 'unsigned int', - 'region': 'string', - 'region_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationcustomlocation.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationcustomlocation.py deleted file mode 100644 index d9e51ee..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationcustomlocation.py +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationCustomLocation( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationCustomLocation, self).__init__() - self._isTargetingGeoLocationCustomLocation = True - self._api = api - - class Field(AbstractObject.Field): - address_string = 'address_string' - country = 'country' - country_group = 'country_group' - custom_type = 'custom_type' - distance_unit = 'distance_unit' - key = 'key' - latitude = 'latitude' - longitude = 'longitude' - max_population = 'max_population' - min_population = 'min_population' - name = 'name' - primary_city_id = 'primary_city_id' - radius = 'radius' - region_id = 'region_id' - - _field_types = { - 'address_string': 'string', - 'country': 'string', - 'country_group': 'string', - 'custom_type': 'string', - 'distance_unit': 'string', - 'key': 'string', - 'latitude': 'float', - 'longitude': 'float', - 'max_population': 'int', - 'min_population': 'int', - 'name': 'string', - 'primary_city_id': 'int', - 'radius': 'float', - 'region_id': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py deleted file mode 100644 index f3d2e2f..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationElectoralDistrict( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationElectoralDistrict, self).__init__() - self._isTargetingGeoLocationElectoralDistrict = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - deprecation_code = 'deprecation_code' - electoral_district = 'electoral_district' - key = 'key' - name = 'name' - - _field_types = { - 'country': 'string', - 'deprecation_code': 'string', - 'electoral_district': 'string', - 'key': 'string', - 'name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationgeoentities.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationgeoentities.py deleted file mode 100644 index 5776e21..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationgeoentities.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationGeoEntities( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationGeoEntities, self).__init__() - self._isTargetingGeoLocationGeoEntities = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - key = 'key' - name = 'name' - region = 'region' - region_id = 'region_id' - - _field_types = { - 'country': 'string', - 'key': 'string', - 'name': 'string', - 'region': 'string', - 'region_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationcluster.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationcluster.py deleted file mode 100644 index 7ca227a..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationcluster.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationLocationCluster( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationLocationCluster, self).__init__() - self._isTargetingGeoLocationLocationCluster = True - self._api = api - - class Field(AbstractObject.Field): - key = 'key' - - _field_types = { - 'key': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationexpansion.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationexpansion.py deleted file mode 100644 index 045a660..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationlocationexpansion.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationLocationExpansion( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationLocationExpansion, self).__init__() - self._isTargetingGeoLocationLocationExpansion = True - self._api = api - - class Field(AbstractObject.Field): - allowed = 'allowed' - - _field_types = { - 'allowed': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationmarket.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationmarket.py deleted file mode 100644 index 3446ab0..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationmarket.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationMarket( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationMarket, self).__init__() - self._isTargetingGeoLocationMarket = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - key = 'key' - market_type = 'market_type' - name = 'name' - - _field_types = { - 'country': 'string', - 'key': 'string', - 'market_type': 'string', - 'name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationplace.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationplace.py deleted file mode 100644 index 67f0892..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationplace.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationPlace( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationPlace, self).__init__() - self._isTargetingGeoLocationPlace = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - distance_unit = 'distance_unit' - key = 'key' - latitude = 'latitude' - longitude = 'longitude' - name = 'name' - primary_city_id = 'primary_city_id' - radius = 'radius' - region_id = 'region_id' - - _field_types = { - 'country': 'string', - 'distance_unit': 'string', - 'key': 'string', - 'latitude': 'float', - 'longitude': 'float', - 'name': 'string', - 'primary_city_id': 'int', - 'radius': 'float', - 'region_id': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py deleted file mode 100644 index b95c671..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationPoliticalDistrict( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationPoliticalDistrict, self).__init__() - self._isTargetingGeoLocationPoliticalDistrict = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - key = 'key' - name = 'name' - political_district = 'political_district' - - _field_types = { - 'country': 'string', - 'key': 'string', - 'name': 'string', - 'political_district': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationregion.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationregion.py deleted file mode 100644 index 8471a19..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationregion.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationRegion( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationRegion, self).__init__() - self._isTargetingGeoLocationRegion = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - key = 'key' - name = 'name' - - _field_types = { - 'country': 'string', - 'key': 'string', - 'name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetinggeolocationzip.py b/tap_facebook/facebook_business/adobjects/targetinggeolocationzip.py deleted file mode 100644 index d0d10d5..0000000 --- a/tap_facebook/facebook_business/adobjects/targetinggeolocationzip.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingGeoLocationZip( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingGeoLocationZip, self).__init__() - self._isTargetingGeoLocationZip = True - self._api = api - - class Field(AbstractObject.Field): - country = 'country' - key = 'key' - name = 'name' - primary_city_id = 'primary_city_id' - region_id = 'region_id' - - _field_types = { - 'country': 'string', - 'key': 'string', - 'name': 'string', - 'primary_city_id': 'int', - 'region_id': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetingproductaudiencespec.py b/tap_facebook/facebook_business/adobjects/targetingproductaudiencespec.py deleted file mode 100644 index a4c2067..0000000 --- a/tap_facebook/facebook_business/adobjects/targetingproductaudiencespec.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingProductAudienceSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingProductAudienceSpec, self).__init__() - self._isTargetingProductAudienceSpec = True - self._api = api - - class Field(AbstractObject.Field): - exclusions = 'exclusions' - inclusions = 'inclusions' - product_set_id = 'product_set_id' - - _field_types = { - 'exclusions': 'list', - 'inclusions': 'list', - 'product_set_id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetingproductaudiencesubspec.py b/tap_facebook/facebook_business/adobjects/targetingproductaudiencesubspec.py deleted file mode 100644 index 3bd43ef..0000000 --- a/tap_facebook/facebook_business/adobjects/targetingproductaudiencesubspec.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingProductAudienceSubSpec( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingProductAudienceSubSpec, self).__init__() - self._isTargetingProductAudienceSubSpec = True - self._api = api - - class Field(AbstractObject.Field): - retention_seconds = 'retention_seconds' - rule = 'rule' - - _field_types = { - 'retention_seconds': 'string', - 'rule': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetingprospectingaudience.py b/tap_facebook/facebook_business/adobjects/targetingprospectingaudience.py deleted file mode 100644 index 1a2a9cf..0000000 --- a/tap_facebook/facebook_business/adobjects/targetingprospectingaudience.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingProspectingAudience( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingProspectingAudience, self).__init__() - self._isTargetingProspectingAudience = True - self._api = api - - class Field(AbstractObject.Field): - sources = 'sources' - - _field_types = { - 'sources': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetingrelaxation.py b/tap_facebook/facebook_business/adobjects/targetingrelaxation.py deleted file mode 100644 index 2c11114..0000000 --- a/tap_facebook/facebook_business/adobjects/targetingrelaxation.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TargetingRelaxation( - AbstractObject, -): - - def __init__(self, api=None): - super(TargetingRelaxation, self).__init__() - self._isTargetingRelaxation = True - self._api = api - - class Field(AbstractObject.Field): - custom_audience = 'custom_audience' - lookalike = 'lookalike' - - _field_types = { - 'custom_audience': 'unsigned int', - 'lookalike': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/targetingsearch.py b/tap_facebook/facebook_business/adobjects/targetingsearch.py deleted file mode 100644 index 87c4e48..0000000 --- a/tap_facebook/facebook_business/adobjects/targetingsearch.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the 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 -from facebook_business.exceptions import FacebookBadObjectError -from facebook_business.session import FacebookSession - -class TargetingSearch(AbstractObject): - - class DemographicSearchClasses(object): - demographics = 'demographics' - ethnic_affinity = 'ethnic_affinity' - family_statuses = 'family_statuses' - generation = 'generation' - home_ownership = 'home_ownership' - home_type = 'home_type' - home_value = 'home_value' - household_composition = 'household_composition' - income = 'income' - industries = 'industries' - life_events = 'life_events' - markets = 'markets' - moms = 'moms' - net_worth = 'net_worth' - office_type = 'office_type' - politics = 'politics' - - class TargetingSearchTypes(object): - country = 'adcountry' - education = 'adeducationschool' - employer = 'adworkemployer' - geolocation = 'adgeolocation' - geometadata = 'adgeolocationmeta' - interest = 'adinterest' - interest_suggestion = 'adinterestsuggestion' - interest_validate = 'adinterestvalid' - keyword = 'adkeyword' - locale = 'adlocale' - major = 'adeducationmajor' - position = 'adworkposition' - radius_suggestion = 'adradiussuggestion' - targeting_category = 'adtargetingcategory' - zipcode = 'adzipcode' - - @classmethod - def search(cls, params=None, api=None): - api = api or FacebookAdsApi.get_default_api() - if not api: - raise FacebookBadObjectError( - "An Api instance must be provided as an argument or set as " - "the default Api in FacebookAdsApi.", - ) - - params = {} if not params else params.copy() - response = api.call( - FacebookAdsApi.HTTP_METHOD_GET, - "/".join(( - FacebookSession.GRAPH, - FacebookAdsApi.API_VERSION, - 'search' - )), - params, - ).json() - - ret_val = [] - if response: - keys = response['data'] - # The response object can be either a dictionary of dictionaries - # or a dictionary of lists. - if isinstance(keys, list): - for item in keys: - search_obj = TargetingSearch() - search_obj.update(item) - ret_val.append(search_obj) - elif isinstance(keys, dict): - for item in keys: - search_obj = TargetingSearch() - search_obj.update(keys[item]) - if keys[item]: - ret_val.append(search_obj) - return ret_val diff --git a/tap_facebook/facebook_business/adobjects/targetingsentenceline.py b/tap_facebook/facebook_business/adobjects/targetingsentenceline.py deleted file mode 100644 index 47becaf..0000000 --- a/tap_facebook/facebook_business/adobjects/targetingsentenceline.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 TargetingSentenceLine( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isTargetingSentenceLine = True - super(TargetingSentenceLine, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - params = 'params' - targetingsentencelines = 'targetingsentencelines' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'targetingsentencelines' - - _field_types = { - 'id': 'string', - 'params': 'Targeting', - 'targetingsentencelines': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/textwithentities.py b/tap_facebook/facebook_business/adobjects/textwithentities.py deleted file mode 100644 index cad92c0..0000000 --- a/tap_facebook/facebook_business/adobjects/textwithentities.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TextWithEntities( - AbstractObject, -): - - def __init__(self, api=None): - super(TextWithEntities, self).__init__() - self._isTextWithEntities = True - self._api = api - - class Field(AbstractObject.Field): - text = 'text' - - _field_types = { - 'text': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/trackingandconversionwithdefaults.py b/tap_facebook/facebook_business/adobjects/trackingandconversionwithdefaults.py deleted file mode 100644 index 3ef66a4..0000000 --- a/tap_facebook/facebook_business/adobjects/trackingandconversionwithdefaults.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class TrackingAndConversionWithDefaults( - AbstractObject, -): - - def __init__(self, api=None): - super(TrackingAndConversionWithDefaults, self).__init__() - self._isTrackingAndConversionWithDefaults = True - self._api = api - - class Field(AbstractObject.Field): - custom_conversion = 'custom_conversion' - custom_tracking = 'custom_tracking' - default_conversion = 'default_conversion' - default_tracking = 'default_tracking' - - _field_types = { - 'custom_conversion': 'list', - 'custom_tracking': 'list', - 'default_conversion': 'list', - 'default_tracking': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/unifiedthread.py b/tap_facebook/facebook_business/adobjects/unifiedthread.py deleted file mode 100644 index 72a0dbc..0000000 --- a/tap_facebook/facebook_business/adobjects/unifiedthread.py +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 UnifiedThread( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isUnifiedThread = True - super(UnifiedThread, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - can_reply = 'can_reply' - folder = 'folder' - former_participants = 'former_participants' - id = 'id' - is_subscribed = 'is_subscribed' - link = 'link' - linked_group = 'linked_group' - message_count = 'message_count' - name = 'name' - participants = 'participants' - scoped_thread_key = 'scoped_thread_key' - senders = 'senders' - snippet = 'snippet' - subject = 'subject' - unread_count = 'unread_count' - updated_time = 'updated_time' - wallpaper = 'wallpaper' - - class Platform: - instagram = 'INSTAGRAM' - messenger = 'MESSENGER' - - 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=UnifiedThread, - 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_messages(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'source': 'source_enum', - } - enums = { - 'source_enum': [ - 'ALL', - 'PARTICIPANTS', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/messages', - 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 = { - 'can_reply': 'bool', - 'folder': 'string', - 'former_participants': 'Object', - 'id': 'string', - 'is_subscribed': 'bool', - 'link': 'string', - 'linked_group': 'Group', - 'message_count': 'int', - 'name': 'string', - 'participants': 'Object', - 'scoped_thread_key': 'string', - 'senders': 'Object', - 'snippet': 'string', - 'subject': 'string', - 'unread_count': 'int', - 'updated_time': 'datetime', - 'wallpaper': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Platform'] = UnifiedThread.Platform.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/url.py b/tap_facebook/facebook_business/adobjects/url.py deleted file mode 100644 index 590e5c0..0000000 --- a/tap_facebook/facebook_business/adobjects/url.py +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 URL( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isURL = True - super(URL, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - engagement = 'engagement' - id = 'id' - og_object = 'og_object' - ownership_permissions = 'ownership_permissions' - scopes = 'scopes' - - class Scopes: - news_tab = 'NEWS_TAB' - news_tab_dev_env = 'NEWS_TAB_DEV_ENV' - - 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=URL, - 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 = { - 'blacklist': 'bool', - 'denylist': 'bool', - 'hmac': 'string', - 'locale': 'list', - 'scopes': 'list', - 'ts': 'datetime', - } - enums = { - 'scopes_enum': URL.Scopes.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=URL, - 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 = { - 'engagement': 'Object', - 'id': 'string', - 'og_object': 'Object', - 'ownership_permissions': 'Object', - 'scopes': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Scopes'] = URL.Scopes.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/user.py b/tap_facebook/facebook_business/adobjects/user.py deleted file mode 100644 index 7fe2939..0000000 --- a/tap_facebook/facebook_business/adobjects/user.py +++ /dev/null @@ -1,2237 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 User( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isUser = True - super(User, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - about = 'about' - age_range = 'age_range' - avatar_2d_profile_picture = 'avatar_2d_profile_picture' - birthday = 'birthday' - community = 'community' - cover = 'cover' - currency = 'currency' - education = 'education' - email = 'email' - favorite_athletes = 'favorite_athletes' - favorite_teams = 'favorite_teams' - first_name = 'first_name' - gender = 'gender' - hometown = 'hometown' - id = 'id' - id_for_avatars = 'id_for_avatars' - inspirational_people = 'inspirational_people' - 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' - local_news_megaphone_dismiss_status = 'local_news_megaphone_dismiss_status' - local_news_subscription_status = 'local_news_subscription_status' - locale = 'locale' - location = 'location' - meeting_for = 'meeting_for' - middle_name = 'middle_name' - name = 'name' - name_format = 'name_format' - payment_pricepoints = 'payment_pricepoints' - political = 'political' - profile_pic = 'profile_pic' - quotes = 'quotes' - relationship_status = 'relationship_status' - shared_login_upgrade_required_by = 'shared_login_upgrade_required_by' - short_name = 'short_name' - significant_other = 'significant_other' - sports = 'sports' - supports_donate_button_in_live_video = 'supports_donate_button_in_live_video' - third_party_id = 'third_party_id' - timezone = 'timezone' - token_for_business = 'token_for_business' - updated_time = 'updated_time' - verified = 'verified' - video_upload_limits = 'video_upload_limits' - website = 'website' - - class LocalNewsMegaphoneDismissStatus: - no = 'NO' - yes = 'YES' - - class LocalNewsSubscriptionStatus: - status_off = 'STATUS_OFF' - status_on = 'STATUS_ON' - - class Filtering: - ema = 'ema' - groups = 'groups' - groups_social = 'groups_social' - - class Type: - content_update = 'content_update' - generic = 'generic' - - 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=User, - 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 = { - 'emoji_color_pref': 'unsigned int', - 'firstname': 'string', - 'lastname': 'string', - 'local_news_megaphone_dismiss_status': 'local_news_megaphone_dismiss_status_enum', - 'local_news_subscription_status': 'local_news_subscription_status_enum', - 'name': 'string', - 'password': 'string', - } - enums = { - 'local_news_megaphone_dismiss_status_enum': User.LocalNewsMegaphoneDismissStatus.__dict__.values(), - 'local_news_subscription_status_enum': User.LocalNewsSubscriptionStatus.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=User, - 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_access_tokens(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/access_tokens', - 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_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 = { - 'business_app': 'int', - 'page_id': 'string', - 'scope': 'list', - 'set_token_expires_in_60_days': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/access_tokens', - 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() - - def get_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.page import Page - param_types = { - 'is_place': 'bool', - 'is_promotable': 'bool', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/accounts', - 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 create_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 = { - 'about': 'string', - 'address': 'string', - 'category': 'int', - 'category_enum': 'string', - 'category_list': 'list', - 'city_id': 'string', - 'coordinates': 'Object', - 'cover_photo': 'Object', - 'description': 'string', - 'ignore_coordinate_warnings': 'bool', - 'location': 'Object', - 'name': 'string', - 'phone': 'string', - 'picture': 'string', - 'website': 'string', - 'zip': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/accounts', - 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_ad_studies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudy import AdStudy - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ad_studies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_ad_study(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.adstudy import AdStudy - param_types = { - 'cells': 'list', - 'client_business': 'string', - 'confidence_level': 'float', - 'cooldown_start_time': 'int', - 'description': 'string', - 'end_time': 'int', - 'name': 'string', - 'objectives': 'list', - 'observation_end_time': 'int', - 'start_time': 'int', - 'type': 'type_enum', - 'viewers': 'list', - } - enums = { - 'type_enum': AdStudy.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/ad_studies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AdStudy, - api_type='EDGE', - response_parser=ObjectParser(target_class=AdStudy, 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_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() - - def get_albums(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.album import Album - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/albums', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Album, - api_type='EDGE', - response_parser=ObjectParser(target_class=Album, 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_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.') - param_types = { - 'business_app': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/applications', - 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() - - def get_app_request_former_recipients(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.apprequestformerrecipient import AppRequestFormerRecipient - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/apprequestformerrecipients', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AppRequestFormerRecipient, - api_type='EDGE', - response_parser=ObjectParser(target_class=AppRequestFormerRecipient, 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_app_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.apprequest import AppRequest - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/apprequests', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AppRequest, - api_type='EDGE', - response_parser=ObjectParser(target_class=AppRequest, 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_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='/assigned_ad_accounts', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.businessassetgroup import BusinessAssetGroup - param_types = { - 'contained_asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_business_asset_groups', - 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 get_assigned_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.') - from facebook_business.adobjects.page import Page - param_types = { - 'pages': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_pages', - 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_assigned_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/assigned_product_catalogs', - 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() - - def get_avatars(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/avatars', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Avatar, - api_type='EDGE', - response_parser=ObjectParser(target_class=Avatar, 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_business_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.businessuser import BusinessUser - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/business_users', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessUser, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessUser, 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_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.') - param_types = { - 'business': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/businesses', - 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_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.') - from facebook_business.adobjects.business import Business - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/businesses', - 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_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.') - from facebook_business.adobjects.business import Business - param_types = { - 'child_business_external_id': 'string', - 'email': 'string', - 'name': 'string', - 'primary_page': 'string', - 'sales_rep_email': 'string', - 'survey_business_type': 'survey_business_type_enum', - 'survey_num_assets': 'unsigned int', - 'survey_num_people': 'unsigned int', - 'timezone_id': 'unsigned int', - 'vertical': 'vertical_enum', - } - enums = { - 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), - 'vertical_enum': Business.Vertical.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/businesses', - 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_conversations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.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'], - method='GET', - endpoint='/conversations', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=UnifiedThread, - api_type='EDGE', - response_parser=ObjectParser(target_class=UnifiedThread, 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_custom_labels(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.pageusermessagethreadlabel import PageUserMessageThreadLabel - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/custom_labels', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageUserMessageThreadLabel, - api_type='EDGE', - response_parser=ObjectParser(target_class=PageUserMessageThreadLabel, 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): - 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', - } - enums = { - 'type_enum': Event.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/events', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Event, - api_type='EDGE', - response_parser=ObjectParser(target_class=Event, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.post import Post - param_types = { - 'include_hidden': 'bool', - 'q': 'string', - 'show_expired': 'bool', - 'since': 'datetime', - 'until': 'datetime', - 'with': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/feed', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - api_type='EDGE', - response_parser=ObjectParser(target_class=Post, 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_feed(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.post import Post - param_types = { - 'actions': 'Object', - 'adaptive_type': 'string', - 'album_id': 'string', - 'android_key_hash': 'string', - 'animated_effect_id': 'unsigned int', - 'application_id': 'string', - 'asked_fun_fact_prompt_id': 'unsigned int', - 'asset3d_id': 'unsigned int', - 'associated_id': 'string', - 'attach_place_suggestion': 'bool', - 'attached_media': 'list', - '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', - 'child_attachments': 'list', - 'client_mutation_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', - 'connection_class': 'string', - 'content_attachment': 'string', - 'coordinates': 'Object', - 'cta_link': 'string', - 'cta_type': 'string', - 'description': 'string', - 'direct_share_status': 'unsigned int', - 'expanded_height': 'unsigned int', - 'expanded_width': 'unsigned int', - 'feed_targeting': 'Object', - 'formatting': 'formatting_enum', - 'fun_fact_prompt_id': 'unsigned int', - 'fun_fact_toastee_id': 'unsigned int', - 'height': 'unsigned int', - 'holiday_card': 'string', - 'home_checkin_city_id': 'Object', - 'image_crops': 'map', - 'implicit_with_tags': 'list', - 'instant_game_entry_point_data': 'string', - 'ios_bundle_id': 'string', - 'is_backout_draft': 'bool', - 'is_boost_intended': 'bool', - 'is_explicit_location': 'bool', - 'is_explicit_share': 'bool', - 'is_group_linking_post': 'bool', - 'is_photo_container': 'bool', - 'link': 'string', - 'location_source_id': 'string', - 'manual_privacy': 'bool', - 'message': 'string', - 'multi_share_end_card': 'bool', - 'multi_share_optimized': 'bool', - 'name': 'string', - 'nectar_module': 'string', - 'object_attachment': 'string', - 'offer_like_post_id': 'unsigned int', - 'og_action_type_id': 'string', - 'og_hide_object_attachment': 'bool', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'page_recommendation': 'string', - 'picture': 'string', - 'place': 'Object', - 'place_attachment_setting': 'place_attachment_setting_enum', - 'place_list': 'string', - 'place_list_data': 'list', - 'post_surfaces_blacklist': 'list', - 'posting_to_redspace': 'posting_to_redspace_enum', - 'privacy': 'string', - 'prompt_id': 'string', - 'prompt_tracking_string': 'string', - 'properties': 'Object', - 'proxied_app_id': 'string', - 'publish_event_id': 'unsigned int', - 'published': 'bool', - 'quote': 'string', - 'react_mode_metadata': 'string', - 'ref': 'list', - 'referenceable_image_ids': 'list', - 'referral_id': 'string', - 'scheduled_publish_time': 'datetime', - 'source': 'string', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'suggested_place_id': 'Object', - 'tags': 'list', - 'target_surface': 'target_surface_enum', - 'targeting': 'Object', - 'text_format_metadata': 'string', - 'text_format_preset_id': 'string', - 'text_only_place': 'string', - 'throwback_camera_roll_media': 'string', - 'thumbnail': 'file', - 'time_since_original_post': 'unsigned int', - 'title': 'string', - 'tracking_info': 'string', - 'unpublished_content_type': 'unpublished_content_type_enum', - 'user_selected_tags': 'bool', - 'video_start_time_ms': 'unsigned int', - 'viewer_coordinates': 'Object', - 'width': 'unsigned int', - } - enums = { - 'backdated_time_granularity_enum': Post.BackdatedTimeGranularity.__dict__.values(), - 'formatting_enum': Post.Formatting.__dict__.values(), - 'place_attachment_setting_enum': Post.PlaceAttachmentSetting.__dict__.values(), - 'post_surfaces_blacklist_enum': Post.PostSurfacesBlacklist.__dict__.values(), - 'posting_to_redspace_enum': Post.PostingToRedspace.__dict__.values(), - 'target_surface_enum': Post.TargetSurface.__dict__.values(), - 'unpublished_content_type_enum': Post.UnpublishedContentType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/feed', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - api_type='EDGE', - response_parser=ObjectParser(target_class=Post, 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_friends(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'uid': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/friends', - 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() - - def get_fundraisers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.fundraiserpersontocharity import FundraiserPersonToCharity - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/fundraisers', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=FundraiserPersonToCharity, - api_type='EDGE', - response_parser=ObjectParser(target_class=FundraiserPersonToCharity, 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_fundraiser(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.fundraiserpersontocharity import FundraiserPersonToCharity - param_types = { - 'charity_id': 'string', - 'cover_photo': 'file', - 'currency': 'string', - 'description': 'string', - 'end_time': 'int', - 'external_event_name': 'string', - 'external_event_start_time': 'int', - 'external_event_uri': 'string', - 'external_fundraiser_uri': 'string', - 'external_id': 'string', - 'fundraiser_type': 'fundraiser_type_enum', - 'goal_amount': 'int', - 'name': 'string', - 'page_id': 'string', - } - enums = { - 'fundraiser_type_enum': FundraiserPersonToCharity.FundraiserType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/fundraisers', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=FundraiserPersonToCharity, - api_type='EDGE', - response_parser=ObjectParser(target_class=FundraiserPersonToCharity, 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.group import Group - param_types = { - 'admin_only': 'bool', - 'parent': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/groups', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Group, - api_type='EDGE', - response_parser=ObjectParser(target_class=Group, 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_ids_for_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.') - from facebook_business.adobjects.useridforapp import UserIDForApp - param_types = { - 'app': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ids_for_apps', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=UserIDForApp, - api_type='EDGE', - response_parser=ObjectParser(target_class=UserIDForApp, 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_ids_for_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.') - from facebook_business.adobjects.useridforapp import UserIDForApp - param_types = { - 'app': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ids_for_business', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=UserIDForApp, - api_type='EDGE', - response_parser=ObjectParser(target_class=UserIDForApp, 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_ids_for_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.') - from facebook_business.adobjects.useridforpage import UserIDForPage - param_types = { - 'page': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ids_for_pages', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=UserIDForPage, - api_type='EDGE', - response_parser=ObjectParser(target_class=UserIDForPage, 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_likes(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'target_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/likes', - 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_live_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.livevideo import LiveVideo - param_types = { - 'broadcast_status': 'list', - 'source': 'source_enum', - } - enums = { - 'broadcast_status_enum': LiveVideo.BroadcastStatus.__dict__.values(), - 'source_enum': LiveVideo.Source.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/live_videos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideo, 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_live_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.livevideo import LiveVideo - param_types = { - 'content_tags': 'list', - 'description': 'string', - 'enable_backup_ingest': 'bool', - 'encoding_settings': 'string', - 'event_params': 'Object', - 'fisheye_video_cropped': 'bool', - 'front_z_rotation': 'float', - 'is_audio_only': 'bool', - 'is_spherical': 'bool', - 'original_fov': 'unsigned int', - 'privacy': 'string', - 'projection': 'projection_enum', - 'published': 'bool', - 'schedule_custom_profile_image': 'file', - 'spatial_audio_format': 'spatial_audio_format_enum', - 'status': 'status_enum', - 'stereoscopic_mode': 'stereoscopic_mode_enum', - 'stop_on_delete_stream': 'bool', - 'stream_type': 'stream_type_enum', - 'title': 'string', - } - enums = { - 'projection_enum': LiveVideo.Projection.__dict__.values(), - 'spatial_audio_format_enum': LiveVideo.SpatialAudioFormat.__dict__.values(), - 'status_enum': LiveVideo.Status.__dict__.values(), - 'stereoscopic_mode_enum': LiveVideo.StereoscopicMode.__dict__.values(), - 'stream_type_enum': LiveVideo.StreamType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/live_videos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=LiveVideo, - api_type='EDGE', - response_parser=ObjectParser(target_class=LiveVideo, 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_desktop_performance_trace(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/messenger_desktop_performance_traces', - 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() - - def get_music(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'target_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/music', - 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 create_notification(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'bot_message_payload_elements': 'string', - 'filtering': 'list', - 'href': 'Object', - 'label': 'string', - 'message': 'map', - 'notif_ids': 'list', - 'payload': 'string', - 'read': 'bool', - 'ref': 'string', - 'schedule_interval': 'unsigned int', - 'seen': 'bool', - 'template': 'Object', - 'type': 'type_enum', - } - enums = { - 'filtering_enum': User.Filtering.__dict__.values(), - 'type_enum': User.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/notifications', - 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() - - def get_payment_transactions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.paymentenginepayment import PaymentEnginePayment - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/payment_transactions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PaymentEnginePayment, - api_type='EDGE', - response_parser=ObjectParser(target_class=PaymentEnginePayment, 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_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.') - param_types = { - 'permission': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/permissions', - 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_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.permission import Permission - param_types = { - 'permission': 'string', - 'status': 'status_enum', - } - enums = { - 'status_enum': Permission.Status.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/permissions', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Permission, - api_type='EDGE', - response_parser=ObjectParser(target_class=Permission, 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_personal_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='/personal_ad_accounts', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.photo import Photo - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': Photo.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/photos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Photo, - api_type='EDGE', - response_parser=ObjectParser(target_class=Photo, 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_photo(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.photo import Photo - param_types = { - 'aid': 'string', - 'allow_spherical_photo': 'bool', - 'alt_text_custom': 'string', - 'android_key_hash': 'string', - 'application_id': 'string', - 'attempt': 'unsigned int', - 'audience_exp': 'bool', - 'backdated_time': 'datetime', - 'backdated_time_granularity': 'backdated_time_granularity_enum', - 'caption': 'string', - 'composer_session_id': 'string', - 'direct_share_status': 'unsigned int', - 'feed_targeting': 'Object', - 'filter_type': 'unsigned int', - 'full_res_is_coming_later': 'bool', - 'initial_view_heading_override_degrees': 'unsigned int', - 'initial_view_pitch_override_degrees': 'unsigned int', - 'initial_view_vertical_fov_override_degrees': 'unsigned int', - 'ios_bundle_id': 'string', - 'is_explicit_location': 'bool', - 'is_explicit_place': 'bool', - 'manual_privacy': 'bool', - 'message': 'string', - 'name': 'string', - 'no_story': 'bool', - 'offline_id': 'unsigned int', - 'og_action_type_id': 'string', - 'og_icon_id': 'string', - 'og_object_id': 'string', - 'og_phrase': 'string', - 'og_set_profile_badge': 'bool', - 'og_suggestion_mechanism': 'string', - 'place': 'Object', - 'privacy': 'string', - 'profile_id': 'int', - 'proxied_app_id': 'string', - 'published': 'bool', - 'qn': 'string', - 'spherical_metadata': 'map', - 'sponsor_id': 'string', - 'sponsor_relationship': 'unsigned int', - 'tags': 'list', - 'target_id': 'int', - 'targeting': 'Object', - 'time_since_original_post': 'unsigned int', - 'uid': 'int', - 'unpublished_content_type': 'unpublished_content_type_enum', - 'url': 'string', - 'user_selected_tags': 'bool', - 'vault_image_id': 'string', - } - enums = { - 'backdated_time_granularity_enum': Photo.BackdatedTimeGranularity.__dict__.values(), - 'unpublished_content_type_enum': Photo.UnpublishedContentType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/photos', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Photo, - api_type='EDGE', - response_parser=ObjectParser(target_class=Photo, 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_picture(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.profilepicturesource import ProfilePictureSource - param_types = { - 'height': 'int', - 'redirect': 'bool', - 'type': 'type_enum', - 'width': 'int', - } - enums = { - 'type_enum': ProfilePictureSource.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/picture', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=ProfilePictureSource, - api_type='EDGE', - response_parser=ObjectParser(target_class=ProfilePictureSource, 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_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.') - from facebook_business.adobjects.post import Post - param_types = { - 'include_hidden': 'bool', - 'q': 'string', - 'show_expired': 'bool', - 'since': 'datetime', - 'until': 'datetime', - 'with': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/posts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Post, - api_type='EDGE', - response_parser=ObjectParser(target_class=Post, 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_rich_media_documents(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.canvas import Canvas - param_types = { - 'query': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/rich_media_documents', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Canvas, - api_type='EDGE', - response_parser=ObjectParser(target_class=Canvas, 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_staging_resource(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'file': 'file', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/staging_resources', - 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() - - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.advideo import AdVideo - param_types = { - 'type': 'type_enum', - } - enums = { - 'type_enum': AdVideo.Type.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - 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) - - if batch is 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 = { - 'adaptive_type': 'string', - 'animated_effect_id': 'unsigned int', - 'application_id': 'string', - 'asked_fun_fact_prompt_id': 'unsigned int', - 'audio_story_wave_animation_handle': '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_tools': 'string', - 'description': 'string', - 'direct_share_status': 'unsigned int', - '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_explicit_share': 'bool', - 'is_group_linking_post': 'bool', - 'is_voice_clip': 'bool', - 'location_source_id': 'string', - 'manual_privacy': 'bool', - 'no_story': 'bool', - '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', - 'privacy': 'string', - 'publish_event_id': 'unsigned int', - 'react_mode_metadata': 'string', - 'referenced_sticker_id': 'string', - 'replace_video_id': 'string', - 'slideshow_spec': 'map', - 'source': 'string', - 'source_instagram_media_id': 'string', - 'spherical': 'bool', - 'sponsor_id': 'string', - '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', - '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(), - } - 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) - - if batch is 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 = { - 'about': 'string', - 'age_range': 'AgeRange', - 'avatar_2d_profile_picture': 'AvatarProfilePicture', - 'birthday': 'string', - 'community': 'Group', - 'cover': 'UserCoverPhoto', - 'currency': 'Currency', - 'education': 'list', - 'email': 'string', - 'favorite_athletes': 'list', - 'favorite_teams': 'list', - 'first_name': 'string', - 'gender': 'string', - 'hometown': 'Page', - 'id': 'string', - 'id_for_avatars': 'string', - 'inspirational_people': 'list', - 'install_type': 'string', - 'installed': 'bool', - 'is_guest_user': 'bool', - 'is_work_account': 'bool', - 'languages': 'list', - 'last_name': 'string', - 'link': 'string', - 'local_news_megaphone_dismiss_status': 'bool', - 'local_news_subscription_status': 'bool', - 'locale': 'string', - 'location': 'Page', - 'meeting_for': 'list', - 'middle_name': 'string', - 'name': 'string', - 'name_format': 'string', - 'payment_pricepoints': 'PaymentPricepoints', - 'political': 'string', - 'profile_pic': 'string', - 'quotes': 'string', - 'relationship_status': 'string', - 'shared_login_upgrade_required_by': 'datetime', - 'short_name': 'string', - 'significant_other': 'User', - 'sports': 'list', - 'supports_donate_button_in_live_video': 'bool', - 'third_party_id': 'string', - 'timezone': 'float', - 'token_for_business': 'string', - 'updated_time': 'datetime', - 'verified': 'bool', - 'video_upload_limits': 'VideoUploadLimits', - 'website': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['LocalNewsMegaphoneDismissStatus'] = User.LocalNewsMegaphoneDismissStatus.__dict__.values() - field_enum_info['LocalNewsSubscriptionStatus'] = User.LocalNewsSubscriptionStatus.__dict__.values() - field_enum_info['Filtering'] = User.Filtering.__dict__.values() - field_enum_info['Type'] = User.Type.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/useravailablecatalogs.py b/tap_facebook/facebook_business/adobjects/useravailablecatalogs.py deleted file mode 100644 index a89e692..0000000 --- a/tap_facebook/facebook_business/adobjects/useravailablecatalogs.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/usercoverphoto.py b/tap_facebook/facebook_business/adobjects/usercoverphoto.py deleted file mode 100644 index d6884c8..0000000 --- a/tap_facebook/facebook_business/adobjects/usercoverphoto.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class UserCoverPhoto( - AbstractObject, -): - - def __init__(self, api=None): - super(UserCoverPhoto, self).__init__() - self._isUserCoverPhoto = True - self._api = api - - class Field(AbstractObject.Field): - offset_x = 'offset_x' - offset_y = 'offset_y' - source = 'source' - - _field_types = { - 'offset_x': 'float', - 'offset_y': 'float', - 'source': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/userdevice.py b/tap_facebook/facebook_business/adobjects/userdevice.py deleted file mode 100644 index 621c15e..0000000 --- a/tap_facebook/facebook_business/adobjects/userdevice.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class UserDevice( - AbstractObject, -): - - def __init__(self, api=None): - super(UserDevice, self).__init__() - self._isUserDevice = True - self._api = api - - class Field(AbstractObject.Field): - hardware = 'hardware' - os = 'os' - - _field_types = { - 'hardware': 'string', - 'os': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/useridforapp.py b/tap_facebook/facebook_business/adobjects/useridforapp.py deleted file mode 100644 index b21e645..0000000 --- a/tap_facebook/facebook_business/adobjects/useridforapp.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 UserIDForApp( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isUserIDForApp = True - super(UserIDForApp, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - app = 'app' - id = 'id' - - _field_types = { - 'app': 'Application', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/useridforpage.py b/tap_facebook/facebook_business/adobjects/useridforpage.py deleted file mode 100644 index 1892ce8..0000000 --- a/tap_facebook/facebook_business/adobjects/useridforpage.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 UserIDForPage( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isUserIDForPage = True - super(UserIDForPage, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - page = 'page' - - _field_types = { - 'id': 'string', - 'page': 'Page', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/userleadgendisclaimerresponse.py b/tap_facebook/facebook_business/adobjects/userleadgendisclaimerresponse.py deleted file mode 100644 index 88d97b7..0000000 --- a/tap_facebook/facebook_business/adobjects/userleadgendisclaimerresponse.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class UserLeadGenDisclaimerResponse( - AbstractObject, -): - - def __init__(self, api=None): - super(UserLeadGenDisclaimerResponse, self).__init__() - self._isUserLeadGenDisclaimerResponse = True - self._api = api - - class Field(AbstractObject.Field): - checkbox_key = 'checkbox_key' - is_checked = 'is_checked' - - _field_types = { - 'checkbox_key': 'string', - 'is_checked': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/userleadgenfielddata.py b/tap_facebook/facebook_business/adobjects/userleadgenfielddata.py deleted file mode 100644 index b1e966c..0000000 --- a/tap_facebook/facebook_business/adobjects/userleadgenfielddata.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class UserLeadGenFieldData( - AbstractObject, -): - - def __init__(self, api=None): - super(UserLeadGenFieldData, self).__init__() - self._isUserLeadGenFieldData = True - self._api = api - - class Field(AbstractObject.Field): - name = 'name' - values = 'values' - - _field_types = { - 'name': 'string', - 'values': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/userpageonetimeoptintokensettings.py b/tap_facebook/facebook_business/adobjects/userpageonetimeoptintokensettings.py deleted file mode 100644 index 8da6352..0000000 --- a/tap_facebook/facebook_business/adobjects/userpageonetimeoptintokensettings.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 UserPageOneTimeOptInTokenSettings( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isUserPageOneTimeOptInTokenSettings = True - super(UserPageOneTimeOptInTokenSettings, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - creation_timestamp = 'creation_timestamp' - next_eligible_time = 'next_eligible_time' - notification_messages_frequency = 'notification_messages_frequency' - notification_messages_reoptin = 'notification_messages_reoptin' - notification_messages_timezone = 'notification_messages_timezone' - notification_messages_token = 'notification_messages_token' - recipient_id = 'recipient_id' - token_expiry_timestamp = 'token_expiry_timestamp' - topic_title = 'topic_title' - user_token_status = 'user_token_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=UserPageOneTimeOptInTokenSettings, - 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_timestamp': 'int', - 'next_eligible_time': 'int', - 'notification_messages_frequency': 'string', - 'notification_messages_reoptin': 'string', - 'notification_messages_timezone': 'string', - 'notification_messages_token': 'string', - 'recipient_id': 'string', - 'token_expiry_timestamp': 'int', - 'topic_title': 'string', - 'user_token_status': 'string', - 'id': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/userpaymentmobilepricepoints.py b/tap_facebook/facebook_business/adobjects/userpaymentmobilepricepoints.py deleted file mode 100644 index a05b380..0000000 --- a/tap_facebook/facebook_business/adobjects/userpaymentmobilepricepoints.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class UserPaymentMobilePricepoints( - AbstractObject, -): - - def __init__(self, api=None): - super(UserPaymentMobilePricepoints, self).__init__() - self._isUserPaymentMobilePricepoints = True - self._api = api - - class Field(AbstractObject.Field): - mobile_country = 'mobile_country' - phone_number_last4 = 'phone_number_last4' - pricepoints = 'pricepoints' - user_currency = 'user_currency' - - _field_types = { - 'mobile_country': 'string', - 'phone_number_last4': 'string', - 'pricepoints': 'list', - 'user_currency': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/valuebasedeligiblesource.py b/tap_facebook/facebook_business/adobjects/valuebasedeligiblesource.py deleted file mode 100644 index b0d8826..0000000 --- a/tap_facebook/facebook_business/adobjects/valuebasedeligiblesource.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 ValueBasedEligibleSource( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isValueBasedEligibleSource = True - super(ValueBasedEligibleSource, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - title = 'title' - type = 'type' - - _field_types = { - 'id': 'string', - 'title': 'string', - 'type': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/vehicle.py b/tap_facebook/facebook_business/adobjects/vehicle.py deleted file mode 100644 index 6013e60..0000000 --- a/tap_facebook/facebook_business/adobjects/vehicle.py +++ /dev/null @@ -1,435 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 Vehicle( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isVehicle = True - super(Vehicle, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - address = 'address' - applinks = 'applinks' - availability = 'availability' - body_style = 'body_style' - category_specific_fields = 'category_specific_fields' - condition = 'condition' - currency = 'currency' - custom_label_0 = 'custom_label_0' - date_first_on_lot = 'date_first_on_lot' - dealer_communication_channel = 'dealer_communication_channel' - dealer_email = 'dealer_email' - dealer_id = 'dealer_id' - dealer_name = 'dealer_name' - dealer_phone = 'dealer_phone' - dealer_privacy_policy_url = 'dealer_privacy_policy_url' - description = 'description' - drivetrain = 'drivetrain' - exterior_color = 'exterior_color' - fb_page_id = 'fb_page_id' - features = 'features' - fuel_type = 'fuel_type' - id = 'id' - image_fetch_status = 'image_fetch_status' - images = 'images' - interior_color = 'interior_color' - legal_disclosure_impressum_url = 'legal_disclosure_impressum_url' - make = 'make' - mileage = 'mileage' - model = 'model' - previous_currency = 'previous_currency' - previous_price = 'previous_price' - price = 'price' - sale_currency = 'sale_currency' - sale_price = 'sale_price' - sanitized_images = 'sanitized_images' - state_of_vehicle = 'state_of_vehicle' - title = 'title' - transmission = 'transmission' - trim = 'trim' - unit_price = 'unit_price' - url = 'url' - vehicle_id = 'vehicle_id' - vehicle_registration_plate = 'vehicle_registration_plate' - vehicle_specifications = 'vehicle_specifications' - vehicle_type = 'vehicle_type' - vin = 'vin' - visibility = 'visibility' - year = 'year' - - 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' - - class Availability: - available = 'AVAILABLE' - not_available = 'NOT_AVAILABLE' - pending = 'PENDING' - - class BodyStyle: - convertible = 'CONVERTIBLE' - coupe = 'COUPE' - crossover = 'CROSSOVER' - estate = 'ESTATE' - grandtourer = 'GRANDTOURER' - hatchback = 'HATCHBACK' - minibus = 'MINIBUS' - minivan = 'MINIVAN' - mpv = 'MPV' - none = 'NONE' - other = 'OTHER' - pickup = 'PICKUP' - roadster = 'ROADSTER' - saloon = 'SALOON' - sedan = 'SEDAN' - small_car = 'SMALL_CAR' - sportscar = 'SPORTSCAR' - supercar = 'SUPERCAR' - supermini = 'SUPERMINI' - suv = 'SUV' - truck = 'TRUCK' - van = 'VAN' - wagon = 'WAGON' - - class Condition: - excellent = 'EXCELLENT' - fair = 'FAIR' - good = 'GOOD' - none = 'NONE' - other = 'OTHER' - poor = 'POOR' - very_good = 'VERY_GOOD' - - class Drivetrain: - awd = 'AWD' - four_wd = 'FOUR_WD' - fwd = 'FWD' - none = 'NONE' - other = 'OTHER' - rwd = 'RWD' - two_wd = 'TWO_WD' - - class FuelType: - diesel = 'DIESEL' - electric = 'ELECTRIC' - flex = 'FLEX' - gasoline = 'GASOLINE' - hybrid = 'HYBRID' - none = 'NONE' - other = 'OTHER' - petrol = 'PETROL' - plugin_hybrid = 'PLUGIN_HYBRID' - - class StateOfVehicle: - cpo = 'CPO' - new = 'NEW' - used = 'USED' - - class Transmission: - automatic = 'AUTOMATIC' - manual = 'MANUAL' - none = 'NONE' - other = 'OTHER' - - class VehicleType: - boat = 'BOAT' - car_truck = 'CAR_TRUCK' - commercial = 'COMMERCIAL' - motorcycle = 'MOTORCYCLE' - other = 'OTHER' - powersport = 'POWERSPORT' - rv_camper = 'RV_CAMPER' - trailer = 'TRAILER' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'vehicles' - - # @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_vehicle(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=Vehicle, - 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 = { - 'address': 'map', - 'applinks': 'Object', - 'availability': 'availability_enum', - 'body_style': 'body_style_enum', - 'condition': 'condition_enum', - 'currency': 'string', - 'date_first_on_lot': 'string', - 'dealer_id': 'string', - 'dealer_name': 'string', - 'dealer_phone': 'string', - 'description': 'string', - 'drivetrain': 'drivetrain_enum', - 'exterior_color': 'string', - 'fb_page_id': 'string', - 'fuel_type': 'fuel_type_enum', - 'images': 'list', - 'interior_color': 'string', - 'make': 'string', - 'mileage': 'map', - 'model': 'string', - 'price': 'unsigned int', - 'state_of_vehicle': 'state_of_vehicle_enum', - 'title': 'string', - 'transmission': 'transmission_enum', - 'trim': 'string', - 'url': 'string', - 'vehicle_type': 'vehicle_type_enum', - 'vin': 'string', - 'year': 'unsigned int', - } - enums = { - 'availability_enum': Vehicle.Availability.__dict__.values(), - 'body_style_enum': Vehicle.BodyStyle.__dict__.values(), - 'condition_enum': Vehicle.Condition.__dict__.values(), - 'drivetrain_enum': Vehicle.Drivetrain.__dict__.values(), - 'fuel_type_enum': Vehicle.FuelType.__dict__.values(), - 'state_of_vehicle_enum': Vehicle.StateOfVehicle.__dict__.values(), - 'transmission_enum': Vehicle.Transmission.__dict__.values(), - 'vehicle_type_enum': Vehicle.VehicleType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=Vehicle, - 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.') - 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=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_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 = { - 'address': 'Object', - 'applinks': 'CatalogItemAppLinks', - 'availability': 'string', - 'body_style': 'string', - 'category_specific_fields': 'CatalogSubVerticalList', - 'condition': 'string', - 'currency': 'string', - 'custom_label_0': 'string', - 'date_first_on_lot': 'string', - 'dealer_communication_channel': 'string', - 'dealer_email': 'string', - 'dealer_id': 'string', - 'dealer_name': 'string', - 'dealer_phone': 'string', - 'dealer_privacy_policy_url': 'string', - 'description': 'string', - 'drivetrain': 'string', - 'exterior_color': 'string', - 'fb_page_id': 'Page', - 'features': 'list', - 'fuel_type': 'string', - 'id': 'string', - 'image_fetch_status': 'ImageFetchStatus', - 'images': 'list', - 'interior_color': 'string', - 'legal_disclosure_impressum_url': 'string', - 'make': 'string', - 'mileage': 'Object', - 'model': 'string', - 'previous_currency': 'string', - 'previous_price': 'string', - 'price': 'string', - 'sale_currency': 'string', - 'sale_price': 'string', - 'sanitized_images': 'list', - 'state_of_vehicle': 'string', - 'title': 'string', - 'transmission': 'string', - 'trim': 'string', - 'unit_price': 'Object', - 'url': 'string', - 'vehicle_id': 'string', - 'vehicle_registration_plate': 'string', - 'vehicle_specifications': 'list', - 'vehicle_type': 'string', - 'vin': 'string', - 'visibility': 'Visibility', - 'year': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ImageFetchStatus'] = Vehicle.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = Vehicle.Visibility.__dict__.values() - field_enum_info['Availability'] = Vehicle.Availability.__dict__.values() - field_enum_info['BodyStyle'] = Vehicle.BodyStyle.__dict__.values() - field_enum_info['Condition'] = Vehicle.Condition.__dict__.values() - field_enum_info['Drivetrain'] = Vehicle.Drivetrain.__dict__.values() - field_enum_info['FuelType'] = Vehicle.FuelType.__dict__.values() - field_enum_info['StateOfVehicle'] = Vehicle.StateOfVehicle.__dict__.values() - field_enum_info['Transmission'] = Vehicle.Transmission.__dict__.values() - field_enum_info['VehicleType'] = Vehicle.VehicleType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/vehicleoffer.py b/tap_facebook/facebook_business/adobjects/vehicleoffer.py deleted file mode 100644 index 31d1966..0000000 --- a/tap_facebook/facebook_business/adobjects/vehicleoffer.py +++ /dev/null @@ -1,264 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 VehicleOffer( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isVehicleOffer = True - super(VehicleOffer, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - amount_currency = 'amount_currency' - amount_percentage = 'amount_percentage' - amount_price = 'amount_price' - amount_qualifier = 'amount_qualifier' - applinks = 'applinks' - availability = 'availability' - body_style = 'body_style' - cashback_currency = 'cashback_currency' - cashback_price = 'cashback_price' - category_specific_fields = 'category_specific_fields' - currency = 'currency' - dma_codes = 'dma_codes' - downpayment_currency = 'downpayment_currency' - downpayment_price = 'downpayment_price' - downpayment_qualifier = 'downpayment_qualifier' - drivetrain = 'drivetrain' - end_date = 'end_date' - end_time = 'end_time' - exterior_color = 'exterior_color' - fuel_type = 'fuel_type' - generation = 'generation' - id = 'id' - image_fetch_status = 'image_fetch_status' - images = 'images' - interior_color = 'interior_color' - interior_upholstery = 'interior_upholstery' - make = 'make' - model = 'model' - offer_description = 'offer_description' - offer_disclaimer = 'offer_disclaimer' - offer_type = 'offer_type' - price = 'price' - sanitized_images = 'sanitized_images' - start_date = 'start_date' - start_time = 'start_time' - term_length = 'term_length' - term_qualifier = 'term_qualifier' - title = 'title' - transmission = 'transmission' - trim = 'trim' - unit_price = 'unit_price' - url = 'url' - vehicle_offer_id = 'vehicle_offer_id' - visibility = 'visibility' - year = 'year' - - 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=VehicleOffer, - 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.') - 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=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_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 = { - 'amount_currency': 'string', - 'amount_percentage': 'float', - 'amount_price': 'string', - 'amount_qualifier': 'string', - 'applinks': 'CatalogItemAppLinks', - 'availability': 'string', - 'body_style': 'string', - 'cashback_currency': 'string', - 'cashback_price': 'string', - 'category_specific_fields': 'CatalogSubVerticalList', - 'currency': 'string', - 'dma_codes': 'list', - 'downpayment_currency': 'string', - 'downpayment_price': 'string', - 'downpayment_qualifier': 'string', - 'drivetrain': 'string', - 'end_date': 'string', - 'end_time': 'int', - 'exterior_color': 'string', - 'fuel_type': 'string', - 'generation': 'string', - 'id': 'string', - 'image_fetch_status': 'ImageFetchStatus', - 'images': 'list', - 'interior_color': 'string', - 'interior_upholstery': 'string', - 'make': 'string', - 'model': 'string', - 'offer_description': 'string', - 'offer_disclaimer': 'string', - 'offer_type': 'string', - 'price': 'string', - 'sanitized_images': 'list', - 'start_date': 'string', - 'start_time': 'int', - 'term_length': 'unsigned int', - 'term_qualifier': 'string', - 'title': 'string', - 'transmission': 'string', - 'trim': 'string', - 'unit_price': 'Object', - 'url': 'string', - 'vehicle_offer_id': 'string', - 'visibility': 'Visibility', - 'year': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ImageFetchStatus'] = VehicleOffer.ImageFetchStatus.__dict__.values() - field_enum_info['Visibility'] = VehicleOffer.Visibility.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videocopyright.py b/tap_facebook/facebook_business/adobjects/videocopyright.py deleted file mode 100644 index 759ade0..0000000 --- a/tap_facebook/facebook_business/adobjects/videocopyright.py +++ /dev/null @@ -1,185 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 VideoCopyright( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isVideoCopyright = True - super(VideoCopyright, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - content_category = 'content_category' - copyright_content_id = 'copyright_content_id' - creator = 'creator' - excluded_ownership_segments = 'excluded_ownership_segments' - id = 'id' - in_conflict = 'in_conflict' - monitoring_status = 'monitoring_status' - monitoring_type = 'monitoring_type' - ownership_countries = 'ownership_countries' - reference_file = 'reference_file' - reference_file_disabled = 'reference_file_disabled' - reference_file_disabled_by_ops = 'reference_file_disabled_by_ops' - reference_owner_id = 'reference_owner_id' - rule_ids = 'rule_ids' - tags = 'tags' - whitelisted_ids = 'whitelisted_ids' - - class ContentCategory: - episode = 'episode' - movie = 'movie' - web = 'web' - - class MonitoringType: - 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=VideoCopyright, - 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 = { - 'append_excluded_ownership_segments': 'bool', - 'attribution_id': 'string', - 'content_category': 'content_category_enum', - 'excluded_ownership_countries': 'list', - 'excluded_ownership_segments': 'list', - 'is_reference_disabled': 'bool', - 'monitoring_type': 'monitoring_type_enum', - 'ownership_countries': 'list', - 'rule_id': 'string', - 'whitelisted_ids': 'list', - 'whitelisted_ig_user_ids': 'list', - } - enums = { - 'content_category_enum': VideoCopyright.ContentCategory.__dict__.values(), - 'monitoring_type_enum': VideoCopyright.MonitoringType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoCopyright, - 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_update_records(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/update_records', - 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 = { - 'content_category': 'string', - 'copyright_content_id': 'string', - 'creator': 'User', - 'excluded_ownership_segments': 'list', - 'id': 'string', - 'in_conflict': 'bool', - 'monitoring_status': 'string', - 'monitoring_type': 'string', - 'ownership_countries': 'VideoCopyrightGeoGate', - 'reference_file': 'CopyrightReferenceContainer', - 'reference_file_disabled': 'bool', - 'reference_file_disabled_by_ops': 'bool', - 'reference_owner_id': 'string', - 'rule_ids': 'list', - 'tags': 'list', - 'whitelisted_ids': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['ContentCategory'] = VideoCopyright.ContentCategory.__dict__.values() - field_enum_info['MonitoringType'] = VideoCopyright.MonitoringType.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videocopyrightcheckstatus.py b/tap_facebook/facebook_business/adobjects/videocopyrightcheckstatus.py deleted file mode 100644 index 50e4782..0000000 --- a/tap_facebook/facebook_business/adobjects/videocopyrightcheckstatus.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/videocopyrightconditiongroup.py b/tap_facebook/facebook_business/adobjects/videocopyrightconditiongroup.py deleted file mode 100644 index d171a09..0000000 --- a/tap_facebook/facebook_business/adobjects/videocopyrightconditiongroup.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class VideoCopyrightConditionGroup( - AbstractObject, -): - - def __init__(self, api=None): - super(VideoCopyrightConditionGroup, self).__init__() - self._isVideoCopyrightConditionGroup = True - self._api = api - - class Field(AbstractObject.Field): - action = 'action' - conditions = 'conditions' - validity_status = 'validity_status' - - _field_types = { - 'action': 'string', - 'conditions': 'list', - 'validity_status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videocopyrightgeogate.py b/tap_facebook/facebook_business/adobjects/videocopyrightgeogate.py deleted file mode 100644 index 4001eed..0000000 --- a/tap_facebook/facebook_business/adobjects/videocopyrightgeogate.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class VideoCopyrightGeoGate( - AbstractObject, -): - - def __init__(self, api=None): - super(VideoCopyrightGeoGate, self).__init__() - self._isVideoCopyrightGeoGate = True - self._api = api - - class Field(AbstractObject.Field): - excluded_countries = 'excluded_countries' - included_countries = 'included_countries' - - _field_types = { - 'excluded_countries': 'list', - 'included_countries': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videocopyrightrule.py b/tap_facebook/facebook_business/adobjects/videocopyrightrule.py deleted file mode 100644 index a670434..0000000 --- a/tap_facebook/facebook_business/adobjects/videocopyrightrule.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 VideoCopyrightRule( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isVideoCopyrightRule = True - super(VideoCopyrightRule, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - condition_groups = 'condition_groups' - copyrights = 'copyrights' - created_date = 'created_date' - creator = 'creator' - id = 'id' - is_in_migration = 'is_in_migration' - name = 'name' - - class Source: - match_settings_dialog = 'MATCH_SETTINGS_DIALOG' - rules_selector = 'RULES_SELECTOR' - rules_tab = 'RULES_TAB' - - 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=VideoCopyrightRule, - 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 = { - 'condition_groups': 'list', - 'copyrights': 'list', - 'created_date': 'datetime', - 'creator': 'User', - 'id': 'string', - 'is_in_migration': 'bool', - 'name': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Source'] = VideoCopyrightRule.Source.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videocopyrightsegment.py b/tap_facebook/facebook_business/adobjects/videocopyrightsegment.py deleted file mode 100644 index 426a7d0..0000000 --- a/tap_facebook/facebook_business/adobjects/videocopyrightsegment.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class VideoCopyrightSegment( - AbstractObject, -): - - def __init__(self, api=None): - super(VideoCopyrightSegment, self).__init__() - self._isVideoCopyrightSegment = True - self._api = api - - class Field(AbstractObject.Field): - duration_in_sec = 'duration_in_sec' - media_type = 'media_type' - start_time_in_sec = 'start_time_in_sec' - - _field_types = { - 'duration_in_sec': 'float', - 'media_type': 'string', - 'start_time_in_sec': 'float', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videolist.py b/tap_facebook/facebook_business/adobjects/videolist.py deleted file mode 100644 index 4b9f023..0000000 --- a/tap_facebook/facebook_business/adobjects/videolist.py +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 VideoList( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isVideoList = True - super(VideoList, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - creation_time = 'creation_time' - description = 'description' - id = 'id' - last_modified = 'last_modified' - owner = 'owner' - season_number = 'season_number' - thumbnail = 'thumbnail' - title = 'title' - videos_count = 'videos_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=VideoList, - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.advideo import AdVideo - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - 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) - - if batch is 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', - 'description': 'string', - 'id': 'string', - 'last_modified': 'datetime', - 'owner': 'Object', - 'season_number': 'int', - 'thumbnail': 'string', - 'title': 'string', - 'videos_count': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videopoll.py b/tap_facebook/facebook_business/adobjects/videopoll.py deleted file mode 100644 index 778d75d..0000000 --- a/tap_facebook/facebook_business/adobjects/videopoll.py +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 VideoPoll( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isVideoPoll = True - super(VideoPoll, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - close_after_voting = 'close_after_voting' - default_open = 'default_open' - id = 'id' - question = 'question' - show_gradient = 'show_gradient' - show_results = 'show_results' - status = 'status' - - class Status: - closed = 'closed' - results_open = 'results_open' - voting_open = 'voting_open' - - class Action: - attach_to_video = 'ATTACH_TO_VIDEO' - close = 'CLOSE' - delete_poll = 'DELETE_POLL' - show_results = 'SHOW_RESULTS' - show_voting = 'SHOW_VOTING' - - 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=VideoPoll, - 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 = { - 'action': 'action_enum', - 'close_after_voting': 'bool', - 'default_open': 'bool', - 'show_gradient': 'bool', - 'show_results': 'bool', - } - enums = { - 'action_enum': VideoPoll.Action.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=VideoPoll, - 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_poll_options(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/poll_options', - 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 = { - 'close_after_voting': 'bool', - 'default_open': 'bool', - 'id': 'string', - 'question': 'string', - 'show_gradient': 'bool', - 'show_results': 'bool', - 'status': 'Status', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Status'] = VideoPoll.Status.__dict__.values() - field_enum_info['Action'] = VideoPoll.Action.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videostatus.py b/tap_facebook/facebook_business/adobjects/videostatus.py deleted file mode 100644 index 35042ca..0000000 --- a/tap_facebook/facebook_business/adobjects/videostatus.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/videostatuserror.py b/tap_facebook/facebook_business/adobjects/videostatuserror.py deleted file mode 100644 index 8e2bc13..0000000 --- a/tap_facebook/facebook_business/adobjects/videostatuserror.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/videostatusprocessingphase.py b/tap_facebook/facebook_business/adobjects/videostatusprocessingphase.py deleted file mode 100644 index cf599ce..0000000 --- a/tap_facebook/facebook_business/adobjects/videostatusprocessingphase.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/videostatuspublishingphase.py b/tap_facebook/facebook_business/adobjects/videostatuspublishingphase.py deleted file mode 100644 index 6943fe3..0000000 --- a/tap_facebook/facebook_business/adobjects/videostatuspublishingphase.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/videostatusuploadingphase.py b/tap_facebook/facebook_business/adobjects/videostatusuploadingphase.py deleted file mode 100644 index 52c23c5..0000000 --- a/tap_facebook/facebook_business/adobjects/videostatusuploadingphase.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/videothumbnail.py b/tap_facebook/facebook_business/adobjects/videothumbnail.py deleted file mode 100644 index 736cda7..0000000 --- a/tap_facebook/facebook_business/adobjects/videothumbnail.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 VideoThumbnail( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isVideoThumbnail = True - super(VideoThumbnail, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - height = 'height' - id = 'id' - is_preferred = 'is_preferred' - name = 'name' - scale = 'scale' - uri = 'uri' - width = 'width' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'thumbnails' - - _field_types = { - 'height': 'unsigned int', - 'id': 'string', - 'is_preferred': 'bool', - 'name': 'string', - 'scale': 'float', - 'uri': 'string', - 'width': 'unsigned int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/videouploadlimits.py b/tap_facebook/facebook_business/adobjects/videouploadlimits.py deleted file mode 100644 index 7ecf8ea..0000000 --- a/tap_facebook/facebook_business/adobjects/videouploadlimits.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class VideoUploadLimits( - AbstractObject, -): - - def __init__(self, api=None): - super(VideoUploadLimits, self).__init__() - self._isVideoUploadLimits = True - self._api = api - - class Field(AbstractObject.Field): - length = 'length' - size = 'size' - - _field_types = { - 'length': 'unsigned int', - 'size': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/voipinfo.py b/tap_facebook/facebook_business/adobjects/voipinfo.py deleted file mode 100644 index 09a3365..0000000 --- a/tap_facebook/facebook_business/adobjects/voipinfo.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class VoipInfo( - AbstractObject, -): - - def __init__(self, api=None): - super(VoipInfo, self).__init__() - self._isVoipInfo = True - self._api = api - - class Field(AbstractObject.Field): - has_mobile_app = 'has_mobile_app' - has_permission = 'has_permission' - is_callable = 'is_callable' - is_callable_webrtc = 'is_callable_webrtc' - is_pushable = 'is_pushable' - reason_code = 'reason_code' - reason_description = 'reason_description' - - _field_types = { - 'has_mobile_app': 'bool', - 'has_permission': 'bool', - 'is_callable': 'bool', - 'is_callable_webrtc': 'bool', - 'is_pushable': 'bool', - 'reason_code': 'unsigned int', - 'reason_description': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/webapplink.py b/tap_facebook/facebook_business/adobjects/webapplink.py deleted file mode 100644 index 77de118..0000000 --- a/tap_facebook/facebook_business/adobjects/webapplink.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class WebAppLink( - AbstractObject, -): - - def __init__(self, api=None): - super(WebAppLink, self).__init__() - self._isWebAppLink = True - self._api = api - - class Field(AbstractObject.Field): - should_fallback = 'should_fallback' - url = 'url' - - _field_types = { - 'should_fallback': 'bool', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/whatsappbusinessaccount.py b/tap_facebook/facebook_business/adobjects/whatsappbusinessaccount.py deleted file mode 100644 index e535ea8..0000000 --- a/tap_facebook/facebook_business/adobjects/whatsappbusinessaccount.py +++ /dev/null @@ -1,1095 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 WhatsAppBusinessAccount( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isWhatsAppBusinessAccount = True - super(WhatsAppBusinessAccount, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - account_review_status = 'account_review_status' - analytics = 'analytics' - 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_funding_id = 'primary_funding_id' - purchase_order_number = 'purchase_order_number' - status = 'status' - timezone_id = 'timezone_id' - - class Tasks: - develop = 'DEVELOP' - manage = 'MANAGE' - manage_extensions = 'MANAGE_EXTENSIONS' - manage_phone = 'MANAGE_PHONE' - manage_phone_assets = 'MANAGE_PHONE_ASSETS' - manage_templates = 'MANAGE_TEMPLATES' - view_cost = 'VIEW_COST' - view_phone_assets = 'VIEW_PHONE_ASSETS' - view_templates = 'VIEW_TEMPLATES' - - class Category: - authentication = 'AUTHENTICATION' - marketing = 'MARKETING' - utility = 'UTILITY' - - class SubCategory: - custom = 'CUSTOM' - 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): - 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=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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'user': 'int', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/assigned_users', - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.assigneduser import AssignedUser - param_types = { - 'business': 'string', - } - 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() - - def create_assigned_user(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'tasks': 'list', - 'user': 'int', - } - enums = { - 'tasks_enum': WhatsAppBusinessAccount.Tasks.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/assigned_users', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/audiences', - 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_conversation_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 = { - 'conversation_categories': 'list', - 'conversation_directions': 'list', - 'conversation_types': 'list', - 'country_codes': 'list', - 'dimensions': 'list', - 'end': 'unsigned int', - 'granularity': 'granularity_enum', - 'metric_types': 'list', - 'phone_numbers': 'list', - 'start': 'unsigned int', - } - enums = { - 'conversation_categories_enum': [ - 'AUTHENTICATION', - 'MARKETING', - 'MARKETING_OPTIMIZED_DELIVERY', - 'SERVICE', - 'UNKNOWN', - 'UTILITY', - ], - 'conversation_directions_enum': [ - 'BUSINESS_INITIATED', - 'UNKNOWN', - 'USER_INITIATED', - ], - 'conversation_types_enum': [ - 'FREE_ENTRY_POINT', - 'FREE_TIER', - 'REGULAR', - 'UNKNOWN', - ], - 'dimensions_enum': [ - 'CONVERSATION_CATEGORY', - 'CONVERSATION_DIRECTION', - 'CONVERSATION_TYPE', - 'COUNTRY', - 'PHONE', - 'UNKNOWN', - ], - 'granularity_enum': [ - 'DAILY', - 'HALF_HOUR', - 'MONTHLY', - ], - 'metric_types_enum': [ - 'CONVERSATION', - 'COST', - 'UNKNOWN', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/conversation_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_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - 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, - 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_message_campaigns(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/message_campaigns', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'hsm_id': 'string', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/message_templates', - 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_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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'category': 'list', - 'content': 'string', - 'language': 'list', - 'name': 'string', - 'name_or_content': 'string', - 'quality_score': 'list', - 'status': 'list', - } - enums = { - 'category_enum': WhatsAppBusinessAccount.Category.__dict__.values(), - 'quality_score_enum': [ - 'GREEN', - 'RED', - 'UNKNOWN', - 'YELLOW', - ], - 'status_enum': [ - 'APPROVED', - 'DELETED', - 'DISABLED', - 'IN_APPEAL', - 'LIMIT_EXCEEDED', - 'PAUSED', - 'PENDING', - 'PENDING_DELETION', - 'REJECTED', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/message_templates', - 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_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 = { - 'allow_category_change': 'bool', - 'category': 'category_enum', - 'components': 'list', - 'cta_url_link_tracking_opted_out': 'bool', - '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(), - 'sub_category_enum': WhatsAppBusinessAccount.SubCategory.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/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 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/phone_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_phone_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 = { - 'cc': 'string', - 'migrate_phone_number': 'bool', - 'phone_number': 'string', - 'preverified_id': 'string', - 'verified_name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/phone_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 delete_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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 = { - 'catalog_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/product_catalogs', - 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_product_catalogs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/product_catalogs', - 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() - - def create_product_catalog(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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.productcatalog import ProductCatalog - param_types = { - 'catalog_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/product_catalogs', - 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() - - def get_schedules(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch 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='/schedules', - 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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/subscribed_apps', - 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_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.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/subscribed_apps', - 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_subscribed_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.') - param_types = { - 'override_callback_uri': 'string', - 'verify_token': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/subscribed_apps', - 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_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', - '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): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'name': 'string', - 'template_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/template_performance_metrics', - 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_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', - '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_funding_id': 'string', - 'purchase_order_number': 'string', - 'status': 'string', - 'timezone_id': 'string', - } - @classmethod - 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['SubCategory'] = WhatsAppBusinessAccount.SubCategory.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatus.py b/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatus.py deleted file mode 100644 index 653d438..0000000 --- a/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatus.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py b/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py deleted file mode 100644 index b395ee5..0000000 --- a/tap_facebook/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us 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/tap_facebook/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py b/tap_facebook/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py deleted file mode 100644 index 50adac3..0000000 --- a/tap_facebook/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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' - - _field_types = { - 'client_business_id': 'string', - 'id': 'string', - 'rejection_reasons': 'list', - 'submitted_info': 'Object', - 'submitted_time': 'datetime', - 'update_time': 'datetime', - 'verification_status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py b/tap_facebook/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py deleted file mode 100644 index a56abb9..0000000 --- a/tap_facebook/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py +++ /dev/null @@ -1,214 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 WhatsAppBusinessPreVerifiedPhoneNumber( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isWhatsAppBusinessPreVerifiedPhoneNumber = True - super(WhatsAppBusinessPreVerifiedPhoneNumber, self).__init__(fbid, parent_id, api) - - 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' - - class CodeVerificationStatus: - expired = 'EXPIRED' - not_verified = 'NOT_VERIFIED' - verified = 'VERIFIED' - - 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=WhatsAppBusinessPreVerifiedPhoneNumber, - 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_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': 'string', - } - enums = { - 'code_method_enum': [ - 'SMS', - 'VOICE', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/request_code', - 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_verify_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': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/verify_code', - 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 = { - 'code_verification_status': 'string', - 'code_verification_time': 'datetime', - 'id': 'string', - 'owner_business': 'Business', - 'phone_number': 'string', - 'verification_expiry_time': 'datetime', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['CodeVerificationStatus'] = WhatsAppBusinessPreVerifiedPhoneNumber.CodeVerificationStatus.__dict__.values() - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/whatsappbusinessprofile.py b/tap_facebook/facebook_business/adobjects/whatsappbusinessprofile.py deleted file mode 100644 index a82d9dc..0000000 --- a/tap_facebook/facebook_business/adobjects/whatsappbusinessprofile.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 WhatsAppBusinessProfile( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isWhatsAppBusinessProfile = True - super(WhatsAppBusinessProfile, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - name_verification = 'name_verification' - whatsapp_business_api_data = 'whatsapp_business_api_data' - - 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=WhatsAppBusinessProfile, - 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 = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=WhatsAppBusinessProfile, - 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_verification': 'Object', - 'whatsapp_business_api_data': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/windowsapplink.py b/tap_facebook/facebook_business/adobjects/windowsapplink.py deleted file mode 100644 index fc29766..0000000 --- a/tap_facebook/facebook_business/adobjects/windowsapplink.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class WindowsAppLink( - AbstractObject, -): - - def __init__(self, api=None): - super(WindowsAppLink, self).__init__() - self._isWindowsAppLink = True - self._api = api - - class Field(AbstractObject.Field): - app_id = 'app_id' - app_name = 'app_name' - package_family_name = 'package_family_name' - url = 'url' - - _field_types = { - 'app_id': 'string', - 'app_name': 'string', - 'package_family_name': 'string', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/windowsphoneapplink.py b/tap_facebook/facebook_business/adobjects/windowsphoneapplink.py deleted file mode 100644 index bc59220..0000000 --- a/tap_facebook/facebook_business/adobjects/windowsphoneapplink.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class WindowsPhoneAppLink( - AbstractObject, -): - - def __init__(self, api=None): - super(WindowsPhoneAppLink, self).__init__() - self._isWindowsPhoneAppLink = True - self._api = api - - class Field(AbstractObject.Field): - app_id = 'app_id' - app_name = 'app_name' - url = 'url' - - _field_types = { - 'app_id': 'string', - 'app_name': 'string', - 'url': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py b/tap_facebook/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py deleted file mode 100644 index 1134733..0000000 --- a/tap_facebook/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# 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 WoodhengePurchasedPAYGReceipt( - AbstractCrudObject, -): - - def __init__(self, fbid=None, parent_id=None, api=None): - self._isWoodhengePurchasedPAYGReceipt = True - super(WoodhengePurchasedPAYGReceipt, self).__init__(fbid, parent_id, api) - - class Field(AbstractObject.Field): - id = 'id' - number_of_subscriptions_purchased = 'number_of_subscriptions_purchased' - purchase_time = 'purchase_time' - 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=WoodhengePurchasedPAYGReceipt, - 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', - 'number_of_subscriptions_purchased': 'int', - 'purchase_time': 'datetime', - 'user': 'User', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/adobjects/workuserfrontline.py b/tap_facebook/facebook_business/adobjects/workuserfrontline.py deleted file mode 100644 index 348d798..0000000 --- a/tap_facebook/facebook_business/adobjects/workuserfrontline.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -This class is auto-generated. - -For any issues or feature requests related to this class, please let us know on -github and we'll fix in our codegen framework. We'll not be able to accept -pull request for this class. -""" - -class WorkUserFrontline( - AbstractObject, -): - - def __init__(self, api=None): - super(WorkUserFrontline, self).__init__() - self._isWorkUserFrontline = True - self._api = api - - class Field(AbstractObject.Field): - has_access = 'has_access' - is_frontline = 'is_frontline' - - _field_types = { - 'has_access': 'bool', - 'is_frontline': 'bool', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/tap_facebook/facebook_business/api.py b/tap_facebook/facebook_business/api.py deleted file mode 100644 index f7a41b1..0000000 --- a/tap_facebook/facebook_business/api.py +++ /dev/null @@ -1,921 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# 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 - -from facebook_business.exceptions import ( - FacebookRequestError, - FacebookBadObjectError, - FacebookUnavailablePropertyException, - FacebookBadParameterError, -) -from facebook_business.utils import api_utils -from facebook_business.utils import urls - -from contextlib import contextmanager -import backoff -import copy -from six.moves import http_client -import os -import json -import six -import sys -import re - -try: - # Since python 3 - from six.moves import collections_abc -except ImportError: - # Won't work after python 3.8 - import collections as collections_abc - -from facebook_business.adobjects.objectparser import ObjectParser -from facebook_business.typechecker import TypeChecker - - -""" -api module contains classes that make http requests to Facebook's graph API. -""" - -def retry_pattern(backoff_type, exception, **wait_gen_kwargs): - def log_retry_attempt(details): - _, exception, _ = sys.exc_info() - - def should_retry_api_error(exception): - - # Define the regular expression pattern - pattern = r'\(#100\) Cannot include [\w, ]+ in summary param because they weren\'t there while creating the report run(?:\. All available values are: )?' - if isinstance(exception, FacebookRequestError): - return (exception.http_status()==400 and re.match(pattern, exception._error['message'])) - return False - - return backoff.on_exception( - backoff_type, - exception, - jitter=None, - on_backoff=log_retry_attempt, - giveup=lambda exc: not should_retry_api_error(exc), - **wait_gen_kwargs - ) - -class FacebookResponse(object): - - """Encapsulates an http response from Facebook's Graph API.""" - - def __init__(self, body=None, http_status=None, headers=None, call=None): - """Initializes the object's internal data. - Args: - body (optional): The response body as text. - http_status (optional): The http status code. - headers (optional): The http headers. - call (optional): The original call that was made. - """ - self._body = body - self._http_status = http_status - self._headers = headers or {} - self._call = call - - def body(self): - """Returns the response body.""" - return self._body - - def json(self): - """Returns the response body -- in json if possible.""" - try: - return json.loads(self._body) - except (TypeError, ValueError): - return self._body - - def headers(self): - """Return the response headers.""" - return self._headers - - def etag(self): - """Returns the ETag header value if it exists.""" - return self._headers.get('ETag') - - def status(self): - """Returns the http status code of the response.""" - return self._http_status - - def is_success(self): - """Returns boolean indicating if the call was successful.""" - - json_body = self.json() - - if isinstance(json_body, collections_abc.Mapping) and 'error' in json_body: - # Is a dictionary, has error in it - return False - elif bool(json_body): - # Has body and no error - if 'success' in json_body: - return json_body['success'] - # 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 - return True - elif self._http_status == http_client.OK: - # HTTP Okay - return True - else: - # Something else - return False - - def is_failure(self): - """Returns boolean indicating if the call failed.""" - return not self.is_success() - - def error(self): - """ - Returns a FacebookRequestError (located in the exceptions module) with - an appropriate debug message. - """ - if self.is_failure(): - return FacebookRequestError( - "Call was not successful", - self._call, - self.status(), - self.headers(), - self.body(), - ) - else: - return None - - -class FacebookAdsApi(object): - - """Encapsulates session attributes and methods to make API calls. - Attributes: - SDK_VERSION (class): indicating sdk version. - HTTP_METHOD_GET (class): HTTP GET method name. - HTTP_METHOD_POST (class): HTTP POST method name - HTTP_METHOD_DELETE (class): HTTP DELETE method name - HTTP_DEFAULT_HEADERS (class): Default HTTP headers for requests made by - this sdk. - """ - - SDK_VERSION = apiconfig.ads_api_config['SDK_VERSION'] - - API_VERSION = apiconfig.ads_api_config['API_VERSION'] - - HTTP_METHOD_GET = 'GET' - - HTTP_METHOD_POST = 'POST' - - HTTP_METHOD_DELETE = 'DELETE' - - HTTP_DEFAULT_HEADERS = { - 'User-Agent': "fbbizsdk-python-%s" % SDK_VERSION, - } - - _default_api = None - _default_account_id = None - - def __init__(self, session, api_version=None, enable_debug_logger=False): - """Initializes the api instance. - Args: - session: FacebookSession object that contains a requests interface - and attribute GRAPH (the Facebook GRAPH API URL). - api_version: API version - """ - self._session = session - self._num_requests_succeeded = 0 - self._num_requests_attempted = 0 - self._api_version = api_version or self.API_VERSION - self._enable_debug_logger = enable_debug_logger - - def get_num_requests_attempted(self): - """Returns the number of calls attempted.""" - return self._num_requests_attempted - - def get_num_requests_succeeded(self): - """Returns the number of calls that succeeded.""" - return self._num_requests_succeeded - - @classmethod - def init( - cls, - app_id=None, - app_secret=None, - access_token=None, - account_id=None, - api_version=None, - proxies=None, - timeout=None, - debug=False, - crash_log=True, - ): - session = FacebookSession(app_id, app_secret, access_token, proxies, - timeout) - api = cls(session, api_version, enable_debug_logger=debug) - cls.set_default_api(api) - - if account_id: - cls.set_default_account_id(account_id) - - if crash_log: - from facebook_business.crashreporter import CrashReporter - if debug: - CrashReporter.enableLogging() - CrashReporter.enable() - - return api - - @classmethod - def set_default_api(cls, api_instance): - """Sets the default api instance. - When making calls to the api, objects will revert to using the default - api if one is not specified when initializing the objects. - Args: - api_instance: The instance which to set as default. - """ - cls._default_api = api_instance - - @classmethod - def get_default_api(cls): - """Returns the default api instance.""" - return cls._default_api - - @classmethod - def set_default_account_id(cls, account_id): - account_id = str(account_id) - if account_id.find('act_') == -1: - raise ValueError( - "Account ID provided in FacebookAdsApi.set_default_account_id " - "expects a string that begins with 'act_'", - ) - cls._default_account_id = account_id - - @classmethod - def get_default_account_id(cls): - return cls._default_account_id - - @retry_pattern(backoff.expo, (FacebookRequestError), max_tries=5, factor=5) - def call( - self, - method, - path, - params=None, - headers=None, - files=None, - url_override=None, - api_version=None, - ): - """Makes an API call. - Args: - method: The HTTP method name (e.g. 'GET'). - path: A tuple of path tokens or a full URL string. A tuple will - be translated to a url as follows: - graph_url/tuple[0]/tuple[1]... - It will be assumed that if the path is not a string, it will be - iterable. - params (optional): A mapping of request parameters where a key - is the parameter name and its value is a string or an object - which can be JSON-encoded. - headers (optional): A mapping of request headers where a key is the - header name and its value is the header value. - files (optional): An optional mapping of file names to binary open - file objects. These files will be attached to the request. - Returns: - A FacebookResponse object containing the response body, headers, - http status, and summary of the call that was made. - Raises: - FacebookResponse.error() if the request failed. - """ - if not params: - params = {} - if not headers: - headers = {} - if not files: - files = {} - - api_version = api_version or self._api_version - - if api_version and not re.search(r'v[0-9]+\.[0-9]+', api_version): - raise FacebookBadObjectError( - 'Please provide the API version in the following format: %s' - % self.API_VERSION, - ) - - self._num_requests_attempted += 1 - - if not isinstance(path, six.string_types): - # Path is not a full path - path = "/".join(( - url_override or self._session.GRAPH, - api_version, - '/'.join(map(str, path)), - )) - - # Include api headers in http request - headers = headers.copy() - headers.update(FacebookAdsApi.HTTP_DEFAULT_HEADERS) - - if params: - params = _top_level_param_json_encode(params) - - # Get request response and encapsulate it in a FacebookResponse - if method in ('GET', 'DELETE'): - response = self._session.requests.request( - method, - path, - params=params, - headers=headers, - files=files, - timeout=self._session.timeout - ) - - else: - response = self._session.requests.request( - method, - path, - data=params, - headers=headers, - files=files, - timeout=self._session.timeout - ) - if self._enable_debug_logger: - import curlify - print(curlify.to_curl(response.request)) - fb_response = FacebookResponse( - body=response.text, - headers=response.headers, - http_status=response.status_code, - call={ - 'method': method, - 'path': path, - 'params': params, - 'headers': headers, - 'files': files, - }, - ) - - if fb_response.is_failure(): - raise fb_response.error() - - self._num_requests_succeeded += 1 - return fb_response - - def new_batch(self): - """ - Returns a new FacebookAdsApiBatch, which when executed will go through - this api. - """ - return FacebookAdsApiBatch(api=self) - - -class FacebookAdsApiBatch(object): - - """ - Exposes methods to build a sequence of calls which can be executed with - a single http request. - Note: Individual exceptions won't be thrown for each call that fails. - The success and failure callback functions corresponding to a call - should handle its success or failure. - """ - - def __init__(self, api, success=None, failure=None): - self._api = api - self._files = [] - self._batch = [] - self._success_callbacks = [] - self._failure_callbacks = [] - if success is not None: - self._success_callbacks.append(success) - if failure is not None: - self._failure_callbacks.append(failure) - self._requests = [] - - def __len__(self): - return len(self._batch) - - def add( - self, - method, - relative_path, - params=None, - headers=None, - files=None, - success=None, - failure=None, - request=None, - ): - """Adds a call to the batch. - Args: - method: The HTTP method name (e.g. 'GET'). - relative_path: A tuple of path tokens or a relative URL string. - A tuple will be translated to a url as follows: - //... - It will be assumed that if the path is not a string, it will be - iterable. - params (optional): A mapping of request parameters where a key - is the parameter name and its value is a string or an object - which can be JSON-encoded. - headers (optional): A mapping of request headers where a key is the - header name and its value is the header value. - files (optional): An optional mapping of file names to binary open - file objects. These files will be attached to the request. - success (optional): A callback function which will be called with - the FacebookResponse of this call if the call succeeded. - failure (optional): A callback function which will be called with - the FacebookResponse of this call if the call failed. - request (optional): The APIRequest object - Returns: - A dictionary describing the call. - """ - if not isinstance(relative_path, six.string_types): - relative_url = '/'.join(relative_path) - else: - relative_url = relative_path - - call = { - 'method': method, - 'relative_url': relative_url, - } - - if params: - params = _top_level_param_json_encode(params) - keyvals = ['%s=%s' % (key, urls.quote_with_encoding(value)) - for key, value in params.items()] - if method == 'GET': - call['relative_url'] += '?' + '&'.join(keyvals) - else: - call['body'] = '&'.join(keyvals) - - if files: - call['attached_files'] = ','.join(files.keys()) - - if headers: - call['headers'] = [] - for header in headers: - batch_formatted_header = {} - batch_formatted_header['name'] = header - batch_formatted_header['value'] = headers[header] - call['headers'].append(batch_formatted_header) - - self._batch.append(call) - self._files.append(files) - self._success_callbacks.append(success) - self._failure_callbacks.append(failure) - self._requests.append(request) - - return call - - def add_request( - self, - request, - success=None, - failure=None, - ): - """Interface to add a APIRequest to the batch. - Args: - request: The APIRequest object to add - success (optional): A callback function which will be called with - the FacebookResponse of this call if the call succeeded. - failure (optional): A callback function which will be called with - the FacebookResponse of this call if the call failed. - Returns: - A dictionary describing the call. - """ - updated_params = copy.deepcopy(request._params) - if request._fields: - updated_params['fields'] = ','.join(request._fields) - return self.add( - method=request._method, - relative_path=request._path, - params=updated_params, - files=request._file_params, - success=success, - failure=failure, - request=request, - ) - - def execute(self): - """Makes a batch call to the api associated with this object. - For each individual call response, calls the success or failure callback - function if they were specified. - Note: Does not explicitly raise exceptions. Individual exceptions won't - be thrown for each call that fails. The success and failure callback - functions corresponding to a call should handle its success or failure. - Returns: - If some of the calls have failed, returns a new FacebookAdsApiBatch - object with those calls. Otherwise, returns None. - """ - if not self._batch: - return None - method = 'POST' - path = tuple() - params = {'batch': self._batch} - files = {} - for call_files in self._files: - if call_files: - files.update(call_files) - - fb_response = self._api.call( - method, - path, - params=params, - files=files, - ) - - responses = fb_response.json() - retry_indices = [] - - for index, response in enumerate(responses): - if response: - body = response.get('body') - code = response.get('code') - headers = response.get('headers') - - inner_fb_response = FacebookResponse( - body=body, - headers=headers, - http_status=code, - call=self._batch[index], - ) - - if inner_fb_response.is_success(): - if self._success_callbacks[index]: - self._success_callbacks[index](inner_fb_response) - elif self._failure_callbacks[index]: - self._failure_callbacks[index](inner_fb_response) - else: - retry_indices.append(index) - - if retry_indices: - new_batch = self.__class__(self._api) - new_batch._files = [self._files[index] for index in retry_indices] - new_batch._batch = [self._batch[index] for index in retry_indices] - new_batch._success_callbacks = [self._success_callbacks[index] - for index in retry_indices] - new_batch._failure_callbacks = [self._failure_callbacks[index] - for index in retry_indices] - return new_batch - else: - return None - - -class FacebookRequest: - """ - Represents an API request - """ - - def __init__( - self, - node_id, - method, - endpoint, - api=None, - param_checker=TypeChecker({}, {}), - target_class=None, - api_type=None, - allow_file_upload=False, - response_parser=None, - include_summary=True, - api_version=None, - ): - """ - Args: - node_id: The node id to perform the api call. - method: The HTTP method of the call. - endpoint: The edge of the api call. - api (optional): The FacebookAdsApi object. - param_checker (optional): Parameter checker. - target_class (optional): The return class of the api call. - api_type (optional): NODE or EDGE type of the call. - allow_file_upload (optional): Whether the call allows upload. - response_parser (optional): An ObjectParser to parse response. - include_summary (optional): Include "summary". - api_version (optional): API version. - """ - self._api = api or FacebookAdsApi.get_default_api() - self._node_id = node_id - self._method = method - self._endpoint = endpoint.replace('/', '') - self._path = (node_id, endpoint.replace('/', '')) - self._param_checker = param_checker - self._target_class = target_class - self._api_type = api_type - self._allow_file_upload = allow_file_upload - self._response_parser = response_parser - self._include_summary = include_summary - self._api_version = api_version - self._params = {} - self._fields = [] - self._file_params = {} - self._file_counter = 0 - self._accepted_fields = [] - if target_class is not None: - self._accepted_fields = target_class.Field.__dict__.values() - - def add_file(self, file_path): - if not self._allow_file_upload: - api_utils.warning('Endpoint ' + self._endpoint + ' cannot upload files') - file_key = 'source' + str(self._file_counter) - if os.path.isfile(file_path): - self._file_params[file_key] = file_path - self._file_counter += 1 - else: - raise FacebookBadParameterError( - 'Cannot find file ' + file_path + '!', - ) - return self - - def add_files(self, files): - if files is None: - return self - for file_path in files: - self.add_file(file_path) - return self - - def add_field(self, field): - if field not in self._fields: - self._fields.append(field) - if field not in self._accepted_fields: - api_utils.warning(self._endpoint + ' does not allow field ' + field) - return self - - def add_fields(self, fields): - if fields is None: - return self - for field in fields: - self.add_field(field) - return self - - def add_param(self, key, value): - if not self._param_checker.is_valid_pair(key, value): - api_utils.warning('value of ' + key + ' might not be compatible. ' + - ' Expect ' + self._param_checker.get_type(key) + '; ' + - ' got ' + str(type(value))) - if self._param_checker.is_file_param(key): - self._file_params[key] = value - else: - self._params[key] = self._extract_value(value) - return self - - def add_params(self, params): - if params is None: - return self - for key in params.keys(): - self.add_param(key, params[key]) - return self - - def get_fields(self): - return list(self._fields) - - def get_params(self): - return copy.deepcopy(self._params) - - def execute(self): - params = copy.deepcopy(self._params) - if self._api_type == "EDGE" and self._method == "GET": - cursor = Cursor( - target_objects_class=self._target_class, - params=params, - fields=self._fields, - include_summary=self._include_summary, - api=self._api, - node_id=self._node_id, - endpoint=self._endpoint, - object_parser=self._response_parser, - ) - cursor.load_next_page() - return cursor - if self._fields: - params['fields'] = ','.join(self._fields) - with open_files(self._file_params) as files: - response = self._api.call( - method=self._method, - path=(self._path), - params=params, - files=files, - api_version=self._api_version, - ) - if response.error(): - raise response.error() - if self._response_parser: - return self._response_parser.parse_single(response.json()) - else: - return response - - def add_to_batch(self, batch, success=None, failure=None): - batch.add_request(self, success, failure) - - def _extract_value(self, value): - if hasattr(value, 'export_all_data'): - return value.export_all_data() - elif isinstance(value, list): - return [self._extract_value(item) for item in value] - elif isinstance(value, dict): - return dict((self._extract_value(k), self._extract_value(v)) - for (k, v) in value.items()) - else: - return value - - -class Cursor(object): - - """Cursor is an cursor over an object's connections. - Previously called EdgeIterator. - Examples: - >>> me = AdAccountUser('me') - >>> my_accounts = [act for act in Cursor(me, AdAccount)] - >>> my_accounts - [, ] - """ - - def __init__( - self, - source_object=None, - target_objects_class=None, - fields=None, - params=None, - include_summary=True, - api=None, - node_id=None, - endpoint=None, - object_parser=None - ): - """ - Initializes an cursor over the objects to which there is an edge from - source_object. - To initialize, you'll need to provide either (source_object and - target_objects_class) or (api, node_id, endpoint, and object_parser) - Args: - source_object: An AbstractObject instance from which to inspect an - edge. This object should have an id. - 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. - params (optional): A mapping of request parameters where a key - is the parameter name and its value is a string or an object - which can be JSON-encoded. - include_summary (optional): Include summary. - api (optional): FacebookAdsApi object. - node_id (optional): The ID of calling node. - endpoint (optional): The edge name. - object_parser (optional): The ObjectParser to parse response. - """ - self.params = dict(params or {}) - target_objects_class._assign_fields_to_params(fields, self.params) - self._source_object = source_object - self._target_objects_class = target_objects_class - self._node_id = node_id or source_object.get_id_assured() - self._endpoint = endpoint or target_objects_class.get_endpoint() - self._api = api or source_object.get_api() - self._path = ( - self._node_id, - self._endpoint, - ) - self._queue = [] - self._headers = [] - self._finished_iteration = False - self._total_count = None - self._summary = None - self._include_summary = include_summary or 'default_summary' in self.params - self._object_parser = object_parser or ObjectParser( - api=self._api, - target_class=self._target_objects_class, - ) - - def __repr__(self): - return str(self._queue) - - def __len__(self): - return len(self._queue) - - def __iter__(self): - return self - - def __next__(self): - # Load next page at end. - # If load_next_page returns False, raise StopIteration exception - if not self._queue and not self.load_next_page(): - raise StopIteration() - - return self._queue.pop(0) - - # Python 2 compatibility. - next = __next__ - - def __getitem__(self, index): - return self._queue[index] - - def headers(self): - return self._headers - - def total(self): - if self._total_count is None: - raise FacebookUnavailablePropertyException( - "Couldn't retrieve the object total count for that type " - "of request.", - ) - return self._total_count - - def summary(self): - if self._summary is None or not isinstance(self._summary, dict): - raise FacebookUnavailablePropertyException( - "Couldn't retrieve the object summary for that type " - "of request.", - ) - return " %s" % ( - json.dumps( - self._summary, - sort_keys=True, - indent=4, - separators=(',', ': '), - ), - ) - - def load_next_page(self): - """Queries server for more nodes and loads them into the internal queue. - Returns: - True if successful, else False. - """ - print(f"Within packages") - if self._finished_iteration: - return False - - if ( - self._include_summary and - 'default_summary' not in self.params and - 'summary' not in self.params - ): - self.params['summary'] = True - - response_obj = self._api.call( - 'GET', - self._path, - params=self.params, - ) - response = response_obj.json() - self._headers = response_obj.headers() - - if ( - 'paging' in response and - 'cursors' in response['paging'] and - '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: - # Indicate if this was the last page - self._finished_iteration = True - - if ( - self._include_summary and - 'summary' in response and - 'total_count' in response['summary'] - ): - self._total_count = response['summary']['total_count'] - print(f"Summary : {response['summary']}") - - if self._include_summary and 'summary' in response: - self._summary = response['summary'] - - self._queue = self.build_objects_from_response(response) - return len(self._queue) > 0 - - def get_one(self): - for obj in self: - return obj - return None - - def build_objects_from_response(self, response): - return self._object_parser.parse_multiple(response) - - -@contextmanager -def open_files(files): - opened_files = {} - for key, path in files.items(): - opened_files.update({key: open(path, 'rb')}) - yield opened_files - for file in opened_files.values(): - file.close() - - -def _top_level_param_json_encode(params): - params = params.copy() - - for param, value in params.items(): - if ( - isinstance(value, (collections_abc.Mapping, collections_abc.Sequence, bool)) - and not isinstance(value, six.string_types) - ): - params[param] = json.dumps( - value, - sort_keys=True, - separators=(',', ':'), - ) - else: - params[param] = value - - return params diff --git a/tap_facebook/facebook_business/apiconfig.py b/tap_facebook/facebook_business/apiconfig.py deleted file mode 100644 index 68a015b..0000000 --- a/tap_facebook/facebook_business/apiconfig.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. - -# 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': 'v19.0', - 'SDK_VERSION': 'v19.0.2', - 'STRICT_MODE': False -} diff --git a/tap_facebook/facebook_business/bootstrap.py b/tap_facebook/facebook_business/bootstrap.py deleted file mode 100644 index 1810f88..0000000 --- a/tap_facebook/facebook_business/bootstrap.py +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 - -this_dir = os.path.dirname(__file__) -repo_dir = os.path.join(this_dir, os.pardir) -sys.path.insert(1, repo_dir) - -import json -from facebook_business.session import FacebookSession -from facebook_business.api import FacebookAdsApi -from facebook_business.adobjects import * -from facebook_business.exceptions import FacebookError - - -class Authentication(): - """ - DON'T USE THIS CLASS DIRECTLY. USE `auth()` function from this module - Helper class to authenticate using config.json config file from this - repository. This is useful in two cases: - - Testing environment - - Interactive exploration in REPL - This class shouldn't be used in production. - It's intended for development. Use FacebookAdsApi.init in production - """ - - _api = FacebookAdsApi.get_default_api() - if _api: - _is_authenticated = True - else: - _is_authenticated = False - - @property - def is_authenticated(cls): - return cls._is_authenticated - - @classmethod - def load_config(cls): - with open(os.path.join(repo_dir, 'config.json')) as config_file: - config = json.load(config_file) - return config - - @classmethod - def auth(cls): - """ - Prepare for Ads API calls and return a tuple with act_id - and page_id. page_id can be None but act_id is always set. - """ - config = cls.load_config() - - if cls._is_authenticated: - return config['act_id'], config.get('page_id', None) - - if config['app_id'] and config['app_secret'] \ - and config['act_id'] and config['access_token']: - - FacebookAdsApi.init( - config['app_id'], - config['app_secret'], - config['access_token'], - config['act_id'], - ) - - cls._is_authenticated = True - - return config['act_id'], config.get('page_id', None) - - else: - required_fields = set( - ('app_id', 'app_secret', 'act_id', 'access_token') - ) - - missing_fields = required_fields - set(config.keys()) - raise FacebookError( - '\n\tFile config.json needs to have the following fields: {}\n' - '\tMissing fields: {}\n'.format( - ', '.join(required_fields), - ', '.join(missing_fields), - ) - ) - - -def auth(): - return Authentication.auth() - -if sys.flags.interactive: - auth() diff --git a/tap_facebook/facebook_business/crashreporter.py b/tap_facebook/facebook_business/crashreporter.py deleted file mode 100644 index 8884b2f..0000000 --- a/tap_facebook/facebook_business/crashreporter.py +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 -import json -import logging - -from enum import Enum - -from facebook_business.api import FacebookRequest -from facebook_business.session import FacebookSession -from facebook_business.api import FacebookAdsApi -from facebook_business.exceptions import FacebookError -from facebook_business.exceptions import FacebookRequestError - - -class Reasons(Enum): - API = 'API' - SDK = 'SDK' - -class CrashReporter(object): - - reporter_instance = None - logger = None - - def __init__(self, app_id, excepthook): - self.__app_id = app_id - self.__excepthook = excepthook - - @classmethod - def enable(cls): - 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 - cls.logging('Enabled') - - @classmethod - def disable(cls): - if cls.reporter_instance != None: - # Restore the original excepthook - sys.excepthook = cls.reporter_instance.__excepthook - cls.reporter_instance = None - cls.logging('Disabled') - - @classmethod - def enableLogging(cls): - if cls.logger is None: - logging.basicConfig() - cls.logger = logging.getLogger(__name__) - cls.logger.setLevel(logging.INFO) - - @classmethod - def disableLogging(cls): - if cls.logger != None: - cls.logger = None - - @classmethod - def logging(cls, info): - if cls.logger != None: - cls.logger.info(info) - - def __exception_handler(self, etype, evalue, tb): - params = self.__build_param(etype, tb) - if params: - CrashReporter.logging('Crash detected!') - self.__send_report(params) - else: - CrashReporter.logging('No crash detected.') - - self.__forward_exception(etype, evalue, tb) - - - def __forward_exception(self, etype, evalue, tb): - self.__excepthook(etype, evalue, tb) - - def __build_param(self, etype, tb): - if not etype: - return None - fb_request_errors = [cls.__name__ for cls in FacebookError.__subclasses__()] - reason = None - - if etype.__name__ == FacebookRequestError.__name__: - reason = Reasons.API - elif etype.__name__ in fb_request_errors: - reason = Reasons.SDK - - if reason is None: - extracted_tb = traceback.extract_tb(tb, limit=100) - for ii, (filename, line, funcname, code) in enumerate(extracted_tb): - if filename.find('facebook_business') != -1: - reason = Reasons.SDK - - if reason is None: - return None - - return { - 'reason': "{} : {}".format(reason.value, etype.__name__), - 'callstack': traceback.format_tb(tb), - 'platform': sys.version - }; - - def __send_report(self, payload): - try: - anonymous = FacebookSession() - api = FacebookAdsApi(anonymous) - request = FacebookRequest( - node_id=self.__app_id, - method='POST', - endpoint='/instruments', - api=api, - ) - request.add_params({'bizsdk_crash_report':payload}) - request.execute() - CrashReporter.logging('Succeed to Send Crash Report.') - except Exception as e: - CrashReporter.logging('Fail to Send Crash Report.') diff --git a/tap_facebook/facebook_business/exceptions.py b/tap_facebook/facebook_business/exceptions.py deleted file mode 100644 index a661923..0000000 --- a/tap_facebook/facebook_business/exceptions.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 -raised by the sdk. -""" - -import json -import re - - -class FacebookError(Exception): - """ - All errors specific to Facebook api requests and Facebook ads design will be - subclassed from FacebookError which is subclassed from Exception. - """ - pass - - -class FacebookRequestError(FacebookError): - """ - Raised when an api request fails. Returned by error() method on a - FacebookResponse object returned through a callback function (relevant - only for failure callbacks) if not raised at the core api call method. - """ - - def __init__( - self, message, - request_context, - http_status, - http_headers, - body - ): - self._message = message - self._request_context = request_context - self._http_status = http_status - self._http_headers = http_headers - try: - self._body = json.loads(body) - except (TypeError, ValueError): - self._body = body - - self._api_error_code = None - self._api_error_type = None - self._api_error_message = None - self._api_error_subcode = None - self._api_blame_field_specs = None - self._api_transient_error = False - - if self._body and 'error' in self._body: - self._error = self._body['error'] - error_data = self._error.get('error_data', str({})) - if not isinstance(error_data, dict): - error_data = json.loads(error_data) - if 'message' in self._error: - self._api_error_message = self._error['message'] - if 'code' in self._error: - self._api_error_code = self._error['code'] - if 'is_transient' in self._error: - self._api_transient_error = self._error['is_transient'] - if 'error_subcode' in self._error: - self._api_error_subcode = self._error['error_subcode'] - if 'type' in self._error: - self._api_error_type = self._error['type'] - if isinstance(error_data, dict) and error_data.get('blame_field_specs'): - self._api_blame_field_specs = \ - error_data['blame_field_specs'] - else: - self._error = None - - # We do not want to print the file bytes - request = self._request_context - if 'files' in self._request_context: - request = self._request_context.copy() - del request['files'] - - super(FacebookRequestError, self).__init__( - "\n\n" + - " Message: %s\n" % self._message + - " Method: %s\n" % request.get('method') + - " Path: %s\n" % request.get('path', '/') + - " Params: %s\n" % request.get('params') + - "\n" + - " Status: %s\n" % self._http_status + - " Response:\n %s" % re.sub( - r"\n", "\n ", - json.dumps(self._body, indent=2) - ) + - "\n" - ) - - def request_context(self): - return self._request_context - - def http_status(self): - return self._http_status - - def http_headers(self): - return self._http_headers - - def body(self): - return self._body - - def api_error_message(self): - return self._api_error_message - - def api_error_code(self): - return self._api_error_code - - def api_error_subcode(self): - return self._api_error_subcode - - def api_error_type(self): - return self._api_error_type - - def api_blame_field_specs(self): - return self._api_blame_field_specs - - def api_transient_error(self): - return self._api_transient_error - - def get_message(self): - return self._message - - -class FacebookBadObjectError(FacebookError): - """Raised when a guarantee about the object validity fails.""" - pass - -class FacebookBadParameterError(FacebookError): - """Raised when a guarantee about the parameter validity fails.""" - pass - -class FacebookUnavailablePropertyException(FacebookError): - """Raised when an object's property or method is not available.""" - pass - - -class DocsmithSkipTestError(Exception): - """Raised when a docsmith test is skipped.""" - def __init__(self, message): - self._message = message - - def get_skip_error_msg(self): - return self._message - -class FacebookBadParameterTypeException(FacebookError): - """Raised when a parameter or field is set with improper type.""" - pass diff --git a/tap_facebook/facebook_business/exit_codes.py b/tap_facebook/facebook_business/exit_codes.py deleted file mode 100644 index 6e0d84b..0000000 --- a/tap_facebook/facebook_business/exit_codes.py +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 - FAILURE = 1 - SUCCESS = 0 - USER_ERROR = 40 - USER_SKIP = 42 diff --git a/tap_facebook/facebook_business/fb_ca_chain_bundle.crt b/tap_facebook/facebook_business/fb_ca_chain_bundle.crt deleted file mode 100644 index 162dbc8..0000000 --- a/tap_facebook/facebook_business/fb_ca_chain_bundle.crt +++ /dev/null @@ -1,3188 +0,0 @@ -## -## Bundle of CA Root Certificates -## -## Certificate data from Mozilla as of: Fri Jan 21 20:58:59 2022 GMT -## -## This is a bundle of X.509 certificates of public Certificate Authorities -## (CA). These were automatically extracted from Mozilla's root certificates -## file (certdata.txt). This file can be found in the mozilla source tree: -## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt -## -## It contains the certificates in PEM format and therefore -## can be directly used with curl / libcurl / php_curl, or with -## an Apache+mod_ssl webserver for SSL client authentication. -## Just configure this file as the SSLCACertificateFile. -## -## Conversion done with mk-ca-bundle.pl version 1.28. -## SHA256: bb36818a81feaa4cca61101e6d6276cd09e972efcb08112dfed846918ca41d7f -## - - -GlobalSign Root CA -================== ------BEGIN CERTIFICATE----- -MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx -GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds -b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV -BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD -VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa -DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc -THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb -Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP -c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX -gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV -HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF -AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj -Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG -j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH -hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC -X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== ------END CERTIFICATE----- - -Entrust.net Premium 2048 Secure Server CA -========================================= ------BEGIN CERTIFICATE----- -MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u -ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp -bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV -BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx -NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 -d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl -MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u -ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL -Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr -hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW -nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi -VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E -BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ -KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy -T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf -zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT -J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e -nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE= ------END CERTIFICATE----- - -Baltimore CyberTrust Root -========================= ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE -ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li -ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC -SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs -dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME -uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB -UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C -G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 -XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr -l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI -VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB -BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh -cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 -hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa -Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H -RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp ------END CERTIFICATE----- - -Entrust Root Certification Authority -==================================== ------BEGIN CERTIFICATE----- -MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV -BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw -b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG -A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 -MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu -MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu -Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v -dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz -A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww -Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 -j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN -rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw -DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1 -MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH -hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA -A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM -Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa -v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS -W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 -tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 ------END CERTIFICATE----- - -Comodo AAA Services root -======================== ------BEGIN CERTIFICATE----- -MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS -R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg -TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw -MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl -c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV -BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG -C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs -i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW -Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH -Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK -Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f -BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl -cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz -LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm -7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz -Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z -8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C -12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== ------END CERTIFICATE----- - -QuoVadis Root CA 2 -================== ------BEGIN CERTIFICATE----- -MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT -EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx -ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM -aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 -XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk -lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB -lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy -lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt -66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn -wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh -D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy -BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie -J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud -DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU -a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT -ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv -Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3 -UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm -VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK -+JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW -IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1 -WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X -f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II -4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 -VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u ------END CERTIFICATE----- - -QuoVadis Root CA 3 -================== ------BEGIN CERTIFICATE----- -MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT -EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx -OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM -aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg -DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij -KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K -DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv -BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp -p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8 -nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX -MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM -Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz -uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT -BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj -YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0 -aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB -BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD -VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4 -ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE -AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV -qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s -hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z -POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2 -Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp -8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC -bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu -g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p -vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr -qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= ------END CERTIFICATE----- - -Security Communication Root CA -============================== ------BEGIN CERTIFICATE----- -MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP -U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw -HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP -U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw -8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM -DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX -5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd -DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 -JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw -DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g -0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a -mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ -s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ -6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi -FL39vmwLAw== ------END CERTIFICATE----- - -XRamp Global CA Root -==================== ------BEGIN CERTIFICATE----- -MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE -BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj -dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx -HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg -U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp -dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu -IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx -foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE -zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs -AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry -xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap -oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC -AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc -/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt -qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n -nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz -8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw= ------END CERTIFICATE----- - -Go Daddy Class 2 CA -=================== ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY -VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp -ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG -A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g -RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD -ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv -2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32 -qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j -YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY -vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O -BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o -atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu -MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG -A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim -PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt -I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ -HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI -Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b -vZ8= ------END CERTIFICATE----- - -Starfield Class 2 CA -==================== ------BEGIN CERTIFICATE----- -MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc -U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo -MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG -A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG -SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY -bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ -JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm -epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN -F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF -MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f -hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo -bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g -QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs -afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM -PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl -xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD -KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 -QBFGmh95DmK/D5fs4C8fF5Q= ------END CERTIFICATE----- - -DigiCert Assured ID Root CA -=========================== ------BEGIN CERTIFICATE----- -MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw -IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx -MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL -ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO -9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy -UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW -/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy -oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf -GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF -66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq -hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc -EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn -SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i -8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe -+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== ------END CERTIFICATE----- - -DigiCert Global Root CA -======================= ------BEGIN CERTIFICATE----- -MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw -HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw -MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 -dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn -TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 -BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H -4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y -7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB -o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm -8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF -BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr -EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt -tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 -UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk -CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= ------END CERTIFICATE----- - -DigiCert High Assurance EV Root CA -================================== ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw -KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw -MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ -MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu -Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t -Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS -OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 -MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ -NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe -h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB -Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY -JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ -V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp -myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK -mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe -vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K ------END CERTIFICATE----- - -SwissSign Gold CA - G2 -====================== ------BEGIN CERTIFICATE----- -MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw -EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN -MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp -c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq -t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C -jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg -vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF -ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR -AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend -jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO -peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR -7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi -GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw -AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64 -OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov -L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm -5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr -44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf -Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m -Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp -mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk -vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf -KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br -NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj -viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ ------END CERTIFICATE----- - -SwissSign Silver CA - G2 -======================== ------BEGIN CERTIFICATE----- -MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT -BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X -DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 -aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG -9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 -N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm -+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH -6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu -MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h -qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5 -FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs -ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc -celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X -CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ -BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB -tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 -cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P -4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F -kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L -3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx -/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa -DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP -e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu -WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ -DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub -DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u ------END CERTIFICATE----- - -SecureTrust CA -============== ------BEGIN CERTIFICATE----- -MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG -EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy -dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe -BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC -ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX -OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t -DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH -GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b -01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH -ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/ -BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj -aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ -KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu -SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf -mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ -nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR -3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE= ------END CERTIFICATE----- - -Secure Global CA -================ ------BEGIN CERTIFICATE----- -MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG -EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH -bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg -MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg -Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx -YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ -bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g -8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV -HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi -0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn -oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA -MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+ -OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn -CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 -3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc -f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW ------END CERTIFICATE----- - -COMODO Certification Authority -============================== ------BEGIN CERTIFICATE----- -MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE -BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG -A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 -dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb -MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD -T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH -+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww -xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV -4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA -1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI -rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E -BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k -b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC -AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP -OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ -RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc -IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN -+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== ------END CERTIFICATE----- - -Network Solutions Certificate Authority -======================================= ------BEGIN CERTIFICATE----- -MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG -EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr -IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx -MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu -MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx -jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT -aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT -crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc -/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB -AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP -BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv -bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA -A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q -4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ -GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv -wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD -ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey ------END CERTIFICATE----- - -COMODO ECC Certification Authority -================================== ------BEGIN CERTIFICATE----- -MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC -R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE -ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix -GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR -Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo -b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X -4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni -wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E -BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG -FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA -U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= ------END CERTIFICATE----- - -Certigna -======== ------BEGIN CERTIFICATE----- -MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw -EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3 -MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI -Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q -XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH -GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p -ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg -DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf -Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ -tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ -BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J -SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA -hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+ -ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu -PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY -1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw -WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== ------END CERTIFICATE----- - -ePKI Root Certification Authority -================================= ------BEGIN CERTIFICATE----- -MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG -EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg -Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx -MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq -MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs -IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi -lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv -qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX -12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O -WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+ -ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao -lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/ -vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi -Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi -MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH -ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0 -1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq -KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV -xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP -NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r -GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE -xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx -gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy -sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD -BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= ------END CERTIFICATE----- - -certSIGN ROOT CA -================ ------BEGIN CERTIFICATE----- -MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD -VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa -Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE -CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I -JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH -rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2 -ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD -0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943 -AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B -Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB -AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8 -SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0 -x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt -vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz -TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD ------END CERTIFICATE----- - -NetLock Arany (Class Gold) Főtanúsítvány -======================================== ------BEGIN CERTIFICATE----- -MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G -A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 -dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB -cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx -MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO -ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv -biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6 -c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu -0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw -/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk -H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw -fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1 -neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB -BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW -qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta -YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC -bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna -NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu -dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= ------END CERTIFICATE----- - -Hongkong Post Root CA 1 -======================= ------BEGIN CERTIFICATE----- -MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT -DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx -NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n -IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 -ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr -auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh -qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY -V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV -HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i -h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio -l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei -IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps -T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT -c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== ------END CERTIFICATE----- - -SecureSign RootCA11 -=================== ------BEGIN CERTIFICATE----- -MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi -SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS -b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw -KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 -cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL -TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO -wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq -g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP -O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA -bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX -t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh -OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r -bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ -Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01 -y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 -lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= ------END CERTIFICATE----- - -Microsec e-Szigno Root CA 2009 -============================== ------BEGIN CERTIFICATE----- -MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER -MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv -c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o -dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE -BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt -U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA -fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG -0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA -pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm -1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC -AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf -QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE -FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o -lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX -I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 -tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 -yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi -LXpUq3DDfSJlgnCW ------END CERTIFICATE----- - -GlobalSign Root CA - R3 -======================= ------BEGIN CERTIFICATE----- -MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv -YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh -bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT -aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln -bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt -iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ -0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 -rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl -OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 -xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE -FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 -lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 -EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E -bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 -YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r -kpeDMdmztcpHWD9f ------END CERTIFICATE----- - -Autoridad de Certificacion Firmaprofesional CIF A62634068 -========================================================= ------BEGIN CERTIFICATE----- -MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA -BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 -MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw -QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB -NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD -Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P -B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY -7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH -ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI -plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX -MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX -LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK -bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU -vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud -EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH -DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp -cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA -bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx -ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx -51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk -R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP -T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f -Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl -osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR -crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR -saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD -KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi -6Et8Vcad+qMUu2WFbm5PEn4KPJ2V ------END CERTIFICATE----- - -Izenpe.com -========== ------BEGIN CERTIFICATE----- -MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG -EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz -MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu -QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ -03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK -ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU -+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC -PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT -OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK -F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK -0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+ -0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB -leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID -AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+ -SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG -NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx -MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O -BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l -Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga -kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q -hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs -g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 -aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 -nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC -ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo -Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z -WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== ------END CERTIFICATE----- - -Go Daddy Root Certificate Authority - G2 -======================================== ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu -MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 -MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 -b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G -A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq -9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD -+qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd -fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl -NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 -BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac -vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r -5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV -N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO -LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 ------END CERTIFICATE----- - -Starfield Root Certificate Authority - G2 -========================================= ------BEGIN CERTIFICATE----- -MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s -b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0 -eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw -DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg -VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB -dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv -W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs -bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk -N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf -ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU -JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol -TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx -4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw -F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K -pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ -c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 ------END CERTIFICATE----- - -Starfield Services Root Certificate Authority - G2 -================================================== ------BEGIN CERTIFICATE----- -MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT -B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s -b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl -IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV -BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT -dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg -Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 -h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa -hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP -LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB -rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw -AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG -SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP -E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy -xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd -iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza -YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 ------END CERTIFICATE----- - -AffirmTrust Commercial -====================== ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw -MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly -bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb -DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV -C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 -BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww -MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV -HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG -hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi -qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv -0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh -sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= ------END CERTIFICATE----- - -AffirmTrust Networking -====================== ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw -MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly -bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE -Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI -dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 -/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb -h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV -HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu -UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6 -12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23 -WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9 -/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= ------END CERTIFICATE----- - -AffirmTrust Premium -=================== ------BEGIN CERTIFICATE----- -MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS -BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy -OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy -dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn -BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV -5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs -+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd -GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R -p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI -S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04 -6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5 -/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo -+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB -/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv -MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg -Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC -6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S -L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK -+4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV -BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg -IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 -g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb -zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== ------END CERTIFICATE----- - -AffirmTrust Premium ECC -======================= ------BEGIN CERTIFICATE----- -MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV -BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx -MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U -cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA -IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ -N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW -BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK -BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X -57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM -eQ== ------END CERTIFICATE----- - -Certum Trusted Network CA -========================= ------BEGIN CERTIFICATE----- -MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK -ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy -MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU -ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 -MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC -l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J -J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 -fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 -cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB -Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw -DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj -jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 -mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj -Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI -03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= ------END CERTIFICATE----- - -TWCA Root Certification Authority -================================= ------BEGIN CERTIFICATE----- -MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ -VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG -EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB -IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK -AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx -QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC -oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP -4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r -y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB -BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG -9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC -mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW -QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY -T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny -Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== ------END CERTIFICATE----- - -Security Communication RootCA2 -============================== ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc -U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh -dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC -SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy -aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ -+T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R -3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV -spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K -EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8 -QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB -CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj -u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk -3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q -tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 -mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 ------END CERTIFICATE----- - -EC-ACC -====== ------BEGIN CERTIFICATE----- -MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE -BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w -ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD -VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE -CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT -BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7 -MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt -SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl -Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh -cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK -w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT -ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 -HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a -E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw -0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD -VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 -Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l -dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ -lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa -Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe -l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 -E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D -5EI= ------END CERTIFICATE----- - -Hellenic Academic and Research Institutions RootCA 2011 -======================================================= ------BEGIN CERTIFICATE----- -MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT -O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y -aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z -IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT -AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z -IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo -IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI -1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa -71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u -8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH -3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/ -MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8 -MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu -b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt -XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8 -TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD -/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N -7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4 ------END CERTIFICATE----- - -Actalis Authentication Root CA -============================== ------BEGIN CERTIFICATE----- -MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM -BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE -AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky -MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz -IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290 -IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ -wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa -by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6 -zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f -YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2 -oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l -EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7 -hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8 -EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5 -jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY -iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt -ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI -WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0 -JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx -K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+ -Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC -4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo -2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz -lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem -OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9 -vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== ------END CERTIFICATE----- - -Buypass Class 2 Root CA -======================= ------BEGIN CERTIFICATE----- -MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X -DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 -eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1 -g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn -9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b -/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU -CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff -awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI -zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn -Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX -Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs -M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD -VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF -AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s -A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI -osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S -aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd -DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD -LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0 -oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC -wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS -CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN -rJgWVqA= ------END CERTIFICATE----- - -Buypass Class 3 Root CA -======================= ------BEGIN CERTIFICATE----- -MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X -DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 -eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH -sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR -5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh -7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ -ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH -2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV -/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ -RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA -Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq -j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD -VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF -AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV -cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G -uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG -Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8 -ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2 -KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz -6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug -UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe -eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi -Cp/HuZc= ------END CERTIFICATE----- - -T-TeleSec GlobalRoot Class 3 -============================ ------BEGIN CERTIFICATE----- -MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM -IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU -cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx -MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz -dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD -ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3 -DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK -9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU -NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF -iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W -0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr -AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb -fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT -ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h -P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml -e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== ------END CERTIFICATE----- - -D-TRUST Root Class 3 CA 2 2009 -============================== ------BEGIN CERTIFICATE----- -MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK -DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe -Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE -LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD -ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA -BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv -KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z -p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC -AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ -4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y -eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw -MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G -PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw -OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm -2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 -o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV -dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph -X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I= ------END CERTIFICATE----- - -D-TRUST Root Class 3 CA 2 EV 2009 -================================= ------BEGIN CERTIFICATE----- -MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK -DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw -OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK -DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw -OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS -egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh -zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T -7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60 -sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35 -11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv -cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v -ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El -MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp -b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh -c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+ -PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05 -nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX -ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA -NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv -w9y4AyHqnxbxLFS1 ------END CERTIFICATE----- - -CA Disig Root R2 -================ ------BEGIN CERTIFICATE----- -MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw -EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp -ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx -EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp -c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC -w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia -xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7 -A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S -GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV -g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa -5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE -koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A -Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i -Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV -HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u -Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM -tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV -sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je -dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8 -1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx -mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01 -utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0 -sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg -UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV -7+ZtsH8tZ/3zbBt1RqPlShfppNcL ------END CERTIFICATE----- - -ACCVRAIZ1 -========= ------BEGIN CERTIFICATE----- -MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB -SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1 -MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH -UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM -jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0 -RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD -aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ -0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG -WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7 -8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR -5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J -9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK -Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw -Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu -Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2 -VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM -Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA -QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh -AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA -YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj -AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA -IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk -aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0 -dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2 -MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI -hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E -R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN -YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49 -nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ -TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3 -sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h -I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg -Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd -3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p -EfbRD0tVNEYqi4Y7 ------END CERTIFICATE----- - -TWCA Global Root CA -=================== ------BEGIN CERTIFICATE----- -MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT -CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD -QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK -EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg -Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C -nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV -r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR -Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV -tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W -KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99 -sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p -yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn -kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI -zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC -AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g -cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn -LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M -8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg -/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg -lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP -A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m -i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8 -EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3 -zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0= ------END CERTIFICATE----- - -TeliaSonera Root CA v1 -====================== ------BEGIN CERTIFICATE----- -MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE -CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4 -MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW -VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+ -6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA -3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k -B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn -Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH -oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3 -F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ -oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7 -gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc -TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB -AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW -DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm -zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx -0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW -pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV -G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc -c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT -JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2 -qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6 -Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems -WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= ------END CERTIFICATE----- - -E-Tugra Certification Authority -=============================== ------BEGIN CERTIFICATE----- -MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w -DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls -ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN -ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw -NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx -QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl -cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD -DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd -hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K -CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g -ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ -BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0 -E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz -rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq -jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn -rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5 -dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB -/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG -MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK -kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO -XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807 -VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo -a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc -dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV -KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT -Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0 -8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G -C7TbO6Orb1wdtn7os4I07QZcJA== ------END CERTIFICATE----- - -T-TeleSec GlobalRoot Class 2 -============================ ------BEGIN CERTIFICATE----- -MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM -IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU -cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx -MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz -dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD -ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3 -DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ -SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F -vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970 -2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV -WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy -YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4 -r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf -vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR -3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN -9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== ------END CERTIFICATE----- - -Atos TrustedRoot 2011 -===================== ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU -cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 -MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG -A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV -hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr -54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ -DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 -HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR -z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R -l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ -bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB -CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h -k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh -TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 -61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G -3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed ------END CERTIFICATE----- - -QuoVadis Root CA 1 G3 -===================== ------BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG -A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv -b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN -MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg -RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE -PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm -PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6 -Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN -ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l -g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV -7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX -9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f -iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg -t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI -hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC -MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3 -GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct -Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP -+V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh -3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa -wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6 -O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0 -FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV -hMJKzRwuJIczYOXD ------END CERTIFICATE----- - -QuoVadis Root CA 2 G3 -===================== ------BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG -A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv -b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN -MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg -RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh -ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY -NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t -oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o -MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l -V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo -L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ -sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD -6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh -lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI -hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 -AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K -pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9 -x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz -dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X -U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw -mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD -zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN -JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr -O3jtZsSOeWmD3n+M ------END CERTIFICATE----- - -QuoVadis Root CA 3 G3 -===================== ------BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG -A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv -b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN -MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg -RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286 -IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL -Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe -6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3 -I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U -VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7 -5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi -Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM -dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt -rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI -hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px -KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS -t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ -TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du -DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib -Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD -hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX -0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW -dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2 -PpxxVJkES/1Y+Zj0 ------END CERTIFICATE----- - -DigiCert Assured ID Root G2 -=========================== ------BEGIN CERTIFICATE----- -MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw -IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw -MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL -ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH -35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq -bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw -VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP -YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn -lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO -w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv -0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz -d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW -hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M -jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo -IhNzbM8m9Yop5w== ------END CERTIFICATE----- - -DigiCert Assured ID Root G3 -=========================== ------BEGIN CERTIFICATE----- -MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV -UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD -VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 -MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ -BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb -RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs -KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF -UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy -YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy -1vUhZscv6pZjamVFkpUBtA== ------END CERTIFICATE----- - -DigiCert Global Root G2 -======================= ------BEGIN CERTIFICATE----- -MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw -HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx -MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 -dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ -kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO -3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV -BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM -UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB -o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu -5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr -F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U -WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH -QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/ -iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl -MrY= ------END CERTIFICATE----- - -DigiCert Global Root G3 -======================= ------BEGIN CERTIFICATE----- -MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV -UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD -VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw -MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k -aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C -AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O -YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP -BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp -Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y -3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34 -VOKa5Vt8sycX ------END CERTIFICATE----- - -DigiCert Trusted Root G4 -======================== ------BEGIN CERTIFICATE----- -MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG -EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw -HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 -MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G -CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp -pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o -k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa -vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY -QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6 -MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm -mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7 -f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH -dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8 -oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud -DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD -ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY -ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr -yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy -7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah -ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN -5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb -/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa -5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK -G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP -82Z+ ------END CERTIFICATE----- - -COMODO RSA Certification Authority -================================== ------BEGIN CERTIFICATE----- -MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE -BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG -A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC -R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE -ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn -dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ -FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+ -5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG -x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX -2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL -OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3 -sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C -GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5 -WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E -FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w -DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt -rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+ -nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg -tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW -sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp -pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA -zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq -ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 -7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I -LaZRfyHBNVOFBkpdn627G190 ------END CERTIFICATE----- - -USERTrust RSA Certification Authority -===================================== ------BEGIN CERTIFICATE----- -MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE -BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK -ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE -BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK -ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz -0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j -Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn -RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O -+T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq -/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE -Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM -lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8 -yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+ -eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd -BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF -MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW -FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ -7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ -Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM -8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi -FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi -yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c -J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw -sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx -Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9 ------END CERTIFICATE----- - -USERTrust ECC Certification Authority -===================================== ------BEGIN CERTIFICATE----- -MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC -VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU -aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC -VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU -aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2 -0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez -nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV -HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB -HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu -9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= ------END CERTIFICATE----- - -GlobalSign ECC Root CA - R4 -=========================== ------BEGIN CERTIFICATE----- -MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb -R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD -EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb -R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD -EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl -OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P -AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV -MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF -JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q= ------END CERTIFICATE----- - -GlobalSign ECC Root CA - R5 -=========================== ------BEGIN CERTIFICATE----- -MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb -R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD -EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb -R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD -EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6 -SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS -h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd -BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx -uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 -yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 ------END CERTIFICATE----- - -Staat der Nederlanden EV Root CA -================================ ------BEGIN CERTIFICATE----- -MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE -CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g -RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M -MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl -cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk -SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW -O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r -0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8 -Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV -XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr -08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV -0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd -74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx -fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa -ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI -eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu -c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq -5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN -b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN -f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi -5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4 -WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK -DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy -eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg== ------END CERTIFICATE----- - -IdenTrust Commercial Root CA 1 -============================== ------BEGIN CERTIFICATE----- -MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG -EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS -b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES -MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB -IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld -hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/ -mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi -1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C -XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl -3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy -NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV -WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg -xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix -uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC -AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI -hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH -6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg -ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt -ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV -YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX -feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro -kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe -2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz -Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R -cGzM7vRX+Bi6hG6H ------END CERTIFICATE----- - -IdenTrust Public Sector Root CA 1 -================================= ------BEGIN CERTIFICATE----- -MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG -EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv -ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV -UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS -b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy -P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6 -Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI -rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf -qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS -mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn -ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh -LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v -iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL -4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B -Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw -DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj -t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A -mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt -GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt -m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx -NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4 -Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI -ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC -ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ -3Wl9af0AVqW3rLatt8o+Ae+c ------END CERTIFICATE----- - -Entrust Root Certification Authority - G2 -========================================= ------BEGIN CERTIFICATE----- -MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV -BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy -bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug -b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw -HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT -DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx -OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s -eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi -MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP -/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz -HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU -s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y -TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx -AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6 -0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z -iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ -Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi -nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+ -vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO -e4pIb4tF9g== ------END CERTIFICATE----- - -Entrust Root Certification Authority - EC1 -========================================== ------BEGIN CERTIFICATE----- -MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx -FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn -YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl -ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 -IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw -FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs -LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg -dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt -IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy -AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef -9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE -FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h -vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8 -kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G ------END CERTIFICATE----- - -CFCA EV ROOT -============ ------BEGIN CERTIFICATE----- -MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE -CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB -IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw -MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD -DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV -BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD -7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN -uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW -ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7 -xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f -py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K -gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol -hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ -tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf -BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB -/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB -ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q -ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua -4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG -E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX -BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn -aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy -PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX -kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C -ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su ------END CERTIFICATE----- - -OISTE WISeKey Global Root GB CA -=============================== ------BEGIN CERTIFICATE----- -MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG -EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl -ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw -MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD -VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds -b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX -scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP -rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk -9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o -Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg -GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB -/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI -hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD -dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0 -VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui -HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic -Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= ------END CERTIFICATE----- - -SZAFIR ROOT CA2 -=============== ------BEGIN CERTIFICATE----- -MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG -A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV -BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ -BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD -VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q -qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK -DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE -2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ -ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi -ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P -AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC -AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5 -O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67 -oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul -4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6 -+/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw== ------END CERTIFICATE----- - -Certum Trusted Network CA 2 -=========================== ------BEGIN CERTIFICATE----- -MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE -BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1 -bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y -ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ -TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl -cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB -IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9 -7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o -CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b -Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p -uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130 -GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ -9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB -Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye -hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM -BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI -hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW -Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA -L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo -clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM -pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb -w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo -J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm -ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX -is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7 -zAYspsbiDrW5viSP ------END CERTIFICATE----- - -Hellenic Academic and Research Institutions RootCA 2015 -======================================================= ------BEGIN CERTIFICATE----- -MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT -BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0 -aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl -YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx -MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg -QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV -BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw -MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv -bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh -iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+ -6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd -FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr -i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F -GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2 -fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu -iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc -Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI -hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+ -D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM -d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y -d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn -82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb -davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F -Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt -J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa -JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q -p/UsQu0yrbYhnr68 ------END CERTIFICATE----- - -Hellenic Academic and Research Institutions ECC RootCA 2015 -=========================================================== ------BEGIN CERTIFICATE----- -MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0 -aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u -cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj -aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw -MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj -IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD -VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290 -Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP -dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK -Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O -BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA -GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn -dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR ------END CERTIFICATE----- - -ISRG Root X1 -============ ------BEGIN CERTIFICATE----- -MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE -BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD -EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG -EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT -DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r -Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1 -3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K -b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN -Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ -4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf -1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu -hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH -usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r -OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G -A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY -9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL -ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV -0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt -hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw -TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx -e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA -JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD -YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n -JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ -m+kXQ99b21/+jh5Xos1AnX5iItreGCc= ------END CERTIFICATE----- - -AC RAIZ FNMT-RCM -================ ------BEGIN CERTIFICATE----- -MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT -AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw -MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD -TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC -ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf -qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr -btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL -j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou -08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw -WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT -tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ -47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC -ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa -i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE -FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o -dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD -nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s -D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ -j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT -Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW -+YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7 -Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d -8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm -5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG -rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM= ------END CERTIFICATE----- - -Amazon Root CA 1 -================ ------BEGIN CERTIFICATE----- -MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD -VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1 -MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv -bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH -FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ -gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t -dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce -VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB -/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3 -DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM -CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy -8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa -2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2 -xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5 ------END CERTIFICATE----- - -Amazon Root CA 2 -================ ------BEGIN CERTIFICATE----- -MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD -VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1 -MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv -bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC -ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4 -kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp -N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9 -AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd -fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx -kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS -btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0 -Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN -c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+ -3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw -DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA -A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY -+gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE -YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW -xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ -gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW -aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV -Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3 -KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi -JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw= ------END CERTIFICATE----- - -Amazon Root CA 3 -================ ------BEGIN CERTIFICATE----- -MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG -EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy -NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ -MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB -f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr -Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43 -rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc -eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw== ------END CERTIFICATE----- - -Amazon Root CA 4 -================ ------BEGIN CERTIFICATE----- -MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG -EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy -NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ -MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN -/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri -83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV -HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA -MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1 -AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA== ------END CERTIFICATE----- - -TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 -============================================= ------BEGIN CERTIFICATE----- -MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT -D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr -IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g -TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp -ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD -VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt -c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth -bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11 -IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8 -6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc -wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0 -3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9 -WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU -ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ -KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh -AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc -lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R -e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j -q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= ------END CERTIFICATE----- - -GDCA TrustAUTH R5 ROOT -====================== ------BEGIN CERTIFICATE----- -MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw -BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD -DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow -YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ -IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs -AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p -OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr -pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ -9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ -xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM -R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ -D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4 -oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx -9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg -p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9 -H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35 -6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd -+PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ -HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD -F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ -8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv -/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT -aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== ------END CERTIFICATE----- - -TrustCor RootCert CA-1 -====================== ------BEGIN CERTIFICATE----- -MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP -MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig -U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp -dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx -MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu -YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe -VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy -dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq -jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4 -pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0 -JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h -gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw -/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j -BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5 -mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf -ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C -qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P -3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk= ------END CERTIFICATE----- - -TrustCor RootCert CA-2 -====================== ------BEGIN CERTIFICATE----- -MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w -DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT -eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0 -eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy -MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h -bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U -cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0 -IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb -ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk -RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1 -oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb -XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1 -/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q -jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP -eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg -rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh -8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU -2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD -VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h -Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp -kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv -2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3 -S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw -PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv -DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU -RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE -xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX -RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ ------END CERTIFICATE----- - -TrustCor ECA-1 -============== ------BEGIN CERTIFICATE----- -MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP -MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig -U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp -dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw -N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5 -MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y -IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR -MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23 -xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc -p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+ -fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj -YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL -f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u -/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F -hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs -J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC -jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g== ------END CERTIFICATE----- - -SSL.com Root Certification Authority RSA -======================================== ------BEGIN CERTIFICATE----- -MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM -BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x -MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw -MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx -EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM -LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C -Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8 -P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge -oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp -k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z -fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ -gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2 -UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8 -1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s -bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV -HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE -AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr -dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf -ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl -u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq -erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj -MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ -vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI -Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y -wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI -WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k= ------END CERTIFICATE----- - -SSL.com Root Certification Authority ECC -======================================== ------BEGIN CERTIFICATE----- -MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV -BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv -BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy -MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO -BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv -bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA -BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+ -8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR -hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT -jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW -e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z -5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl ------END CERTIFICATE----- - -SSL.com EV Root Certification Authority RSA R2 -============================================== ------BEGIN CERTIFICATE----- -MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w -DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u -MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy -MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI -DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD -VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN -BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh -hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w -cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO -Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+ -B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh -CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim -9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto -RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm -JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48 -+qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV -HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp -qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1 -++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx -Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G -guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz -OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7 -CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq -lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR -rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1 -hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX -9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== ------END CERTIFICATE----- - -SSL.com EV Root Certification Authority ECC -=========================================== ------BEGIN CERTIFICATE----- -MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV -BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy -BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw -MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx -EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM -LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB -BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy -3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O -BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe -5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ -N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm -m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== ------END CERTIFICATE----- - -GlobalSign Root CA - R6 -======================= ------BEGIN CERTIFICATE----- -MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEgMB4GA1UECxMX -R2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds -b2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQxMjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9i -YWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs -U2lnbjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQss -grRIxutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1kZguSgMpE -3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxDaNc9PIrFsmbVkJq3MQbF -vuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJwLnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqM -PKq0pPbzlUoSB239jLKJz9CgYXfIWHSw1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+ -azayOeSsJDa38O+2HBNXk7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05O -WgtH8wY2SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/hbguy -CLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4nWUx2OVvq+aWh2IMP -0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpYrZxCRXluDocZXFSxZba/jJvcE+kN -b7gu3GduyYsRtYQUigAZcIN5kZeR1BonvzceMgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQE -AwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNV -HSMEGDAWgBSubAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN -nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGtIxg93eFyRJa0 -lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr6155wsTLxDKZmOMNOsIeDjHfrY -BzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLjvUYAGm0CuiVdjaExUd1URhxN25mW7xocBFym -Fe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr -3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1 -0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T -uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK -oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t -JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA= ------END CERTIFICATE----- - -OISTE WISeKey Global Root GC CA -=============================== ------BEGIN CERTIFICATE----- -MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD -SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo -MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa -Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL -ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh -bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr -VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab -NTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd -BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E -AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk -AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 ------END CERTIFICATE----- - -GTS Root R1 -=========== ------BEGIN CERTIFICATE----- -MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG -EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv -b3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG -A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx -9vaMf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7r -aKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnW -r4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqM -LnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly -4cpk9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr -06zqkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92 -wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om -3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNu -JLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD -VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEM -BQADggIBADiWCu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1 -d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6ZXPYfcX3v73sv -fuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZRgyFmxhE+885H7pwoHyXa/6xm -ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b -gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq -4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr -tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo -pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0 -sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql -CFF1pkgl ------END CERTIFICATE----- - -GTS Root R2 -=========== ------BEGIN CERTIFICATE----- -MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG -EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv -b3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG -A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTuk -k3LvCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo -7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWI -m8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5Gm -dFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbu -ak7MkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscsz -cTJGr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW -Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73Vululycsl -aVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy -5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD -VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEM -BQADggIBALZp8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT -vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiTz9D2PGcDFWEJ -+YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiApJiS4wGWAqoC7o87xdFtCjMw -c3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvbpxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3Da -WsYDQvTtN6LwG1BUSw7YhN4ZKJmBR64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5r -n/WkhLx3+WuXrD5RRaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56Gtmwfu -Nmsk0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC5AwiWVIQ -7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiFizoHCBy69Y9Vmhh1fuXs -gWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLnyOd/xCxgXS/Dr55FBcOEArf9LAhST4Ld -o/DUhgkC ------END CERTIFICATE----- - -GTS Root R3 -=========== ------BEGIN CERTIFICATE----- -MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV -UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg -UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE -ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq -hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU -Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej -QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP -0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0 -glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa -KaqW04MjyaR7YbPMAuhd ------END CERTIFICATE----- - -GTS Root R4 -=========== ------BEGIN CERTIFICATE----- -MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV -UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg -UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE -ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq -hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa -6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj -QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV -2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI -N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x -zPKwTdb+mciUqXWi4w== ------END CERTIFICATE----- - -UCA Global G2 Root -================== ------BEGIN CERTIFICATE----- -MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG -EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x -NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU -cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT -oni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV -8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS -h6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o -LTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/ -R+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe -KW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa -4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc -OxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97 -8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O -BBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo -5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5 -1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A -Ds0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9 -yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX -c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo -jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk -bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x -ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn -RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A== ------END CERTIFICATE----- - -UCA Extended Validation Root -============================ ------BEGIN CERTIFICATE----- -MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG -EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u -IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G -A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs -iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF -Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu -eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR -59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH -0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR -el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv -B0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth -WG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS -NwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS -3H5aBZ8eNJr34RQwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL -BQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR -ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM -aVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4 -dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb -+7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW -F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi -GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc -GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi -djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr -dhh2n1ax ------END CERTIFICATE----- - -Certigna Root CA -================ ------BEGIN CERTIFICATE----- -MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE -BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ -MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda -MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz -MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC -DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX -stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz -KNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8 -JXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16 -XdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq -4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej -wpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ -lXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI -jzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/ -/TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw -HQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of -1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy -dGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h -LmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl -cnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt -OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP -TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq -7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3 -4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd -8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS -6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY -tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS -aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde -E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= ------END CERTIFICATE----- - -emSign Root CA - G1 -=================== ------BEGIN CERTIFICATE----- -MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET -MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl -ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx -ODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk -aHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN -LnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1 -cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW -DV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ -6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH -hQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG -MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2 -vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q -NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q -+Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih -U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx -iN66zB+Afko= ------END CERTIFICATE----- - -emSign ECC Root CA - G3 -======================= ------BEGIN CERTIFICATE----- -MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG -A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg -MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4 -MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11 -ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g -RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc -58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr -MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC -AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D -CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7 -jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj ------END CERTIFICATE----- - -emSign Root CA - C1 -=================== ------BEGIN CERTIFICATE----- -MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx -EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp -Z24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE -BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD -ExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up -ufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/ -Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX -OFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V -I5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms -lMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+ -XJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD -ggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp -/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1 -NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9 -wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ -BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI= ------END CERTIFICATE----- - -emSign ECC Root CA - C3 -======================= ------BEGIN CERTIFICATE----- -MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG -A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF -Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE -BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD -ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd -6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9 -SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA -B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA -MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU -ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ== ------END CERTIFICATE----- - -Hongkong Post Root CA 3 -======================= ------BEGIN CERTIFICATE----- -MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG -A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK -Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2 -MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv -bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX -SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz -iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf -jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim -5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe -sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj -0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/ -JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u -y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h -+bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG -xVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID -AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e -i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN -AQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw -W62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld -y8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov -+BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc -eqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw -9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7 -nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY -hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB -60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq -dBb9HxEGmpv0 ------END CERTIFICATE----- - -Entrust Root Certification Authority - G4 -========================================= ------BEGIN CERTIFICATE----- -MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJBgNV -BAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3Qu -bmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1 -dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1 -dGhvcml0eSAtIEc0MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYT -AlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0 -L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhv -cml0eSAtIEc0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3D -umSXbcr3DbVZwbPLqGgZ2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV -3imz/f3ET+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j5pds -8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAMC1rlLAHGVK/XqsEQ -e9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73TDtTUXm6Hnmo9RR3RXRv06QqsYJn7 -ibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNXwbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5X -xNMhIWNlUpEbsZmOeX7m640A2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV -7rtNOzK+mndmnqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8 -dWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwlN4y6mACXi0mW -Hv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNjc0kCAwEAAaNCMEAwDwYDVR0T -AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9n -MA0GCSqGSIb3DQEBCwUAA4ICAQAS5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4Q -jbRaZIxowLByQzTSGwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht -7LGrhFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/B7NTeLUK -YvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uIAeV8KEsD+UmDfLJ/fOPt -jqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbwH5Lk6rWS02FREAutp9lfx1/cH6NcjKF+ -m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKW -RGhXxNUzzxkvFMSUHHuk2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjA -JOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G -+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuYn/PIjhs4ViFqUZPT -kcpG2om3PVODLAgfi49T3f+sHw== ------END CERTIFICATE----- - -Microsoft ECC Root Certificate Authority 2017 -============================================= ------BEGIN CERTIFICATE----- -MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV -UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQgRUND -IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4 -MjMxNjA0WjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw -NAYDVQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwdjAQ -BgcqhkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBEyPNgASGAlEvaqiBYgtlzPbKnR5vSmZRogPZnZH6 -thaxjG7efM3beaYvzrvOcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYbhGBKia/teQ87zvH2RPUB -eMCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTIy5lycFIM -+Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3FQEEAwIBADAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlf -Xu5gKcs68tvWMoQZP3zVL8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaR -eNtUjGUBiudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M= ------END CERTIFICATE----- - -Microsoft RSA Root Certificate Authority 2017 -============================================= ------BEGIN CERTIFICATE----- -MIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBlMQswCQYDVQQG -EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQg -UlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwHhcNMTkxMjE4MjI1MTIyWhcNNDIw -NzE4MjMwMDIzWjBlMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u -MTYwNAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcw -ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW9R2LBifOZNt9GkMml -7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTELy/xztokLaCLeX0ZdDMbRnMlfl7rEqUrQ7e -S0MdhweSE5CAg2Q1OQT85elss7YfUJQ4ZVBcF0a5toW1HLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw7 -1VdyvD/IybLeS2v4I2wDwAW9lcfNcztmgGTjGqwu+UcF8ga2m3P1eDNbx6H7JyqhtJqRjJHTOoI+ -dkC0zVJhUXAoP8XFWvLJjEm7FFtNyP9nTUwSlq31/niol4fX/V4ggNyhSyL71Imtus5Hl0dVe49F -yGcohJUcaDDv70ngNXtk55iwlNpNhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaGYaRS -MLl6IE9vDzhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6W6IYZVcSn2i51BVr -lMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4KUGsTuqwPN1q3ErWQgR5WrlcihtnJ -0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPSMQH+FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJ -ClTUFLkqqNfs+avNJVgyeY+QW5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCAYYw -DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNnpv7tNsiMwEAYJKwYBBAGC -NxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBAKyvPl3CEZaJjqPnktaXFbgToqZCLgLNFgVZJ8og -6Lq46BrsTaiXVq5lQ7GPAJtSzVXNUzltYkyLDVt8LkS/gxCP81OCgMNPOsduET/m4xaRhPtthH80 -dK2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6tZRGrox/2KJQJWVggEbbMwSubLWYdFQl3JPk -+ONVFT24bcMKpBLBaYVu32TxU5nhSnUgnZUP5NbcA/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex -/2kskZGT4d9Mozd2TaGf+G0eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDy -AmH3pvwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGsRGRxpl/j8nW -ZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2dxEuqPiAppGWSZI1b7rCoucL5mxAyE -7+WL85MB+GqQk2dLsmijtWKP6T+MejteD+eMuMZ87zf9dOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKT -c0QWbej09+CVgI+WXTik9KveCjCHk9hNAHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D -5KbvtwEwXlGjefVwaaZBRA+GsCyRxj3qrg+E ------END CERTIFICATE----- - -e-Szigno Root CA 2017 -===================== ------BEGIN CERTIFICATE----- -MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNVBAYTAkhVMREw -DwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUt -MjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJvb3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZa -Fw00MjA4MjIxMjA3MDZaMHExCzAJBgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UE -CgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3pp -Z25vIFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtvxie+RJCx -s1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+HWyx7xf58etqjYzBhMA8G -A1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSHERUI0arBeAyxr87GyZDv -vzAEwDAfBgNVHSMEGDAWgBSHERUI0arBeAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEA -tVfd14pVCzbhhkT61NlojbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxO -svxyqltZ+efcMQ== ------END CERTIFICATE----- - -certSIGN Root CA G2 -=================== ------BEGIN CERTIFICATE----- -MIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNVBAYTAlJPMRQw -EgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjAeFw0xNzAy -MDYwOTI3MzVaFw00MjAyMDYwOTI3MzVaMEExCzAJBgNVBAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lH -TiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP -ADCCAgoCggIBAMDFdRmRfUR0dIf+DjuW3NgBFszuY5HnC2/OOwppGnzC46+CjobXXo9X69MhWf05 -N0IwvlDqtg+piNguLWkh59E3GE59kdUWX2tbAMI5Qw02hVK5U2UPHULlj88F0+7cDBrZuIt4Imfk -abBoxTzkbFpG583H+u/E7Eu9aqSs/cwoUe+StCmrqzWaTOTECMYmzPhpn+Sc8CnTXPnGFiWeI8Mg -wT0PPzhAsP6CRDiqWhqKa2NYOLQV07YRaXseVO6MGiKscpc/I1mbySKEwQdPzH/iV8oScLumZfNp -dWO9lfsbl83kqK/20U6o2YpxJM02PbyWxPFsqa7lzw1uKA2wDrXKUXt4FMMgL3/7FFXhEZn91Qqh -ngLjYl/rNUssuHLoPj1PrCy7Lobio3aP5ZMqz6WryFyNSwb/EkaseMsUBzXgqd+L6a8VTxaJW732 -jcZZroiFDsGJ6x9nxUWO/203Nit4ZoORUSs9/1F3dmKh7Gc+PoGD4FapUB8fepmrY7+EF3fxDTvf -95xhszWYijqy7DwaNz9+j5LP2RIUZNoQAhVB/0/E6xyjyfqZ90bp4RjZsbgyLcsUDFDYg2WD7rlc -z8sFWkz6GZdr1l0T08JcVLwyc6B49fFtHsufpaafItzRUZ6CeWRgKRM+o/1Pcmqr4tTluCRVLERL -iohEnMqE0yo7AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1Ud -DgQWBBSCIS1mxteg4BXrzkwJd8RgnlRuAzANBgkqhkiG9w0BAQsFAAOCAgEAYN4auOfyYILVAzOB -ywaK8SJJ6ejqkX/GM15oGQOGO0MBzwdw5AgeZYWR5hEit/UCI46uuR59H35s5r0l1ZUa8gWmr4UC -b6741jH/JclKyMeKqdmfS0mbEVeZkkMR3rYzpMzXjWR91M08KCy0mpbqTfXERMQlqiCA2ClV9+BB -/AYm/7k29UMUA2Z44RGx2iBfRgB4ACGlHgAoYXhvqAEBj500mv/0OJD7uNGzcgbJceaBxXntC6Z5 -8hMLnPddDnskk7RI24Zf3lCGeOdA5jGokHZwYa+cNywRtYK3qq4kNFtyDGkNzVmf9nGvnAvRCjj5 -BiKDUyUM/FHE5r7iOZULJK2v0ZXkltd0ZGtxTgI8qoXzIKNDOXZbbFD+mpwUHmUUihW9o4JFWklW -atKcsWMy5WHgUyIOpwpJ6st+H6jiYoD2EEVSmAYY3qXNL3+q1Ok+CHLsIwMCPKaq2LxndD0UF/tU -Sxfj03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZkPuXaTH4M -NMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N -0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc= ------END CERTIFICATE----- - -Trustwave Global Certification Authority -======================================== ------BEGIN CERTIFICATE----- -MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV -UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 -ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u -IEF1dGhvcml0eTAeFw0xNzA4MjMxOTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJV -UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 -ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u -IEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALldUShLPDeS0YLOvR29 -zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0XznswuvCAAJWX/NKSqIk4cXGIDtiLK0thAf -LdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4Bq -stTnoApTAbqOl5F2brz81Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9o -WN0EACyW80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotPJqX+ -OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1lRtzuzWniTY+HKE40 -Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfwhI0Vcnyh78zyiGG69Gm7DIwLdVcE -uE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm -+9jaJXLE9gCxInm943xZYkqcBW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqj -ifLJS3tBEW1ntwiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1UdDwEB/wQEAwIB -BjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W0OhUKDtkLSGm+J1WE2pIPU/H -PinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfeuyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0H -ZJDmHvUqoai7PF35owgLEQzxPy0QlG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla -4gt5kNdXElE1GYhBaCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5R -vbbEsLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPTMaCm/zjd -zyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qequ5AvzSxnI9O4fKSTx+O -856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxhVicGaeVyQYHTtgGJoC86cnn+OjC/QezH -Yj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu -3R3y4G5OBVixwJAWKqQ9EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP -29FpHOTKyeC2nOnOcXHebD8WpHk= ------END CERTIFICATE----- - -Trustwave Global ECC P256 Certification Authority -================================================= ------BEGIN CERTIFICATE----- -MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER -MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI -b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZp -Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYD -VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy -dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1 -NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH77bOYj -43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoNFWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqm -P62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt -0UrrdaVKEJmzsaGLSvcwCgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjz -RM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7 ------END CERTIFICATE----- - -Trustwave Global ECC P384 Certification Authority -================================================= ------BEGIN CERTIFICATE----- -MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER -MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI -b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZp -Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYD -VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy -dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4 -NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGvaDXU1CDFH -Ba5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJj9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr -/TklZvFe/oyujUF5nQlgziip04pt89ZF1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNV -HQ8BAf8EBQMDBwYAMB0GA1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNn -ADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl -CrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw== ------END CERTIFICATE----- - -NAVER Global Root Certification Authority -========================================= ------BEGIN CERTIFICATE----- -MIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEMBQAwaTELMAkG -A1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRGT1JNIENvcnAuMTIwMAYDVQQD -DClOQVZFUiBHbG9iYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MTgwODU4 -NDJaFw0zNzA4MTgyMzU5NTlaMGkxCzAJBgNVBAYTAktSMSYwJAYDVQQKDB1OQVZFUiBCVVNJTkVT -UyBQTEFURk9STSBDb3JwLjEyMDAGA1UEAwwpTkFWRVIgR2xvYmFsIFJvb3QgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC21PGTXLVAiQqrDZBb -UGOukJR0F0Vy1ntlWilLp1agS7gvQnXp2XskWjFlqxcX0TM62RHcQDaH38dq6SZeWYp34+hInDEW -+j6RscrJo+KfziFTowI2MMtSAuXaMl3Dxeb57hHHi8lEHoSTGEq0n+USZGnQJoViAbbJAh2+g1G7 -XNr4rRVqmfeSVPc0W+m/6imBEtRTkZazkVrd/pBzKPswRrXKCAfHcXLJZtM0l/aM9BhK4dA9WkW2 -aacp+yPOiNgSnABIqKYPszuSjXEOdMWLyEz59JuOuDxp7W87UC9Y7cSw0BwbagzivESq2M0UXZR4 -Yb8ObtoqvC8MC3GmsxY/nOb5zJ9TNeIDoKAYv7vxvvTWjIcNQvcGufFt7QSUqP620wbGQGHfnZ3z -VHbOUzoBppJB7ASjjw2i1QnK1sua8e9DXcCrpUHPXFNwcMmIpi3Ua2FzUCaGYQ5fG8Ir4ozVu53B -A0K6lNpfqbDKzE0K70dpAy8i+/Eozr9dUGWokG2zdLAIx6yo0es+nPxdGoMuK8u180SdOqcXYZai -cdNwlhVNt0xz7hlcxVs+Qf6sdWA7G2POAN3aCJBitOUt7kinaxeZVL6HSuOpXgRM6xBtVNbv8ejy -YhbLgGvtPe31HzClrkvJE+2KAQHJuFFYwGY6sWZLxNUxAmLpdIQM201GLQIDAQABo0IwQDAdBgNV -HQ4EFgQU0p+I36HNLL3s9TsBAZMzJ7LrYEswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMB -Af8wDQYJKoZIhvcNAQEMBQADggIBADLKgLOdPVQG3dLSLvCkASELZ0jKbY7gyKoNqo0hV4/GPnrK -21HUUrPUloSlWGB/5QuOH/XcChWB5Tu2tyIvCZwTFrFsDDUIbatjcu3cvuzHV+YwIHHW1xDBE1UB -jCpD5EHxzzp6U5LOogMFDTjfArsQLtk70pt6wKGm+LUx5vR1yblTmXVHIloUFcd4G7ad6Qz4G3bx -hYTeodoS76TiEJd6eN4MUZeoIUCLhr0N8F5OSza7OyAfikJW4Qsav3vQIkMsRIz75Sq0bBwcupTg -E34h5prCy8VCZLQelHsIJchxzIdFV4XTnyliIoNRlwAYl3dqmJLJfGBs32x9SuRwTMKeuB330DTH -D8z7p/8Dvq1wkNoL3chtl1+afwkyQf3NosxabUzyqkn+Zvjp2DXrDige7kgvOtB5CTh8piKCk5XQ -A76+AqAF3SAi428diDRgxuYKuQl1C/AH6GmWNcf7I4GOODm4RStDeKLRLBT/DShycpWbXgnbiUSY -qqFJu3FS8r/2/yehNq+4tneI3TqkbZs0kNwUXTC/t+sX5Ie3cdCh13cV1ELX8vMxmV2b3RZtP+oG -I/hGoiLtk/bdmuYqh7GYVPEi92tF4+KOdh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmg -kpzNNIaRkPpkUZ3+/uul9XXeifdy ------END CERTIFICATE----- - -AC RAIZ FNMT-RCM SERVIDORES SEGUROS -=================================== ------BEGIN CERTIFICATE----- -MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQswCQYDVQQGEwJF -UzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgwFgYDVQRhDA9WQVRFUy1RMjgy -NjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1SQ00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4 -MTIyMDA5MzczM1oXDTQzMTIyMDA5MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQt -UkNNMQ4wDAYDVQQLDAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNB -QyBSQUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuBBAAiA2IA -BPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LHsbI6GA60XYyzZl2hNPk2 -LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oKUm8BA06Oi6NCMEAwDwYDVR0TAQH/BAUw -AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqG -SM49BAMDA2kAMGYCMQCuSuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoD -zBOQn5ICMQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJyv+c= ------END CERTIFICATE----- - -GlobalSign Root R46 -=================== ------BEGIN CERTIFICATE----- -MIIFWjCCA0KgAwIBAgISEdK7udcjGJ5AXwqdLdDfJWfRMA0GCSqGSIb3DQEBDAUAMEYxCzAJBgNV -BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJv -b3QgUjQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAX -BgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBSNDYwggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCsrHQy6LNl5brtQyYdpokNRbopiLKkHWPd08Es -CVeJOaFV6Wc0dwxu5FUdUiXSE2te4R2pt32JMl8Nnp8semNgQB+msLZ4j5lUlghYruQGvGIFAha/ -r6gjA7aUD7xubMLL1aa7DOn2wQL7Id5m3RerdELv8HQvJfTqa1VbkNud316HCkD7rRlr+/fKYIje -2sGP1q7Vf9Q8g+7XFkyDRTNrJ9CG0Bwta/OrffGFqfUo0q3v84RLHIf8E6M6cqJaESvWJ3En7YEt -bWaBkoe0G1h6zD8K+kZPTXhc+CtI4wSEy132tGqzZfxCnlEmIyDLPRT5ge1lFgBPGmSXZgjPjHvj -K8Cd+RTyG/FWaha/LIWFzXg4mutCagI0GIMXTpRW+LaCtfOW3T3zvn8gdz57GSNrLNRyc0NXfeD4 -12lPFzYE+cCQYDdF3uYM2HSNrpyibXRdQr4G9dlkbgIQrImwTDsHTUB+JMWKmIJ5jqSngiCNI/on -ccnfxkF0oE32kRbcRoxfKWMxWXEM2G/CtjJ9++ZdU6Z+Ffy7dXxd7Pj2Fxzsx2sZy/N78CsHpdls -eVR2bJ0cpm4O6XkMqCNqo98bMDGfsVR7/mrLZqrcZdCinkqaByFrgY/bxFn63iLABJzjqls2k+g9 -vXqhnQt2sQvHnf3PmKgGwvgqo6GDoLclcqUC4wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYD -VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA1yrc4GHqMywptWU4jaWSf8FmSwwDQYJKoZIhvcNAQEM -BQADggIBAHx47PYCLLtbfpIrXTncvtgdokIzTfnvpCo7RGkerNlFo048p9gkUbJUHJNOxO97k4Vg -JuoJSOD1u8fpaNK7ajFxzHmuEajwmf3lH7wvqMxX63bEIaZHU1VNaL8FpO7XJqti2kM3S+LGteWy -gxk6x9PbTZ4IevPuzz5i+6zoYMzRx6Fcg0XERczzF2sUyQQCPtIkpnnpHs6i58FZFZ8d4kuaPp92 -CC1r2LpXFNqD6v6MVenQTqnMdzGxRBF6XLE+0xRFFRhiJBPSy03OXIPBNvIQtQ6IbbjhVp+J3pZm -OUdkLG5NrmJ7v2B0GbhWrJKsFjLtrWhV/pi60zTe9Mlhww6G9kuEYO4Ne7UyWHmRVSyBQ7N0H3qq -JZ4d16GLuc1CLgSkZoNNiTW2bKg2SnkheCLQQrzRQDGQob4Ez8pn7fXwgNNgyYMqIgXQBztSvwye -qiv5u+YfjyW6hY0XHgL+XVAEV8/+LbzvXMAaq7afJMbfc2hIkCwU9D9SGuTSyxTDYWnP4vkYxboz -nxSjBF25cfe1lNj2M8FawTSLfJvdkzrnE6JwYZ+vj+vYxXX4M2bUdGc6N3ec592kD3ZDZopD8p/7 -DEJ4Y9HiD2971KE9dJeFt0g5QdYg/NA6s/rob8SKunE3vouXsXgxT7PntgMTzlSdriVZzH81Xwj3 -QEUxeCp6 ------END CERTIFICATE----- - -GlobalSign Root E46 -=================== ------BEGIN CERTIFICATE----- -MIICCzCCAZGgAwIBAgISEdK7ujNu1LzmJGjFDYQdmOhDMAoGCCqGSM49BAMDMEYxCzAJBgNVBAYT -AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJvb3Qg -RTQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAXBgNV -BAoTEEdsb2JhbFNpZ24gbnYtc2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBFNDYwdjAQBgcq -hkjOPQIBBgUrgQQAIgNiAAScDrHPt+ieUnd1NPqlRqetMhkytAepJ8qUuwzSChDH2omwlwxwEwkB -jtjqR+q+soArzfwoDdusvKSGN+1wCAB16pMLey5SnCNoIwZD7JIvU4Tb+0cUB+hflGddyXqBPCCj -QjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBQxCpCPtsad0kRL -gLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ7Zvvi5QCkxeCmb6zniz2C5GMn0oUsfZk -vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+ -CAezNIm8BZ/3Hobui3A= ------END CERTIFICATE----- - -GLOBALTRUST 2020 -================ ------BEGIN CERTIFICATE----- -MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx -IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT -VCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh -BgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy -MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi -D59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO -VPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3QWPKzv9pj2gOlTblzLmM -CcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPwyJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCm -fecqQjuCgGOlYx8ZzHyyZqjC0203b+J+BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKA -A1GqtH6qRNdDYfOiaxaJSaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9OR -JitHHmkHr96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj04KlG -DfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9MedKZssCz3AwyIDMvU -clOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIwq7ejMZdnrY8XD2zHc+0klGvIg5rQ -mjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUw -AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1Ud -IwQYMBaAFNwuH9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA -VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJCXtzoRlgHNQIw -4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd6IwPS3BD0IL/qMy/pJTAvoe9 -iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS -8cE54+X1+NZK3TTN+2/BT+MAi1bikvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2 -HcqtbepBEX4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS -vTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918 -oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF -YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl -gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg== ------END CERTIFICATE----- - -ANF Secure Server Root CA -========================= ------BEGIN CERTIFICATE----- -MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNVBAUTCUc2MzI4 -NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lv -bjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNVBAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3Qg -Q0EwHhcNMTkwOTA0MTAwMDM4WhcNMzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEw -MQswCQYDVQQGEwJFUzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQw -EgYDVQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQTCC -AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCjcqQZAZ2cC4Ffc0m6p6zz -BE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9qyGFOtibBTI3/TO80sh9l2Ll49a2pcbnv -T1gdpd50IJeh7WhM3pIXS7yr/2WanvtH2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcv -B2VSAKduyK9o7PQUlrZXH1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXse -zx76W0OLzc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyRp1RM -VwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQzW7i1o0TJrH93PB0j -7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/SiOL9V8BY9KHcyi1Swr1+KuCLH5z -JTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJnLNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe -8TZBAQIvfXOn3kLMTOmJDVb3n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVO -Hj1tyRRM4y5Bu8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj -o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAOBgNVHQ8BAf8E -BAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEATh65isagmD9uw2nAalxJ -UqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzx -j6ptBZNscsdW699QIyjlRRA96Gejrw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDt -dD+4E5UGUcjohybKpFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM -5gf0vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjqOknkJjCb -5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ/zo1PqVUSlJZS2Db7v54 -EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ92zg/LFis6ELhDtjTO0wugumDLmsx2d1H -hk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI+PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGy -g77FGr8H6lnco4g175x2MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3 -r5+qPeoott7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw= ------END CERTIFICATE----- - -Certum EC-384 CA -================ ------BEGIN CERTIFICATE----- -MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQswCQYDVQQGEwJQ -TDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2Vy -dGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2 -MDcyNDU0WhcNNDMwMzI2MDcyNDU0WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERh -dGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx -GTAXBgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATEKI6rGFtq -vm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7TmFy8as10CW4kjPMIRBSqn -iBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68KjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD -VR0OBBYEFI0GZnQkdjrzife81r1HfS+8EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNo -ADBlAjADVS2m5hjEfO/JUG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0 -QoSZ/6vnnvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k= ------END CERTIFICATE----- - -Certum Trusted Root CA -====================== ------BEGIN CERTIFICATE----- -MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6MQswCQYDVQQG -EwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0g -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0Ew -HhcNMTgwMzE2MTIxMDEzWhcNNDMwMzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMY -QXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBB -dXRob3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEB -AQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZn0EGze2jusDbCSzBfN8p -fktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/qp1x4EaTByIVcJdPTsuclzxFUl6s1wB52 -HO8AU5853BSlLCIls3Jy/I2z5T4IHhQqNwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2 -fJmItdUDmj0VDT06qKhF8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGt -g/BKEiJ3HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGamqi4 -NboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi7VdNIuJGmj8PkTQk -fVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSFytKAQd8FqKPVhJBPC/PgP5sZ0jeJ -P/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0PqafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSY -njYJdmZm/Bo/6khUHL4wvYBQv3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHK -HRzQ+8S1h9E6Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1 -vALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAEii1QAL -LtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4WxmB82M+w85bj/UvXgF2Ez8s -ALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvozMrnadyHncI013nR03e4qllY/p0m+jiGPp2K -h2RX5Rc64vmNueMzeMGQ2Ljdt4NR5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8 -CYyqOhNf6DR5UMEQGfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA -4kZf5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq0Uc9Nneo -WWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj -6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTMqJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmT -OPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck -bxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb ------END CERTIFICATE----- - -TunTrust Root CA -================ ------BEGIN CERTIFICATE----- -MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG -A1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj -dHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw -NDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD -ZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz -2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b -bjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7 -NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd -gjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW -VSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f -Tpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ -juXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas -DXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS -VXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI -04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0 -90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl -0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd -Ao74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY -YdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp -adbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x -xBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP -jCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM -MEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z -ZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r -AZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o= ------END CERTIFICATE----- - -HARICA TLS RSA Root CA 2021 -=========================== ------BEGIN CERTIFICATE----- -MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG -EwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u -cyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz -OFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl -bWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB -IFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN -JLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu -a2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y -Ulhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K -5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv -dmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR -0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH -GjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm -haZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ -CPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G -A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE -AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU -EapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq -QRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD -QpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR -j88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5 -vZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0 -qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6 -Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/ -PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn -kf3/W9b3raYvAwtt41dU63ZTGI0RmLo= ------END CERTIFICATE----- - -HARICA TLS ECC Root CA 2021 -=========================== ------BEGIN CERTIFICATE----- -MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH -UjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD -QTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX -DTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj -IGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv -b3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l -AEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b -ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW -0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi -rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw -CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps ------END CERTIFICATE----- diff --git a/tap_facebook/facebook_business/mixins.py b/tap_facebook/facebook_business/mixins.py deleted file mode 100644 index 9076748..0000000 --- a/tap_facebook/facebook_business/mixins.py +++ /dev/null @@ -1,202 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 -""" - -from facebook_business.exceptions import FacebookBadObjectError - -# @deprecated CanValidate is being deprecated -class CanValidate(object): - """ - An instance of CanValidate will allow the ad objects - to call remote_validate() to verify if its parameters are valid - """ - def remote_validate(self, params=None): - params = params or {} - data_cache = dict(self._data) - changes_cache = dict(self._changes) - params['execution_options'] = ['validate_only'] - self.save(params=params) - self._data = data_cache - self._changes = changes_cache - return self - - -# @deprecated CanArchive is being deprecated -class CanArchive(object): - - """ - An instance of CanArchive will allow the ad objects - to call remote_delete() to be deleted using a POST request against - the object's status field. - """ - def remote_delete( - self, - batch=None, - failure=None, - success=None - ): - return self.remote_update( - params={ - 'status': self.Status.deleted, - }, - batch=batch, - failure=failure, - success=success, - ) - - """ - An instance of CanArchive will allow the ad objects - to call remote_archive() to be archived - """ - def remote_archive( - self, - batch=None, - failure=None, - success=None - ): - return self.remote_update( - params={ - 'status': self.Status.archived, - }, - batch=batch, - failure=failure, - success=success, - ) - - -# @deprecated CannotCreate is being deprecated -class CannotCreate(object): - - """ - An instance of CannotCreate will raise a TypeError when calling - remote_create(). - """ - - @classmethod - def remote_create(cls, *args, **kwargs): - raise TypeError('Cannot create object of type %s.' % cls.__name__) - -# @deprecated CannotDelete is being deprecated -class CannotDelete(object): - - """ - An instance of CannotDelete will raise a TypeError when calling - remote_delete(). - """ - - @classmethod - def remote_delete(cls, *args, **kwargs): - raise TypeError('Cannot delete object of type %s.' % cls.__name__) - -# @deprecated CannotUpdate is being deprecated -class CannotUpdate(object): - - """ - An instance of CannotUpdate will raise a TypeError when calling - remote_update(). - """ - - @classmethod - def remote_update(cls, *args, **kwargs): - raise TypeError('Cannot update object of type %s.' % cls.__name__) - -# @deprecated HasObjective is being deprecated -class HasObjective(object): - - """ - An instance of HasObjective will have an enum attribute Objective. - """ - - class Objective(object): - app_installs = 'APP_INSTALLS' - brand_awareness = 'BRAND_AWARENESS' - conversions = 'CONVERSIONS' - 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' - -# @deprecated HasStatus is being deprecated -class HasStatus(object): - - """ - An instance of HasStatus will have an enum attribute Status. - """ - - class Status(object): - active = 'ACTIVE' - archived = 'ARCHIVED' - deleted = 'DELETED' - paused = 'PAUSED' - -# @deprecated HasBidInfo is being deprecated -class HasBidInfo(object): - - """ - An instance of HasBidInfo will have an enum attribute BidInfo. - """ - - class BidInfo(object): - actions = 'ACTIONS' - clicks = 'CLICKS' - impressions = 'IMPRESSIONS' - reach = 'REACH' - social = 'SOCIAL' - -class HasAdLabels(object): - - def add_labels(self, labels=None): - """Adds labels to an ad object. - Args: - labels: A list of ad label IDs - Returns: - The FacebookResponse object. - """ - return self.get_api_assured().call( - 'POST', - (self.get_id_assured(), 'adlabels'), - params={'adlabels': [{'id': label} for label in labels]}, - ) - - def remove_labels(self, labels=None): - """Remove labels to an ad object. - Args: - labels: A list of ad label IDs - Returns: - The FacebookResponse object. - """ - return self.get_api_assured().call( - 'DELETE', - (self.get_id_assured(), 'adlabels'), - params={'adlabels': [{'id': label} for label in labels]}, - ) - -class ValidatesFields(object): - def __setitem__(self, key, value): - if key not in self.Field.__dict__: - raise FacebookBadObjectError( - "\"%s\" is not a valid field of %s" - % (key, self.__class__.__name__) - ) - else: - super(ValidatesFields, self).__setitem__(key, value) diff --git a/tap_facebook/facebook_business/session.py b/tap_facebook/facebook_business/session.py deleted file mode 100644 index 3dad0d9..0000000 --- a/tap_facebook/facebook_business/session.py +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 purpose of the session module is to encapsulate authentication classes and -utilities. -""" -import hashlib -import hmac -import requests -import os - - -class FacebookSession(object): - """ - FacebookSession manages the the Graph API authentication and https - connection. - - Attributes: - GRAPH (class): The graph url without an ending forward-slash. - app_id: The application id. - app_secret: The application secret. - access_token: The access token. - appsecret_proof: The application secret proof. - proxies: Object containing proxies for 'http' and 'https' - requests: The python requests object through which calls to the api can - be made. - """ - GRAPH = 'https://graph.facebook.com' - - def __init__(self, app_id=None, app_secret=None, access_token=None, - proxies=None, timeout=None, debug=False): - """ - Initializes and populates the instance attributes with app_id, - app_secret, access_token, appsecret_proof, proxies, timeout and requests - given arguments app_id, app_secret, access_token, proxies and timeout. - """ - self.app_id = app_id - self.app_secret = app_secret - self.access_token = access_token - self.proxies = proxies - self.timeout = timeout - self.debug = debug - self.requests = requests.Session() - self.requests.verify = os.path.join( - os.path.dirname(__file__), - 'fb_ca_chain_bundle.crt', - ) - params = { - 'access_token': self.access_token - } - if app_secret: - params['appsecret_proof'] = self._gen_appsecret_proof() - self.requests.params.update(params) - - if self.proxies: - self.requests.proxies.update(self.proxies) - - def _gen_appsecret_proof(self): - h = hmac.new( - self.app_secret.encode('utf-8'), - msg=self.access_token.encode('utf-8'), - digestmod=hashlib.sha256 - ) - - self.appsecret_proof = h.hexdigest() - return self.appsecret_proof - -__all__ = ['FacebookSession'] diff --git a/tap_facebook/facebook_business/specs.py b/tap_facebook/facebook_business/specs.py deleted file mode 100644 index d4592e3..0000000 --- a/tap_facebook/facebook_business/specs.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 -in the Ads API. -""" - -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals -from facebook_business.adobjects.abstractobject import AbstractObject -from facebook_business.mixins import ValidatesFields -from facebook_business.adobjects import adcreativeobjectstoryspec -from facebook_business.adobjects import adcreativelinkdatachildattachment -from facebook_business.adobjects import adcreativelinkdata -from facebook_business.adobjects import adcreativetextdata -from facebook_business.adobjects import adcreativephotodata -from facebook_business.adobjects import adcreativevideodata -from facebook_business.adobjects import pagepost -from facebook_business.adobjects import user - - -class ObjectStorySpec(adcreativeobjectstoryspec.AdCreativeObjectStorySpec): - pass - - -class AttachmentData(adcreativelinkdatachildattachment.AdCreativeLinkDataChildAttachment): - pass - - -class LinkData(adcreativelinkdata.AdCreativeLinkData): - pass - - -class TemplateData(adcreativelinkdata.AdCreativeLinkData): - pass - - -class TextData(adcreativetextdata.AdCreativeTextData): - pass - - -class PhotoData(adcreativephotodata.AdCreativePhotoData): - pass - - -class VideoData(adcreativevideodata.AdCreativeVideoData): - pass - -class PagePostData(pagepost.PagePost): - pass - -class UserData(user.User): - pass - -class SlideshowSpec(ValidatesFields, AbstractObject): - class Field(object): - images_urls = 'images_urls' - duration_ms = 'duration_ms' - transition_ms = 'transition_ms' diff --git a/tap_facebook/facebook_business/test/__init__.py b/tap_facebook/facebook_business/test/__init__.py deleted file mode 100644 index 726eabc..0000000 --- a/tap_facebook/facebook_business/test/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['tests'] diff --git a/tap_facebook/facebook_business/test/docs.py b/tap_facebook/facebook_business/test/docs.py deleted file mode 100644 index 172291c..0000000 --- a/tap_facebook/facebook_business/test/docs.py +++ /dev/null @@ -1,702 +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. - -''' -Unit tests for the Python Facebook Business SDK. - -How to run: - python -m facebook_business.test.docs - python -m facebook_business.test.docs -v AdGroupDocsTestCase -''' - -import os -import sys -import json -from .docs_utils import * - - -class AdAccountDocsTestCase(DocsTestCase): - def setUp(self): - # Create Campaigns - campaign = self.create_campaign(1) - self.create_campaign(2) - # Create AdSets - adset = self.create_adset(1, campaign) - self.create_adset(2, campaign) - # Create Creatives - creative1 = self.create_creative(1) - creative2 = self.create_creative(2) - # Create AdGroups - ad = self.create_ad(1, adset, creative1) - self.create_ad(2, adset, creative2) - DocsDataStore.set('ad_id', ad.get_id()) - # Create Ad Labels - adlabel = self.create_adlabel() - DocsDataStore.set('adlabel_id', adlabel['id']) - # Create AdImage - image = self.create_image() - DocsDataStore.set('ad_account_image_hash', image['hash']) - - - def test_get_insights(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - insights = account.get_insights(fields=[ - Insights.Field.campaign_id, - Insights.Field.unique_clicks, - Insights.Field.impressions, - ], params={ - 'level': Insights.Level.campaign, - 'date_preset': Insights.Preset.yesterday, - }) - self.store_response(insights) - - def test_get_activities(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - activities = account.get_activities(fields=[ - Activity.Field.event_type, - Activity.Field.event_time, - ]) - self.store_response(activities[0]) - - def test_opt_out_user_from_targeting(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - response = account.opt_out_user_from_targeting( - schema=CustomAudience.Schema.email_hash, - users=['joe@example.com'], - ) - self.store_response(response) - - def test_get_campaigns(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - campaigns = account.get_campaigns(fields=[ - Campaign.Field.name, - Campaign.Field.configured_status, - ]) - self.store_response(campaigns) - - def test_get_ad_sets(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - adsets = account.get_ad_sets(fields=[ - AdSet.Field.name, - AdSet.Field.bid_info, - AdSet.Field.configured_status, - AdSet.Field.daily_budget, - AdSet.Field.targeting, - ]) - self.store_response(adsets) - - def test_get_ads(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - ads = account.get_ads(fields=[ - Ad.Field.name, - Ad.Field.configured_status, - Ad.Field.creative, - ]) - self.store_response(ads) - - def test_get_ad_users(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - users = account.get_ad_users() - self.store_response(users) - - def test_get_ad_creatives(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - creatives = account.get_ad_creatives(fields=[ - AdCreative.Field.name, - AdCreative.Field.image_hash, - ]) - self.store_response(creatives[0:2]) - - def test_get_ad_images(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - images = account.get_ad_images(fields=[ - AdImage.Field.hash, - ]) - self.store_response(images[0:2]) - - def test_get_ad_conversion_pixels(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - pixels = account.get_ad_conversion_pixels(fields=[ - AdImage.Field.hash, - ]) - self.store_response(pixels) - - def test_get_broad_category_targeting(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - bct = account.get_broad_category_targeting() - self.store_response(bct[0:2]) - - def test_get_connection_objects(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - connection_objects = account.get_connection_objects() - connection_objects = [ - co for co in connection_objects if co['id'] == '606699326111137'] - self.store_response(connection_objects) - - def test_get_custom_audiences(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - custom_audiences = account.get_custom_audiences() - self.store_response(custom_audiences[0:2]) - - def test_get_partner_categories(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - partner_categories = account.get_partner_categories() - self.store_response(partner_categories[0]) - - def test_get_rate_cards(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - rate_cards = account.get_rate_cards() - self.store_response(rate_cards[0:2]) - - def test_get_reach_estimate(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - reach_estimate = account.get_reach_estimate(params={ - 'currency': 'USD', - 'optimize_for': 'OFFSITE_CONVERSIONS', - 'targeting_spec': { - 'geo_locations': { - 'countries': ['US'], - } - } - }) - self.store_response(reach_estimate) - - def test_get_transactions(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - transactions = account.get_transactions() - self.store_response(transactions[0:2]) - - def test_get_ad_preview(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - ad_preview = account.get_ad_preview(params={ - 'creative': { - 'title': 'This is the title', - 'body': 'This is the body', - 'object_url': 'https://facebookmarketingpartners.com', - 'image_hash': DocsDataStore.get('ad_account_image_hash'), - }, - 'ad_format': 'RIGHT_COLUMN_STANDARD', - }) - self.store_response(ad_preview) - - def test_get_ads_pixels(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - pixels = account.get_ads_pixels(fields=[ - AdsPixel.Field.name, - AdsPixel.Field.id, - ]) - self.store_response(pixels) - - def test_get_targeting_description(self): - adgroup = Ad(DocsDataStore.get('ad_id')) - targeting = { - TargetingSpecsField.geo_locations: { - TargetingSpecsField.countries: ['US'], - }, - } - targeting_desc = adgroup.get_targeting_description(fields=[ - 'targetingsentencelines' - ], params={ - 'targeting_spec': targeting - }) - self.store_response(targeting_desc) - - def test_get_ad_labels(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - adlabels = account.get_ad_labels(fields=[ - AdLabel.Field.name, - AdLabel.Field.id, - ]) - self.store_response(adlabels) - - def test_get_ad_creatives_by_labels(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - adlabel_id = DocsDataStore.get('adlabel_id') - params = {'ad_label_ids': [adlabel_id], 'operator': 'ALL'} - adcreatives = account.get_ad_creatives_by_labels(fields=[ - AdLabel.Field.name, - AdLabel.Field.id, - ], params=params) - self.store_response(adcreatives) - - def test_get_ads_by_labels(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - adlabel_id = DocsDataStore.get('adlabel_id') - params = {'ad_label_ids': [adlabel_id], 'operator': 'ALL'} - ads = account.get_ads_by_labels(fields=[ - AdLabel.Field.name, - AdLabel.Field.id, - ], params=params) - self.store_response(ads) - - def test_get_adsets_by_labels(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - adlabel_id = DocsDataStore.get('adlabel_id') - params = {'ad_label_ids': [adlabel_id], 'operator': 'ALL'} - adsets = account.get_adsets_by_labels(fields=[ - AdLabel.Field.name, - AdLabel.Field.id, - ], params=params) - self.store_response(adsets) - - def test_get_campaigns_by_labels(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - adlabel_id = DocsDataStore.get('adlabel_id') - params = {'ad_label_ids': [adlabel_id], 'operator': 'ALL'} - campaigns = account.get_campaigns_by_labels(fields=[ - AdLabel.Field.name, - AdLabel.Field.id, - ], params=params) - self.store_response(campaigns) - - def test_get_minimum_budgets(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - min_budgets = account.get_minimum_budgets() - self.store_response(min_budgets[0:2]) - - -class AdUserDocsTestCase(DocsTestCase): - def test_get_ad_accounts(self): - user = AdUser('me') - accounts = user.get_ad_accounts(fields=[ - AdAccount.Field.name, - ]) - self.store_response(accounts[0:3]) - - def test_get_ad_account(self): - user = AdUser('me') - account = user.get_ad_account(fields=[ - AdAccount.Field.name, - ]) - self.store_response(account) - - def test_get_pages(self): - user = AdUser('me') - pages = user.get_pages(fields=[ - Page.Field.name, - ]) - self.store_response(pages) - - -class AdCreativeDocsTestCase(DocsTestCase): - def setUp(self): - creative = self.create_creative(1) - DocsDataStore.set('creative_id', creative.get_id()) - - def test_get_ad_preview(self): - creative = AdCreative(DocsDataStore.get('creative_id')) - preview = creative.get_ad_preview(params={ - 'ad_format': 'RIGHT_COLUMN_STANDARD', - }) - self.store_response(preview) - - -class AdDocsTestCase(DocsTestCase): - def setUp(self): - campaign = self.create_campaign(1) - adset = self.create_adset(1, campaign) - creative = self.create_creative_leads(1) - ad = self.create_ad(1, adset, creative) - DocsDataStore.set('ad_id', ad.get_id()) - - def test_get_ad_creatives(self): - ad = Ad(DocsDataStore.get('ad_id')) - creatives = ad.get_ad_creatives(fields=[AdCreative.Field.name]) - self.store_response(creatives) - - def test_get_targeting_description(self): - ad = Ad(DocsDataStore.get('ad_id')) - targeting_desc = ad.get_targeting_description(fields=[ - 'targetingsentencelines', - ]) - self.store_response(targeting_desc) - - def test_get_keyword_stats(self): - ad = Ad(DocsDataStore.get('ad_id')) - keywords = ad.get_keyword_stats() - self.store_response(keywords) - - def test_get_ad_preview(self): - ad = Ad(DocsDataStore.get('ad_id')) - ad_preview = ad.get_ad_preview(params={ - 'ad_format': 'RIGHT_COLUMN_STANDARD', - }) - self.store_response(ad_preview) - - def test_get_reach_estimate(self): - ad = Ad(DocsDataStore.get('ad_id')) - reach_estimate = ad.get_reach_estimate() - self.store_response(reach_estimate) - - def test_get_click_tracking_tag(self): - ad = Ad(DocsDataStore.get('ad_id')) - tag = ad.get_click_tracking_tag() - self.store_response(tag) - - def test_get_leads(self): - ad = Ad(DocsDataStore.get('ad_id')) - leads = ad.get_leads() - self.store_response(leads) - - -class AdImageDocsTestCase(DocsTestCase): - def setUp(self): - DocsDataStore.set( - 'image_zip', os.path.join(os.path.dirname(__file__), 'test.zip')) - DocsDataStore.set( - 'image_path', os.path.join(os.path.dirname(__file__), 'test.png')) - image = AdImage(parent_id=DocsDataStore.get('adaccount_id')) - image[AdImage.Field.filename] = DocsDataStore.get('image_path') - image.remote_create() - DocsDataStore.set('image_id', image['id']) - - def test_remote_create(self): - image = AdImage(parent_id=DocsDataStore.get('adaccount_id')) - image[AdImage.Field.filename] = DocsDataStore.get('image_path') - image.remote_create() - self.store_response(image) - - def test_remote_create_from_zip(self): - images = AdImage.remote_create_from_zip( - filename=DocsDataStore.get('image_zip'), - parent_id=DocsDataStore.get('adaccount_id'), - ) - self.store_response(images) - - def test_remote_read(self): - image = AdImage(DocsDataStore.get('image_id')) - image.remote_read() - self.store_response(image) - - def test_get_hash(self): - image = AdImage(DocsDataStore.get('image_id')) - image.remote_read() - image_hash = image.get_hash() - self.store_response(image_hash) - - -class AdSetDocsTestCase(DocsTestCase): - def setUp(self): - campaign = self.create_campaign(1) - adset = self.create_adset(1, campaign) - creative1 = self.create_creative(1) - creative2 = self.create_creative(2) - self.create_ad(1, adset, creative1) - self.create_ad(2, adset, creative2) - DocsDataStore.set('adcampaign_id', campaign.get_id()) - DocsDataStore.set('adset_id', adset.get_id()) - - def test_get_ads(self): - adset = AdSet(DocsDataStore.get('adset_id')) - adgroups = adset.get_ads(fields=[ - AdSet.Field.name, - AdSet.Field.campaign_id, - AdSet.Field.configured_status, - ]) - self.store_response(adgroups) - - def test_get_ad_creatives(self): - adset = AdSet(DocsDataStore.get('adset_id')) - adcreatives = adset.get_ad_creatives(fields=[ - AdCreative.Field.name, - AdCreative.Field.id, - AdCreative.Field.preview_url, - AdCreative.Field.call_to_action_type, - ]) - self.store_response(adcreatives) - - -class AdsPixelDocsTestCase(DocsTestCase): - - def setUp(self): - pixel = self.create_ads_pixel() - DocsDataStore.set('pixel_id', pixel.get_id()) - - def test_share_pixel_with_ad_account(self): - business_id = DocsDataStore.get('business_id') - act_id = DocsDataStore.get('adaccount_id') - destination_account_id = act_id.replace("act_", "") - pixel_id = DocsDataStore.get('pixel_id') - pixel = AdsPixel(pixel_id) - pixel.share_pixel_with_ad_account(business_id, destination_account_id) - self.store_response(pixel) - - def test_get_agencies(self): - pixel_id = DocsDataStore.get('pixel_id') - pixel = AdsPixel(pixel_id) - shared_agencies = pixel.get_agencies() - self.store_response(shared_agencies) - - def test_unshare_pixel_from_ad_account(self): - business_id = DocsDataStore.get('business_id') - account_id = DocsDataStore.get('adaccount_id').replace("act_", "") - pixel_id = DocsDataStore.get('pixel_id') - pixel = AdsPixel(pixel_id) - pixel.unshare_pixel_from_ad_account(business_id, account_id) - self.store_response(pixel) - - -class BusinessDocsTestCase(DocsTestCase): - def test_get_product_catalogs(self): - business = Business(DocsDataStore.get('business_id')) - catalogs = business.get_product_catalogs() - self.store_response(catalogs[0]) - - def test_get_insights(self): - business = Business(DocsDataStore.get('business_id')) - insights = business.get_insights(fields=[ - Insights.Field.campaign_id, - Insights.Field.unique_clicks, - Insights.Field.impressions, - ], params={ - 'level': Insights.Level.campaign, - 'date_preset': Insights.Preset.yesterday, - }) - self.store_response(insights) - - -class CustomAudienceDocsTestCase(DocsTestCase): - - def setUp(self): - ca = self.create_custom_audience() - DocsDataStore.set('ca_id', ca.get_id_assured()) - - def test_add_users(self): - custom_audience = CustomAudience(DocsDataStore.get('ca_id')) - response = custom_audience.add_users( - schema=CustomAudience.Schema.email_hash, - users=[ - 'joe@example.com', - ] - ) - self.store_response(response) - - def test_remove_users(self): - custom_audience = CustomAudience(DocsDataStore.get('ca_id')) - response = custom_audience.remove_users( - schema=CustomAudience.Schema.email_hash, - users=[ - 'joe@example.com', - ] - ) - self.store_response(response) - - def test_format_params(self): - formatted_params = CustomAudience.format_params( - schema=CustomAudience.Schema.email_hash, - users=['joe@example.com'], - ) - self.store_response(formatted_params) - - -class CampaignDocsTestCase(DocsTestCase): - def setUp(self): - campaign = self.create_campaign(1) - adset = self.create_adset(1, campaign) - self.create_adset(2, campaign) - creative = self.create_creative(1) - self.create_ad(1, adset, creative) - self.create_ad(2, adset, creative) - DocsDataStore.set('campaign_id', campaign.get_id()) - - def test_get_ad_sets(self): - campaign = Campaign(DocsDataStore.get('campaign_id')) - adsets = campaign.get_ad_sets(fields=[ - AdSet.Field.name, - AdSet.Field.id, - AdSet.Field.daily_budget, - ]) - self.store_response(adsets[0]) - - def test_get_ads(self): - campaign = Campaign(DocsDataStore.get('campaign_id')) - ads = campaign.get_ads(fields=[ - Ad.Field.name, - Ad.Field.configured_status, - Ad.Field.creative, - ]) - self.store_response(ads) - - -class ProductGroupDocsTestCase(DocsTestCase): - pass - - -class ProductFeedDocsTestCase(DocsTestCase): - - def setUp(self): - product_catalog = self.create_product_catalog() - DocsDataStore.set('dpa_catalog_id', product_catalog.get_id()) - product_feed = self.create_product_feed(product_catalog.get_id()) - DocsDataStore.set('dpa_feed_id', product_feed.get_id()) - - def test_get_products(self): - feed = ProductFeed(DocsDataStore.get('dpa_feed_id')) - products = feed.get_products(fields=[ - Product.Field.title, - Product.Field.price, - ]) - self.store_response(products) - - -class ProductAudienceDocsTestCase(DocsTestCase): - pass - - -class ProductDocsTestCase(DocsTestCase): - pass - - -class ProductCatalogDocsTestCase(DocsTestCase): - - def setUp(self): - product_catalog = self.create_product_catalog() - DocsDataStore.set('dpa_catalog_id', product_catalog.get_id()) - pixel = self.create_ads_pixel() - DocsDataStore.set('pixel_id', pixel.get_id()) - - def test_get_product_feeds(self): - catalog = ProductCatalog(DocsDataStore.get('dpa_catalog_id')) - feeds = catalog.get_product_feeds() - self.store_response(feeds[0]) - - def test_add_external_event_sources(self): - catalog = ProductCatalog(DocsDataStore.get('dpa_catalog_id')) - response = catalog.add_external_event_sources(pixel_ids=[ - DocsDataStore.get('pixel_id'), - ]) - self.store_response(response) - - def test_get_external_event_sources(self): - catalog = ProductCatalog(DocsDataStore.get('dpa_catalog_id')) - sources = catalog.get_external_event_sources() - self.store_response(sources) - - def test_remove_external_event_sources(self): - catalog = ProductCatalog(DocsDataStore.get('dpa_catalog_id')) - response = catalog.remove_external_event_sources(pixel_ids=[ - DocsDataStore.get('pixel_id'), - ]) - self.store_response(response) - - -class ProductSetDocsTestCase(DocsTestCase): - - def setUp(self): - product_catalog = self.create_product_catalog() - DocsDataStore.set('dpa_catalog_id', product_catalog.get_id()) - product_set = self.create_product_set(product_catalog.get_id()) - DocsDataStore.set('dpa_set_id', product_set.get_id()) - - def test_get_product_groups(self): - product_set = ProductSet(DocsDataStore.get('dpa_set_id')) - product_groups = product_set.get_product_groups(fields=[ - Product.Field.title, - Product.Field.price, - ]) - self.store_response(product_groups) - - def test_get_products(self): - product_set = ProductSet(DocsDataStore.get('dpa_set_id')) - products = product_set.get_products(fields=[ - Product.Field.title, - Product.Field.price, - ]) - self.store_response(products) - - -class ProductFeedUploadErrorDocsTestCase(DocsTestCase): - pass - - -class AdConversionPixelDocsTestCase(DocsTestCase): - pass - - -class ClickTrackingTagDocsTestCase(DocsTestCase): - pass - - -class InsightsDocsTestCase(DocsTestCase): - pass - - -class PageDocsTestCase(DocsTestCase): - - def test_get_leadgen_forms(self): - page = Page(DocsDataStore.get('page_id')) - leadgen_forms = page.get_leadgen_forms() - self.store_response(leadgen_forms[0:2]) - -class ReachFrequencyPredictionDocsTestCase(DocsTestCase): - def setUp(self): - rfp = self.create_reach_frequency_prediction() - DocsDataStore.set('rfp_id', rfp.get_id()) - - def test_reserve(self): - pass - - def test_cancel(self): - pass - - -class TargetingSearchDocsTestCase(DocsTestCase): - def test_search(self): - results = TargetingSearch.search(params={ - 'q': 'United States', - 'type': TargetingSearch.TargetingSearchTypes.country, - 'limit': 2, - }) - self.store_response(results) - - -if __name__ == '__main__': - handle = open(DocsDataStore.get('filename'), 'w') - handle.write('') - handle.close() - - try: - config_file = open('./config.json') - except IOError: - print("No config file found, skipping docs tests") - sys.exit() - config = json.load(config_file) - config_file.close() - - act_id = "1505766289694659" - FacebookAdsApi.init( - config['app_id'], - config['app_secret'], - config['access_token'], - 'act_' + str(act_id) - ) - DocsDataStore.set('adaccount_id', 'act_' + str(act_id)) - DocsDataStore.set('adaccount_id_int', act_id) - DocsDataStore.set('business_id', '1454288444842444') - DocsDataStore.set('ca_id', '6026172406640') - DocsDataStore.set('dpa_catalog_id', '447683242047472') - DocsDataStore.set('dpa_set_id', '808641022536664') - DocsDataStore.set('dpa_feed_id', '1577689442497017') - DocsDataStore.set('dpa_upload_id', '1577690399163588') - DocsDataStore.set('as_user_id', '358829457619128') - DocsDataStore.set('pixel_id', '417531085081002') - DocsDataStore.set('page_id', config['page_id']) - - unittest.main() diff --git a/tap_facebook/facebook_business/test/docs_utils.py b/tap_facebook/facebook_business/test/docs_utils.py deleted file mode 100644 index 105b1b1..0000000 --- a/tap_facebook/facebook_business/test/docs_utils.py +++ /dev/null @@ -1,273 +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. - -import sys -import unittest -import inspect -import re -from ..objects import * -from ..specs import * -from ..exceptions import * - - -class DocsDataStore(object): - _data = {} - - @classmethod - def set(self, key, value): - self._data[key] = value - handle = open(DocsDataStore.get('filename'), 'a') - handle.write('docs_data#' + key + "\n" + value + "\n\n") - handle.close() - - @classmethod - def get(self, key): - return self._data[key] - - -linted_classes = [] - - -class DocsTestCase(unittest.TestCase): - def __init__(self, *args, **kwargs): - - super(DocsTestCase, self).__init__(*args, **kwargs) - - def get_aco_methods(): - sdk_obj = getattr(sys.modules[__name__], 'AbstractCrudObject') - members = inspect.getmembers(sdk_obj) - member_names = [m[0] for m in members] - return member_names - - errors = [] - warnings = [] - - sdk_class_name = re.sub(r'DocsTestCase$', '', self.__class__.__name__) - - if sdk_class_name not in linted_classes: - sdk_obj = getattr(sys.modules[__name__], sdk_class_name) - sdk_members = inspect.getmembers(sdk_obj, inspect.ismethod) - sdk_members = [m[0] for m in sdk_members - if m[0] not in get_aco_methods() and - not m[0].startswith('remote_')] - - members = inspect.getmembers(self, inspect.ismethod) - members = [m for m in members - if (m[0].startswith('test_'))] - for member in members: - expected_string = re.sub(r'^test_', '', member[0]) + "(" - sourcelines = inspect.getsourcelines(member[1])[0] - sourcelines.pop(0) - source = "".join(sourcelines).strip() - if expected_string not in source and source != "pass": - errors.append( - "Error: Expected method call to " + expected_string + - ") not used in " + self.__class__.__name__ + "::" + - member[0], - ) - - member_names = [m[0] for m in members] - for sdk_member in sdk_members: - if "test_" + sdk_member not in member_names: - warnings.append( - "Warning: Method defined in SDK not defined in " + - "test - " + sdk_class_name + "::" + sdk_member + "()", - ) - - if len(warnings) > 0: - print("\n".join(warnings)) - - if len(errors) > 0: - print("\n".join(errors)) - sys.exit() - - linted_classes.append(sdk_class_name) - - def tearDown(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - campaigns = account.get_campaigns() - for campaign in campaigns: - campaign.remote_delete() - - def verify(self, obj, output): - def strip_spacing(content): - content = str(content) - content = re.sub(r'\s+', ' ', content) - content = re.sub(r'\n|\r', '', content) - return content - - return strip_spacing(obj) == strip_spacing(output) - - def create_campaign(self, counter): - campaign = Campaign(parent_id=DocsDataStore.get('adaccount_id')) - campaign['name'] = "Campaign " + str(counter) - campaign['status'] = "PAUSED" - campaign.remote_create() - return campaign - - def create_adset(self, counter, campaign): - adset = AdSet(parent_id=DocsDataStore.get('adaccount_id')) - adset['name'] = "Ad Set " + str(counter) - adset['campaign_id'] = campaign['id'] - adset['daily_budget'] = 1000 - adset['bid_amount'] = 2 - adset['billing_event'] = 'LINK_CLICKS' - adset['optimization_goal'] = 'LINK_CLICKS' - adset['status'] = 'PAUSED' - adset['daily_budget'] = 1000 - adset['targeting'] = { - 'geo_locations': { - 'countries': ['US'], - }, - 'interests': [ - { - "id": "6003232518610", - "name": "Parenting", - }, - ], - } - adset.remote_create() - return adset - - def create_ad(self, counter, adset, creative): - adgroup = Ad(parent_id=DocsDataStore.get('adaccount_id')) - adgroup['name'] = "Ad " + str(counter) - adgroup['adset_id'] = adset['id'] - adgroup['creative'] = {'creative_id': creative.get_id()} - adgroup['status'] = 'PAUSED' - adgroup.remote_create() - return adgroup - - def create_creative(self, counter): - creative = AdCreative(parent_id=DocsDataStore.get('adaccount_id')) - creative['title'] = "My Creative " + str(counter) - creative['body'] = "This is my creative's body" - creative['object_url'] = "https://internet.org" - creative['image_hash'] = self.create_image()['hash'] - creative.remote_create() - return creative - - def create_creative_leads(self, counter): - image_hash = self.create_image()['hash'] - link_data = LinkData() - link_data[LinkData.Field.message] = 'try it out' - link_data[LinkData.Field.link] = "www.wikipedia.com" - link_data[LinkData.Field.caption] = 'Caption' - link_data[LinkData.Field.image_hash] = image_hash - - object_story_spec = ObjectStorySpec() - page_id = DocsDataStore.get('page_id') - object_story_spec[ObjectStorySpec.Field.page_id] = page_id - object_story_spec[ObjectStorySpec.Field.link_data] = link_data - - creative = AdCreative(parent_id=DocsDataStore.get('adaccount_id')) - creative[AdCreative.Field.name] = 'Test Creative' - creative[AdCreative.Field.object_story_spec] = object_story_spec - creative.remote_create() - return creative - - def create_image(self): - image = AdImage(parent_id=DocsDataStore.get('adaccount_id')) - image['filename'] = './facebook_business/test/misc/image.png' - image.remote_create() - return image - - def create_adlabel(self): - label = AdLabel(parent_id=DocsDataStore.get('adaccount_id')) - label[AdLabel.Field.name] = 'AdLabel name' - label.remote_create() - return label - - def create_custom_audience(self): - audience = CustomAudience(parent_id=DocsDataStore.get('adaccount_id')) - audience[CustomAudience.Field.subtype] = CustomAudience.Subtype.custom - audience[CustomAudience.Field.name] = 'Test Audience' - audience[CustomAudience.Field.description] = 'Autogen-docs example' - audience.remote_create() - return audience - - def create_reach_frequency_prediction(self): - act_id = DocsDataStore.get('adaccount_id') - rfp = ReachFrequencyPrediction(parent_id=act_id) - rfp['frequency_cap'] = 2 - rfp['start_time'] = 1449080260 - rfp['stop_time'] = 1449083860 - rfp['reach'] = 20 - rfp['story_event_type'] = 0 - rfp['prediction_mode'] = 0 - rfp['target_spec'] = { - 'geo_locations': { - 'countries': ['US'], - }, - } - rfp.remote_create() - return rfp - - def create_ads_pixel(self): - account = AdAccount(DocsDataStore.get('adaccount_id')) - pixel = account.get_ads_pixels([AdsPixel.Field.code]) - - if pixel is None: - pixel = AdsPixel(parent_id=DocsDataStore.get('adaccount_id')) - pixel[AdsPixel.Field.name] = unique_name('Test Pixel') - pixel.remote_create() - return pixel - - def create_product_catalog(self): - params = {} - params['name'] = 'Test Catalog' - product_catalog = ProductCatalog( - parent_id=DocsDataStore.get('business_id') - ) - product_catalog.update(params) - product_catalog.remote_create() - return product_catalog - - def create_product_set(self, product_catalog_id): - params = {} - params['name'] = 'Test Product Set' - product_set = ProductSet(parent_id=product_catalog_id) - product_set.update(params) - product_set.remote_create() - return product_set - - def create_product_feed(self, product_catalog_id): - product_feed = ProductFeed(parent_id=product_catalog_id) - product_feed[ProductFeed.Field.name] = 'Test Feed' - product_feed[ProductFeed.Field.schedule] = { - 'interval': 'DAILY', - 'url': 'http://www.example.com/sample_feed.tsv', - 'hour': 22, - } - product_feed.remote_create() - return product_feed - - def store_response(self, obj): - class_name = re.sub(r'DocsTestCase$', '', self.__class__.__name__) - method = inspect.stack()[1][3] - handle = open(DocsDataStore.get('filename'), 'a') - obj_str = str(obj) - obj_str = re.sub('<', '<', obj_str) - obj_str = re.sub('>', '>', obj_str) - handle.write(class_name + '#' + method + "\n" + obj_str + "\n\n") - handle.close() - - -DocsDataStore.set('filename', '/tmp/python_sdk_docs.nlsv') diff --git a/tap_facebook/facebook_business/test/integration_ad.py b/tap_facebook/facebook_business/test/integration_ad.py deleted file mode 100644 index 9f4ee7b..0000000 --- a/tap_facebook/facebook_business/test/integration_ad.py +++ /dev/null @@ -1,286 +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. - -''' -Unit tests for the Python Facebook Business SDK. - -How to run: - python -m facebook_business.test.integration_ad -''' - -import warnings -import json -from facebook_business.session import FacebookSession -from facebook_business.exceptions import FacebookRequestError -from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse -from facebook_business.adobjects.adaccount import AdAccount -from facebook_business.adobjects.adcreative import AdCreative -from facebook_business.adobjects.ad import Ad -from facebook_business.adobjects.targeting import Targeting -from facebook_business.adobjects.adsinsights import AdsInsights -from .integration_utils import * -from .integration_constant import * - - -# ad is renamed from adgroup in API -class AdTestCase(IntegrationTestCase): - def test_get_ad(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' - '"' + str(FieldName.AD_REVIEW_FEEDBACK) + '":' + str(TestValue.AD_REVIEW_FEEDBACK) + ',' - '"' + str(FieldName.ADLABELS) + '":' + str(TestValue.AD_LABEL) + ',' - '"' + str(FieldName.ADSET_ID) + '":"' + str(TestValue.ADSET_ID) + '",' - '"' + str(FieldName.BID_AMOUNT) + '":"' + str(TestValue.BID_AMOUNT) + '",' - '"' + str(FieldName.CONFIGURED_STATUS) + '":"' + str(TestValue.CONFIGURED_STATUS) + '",' - '"' + str(FieldName.CREATIVE) + '":' + str(TestValue.CREATIVE) + ',' - '"' + str(FieldName.EFFECTIVE_STATUS) + '":"' + str(TestValue.EFFECTIVE_STATUS) + '",' - '"' + str(FieldName.ISSUES_INFO) + '":' + str(TestValue.ISSUES_INFO) + ',' - '"' + str(FieldName.PRIORITY) + '":"' + str(TestValue.PRIORITY) + '",' - '"' + str(FieldName.TARGETING) + '":' + str(TestValue.TARGETING) + ',' - '"' + str(FieldName.DATE_FORMAT) + '":"' + str(TestValue.DATE_FORMAT) + '",' - '"' + str(FieldName.EXECUTION_OPTIONS) + '":"' + str(TestValue.EXECUTION_OPTIONS) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.ACCOUNT_ID, - FieldName.AD_REVIEW_FEEDBACK, - FieldName.ADLABELS, - FieldName.ADSET_ID, - FieldName.BID_AMOUNT, - FieldName.CONFIGURED_STATUS, - FieldName.CREATIVE, - FieldName.EFFECTIVE_STATUS, - FieldName.ISSUES_INFO, - FieldName.PRIORITY, - FieldName.TARGETING, - FieldName.DATE_FORMAT, - FieldName.EXECUTION_OPTIONS, - ] - params = {} - - ad = Ad(TestValue.AD_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(ad, Ad)) - self.assertEqual(ad[FieldName.ACCOUNT_ID], TestValue.ACCOUNT_ID) - self.assertEqual(ad[FieldName.AD_REVIEW_FEEDBACK], json.loads(TestValue.AD_REVIEW_FEEDBACK)) - self.assertEqual(ad[FieldName.ADLABELS], [json.loads(TestValue.AD_LABEL)]) - self.assertEqual(ad[FieldName.ADSET_ID], TestValue.ADSET_ID) - self.assertEqual(ad[FieldName.BID_AMOUNT], TestValue.BID_AMOUNT) - self.assertEqual(ad[FieldName.CONFIGURED_STATUS], TestValue.CONFIGURED_STATUS) - self.assertTrue(isinstance(ad[FieldName.CREATIVE], AdCreative)) - self.assertEqual(ad[FieldName.EFFECTIVE_STATUS], TestValue.EFFECTIVE_STATUS) - self.assertEqual(ad[FieldName.ISSUES_INFO], [json.loads(TestValue.ISSUES_INFO)]) - self.assertEqual(ad[FieldName.PRIORITY], TestValue.PRIORITY) - self.assertTrue(isinstance(ad[FieldName.TARGETING], Targeting)) - self.assertEqual(ad[FieldName.DATE_FORMAT], TestValue.DATE_FORMAT) - self.assertEqual(ad[FieldName.EXECUTION_OPTIONS], [TestValue.EXECUTION_OPTIONS]) - - - def test_get_ad_with_wrong_fields(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = {} - with self.assertRaises(FacebookRequestError): - ad = Ad(TestValue.AD_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 1) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - - def test_create_ad(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.AD_ID) + '", "success": "true"}') - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - FieldName.ACCOUNT_ID: TestValue.ACCOUNT_ID, - FieldName.AD_REVIEW_FEEDBACK: json.loads(TestValue.AD_REVIEW_FEEDBACK), - FieldName.ADLABELS: [json.loads(TestValue.AD_LABEL)], - FieldName.ADSET_ID: TestValue.ADSET_ID, - FieldName.BID_AMOUNT: TestValue.BID_AMOUNT, - FieldName.CONFIGURED_STATUS: TestValue.CONFIGURED_STATUS, - FieldName.CREATIVE: json.loads(TestValue.CREATIVE), - FieldName.EFFECTIVE_STATUS: TestValue.EFFECTIVE_STATUS, - FieldName.ISSUES_INFO: [json.loads(TestValue.ISSUES_INFO)], - FieldName.PRIORITY: TestValue.PRIORITY, - FieldName.TARGETING: json.loads(TestValue.TARGETING), - FieldName.DATE_FORMAT: TestValue.DATE_FORMAT, - FieldName.EXECUTION_OPTIONS: [TestValue.EXECUTION_OPTIONS], - } - - ad = AdAccount(TestValue.ACCOUNT_ID).create_ad( - fields, - params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(ad, Ad)) - self.assertEqual(ad[FieldName.ID], TestValue.AD_ID) - - - def test_create_ad_with_wrong_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - 'status': 'unexited_status', - 'priority': 'hight', - } - with self.assertRaises(FacebookRequestError): - ad = AdAccount(TestValue.ACCOUNT_ID).create_ad( - fields, - params, - ) - - self.assertEqual(len(warning), 2) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - - def test_get_ad_creatives(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '",' - '"' + str(FieldName.ID) + '":"' + str(TestValue.CREATIVE_ID) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.NAME, - FieldName.ID, - ] - params = {} - - creatives = Ad(TestValue.AD_ID).get_ad_creatives( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(creatives[0], AdCreative)) - self.assertEqual(creatives[0][FieldName.NAME], TestValue.NAME) - self.assertEqual(creatives[0][FieldName.ID], TestValue.CREATIVE_ID) - - - def test_get_ad_creatives_with_wrong_fields(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = {} - with self.assertRaises(FacebookRequestError): - creatives = Ad(TestValue.AD_ID).get_ad_creatives( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 1) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - - def test_get_insights(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.AD_NAME) + '":"' + str(TestValue.NAME) + '",' - '"' + str(FieldName.AD_ID) + '":"' + str(TestValue.AD_ID) + '",' - '"' + str(FieldName.DATE_START) + '":"' + str(TestValue.DATE_START) + '",' - '"' + str(FieldName.DATE_STOP) + '":"' + str(TestValue.DATE_STOP) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.AD_NAME, - ] - params = { - FieldName.ACTION_BREAKDOWNS: [TestValue.ACTION_BREAKDOWNS], - FieldName.ACTION_ATTRIBUTION_WINDOWS: [TestValue.ACTION_ATTRIBUTION_WINDOWS], - FieldName.DATE_PRESET: TestValue.DATE_PRESET, - FieldName.LEVEL: TestValue.LEVEL, - FieldName.SUMMARY_ACTION_BREAKDOWNS: [TestValue.SUMMARY_ACTION_BREAKDOWNS], - } - - ad_insights = Ad(TestValue.AD_ID).get_insights( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(ad_insights[0], AdsInsights)) - self.assertEqual(ad_insights[0][FieldName.AD_NAME], TestValue.NAME) - self.assertEqual(ad_insights[0][FieldName.DATE_START], TestValue.DATE_START) - self.assertEqual(ad_insights[0][FieldName.DATE_STOP], TestValue.DATE_STOP) - - - def test_get_insights_with_wrong_fields_and_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexisted_fields', - ] - params = { - FieldName.ACTION_BREAKDOWNS: 3, - FieldName.LEVEL: 'wrong_level', - } - with self.assertRaises(FacebookRequestError): - ad_insights = Ad(TestValue.AD_ID).get_insights( - fields, - params, - ) - - self.assertEqual(len(warning), 3) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - -if __name__ == '__main__': - unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_adaccount.py b/tap_facebook/facebook_business/test/integration_adaccount.py deleted file mode 100644 index 39e894c..0000000 --- a/tap_facebook/facebook_business/test/integration_adaccount.py +++ /dev/null @@ -1,385 +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. - -''' -Unit tests for the Python Facebook Business SDK. - -How to run: - python -m facebook_business.test.integration_adaccount -''' - -import warnings -import json -from facebook_business.session import FacebookSession -from facebook_business.exceptions import FacebookRequestError -from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse -from facebook_business.adobjects.adaccount import AdAccount -from facebook_business.adobjects.adcreative import AdCreative -from facebook_business.adobjects.ad import Ad -from facebook_business.adobjects.campaign import Campaign -from facebook_business.adobjects.adsinsights import AdsInsights -from facebook_business.adobjects.agencyclientdeclaration import AgencyClientDeclaration -from facebook_business.adobjects.business import Business -from facebook_business.adobjects.extendedcreditinvoicegroup import ExtendedCreditInvoiceGroup -from .integration_utils import * -from .integration_constant import * - - -class AdAccountTestCase(IntegrationTestCase): - def test_get_adaccount(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' - '"' + str(FieldName.ACCOUNT_STATUS) + '":' + str(TestValue.ACCOUNT_STATUS) + ',' - '"' + str(FieldName.AGE) + '":"' + str(TestValue.AGE) + '",' - '"' + str(FieldName.AGENCY_CLIENT_DECLARATION) + '":' + str(TestValue.AGENCY_CLIENT_DECLARATION) + ',' - '"' + str(FieldName.AMOUNT_SPENT) + '":"' + str(TestValue.AMOUNT_SPENT) + '",' - '"' + str(FieldName.BALANCE) + '":"' + str(TestValue.BALANCE) + '",' - '"' + str(FieldName.BUSINESS) + '":' + str(TestValue.BUSINESS) + ',' - '"' + str(FieldName.BUSINESS_CITY) + '":"' + str(TestValue.BUSINESS_CITY) + '",' - '"' + str(FieldName.CAPABILITIES) + '":"' + str(TestValue.CAPABILITIES) + '",' - '"' + str(FieldName.CURRENCY) + '":"' + str(TestValue.CURRENCY) + '",' - '"' + str(FieldName.DISABLE_REASON) + '":' + str(TestValue.DISABLE_REASON) + ',' - '"' + str(FieldName.EXTENDED_CREDIT_INVOICE_GROUP) + '":' + str(TestValue.EXTENDED_CREDIT_INVOICE_GROUP) + ',' - '"' + str(FieldName.FAILED_DELIVERY_CHECKS) + '":' + str(TestValue.FAILED_DELIVERY_CHECKS) + ',' - '"' + str(FieldName.HAS_PAGE_AUTHORIZED_ADACCOUNT) + '":"' + str(TestValue.HAS_PAGE_AUTHORIZED_ADACCOUNT) + '",' - '"' + str(FieldName.TOS_ACCEPTED) + '":' + str(TestValue.TOS_ACCEPTED) + '' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.ACCOUNT_ID, - FieldName.ACCOUNT_STATUS, - FieldName.AGE, - FieldName.AGENCY_CLIENT_DECLARATION, - FieldName.BALANCE, - FieldName.BUSINESS, - FieldName.BUSINESS_CITY, - FieldName.CAPABILITIES, - FieldName.CURRENCY, - FieldName.DISABLE_REASON, - FieldName.EXTENDED_CREDIT_INVOICE_GROUP, - FieldName.FAILED_DELIVERY_CHECKS, - FieldName.HAS_PAGE_AUTHORIZED_ADACCOUNT, - FieldName.TOS_ACCEPTED, - ] - params = {} - - account = AdAccount(TestValue.ACCOUNT_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(account, AdAccount)) - self.assertEqual(account[FieldName.ACCOUNT_ID],TestValue.ACCOUNT_ID) - self.assertEqual(account[FieldName.ACCOUNT_STATUS], TestValue.ACCOUNT_STATUS) - self.assertEqual(account[FieldName.AGE], TestValue.AGE) - self.assertTrue(isinstance(account[FieldName.AGENCY_CLIENT_DECLARATION], AgencyClientDeclaration)) - self.assertEqual(account[FieldName.BALANCE], TestValue.BALANCE) - self.assertTrue(isinstance(account[FieldName.BUSINESS], Business)) - self.assertEqual(account[FieldName.BUSINESS_CITY], TestValue.BUSINESS_CITY) - self.assertEqual(account[FieldName.CAPABILITIES], [TestValue.CAPABILITIES]) - self.assertEqual(account[FieldName.CURRENCY], TestValue.CURRENCY) - self.assertEqual(account[FieldName.DISABLE_REASON], TestValue.DISABLE_REASON) - self.assertTrue(isinstance(account[FieldName.EXTENDED_CREDIT_INVOICE_GROUP], ExtendedCreditInvoiceGroup)) - self.assertEqual(account[FieldName.FAILED_DELIVERY_CHECKS], [json.loads(TestValue.FAILED_DELIVERY_CHECKS)]) - self.assertEqual(account[FieldName.HAS_PAGE_AUTHORIZED_ADACCOUNT], TestValue.HAS_PAGE_AUTHORIZED_ADACCOUNT) - self.assertEqual(account[FieldName.TOS_ACCEPTED], json.loads(TestValue.TOS_ACCEPTED)) - - - def test_get_adaccount_with_wrong_fields(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = {} - - with self.assertRaises(FacebookRequestError): - account = AdAccount(TestValue.ACCOUNT_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 1) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - - def test_create_adaccount(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.ACCOUNT_ID) + '", "success": "true"}') - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - FieldName.AD_ACCOUNT_CREATED_FROM_BM_FLAG: TestValue.AD_ACCOUNT_CREATED_FROM_BM_FLAG, - FieldName.CURRENCY: TestValue.CURRENCY, - FieldName.INVOICE: TestValue.INVOICE, - FieldName.NAME: TestValue.NAME, - FieldName.TIMEZONE_ID: TestValue.TIMEZONE_ID, - } - - account = Business(TestValue.BUSINESS_ID).create_ad_account( - fields, - params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(account, AdAccount)) - self.assertEqual(account[FieldName.ID], TestValue.ACCOUNT_ID) - - - def test_create_adaccount_with_wrong_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - 'invoice': 0, - 'timezone_id': 'abc', - } - with self.assertRaises(FacebookRequestError): - account = Business(TestValue.BUSINESS_ID).create_ad_account( - fields, - params, - ) - - self.assertEqual(len(warning), 2) - self.assertTrue(issubclass(warning[-1].category, UserWarning)) - - - def test_get_insights(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.ID) + '":"' + str(TestValue.ACCOUNT_ID) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.ACCOUNT_ID, - ] - params = { - FieldName.ACTION_ATTRIBUTION_WINDOWS: [TestValue.ACTION_ATTRIBUTION_WINDOWS], - FieldName.ACTION_BREAKDOWNS: [TestValue.ACTION_BREAKDOWNS], - FieldName.ACTION_REPORT_TIME: TestValue.ACTION_REPORT_TIME, - FieldName.DATE_PRESET: TestValue.DATE_PRESET, - FieldName.LEVEL: TestValue.LEVEL, - FieldName.SUMMARY_ACTION_BREAKDOWNS: [TestValue.SUMMARY_ACTION_BREAKDOWNS], - } - - ad_insights = AdAccount(TestValue.ACCOUNT_ID).get_insights( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(ad_insights[0], AdsInsights)) - self.assertEqual(ad_insights[0][FieldName.ID], TestValue.ACCOUNT_ID) - - - - def test_get_insights_with_wrong_fields_and_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexisted_field', - ] - params = { - FieldName.DATE_PRESET: 'invalide_date', - FieldName.LEVEL: 'wrong_level', - } - with self.assertRaises(FacebookRequestError): - ad_insights = AdAccount(TestValue.ACCOUNT_ID).get_insights( - fields, - params, - ) - - self.assertEqual(len(warning), 3) - self.assertTrue(issubclass(warning[-1].category, UserWarning)) - - - def test_get_ad_creatives(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.NAME, - ] - params = {} - - creatives = AdAccount(TestValue.ACCOUNT_ID).get_ad_creatives( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(creatives[0], AdCreative)) - self.assertEqual(creatives[0][FieldName.NAME], TestValue.NAME) - - - def test_get_ad_creatives_with_wrong_fields(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = {} - with self.assertRaises(FacebookRequestError): - creatives = AdAccount(TestValue.ACCOUNT_ID).get_ad_creatives( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 1) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - - def test_get_campaigns(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.NAME, - ] - params = { - FieldName.DATE_PRESET: TestValue.DATE_PRESET, - FieldName.EFFECTIVE_STATUS: [TestValue.EFFECTIVE_STATUS], - FieldName.INCLUDE_DRAFTS: TestValue.INCLUDE_DRAFTS, - FieldName.TIME_RANGE: json.loads(TestValue.TIME_RANGE), - } - - campaigns = AdAccount(TestValue.ACCOUNT_ID).get_campaigns( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(campaigns[0], Campaign)) - self.assertEqual(campaigns[0][FieldName.NAME], TestValue.NAME) - - - def test_get_campaigns_with_wrong_fields_and_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = { - FieldName.EFFECTIVE_STATUS: 'unexisted_status', - } - - with self.assertRaises(FacebookRequestError): - campaigns = AdAccount(TestValue.ACCOUNT_ID).get_campaigns( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 2) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - - def test_get_ads(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.NAME, - ] - params = { - FieldName.DATE_PRESET: TestValue.DATE_PRESET, - FieldName.EFFECTIVE_STATUS: [TestValue.EFFECTIVE_STATUS], - FieldName.INCLUDE_DRAFTS: TestValue.INCLUDE_DRAFTS, - FieldName.TIME_RANGE: json.loads(TestValue.TIME_RANGE), - FieldName.UPDATED_SINCE: TestValue.UPDATED_SINCE, - } - - ads = AdAccount(TestValue.ACCOUNT_ID).get_ads( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(ads[0], Ad)) - self.assertEqual(ads[0][FieldName.NAME], TestValue.NAME) - - - def test_get_ads_with_wrong_fields_and_param(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = { - FieldName.EFFECTIVE_STATUS: 'unexisted_status', - } - with self.assertRaises(FacebookRequestError): - ads = AdAccount(TestValue.ACCOUNT_ID).get_ads( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 2) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - -if __name__ == '__main__': - unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_adcreative.py b/tap_facebook/facebook_business/test/integration_adcreative.py deleted file mode 100644 index eb881e9..0000000 --- a/tap_facebook/facebook_business/test/integration_adcreative.py +++ /dev/null @@ -1,225 +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. - -''' -Unit tests for the Python Facebook Business SDK. - -How to run: - python -m facebook_business.test.integration_adcreative -''' - -import warnings -import json -from facebook_business.session import FacebookSession -from facebook_business.exceptions import FacebookRequestError -from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse -from facebook_business.adobjects.adaccount import AdAccount -from facebook_business.adobjects.adcreative import AdCreative -from facebook_business.adobjects.adpreview import AdPreview -from .integration_utils import * -from .integration_constant import * - - -class AdCreativeTestCase(IntegrationTestCase): - def test_get_adcreative(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' - '"' + str(FieldName.ACTOR_ID) + '":"' + str(TestValue.ACTOR_ID) + '",' - '"' + str(FieldName.ADLABELS) + '":' + str(TestValue.AD_LABEL) + ',' - '"' + str(FieldName.APPLINK_TREATMENT) + '":"' + str(TestValue.APPLINK_TREATMENT) + '",' - '"' + str(FieldName.AUTHORIZATION_CATEGORY) + '":"' + str(TestValue.AUTHORIZATION_CATEGORY) + '",' - '"' + str(FieldName.AUTO_UPDATE) + '":"' + str(TestValue.AUTO_UPDATE) + '",' - '"' + str(FieldName.BODY) + '":"' + str(TestValue.BODY) + '",' - '"' + str(FieldName.CALL_TO_ACTION_TYPE) + '":"' + str(TestValue.CALL_TO_ACTION_TYPE) + '",' - '"' + str(FieldName.CATEGORIZATION_CRITERIA) + '":"' + str(TestValue.CATEGORIZATION_CRITERIA) + '",' - '"' + str(FieldName.IMAGE_HASH) + '":"' + str(TestValue.IMAGE_HASH) + '",' - '"' + str(FieldName.TITLE) + '":"' + str(TestValue.TITLE) + '",' - '"' + str(FieldName.OBJECT_URL) + '":"' + str(TestValue.OBJECT_URL) + '",' - '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.ACCOUNT_ID, - FieldName.ACTOR_ID, - FieldName.ADLABELS, - FieldName.APPLINK_TREATMENT, - FieldName.AUTHORIZATION_CATEGORY, - FieldName.AUTO_UPDATE, - FieldName.BODY, - FieldName.CALL_TO_ACTION_TYPE, - FieldName.CATEGORIZATION_CRITERIA, - FieldName.IMAGE_HASH, - FieldName.TITLE, - FieldName.OBJECT_URL, - FieldName.NAME, - ] - params = {} - - creative = AdCreative(TestValue.CREATIVE_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(creative, AdCreative)) - self.assertEqual(creative[FieldName.ACCOUNT_ID], TestValue.ACCOUNT_ID) - self.assertEqual(creative[FieldName.ACTOR_ID], TestValue.ACTOR_ID) - self.assertEqual(creative[FieldName.ADLABELS], [json.loads(TestValue.AD_LABEL)]) - self.assertEqual(creative[FieldName.APPLINK_TREATMENT], TestValue.APPLINK_TREATMENT) - self.assertEqual(creative[FieldName.AUTHORIZATION_CATEGORY], TestValue.AUTHORIZATION_CATEGORY) - self.assertEqual(creative[FieldName.BODY], TestValue.BODY) - self.assertEqual(creative[FieldName.CALL_TO_ACTION_TYPE], TestValue.CALL_TO_ACTION_TYPE) - self.assertEqual(creative[FieldName.CATEGORIZATION_CRITERIA], TestValue.CATEGORIZATION_CRITERIA) - self.assertEqual(creative[FieldName.IMAGE_HASH], TestValue.IMAGE_HASH) - self.assertEqual(creative[FieldName.TITLE], TestValue.TITLE) - self.assertEqual(creative[FieldName.OBJECT_URL], TestValue.OBJECT_URL) - self.assertEqual(creative[FieldName.NAME], TestValue.NAME) - - - def test_get_ad_creative_with_wrong_fields(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = {} - - with self.assertRaises(FacebookRequestError): - creative = AdCreative(TestValue.CREATIVE_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 1) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - - def test_create_ad_creative(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.CREATIVE_ID) + '", "success": "true"}') - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - FieldName.ADLABELS: [json.loads(TestValue.AD_LABEL)], - FieldName.ACTOR_ID: TestValue.ACTOR_ID, - FieldName.APPLINK_TREATMENT: TestValue.APPLINK_TREATMENT, - FieldName.AUTHORIZATION_CATEGORY: TestValue.AUTHORIZATION_CATEGORY, - FieldName.AUTO_UPDATE: TestValue.AUTO_UPDATE, - FieldName.BODY: TestValue.BODY, - FieldName.CALL_TO_ACTION_TYPE: TestValue.CALL_TO_ACTION_TYPE, - FieldName.CATEGORIZATION_CRITERIA: TestValue.CATEGORIZATION_CRITERIA, - FieldName.IMAGE_HASH: TestValue.IMAGE_HASH, - FieldName.TITLE: TestValue.TITLE, - FieldName.OBJECT_URL: TestValue.OBJECT_URL, - FieldName.NAME: TestValue.NAME, - } - - creative = AdAccount(TestValue.ACCOUNT_ID).create_ad_creative( - fields, - params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(creative, AdCreative)) - self.assertEqual(creative[FieldName.ID], TestValue.CREATIVE_ID) - - - def test_create_ad_creative_with_wrong_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - 'authorization_category': 'unexited_category', - } - with self.assertRaises(FacebookRequestError): - creative = AdAccount(TestValue.ACCOUNT_ID).create_ad_creative( - fields, - params, - ) - - - self.assertEqual(len(warning), 1) - self.assertTrue(issubclass(warning[-1].category, UserWarning)) - - - def test_get_previews(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.BODY) + '":"' + str(TestValue.BODY) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - FieldName.AD_FORMAT: TestValue.AD_FORMAT, - FieldName.DYNAMIC_ASSET_LABEL: TestValue.DYNAMIC_ASSET_LABEL, - FieldName.DYNAMIC_CREATIVE_SPEC: json.loads(TestValue.DYNAMIC_CREATIVE_SPEC), - FieldName.HEIGHT: TestValue.HEIGHT, - FieldName.WIDTH: TestValue.WIDTH, - FieldName.RENDER_TYPE: TestValue.RENDER_TYPE, - } - - previews = AdCreative(TestValue.CREATIVE_ID).get_previews( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(previews[0], AdPreview)) - self.assertEqual(previews[0][FieldName.BODY], TestValue.BODY) - - - def test_get_previews_with_wrong_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - 'render_type':'wrong_type', - } - with self.assertRaises(FacebookRequestError): - previews = AdCreative(TestValue.CREATIVE_ID).get_previews( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 1) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - -if __name__ == '__main__': - unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_adset.py b/tap_facebook/facebook_business/test/integration_adset.py deleted file mode 100644 index 53b68de..0000000 --- a/tap_facebook/facebook_business/test/integration_adset.py +++ /dev/null @@ -1,205 +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. - -''' -Unit tests for the Python Facebook Business SDK. - -How to run: - python -m facebook_business.test.integration_adset -''' - -import unittest -import warnings -import json -from facebook_business.session import FacebookSession -from facebook_business.exceptions import FacebookRequestError -from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse -from facebook_business.adobjects.adaccount import AdAccount -from facebook_business.adobjects.adset import AdSet -from facebook_business.adobjects.adbidadjustments import AdBidAdjustments -from .integration_utils import * -from .integration_constant import * - - -class AdSetTestCase(IntegrationTestCase): - def test_get_ad_set(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' - '"' + str(FieldName.ADLABELS) + '":' + str(TestValue.AD_LABEL) + ',' - '"' + str(FieldName.ADSET_SCHEDULE) + '":' + str(TestValue.ADSET_SCHEDULE) + ',' - '"' + str(FieldName.ASSET_FEED_ID) + '":"' + str(TestValue.ASSET_FEED_ID) + '",' - '"' + str(FieldName.BID_ADJUSTMENTS) + '":' + str(TestValue.BID_ADJUSTMENTS) + ',' - '"' + str(FieldName.BID_AMOUNT) + '":"' + str(TestValue.BID_AMOUNT) + '",' - '"' + str(FieldName.BILLING_EVENT) + '":"' + str(TestValue.BILLING_EVENT) + '",' - '"' + str(FieldName.BID_STRATEGY) + '":"' + str(TestValue.BID_STRATEGY) + '",' - '"' + str(FieldName.BUDGET_REMAINING) + '": "' + str(TestValue.BUDGET_REMAINING) + '",' - '"' + str(FieldName.CAMPAIGN_ID) + '":"' + str(TestValue.CAMPAIGN_ID) + '",' - '"' + str(FieldName.CONFIGURED_STATUS) + '": "' + str(TestValue.CONFIGURED_STATUS) + '",' - '"' + str(FieldName.DATE_FORMAT) + '":"' + str(TestValue.DATE_FORMAT) + '",' - '"' + str(FieldName.DAILY_MIN_SPEND_TARGET) + '": "' + str(TestValue.DAILY_MIN_SPEND_TARGET) + '",' - '"' + str(FieldName.EFFECTIVE_STATUS) + '":"' + str(TestValue.EFFECTIVE_STATUS) + '",' - '"' + str(FieldName.INSTAGRAM_ACTOR_ID) + '":"' + str(TestValue.INSTAGRAM_ACTOR_ID) + '",' - '"' + str(FieldName.ISSUES_INFO) + '": ' + str(TestValue.ISSUES_INFO) + ',' - '"' + str(FieldName.OPTIMIZATION_GOAL) + '":"' + str(TestValue.OPTIMIZATION_GOAL) + '",' - '"' + str(FieldName.PACING_TYPE) + '":"' + str(TestValue.PACING_TYPE) + '",' - '"' + str(FieldName.REVIEW_FEEDBACK) + '":"' + str(TestValue.REVIEW_FEEDBACK) + '",' - '"' + str(FieldName.TUNE_FOR_CATEGORY) + '":"' + str(TestValue.TUNE_FOR_CATEGORY) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.ACCOUNT_ID, - FieldName.ADLABELS, - FieldName.ADSET_SCHEDULE, - FieldName.ASSET_FEED_ID, - FieldName.BID_ADJUSTMENTS, - FieldName.BID_AMOUNT, - FieldName.BILLING_EVENT, - FieldName.BID_STRATEGY, - FieldName.BUDGET_REMAINING, - FieldName.CAMPAIGN_ID, - FieldName.CONFIGURED_STATUS, - FieldName.DATE_FORMAT, - FieldName.DAILY_MIN_SPEND_TARGET, - FieldName.EFFECTIVE_STATUS, - FieldName.INSTAGRAM_ACTOR_ID, - FieldName.ISSUES_INFO, - FieldName.OPTIMIZATION_GOAL, - FieldName.PACING_TYPE, - FieldName.REVIEW_FEEDBACK, - FieldName.TUNE_FOR_CATEGORY, - ] - params = {} - print(params.__class__.__name__) - ad_set = AdSet(TestValue.ADSET_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(ad_set, AdSet)) - self.assertEqual(ad_set[FieldName.ACCOUNT_ID], TestValue.ACCOUNT_ID) - self.assertEqual(ad_set[FieldName.ADLABELS], [json.loads(TestValue.AD_LABEL)]) - self.assertEqual(ad_set[FieldName.ADSET_SCHEDULE], [json.loads(TestValue.ADSET_SCHEDULE)]) - self.assertEqual(ad_set[FieldName.ASSET_FEED_ID], TestValue.ASSET_FEED_ID) - self.assertTrue(isinstance(ad_set[FieldName.BID_ADJUSTMENTS], AdBidAdjustments)) - self.assertEqual(ad_set[FieldName.BID_AMOUNT], TestValue.BID_AMOUNT) - self.assertEqual(ad_set[FieldName.BILLING_EVENT], TestValue.BILLING_EVENT) - self.assertEqual(ad_set[FieldName.BID_STRATEGY], TestValue.BID_STRATEGY) - self.assertEqual(ad_set[FieldName.BUDGET_REMAINING], TestValue.BUDGET_REMAINING) - self.assertEqual(ad_set[FieldName.CAMPAIGN_ID], TestValue.CAMPAIGN_ID) - self.assertEqual(ad_set[FieldName.CONFIGURED_STATUS], TestValue.CONFIGURED_STATUS) - self.assertEqual(ad_set[FieldName.DATE_FORMAT], TestValue.DATE_FORMAT) - self.assertEqual(ad_set[FieldName.DAILY_MIN_SPEND_TARGET], TestValue.DAILY_MIN_SPEND_TARGET) - self.assertEqual(ad_set[FieldName.EFFECTIVE_STATUS], TestValue.EFFECTIVE_STATUS) - self.assertEqual(ad_set[FieldName.INSTAGRAM_ACTOR_ID], TestValue.INSTAGRAM_ACTOR_ID) - self.assertEqual(ad_set[FieldName.ISSUES_INFO], [json.loads(TestValue.ISSUES_INFO)]) - self.assertEqual(ad_set[FieldName.OPTIMIZATION_GOAL], TestValue.OPTIMIZATION_GOAL) - self.assertEqual(ad_set[FieldName.PACING_TYPE], [TestValue.PACING_TYPE]) - self.assertEqual(ad_set[FieldName.REVIEW_FEEDBACK], TestValue.REVIEW_FEEDBACK) - self.assertEqual(ad_set[FieldName.TUNE_FOR_CATEGORY], TestValue.TUNE_FOR_CATEGORY) - - - def test_get_ad_set_with_wrong_fields(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = {} - with self.assertRaises(FacebookRequestError): - ad_set = AdSet(TestValue.ADSET_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 1) - self.assertTrue((issubclass(warning[0].category, UserWarning))) - - - def test_create_ad_set(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.ADSET_ID) + '", "success": "true"}') - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - FieldName.ADLABELS: [json.loads(TestValue.AD_LABEL)], - FieldName.BID_STRATEGY: TestValue.BID_STRATEGY, - FieldName.BUDGET_REBALANCE_FLAG: False, - FieldName.BUYING_TYPE: TestValue.BUYING_TYPE, - FieldName.BILLING_EVENT: TestValue.BILLING_EVENT, - FieldName.DAILY_BUDGET: TestValue.DAILY_BUDGET, - FieldName.EXECUTION_OPTIONS: [TestValue.EXECUTION_OPTIONS], - FieldName.ITERATIVE_SPLIT_TEST_CONFIGS: [json.loads(TestValue.ITERATIVE_SPLIT_TEST_CONFIGS)], - FieldName.LIFETIME_BUDGET: TestValue.LIFETIME_BUDGET, - FieldName.NAME: TestValue.NAME, - FieldName.OBJECTIVE: TestValue.OBJECTIVE, - FieldName.OPTIMIZATION_GOAL: TestValue.OPTIMIZATION_GOAL, - FieldName.PACING_TYPE: [TestValue.PACING_TYPE], - FieldName.PROMOTED_OBJECT: json.loads(TestValue.PROMOTED_OBJECT), - FieldName.SOURCE_CAMPAIGN_ID: TestValue.CAMPAIGN_ID, - FieldName.SPECIAL_AD_CATEGORY: TestValue.SPECIAL_AD_CATEGORY, - FieldName.SPEND_CAP: TestValue.SPEND_CAP, - FieldName.STATUS: TestValue.STATUS, - FieldName.TARGETING: json.loads(TestValue.TARGETING), - FieldName.TOPLINE_ID: TestValue.TOPLINE_ID, - FieldName.UPSTREAM_EVENTS: json.loads(TestValue.UPSTREAM_EVENTS), - } - - ad_set = AdAccount(TestValue.ACCOUNT_ID).create_ad_set( - fields, - params, - ) - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(ad_set, AdSet)) - self.assertEqual(ad_set[FieldName.ID], TestValue.ADSET_ID) - - - def test_create_ad_set_with_wrong_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - FieldName.STATUS: 3, - FieldName.TARGETING: 'wrong_targeting', - } - with self.assertRaises(FacebookRequestError): - ad_set = AdAccount(TestValue.ACCOUNT_ID).create_ad_set( - fields, - params, - ) - - self.assertEqual(len(warning), 2) - self.assertTrue(issubclass(warning[-1].category, UserWarning)) - - -if __name__ == '__main__': - unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_campaign.py b/tap_facebook/facebook_business/test/integration_campaign.py deleted file mode 100644 index 603d82b..0000000 --- a/tap_facebook/facebook_business/test/integration_campaign.py +++ /dev/null @@ -1,232 +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. - -''' -Unit tests for the Python Facebook Business SDK. - -How to run: - python -m facebook_business.test.integration_campaign -''' - -import warnings -import json -from facebook_business.session import FacebookSession -from facebook_business.exceptions import FacebookRequestError -from facebook_business.api import FacebookAdsApi, FacebookRequest, FacebookResponse -from facebook_business.adobjects.campaign import Campaign -from facebook_business.adobjects.adaccount import AdAccount -from facebook_business.adobjects.adpromotedobject import AdPromotedObject -from .integration_utils import * -from .integration_constant import * - - -class CampaignTestCase(IntegrationTestCase): - def test_get_campaign(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode( - '{' - '"' + str(FieldName.ACCOUNT_ID) + '":"' + str(TestValue.ACCOUNT_ID) + '",' - '"' + str(FieldName.ADLABELS) + '":' + str(TestValue.AD_LABEL) + ',' - '"' + str(FieldName.BID_STRATEGY) + '":"' + str(TestValue.BID_STRATEGY) + '",' - '"' + str(FieldName.BOOSTED_OBJECT_ID) + '":"' + str(TestValue.BOOSTED_OBJECT_ID) + '",' - '"' + str(FieldName.BRAND_LIFT_STUDIES) + '":' + str(TestValue.BRAND_LIFT_STUDIES) + ',' - '"' + str(FieldName.BUDGET_REBALANCE_FLAG) + '":"' + str(TestValue.BUDGET_REBALANCE_FLAG) + '",' - '"' + str(FieldName.BUDGET_REMAINING) + '": "' + str(TestValue.BUDGET_REMAINING) + '",' - '"' + str(FieldName.BUYING_TYPE) + '":"' + str(TestValue.BUYING_TYPE) + '",' - '"' + str(FieldName.CAN_CREATE_BRAND_LIFT_STUDY) + '":"' + str(TestValue.CAN_CREATE_BRAND_LIFT_STUDY) + '",' - '"' + str(FieldName.CAN_USE_SPEND_CAP) + '":"' + str(TestValue.CAN_USE_SPEND_CAP) + '",' - '"' + str(FieldName.CONFIGURED_STATUS) + '":"' + str(TestValue.CONFIGURED_STATUS) + '",' - '"' + str(FieldName.CREATED_TIME) + '":"' + str(TestValue.CREATED_TIME) + '",' - '"' + str(FieldName.DAILY_BUDGET) + '":"' + str(TestValue.DAILY_BUDGET) + '",' - '"' + str(FieldName.EFFECTIVE_STATUS) + '":"' + str(TestValue.EFFECTIVE_STATUS) + '",' - '"' + str(FieldName.ID) + '": "' + str(TestValue.CAMPAIGN_ID) + '",' - '"' + str(FieldName.ISSUES_INFO) + '": ' + str(TestValue.ISSUES_INFO) + ',' - '"' + str(FieldName.LAST_BUDGET_TOGGLING_TIME) + '":"' + str(TestValue.LAST_BUDGET_TOGGLING_TIME) + '",' - '"' + str(FieldName.LIFETIME_BUDGET) + '":"' + str(TestValue.LIFETIME_BUDGET) + '",' - '"' + str(FieldName.NAME) + '":"' + str(TestValue.NAME) + '",' - '"' + str(FieldName.OBJECTIVE) + '":"' + str(TestValue.OBJECTIVE) + '",' - '"' + str(FieldName.RECOMMENDATIONS) + '":' + str(TestValue.RECOMMENDATIONS) + ',' - '"' + str(FieldName.PACING_TYPE) + '":"' + str(TestValue.PACING_TYPE) + '",' - '"' + str(FieldName.PROMOTED_OBJECT) + '":' + str(TestValue.PROMOTED_OBJECT) + ',' - '"' + str(FieldName.SPECIAL_AD_CATEGORY) + '":"' + str(TestValue.SPECIAL_AD_CATEGORY) + '",' - '"' + str(FieldName.SPEND_CAP) + '":"' + str(TestValue.SPEND_CAP) + '",' - '"' + str(FieldName.STATUS) + '":"' + str(TestValue.STATUS) + '",' - '"' + str(FieldName.TOPLINE_ID) + '":"' + str(TestValue.TOPLINE_ID) + '",' - '"' + str(FieldName.START_TIME) + '":"' + str(TestValue.START_TIME) + '",' - '"' + str(FieldName.STOP_TIME) + '":"' + str(TestValue.STOP_TIME) + '",' - '"' + str(FieldName.UPDATED_TIME) + '":"' + str(TestValue.UPDATED_TIME) + '"' - '}' - ) - - self.mock_request.return_value = self.mock_response - - fields = [ - FieldName.ACCOUNT_ID, - FieldName.ADLABELS, - FieldName.BID_STRATEGY, - FieldName.BOOSTED_OBJECT_ID, - FieldName.BRAND_LIFT_STUDIES, - FieldName.BUDGET_REBALANCE_FLAG, - FieldName.BUDGET_REMAINING, - FieldName.BUYING_TYPE, - FieldName.CAN_CREATE_BRAND_LIFT_STUDY, - FieldName.CAN_USE_SPEND_CAP, - FieldName.CONFIGURED_STATUS, - FieldName.CREATED_TIME, - FieldName.DAILY_BUDGET, - FieldName.EFFECTIVE_STATUS, - FieldName.ID, - FieldName.ISSUES_INFO, - FieldName.LAST_BUDGET_TOGGLING_TIME, - FieldName.LIFETIME_BUDGET, - FieldName.NAME, - FieldName.OBJECTIVE, - FieldName.PACING_TYPE, - FieldName.PROMOTED_OBJECT, - FieldName.RECOMMENDATIONS, - FieldName.SPECIAL_AD_CATEGORY, - FieldName.SPEND_CAP, - FieldName.START_TIME, - FieldName.STATUS, - FieldName.STOP_TIME, - FieldName.TOPLINE_ID, - FieldName.UPDATED_TIME, - ] - params = {} - - campaign = Campaign(TestValue.CAMPAIGN_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(campaign, Campaign)) - self.assertEqual(campaign[FieldName.ACCOUNT_ID], TestValue.ACCOUNT_ID) - self.assertEqual(campaign[FieldName.ADLABELS], [json.loads(TestValue.AD_LABEL)]) - self.assertEqual(campaign[FieldName.BID_STRATEGY], TestValue.BID_STRATEGY) - self.assertEqual(campaign[FieldName.BOOSTED_OBJECT_ID], TestValue.BOOSTED_OBJECT_ID) - self.assertEqual(campaign[FieldName.BRAND_LIFT_STUDIES], [json.loads(TestValue.BRAND_LIFT_STUDIES)]) - self.assertEqual(campaign[FieldName.BUDGET_REBALANCE_FLAG], TestValue.BUDGET_REBALANCE_FLAG) - self.assertEqual(campaign[FieldName.BUDGET_REMAINING], TestValue.BUDGET_REMAINING) - self.assertEqual(campaign[FieldName.BUYING_TYPE], TestValue.BUYING_TYPE) - self.assertEqual(campaign[FieldName.CAN_CREATE_BRAND_LIFT_STUDY], TestValue.CAN_CREATE_BRAND_LIFT_STUDY) - self.assertEqual(campaign[FieldName.CAN_USE_SPEND_CAP], TestValue.CAN_USE_SPEND_CAP) - self.assertEqual(campaign[FieldName.CONFIGURED_STATUS], TestValue.CONFIGURED_STATUS) - self.assertEqual(campaign[FieldName.CREATED_TIME], TestValue.CREATED_TIME) - self.assertEqual(campaign[FieldName.DAILY_BUDGET], TestValue.DAILY_BUDGET) - self.assertEqual(campaign[FieldName.EFFECTIVE_STATUS], TestValue.EFFECTIVE_STATUS) - self.assertEqual(campaign[FieldName.ID], TestValue.CAMPAIGN_ID) - self.assertEqual(campaign[FieldName.ISSUES_INFO], [json.loads(TestValue.ISSUES_INFO)]) - self.assertEqual(campaign[FieldName.LAST_BUDGET_TOGGLING_TIME], TestValue.LAST_BUDGET_TOGGLING_TIME) - self.assertEqual(campaign[FieldName.LIFETIME_BUDGET], TestValue.LIFETIME_BUDGET) - self.assertEqual(campaign[FieldName.NAME], TestValue.NAME) - self.assertEqual(campaign[FieldName.OBJECTIVE], TestValue.OBJECTIVE) - self.assertEqual(campaign[FieldName.PACING_TYPE], [TestValue.PACING_TYPE]) - self.assertTrue(isinstance(campaign[FieldName.PROMOTED_OBJECT], AdPromotedObject)) - self.assertEqual(campaign[FieldName.RECOMMENDATIONS], [json.loads(TestValue.RECOMMENDATIONS)]) - self.assertEqual(campaign[FieldName.SPECIAL_AD_CATEGORY], TestValue.SPECIAL_AD_CATEGORY) - self.assertEqual(campaign[FieldName.SPEND_CAP], TestValue.SPEND_CAP) - self.assertEqual(campaign[FieldName.STATUS], TestValue.STATUS) - self.assertEqual(campaign[FieldName.START_TIME], TestValue.START_TIME) - self.assertEqual(campaign[FieldName.STOP_TIME], TestValue.STOP_TIME) - self.assertEqual(campaign[FieldName.TOPLINE_ID], TestValue.TOPLINE_ID) - self.assertEqual(campaign[FieldName.UPDATED_TIME], TestValue.UPDATED_TIME) - - - def test_get_campaign_with_wrong_fields(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [ - 'unexist_field', - ] - params = {} - with self.assertRaises(FacebookRequestError): - campaign = Campaign(TestValue.CAMPAIGN_ID).api_get( - fields=fields, - params=params, - ) - - self.assertEqual(len(warning), 1) - self.assertTrue(issubclass(warning[0].category, UserWarning)) - - - def test_create_campaign(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.SUCCESS - self.mock_response._content = str.encode('{"' + str(FieldName.ID) + '":"' + str(TestValue.CAMPAIGN_ID) + '", "success": "true"}') - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - FieldName.ADLABELS: [json.loads(TestValue.AD_LABEL)], - FieldName.BID_STRATEGY: TestValue.BID_STRATEGY, - FieldName.BUDGET_REBALANCE_FLAG: False, - FieldName.BUYING_TYPE: TestValue.BUYING_TYPE, - FieldName.DAILY_BUDGET: TestValue.DAILY_BUDGET, - FieldName.EXECUTION_OPTIONS: [TestValue.EXECUTION_OPTIONS], - FieldName.ITERATIVE_SPLIT_TEST_CONFIGS: [json.loads(TestValue.ITERATIVE_SPLIT_TEST_CONFIGS)], - FieldName.LIFETIME_BUDGET: TestValue.LIFETIME_BUDGET, - FieldName.NAME: TestValue.NAME, - FieldName.OBJECTIVE: TestValue.OBJECTIVE, - FieldName.PACING_TYPE: [TestValue.PACING_TYPE], - FieldName.PROMOTED_OBJECT: json.loads(TestValue.PROMOTED_OBJECT), - FieldName.SOURCE_CAMPAIGN_ID: TestValue.CAMPAIGN_ID, - FieldName.SPECIAL_AD_CATEGORY: TestValue.SPECIAL_AD_CATEGORY, - FieldName.SPEND_CAP: TestValue.SPEND_CAP, - FieldName.STATUS: TestValue.STATUS, - FieldName.TOPLINE_ID: TestValue.TOPLINE_ID, - FieldName.UPSTREAM_EVENTS: json.loads(TestValue.UPSTREAM_EVENTS), - } - - campaign = AdAccount(TestValue.ACCOUNT_ID).create_campaign( - fields, - params, - ) - - self.assertEqual(len(warning), 0) - self.assertTrue(isinstance(campaign, Campaign)) - self.assertEqual(campaign[FieldName.ID], TestValue.CAMPAIGN_ID) - - - def test_create_campaign_with_wrong_params(self): - with warnings.catch_warnings(record=True) as warning: - self.mock_response.status_code = StatusCode.ERROR - self.mock_request.return_value = self.mock_response - - fields = [] - params = { - 'status': 3, - 'special_ad_categories': 'wrong_enum', - } - with self.assertRaises(FacebookRequestError): - campaign = AdAccount(TestValue.ACCOUNT_ID).create_campaign( - fields, - params, - ) - - self.assertEqual(len(warning), 2) - self.assertTrue(issubclass(warning[-1].category, UserWarning)) - - -if __name__ == '__main__': - unittest.main() diff --git a/tap_facebook/facebook_business/test/integration_constant.py b/tap_facebook/facebook_business/test/integration_constant.py deleted file mode 100644 index d67ae5b..0000000 --- a/tap_facebook/facebook_business/test/integration_constant.py +++ /dev/null @@ -1,288 +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. - -# This file stores the information needed to perform integration testing -# on the Python Ads SDK. - -class FieldName: - ACCOUNT_ID = 'account_id' - ACCOUNT_STATUS = 'account_status' - ACTION_ATTRIBUTION_WINDOWS = 'action_attribution_windows' - ACTION_BREAKDOWNS = 'action_breakdowns' - ACTION_REPORT_TIME = 'action_report_time' - ACTOR_ID = 'actor_id' - AD_ACCOUNT_CREATED_FROM_BM_FLAG = 'ad_account_created_from_bm_flag' - AD_FORMAT = 'ad_format' - AD_ID = 'ad_id' - AD_NAME = 'ad_name' - AD_REVIEW_FEEDBACK = 'ad_review_feedback' - ADLABELS = 'adlabels' - ADSET_ID = 'adset_id' - ADSET_SCHEDULE = 'adset_schedule' - AGE = 'age' - AGENCY_CLIENT_DECLARATION = 'agency_client_declaration' - AMOUNT_SPENT = 'amount_spent' - APPLINK_TREATMENT = 'applink_treatment' - AUTHORIZATION_CATEGORY = 'authorization_category' - AUTO_UPDATE = 'auto_update' - ASSET_FEED_ID = 'asset_feed_id' - BALANCE = 'balance' - BID_ADJUSTMENTS = 'bid_adjustments' - BID_AMOUNT = 'bid_amount' - BID_STRATEGY = 'bid_strategy' - BILLING_EVENT = 'billing_event' - BODY = 'body' - BOOSTED_OBJECT_ID = 'boosted_object_id' - BRAND_LIFT_STUDIES = 'brand_lift_studies' - BUDGET_REBALANCE_FLAG = 'budget_rebalance_flag' - BUDGET_REMAINING = 'budget_remaining' - BUSINESS_CITY = 'business_city' - BUSINESS = 'business' - BUYING_TYPE = 'buying_type' - CALL_TO_ACTION_TYPE = 'call_to_action_type' - CAMPAIGN_ID = 'campaign_id' - CAN_CREATE_BRAND_LIFT_STUDY = 'can_create_brand_lift_study' - CAN_USE_SPEND_CAP = 'can_use_spend_cap' - CAPABILITIES = 'capabilities' - CATEGORIZATION_CRITERIA = 'categorization_criteria' - CONFIGURED_STATUS = 'configured_status' - CREATED_TIME = 'created_time' - CREATIVE = 'creative' - CURRENCY = 'currency' - DAILY_BUDGET = 'daily_budget' - DAILY_MIN_SPEND_TARGET = 'daily_min_spend_target' - DATE_PRESET = 'date_preset' - DATE_FORMAT = 'date_format' - DATE_START = 'date_start' - DATE_STOP = 'date_stop' - DISABLE_REASON = 'disable_reason' - DYNAMIC_ASSET_LABEL = 'dynamic_asset_label' - DYNAMIC_CREATIVE_SPEC = 'dynamic_creative_spec' - EFFECTIVE_STATUS = 'effective_status' - EXECUTION_OPTIONS = 'execution_options' - EXTENDED_CREDIT_INVOICE_GROUP = 'extended_credit_invoice_group' - FAILED_DELIVERY_CHECKS = 'failed_delivery_checks' - HAS_PAGE_AUTHORIZED_ADACCOUNT = 'has_page_authorized_adaccount' - HEIGHT = 'height' - ID = 'id' - IMAGE_HASH = 'image_hash' - INCLUDE_DRAFTS = 'include_drafts' - INSTAGRAM_ACTOR_ID = 'instagram_actor_id' - INVOICE = 'invoice' - ISSUES_INFO = 'issues_info' - ITERATIVE_SPLIT_TEST_CONFIGS = 'iterative_split_test_configs' - LAST_BUDGET_TOGGLING_TIME = 'last_budget_toggling_time' - LEVEL = 'level' - LIFETIME_BUDGET = 'lifetime_budget' - NAME = 'name' - OBJECTIVE = 'objective' - OBJECT_URL = 'object_url' - OPTIMIZATION_GOAL = 'optimization_goal' - RECOMMENDATIONS = 'recommendations' - RENDER_TYPE = 'render_type' - REVIEW_FEEDBACK = 'review_feedback' - PACING_TYPE = 'pacing_type' - PRIORITY = 'priority' - PROMOTED_OBJECT = 'promoted_object' - SOURCE_CAMPAIGN_ID = 'source_campaign_id' - SPECIAL_AD_CATEGORY = 'special_ad_category' - SPEND_CAP = 'spend_cap' - STATUS = 'status' - SUMMARY_ACTION_BREAKDOWNS = 'summary_action_breakdowns' - TARGETING = 'targeting' - TIME_RANGE = 'time_range' - TIMEZONE_ID = 'timezone_id' - TITLE = 'title' - TOPLINE_ID = 'topline_id' - TOS_ACCEPTED = 'tos_accepted' - TUNE_FOR_CATEGORY = 'tune_for_category' - START_TIME = 'start_time' - STOP_TIME = 'stop_time' - UPDATED_SINCE = 'updated_since' - UPDATED_TIME = 'updated_time' - UPSTREAM_EVENTS = 'upstream_events' - WIDTH = 'width' - -class TestValue: - ACCESS_TOKEN = 'accesstoken' - ACCOUNT_ID = 'act_123' - ACCOUNT_STATUS = 1 - ACTION_ATTRIBUTION_WINDOWS = '28d_click' - ACTION_BREAKDOWNS = 'action_canvas_component_name' - ACTION_REPORT_TIME = 'conversion' - ACTOR_ID = '1245' - AD_ACCOUNT_CREATED_FROM_BM_FLAG = 'false' - AD_ID = '125475' - AD_LABEL = '{"name": "test_label"}' - AD_FORMAT = 'DESKTOP_FEED_STANDARD' - AD_REVIEW_FEEDBACK = '{"global": "LANDING_PAGE_FAIL"}' - ADSET_ID = '12345' - ADSET_SCHEDULE = '{"pacing_type": "standard"}' - AGE = '365' - AGENCY_CLIENT_DECLARATION = ( - '{' - '"agency_representing_client": "0",' - '"client_based_in_france":"0",' - '"client_city": "San Jose",' - '"client_postal_code": "95131",' - '"client_street": "lundi street"' - '}' - ) - AMOUNT_SPENT = "50000" - APPLINK_TREATMENT = 'deeplink_with_web_fallback' - APP_ID = '1234567' - APP_SECRET = 'appsecret' - APP_URL = 'http://test.com' - ASSET_FEED_ID = '123' - AUTHORIZATION_CATEGORY = 'NONE' - AUTO_UPDATE = 'true' - BALANCE = '25000' - BID_ADJUSTMENTS = '{"user_groups": "test_group"}' - BID_AMOUNT = '30000' - BID_STRATEGY = 'LOWEST_COST_WITHOUT_CAP' - BILLING_EVENT = 'IMPRESSIONS' - BODY = "This is my test body" - BOOSTED_OBJECT_ID = '12345678' - BRAND_LIFT_STUDIES = ( - '{' - '"id": "cell_id",' - '"name":"Group A",' - '"treatment_percentage": "50",' - '"adsets": {"id" : "adset_id"}' - '}' - ) - BUDGET_REBALANCE_FLAG = 'false' - BUDGET_REMAINING = '150' - BUSINESS_CITY = 'Menlo park' - BUSINESS_ID = '111111' - BUSINESS = ( - '{' - '"id": "111111",' - '"name":"test business"' - '}' - ) - BUYING_TYPE = 'AUCTION' - CALL_TO_ACTION_TYPE = 'CONTACT' - CAMPAIGN_ID = '1234321' - CAN_CREATE_BRAND_LIFT_STUDY = 'true' - CAN_USE_SPEND_CAP = 'true' - CAPABILITIES = 'BULK_ACCOUNT' - CATEGORIZATION_CRITERIA = 'brand' - CONFIGURED_STATUS = 'PAUSED' - CREATED_TIME = '3728193' - CREATIVE_ID = '1523548' - CREATIVE = ( - '{' - '"id": "15742462",' - '"name": "test name"' - '}' - ) - CURRENCY = 'USD' - DAILY_BUDGET = '200' - DAILY_MIN_SPEND_TARGET = '50' - DATE_FORMAT = 'U' - DATE_PRESET = 'last_30d' - DATE_START = '2019-11-06' - DATE_STOP = '2019-12-05' - DISABLE_REASON = 0 - DYNAMIC_ASSET_LABEL = 'test dynamic asset label' - DYNAMIC_CREATIVE_SPEC = ( - '{' - '"message": "test message",' - '"description": "test description"' - '}' - ) - EFFECTIVE_STATUS = 'PAUSED' - EXECUTION_OPTIONS = 'include_recommendations' - EXTENDED_CREDIT_INVOICE_GROUP = ( - '{' - '"id": "12325487",' - '"name": "test name"' - '}' - ) - FAILED_DELIVERY_CHECKS = ( - '{' - '"summary": "Custom Audience No Longer Shared",' - '"description": "This custom audience not shared.",' - '"check_name": "invalid_custom_audiences"' - '}' - ) - HAS_PAGE_AUTHORIZED_ADACCOUNT = 'true' - HEIGHT = 690 - IMAGE_HASH = '9fdba2b8a67f316e107d3cbbfad2952' - INCLUDE_DRAFTS = 'false' - INSTAGRAM_ACTOR_ID = '12321' - INVOICE = 'true' - ISSUES_INFO = ( - '{' - '"level": "AD",' - '"error_code": "1815869",' - '"error_summary": "Ad post is not available"' - '}' - ) - ITERATIVE_SPLIT_TEST_CONFIGS = '{"name": "test_config"}' - LAST_BUDGET_TOGGLING_TIME = '3892193' - LEVEL = 'ad' - LIFETIME_BUDGET = '10000' - NAME = 'test_name' - OBJECTIVE = 'LINK_CLICKS' - OBJECT_URL = 'http://test.object.com' - OPTIMIZATION_GOAL = 'LINK_CLICKS' - PACING_TYPE = 'standard' - PAGE_ID = '13531' - PRIORITY = '2' - PROMOTED_OBJECT = '{"page_id": "13531"}' - RECOMMENDATIONS = '{"code": "1772120"}' - RENDER_TYPE = 'FALLBACK' - REVIEW_FEEDBACK = 'test review' - SECONDARY_BUSINESS_ID = '2222222' - SECONDARY_ACCOUNT_ID = 'act_456' - SECONDARY_PAGE_ID = '24642' - SPECIAL_AD_CATEGORY = 'EMPLOYMENT' - SPEND_CAP = '922337203685478' - START_TIME = '3728232' - STATUS = 'PAUSED' - STOP_TIME = '3872293' - SUMMARY_ACTION_BREAKDOWNS = 'action_device' - TARGETING = ( - '{' - '"geo_locations": {"countries": "US"},' - '"interests":{"id": "12345678910", "name": "Parenting"}' - '}' - ) - TIME_RANGE =( - '{' - '"since": "2018-11-01",' - '"until": "2019-11-01"' - '}' - ) - TIMEZONE_ID = '10' - TITLE = 'test_title' - TOPLINE_ID = '32123' - TOS_ACCEPTED = ( - '{' - '"item1": "1"' - '}' - ) - TUNE_FOR_CATEGORY = 'CREDIT' - UPDATED_SINCE = '35487985' - UPDATED_TIME = '3728132' - UPSTREAM_EVENTS = '{"name": "event_1", "event_id": "12121"}' - WIDTH = 540 diff --git a/tap_facebook/facebook_business/test/integration_test_runner.py b/tap_facebook/facebook_business/test/integration_test_runner.py deleted file mode 100644 index 1681c3c..0000000 --- a/tap_facebook/facebook_business/test/integration_test_runner.py +++ /dev/null @@ -1,68 +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. - -''' -Integration test runner for the Python Facebook Business SDK. - -Note: - 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__)) -COMMEND_BASE = "python -m facebook_business.test." -# test will run under release folder -RELEASE_PATH = DIRECTORY + "/../../" - -# suffix of file name in the Test folder, which should not be executed -UTILS = "utils" -RUNNER = "runner" -CONSTANT = "constant" - -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: - cmd = COMMEND_BASE + test - try: - subprocess.check_output( - cmd, - cwd=os.chdir(RELEASE_PATH), - shell=True, - ) - except subprocess.CalledProcessError as e: - failed = True - continue - -if failed: - exit(1) diff --git a/tap_facebook/facebook_business/test/integration_utils.py b/tap_facebook/facebook_business/test/integration_utils.py deleted file mode 100644 index 1c8ae13..0000000 --- a/tap_facebook/facebook_business/test/integration_utils.py +++ /dev/null @@ -1,56 +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. - - -import unittest -import warnings -from enum import Enum -try: - from unittest.mock import patch -except ImportError: - from mock import patch -from requests.models import Response -from facebook_business.api import FacebookAdsApi, FacebookResponse - -class IntegrationTestCase(unittest.TestCase): - mock_response = None - - def __init__(self, *args, **kwargs): - super(IntegrationTestCase, self).__init__(*args, **kwargs) - FacebookAdsApi.init(access_token='access_token', crash_log=False) - - def setUp(self): - self.patcher = patch('requests.Session.request') - self.mock_request = self.patcher.start() - self.mock_response = Response() - - # ignore Deprecation warning from SDK which is not the part of our testcase - warnings.filterwarnings( - action='ignore', - category=DeprecationWarning, - ) - - def tearDown(self): - mock_response = None - self.patcher.stop() - -class StatusCode(Enum): - SUCCESS = 200 - ERROR = 400 diff --git a/tap_facebook/facebook_business/test/other_docs.py b/tap_facebook/facebook_business/test/other_docs.py deleted file mode 100644 index caddb7a..0000000 --- a/tap_facebook/facebook_business/test/other_docs.py +++ /dev/null @@ -1,75 +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. - -''' -Unit tests for the Python Facebook Business SDK. - -How to run: - python -m facebook_business.test.other_docs -''' - - -import os -import sys -import json -from .docs_utils import * - - -class AdConversionPixelDocsTestCase(DocsTestCase): - pass - - -class ClickTrackingTagDocsTestCase(DocsTestCase): - pass - - -class InsightsDocsTestCase(DocsTestCase): - pass - -if __name__ == '__main__': - with open(DocsDataStore.get('filename'), 'w') as handle: - handle.write('') - try: - config_file = open('./config.json') - except IOError: - print("No config file found, skipping docs tests") - sys.exit() - config = json.load(config_file) - config_file.close() - - act_id = "1505766289694659" - FacebookAdsApi.init( - config['app_id'], - config['app_secret'], - config['access_token'], - 'act_' + str(act_id) - ) - DocsDataStore.set('adaccount_id', 'act_' + str(act_id)) - DocsDataStore.set('adaccount_id_int', act_id) - DocsDataStore.set('business_id', '1454288444842444') - DocsDataStore.set('ca_id', '6026172406640') - DocsDataStore.set('dpa_catalog_id', '447683242047472') - DocsDataStore.set('dpa_set_id', '808641022536664') - DocsDataStore.set('dpa_feed_id', '1577689442497017') - DocsDataStore.set('dpa_upload_id', '1577690399163588') - DocsDataStore.set('as_user_id', '358829457619128') - DocsDataStore.set('pixel_id', '417531085081002') - - unittest.main() diff --git a/tap_facebook/facebook_business/test/unit.py b/tap_facebook/facebook_business/test/unit.py deleted file mode 100644 index 5e52be6..0000000 --- a/tap_facebook/facebook_business/test/unit.py +++ /dev/null @@ -1,465 +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. - -''' -Unit tests for the Python Facebook Business SDK. - -How to run: - python -m facebook_business.test.unit -''' - -import unittest -import json -import inspect -import six -import re -import hashlib -from six.moves import urllib -from sys import version_info -from .. import api -from .. import specs -from .. import exceptions -from .. import session -from .. import utils -from facebook_business.adobjects import (abstractcrudobject, - ad, - adaccount, - adcreative, - customaudience, - productcatalog) -from facebook_business.utils import version - - -class CustomAudienceTestCase(unittest.TestCase): - - def test_format_params(self): - payload = customaudience.CustomAudience.format_params( - customaudience.CustomAudience.Schema.email_hash, - [" test ", "test", "..test.."] - ) - # This is the value of "test" when it's hashed with sha256 - test_hash = \ - "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" - users = payload['payload']['data'] - assert users[0] == test_hash - assert users[1] == users[0] - assert users[2] == users[1] - - def test_fail_when_no_app_ids(self): - def uid_payload(): - customaudience.CustomAudience.format_params( - customaudience.CustomAudience.Schema.uid, - ["123123"], - ) - self.assertRaises( - exceptions.FacebookBadObjectError, - uid_payload, - ) - - def test_format_params_pre_hashed(self): - # This is the value of "test" when it's hashed with sha256 - user = "test" - test_hash = (hashlib.sha256(user.encode('utf8')).hexdigest()) - payload = customaudience.CustomAudience.format_params( - customaudience.CustomAudience.Schema.email_hash, - [test_hash], - pre_hashed=True - ) - - users = payload['payload']['data'] - assert users[0] == test_hash - - def test_multi_key_params(self): - schema = [ - customaudience.CustomAudience.Schema.MultiKeySchema.extern_id, - customaudience.CustomAudience.Schema.MultiKeySchema.fn, - customaudience.CustomAudience.Schema.MultiKeySchema.email, - customaudience.CustomAudience.Schema.MultiKeySchema.ln, - ] - payload = customaudience.CustomAudience.format_params( - schema,[["abc123def", " TEST ", "test", "..test.."]], - is_raw=True, - ) - # This is the value of [" Test ", " test", "..test"] and - # ["TEST2", 'TEST3', '..test5..'] when it's hashed with sha256 - # extern_id, however, should never get hashed. - test_hash1 = [ - "abc123def", - "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - ] - - users = payload['payload']['data'] - assert users[0] == test_hash1 - - def test_extern_id_key_single(self): - - schema = [ - customaudience.CustomAudience.Schema.MultiKeySchema.extern_id, - ] - payload = customaudience.CustomAudience.format_params( - schema, - [ - ["abc123def"], ["abc234def"], ["abc345def"], ["abc456def"], - ], - is_raw=True, - ) - - expected = [ - ["abc123def"], ["abc234def"], ["abc345def"], ["abc456def"], - ] - - actual = payload['payload']['data'] - assert actual == expected - - -class EdgeIteratorTestCase(unittest.TestCase): - - def test_builds_from_array(self): - """ - Sometimes the response returns an array inside the data - key. This asserts that we successfully build objects using - the objects in that array. - """ - response = { - "data": [{ - "id": "6019579" - }, { - "id": "6018402" - }] - } - ei = api.Cursor( - adaccount.AdAccount(fbid='123'), - ad.Ad, - ) - objs = ei.build_objects_from_response(response) - assert len(objs) == 2 - - def test_builds_from_object(self): - """ - Sometimes the response returns a single JSON object. This asserts - that we're not looking for the data key and that we correctly build - the object without relying on the data key. - """ - response = { - "id": "601957/targetingsentencelines", - "targetingsentencelines": [{ - "content": "Location - Living In:", - "children": [ - "United States" - ] - }, { - "content": "Age:", - "children": [ - "18 - 65+" - ] - }] - } - ei = api.Cursor( - adaccount.AdAccount(fbid='123'), - ad.Ad, - ) - obj = ei.build_objects_from_response(response) - assert len(obj) == 1 and obj[0]['id'] == "601957/targetingsentencelines" - - def test_total_is_none(self): - ei = api.Cursor( - adaccount.AdAccount(fbid='123'), - ad.Ad, - ) - self.assertRaises( - exceptions.FacebookUnavailablePropertyException, ei.total) - - def test_total_is_defined(self): - ei = api.Cursor( - adaccount.AdAccount(fbid='123'), - ad.Ad, - ) - ei._total_count = 32 - self.assertEqual(ei.total(), 32) - - def test_builds_from_object_with_data_key(self): - """ - Sometimes the response returns a single JSON object - with a "data". - For instance with adcreative. This asserts that we successfully - build the object that is in "data" key. - """ - response = { - "data": { - "name": "test name", - "status": "ACTIVE", - "account_id": 'act_345' - } - } - ei = api.Cursor( - ad.Ad('123'), - adcreative.AdCreative, - ) - obj = ei.build_objects_from_response(response) - assert len(obj) == 1 and obj[0]['account_id'] == 'act_345' - -class AbstractCrudObjectTestCase(unittest.TestCase): - def test_all_aco_has_id_field(self): - # Some objects do not have FBIDs or don't need checking (ACO) - for obj in (ad.Ad, - adaccount.AdAccount, - adcreative.AdCreative, - customaudience.CustomAudience, - productcatalog.ProductCatalog): - if ( - inspect.isclass(obj) and - issubclass(obj, abstractcrudobject.AbstractCrudObject) and - obj != abstractcrudobject.AbstractCrudObject - ): - try: - id_field = obj.Field.id - assert id_field != '' - except Exception as e: - self.fail("Could not instantiate " + str(obj) + "\n " + str(e)) - - def test_delitem_changes_history(self): - account = adaccount.AdAccount() - account['name'] = 'foo' - assert len(account._changes) > 0 - del account['name'] - assert len(account._changes) == 0 - - def test_fields_to_params(self): - """ - Demonstrates that AbstractCrudObject._assign_fields_to_params() - handles various combinations of params and fields properly. - """ - class Foo(abstractcrudobject.AbstractCrudObject): - _default_read_fields = ['id', 'name'] - - class Bar(abstractcrudobject.AbstractCrudObject): - _default_read_fields = [] - - for adclass, fields, params, expected in [ - (Foo, None, {}, {'fields': 'id,name'}), - (Foo, None, {'a': 'b'}, {'a': 'b', 'fields': 'id,name'}), - (Foo, ['x'], {}, {'fields': 'x'}), - (Foo, ['x'], {'a': 'b'}, {'a': 'b', 'fields': 'x'}), - (Foo, [], {}, {}), - (Foo, [], {'a': 'b'}, {'a': 'b'}), - (Bar, None, {}, {}), - (Bar, None, {'a': 'b'}, {'a': 'b'}), - (Bar, ['x'], {}, {'fields': 'x'}), - (Bar, ['x'], {'a': 'b'}, {'a': 'b', 'fields': 'x'}), - (Bar, [], {}, {}), - (Bar, [], {'a': 'b'}, {'a': 'b'}), - ]: - adclass._assign_fields_to_params(fields, params) - assert params == expected - - -class AbstractObjectTestCase(unittest.TestCase): - def test_export_nested_object(self): - obj = specs.PagePostData() - obj2 = {} - obj2['id'] = 'id' - obj2['name'] = 'foo' - obj['from'] = obj2 - expected = { - 'from': { - 'id': 'id', - 'name': 'foo' - } - } - assert obj.export_data() == expected - - def test_export_dict(self): - obj = specs.ObjectStorySpec() - obj['link_data'] = { - 'link_data': 3 - } - expected = { - 'link_data': { - 'link_data': 3 - } - } - assert obj.export_data() == expected - - def test_export_none(self): - obj = specs.ObjectStorySpec() - obj['link_data'] = None - expected = {} - assert obj.export_data() == expected - - def test_export_list(self): - obj = adcreative.AdCreative() - obj2 = specs.LinkData() - obj3 = specs.AttachmentData() - obj3['description'] = "$100" - obj2['child_attachments'] = [obj3] - obj['link_data'] = obj2 - - try: - json.dumps(obj.export_data()) - except: - self.fail("Objects in crud object export") - - def test_export_no_objects(self): - obj = specs.ObjectStorySpec() - obj2 = specs.VideoData() - obj2['description'] = "foo" - obj['video_data'] = obj2 - - try: - json.dumps(obj.export_data()) - except: - self.fail("Objects in object export") - - def test_can_print(self): - '''Must be able to print nested objects without serialization issues''' - obj = specs.PagePostData() - obj2 = {} - obj2['id'] = 'id' - obj2['name'] = 'foo' - obj['from'] = obj2 - - try: - obj.__repr__() - except TypeError as e: - self.fail('Cannot call __repr__ on AbstractObject\n %s' % e) - - -class SessionTestCase(unittest.TestCase): - - def gen_appsecret_proof(self, access_token, app_secret): - import hashlib - import hmac - - if version_info < (3, 0): - h = hmac.new( - bytes(app_secret), - msg=bytes(access_token), - digestmod=hashlib.sha256 - ) - else: - h = hmac.new( - bytes(app_secret, 'utf-8'), - msg=bytes(access_token, 'utf-8'), - digestmod=hashlib.sha256 - ) - return h.hexdigest() - - def test_appsecret_proof(self): - app_id = 'reikgukrhgfgtcheghjteirdldlrkjbu' - app_secret = 'gdrtejfdghurnhnjghjnertihbknlrvv' - access_token = 'bekguvjhdvdburldfnrfdguljijenklc' - - fb_session = session.FacebookSession(app_id, app_secret, access_token) - self.assertEqual( - fb_session.appsecret_proof, - self.gen_appsecret_proof(access_token, app_secret) - ) - - -class ProductCatalogTestCase(unittest.TestCase): - def test_b64_encode_is_correct(self): - product_id = 'ID_1' - b64_id_as_str = 'SURfMQ==' - - catalog = productcatalog.ProductCatalog() - self.assertEqual(b64_id_as_str, catalog.b64_encoded_id(product_id)) - - -class SessionWithoutAppSecretTestCase(unittest.TestCase): - def test_appsecret_proof_absence(self): - try: - session.FacebookSession( - access_token='thisisfakeaccesstoken' - ) - except Exception as e: - self.fail("Could not instantiate " + "\n " + str(e)) - - -class UrlsUtilsTestCase(unittest.TestCase): - - def test_quote_with_encoding_basestring(self): - s = "some string" - self.assertEqual( - utils.urls.quote_with_encoding(s), - urllib.parse.quote(s) - ) - # do not need to test for that in PY3 - if six.PY2: - s = u"some string with ùnicode".encode("utf-8") - self.assertEqual( - utils.urls.quote_with_encoding(s), - urllib.parse.quote(s) - ) - - def test_quote_with_encoding_unicode(self): - s = u"some string with ùnicode" - self.assertEqual( - utils.urls.quote_with_encoding(s), - urllib.parse.quote(s.encode("utf-8")) - ) - - def test_quote_with_encoding_integer(self): - s = 1234 - self.assertEqual( - utils.urls.quote_with_encoding(s), - urllib.parse.quote('1234') - ) - - def test_quote_with_encoding_other_than_string_and_integer(self): - s = [1, 2] - self.assertRaises( - ValueError, - utils.urls.quote_with_encoding, s - ) - - -class FacebookAdsApiBatchTestCase(unittest.TestCase): - - def test_add_works_with_utf8(self): - default_api = api.FacebookAdsApi.get_default_api() - batch_api = api.FacebookAdsApiBatch(default_api) - batch_api.add('GET', 'some/path', params={"key": u"vàlué"}) - self.assertEqual(len(batch_api), 1) - self.assertEqual(batch_api._batch[0], { - 'method': 'GET', - 'relative_url': 'some/path?'+'key=' + utils.urls.quote_with_encoding(u'vàlué') - }) - - -class VersionUtilsTestCase(unittest.TestCase): - - def test_api_version_is_pulled(self): - version_value = utils.version.get_version() - assert re.search('[0-9]+\.[0-9]+\.[0-9]', version_value) - - -class FacebookResponseTestCase(unittest.TestCase): - - def test_is_success_200(self): - resp = api.FacebookResponse(http_status=200) - self.assertTrue(resp.is_success()) - - def test_is_success_service_unavailable(self): - resp = api.FacebookResponse(body="Service Unavailable", http_status=200) - self.assertFalse(resp.is_success()) - -if __name__ == '__main__': - unittest.main() diff --git a/tap_facebook/facebook_business/typechecker.py b/tap_facebook/facebook_business/typechecker.py deleted file mode 100644 index 50c4958..0000000 --- a/tap_facebook/facebook_business/typechecker.py +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 -import six - -from facebook_business.utils import api_utils -from facebook_business.exceptions import( - FacebookBadParameterTypeException, -) - -class TypeChecker: - """ - A checker for field/params types of objects and API requests. - You may change the setting in apiconfig.py. Under STRICT mode, any check - failures will throw exception. Under non-STRICT mode, failures will result - in warning messages. - """ - - primitive_types = set(["unsigned int", "int", "bool", "string", "Object", - "datetime", "float"]) - - def __init__(self, type_check_info, type_check_enum): - self._type_check_info = type_check_info - self._enum_data = type_check_enum - - def is_primitive_type(self, type): - return (type in self.primitive_types) or (type in self._enum_data) - - def convert_string_to_prim_type(self, primitive_type, value): - if primitive_type in self._enum_data: - return value - elif primitive_type in ("unsigned int", "int"): - return int(value) - elif primitive_type == "bool": - return value not in ("false", "0", "null") - elif primitive_type == "float": - return float(value) - elif primitive_type == "datetime": - return value - elif primitive_type == "string": - return str(value) - elif primitive_type == "Object": - return value - else: - raise FacebookBadParameterTypeException('Fail to convert from ' + - value.__class__.__name__ + ' to ' + str(primitive_type)) - - def get_type(self, param): - if param not in self._type_check_info: - return None - return self._type_check_info[param] - - def is_valid_key(self, param): - return param in self._type_check_info - - def is_valid_pair(self, param, value): - if self.is_valid_key(param): - value_type = self._type_check_info[param] - return self.is_type(value_type, value) - else: - return True - - def is_type(self, value_type, value, allow_dict_as_obj=True): - if value is None or value_type is None: - return True - - if value_type in self._enum_data: - return value in self._enum_data[value_type] - if value_type == 'file': - return os.path.isfile(value) - if value_type == 'list': - return isinstance(value, list) - - if isinstance(value, dict) and value_type in ['map', 'Object']: - return True - if isinstance(value, bool): - return value_type in ['bool'] - if isinstance(value, six.string_types): - if value_type in ['string', 'unicode', 'file', 'datetime']: - return True - elif value_type == 'bool' and value in ['true', 'false']: - return True - elif value_type in ['int', 'unsigned int', 'float']: - return value.isdigit() - else: - return False - if isinstance(value, (int, float)): - return value_type in ['int', 'unsigned int', 'float', 'string', 'datetime'] - - if self.is_type_collection(value_type, 'list'): - 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) - 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') - 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)): - return True - - if allow_dict_as_obj and isinstance(value, dict): - return self._type_is_ad_object(value_type) - - return False - - def is_type_collection(self, value_type, collection_name): - return collection_name == value_type[:len(collection_name)] - - def get_type_from_collection(self, value_type, collection_name): - return [s.strip() for s in - value_type[len(collection_name):].strip("<>").split(',')] - - def is_list_param(self, param): - if self.is_valid_key(param): - return self.is_type_collection(self._type_check_info[param], "list") - return False - - def is_map_param(self, param): - if self.is_valid_key(param): - return self.is_type_collection(self._type_check_info[param], "map") - return False - - def is_file_param(self, param): - if param == "filename": - return True - if self.is_valid_key(param): - return self._type_check_info[param] == "file" - return False - - def get_typed_value(self, key, value): - if not self.is_valid_key(key): - return value - field_type = self.get_type(key) - if self.is_type(field_type, value, allow_dict_as_obj=False): - return value - - if self.is_primitive_type(field_type) and isinstance(value, six.text_type): - typed_value = self.convert_string_to_prim_type(field_type, value) - elif self.is_type_collection(field_type, "list"): - sub_type = self.get_type_from_collection(field_type, "list")[0] - if isinstance(value, list): - typed_value = [self.get_typed_value(sub_type, v) for v in value] - else: - typed_value = [self.get_typed_value(sub_type, value)] - elif self.is_type_collection(field_type, "map"): - sub_types = self.get_type_from_collection(field_type, "map") - 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] - 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) - except: - typed_value = value - else: - typed_value = value - - if not self.is_type(field_type, typed_value): - api_utils.warning('Value of ' + key + ' is not be compatible.' + - ' Expect ' + field_type + '; got ' + str(type(typed_value))) - return typed_value - - def _create_field_object(self, field_type, data=None): - mod = importlib.import_module( - "facebook_business.adobjects." + field_type.lower()) - if mod is not None and hasattr(mod, field_type): - obj = (getattr(mod, field_type))() - if data is not None: - obj._set_data(data) - return obj - return None - - def _type_is_ad_object(self, value_type): - try: - mod = importlib.import_module( - "facebook_business.adobjects." + value_type.lower()) - return mod is not None - except: - return False diff --git a/tap_facebook/facebook_business/utils/__init__.py b/tap_facebook/facebook_business/utils/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tap_facebook/facebook_business/utils/api_utils.py b/tap_facebook/facebook_business/utils/api_utils.py deleted file mode 100644 index 2de8bef..0000000 --- a/tap_facebook/facebook_business/utils/api_utils.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 warnings -from facebook_business import apiconfig -from facebook_business.exceptions import FacebookBadObjectError - - -def warning(message): - if apiconfig.ads_api_config['STRICT_MODE']: - raise FacebookBadObjectError(message) - else: - warnings.warn(message) diff --git a/tap_facebook/facebook_business/utils/urls.py b/tap_facebook/facebook_business/utils/urls.py deleted file mode 100644 index 0d0cbad..0000000 --- a/tap_facebook/facebook_business/utils/urls.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 - - -def quote_with_encoding(val): - """Quote a string that will be placed in url. - If the string is unicode, we encode it - to utf-8 before using `urllib.parse.quote`. - In case it's not a string (an int for instance), - we still try to convert it. - - Args: - val: The string to be properly encoded. - """ - if not isinstance(val, (six.integer_types, six.string_types)): - raise ValueError("Cannot encode {} type.".format(type(val))) - - # handle other stuff than strings - if isinstance(val, six.integer_types): - val = six.text_type(val).encode('utf-8') if six.PY3 else bytes(val) - - # works with PY2 and PY3 - elif not isinstance(val, bytes): - val = val.encode("utf-8") - - return six.moves.urllib.parse.quote(val) diff --git a/tap_facebook/facebook_business/utils/version.py b/tap_facebook/facebook_business/utils/version.py deleted file mode 100644 index d6f9273..0000000 --- a/tap_facebook/facebook_business/utils/version.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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. -""" - -import os -import re - - -def get_version(): - this_dir = os.path.dirname(__file__) - package_init_filename = os.path.join(this_dir, '../__init__.py') - - version = None - with open(package_init_filename, 'r') as handle: - file_content = handle.read() - version = re.search( - r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', - file_content, re.MULTILINE - ).group(1) - - if not version: - raise ValueError('Cannot find version information') - - return version diff --git a/tap_facebook/facebook_business/video_uploader.py b/tap_facebook/facebook_business/video_uploader.py deleted file mode 100644 index 1c92656..0000000 --- a/tap_facebook/facebook_business/video_uploader.py +++ /dev/null @@ -1,397 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# 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 -""" - -from facebook_business.exceptions import FacebookError -from facebook_business.exceptions import FacebookRequestError -from abc import ABCMeta, abstractmethod - -import os -import ntpath -import time - - -class VideoUploader(object): - """ - Video Uploader that can upload videos to adaccount - """ - - def __init__(self): - self._session = None - - def upload(self, video, wait_for_encoding=False): - """ - Upload the given video file. - Args: - video(required): The AdVideo object that will be uploaded - wait_for_encoding: Whether to wait until encoding is finished. - """ - # Check there is no existing session - if self._session: - raise FacebookError( - "There is already an upload session for this video uploader", - ) - - # Initiate an upload session - self._session = VideoUploadSession(video, wait_for_encoding) - result = self._session.start() - self._session = None - return result - - -class VideoUploadSession(object): - - def __init__(self, video, wait_for_encoding=False, interval=3, timeout=180): - self._video = video - self._api = video.get_api_assured() - if (video.Field.filepath in video): - self._file_path = video[video.Field.filepath] - self._slideshow_spec = None - elif (video.Field.slideshow_spec in video): - self._slideshow_spec = video[video.Field.slideshow_spec] - self._file_path = None - self._account_id = video.get_parent_id_assured() - self._wait_for_encoding = wait_for_encoding - # Setup start request manager - self._start_request_manager = VideoUploadStartRequestManager( - self._api, - ) - - # Setup transfer request manager - self._transfer_request_manager = VideoUploadTransferRequestManager( - self._api, - ) - - # Setup finish request manager - self._finish_request_manager = VideoUploadFinishRequestManager( - self._api, - ) - self._timeout = timeout - self._interval = interval - - def start(self): - # Run start request manager - start_response = self._start_request_manager.send_request( - self.getStartRequestContext(), - ).json() - self._start_offset = int(start_response['start_offset']) - self._end_offset = int(start_response['end_offset']) - self._session_id = start_response['upload_session_id'] - video_id = start_response['video_id'] - - # Run transfer request manager - self._transfer_request_manager.send_request( - self.getTransferRequestContext(), - ) - - # Run finish request manager - response = self._finish_request_manager.send_request( - self.getFinishRequestContext(), - ) - - if self._wait_for_encoding: - VideoEncodingStatusChecker.waitUntilReady( - self._api, video_id, interval=self._interval, timeout=self._timeout - ) - - # Populate the video info - body = response.json().copy() - body['id'] = video_id - del body['success'] - - return body - - def getStartRequestContext(self): - context = VideoUploadRequestContext() - if (self._file_path): - context.file_size = os.path.getsize(self._file_path) - context.account_id = self._account_id - return context - - def getTransferRequestContext(self): - context = VideoUploadRequestContext() - context.session_id = self._session_id - context.start_offset = self._start_offset - context.end_offset = self._end_offset - if (self._file_path): - context.file_path = self._file_path - if (self._slideshow_spec): - context.slideshow_spec = self._slideshow_spec - context.account_id = self._account_id - return context - - def getFinishRequestContext(self): - context = VideoUploadRequestContext() - context.session_id = self._session_id - context.account_id = self._account_id - if (self._file_path): - context.file_name = ntpath.basename(self._file_path) - return context - - -class VideoUploadRequestManager(object): - """ - Abstract class for request managers - """ - __metaclass__ = ABCMeta - - def __init__(self, api): - self._api = api - - @abstractmethod - def send_request(self, context): - """ - send upload request - """ - pass - - @abstractmethod - def getParamsFromContext(self, context): - """ - get upload params from context - """ - pass - - -class VideoUploadStartRequestManager(VideoUploadRequestManager): - - def send_request(self, context): - """ - send start request with the given context - """ - # Init a VideoUploadRequest and send the request - request = VideoUploadRequest(self._api) - request.setParams(self.getParamsFromContext(context)) - return request.send((context.account_id, 'advideos')) - - def getParamsFromContext(self, context): - return { - 'file_size': context.file_size, - 'upload_phase': 'start', - } - - -class VideoUploadTransferRequestManager(VideoUploadRequestManager): - - def send_request(self, context): - """ - send transfer request with the given context - """ - # Init a VideoUploadRequest - request = VideoUploadRequest(self._api) - self._start_offset = context.start_offset - self._end_offset = context.end_offset - filepath = context.file_path - file_size = os.path.getsize(filepath) - # Give a chance to retry every 10M, or at least twice - retry = max(file_size / (1024 * 1024 * 10), 2) - f = open(filepath, 'rb') - # While the there are still more chunks to send - while self._start_offset != self._end_offset: - # Read a chunk of file - f.seek(self._start_offset) - chunk = f.read(self._end_offset - self._start_offset) - context.start_offset = self._start_offset - context.end_offset = self._end_offset - # Parse the context - request.setParams( - self.getParamsFromContext(context), - {'video_file_chunk': ( - os.path.basename(context.file_path), - chunk, - 'multipart/form-data', - )}, - ) - # send the request - try: - response = request.send( - (context.account_id, 'advideos'), - ).json() - self._start_offset = int(response['start_offset']) - self._end_offset = int(response['end_offset']) - except FacebookRequestError as e: - subcode = e.api_error_subcode() - body = e.body() - if subcode == 1363037: - # 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 - retry > 0): - self._start_offset = int( - body['error']['error_data']['start_offset'], - ) - self._end_offset = int( - body['error']['error_data']['end_offset'], - ) - retry = max(retry - 1, 0) - continue - elif ('error' in body and - 'is_transient' in body['error']): - if body['error']['is_transient']: - time.sleep(1) - continue - f.close() - raise e - - f.close() - return response - - def getParamsFromContext(self, context): - return { - 'upload_phase': 'transfer', - 'start_offset': context.start_offset, - 'upload_session_id': context.session_id, - } - - -class VideoUploadFinishRequestManager(VideoUploadRequestManager): - - def send_request(self, context): - """ - send transfer request with the given context - """ - # Init a VideoUploadRequest - request = VideoUploadRequest(self._api) - - # Parse the context - request.setParams(self.getParamsFromContext(context)) - - # send the request - return request.send((context.account_id, 'advideos')) - - def getParamsFromContext(self, context): - return { - 'upload_phase': 'finish', - 'upload_session_id': context.session_id, - 'title': context.file_name, - } - - -class VideoUploadRequestContext(object): - """ - Upload request context that contains the param data - """ - - @property - def account_id(self): - return self._account_id - - @account_id.setter - def account_id(self, account_id): - self._account_id = account_id - - @property - def file_name(self): - return self._name - - @file_name.setter - def file_name(self, name): - self._name = name - - @property - def file_size(self): - return self._size - - @file_size.setter - def file_size(self, size): - self._size = size - - @property - def session_id(self): - return self._session_id - - @session_id.setter - def session_id(self, session_id): - self._session_id = session_id - - @property - def start_offset(self): - return self._start_offset - - @start_offset.setter - def start_offset(self, start_offset): - self._start_offset = start_offset - - @property - def end_offset(self): - return self._end_offset - - @end_offset.setter - def end_offset(self, end_offset): - self._end_offset = end_offset - - @property - def file(self): - return self._file - - @file.setter - def file(self, file): - self._file = file - - @property - def file_path(self): - return self._filepath - - @file_path.setter - def file_path(self, filepath): - self._filepath = filepath - - -class VideoUploadRequest(object): - - def __init__(self, api): - self._params = None - self._files = None - self._api = api - - def send(self, path): - """ - send the current request - """ - return self._api.call( - 'POST', - path, - params=self._params, - files=self._files, - url_override='https://graph-video.facebook.com', - ) - - def setParams(self, params, files=None): - self._params = params - self._files = files - - -class VideoEncodingStatusChecker(object): - - @staticmethod - def waitUntilReady(api, video_id, interval, timeout): - start_time = time.time() - while True: - status = VideoEncodingStatusChecker.getStatus(api, video_id) - status = status['video_status'] - if status != 'processing': - break - if start_time + timeout <= time.time(): - raise FacebookError('video encoding timeout: ' + str(timeout)) - time.sleep(interval) - if status != 'ready': - raise FacebookError( - 'video encoding status: ' + status, - ) - return - - @staticmethod - def getStatus(api, video_id): - result = api.call( - 'GET', - [int(video_id)], - params={'fields': 'status'}, - ).json() - return result['status'] From b60a91072f43d2e2dd8d3b13a7c22f4fdbbf6fed Mon Sep 17 00:00:00 2001 From: Sourabh Gandhi Date: Fri, 5 Apr 2024 13:14:23 +0000 Subject: [PATCH 4/4] update logger statement --- tap_facebook/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tap_facebook/__init__.py b/tap_facebook/__init__.py index bf8ec2b..b24d74d 100755 --- a/tap_facebook/__init__.py +++ b/tap_facebook/__init__.py @@ -98,7 +98,9 @@ def retry_on_summary_param_error(backoff_type, exception, **wait_gen_kwargs): """ def log_retry_attempt(details): _, exception, _ = sys.exc_info() - LOGGER.info("Retrying the API call to fix Summary param error") + LOGGER.info('Caught Summary param error after %s tries. Waiting %s more seconds then retrying...', + details["tries"], + details["wait"]) def should_retry_api_error(exception):