@@ -467,15 +467,6 @@ class VideosList(BaseModel):
467467 data : Union [list [Video ], Any ] = Field (default = None )
468468 paging : Union [Paging , Any ] = Field (default = None )
469469
470- class PixelOwnerBusiness (BaseModel ):
471- """Business that owns the pixel"""
472- model_config = ConfigDict (extra = "allow" , populate_by_name = True )
473-
474- id : Union [str | None , Any ] = Field (default = None , description = "Owner business ID" )
475- """Owner business ID"""
476- name : Union [str | None , Any ] = Field (default = None , description = "Owner business name" )
477- """Owner business name"""
478-
479470class PixelCreator (BaseModel ):
480471 """User who created the pixel"""
481472 model_config = ConfigDict (extra = "allow" , populate_by_name = True )
@@ -485,6 +476,15 @@ class PixelCreator(BaseModel):
485476 name : Union [str | None , Any ] = Field (default = None , description = "Creator user name" )
486477 """Creator user name"""
487478
479+ class PixelOwnerBusiness (BaseModel ):
480+ """Business that owns the pixel"""
481+ model_config = ConfigDict (extra = "allow" , populate_by_name = True )
482+
483+ id : Union [str | None , Any ] = Field (default = None , description = "Owner business ID" )
484+ """Owner business ID"""
485+ name : Union [str | None , Any ] = Field (default = None , description = "Owner business name" )
486+ """Owner business name"""
487+
488488class PixelOwnerAdAccount (BaseModel ):
489489 """Ad account that owns the pixel"""
490490 model_config = ConfigDict (extra = "allow" , populate_by_name = True )
@@ -689,16 +689,14 @@ class AdUpdateParams(BaseModel):
689689 tracking_specs : Union [str | None , Any ] = Field (default = None )
690690 bid_amount : Union [str | None , Any ] = Field (default = None )
691691
692- class AdLibraryAdDemographicDistributionItem (BaseModel ):
693- """Nested schema for AdLibraryAd.demographic_distribution_item """
692+ class AdLibraryAdSpend (BaseModel ):
693+ """Amount spent on the ad as a range """
694694 model_config = ConfigDict (extra = "allow" , populate_by_name = True )
695695
696- age : Union [str | None , Any ] = Field (default = None , description = "Age range" )
697- """Age range"""
698- gender : Union [str | None , Any ] = Field (default = None , description = "Gender category" )
699- """Gender category"""
700- percentage : Union [str | None , Any ] = Field (default = None , description = "Percentage of audience in this demographic" )
701- """Percentage of audience in this demographic"""
696+ lower_bound : Union [int | None , Any ] = Field (default = None , description = "Lower bound of spend" )
697+ """Lower bound of spend"""
698+ upper_bound : Union [int | None , Any ] = Field (default = None , description = "Upper bound of spend" )
699+ """Upper bound of spend"""
702700
703701class AdLibraryAdDeliveryByRegionItem (BaseModel ):
704702 """Nested schema for AdLibraryAd.delivery_by_region_item"""
@@ -709,15 +707,6 @@ class AdLibraryAdDeliveryByRegionItem(BaseModel):
709707 percentage : Union [str | None , Any ] = Field (default = None , description = "Percentage of audience in this region" )
710708 """Percentage of audience in this region"""
711709
712- class AdLibraryAdSpend (BaseModel ):
713- """Amount spent on the ad as a range"""
714- model_config = ConfigDict (extra = "allow" , populate_by_name = True )
715-
716- lower_bound : Union [int | None , Any ] = Field (default = None , description = "Lower bound of spend" )
717- """Lower bound of spend"""
718- upper_bound : Union [int | None , Any ] = Field (default = None , description = "Upper bound of spend" )
719- """Upper bound of spend"""
720-
721710class AdLibraryAdImpressions (BaseModel ):
722711 """Number of impressions as a range"""
723712 model_config = ConfigDict (extra = "allow" , populate_by_name = True )
@@ -736,6 +725,17 @@ class AdLibraryAdEstimatedAudienceSize(BaseModel):
736725 upper_bound : Union [int | None , Any ] = Field (default = None , description = "Upper bound of the estimated audience size" )
737726 """Upper bound of the estimated audience size"""
738727
728+ class AdLibraryAdDemographicDistributionItem (BaseModel ):
729+ """Nested schema for AdLibraryAd.demographic_distribution_item"""
730+ model_config = ConfigDict (extra = "allow" , populate_by_name = True )
731+
732+ age : Union [str | None , Any ] = Field (default = None , description = "Age range" )
733+ """Age range"""
734+ gender : Union [str | None , Any ] = Field (default = None , description = "Gender category" )
735+ """Gender category"""
736+ percentage : Union [str | None , Any ] = Field (default = None , description = "Percentage of audience in this demographic" )
737+ """Percentage of audience in this demographic"""
738+
739739class AdLibraryAd (BaseModel ):
740740 """An archived ad from the Facebook Ad Library, containing ad creative content, delivery information, spend data, and demographic reach breakdowns."""
741741 model_config = ConfigDict (extra = "allow" , populate_by_name = True )
0 commit comments