Class: Zernio::CreateStandaloneAdRequest

Inherits:
ApiModelBase show all
Defined in:
lib/zernio-sdk/models/create_standalone_ad_request.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ CreateStandaloneAdRequest

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {}) —

    Model attributes in the form of hash



550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 550

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateStandaloneAdRequest` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateStandaloneAdRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'account_id')
    self. = attributes[:'account_id']
  else
    self. = nil
  end

  if attributes.key?(:'ad_account_id')
    self. = attributes[:'ad_account_id']
  else
    self. = nil
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  else
    self.name = nil
  end

  if attributes.key?(:'campaign_name')
    self.campaign_name = attributes[:'campaign_name']
  end

  if attributes.key?(:'ad_set_name')
    self.ad_set_name = attributes[:'ad_set_name']
  end

  if attributes.key?(:'ad_name')
    self.ad_name = attributes[:'ad_name']
  end

  if attributes.key?(:'tracking')
    self.tracking = attributes[:'tracking']
  end

  if attributes.key?(:'goal')
    self.goal = attributes[:'goal']
  end

  if attributes.key?(:'optimization_goal')
    self.optimization_goal = attributes[:'optimization_goal']
  end

  if attributes.key?(:'billing_event')
    self.billing_event = attributes[:'billing_event']
  end

  if attributes.key?(:'buying_type')
    self.buying_type = attributes[:'buying_type']
  end

  if attributes.key?(:'rf_prediction_id')
    self.rf_prediction_id = attributes[:'rf_prediction_id']
  end

  if attributes.key?(:'promotion')
    self.promotion = attributes[:'promotion']
  end

  if attributes.key?(:'creative_features')
    if (value = attributes[:'creative_features']).is_a?(Hash)
      self.creative_features = value
    end
  end

  if attributes.key?(:'multi_advertiser')
    self.multi_advertiser = attributes[:'multi_advertiser']
  end

  if attributes.key?(:'validate_only')
    self.validate_only = attributes[:'validate_only']
  end

  if attributes.key?(:'budget_amount')
    self.budget_amount = attributes[:'budget_amount']
  end

  if attributes.key?(:'budget_type')
    self.budget_type = attributes[:'budget_type']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'campaign_status')
    self.campaign_status = attributes[:'campaign_status']
  end

  if attributes.key?(:'budget_level')
    self.budget_level = attributes[:'budget_level']
  else
    self.budget_level = 'adset'
  end

  if attributes.key?(:'currency')
    self.currency = attributes[:'currency']
  end

  if attributes.key?(:'headline')
    self.headline = attributes[:'headline']
  end

  if attributes.key?(:'long_headline')
    self.long_headline = attributes[:'long_headline']
  end

  if attributes.key?(:'body')
    self.body = attributes[:'body']
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.key?(:'bodies')
    if (value = attributes[:'bodies']).is_a?(Array)
      self.bodies = value
    end
  end

  if attributes.key?(:'headlines')
    if (value = attributes[:'headlines']).is_a?(Array)
      self.headlines = value
    end
  end

  if attributes.key?(:'descriptions')
    if (value = attributes[:'descriptions']).is_a?(Array)
      self.descriptions = value
    end
  end

  if attributes.key?(:'call_to_action')
    self.call_to_action = attributes[:'call_to_action']
  end

  if attributes.key?(:'link_url')
    self.link_url = attributes[:'link_url']
  end

  if attributes.key?(:'lead_gen_form_id')
    self.lead_gen_form_id = attributes[:'lead_gen_form_id']
  end

  if attributes.key?(:'image_url')
    self.image_url = attributes[:'image_url']
  end

  if attributes.key?(:'images')
    self.images = attributes[:'images']
  end

  if attributes.key?(:'video')
    self.video = attributes[:'video']
  end

  if attributes.key?(:'creatives')
    if (value = attributes[:'creatives']).is_a?(Array)
      self.creatives = value
    end
  end

  if attributes.key?(:'ad_set_id')
    self.ad_set_id = attributes[:'ad_set_id']
  end

  if attributes.key?(:'existing_campaign_id')
    self.existing_campaign_id = attributes[:'existing_campaign_id']
  end

  if attributes.key?(:'existing_creative_id')
    self.existing_creative_id = attributes[:'existing_creative_id']
  end

  if attributes.key?(:'business_name')
    self.business_name = attributes[:'business_name']
  end

  if attributes.key?(:'board_id')
    self.board_id = attributes[:'board_id']
  end

  if attributes.key?(:'organization_id')
    self.organization_id = attributes[:'organization_id']
  end

  if attributes.key?(:'targeting')
    self.targeting = attributes[:'targeting']
  end

  if attributes.key?(:'countries')
    if (value = attributes[:'countries']).is_a?(Array)
      self.countries = value
    end
  end

  if attributes.key?(:'cities')
    if (value = attributes[:'cities']).is_a?(Array)
      self.cities = value
    end
  end

  if attributes.key?(:'regions')
    if (value = attributes[:'regions']).is_a?(Array)
      self.regions = value
    end
  end

  if attributes.key?(:'age_min')
    self.age_min = attributes[:'age_min']
  end

  if attributes.key?(:'age_max')
    self.age_max = attributes[:'age_max']
  end

  if attributes.key?(:'interests')
    if (value = attributes[:'interests']).is_a?(Array)
      self.interests = value
    end
  end

  if attributes.key?(:'zips')
    if (value = attributes[:'zips']).is_a?(Array)
      self.zips = value
    end
  end

  if attributes.key?(:'metros')
    if (value = attributes[:'metros']).is_a?(Array)
      self.metros = value
    end
  end

  if attributes.key?(:'custom_locations')
    if (value = attributes[:'custom_locations']).is_a?(Array)
      self.custom_locations = value
    end
  end

  if attributes.key?(:'behaviors')
    if (value = attributes[:'behaviors']).is_a?(Array)
      self.behaviors = value
    end
  end

  if attributes.key?(:'work_positions')
    if (value = attributes[:'work_positions']).is_a?(Array)
      self.work_positions = value
    end
  end

  if attributes.key?(:'work_employers')
    if (value = attributes[:'work_employers']).is_a?(Array)
      self.work_employers = value
    end
  end

  if attributes.key?(:'work_industries')
    if (value = attributes[:'work_industries']).is_a?(Array)
      self.work_industries = value
    end
  end

  if attributes.key?(:'income_tier')
    self.income_tier = attributes[:'income_tier']
  end

  if attributes.key?(:'languages')
    if (value = attributes[:'languages']).is_a?(Array)
      self.languages = value
    end
  end

  if attributes.key?(:'placements')
    self.placements = attributes[:'placements']
  end

  if attributes.key?(:'saved_targeting_id')
    self.saved_targeting_id = attributes[:'saved_targeting_id']
  end

  if attributes.key?(:'raw_targeting')
    if (value = attributes[:'raw_targeting']).is_a?(Hash)
      self.raw_targeting = value
    end
  end

  if attributes.key?(:'special_ad_categories')
    if (value = attributes[:'special_ad_categories']).is_a?(Array)
      self.special_ad_categories = value
    end
  end

  if attributes.key?(:'special_ad_category_country')
    if (value = attributes[:'special_ad_category_country']).is_a?(Array)
      self.special_ad_category_country = value
    end
  end

  if attributes.key?(:'regional_regulated_categories')
    if (value = attributes[:'regional_regulated_categories']).is_a?(Array)
      self.regional_regulated_categories = value
    end
  end

  if attributes.key?(:'regional_regulation_identities')
    if (value = attributes[:'regional_regulation_identities']).is_a?(Hash)
      self.regional_regulation_identities = value
    end
  end

  if attributes.key?(:'end_date')
    self.end_date = attributes[:'end_date']
  end

  if attributes.key?(:'start_date')
    self.start_date = attributes[:'start_date']
  end

  if attributes.key?(:'instagram_account_id')
    self. = attributes[:'instagram_account_id']
  end

  if attributes.key?(:'dynamic_creative')
    self.dynamic_creative = attributes[:'dynamic_creative']
  end

  if attributes.key?(:'carousel_cards')
    if (value = attributes[:'carousel_cards']).is_a?(Array)
      self.carousel_cards = value
    end
  end

  if attributes.key?(:'default_locale')
    self.default_locale = attributes[:'default_locale']
  end

  if attributes.key?(:'translations')
    if (value = attributes[:'translations']).is_a?(Array)
      self.translations = value
    end
  end

  if attributes.key?(:'placement_assets')
    self.placement_assets = attributes[:'placement_assets']
  end

  if attributes.key?(:'audience_id')
    self.audience_id = attributes[:'audience_id']
  end

  if attributes.key?(:'campaign_type')
    self.campaign_type = attributes[:'campaign_type']
  else
    self.campaign_type = 'display'
  end

  if attributes.key?(:'keywords')
    if (value = attributes[:'keywords']).is_a?(Array)
      self.keywords = value
    end
  end

  if attributes.key?(:'negative_keywords')
    if (value = attributes[:'negative_keywords']).is_a?(Array)
      self.negative_keywords = value
    end
  end

  if attributes.key?(:'campaign_negative_keywords')
    if (value = attributes[:'campaign_negative_keywords']).is_a?(Array)
      self.campaign_negative_keywords = value
    end
  end

  if attributes.key?(:'additional_headlines')
    if (value = attributes[:'additional_headlines']).is_a?(Array)
      self.additional_headlines = value
    end
  end

  if attributes.key?(:'additional_descriptions')
    if (value = attributes[:'additional_descriptions']).is_a?(Array)
      self.additional_descriptions = value
    end
  end

  if attributes.key?(:'sitelinks')
    if (value = attributes[:'sitelinks']).is_a?(Array)
      self.sitelinks = value
    end
  end

  if attributes.key?(:'callouts')
    if (value = attributes[:'callouts']).is_a?(Array)
      self.callouts = value
    end
  end

  if attributes.key?(:'structured_snippets')
    if (value = attributes[:'structured_snippets']).is_a?(Array)
      self.structured_snippets = value
    end
  end

  if attributes.key?(:'advantage_audience')
    self.advantage_audience = attributes[:'advantage_audience']
  end

  if attributes.key?(:'attribution_spec')
    if (value = attributes[:'attribution_spec']).is_a?(Array)
      self.attribution_spec = value
    end
  end

  if attributes.key?(:'gender')
    self.gender = attributes[:'gender']
  else
    self.gender = 'all'
  end

  if attributes.key?(:'bid_strategy')
    self.bid_strategy = attributes[:'bid_strategy']
  end

  if attributes.key?(:'bid_amount')
    self.bid_amount = attributes[:'bid_amount']
  end

  if attributes.key?(:'roas_average_floor')
    self.roas_average_floor = attributes[:'roas_average_floor']
  end

  if attributes.key?(:'portfolio_bid_strategy_id')
    self.portfolio_bid_strategy_id = attributes[:'portfolio_bid_strategy_id']
  end

  if attributes.key?(:'value_rule_set_id')
    self.value_rule_set_id = attributes[:'value_rule_set_id']
  end

  if attributes.key?(:'value_rules_applied')
    self.value_rules_applied = attributes[:'value_rules_applied']
  end

  if attributes.key?(:'platform_specific_data')
    self.platform_specific_data = attributes[:'platform_specific_data']
  end

  if attributes.key?(:'dsa_beneficiary')
    self.dsa_beneficiary = attributes[:'dsa_beneficiary']
  end

  if attributes.key?(:'dsa_payor')
    self.dsa_payor = attributes[:'dsa_payor']
  end

  if attributes.key?(:'brand_identity')
    self.brand_identity = attributes[:'brand_identity']
  end

  if attributes.key?(:'identity_type')
    self.identity_type = attributes[:'identity_type']
  end

  if attributes.key?(:'smart_plus')
    self.smart_plus = attributes[:'smart_plus']
  end

  if attributes.key?(:'promoted_object')
    self.promoted_object = attributes[:'promoted_object']
  end
end

Instance Attribute Details

#account_id ⇒ Object

Returns the value of attribute account_id.



18
19
20
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 18

def 
  @account_id
end

#ad_account_id ⇒ Object

Returns the value of attribute ad_account_id.



20
21
22
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 20

def 
  
end

#ad_name ⇒ Object

Meta only. Exact ad name (the single-creative ad object's name). Overrides the default, which is name. (For per-ad names on the multi-creative shape, set name on each creatives[] entry instead.)



31
32
33
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 31

def ad_name
  @ad_name
end

#ad_set_id ⇒ Object

When present, switches to the attach shape: adds one new ad to this existing ad set without creating a new campaign. Budget, targeting, goal, schedule, AND bid strategy are inherited from the ad set on Meta, and passing bidStrategy in attach mode returns 400. To change an existing ad set's bid, use PUT /v1/ads/ad-sets/{adSetId}. Mutually exclusive with creatives[]. dynamicCreative returns 400 in attach mode: create a new dynamic ad set by omitting adSetId instead. The attached ad takes the full single-creative surface: headline/body/description/callToAction plus either imageUrl/video OR placementAssets (its own per-placement Feed/Story assets) OR translations/defaultLocale (its own per-locale asset feed, Meta only), and leadGenFormId when the target is a lead ad set (the parent must be ON_AD, true for ad sets created via goal lead_generation; Meta rejects a formless ad there, so pass the form on EVERY attached ad). This is the way to build N full ads sharing one ad set: create the first ad via the normal shape, then attach the rest one call each. Supported on Meta (facebook, instagram), Google Ads, TikTok, and LinkedIn. On TikTok the adSetId is the ad group ID; the new ad inherits the ad group's bid + budget + targeting. On LinkedIn the adSetId is the LinkedIn Campaign ID (numeric); we attach a new Creative to that Campaign, so the Campaign's platformSpecificData bidding, targeting, budget and schedule are inherited (passing those fields returns 400). On Google Ads the adSetId is the AD GROUP id. goal is still REQUIRED even though budget and targeting are inherited from the ad group. Send campaignType: \"search\" to attach into a Search ad group, including one created by POST /v1/ads/ad-sets (always SEARCH_STANDARD): without it the request is treated as Display and requires images.landscape + images.square + businessName, and the resulting display creative does not match a Search ad group. budgetAmount/budgetType and bidding fields (bidStrategy, bidAmount, portfolioBidStrategyId) return 400 on this shape; the ad group already owns them.



120
121
122
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 120

def ad_set_id
  @ad_set_id
end

#ad_set_name ⇒ Object

Meta only. Exact ad set name. Overrides the default <name> - Ad Set. (For per-ad names on the multi-creative shape, set name on each creatives[] entry.)



28
29
30
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 28

def ad_set_name
  @ad_set_name
end

#additional_descriptions ⇒ Object

Google Search RSA only. Extra descriptions.



244
245
246
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 244

def additional_descriptions
  @additional_descriptions
end

#additional_headlines ⇒ Object

Google Search RSA only. Extra headlines.



241
242
243
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 241

def additional_headlines
  @additional_headlines
end

#advantage_audience ⇒ Object

Meta only. Controls the Advantage audience feature (targeting_automation). 0 = disabled (default), 1 = enabled. Meta Marketing API requires this field on all ad set creation requests.



256
257
258
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 256

def advantage_audience
  @advantage_audience
end

#age_max ⇒ Object

Returns the value of attribute age_max.



151
152
153
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 151

def age_max
  @age_max
end

#age_min ⇒ Object

Returns the value of attribute age_min.



149
150
151
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 149

def age_min
  @age_min
end

#attribution_spec ⇒ Object

Meta only. Conversion attribution window for the ad set, mapping 1:1 to Meta's ad-set attribution_spec. Only honored for conversion goals (conversions, lead_generation, app_promotion); ignored for awareness/traffic/engagement. Omit to use Meta's default (7-day click + 1-day view). Meta enforces the valid combinations: VIEW_THROUGH only allows windowDays: 1 (7d/28d view windows were removed Jan 2026); ENGAGED_VIDEO_VIEW only 1 and only alongside VIEW_THROUGH: 1; CLICK_THROUGH: 28 only on certain objectives. Invalid combos surface as a Meta 400. Example: [{ \"eventType\": \"CLICK_THROUGH\", \"windowDays\": 7 }, { \"eventType\": \"VIEW_THROUGH\", \"windowDays\": 1 }]



259
260
261
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 259

def attribution_spec
  @attribution_spec
end

#audience_id ⇒ Object

Custom audience ID for targeting



226
227
228
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 226

def audience_id
  @audience_id
end

#behaviors ⇒ Object

Behaviour entities from /v1/ads/targeting/search?dimension=behavior. Supported on Meta and TikTok. Each must include id.



166
167
168
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 166

def behaviors
  @behaviors
end

#bid_amount ⇒ Object

Deprecated: send it inside platformSpecificData instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when bidStrategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Meta only: sending bidAmount WITHOUT bidStrategy requires existingCampaignId (400 otherwise), and sets the new ad set's cap under the joined campaign's COST_CAP / LOWEST_COST_WITH_BID_CAP parent. The strategy itself is inherited from the campaign. Restating bidStrategy here is accepted but has no effect on the ad set. Rejected with 400 in adSetId attach mode: that shape inherits its cap from the platform. Use PUT /v1/ads/ad-sets/{adSetId} there instead.



268
269
270
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 268

def bid_amount
  @bid_amount
end

#bid_strategy ⇒ Object

Deprecated: send it inside platformSpecificData instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Meta bid strategy applied to the ad set. OpenAI Ads: required on every ad group via this flat field, the only channel it supports (platformSpecificData is Meta/LinkedIn-only and returns 400 for OpenAI). No auto-bid option exists; send LOWEST_COST_WITH_BID_CAP or COST_CAP together with bidAmount, omitting it returns 400. Google (not deprecated there, this shared flat field is Google's only shape): applied to the campaign this call creates. On Google: LOWEST_COST_WITHOUT_CAP = Maximize Conversions, COST_CAP + bidAmount = Target CPA, LOWEST_COST_WITH_MIN_ROAS + roasAverageFloor = Target ROAS, LOWEST_COST_WITH_BID_CAP + bidAmount = Maximize Clicks with a CPC ceiling; portfolioBidStrategyId attaches a portfolio strategy instead. Omitted, the campaign falls back to a goal-based default.



265
266
267
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 265

def bid_strategy
  @bid_strategy
end

#billing_event ⇒ Object

Meta only. Explicit ad-set billing_event. Defaults to IMPRESSIONS. Forwarded verbatim to Meta, which validates compatibility with the optimization goal.



42
43
44
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 42

def billing_event
  @billing_event
end

#board_id ⇒ Object

Pinterest only. Board ID (auto-creates if not provided).



132
133
134
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 132

def board_id
  @board_id
end

#bodies ⇒ Object

Meta only. Multiple Text Options (Advantage+ Flexible Format): supply 1-5 primary-text variations and Meta optimises delivery across them, WITHOUT enabling full Dynamic Creative (dynamicCreative). Uses optimization_type: DEGREES_OF_FREEDOM on the asset feed, so multiple ads per ad set are allowed (unlike dynamicCreative which is limited to one). Requires imageUrl or video, linkUrl, and callToAction. When set, the top-level body field is used as the object_story_spec.link_data.message (the preview text) and headlines must also be present. On a video creative the copy lands in video_data.message / video_data.title instead of link_data. Mutually exclusive with dynamicCreative, placementAssets, carouselCards, and creatives[].



92
93
94
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 92

def bodies
  @bodies
end

#body ⇒ Object

Required on legacy + attach shapes. For X this is the tweet text (max 280 chars including a ~24-char URL when linkUrl is set). On LinkedIn this is the post commentary (the intro text shown above the ad). On OpenAI Ads this is the chat card's body text. Max: Google=90, Pinterest=500, OpenAI=100.



86
87
88
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 86

def body
  @body
end

#brand_identity ⇒ Object

Returns the value of attribute brand_identity.



290
291
292
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 290

def brand_identity
  @brand_identity
end

#budget_amount ⇒ Object

Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).



62
63
64
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 62

def budget_amount
  @budget_amount
end

#budget_level ⇒ Object

Meta only. Where the budget lives, which selects the Meta budget model: - adset (default): ABO (Ad-set Budget Optimization). The budget is set on the ad set. This is the back-compatible behaviour; omit this field to keep it. - campaign: CBO (Campaign Budget Optimization / Advantage Campaign Budget). The budget AND bidStrategy are set on the CAMPAIGN, and Meta distributes spend across ad sets automatically. Meta requires the budget at exactly one level, never both. Non-Meta platforms ignore this field. Ignored on the attach shape (adSetId), which inherits the existing budget.



74
75
76
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 74

def budget_level
  @budget_level
end

#budget_type ⇒ Object

Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads accepts lifetime only (no daily-budget concept on the platform); sending daily returns 422. OpenAI Ads lifetime budgets require endDate to give the lifetime cap a spend window.



65
66
67
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 65

def budget_type
  @budget_type
end

#business_name ⇒ Object

Google Display only



129
130
131
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 129

def business_name
  @business_name
end

#buying_type ⇒ Object

Meta only. RESERVED = Reach & Frequency: requires rfPredictionId (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives, adSetId, existingCampaignId or dynamicCreative).



45
46
47
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 45

def buying_type
  @buying_type
end

#call_to_action ⇒ Object

Required on legacy + attach shapes for Meta. Honoured on TikTok (passes through to the Spark Ad creative's call_to_action) and on LinkedIn (the CTA button on the ad; defaults to LEARN_MORE when linkUrl is set). LinkedIn accepts: LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. Ignored by Google, Pinterest, and X.



101
102
103
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 101

def call_to_action
  @call_to_action
end

#callouts ⇒ Object

Google Search only. Short callout texts (max 25 chars each) that appear as non-clickable annotations under the ad, e.g. "Free shipping", "24/7 support". Each becomes one Asset (callout_asset) plus a CampaignAsset link with field_type CALLOUT. Response's creative.callouts echoes each input plus its Google resourceName.



250
251
252
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 250

def callouts
  @callouts
end

#campaign_name ⇒ Object

Meta only. Exact campaign name. Overrides the default <name> - Campaign.



25
26
27
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 25

def campaign_name
  @campaign_name
end

#campaign_negative_keywords ⇒ Object

Google Search only; other platforms return 400. Campaign-level negative keywords (campaign_criterion.negative), created alongside the ad group. Editable later via PUT /v1/ads/campaigns/campaignId/negative-keywords.



238
239
240
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 238

def campaign_negative_keywords
  @campaign_negative_keywords
end

#campaign_status ⇒ Object

Meta only. Overrides status for the campaign level alone, so you can create a live campaign whose ad set and ad stay paused, or the reverse. Omitted, it follows status.



71
72
73
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 71

def campaign_status
  @campaign_status
end

#campaign_type ⇒ Object

Google only



229
230
231
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 229

def campaign_type
  @campaign_type
end

Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to the creative's link_data.child_attachments. Unlike dynamicCreative, you control the card order and per-card copy/link. Requires top-level body and callToAction; linkUrl is also required UNLESS leadGenFormId is set. Those become the ad's own Destination and button (link_data.link / link_data.call_to_action), and double as the per-card fallback when a card omits its own. Mutually exclusive with imageUrl/video, creatives[], dynamicCreative, placementAssets, existingCreativeId, adSetId and goal catalog_sales. Combines with leadGenFormId to build a carousel Instant-Form lead ad: linkUrl and per-card linkUrl become OPTIONAL and, when sent, are forwarded as the real card and top-level destinations; when omitted, the destination falls back to Meta's lead-form link.



215
216
217
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 215

def carousel_cards
  @carousel_cards
end

#cities ⇒ Object

City-level geo targeting (Meta and TikTok). Each city is targeted by the platform's opaque key (the city ID) which can be looked up via GET /v1/ads/targeting/search?dimension=geo&q=<name>&countryCode=<ISO>. Optional radius + distance_unit (Meta only) extend the targeting beyond the city limits (e.g. radius 25 km around the city center). Both must be set together, or both omitted (Meta defaults to ~16 km when omitted). On Meta, cannot overlap with the same country in countries (Meta returns a "locations overlap" error). Either drop the country or scope it to a different country. On TikTok, keys are numeric location ids and can be sent without countries.



144
145
146
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 144

def cities
  @cities
end

#countries ⇒ Object

ISO 3166-1 alpha-2 country codes (e.g. ['NL']). Defaults to ['US'] when no other geo targeting (flat or nested targeting) is provided. (LinkedIn and OpenAI Ads currently honour country-level targeting only; any other targeting field returns 400 for OpenAI Ads.)



141
142
143
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 141

def countries
  @countries
end

#creative_features ⇒ Object

Meta only. Applied to each new creative, including standalone and attach shapes. With creatives, these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an enhancement; an explicit offer uses promotion.



53
54
55
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 53

def creative_features
  @creative_features
end

#creatives ⇒ Object

Meta-only. When present, switches to the multi-creative shape: creates 1 campaign + 1 ad set + N ads (one per entry here). Top-level headline / body / imageUrl / linkUrl / callToAction are ignored in this mode. Mutually exclusive with adSetId.



117
118
119
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 117

def creatives
  @creatives
end

#currency ⇒ Object

ISO 4217 currency code matching the ad account's currency (e.g. USD). Meta only. Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is).



77
78
79
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 77

def currency
  @currency
end

#custom_locations ⇒ Object

Point-radius (lat/lng) geo targeting. Meta only (custom_locations). Rejected on platforms without radius support.



163
164
165
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 163

def custom_locations
  @custom_locations
end

#default_locale ⇒ Object

Meta only. Language the top-level copy is written in (e.g. en, pt_BR), used by the translations default rule. Defaults to en. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in translations.



218
219
220
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 218

def default_locale
  @default_locale
end

#description ⇒ Object

Meta only (facebook/instagram). Link description: the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description). When omitted, Meta auto-pulls the destination URL's OpenGraph description. Applies on legacy, attach, and placementAssets shapes; for multi-creative use creatives.description (this field is the shared fallback). For multi-text variations use descriptions (array) instead.



89
90
91
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 89

def description
  @description
end

#descriptions ⇒ Object

Meta only. Optional description variations for Multiple Text Options. Sent alongside bodies and headlines.



98
99
100
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 98

def descriptions
  @descriptions
end

#dsa_beneficiary ⇒ Object

Legal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26). Optional if the ad account has a default beneficiary: set it once via PATCH /v1/ads/accounts or in Meta Ads Manager, and Meta fills it in whenever the field is omitted.



285
286
287
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 285

def dsa_beneficiary
  @dsa_beneficiary
end

#dsa_payor ⇒ Object

Legal entity that pays for the ad. Can differ from dsaBeneficiary (for example, an agency paying for a client's ads). Same rules as dsaBeneficiary: required for EU targeting unless the ad account has a default payor.



288
289
290
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 288

def dsa_payor
  @dsa_payor
end

#dynamic_creative ⇒ Object

Returns the value of attribute dynamic_creative.



212
213
214
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 212

def dynamic_creative
  @dynamic_creative
end

#end_date ⇒ Object

Required for lifetime budgets



204
205
206
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 204

def end_date
  @end_date
end

#existing_campaign_id ⇒ Object

Meta, Google Ads, and LinkedIn. On Meta: add the new ad set under this EXISTING campaign instead of creating a new one (multi-ad-set audience testing). The new ad set's budget is matched to the campaign's mode automatically: for a CBO campaign (campaign-level budget) omit budgetAmount/budgetType, since the campaign owns the budget; for an ABO campaign pass them (they go on the new ad set). On LinkedIn: create a new Campaign (and its Creative) under this EXISTING CampaignGroup. On Google Ads: create a new ad group under this EXISTING campaign; the new ad group inherits the campaign's budget, so omit budgetAmount/budgetType (and any bidding field), or the request returns 400. On failure only the entities we authored are cleaned up; the pre-existing parent is left untouched and is never (re)activated. Mutually exclusive with adSetId and creatives[].



123
124
125
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 123

def existing_campaign_id
  @existing_campaign_id
end

#existing_creative_id ⇒ Object

Meta only. Reuse an EXISTING ad creative by id instead of building a new one from the copy/media fields (which are then ignored). Combine with existingCampaignId to build a multi-ad-set campaign that shares one creative. Mutually exclusive with creatives[], dynamicCreative, and placementAssets. The creative id used is returned as creativeId on the create response.



126
127
128
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 126

def existing_creative_id
  @existing_creative_id
end

#gender ⇒ Object

Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.



262
263
264
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 262

def gender
  @gender
end

#goal ⇒ Object

Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. Meta - conversions: OUTCOME_SALES. Requires promotedObject.pixelId and promotedObject.customEventType with a commerce event such as PURCHASE or START_TRIAL, or promotedObject.customConversionId to optimise against a Custom Conversion, or customEventType: OTHER + customEventStr to optimise against a pixel custom event. - lead_conversion: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, but with a leads-class event such as LEAD, SUBMIT_APPLICATION, SCHEDULE or CONTACT (or promotedObject.customConversionId to optimise against a Custom Conversion instead). Meta gates conversion events by objective, so leads-class events are rejected under conversions. - lead_generation: OUTCOME_LEADS with instant forms. Requires leadGenFormId. promotedObject.pageId is optional and auto-filled from the connected Page. - app_promotion: requires promotedObject.applicationId and promotedObject.objectStoreUrl. - catalog_sales: Advantage+ catalog ads, for example vehicle inventory. Requires promotedObject.productSetId, promotedObject.pixelId and promotedObject.customEventType. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like Zernio::CreateStandaloneAdRequest.{product{product.name} or Zernio::CreateStandaloneAdRequest.{vehicle{vehicle.make}. No imageUrl or video is sent; Meta renders the visuals per catalog item. Discover catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/catalogId/product-sets. Single shape only, no creatives, adSetId, dynamicCreative or placementAssets. - page_likes: Page Likes conversion location under OUTCOME_ENGAGEMENT (destination_type ON_PAGE, optimization PAGE_LIKES). promotedObject.pageId is optional and auto-filled from the connected Page. The creative CTA is fixed to LIKE_PAGE targeting that Page; headline / body / linkUrl / callToAction / imageUrl / video are all optional (Meta derives the link and the Like button from the Page). TikTok - conversions: website-conversion ad group. Requires promotedObject.pixelId, your TikTok Pixel ID. Accepts an optional promotedObject.customEventType with a TikTok optimization_event code your pixel tracks (newer pixels use e.g. SHOPPING for purchase events; legacy pixels use ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER or FORM). To inherit pixel and event from an existing ad group, pass adSetId instead. LinkedIn - engagement, traffic, awareness and video_views create standalone Direct Sponsored Content ads. traffic requires linkUrl; video_views requires video. - lead_generation: requires leadGenFormId (an adForm ID from POST /v1/ads/lead-forms). The campaign objective is set to MAX_LEAD and the creative's leadgenCallToAction destination is set to urn:li:adForm:{id}. - job_applicants requires a platformSpecificData.jobs creative. - For conversions on LinkedIn, or to promote an existing post, use POST /v1/ads/boost. OpenAI Ads - Only traffic, awareness, and conversions are supported (other goals return 400). Maps to OpenAI's bidding_type (clicks, impressions, conversions respectively). conversions requires an active conversion event setting on the account; create a tracking tag with defaultEventType via the tracking-tags API (POST /v1/accounts/{accountId}/tracking-tags), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.



36
37
38
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 36

def goal
  @goal
end

#headline ⇒ Object

Required for Meta, Google, Pinterest, LinkedIn, and OpenAI Ads on legacy + attach shapes (skip for multi-creative; use creatives[].headline). Ignored for TikTok and X. Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400, OpenAI=50 (min 3). On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title. On OpenAI Ads this is the chat card's title.



80
81
82
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 80

def headline
  @headline
end

#headlines ⇒ Object

Meta only. Headline variations for Multiple Text Options. Must be sent alongside bodies. The top-level headline field is used as the object_story_spec.link_data.name (video_data.title on a video creative).



95
96
97
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 95

def headlines
  @headlines
end

#identity_type ⇒ Object

TikTok only. Forces the identity attribution on the ad: - TT_USER: the posting account's open_id (real @username branding). Requires a connected TikTok posting account on the same profile. - CUSTOMIZED_USER: synthetic Brand Identity (display name + avatar). Requires a configured Brand Identity (cached on the tiktokads SocialAccount via PATCH /v1/connect/tiktok-ads) or an inline brandIdentity to create one on the fly. When omitted, defaults to TT_USER if a posting account is connected on this profile, else CUSTOMIZED_USER. Spark Ads (POST /v1/ads/boost) always use TT_USER regardless of this field, because TikTok requires the original organic post's author identity for Spark.



293
294
295
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 293

def identity_type
  @identity_type
end

#image_url ⇒ Object

Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with video). Required for LinkedIn ads unless video is set. Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the imageUrl name for cross-platform consistency). Ignored for X. For Google Display, treated as the landscape image (alias of images.landscape); supply images.square alongside or the request is rejected. For LinkedIn the image is uploaded to LinkedIn under the authoring Company Page (see organizationId); recommended ratio 1.91:1 (e.g. 1200×627). Required for OpenAI Ads (uploaded as the chat card's image; OpenAI has no video ad format).



110
111
112
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 110

def image_url
  @image_url
end

#images ⇒ Object

Returns the value of attribute images.



112
113
114
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 112

def images
  @images
end

#income_tier ⇒ Object

Normalized household-income tier. Meta and TikTok express all four; Google maps only top_10; rejected on LinkedIn, X, and Pinterest. On Meta, income targeting is incompatible with housing/employment/credit specialAdCategories.



178
179
180
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 178

def income_tier
  @income_tier
end

#instagram_account_id ⇒ Object

Meta only. Override the Instagram account the ad is delivered as. Pass an Instagram Business Account ID (e.g. 17841...), mapped to the creative's instagram_user_id. When omitted we use the Instagram actor Meta already runs the Page's other ads as, falling back to the Page's page-backed Instagram account. Useful when a Page has more than one eligible IG account.



210
211
212
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 210

def 
  
end

#interests ⇒ Object

Interest objects from /v1/ads/interests. Each must include id and name.



154
155
156
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 154

def interests
  @interests
end

#keywords ⇒ Object

Google Search only. Keywords on the new ad group; entries are strings (BROAD) or { text, matchType }. Editable later via PUT /v1/ads/adId targeting.keywords.



232
233
234
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 232

def keywords
  @keywords
end

#languages ⇒ Object

e.g. ["en","es"]. Google: campaign language targeting (language_constant) using Google's language codes (ISO 639-1, plus variants such as zh_CN); unknown codes return 400. On Meta, a bare code targets all regional variants ("en" = all English), or use a region-qualified code for a specific one ("en_GB", "pt_BR", "zh_TW"); unknown codes are rejected. Other ad platforms use their own language-code systems.



181
182
183
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 181

def languages
  @languages
end

#lead_gen_form_id ⇒ Object

Lead Gen form ID to attach to the ad's creative. REQUIRED when goal is lead_generation. Create one via POST /v1/ads/lead-forms. On Meta (facebook/instagram) this is the leadgen_forms ID; the ad set's promoted_object.page_id + LEAD_GENERATION optimization + destination_type ON_AD are derived automatically from the goal. On LinkedIn this is the adForm ID; the creative's leadgenCallToAction.destination is set to urn:li:adForm:{id} and the campaign objective is set to MAX_LEAD. Forms must be owned by the sponsoredAccount (not the organization) for the URN to resolve. Also required on every Meta ATTACH (adSetId) call that targets a lead ad set (the form attaches per-ad; Meta rejects a formless ad in a lead ad set). placementAssets, dynamicCreative and carouselCards (Meta multi-card Instant-Form lead ad; linkUrl and per-card linkUrl are optional and forwarded as real destinations when sent, falling back to Meta's lead-form link when omitted) ARE supported on Meta instant-form lead ads.



107
108
109
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 107

def lead_gen_form_id
  @lead_gen_form_id
end

Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for traffic ads, optional for engagement / awareness. NOT required when goal is lead_generation (the ad opens a Lead Gen form instead of a destination). On LinkedIn, imageUrl + linkUrl publishes an ARTICLE-content creative; this is LinkedIn's article ad format, with the image as thumbnail and longHeadline as description. Required for OpenAI Ads (the chat card's target_url).



104
105
106
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 104

def link_url
  @link_url
end

#long_headline ⇒ Object

Google Display only. Defaults to headline if omitted. On LinkedIn, reused as the optional secondary description text on traffic (link) ads; omitted if not provided.



83
84
85
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 83

def long_headline
  @long_headline
end

#metros ⇒ Object

DMA / metro-area geo targeting (Meta and TikTok). key is the platform's metro ID from /v1/ads/targeting/search?dimension=geo&geoType=metro (TikTok metros appear as type metro, e.g. the New York DMA).



160
161
162
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 160

def metros
  @metros
end

#multi_advertiser ⇒ Object

Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a creativeFeatures key, and Meta rejects it there.



56
57
58
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 56

def multi_advertiser
  @multi_advertiser
end

#name ⇒ Object

Returns the value of attribute name.



22
23
24
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 22

def name
  @name
end

#negative_keywords ⇒ Object

Google Search only; other platforms return 400. Ad-group-level negative keywords on the new ad group. Editable later via PUT /v1/ads/adId targeting.negativeKeywords.



235
236
237
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 235

def negative_keywords
  @negative_keywords
end

#optimization_goal ⇒ Object

Meta only. Explicit ad-set optimization_goal (e.g. LANDING_PAGE_VIEWS, LINK_CLICKS, REACH, IMPRESSIONS, OFFSITE_CONVERSIONS, THRUPLAY, LEAD_GENERATION). Overrides the default derived from goal (e.g. traffic defaults to LINK_CLICKS). Forwarded verbatim to Meta, which validates compatibility with the campaign objective and rejects incompatible combinations.



39
40
41
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 39

def optimization_goal
  @optimization_goal
end

#organization_id ⇒ Object

LinkedIn only. The Company Page that authors the Direct Sponsored Content ("dark") post backing the ad. Accepts a numeric organization ID or a full urn:li:organization:N URN. Required unless the resolved accountId is a connected LinkedIn Company-Page account (defaults to that page) or the LinkedIn ad account is org-owned (defaults to the account's owning organization). The authenticated member must be an ADMINISTRATOR or DIRECT_SPONSORED_CONTENT_POSTER of this page (and the page must be associated with the ad account), or LinkedIn returns 403. Ignored by every other platform.



135
136
137
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 135

def organization_id
  @organization_id
end

#placement_assets ⇒ Object

Returns the value of attribute placement_assets.



223
224
225
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 223

def placement_assets
  @placement_assets
end

#placements ⇒ Object

Returns the value of attribute placements.



183
184
185
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 183

def placements
  @placements
end

#platform_specific_data ⇒ Object

Returns the value of attribute platform_specific_data.



282
283
284
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 282

def platform_specific_data
  @platform_specific_data
end

#portfolio_bid_strategy_id ⇒ Object

Google only. Attach an existing portfolio bid strategy (numeric id from GET /v1/ads/bid-strategies) to the new campaign instead of a standard one. Exclusive with bidStrategy.



274
275
276
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 274

def portfolio_bid_strategy_id
  @portfolio_bid_strategy_id
end

Returns the value of attribute promoted_object.



298
299
300
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 298

def promoted_object
  @promoted_object
end

#promotion ⇒ Object

Returns the value of attribute promotion.



50
51
52
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 50

def promotion
  @promotion
end

#raw_targeting ⇒ Object

Meta only. A raw Meta-native targeting spec (snake_case: geo_locations, age_min, excluded_custom_audiences, flexible_spec, targeting_automation, user_os, wireless_carrier, business places, etc.), exactly the shape GET /v1/ads/{adId} returns for external ads. Sent alone it reaches the ad set VERBATIM (the clone-a-campaign's-targeting-exactly path). Meta validates and surfaces any errors. Can be combined with the camelCase targeting fields (countries/regions/cities/interests/ageMin/..., targeting, savedTargetingId, audienceId): rawTargeting is the BASE layer and the built camelCase spec is merged on top, key by key, with the camelCase side winning on collision (the camelCase precedence chain stays savedTargetingId < targeting < flat fields). The merge goes one level deep inside geo_locations and excluded_geo_locations: built sub-keys win, raw-only sub-keys such as location_types survive alongside built countries. Array values (flexible_spec, ...) are replaced as a WHOLE key when the camelCase spec builds them, never element-merged. When rawTargeting is present the defaults the camelCase builder normally injects (US geo, targeting_automation.advantage_audience: 0) are suppressed, so raw's values are not clobbered. Include targeting_automation in the raw spec (or send advantageAudience) as Meta requires it on create. If cloning an EU campaign, also pass dsaBeneficiary / dsaPayor (those are separate fields, not part of targeting).



189
190
191
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 189

def raw_targeting
  @raw_targeting
end

#regional_regulated_categories ⇒ Object

Meta only. Regional regulation categories required when the ad set targets certain countries. Known values: BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV. Meta rejects the ad set without this when the targeting geo includes the corresponding country.



198
199
200
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 198

def regional_regulated_categories
  @regional_regulated_categories
end

#regional_regulation_identities ⇒ Object

Meta only. Beneficiary/payer entity IDs for regionalRegulatedCategories. Values are numeric IDs from Meta verification. Keys vary by category (e.g. universal_beneficiary / universal_payer for BRAZIL_REGULATION and THAILAND_UNIVERSAL). If omitted, Meta uses Ads Manager defaults when configured.



201
202
203
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 201

def regional_regulation_identities
  @regional_regulation_identities
end

#regions ⇒ Object

Region-level (state/province) geo targeting (Meta and TikTok). Each region is targeted by the platform's opaque key (the region ID) which can be looked up via GET /v1/ads/targeting/search?dimension=geo&q=<name>&countryCode=<ISO>.



147
148
149
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 147

def regions
  @regions
end

#rf_prediction_id ⇒ Object

Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id, so pass that one). Requires buyingType RESERVED.



48
49
50
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 48

def rf_prediction_id
  @rf_prediction_id
end

#roas_average_floor ⇒ Object

Deprecated: send it inside platformSpecificData instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when bidStrategy is LOWEST_COST_WITH_MIN_ROAS. Sending it without bidStrategy is a 400. Sent to Meta as bid_constraints.roas_average_floor × 10000. Known gap: a CBO campaign's ROAS floor lives on the campaign only (set via POST /v1/ads/campaigns); there is no supported way to set it while joining a CBO campaign here.



271
272
273
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 271

def roas_average_floor
  @roas_average_floor
end

#saved_targeting_id ⇒ Object

ID of a saved_targeting audience (created via POST /v1/ads/audiences). When set, its stored TargetingSpec is expanded as the base targeting; inline fields on this body merge on top. Lets you reuse a named targeting preset without re-sending every field.



186
187
188
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 186

def saved_targeting_id
  @saved_targeting_id
end

Google Search only. Sitelink assets to create and attach at the campaign level. Each entry becomes an Asset (with sitelink_asset + Asset.final_urls) plus a CampaignAsset link (field_type SITELINK). Approval is async: Google reviews assets after creation; poll asset.policy_summary later to read the verdict. Google requires at least two sitelinks to surface them on an ad; four or more is Google's own recommendation for maximum visibility. The response's creative.sitelinks echoes each input plus its Google resourceName.



247
248
249
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 247

def sitelinks
  @sitelinks
end

#smart_plus ⇒ Object

TikTok only. Creates the ad as a TikTok Upgraded Smart+ campaign: TikTok automates targeting, bidding and delivery. Supports goals conversions (Smart+ Web Conversions), lead_generation (Smart+ Lead Generation with a website form on linkUrl; TikTok Instant Forms not supported) and app_promotion (Smart+ App installs; the ad's destination is the app store, so linkUrl is not used). The web goals require promotedObject.pixelId AND promotedObject.customEventType; app_promotion requires promotedObject.applicationId instead. Targeting works like on any TikTok ad (defaults to countries: [\"US\"] when omitted); TikTok automates delivery within it. The budget lives on the Smart+ campaign (Campaign Budget Optimization); a lifetime budget additionally requires endDate. Cannot be combined with adSetId.



296
297
298
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 296

def smart_plus
  @smart_plus
end

#special_ad_categories ⇒ Object

Meta only. Declares the ad's special category, required for housing, employment, credit, or political/social-issue ads (Meta enforces restricted targeting for these). Note: setting a special category disables income/zip targeting on Meta.



192
193
194
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 192

def special_ad_categories
  @special_ad_categories
end

#special_ad_category_country ⇒ Object

Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise). Ignored when joining an existing campaign via existingCampaignId (the existing campaign's category/country already governs it).



195
196
197
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 195

def special_ad_category_country
  @special_ad_category_country
end

#start_date ⇒ Object

Meta only. Ad-set start time (ISO 8601, e.g. "2026-06-10T09:00:00Z"), mapped to the ad set's start_time. When omitted the ad starts delivering immediately. For lifetime budgets Meta also requires endDate. (Same schedule.startDate semantics already available on POST /v1/ads/boost.)



207
208
209
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 207

def start_date
  @start_date
end

#status ⇒ Object

Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/campaignId/status with active brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: existingCampaignId (that campaign may be running and is never touched) or campaignStatus: ACTIVE. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).



68
69
70
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 68

def status
  @status
end

#structured_snippets ⇒ Object

Google Search only. Structured snippets: one header from Google's predefined list plus 3-10 values (max 25 chars each). Each becomes one Asset (structured_snippet_asset) plus a CampaignAsset link with field_type STRUCTURED_SNIPPET.



253
254
255
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 253

def structured_snippets
  @structured_snippets
end

#targeting ⇒ Object

Nested targeting object, the same TargetingSpec shape as POST /v1/ads/boost, POST /v1/ads/targeting/reach-estimate, and saved_targeting audiences. Merged UNDER the flat inline targeting fields below: savedTargetingId < targeting < flat fields (a flat field present on the body replaces the nested value entirely). Both forms are equivalent; use whichever your integration already builds.



138
139
140
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 138

def targeting
  @targeting
end

#tracking ⇒ Object

Returns the value of attribute tracking.



33
34
35
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 33

def tracking
  @tracking
end

#translations ⇒ Object

Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media: the "Languages" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy is the DEFAULT shown to every locale you do NOT list, and it counts as one of the language variants. IMPORTANT, and the opposite of what you might expect: text does NOT inherit. Every entry must carry its own headline, body AND description, and all of them must be DISTINCT from each other and from the ad's top-level copy. Meta deduplicates identical strings inside the asset feed, so two locales sharing a string collapse into one asset and the create fails with a misleading "Too few ... texts provided in asset creation" (subcode 1885817) that names a field which is actually present. We validate this before calling Meta and return a 400 naming the offending locale and field. description is therefore effectively required on the ad whenever translations is present, even though it is optional otherwise. Do NOT list defaultLocale inside translations: Meta rejects the duplicate with "The language asset feed includes an unsupported targeting field" (subcode 1885985). Media DOES inherit and is uploaded once when shared, and linkUrl inherits too: each locale may name its own landing page and unlisted locales fall back to the ad's top-level linkUrl. Meta enforces Dynamic Creative image dimensions on language feeds, so an imageUrl that works on a normal ad may be rejected with "The following images have invalid dimensions for Dynamic Creative" (subcode 1885558). Video is not affected. Mutually exclusive with dynamicCreative, placementAssets, carouselCards, existingCreativeId and creatives[]. Meta allows one asset_feed_spec shape per creative.



221
222
223
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 221

def translations
  @translations
end

#validate_only ⇒ Object

Meta only, single standalone shape only (no creatives, adSetId, or RESERVED). Dry-run: each node runs Meta's execution_options validate_only and NOTHING is created or persisted. Children need real parents, so a fresh tree validates the campaign + creative (the ad set needs its campaign to exist, so pass existingCampaignId to validate it too; the ad itself is never validatable pre-create). A Meta validation failure returns the 400 verbatim; success returns 200 with per-node results instead of an ad.



59
60
61
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 59

def validate_only
  @validate_only
end

#value_rule_set_id ⇒ Object

Meta only (facebook, instagram; other platforms return 400). Value rule set to attach to the new ad set, from /v1/ads/value-rule-sets. Attachment is driven by this id, so valueRulesApplied is optional alongside it. Rejected with 400 in adSetId attach mode: that shape inherits the existing ad set's attachment, so the field would be silently ignored. Use PUT /v1/ads/ad-sets/{adSetId} there instead. Ignored (stripped before the ad-set create) when buyingType is RESERVED: value rules only apply to auction ad sets on LOWEST_COST_WITHOUT_CAP or COST_CAP, and a Reach & Frequency reservation has no auction bid strategy. Read back with GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id; the attachment is not mirrored onto Zernio's ad documents.



277
278
279
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 277

def value_rule_set_id
  @value_rule_set_id
end

#value_rules_applied ⇒ Object

Meta only (facebook, instagram; other platforms return 400). Optional when attaching, and requires valueRuleSetId. false is REJECTED here with 400: a newly created ad set has nothing to detach, so detaching lives on PUT /v1/ads/ad-sets/{adSetId}.



280
281
282
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 280

def value_rules_applied
  @value_rules_applied
end

#video ⇒ Object

Returns the value of attribute video.



114
115
116
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 114

def video
  @video
end

#work_employers ⇒ Object

Meta only. Employer entities from /v1/ads/targeting/search?dimension=workEmployer. Each must include id.



172
173
174
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 172

def work_employers
  @work_employers
end

#work_industries ⇒ Object

Meta only. Work-industry entities from /v1/ads/targeting/search?dimension=workIndustry. Each must include id. Rejected on other platforms (use LinkedIn's industries there).



175
176
177
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 175

def work_industries
  @work_industries
end

#work_positions ⇒ Object

Meta only. Job title entities from /v1/ads/targeting/search?dimension=workPosition. Each must include id. Rejected on other platforms (use LinkedIn's jobTitles there).



169
170
171
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 169

def work_positions
  @work_positions
end

#zips ⇒ Object

Postal/ZIP geo targeting. key is the platform's postal location ID from /v1/ads/targeting/search?dimension=geo&geoType=zip. Supported on Meta, Google, TikTok, Pinterest, X.



157
158
159
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 157

def zips
  @zips
end

Class Method Details

.acceptable_attribute_map ⇒ Object

Returns attribute mapping this model knows about



428
429
430
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 428

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributes ⇒ Object

Returns all the JSON keys this model knows about



433
434
435
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 433

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_map ⇒ Object

Attribute mapping from ruby-style variable name to JSON key.



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 323

def self.attribute_map
  {
    :'account_id' => :'accountId',
    :'ad_account_id' => :'adAccountId',
    :'name' => :'name',
    :'campaign_name' => :'campaignName',
    :'ad_set_name' => :'adSetName',
    :'ad_name' => :'adName',
    :'tracking' => :'tracking',
    :'goal' => :'goal',
    :'optimization_goal' => :'optimizationGoal',
    :'billing_event' => :'billingEvent',
    :'buying_type' => :'buyingType',
    :'rf_prediction_id' => :'rfPredictionId',
    :'promotion' => :'promotion',
    :'creative_features' => :'creativeFeatures',
    :'multi_advertiser' => :'multiAdvertiser',
    :'validate_only' => :'validateOnly',
    :'budget_amount' => :'budgetAmount',
    :'budget_type' => :'budgetType',
    :'status' => :'status',
    :'campaign_status' => :'campaignStatus',
    :'budget_level' => :'budgetLevel',
    :'currency' => :'currency',
    :'headline' => :'headline',
    :'long_headline' => :'longHeadline',
    :'body' => :'body',
    :'description' => :'description',
    :'bodies' => :'bodies',
    :'headlines' => :'headlines',
    :'descriptions' => :'descriptions',
    :'call_to_action' => :'callToAction',
    :'link_url' => :'linkUrl',
    :'lead_gen_form_id' => :'leadGenFormId',
    :'image_url' => :'imageUrl',
    :'images' => :'images',
    :'video' => :'video',
    :'creatives' => :'creatives',
    :'ad_set_id' => :'adSetId',
    :'existing_campaign_id' => :'existingCampaignId',
    :'existing_creative_id' => :'existingCreativeId',
    :'business_name' => :'businessName',
    :'board_id' => :'boardId',
    :'organization_id' => :'organizationId',
    :'targeting' => :'targeting',
    :'countries' => :'countries',
    :'cities' => :'cities',
    :'regions' => :'regions',
    :'age_min' => :'ageMin',
    :'age_max' => :'ageMax',
    :'interests' => :'interests',
    :'zips' => :'zips',
    :'metros' => :'metros',
    :'custom_locations' => :'customLocations',
    :'behaviors' => :'behaviors',
    :'work_positions' => :'workPositions',
    :'work_employers' => :'workEmployers',
    :'work_industries' => :'workIndustries',
    :'income_tier' => :'incomeTier',
    :'languages' => :'languages',
    :'placements' => :'placements',
    :'saved_targeting_id' => :'savedTargetingId',
    :'raw_targeting' => :'rawTargeting',
    :'special_ad_categories' => :'specialAdCategories',
    :'special_ad_category_country' => :'specialAdCategoryCountry',
    :'regional_regulated_categories' => :'regionalRegulatedCategories',
    :'regional_regulation_identities' => :'regionalRegulationIdentities',
    :'end_date' => :'endDate',
    :'start_date' => :'startDate',
    :'instagram_account_id' => :'instagramAccountId',
    :'dynamic_creative' => :'dynamicCreative',
    :'carousel_cards' => :'carouselCards',
    :'default_locale' => :'defaultLocale',
    :'translations' => :'translations',
    :'placement_assets' => :'placementAssets',
    :'audience_id' => :'audienceId',
    :'campaign_type' => :'campaignType',
    :'keywords' => :'keywords',
    :'negative_keywords' => :'negativeKeywords',
    :'campaign_negative_keywords' => :'campaignNegativeKeywords',
    :'additional_headlines' => :'additionalHeadlines',
    :'additional_descriptions' => :'additionalDescriptions',
    :'sitelinks' => :'sitelinks',
    :'callouts' => :'callouts',
    :'structured_snippets' => :'structuredSnippets',
    :'advantage_audience' => :'advantageAudience',
    :'attribution_spec' => :'attributionSpec',
    :'gender' => :'gender',
    :'bid_strategy' => :'bidStrategy',
    :'bid_amount' => :'bidAmount',
    :'roas_average_floor' => :'roasAverageFloor',
    :'portfolio_bid_strategy_id' => :'portfolioBidStrategyId',
    :'value_rule_set_id' => :'valueRuleSetId',
    :'value_rules_applied' => :'valueRulesApplied',
    :'platform_specific_data' => :'platformSpecificData',
    :'dsa_beneficiary' => :'dsaBeneficiary',
    :'dsa_payor' => :'dsaPayor',
    :'brand_identity' => :'brandIdentity',
    :'identity_type' => :'identityType',
    :'smart_plus' => :'smartPlus',
    :'promoted_object' => :'promotedObject'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash) —

    Model attributes in the form of hash

Returns:

  • (Object) —

    Returns the model itself



1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 1991

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullable ⇒ Object

List of attributes with nullable: true



543
544
545
546
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 543

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_types ⇒ Object

Attribute type mapping.



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 438

def self.openapi_types
  {
    :'account_id' => :'String',
    :'ad_account_id' => :'String',
    :'name' => :'String',
    :'campaign_name' => :'String',
    :'ad_set_name' => :'String',
    :'ad_name' => :'String',
    :'tracking' => :'CreateStandaloneAdRequestTracking',
    :'goal' => :'String',
    :'optimization_goal' => :'String',
    :'billing_event' => :'String',
    :'buying_type' => :'String',
    :'rf_prediction_id' => :'String',
    :'promotion' => :'MetaPromotion',
    :'creative_features' => :'Hash<String, String>',
    :'multi_advertiser' => :'String',
    :'validate_only' => :'Boolean',
    :'budget_amount' => :'Float',
    :'budget_type' => :'String',
    :'status' => :'String',
    :'campaign_status' => :'String',
    :'budget_level' => :'String',
    :'currency' => :'String',
    :'headline' => :'String',
    :'long_headline' => :'String',
    :'body' => :'String',
    :'description' => :'String',
    :'bodies' => :'Array<String>',
    :'headlines' => :'Array<String>',
    :'descriptions' => :'Array<String>',
    :'call_to_action' => :'String',
    :'link_url' => :'String',
    :'lead_gen_form_id' => :'String',
    :'image_url' => :'String',
    :'images' => :'CreateStandaloneAdRequestImages',
    :'video' => :'CreateStandaloneAdRequestVideo',
    :'creatives' => :'Array<CreateStandaloneAdRequestCreativesInner>',
    :'ad_set_id' => :'String',
    :'existing_campaign_id' => :'String',
    :'existing_creative_id' => :'String',
    :'business_name' => :'String',
    :'board_id' => :'String',
    :'organization_id' => :'String',
    :'targeting' => :'TargetingSpec',
    :'countries' => :'Array<String>',
    :'cities' => :'Array<CreateStandaloneAdRequestCitiesInner>',
    :'regions' => :'Array<CreateStandaloneAdRequestRegionsInner>',
    :'age_min' => :'Integer',
    :'age_max' => :'Integer',
    :'interests' => :'Array<UpdateAdRequestTargetingInterestsInner>',
    :'zips' => :'Array<UpdateCampaignTargetingRequestTargetingLocationsOneOfRegionsInner>',
    :'metros' => :'Array<UpdateCampaignTargetingRequestTargetingLocationsOneOfRegionsInner>',
    :'custom_locations' => :'Array<CreateStandaloneAdRequestCustomLocationsInner>',
    :'behaviors' => :'Array<CreateStandaloneAdRequestBehaviorsInner>',
    :'work_positions' => :'Array<CreateStandaloneAdRequestBehaviorsInner>',
    :'work_employers' => :'Array<CreateStandaloneAdRequestBehaviorsInner>',
    :'work_industries' => :'Array<CreateStandaloneAdRequestBehaviorsInner>',
    :'income_tier' => :'String',
    :'languages' => :'Array<String>',
    :'placements' => :'CreateStandaloneAdRequestPlacements',
    :'saved_targeting_id' => :'String',
    :'raw_targeting' => :'Hash<String, Object>',
    :'special_ad_categories' => :'Array<String>',
    :'special_ad_category_country' => :'Array<String>',
    :'regional_regulated_categories' => :'Array<String>',
    :'regional_regulation_identities' => :'Hash<String, Integer>',
    :'end_date' => :'Time',
    :'start_date' => :'Time',
    :'instagram_account_id' => :'String',
    :'dynamic_creative' => :'CreateStandaloneAdRequestDynamicCreative',
    :'carousel_cards' => :'Array<CreateStandaloneAdRequestCarouselCardsInner>',
    :'default_locale' => :'String',
    :'translations' => :'Array<CreateStandaloneAdRequestTranslationsInner>',
    :'placement_assets' => :'CreateStandaloneAdRequestPlacementAssets',
    :'audience_id' => :'String',
    :'campaign_type' => :'String',
    :'keywords' => :'Array<KeywordEntry>',
    :'negative_keywords' => :'Array<KeywordEntry>',
    :'campaign_negative_keywords' => :'Array<KeywordEntry>',
    :'additional_headlines' => :'Array<String>',
    :'additional_descriptions' => :'Array<String>',
    :'sitelinks' => :'Array<CreateStandaloneAdRequestSitelinksInner>',
    :'callouts' => :'Array<String>',
    :'structured_snippets' => :'Array<CreateStandaloneAdRequestStructuredSnippetsInner>',
    :'advantage_audience' => :'Integer',
    :'attribution_spec' => :'Array<CreateStandaloneAdRequestAttributionSpecInner>',
    :'gender' => :'String',
    :'bid_strategy' => :'BidStrategy',
    :'bid_amount' => :'Float',
    :'roas_average_floor' => :'Float',
    :'portfolio_bid_strategy_id' => :'String',
    :'value_rule_set_id' => :'String',
    :'value_rules_applied' => :'Boolean',
    :'platform_specific_data' => :'CreateStandaloneAdRequestPlatformSpecificData',
    :'dsa_beneficiary' => :'String',
    :'dsa_payor' => :'String',
    :'brand_identity' => :'CreateStandaloneAdRequestBrandIdentity',
    :'identity_type' => :'String',
    :'smart_plus' => :'Boolean',
    :'promoted_object' => :'CreateStandaloneAdRequestPromotedObject'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object) —

    to be compared



1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 1872

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
       == o. &&
      name == o.name &&
      campaign_name == o.campaign_name &&
      ad_set_name == o.ad_set_name &&
      ad_name == o.ad_name &&
      tracking == o.tracking &&
      goal == o.goal &&
      optimization_goal == o.optimization_goal &&
      billing_event == o.billing_event &&
      buying_type == o.buying_type &&
      rf_prediction_id == o.rf_prediction_id &&
      promotion == o.promotion &&
      creative_features == o.creative_features &&
      multi_advertiser == o.multi_advertiser &&
      validate_only == o.validate_only &&
      budget_amount == o.budget_amount &&
      budget_type == o.budget_type &&
      status == o.status &&
      campaign_status == o.campaign_status &&
      budget_level == o.budget_level &&
      currency == o.currency &&
      headline == o.headline &&
      long_headline == o.long_headline &&
      body == o.body &&
      description == o.description &&
      bodies == o.bodies &&
      headlines == o.headlines &&
      descriptions == o.descriptions &&
      call_to_action == o.call_to_action &&
      link_url == o.link_url &&
      lead_gen_form_id == o.lead_gen_form_id &&
      image_url == o.image_url &&
      images == o.images &&
      video == o.video &&
      creatives == o.creatives &&
      ad_set_id == o.ad_set_id &&
      existing_campaign_id == o.existing_campaign_id &&
      existing_creative_id == o.existing_creative_id &&
      business_name == o.business_name &&
      board_id == o.board_id &&
      organization_id == o.organization_id &&
      targeting == o.targeting &&
      countries == o.countries &&
      cities == o.cities &&
      regions == o.regions &&
      age_min == o.age_min &&
      age_max == o.age_max &&
      interests == o.interests &&
      zips == o.zips &&
      metros == o.metros &&
      custom_locations == o.custom_locations &&
      behaviors == o.behaviors &&
      work_positions == o.work_positions &&
      work_employers == o.work_employers &&
      work_industries == o.work_industries &&
      income_tier == o.income_tier &&
      languages == o.languages &&
      placements == o.placements &&
      saved_targeting_id == o.saved_targeting_id &&
      raw_targeting == o.raw_targeting &&
      special_ad_categories == o.special_ad_categories &&
      special_ad_category_country == o.special_ad_category_country &&
      regional_regulated_categories == o.regional_regulated_categories &&
      regional_regulation_identities == o.regional_regulation_identities &&
      end_date == o.end_date &&
      start_date == o.start_date &&
       == o. &&
      dynamic_creative == o.dynamic_creative &&
      carousel_cards == o.carousel_cards &&
      default_locale == o.default_locale &&
      translations == o.translations &&
      placement_assets == o.placement_assets &&
      audience_id == o.audience_id &&
      campaign_type == o.campaign_type &&
      keywords == o.keywords &&
      negative_keywords == o.negative_keywords &&
      campaign_negative_keywords == o.campaign_negative_keywords &&
      additional_headlines == o.additional_headlines &&
      additional_descriptions == o.additional_descriptions &&
      sitelinks == o.sitelinks &&
      callouts == o.callouts &&
      structured_snippets == o.structured_snippets &&
      advantage_audience == o.advantage_audience &&
      attribution_spec == o.attribution_spec &&
      gender == o.gender &&
      bid_strategy == o.bid_strategy &&
      bid_amount == o.bid_amount &&
      roas_average_floor == o.roas_average_floor &&
      portfolio_bid_strategy_id == o.portfolio_bid_strategy_id &&
      value_rule_set_id == o.value_rule_set_id &&
      value_rules_applied == o.value_rules_applied &&
      platform_specific_data == o.platform_specific_data &&
      dsa_beneficiary == o.dsa_beneficiary &&
      dsa_payor == o.dsa_payor &&
      brand_identity == o.brand_identity &&
      identity_type == o.identity_type &&
      smart_plus == o.smart_plus &&
      promoted_object == o.promoted_object
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object) —

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


1978
1979
1980
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 1978

def eql?(o)
  self == o
end

#hash ⇒ Integer

Calculates hash code according to all attributes.

Returns:

  • (Integer) —

    Hash code



1984
1985
1986
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 1984

def hash
  [, , name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, promotion, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, bodies, headlines, descriptions, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, end_date, start_date, , dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, campaign_negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
end

#list_invalid_properties ⇒ Object

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 1041

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @account_id.nil?
    invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
  end

  if .nil?
    invalid_properties.push('invalid value for "ad_account_id", ad_account_id cannot be nil.')
  end

  if @name.nil?
    invalid_properties.push('invalid value for "name", name cannot be nil.')
  end

  if @name.to_s.length > 255
    invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
  end

  if !@campaign_name.nil? && @campaign_name.to_s.length > 255
    invalid_properties.push('invalid value for "campaign_name", the character length must be smaller than or equal to 255.')
  end

  if !@ad_set_name.nil? && @ad_set_name.to_s.length > 255
    invalid_properties.push('invalid value for "ad_set_name", the character length must be smaller than or equal to 255.')
  end

  if !@ad_name.nil? && @ad_name.to_s.length > 255
    invalid_properties.push('invalid value for "ad_name", the character length must be smaller than or equal to 255.')
  end

  if !@currency.nil? && @currency.to_s.length > 3
    invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
  end

  if !@currency.nil? && @currency.to_s.length < 3
    invalid_properties.push('invalid value for "currency", the character length must be greater than or equal to 3.')
  end

  if !@long_headline.nil? && @long_headline.to_s.length > 90
    invalid_properties.push('invalid value for "long_headline", the character length must be smaller than or equal to 90.')
  end

  if !@description.nil? && @description.to_s.length > 255
    invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 255.')
  end

  if !@bodies.nil? && @bodies.length > 5
    invalid_properties.push('invalid value for "bodies", number of items must be less than or equal to 5.')
  end

  if !@bodies.nil? && @bodies.length < 1
    invalid_properties.push('invalid value for "bodies", number of items must be greater than or equal to 1.')
  end

  if !@headlines.nil? && @headlines.length > 5
    invalid_properties.push('invalid value for "headlines", number of items must be less than or equal to 5.')
  end

  if !@headlines.nil? && @headlines.length < 1
    invalid_properties.push('invalid value for "headlines", number of items must be greater than or equal to 1.')
  end

  if !@descriptions.nil? && @descriptions.length > 5
    invalid_properties.push('invalid value for "descriptions", number of items must be less than or equal to 5.')
  end

  if !@descriptions.nil? && @descriptions.length < 1
    invalid_properties.push('invalid value for "descriptions", number of items must be greater than or equal to 1.')
  end

  if !@creatives.nil? && @creatives.length < 1
    invalid_properties.push('invalid value for "creatives", number of items must be greater than or equal to 1.')
  end

  if !@business_name.nil? && @business_name.to_s.length > 25
    invalid_properties.push('invalid value for "business_name", the character length must be smaller than or equal to 25.')
  end

  if !@age_min.nil? && @age_min > 65
    invalid_properties.push('invalid value for "age_min", must be smaller than or equal to 65.')
  end

  if !@age_min.nil? && @age_min < 13
    invalid_properties.push('invalid value for "age_min", must be greater than or equal to 13.')
  end

  if !@age_max.nil? && @age_max > 65
    invalid_properties.push('invalid value for "age_max", must be smaller than or equal to 65.')
  end

  if !@age_max.nil? && @age_max < 13
    invalid_properties.push('invalid value for "age_max", must be greater than or equal to 13.')
  end

  if !@carousel_cards.nil? && @carousel_cards.length > 10
    invalid_properties.push('invalid value for "carousel_cards", number of items must be less than or equal to 10.')
  end

  if !@carousel_cards.nil? && @carousel_cards.length < 2
    invalid_properties.push('invalid value for "carousel_cards", number of items must be greater than or equal to 2.')
  end

  if !@translations.nil? && @translations.length > 10
    invalid_properties.push('invalid value for "translations", number of items must be less than or equal to 10.')
  end

  if !@translations.nil? && @translations.length < 1
    invalid_properties.push('invalid value for "translations", number of items must be greater than or equal to 1.')
  end

  if !@keywords.nil? && @keywords.length > 1000
    invalid_properties.push('invalid value for "keywords", number of items must be less than or equal to 1000.')
  end

  if !@negative_keywords.nil? && @negative_keywords.length > 1000
    invalid_properties.push('invalid value for "negative_keywords", number of items must be less than or equal to 1000.')
  end

  if !@campaign_negative_keywords.nil? && @campaign_negative_keywords.length > 1000
    invalid_properties.push('invalid value for "campaign_negative_keywords", number of items must be less than or equal to 1000.')
  end

  if !@sitelinks.nil? && @sitelinks.length > 20
    invalid_properties.push('invalid value for "sitelinks", number of items must be less than or equal to 20.')
  end

  if !@sitelinks.nil? && @sitelinks.length < 2
    invalid_properties.push('invalid value for "sitelinks", number of items must be greater than or equal to 2.')
  end

  if !@callouts.nil? && @callouts.length > 20
    invalid_properties.push('invalid value for "callouts", number of items must be less than or equal to 20.')
  end

  if !@callouts.nil? && @callouts.length < 1
    invalid_properties.push('invalid value for "callouts", number of items must be greater than or equal to 1.')
  end

  if !@structured_snippets.nil? && @structured_snippets.length > 20
    invalid_properties.push('invalid value for "structured_snippets", number of items must be less than or equal to 20.')
  end

  if !@structured_snippets.nil? && @structured_snippets.length < 1
    invalid_properties.push('invalid value for "structured_snippets", number of items must be greater than or equal to 1.')
  end

  if !@attribution_spec.nil? && @attribution_spec.length > 3
    invalid_properties.push('invalid value for "attribution_spec", number of items must be less than or equal to 3.')
  end

  if !@attribution_spec.nil? && @attribution_spec.length < 1
    invalid_properties.push('invalid value for "attribution_spec", number of items must be greater than or equal to 1.')
  end

  pattern = Regexp.new(/^\d+$/)
  if !@portfolio_bid_strategy_id.nil? && @portfolio_bid_strategy_id !~ pattern
    invalid_properties.push("invalid value for \"portfolio_bid_strategy_id\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^\d+$/)
  if !@value_rule_set_id.nil? && @value_rule_set_id !~ pattern
    invalid_properties.push("invalid value for \"value_rule_set_id\", must conform to the pattern #{pattern}.")
  end

  if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
    invalid_properties.push('invalid value for "dsa_beneficiary", the character length must be smaller than or equal to 100.')
  end

  if !@dsa_payor.nil? && @dsa_payor.to_s.length > 100
    invalid_properties.push('invalid value for "dsa_payor", the character length must be smaller than or equal to 100.')
  end

  invalid_properties
end

#to_hash ⇒ Hash

Returns the object in the form of hash

Returns:

  • (Hash) —

    Returns the object in the form of hash



2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 2013

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid? ⇒ Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean) —

    true if the model is valid



1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
# File 'lib/zernio-sdk/models/create_standalone_ad_request.rb', line 1219

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @account_id.nil?
  return false if .nil?
  return false if @name.nil?
  return false if @name.to_s.length > 255
  return false if !@campaign_name.nil? && @campaign_name.to_s.length > 255
  return false if !@ad_set_name.nil? && @ad_set_name.to_s.length > 255
  return false if !@ad_name.nil? && @ad_name.to_s.length > 255
  goal_validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "conversions", "app_promotion", "catalog_sales", "page_likes", "job_applicants"])
  return false unless goal_validator.valid?(@goal)
  buying_type_validator = EnumAttributeValidator.new('String', ["AUCTION", "RESERVED"])
  return false unless buying_type_validator.valid?(@buying_type)
  multi_advertiser_validator = EnumAttributeValidator.new('String', ["OPT_IN", "OPT_OUT"])
  return false unless multi_advertiser_validator.valid?(@multi_advertiser)
  budget_type_validator = EnumAttributeValidator.new('String', ["daily", "lifetime"])
  return false unless budget_type_validator.valid?(@budget_type)
  status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
  return false unless status_validator.valid?(@status)
  campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
  return false unless campaign_status_validator.valid?(@campaign_status)
  budget_level_validator = EnumAttributeValidator.new('String', ["adset", "campaign"])
  return false unless budget_level_validator.valid?(@budget_level)
  return false if !@currency.nil? && @currency.to_s.length > 3
  return false if !@currency.nil? && @currency.to_s.length < 3
  return false if !@long_headline.nil? && @long_headline.to_s.length > 90
  return false if !@description.nil? && @description.to_s.length > 255
  return false if !@bodies.nil? && @bodies.length > 5
  return false if !@bodies.nil? && @bodies.length < 1
  return false if !@headlines.nil? && @headlines.length > 5
  return false if !@headlines.nil? && @headlines.length < 1
  return false if !@descriptions.nil? && @descriptions.length > 5
  return false if !@descriptions.nil? && @descriptions.length < 1
  call_to_action_validator = EnumAttributeValidator.new('String', ["LEARN_MORE", "SHOP_NOW", "SIGN_UP", "BOOK_TRAVEL", "CONTACT_US", "DOWNLOAD", "GET_OFFER", "GET_QUOTE", "SUBSCRIBE", "WATCH_MORE", "ADD_TO_CART", "APPLY_NOW", "BOOK_NOW", "BUY_TICKETS", "DONATE", "DONATE_NOW", "GET_DIRECTIONS", "GET_SHOWTIMES", "LISTEN_NOW", "ORDER_NOW", "PLAY_GAME", "REQUEST_TIME", "SEE_MENU", "START_ORDER", "INSTALL_MOBILE_APP", "USE_APP", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "VIEW_QUOTE", "APPLY", "SEE_MORE", "BUY_NOW"])
  return false unless call_to_action_validator.valid?(@call_to_action)
  return false if !@creatives.nil? && @creatives.length < 1
  return false if !@business_name.nil? && @business_name.to_s.length > 25
  return false if !@age_min.nil? && @age_min > 65
  return false if !@age_min.nil? && @age_min < 13
  return false if !@age_max.nil? && @age_max > 65
  return false if !@age_max.nil? && @age_max < 13
  income_tier_validator = EnumAttributeValidator.new('String', ["top_5", "top_10", "top_10_25", "top_25_50"])
  return false unless income_tier_validator.valid?(@income_tier)
  return false if !@carousel_cards.nil? && @carousel_cards.length > 10
  return false if !@carousel_cards.nil? && @carousel_cards.length < 2
  return false if !@translations.nil? && @translations.length > 10
  return false if !@translations.nil? && @translations.length < 1
  campaign_type_validator = EnumAttributeValidator.new('String', ["display", "search"])
  return false unless campaign_type_validator.valid?(@campaign_type)
  return false if !@keywords.nil? && @keywords.length > 1000
  return false if !@negative_keywords.nil? && @negative_keywords.length > 1000
  return false if !@campaign_negative_keywords.nil? && @campaign_negative_keywords.length > 1000
  return false if !@sitelinks.nil? && @sitelinks.length > 20
  return false if !@sitelinks.nil? && @sitelinks.length < 2
  return false if !@callouts.nil? && @callouts.length > 20
  return false if !@callouts.nil? && @callouts.length < 1
  return false if !@structured_snippets.nil? && @structured_snippets.length > 20
  return false if !@structured_snippets.nil? && @structured_snippets.length < 1
  advantage_audience_validator = EnumAttributeValidator.new('Integer', [0, 1])
  return false unless advantage_audience_validator.valid?(@advantage_audience)
  return false if !@attribution_spec.nil? && @attribution_spec.length > 3
  return false if !@attribution_spec.nil? && @attribution_spec.length < 1
  gender_validator = EnumAttributeValidator.new('String', ["all", "male", "female"])
  return false unless gender_validator.valid?(@gender)
  return false if !@portfolio_bid_strategy_id.nil? && @portfolio_bid_strategy_id !~ Regexp.new(/^\d+$/)
  return false if !@value_rule_set_id.nil? && @value_rule_set_id !~ Regexp.new(/^\d+$/)
  return false if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
  return false if !@dsa_payor.nil? && @dsa_payor.to_s.length > 100
  identity_type_validator = EnumAttributeValidator.new('String', ["TT_USER", "CUSTOMIZED_USER"])
  return false unless identity_type_validator.valid?(@identity_type)
  true
end