diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e3fea219..f4cb1d13 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.38" + ".": "0.0.39" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8ca1285c..04ea60bc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-c40acc9d58677fb284fa990c261b2494d9a7f1f1e4e9cf613546972e23255cb8.yml -openapi_spec_hash: adcf3faf651ee3eb5af6e1c0fe9d2b65 -config_hash: 6ad5a913fda410def47bf2ed841e2064 +configured_endpoints: 218 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc/whopsdk-a3f7272c868273bdba6b569c05961b3dcfeaf602c44b2e82c04097b9abb13af5.yml +openapi_spec_hash: e5b4b97d17ab288a38c218fc909a07c5 +config_hash: 82b4c2cb9b7d1707feb0f11c7c2426e9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 493a3dc3..2c3a799e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## 0.0.39 (2026-05-04) + +Full Changelog: [v0.0.38...v0.0.39](https://github.com/whopio/whopsdk-ruby/compare/v0.0.38...v0.0.39) + +### Features + +* **api:** api update ([e923086](https://github.com/whopio/whopsdk-ruby/commit/e9230869b6d1eec823473fb67309ab2ad302ba7b)) +* **api:** api update ([1391fb1](https://github.com/whopio/whopsdk-ruby/commit/1391fb13a1063b8ac483a69795533b7e6bec89f1)) +* **api:** api update ([bca6667](https://github.com/whopio/whopsdk-ruby/commit/bca6667862f9dee69950b47c065787c26236aadb)) +* **api:** api update ([4129022](https://github.com/whopio/whopsdk-ruby/commit/4129022fceee5287f11a5e3858863433effc7ab1)) +* **api:** api update ([b687cb9](https://github.com/whopio/whopsdk-ruby/commit/b687cb9249eb826e3a4d933b292f12ce02d94af0)) +* **api:** api update ([79aae44](https://github.com/whopio/whopsdk-ruby/commit/79aae4416d123e1afa7e27d95749e1fd23ae055f)) +* **api:** api update ([c30e8d4](https://github.com/whopio/whopsdk-ruby/commit/c30e8d4b93c2ea4ece5241af0d122ca30c59bac3)) +* **api:** api update ([327691b](https://github.com/whopio/whopsdk-ruby/commit/327691b54ccbeb7d10a046b4a3938b126aa49500)) +* **api:** api update ([35ba170](https://github.com/whopio/whopsdk-ruby/commit/35ba170f38fabb58908842c2ba39a6a9044812e9)) +* **api:** api update ([7e8b054](https://github.com/whopio/whopsdk-ruby/commit/7e8b054992f97166ef28c10c116a7024c4af6eec)) +* **api:** api update ([d8e52f4](https://github.com/whopio/whopsdk-ruby/commit/d8e52f48055361f0857513f0caac229959506c23)) +* **api:** api update ([f095b42](https://github.com/whopio/whopsdk-ruby/commit/f095b4234574686ed157acf45f3627209ca548f7)) +* **api:** manual updates ([b399216](https://github.com/whopio/whopsdk-ruby/commit/b399216595e3e85b7ec64802017dee810fc268c3)) +* support setting headers via env ([41a50f8](https://github.com/whopio/whopsdk-ruby/commit/41a50f8e339ce87259211c13b135b081ad1141f9)) + + +### Chores + +* **internal:** codegen related update ([747437e](https://github.com/whopio/whopsdk-ruby/commit/747437e579049c007cc35ddebc1866268b9e9b38)) +* **internal:** more robust bootstrap script ([19ee1dc](https://github.com/whopio/whopsdk-ruby/commit/19ee1dc702fc3a96d2c0c33b25f1dfc9d57eb5cc)) + ## 0.0.38 (2026-04-21) Full Changelog: [v0.0.37...v0.0.38](https://github.com/whopio/whopsdk-ruby/compare/v0.0.37...v0.0.38) diff --git a/Gemfile.lock b/Gemfile.lock index 2dc8bf7a..23854e88 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - whop_sdk (0.0.38) + whop_sdk (0.0.39) cgi connection_pool standardwebhooks @@ -149,7 +149,7 @@ GEM rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - standardwebhooks (1.0.1) + standardwebhooks (1.1.0) steep (1.10.0) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) diff --git a/README.md b/README.md index 39119f89..2ab6e5a9 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "whop_sdk", "~> 0.0.38" +gem "whop_sdk", "~> 0.0.39" ``` diff --git a/lib/whop_sdk.rb b/lib/whop_sdk.rb index bba0c1e2..c28b13a5 100644 --- a/lib/whop_sdk.rb +++ b/lib/whop_sdk.rb @@ -60,6 +60,34 @@ require_relative "whop_sdk/models/access_token_create_response" require_relative "whop_sdk/models/account_link_create_params" require_relative "whop_sdk/models/account_link_create_response" +require_relative "whop_sdk/models/ad_campaign_create_params" +require_relative "whop_sdk/models/ad_campaign_create_response" +require_relative "whop_sdk/models/ad_campaign_list_params" +require_relative "whop_sdk/models/ad_campaign_list_response" +require_relative "whop_sdk/models/ad_campaign_pause_params" +require_relative "whop_sdk/models/ad_campaign_pause_response" +require_relative "whop_sdk/models/ad_campaign_retrieve_params" +require_relative "whop_sdk/models/ad_campaign_retrieve_response" +require_relative "whop_sdk/models/ad_campaign_unpause_params" +require_relative "whop_sdk/models/ad_campaign_unpause_response" +require_relative "whop_sdk/models/ad_campaign_update_params" +require_relative "whop_sdk/models/ad_campaign_update_response" +require_relative "whop_sdk/models/ad_create_params" +require_relative "whop_sdk/models/ad_create_response" +require_relative "whop_sdk/models/ad_group_create_params" +require_relative "whop_sdk/models/ad_group_create_response" +require_relative "whop_sdk/models/ad_group_delete_params" +require_relative "whop_sdk/models/ad_group_delete_response" +require_relative "whop_sdk/models/ad_group_list_params" +require_relative "whop_sdk/models/ad_group_list_response" +require_relative "whop_sdk/models/ad_group_retrieve_params" +require_relative "whop_sdk/models/ad_group_retrieve_response" +require_relative "whop_sdk/models/ad_group_update_params" +require_relative "whop_sdk/models/ad_group_update_response" +require_relative "whop_sdk/models/ad_list_params" +require_relative "whop_sdk/models/ad_list_response" +require_relative "whop_sdk/models/ad_retrieve_params" +require_relative "whop_sdk/models/ad_retrieve_response" require_relative "whop_sdk/models/affiliate" require_relative "whop_sdk/models/affiliate_archive_params" require_relative "whop_sdk/models/affiliate_archive_response" @@ -120,6 +148,12 @@ require_relative "whop_sdk/models/authorized_user_retrieve_params" require_relative "whop_sdk/models/authorized_user_roles" require_relative "whop_sdk/models/billing_reasons" +require_relative "whop_sdk/models/bounty_create_params" +require_relative "whop_sdk/models/bounty_create_response" +require_relative "whop_sdk/models/bounty_list_params" +require_relative "whop_sdk/models/bounty_list_response" +require_relative "whop_sdk/models/bounty_retrieve_params" +require_relative "whop_sdk/models/bounty_retrieve_response" require_relative "whop_sdk/models/cancel_options" require_relative "whop_sdk/models/card_brands" require_relative "whop_sdk/models/chat_channel" @@ -137,6 +171,8 @@ require_relative "whop_sdk/models/checkout_shape" require_relative "whop_sdk/models/collection_method" require_relative "whop_sdk/models/company" +require_relative "whop_sdk/models/company_create_api_key_params" +require_relative "whop_sdk/models/company_create_api_key_response" require_relative "whop_sdk/models/company_create_params" require_relative "whop_sdk/models/company_list_params" require_relative "whop_sdk/models/company_list_response" @@ -148,6 +184,8 @@ require_relative "whop_sdk/models/company_token_transaction_retrieve_params" require_relative "whop_sdk/models/company_token_transaction_type" require_relative "whop_sdk/models/company_update_params" +require_relative "whop_sdk/models/conversion_create_params" +require_relative "whop_sdk/models/conversion_create_response" require_relative "whop_sdk/models/course" require_relative "whop_sdk/models/course_chapter" require_relative "whop_sdk/models/course_chapter_create_params" @@ -448,6 +486,14 @@ require_relative "whop_sdk/models/shipment_status" require_relative "whop_sdk/models/shipment_substatus" require_relative "whop_sdk/models/social_link_websites" +require_relative "whop_sdk/models/stat_describe_params" +require_relative "whop_sdk/models/stat_describe_response" +require_relative "whop_sdk/models/stat_query_metric_params" +require_relative "whop_sdk/models/stat_query_metric_response" +require_relative "whop_sdk/models/stat_query_raw_params" +require_relative "whop_sdk/models/stat_query_raw_response" +require_relative "whop_sdk/models/stat_run_sql_params" +require_relative "whop_sdk/models/stat_run_sql_response" require_relative "whop_sdk/models/status" require_relative "whop_sdk/models/support_channel" require_relative "whop_sdk/models/support_channel_create_params" @@ -509,16 +555,21 @@ require_relative "whop_sdk/models" require_relative "whop_sdk/resources/access_tokens" require_relative "whop_sdk/resources/account_links" +require_relative "whop_sdk/resources/ad_campaigns" +require_relative "whop_sdk/resources/ad_groups" +require_relative "whop_sdk/resources/ads" require_relative "whop_sdk/resources/affiliates" require_relative "whop_sdk/resources/affiliates/overrides" require_relative "whop_sdk/resources/ai_chats" require_relative "whop_sdk/resources/app_builds" require_relative "whop_sdk/resources/apps" require_relative "whop_sdk/resources/authorized_users" +require_relative "whop_sdk/resources/bounties" require_relative "whop_sdk/resources/chat_channels" require_relative "whop_sdk/resources/checkout_configurations" require_relative "whop_sdk/resources/companies" require_relative "whop_sdk/resources/company_token_transactions" +require_relative "whop_sdk/resources/conversions" require_relative "whop_sdk/resources/course_chapters" require_relative "whop_sdk/resources/course_lesson_interactions" require_relative "whop_sdk/resources/course_lessons" @@ -554,6 +605,7 @@ require_relative "whop_sdk/resources/reviews" require_relative "whop_sdk/resources/setup_intents" require_relative "whop_sdk/resources/shipments" +require_relative "whop_sdk/resources/stats" require_relative "whop_sdk/resources/support_channels" require_relative "whop_sdk/resources/topups" require_relative "whop_sdk/resources/transfers" diff --git a/lib/whop_sdk/client.rb b/lib/whop_sdk/client.rb index df4e038a..f5519cc6 100644 --- a/lib/whop_sdk/client.rb +++ b/lib/whop_sdk/client.rb @@ -253,6 +253,30 @@ class Client < WhopSDK::Internal::Transport::BaseClient # @return [WhopSDK::Resources::Affiliates] attr_reader :affiliates + # Bounties + # @return [WhopSDK::Resources::Bounties] + attr_reader :bounties + + # Stats + # @return [WhopSDK::Resources::Stats] + attr_reader :stats + + # Ad campaigns + # @return [WhopSDK::Resources::AdCampaigns] + attr_reader :ad_campaigns + + # Ad groups + # @return [WhopSDK::Resources::AdGroups] + attr_reader :ad_groups + + # Ads + # @return [WhopSDK::Resources::Ads] + attr_reader :ads + + # Conversions + # @return [WhopSDK::Resources::Conversions] + attr_reader :conversions + # @api private # # @return [Hash{String=>String}] @@ -311,6 +335,17 @@ def initialize( headers = { "x-whop-app-id" => (@app_id = app_id&.to_s) } + custom_headers_env = ENV["WHOP_CUSTOM_HEADERS"] + unless custom_headers_env.nil? + parsed = {} + custom_headers_env.split("\n").each do |line| + colon = line.index(":") + unless colon.nil? + parsed[line[0...colon].strip] = line[(colon + 1)..].strip + end + end + headers = parsed.merge(headers) + end @api_key = api_key.to_s @webhook_key = webhook_key&.to_s @@ -379,6 +414,12 @@ def initialize( @resolution_center_cases = WhopSDK::Resources::ResolutionCenterCases.new(client: self) @payout_accounts = WhopSDK::Resources::PayoutAccounts.new(client: self) @affiliates = WhopSDK::Resources::Affiliates.new(client: self) + @bounties = WhopSDK::Resources::Bounties.new(client: self) + @stats = WhopSDK::Resources::Stats.new(client: self) + @ad_campaigns = WhopSDK::Resources::AdCampaigns.new(client: self) + @ad_groups = WhopSDK::Resources::AdGroups.new(client: self) + @ads = WhopSDK::Resources::Ads.new(client: self) + @conversions = WhopSDK::Resources::Conversions.new(client: self) end # Verifies a Whop user token. diff --git a/lib/whop_sdk/models.rb b/lib/whop_sdk/models.rb index 1e6bd203..fa4f66f6 100644 --- a/lib/whop_sdk/models.rb +++ b/lib/whop_sdk/models.rb @@ -47,6 +47,34 @@ module WhopSDK AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams + AdCampaignCreateParams = WhopSDK::Models::AdCampaignCreateParams + + AdCampaignListParams = WhopSDK::Models::AdCampaignListParams + + AdCampaignPauseParams = WhopSDK::Models::AdCampaignPauseParams + + AdCampaignRetrieveParams = WhopSDK::Models::AdCampaignRetrieveParams + + AdCampaignUnpauseParams = WhopSDK::Models::AdCampaignUnpauseParams + + AdCampaignUpdateParams = WhopSDK::Models::AdCampaignUpdateParams + + AdCreateParams = WhopSDK::Models::AdCreateParams + + AdGroupCreateParams = WhopSDK::Models::AdGroupCreateParams + + AdGroupDeleteParams = WhopSDK::Models::AdGroupDeleteParams + + AdGroupListParams = WhopSDK::Models::AdGroupListParams + + AdGroupRetrieveParams = WhopSDK::Models::AdGroupRetrieveParams + + AdGroupUpdateParams = WhopSDK::Models::AdGroupUpdateParams + + AdListParams = WhopSDK::Models::AdListParams + + AdRetrieveParams = WhopSDK::Models::AdRetrieveParams + Affiliate = WhopSDK::Models::Affiliate AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams @@ -121,6 +149,12 @@ module WhopSDK BillingReasons = WhopSDK::Models::BillingReasons + BountyCreateParams = WhopSDK::Models::BountyCreateParams + + BountyListParams = WhopSDK::Models::BountyListParams + + BountyRetrieveParams = WhopSDK::Models::BountyRetrieveParams + CancelOptions = WhopSDK::Models::CancelOptions CardBrands = WhopSDK::Models::CardBrands @@ -151,6 +185,8 @@ module WhopSDK Company = WhopSDK::Models::Company + CompanyCreateAPIKeyParams = WhopSDK::Models::CompanyCreateAPIKeyParams + CompanyCreateParams = WhopSDK::Models::CompanyCreateParams CompanyListParams = WhopSDK::Models::CompanyListParams @@ -169,6 +205,8 @@ module WhopSDK CompanyUpdateParams = WhopSDK::Models::CompanyUpdateParams + ConversionCreateParams = WhopSDK::Models::ConversionCreateParams + Course = WhopSDK::Models::Course CourseChapter = WhopSDK::Models::CourseChapter @@ -645,6 +683,14 @@ module WhopSDK SocialLinkWebsites = WhopSDK::Models::SocialLinkWebsites + StatDescribeParams = WhopSDK::Models::StatDescribeParams + + StatQueryMetricParams = WhopSDK::Models::StatQueryMetricParams + + StatQueryRawParams = WhopSDK::Models::StatQueryRawParams + + StatRunSqlParams = WhopSDK::Models::StatRunSqlParams + Status = WhopSDK::Models::Status SupportChannel = WhopSDK::Models::SupportChannel diff --git a/lib/whop_sdk/models/ad_campaign_create_params.rb b/lib/whop_sdk/models/ad_campaign_create_params.rb new file mode 100644 index 00000000..19ccd107 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_create_params.rb @@ -0,0 +1,246 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#create + class AdCampaignCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute company_id + # The company ID to create this ad campaign for. + # + # @return [String] + required :company_id, String + + # @!attribute config + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + # + # @return [WhopSDK::Models::AdCampaignCreateParams::Config] + required :config, -> { WhopSDK::AdCampaignCreateParams::Config } + + # @!attribute platform + # The ad platform to run on (e.g., meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateParams::Platform] + required :platform, enum: -> { WhopSDK::AdCampaignCreateParams::Platform } + + # @!attribute title + # The title of the ad campaign. Must be max 100 characters. + # + # @return [String] + required :title, String + + # @!attribute ad_creative_set_ids + # Array of creative set IDs to link to this campaign. + # + # @return [Array, nil] + optional :ad_creative_set_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute budget + # Budget amount in dollars. + # + # @return [Float, nil] + optional :budget, Float, nil?: true + + # @!attribute budget_type + # The budget type for an ad campaign or ad group. + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateParams::BudgetType, nil] + optional :budget_type, enum: -> { WhopSDK::AdCampaignCreateParams::BudgetType }, nil?: true + + # @!attribute daily_budget + # Daily budget in dollars (minimum $5). Required unless lifetime_budget is set in + # config. + # + # @return [Float, nil] + optional :daily_budget, Float, nil?: true + + # @!attribute product_id + # The unique identifier of the product to promote. + # + # @return [String, nil] + optional :product_id, String, nil?: true + + # @!attribute target_country_codes + # Array of ISO3166 country codes for territory targeting. + # + # @return [Array, nil] + optional :target_country_codes, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!method initialize(company_id:, config:, platform:, title:, ad_creative_set_ids: nil, budget: nil, budget_type: nil, daily_budget: nil, product_id: nil, target_country_codes: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateParams} for more details. + # + # @param company_id [String] The company ID to create this ad campaign for. + # + # @param config [WhopSDK::Models::AdCampaignCreateParams::Config] Unified campaign configuration (conversion goal, budget, bidding, etc.). + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignCreateParams::Platform] The ad platform to run on (e.g., meta, tiktok). + # + # @param title [String] The title of the ad campaign. Must be max 100 characters. + # + # @param ad_creative_set_ids [Array, nil] Array of creative set IDs to link to this campaign. + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdCampaignCreateParams::BudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param daily_budget [Float, nil] Daily budget in dollars (minimum $5). Required unless lifetime_budget is set in + # + # @param product_id [String, nil] The unique identifier of the product to promote. + # + # @param target_country_codes [Array, nil] Array of ISO3166 country codes for territory targeting. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @return [Integer, nil] + optional :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # The bidding strategy used to optimize spend for this campaign. + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateParams::Config::BidStrategy, nil] + optional :bid_strategy, enum: -> { WhopSDK::AdCampaignCreateParams::Config::BidStrategy }, nil?: true + + # @!attribute budget_optimization + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + # + # @return [Boolean, nil] + optional :budget_optimization, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute end_time + # The scheduled end time of the campaign (ISO8601). + # + # @return [String, nil] + optional :end_time, String, nil?: true + + # @!attribute lifetime_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :lifetime_budget, Integer, nil?: true + + # @!attribute objective + # The campaign objective that determines how Meta optimizes delivery. + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateParams::Config::Objective, nil] + optional :objective, enum: -> { WhopSDK::AdCampaignCreateParams::Config::Objective }, nil?: true + + # @!attribute special_categories + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + # + # @return [Array, nil] + optional :special_categories, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute start_time + # The scheduled start time of the campaign (ISO8601). + # + # @return [String, nil] + optional :start_time, String, nil?: true + + # @!attribute status + # The campaign status as set by the advertiser (active or paused). + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateParams::Config::Status, nil] + optional :status, enum: -> { WhopSDK::AdCampaignCreateParams::Config::Status }, nil?: true + + # @!method initialize(bid_amount: nil, bid_strategy: nil, budget_optimization: nil, end_time: nil, lifetime_budget: nil, objective: nil, special_categories: nil, start_time: nil, status: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateParams::Config} for more details. + # + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdCampaignCreateParams::Config::BidStrategy, nil] The bidding strategy used to optimize spend for this campaign. + # + # @param budget_optimization [Boolean, nil] Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # + # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). + # + # @param lifetime_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param objective [Symbol, WhopSDK::Models::AdCampaignCreateParams::Config::Objective, nil] The campaign objective that determines how Meta optimizes delivery. + # + # @param special_categories [Array, nil] Special ad categories required by the platform (e.g., housing, employment, credi + # + # @param start_time [String, nil] The scheduled start time of the campaign (ISO8601). + # + # @param status [Symbol, WhopSDK::Models::AdCampaignCreateParams::Config::Status, nil] The campaign status as set by the advertiser (active or paused). + + # The bidding strategy used to optimize spend for this campaign. + # + # @see WhopSDK::Models::AdCampaignCreateParams::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # The campaign objective that determines how Meta optimizes delivery. + # + # @see WhopSDK::Models::AdCampaignCreateParams::Config#objective + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS = :awareness + TRAFFIC = :traffic + ENGAGEMENT = :engagement + LEADS = :leads + SALES = :sales + + # @!method self.values + # @return [Array] + end + + # The campaign status as set by the advertiser (active or paused). + # + # @see WhopSDK::Models::AdCampaignCreateParams::Config#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + + # @!method self.values + # @return [Array] + end + end + + # The ad platform to run on (e.g., meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # The budget type for an ad campaign or ad group. + module BudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY = :daily + LIFETIME = :lifetime + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_create_response.rb b/lib/whop_sdk/models/ad_campaign_create_response.rb new file mode 100644 index 00000000..3218d486 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_create_response.rb @@ -0,0 +1,990 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#create + class AdCampaignCreateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute available_budget + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + # + # @return [Float] + required :available_budget, Float + + # @!attribute billing_ledger_account + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount, nil] + required :billing_ledger_account, + -> { WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount }, + nil?: true + + # @!attribute clicks_count + # Number of clicks + # + # @return [Integer] + required :clicks_count, Integer + + # @!attribute config + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdCampaignCreateResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the ad campaign was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute created_by_user + # The user who created the campaign + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser] + required :created_by_user, -> { WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser } + + # @!attribute daily_budget + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute impressions_count + # Number of impressions (views) + # + # @return [Integer] + required :impressions_count, Integer + + # @!attribute paused_until + # If temporarily paused, the timestamp when the campaign will auto-resume + # + # @return [Time, nil] + required :paused_until, Time, nil?: true + + # @!attribute payment_method + # The payment method used for daily billing (null if using platform balance) + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod, nil] + required :payment_method, union: -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod } + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Platform, nil] + required :platform, enum: -> { WhopSDK::Models::AdCampaignCreateResponse::Platform }, nil?: true + + # @!attribute product + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::Product, nil] + required :product, -> { WhopSDK::Models::AdCampaignCreateResponse::Product }, nil?: true + + # @!attribute purchases_count + # Number of purchases + # + # @return [Integer] + required :purchases_count, Integer + + # @!attribute remaining_balance + # Remaining balance in dollars + # + # @return [Float] + required :remaining_balance, Float + + # @!attribute return_on_ad_spend + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @return [Float] + required :return_on_ad_spend, Float + + # @!attribute revenue + # Total revenue generated from users who converted through this campaign + # + # @return [Float] + required :revenue, Float + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdCampaignCreateResponse::Status } + + # @!attribute target_country_codes + # Array of ISO3166 country codes for territory targeting + # + # @return [Array] + required :target_country_codes, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!attribute todays_spend + # Amount spent today in dollars + # + # @return [Float] + required :todays_spend, Float + + # @!attribute total_credits + # Total credits added to the campaign in dollars + # + # @return [Float] + required :total_credits, Float + + # @!attribute total_spend + # Total amount spent on conversions in dollars + # + # @return [Float] + required :total_spend, Float + + # @!attribute updated_at + # The datetime the ad campaign was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, available_budget:, billing_ledger_account:, clicks_count:, config:, created_at:, created_by_user:, daily_budget:, impressions_count:, paused_until:, payment_method:, platform:, product:, purchases_count:, remaining_balance:, return_on_ad_spend:, revenue:, status:, target_country_codes:, title:, todays_spend:, total_credits:, total_spend:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse} for more details. + # + # An advertising campaign running on an external platform or within Whop. + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param available_budget [Float] Available budget in dollars, capped at daily budget minus today's spend for dail + # + # @param billing_ledger_account [WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount, nil] The ledger account being charged for platform balance billing (null if using car + # + # @param clicks_count [Integer] Number of clicks + # + # @param config [WhopSDK::Models::AdCampaignCreateResponse::Config, nil] Meta campaign configuration (objective, budget, bidding, etc.). Null for non-Met + # + # @param created_at [Time] The datetime the ad campaign was created. + # + # @param created_by_user [WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser] The user who created the campaign + # + # @param daily_budget [Float, nil] Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # + # @param impressions_count [Integer] Number of impressions (views) + # + # @param paused_until [Time, nil] If temporarily paused, the timestamp when the campaign will auto-resume + # + # @param payment_method [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod, nil] The payment method used for daily billing (null if using platform balance) + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Platform, nil] The platforms where an ad campaign can run. + # + # @param product [WhopSDK::Models::AdCampaignCreateResponse::Product, nil] The access pass being promoted. Null for campaigns that don't target a specific + # + # @param purchases_count [Integer] Number of purchases + # + # @param remaining_balance [Float] Remaining balance in dollars + # + # @param return_on_ad_spend [Float] Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @param revenue [Float] Total revenue generated from users who converted through this campaign + # + # @param status [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Status] Current status of the campaign (active, paused, or inactive) + # + # @param target_country_codes [Array] Array of ISO3166 country codes for territory targeting + # + # @param title [String] The title of the ad campaign + # + # @param todays_spend [Float] Amount spent today in dollars + # + # @param total_credits [Float] Total credits added to the campaign in dollars + # + # @param total_spend [Float] Total amount spent on conversions in dollars + # + # @param updated_at [Time] The datetime the ad campaign was last updated. + + # @see WhopSDK::Models::AdCampaignCreateResponse#billing_ledger_account + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ledger account. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @param id [String] The unique identifier for the ledger account. + end + + # @see WhopSDK::Models::AdCampaignCreateResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # The bidding strategy used to optimize spend for this campaign. + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy }, + nil?: true + + # @!attribute budget_optimization + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + # + # @return [Boolean, nil] + required :budget_optimization, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute end_time + # The scheduled end time of the campaign (ISO8601). + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute objective + # The campaign objective that determines how Meta optimizes delivery. + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Config::Objective, nil] + required :objective, enum: -> { WhopSDK::Models::AdCampaignCreateResponse::Config::Objective }, nil?: true + + # @!attribute special_categories + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + # + # @return [Array, nil] + required :special_categories, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute start_time + # The scheduled start time of the campaign (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute status + # The campaign status as set by the advertiser (active or paused). + # + # @return [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Config::Status, nil] + required :status, enum: -> { WhopSDK::Models::AdCampaignCreateResponse::Config::Status }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, end_time:, objective:, special_categories:, start_time:, status:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::Config} for more details. + # + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy, nil] The bidding strategy used to optimize spend for this campaign. + # + # @param budget_optimization [Boolean, nil] Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # + # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). + # + # @param objective [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Config::Objective, nil] The campaign objective that determines how Meta optimizes delivery. + # + # @param special_categories [Array, nil] Special ad categories required by the platform (e.g., housing, employment, credi + # + # @param start_time [String, nil] The scheduled start time of the campaign (ISO8601). + # + # @param status [Symbol, WhopSDK::Models::AdCampaignCreateResponse::Config::Status, nil] The campaign status as set by the advertiser (active or paused). + + # The bidding strategy used to optimize spend for this campaign. + # + # @see WhopSDK::Models::AdCampaignCreateResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # The campaign objective that determines how Meta optimizes delivery. + # + # @see WhopSDK::Models::AdCampaignCreateResponse::Config#objective + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS = :awareness + TRAFFIC = :traffic + ENGAGEMENT = :engagement + LEADS = :leads + SALES = :sales + + # @!method self.values + # @return [Array] + end + + # The campaign status as set by the advertiser (active or paused). + # + # @see WhopSDK::Models::AdCampaignCreateResponse::Config#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdCampaignCreateResponse#created_by_user + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the user. + # + # @return [String] + required :id, String + + # @!attribute name + # The user's display name shown on their public profile. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute username + # The user's unique username shown on their public profile. + # + # @return [String] + required :username, String + + # @!method initialize(id:, name:, username:) + # The user who created the campaign + # + # @param id [String] The unique identifier for the user. + # + # @param name [String, nil] The user's display name shown on their public profile. + # + # @param username [String] The user's unique username shown on their public profile. + end + + # The payment method used for daily billing (null if using platform balance) + # + # @see WhopSDK::Models::AdCampaignCreateResponse#payment_method + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # A saved payment method with no type-specific details available. + variant :BasePaymentMethod, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod } + + # A saved card payment method, including brand, last four digits, and expiration details. + variant :CardPaymentMethod, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod } + + # A saved US bank account payment method, including bank name, last four digits, and account type. + variant :UsBankAccountPaymentMethod, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod } + + # A saved Cash App payment method, including the buyer's cashtag and unique identifier. + variant :CashappPaymentMethod, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod } + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + variant :IdealPaymentMethod, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod } + + # A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits. + variant :SepaDebitPaymentMethod, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :BasePaymentMethod] + required :typename, const: :BasePaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, typename: :BasePaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod} + # for more details. + # + # A saved payment method with no type-specific details available. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :BasePaymentMethod] The typename of this object + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute card + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card] + required :card, -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CardPaymentMethod] + required :typename, const: :CardPaymentMethod + + # @!method initialize(id:, card:, created_at:, payment_method_type:, typename: :CardPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod} + # for more details. + # + # A saved card payment method, including brand, last four digits, and expiration + # details. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param card [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card] The card-specific details for this payment method, including brand, last four di + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CardPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod#card + class Card < WhopSDK::Internal::Type::BaseModel + # @!attribute brand + # Possible card brands that a payment token can have + # + # @return [Symbol, WhopSDK::Models::CardBrands, nil] + required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true + + # @!attribute exp_month + # The two-digit expiration month of the card (1-12). Null if not available. + # + # @return [Integer, nil] + required :exp_month, Integer, nil?: true + + # @!attribute exp_year + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + # + # @return [Integer, nil] + required :exp_year, Integer, nil?: true + + # @!attribute last4 + # The last four digits of the card number. Null if not available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(brand:, exp_month:, exp_year:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card} + # for more details. + # + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have + # + # @param exp_month [Integer, nil] The two-digit expiration month of the card (1-12). Null if not available. + # + # @param exp_year [Integer, nil] The two-digit expiration year of the card (e.g., 27 for 2027). Null if not avail + # + # @param last4 [String, nil] The last four digits of the card number. Null if not available. + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :UsBankAccountPaymentMethod] + required :typename, const: :UsBankAccountPaymentMethod + + # @!attribute us_bank_account + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] + required :us_bank_account, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount } + + # @!method initialize(id:, created_at:, payment_method_type:, us_bank_account:, typename: :UsBankAccountPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod} + # for more details. + # + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param us_bank_account [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] The bank account-specific details for this payment method, including bank name a + # + # @param typename [Symbol, :UsBankAccountPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod#us_bank_account + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute account_type + # The type of bank account (e.g., checking, savings). + # + # @return [String] + required :account_type, String + + # @!attribute bank_name + # The name of the financial institution holding the account. + # + # @return [String] + required :bank_name, String + + # @!attribute last4 + # The last four digits of the bank account number. + # + # @return [String] + required :last4, String + + # @!method initialize(account_type:, bank_name:, last4:) + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @param account_type [String] The type of bank account (e.g., checking, savings). + # + # @param bank_name [String] The name of the financial institution holding the account. + # + # @param last4 [String] The last four digits of the bank account number. + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute cashapp + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp] + required :cashapp, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CashappPaymentMethod] + required :typename, const: :CashappPaymentMethod + + # @!method initialize(id:, cashapp:, created_at:, payment_method_type:, typename: :CashappPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod} + # for more details. + # + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param cashapp [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp] The Cash App-specific details for this payment method, including cashtag and buy + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CashappPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod#cashapp + class Cashapp < WhopSDK::Internal::Type::BaseModel + # @!attribute buyer_id + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + # + # @return [String, nil] + required :buyer_id, String, nil?: true + + # @!attribute cashtag + # The public cashtag handle of the buyer on Cash App. Null if not available. + # + # @return [String, nil] + required :cashtag, String, nil?: true + + # @!method initialize(buyer_id:, cashtag:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp} + # for more details. + # + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @param buyer_id [String, nil] The unique and immutable identifier assigned by Cash App to the buyer. Null if n + # + # @param cashtag [String, nil] The public cashtag handle of the buyer on Cash App. Null if not available. + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute ideal + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal] + required :ideal, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal } + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :IdealPaymentMethod] + required :typename, const: :IdealPaymentMethod + + # @!method initialize(id:, created_at:, ideal:, payment_method_type:, typename: :IdealPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod} + # for more details. + # + # A saved iDEAL payment method, including the customer's bank name and BIC code. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param ideal [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal] The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :IdealPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod#ideal + class Ideal < WhopSDK::Internal::Type::BaseModel + # @!attribute bank + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + # + # @return [String, nil] + required :bank, String, nil?: true + + # @!attribute bic + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + # + # @return [String, nil] + required :bic, String, nil?: true + + # @!method initialize(bank:, bic:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal} + # for more details. + # + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param bank [String, nil] The name of the customer's bank used for the iDEAL transaction. Null if not avai + # + # @param bic [String, nil] The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not availab + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute sepa_debit + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @return [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] + required :sepa_debit, + -> { WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :SepaDebitPaymentMethod] + required :typename, const: :SepaDebitPaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, sepa_debit:, typename: :SepaDebitPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod} + # for more details. + # + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param sepa_debit [WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] The SEPA Direct Debit-specific details for this payment method, including bank c + # + # @param typename [Symbol, :SepaDebitPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod#sepa_debit + class SepaDebit < WhopSDK::Internal::Type::BaseModel + # @!attribute bank_code + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :bank_code, String, nil?: true + + # @!attribute branch_code + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :branch_code, String, nil?: true + + # @!attribute country + # The two-letter ISO country code where the bank account is located. Null if not + # available. + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute last4 + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(bank_code:, branch_code:, country:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit} + # for more details. + # + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @param bank_code [String, nil] The bank code of the financial institution associated with this SEPA account. Nu + # + # @param branch_code [String, nil] The branch code of the financial institution associated with this SEPA account. + # + # @param country [String, nil] The two-letter ISO country code where the bank account is located. Null if not a + # + # @param last4 [String, nil] The last four digits of the IBAN associated with this SEPA account. Null if not + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod)] + end + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdCampaignCreateResponse#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCampaignCreateResponse#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute route + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + # + # @return [String] + required :route, String + + # @!attribute title + # The display name of the product shown to customers on the product page and in + # search results. + # + # @return [String] + required :title, String + + # @!method initialize(id:, route:, title:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateResponse::Product} for more details. + # + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @param id [String] The unique identifier for the product. + # + # @param route [String] The URL slug used in the product's public link (e.g., 'my-product' in whop.com/c + # + # @param title [String] The display name of the product shown to customers on the product page and in se + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdCampaignCreateResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_list_params.rb b/lib/whop_sdk/models/ad_campaign_list_params.rb new file mode 100644 index 00000000..880fd2d0 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_list_params.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#list + class AdCampaignListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute company_id + # The unique identifier of the company to list ad campaigns for. + # + # @return [String] + required :company_id, String + + # @!attribute after + # Returns the elements in the list that come after the specified cursor. + # + # @return [String, nil] + optional :after, String, nil?: true + + # @!attribute before + # Returns the elements in the list that come before the specified cursor. + # + # @return [String, nil] + optional :before, String, nil?: true + + # @!attribute created_after + # Only return ad campaigns created after this timestamp. + # + # @return [Time, nil] + optional :created_after, Time, nil?: true + + # @!attribute created_before + # Only return ad campaigns created before this timestamp. + # + # @return [Time, nil] + optional :created_before, Time, nil?: true + + # @!attribute first + # Returns the first _n_ elements from the list. + # + # @return [Integer, nil] + optional :first, Integer, nil?: true + + # @!attribute last + # Returns the last _n_ elements from the list. + # + # @return [Integer, nil] + optional :last, Integer, nil?: true + + # @!attribute query + # Case-insensitive substring match against the campaign title. + # + # @return [String, nil] + optional :query, String, nil?: true + + # @!attribute status + # The status of an ad campaign. + # + # @return [Symbol, WhopSDK::Models::AdCampaignListParams::Status, nil] + optional :status, enum: -> { WhopSDK::AdCampaignListParams::Status }, nil?: true + + # @!method initialize(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, query: nil, status: nil, request_options: {}) + # @param company_id [String] The unique identifier of the company to list ad campaigns for. + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param created_after [Time, nil] Only return ad campaigns created after this timestamp. + # + # @param created_before [Time, nil] Only return ad campaigns created before this timestamp. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param query [String, nil] Case-insensitive substring match against the campaign title. + # + # @param status [Symbol, WhopSDK::Models::AdCampaignListParams::Status, nil] The status of an ad campaign. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The status of an ad campaign. + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_list_response.rb b/lib/whop_sdk/models/ad_campaign_list_response.rb new file mode 100644 index 00000000..e674c064 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_list_response.rb @@ -0,0 +1,246 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#list + class AdCampaignListResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute available_budget + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + # + # @return [Float] + required :available_budget, Float + + # @!attribute clicks_count + # Number of clicks + # + # @return [Integer] + required :clicks_count, Integer + + # @!attribute created_at + # The datetime the ad campaign was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute daily_budget + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute impressions_count + # Number of impressions (views) + # + # @return [Integer] + required :impressions_count, Integer + + # @!attribute paused_until + # If temporarily paused, the timestamp when the campaign will auto-resume + # + # @return [Time, nil] + required :paused_until, Time, nil?: true + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdCampaignListResponse::Platform, nil] + required :platform, enum: -> { WhopSDK::Models::AdCampaignListResponse::Platform }, nil?: true + + # @!attribute product + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @return [WhopSDK::Models::AdCampaignListResponse::Product, nil] + required :product, -> { WhopSDK::Models::AdCampaignListResponse::Product }, nil?: true + + # @!attribute purchases_count + # Number of purchases + # + # @return [Integer] + required :purchases_count, Integer + + # @!attribute remaining_balance + # Remaining balance in dollars + # + # @return [Float] + required :remaining_balance, Float + + # @!attribute return_on_ad_spend + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @return [Float] + required :return_on_ad_spend, Float + + # @!attribute revenue + # Total revenue generated from users who converted through this campaign + # + # @return [Float] + required :revenue, Float + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdCampaignListResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdCampaignListResponse::Status } + + # @!attribute target_country_codes + # Array of ISO3166 country codes for territory targeting + # + # @return [Array] + required :target_country_codes, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!attribute todays_spend + # Amount spent today in dollars + # + # @return [Float] + required :todays_spend, Float + + # @!attribute total_credits + # Total credits added to the campaign in dollars + # + # @return [Float] + required :total_credits, Float + + # @!attribute total_spend + # Total amount spent on conversions in dollars + # + # @return [Float] + required :total_spend, Float + + # @!attribute updated_at + # The datetime the ad campaign was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, available_budget:, clicks_count:, created_at:, daily_budget:, impressions_count:, paused_until:, platform:, product:, purchases_count:, remaining_balance:, return_on_ad_spend:, revenue:, status:, target_country_codes:, title:, todays_spend:, total_credits:, total_spend:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignListResponse} for more details. + # + # An advertising campaign running on an external platform or within Whop. + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param available_budget [Float] Available budget in dollars, capped at daily budget minus today's spend for dail + # + # @param clicks_count [Integer] Number of clicks + # + # @param created_at [Time] The datetime the ad campaign was created. + # + # @param daily_budget [Float, nil] Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # + # @param impressions_count [Integer] Number of impressions (views) + # + # @param paused_until [Time, nil] If temporarily paused, the timestamp when the campaign will auto-resume + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignListResponse::Platform, nil] The platforms where an ad campaign can run. + # + # @param product [WhopSDK::Models::AdCampaignListResponse::Product, nil] The access pass being promoted. Null for campaigns that don't target a specific + # + # @param purchases_count [Integer] Number of purchases + # + # @param remaining_balance [Float] Remaining balance in dollars + # + # @param return_on_ad_spend [Float] Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @param revenue [Float] Total revenue generated from users who converted through this campaign + # + # @param status [Symbol, WhopSDK::Models::AdCampaignListResponse::Status] Current status of the campaign (active, paused, or inactive) + # + # @param target_country_codes [Array] Array of ISO3166 country codes for territory targeting + # + # @param title [String] The title of the ad campaign + # + # @param todays_spend [Float] Amount spent today in dollars + # + # @param total_credits [Float] Total credits added to the campaign in dollars + # + # @param total_spend [Float] Total amount spent on conversions in dollars + # + # @param updated_at [Time] The datetime the ad campaign was last updated. + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdCampaignListResponse#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCampaignListResponse#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute route + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + # + # @return [String] + required :route, String + + # @!attribute title + # The display name of the product shown to customers on the product page and in + # search results. + # + # @return [String] + required :title, String + + # @!method initialize(id:, route:, title:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignListResponse::Product} for more details. + # + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @param id [String] The unique identifier for the product. + # + # @param route [String] The URL slug used in the product's public link (e.g., 'my-product' in whop.com/c + # + # @param title [String] The display name of the product shown to customers on the product page and in se + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdCampaignListResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_pause_params.rb b/lib/whop_sdk/models/ad_campaign_pause_params.rb new file mode 100644 index 00000000..2358ca59 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_pause_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#pause + class AdCampaignPauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_pause_response.rb b/lib/whop_sdk/models/ad_campaign_pause_response.rb new file mode 100644 index 00000000..c17b75b4 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_pause_response.rb @@ -0,0 +1,989 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#pause + class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute available_budget + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + # + # @return [Float] + required :available_budget, Float + + # @!attribute billing_ledger_account + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount, nil] + required :billing_ledger_account, + -> { WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount }, + nil?: true + + # @!attribute clicks_count + # Number of clicks + # + # @return [Integer] + required :clicks_count, Integer + + # @!attribute config + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdCampaignPauseResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the ad campaign was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute created_by_user + # The user who created the campaign + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser] + required :created_by_user, -> { WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser } + + # @!attribute daily_budget + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute impressions_count + # Number of impressions (views) + # + # @return [Integer] + required :impressions_count, Integer + + # @!attribute paused_until + # If temporarily paused, the timestamp when the campaign will auto-resume + # + # @return [Time, nil] + required :paused_until, Time, nil?: true + + # @!attribute payment_method + # The payment method used for daily billing (null if using platform balance) + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod, nil] + required :payment_method, union: -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod } + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Platform, nil] + required :platform, enum: -> { WhopSDK::Models::AdCampaignPauseResponse::Platform }, nil?: true + + # @!attribute product + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::Product, nil] + required :product, -> { WhopSDK::Models::AdCampaignPauseResponse::Product }, nil?: true + + # @!attribute purchases_count + # Number of purchases + # + # @return [Integer] + required :purchases_count, Integer + + # @!attribute remaining_balance + # Remaining balance in dollars + # + # @return [Float] + required :remaining_balance, Float + + # @!attribute return_on_ad_spend + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @return [Float] + required :return_on_ad_spend, Float + + # @!attribute revenue + # Total revenue generated from users who converted through this campaign + # + # @return [Float] + required :revenue, Float + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdCampaignPauseResponse::Status } + + # @!attribute target_country_codes + # Array of ISO3166 country codes for territory targeting + # + # @return [Array] + required :target_country_codes, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!attribute todays_spend + # Amount spent today in dollars + # + # @return [Float] + required :todays_spend, Float + + # @!attribute total_credits + # Total credits added to the campaign in dollars + # + # @return [Float] + required :total_credits, Float + + # @!attribute total_spend + # Total amount spent on conversions in dollars + # + # @return [Float] + required :total_spend, Float + + # @!attribute updated_at + # The datetime the ad campaign was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, available_budget:, billing_ledger_account:, clicks_count:, config:, created_at:, created_by_user:, daily_budget:, impressions_count:, paused_until:, payment_method:, platform:, product:, purchases_count:, remaining_balance:, return_on_ad_spend:, revenue:, status:, target_country_codes:, title:, todays_spend:, total_credits:, total_spend:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse} for more details. + # + # An advertising campaign running on an external platform or within Whop. + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param available_budget [Float] Available budget in dollars, capped at daily budget minus today's spend for dail + # + # @param billing_ledger_account [WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount, nil] The ledger account being charged for platform balance billing (null if using car + # + # @param clicks_count [Integer] Number of clicks + # + # @param config [WhopSDK::Models::AdCampaignPauseResponse::Config, nil] Meta campaign configuration (objective, budget, bidding, etc.). Null for non-Met + # + # @param created_at [Time] The datetime the ad campaign was created. + # + # @param created_by_user [WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser] The user who created the campaign + # + # @param daily_budget [Float, nil] Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # + # @param impressions_count [Integer] Number of impressions (views) + # + # @param paused_until [Time, nil] If temporarily paused, the timestamp when the campaign will auto-resume + # + # @param payment_method [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod, nil] The payment method used for daily billing (null if using platform balance) + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Platform, nil] The platforms where an ad campaign can run. + # + # @param product [WhopSDK::Models::AdCampaignPauseResponse::Product, nil] The access pass being promoted. Null for campaigns that don't target a specific + # + # @param purchases_count [Integer] Number of purchases + # + # @param remaining_balance [Float] Remaining balance in dollars + # + # @param return_on_ad_spend [Float] Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @param revenue [Float] Total revenue generated from users who converted through this campaign + # + # @param status [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Status] Current status of the campaign (active, paused, or inactive) + # + # @param target_country_codes [Array] Array of ISO3166 country codes for territory targeting + # + # @param title [String] The title of the ad campaign + # + # @param todays_spend [Float] Amount spent today in dollars + # + # @param total_credits [Float] Total credits added to the campaign in dollars + # + # @param total_spend [Float] Total amount spent on conversions in dollars + # + # @param updated_at [Time] The datetime the ad campaign was last updated. + + # @see WhopSDK::Models::AdCampaignPauseResponse#billing_ledger_account + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ledger account. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @param id [String] The unique identifier for the ledger account. + end + + # @see WhopSDK::Models::AdCampaignPauseResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # The bidding strategy used to optimize spend for this campaign. + # + # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy }, + nil?: true + + # @!attribute budget_optimization + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + # + # @return [Boolean, nil] + required :budget_optimization, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute end_time + # The scheduled end time of the campaign (ISO8601). + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute objective + # The campaign objective that determines how Meta optimizes delivery. + # + # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Config::Objective, nil] + required :objective, enum: -> { WhopSDK::Models::AdCampaignPauseResponse::Config::Objective }, nil?: true + + # @!attribute special_categories + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + # + # @return [Array, nil] + required :special_categories, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute start_time + # The scheduled start time of the campaign (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute status + # The campaign status as set by the advertiser (active or paused). + # + # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Config::Status, nil] + required :status, enum: -> { WhopSDK::Models::AdCampaignPauseResponse::Config::Status }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, end_time:, objective:, special_categories:, start_time:, status:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::Config} for more details. + # + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy, nil] The bidding strategy used to optimize spend for this campaign. + # + # @param budget_optimization [Boolean, nil] Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # + # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). + # + # @param objective [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Config::Objective, nil] The campaign objective that determines how Meta optimizes delivery. + # + # @param special_categories [Array, nil] Special ad categories required by the platform (e.g., housing, employment, credi + # + # @param start_time [String, nil] The scheduled start time of the campaign (ISO8601). + # + # @param status [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Config::Status, nil] The campaign status as set by the advertiser (active or paused). + + # The bidding strategy used to optimize spend for this campaign. + # + # @see WhopSDK::Models::AdCampaignPauseResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # The campaign objective that determines how Meta optimizes delivery. + # + # @see WhopSDK::Models::AdCampaignPauseResponse::Config#objective + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS = :awareness + TRAFFIC = :traffic + ENGAGEMENT = :engagement + LEADS = :leads + SALES = :sales + + # @!method self.values + # @return [Array] + end + + # The campaign status as set by the advertiser (active or paused). + # + # @see WhopSDK::Models::AdCampaignPauseResponse::Config#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdCampaignPauseResponse#created_by_user + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the user. + # + # @return [String] + required :id, String + + # @!attribute name + # The user's display name shown on their public profile. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute username + # The user's unique username shown on their public profile. + # + # @return [String] + required :username, String + + # @!method initialize(id:, name:, username:) + # The user who created the campaign + # + # @param id [String] The unique identifier for the user. + # + # @param name [String, nil] The user's display name shown on their public profile. + # + # @param username [String] The user's unique username shown on their public profile. + end + + # The payment method used for daily billing (null if using platform balance) + # + # @see WhopSDK::Models::AdCampaignPauseResponse#payment_method + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # A saved payment method with no type-specific details available. + variant :BasePaymentMethod, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod } + + # A saved card payment method, including brand, last four digits, and expiration details. + variant :CardPaymentMethod, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod } + + # A saved US bank account payment method, including bank name, last four digits, and account type. + variant :UsBankAccountPaymentMethod, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod } + + # A saved Cash App payment method, including the buyer's cashtag and unique identifier. + variant :CashappPaymentMethod, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod } + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + variant :IdealPaymentMethod, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod } + + # A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits. + variant :SepaDebitPaymentMethod, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :BasePaymentMethod] + required :typename, const: :BasePaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, typename: :BasePaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod} for + # more details. + # + # A saved payment method with no type-specific details available. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :BasePaymentMethod] The typename of this object + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute card + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card] + required :card, -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CardPaymentMethod] + required :typename, const: :CardPaymentMethod + + # @!method initialize(id:, card:, created_at:, payment_method_type:, typename: :CardPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod} for + # more details. + # + # A saved card payment method, including brand, last four digits, and expiration + # details. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param card [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card] The card-specific details for this payment method, including brand, last four di + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CardPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod#card + class Card < WhopSDK::Internal::Type::BaseModel + # @!attribute brand + # Possible card brands that a payment token can have + # + # @return [Symbol, WhopSDK::Models::CardBrands, nil] + required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true + + # @!attribute exp_month + # The two-digit expiration month of the card (1-12). Null if not available. + # + # @return [Integer, nil] + required :exp_month, Integer, nil?: true + + # @!attribute exp_year + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + # + # @return [Integer, nil] + required :exp_year, Integer, nil?: true + + # @!attribute last4 + # The last four digits of the card number. Null if not available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(brand:, exp_month:, exp_year:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card} + # for more details. + # + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have + # + # @param exp_month [Integer, nil] The two-digit expiration month of the card (1-12). Null if not available. + # + # @param exp_year [Integer, nil] The two-digit expiration year of the card (e.g., 27 for 2027). Null if not avail + # + # @param last4 [String, nil] The last four digits of the card number. Null if not available. + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :UsBankAccountPaymentMethod] + required :typename, const: :UsBankAccountPaymentMethod + + # @!attribute us_bank_account + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] + required :us_bank_account, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount } + + # @!method initialize(id:, created_at:, payment_method_type:, us_bank_account:, typename: :UsBankAccountPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod} + # for more details. + # + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param us_bank_account [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] The bank account-specific details for this payment method, including bank name a + # + # @param typename [Symbol, :UsBankAccountPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod#us_bank_account + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute account_type + # The type of bank account (e.g., checking, savings). + # + # @return [String] + required :account_type, String + + # @!attribute bank_name + # The name of the financial institution holding the account. + # + # @return [String] + required :bank_name, String + + # @!attribute last4 + # The last four digits of the bank account number. + # + # @return [String] + required :last4, String + + # @!method initialize(account_type:, bank_name:, last4:) + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @param account_type [String] The type of bank account (e.g., checking, savings). + # + # @param bank_name [String] The name of the financial institution holding the account. + # + # @param last4 [String] The last four digits of the bank account number. + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute cashapp + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp] + required :cashapp, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CashappPaymentMethod] + required :typename, const: :CashappPaymentMethod + + # @!method initialize(id:, cashapp:, created_at:, payment_method_type:, typename: :CashappPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod} + # for more details. + # + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param cashapp [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp] The Cash App-specific details for this payment method, including cashtag and buy + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CashappPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod#cashapp + class Cashapp < WhopSDK::Internal::Type::BaseModel + # @!attribute buyer_id + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + # + # @return [String, nil] + required :buyer_id, String, nil?: true + + # @!attribute cashtag + # The public cashtag handle of the buyer on Cash App. Null if not available. + # + # @return [String, nil] + required :cashtag, String, nil?: true + + # @!method initialize(buyer_id:, cashtag:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp} + # for more details. + # + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @param buyer_id [String, nil] The unique and immutable identifier assigned by Cash App to the buyer. Null if n + # + # @param cashtag [String, nil] The public cashtag handle of the buyer on Cash App. Null if not available. + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute ideal + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal] + required :ideal, -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal } + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :IdealPaymentMethod] + required :typename, const: :IdealPaymentMethod + + # @!method initialize(id:, created_at:, ideal:, payment_method_type:, typename: :IdealPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod} + # for more details. + # + # A saved iDEAL payment method, including the customer's bank name and BIC code. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param ideal [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal] The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :IdealPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod#ideal + class Ideal < WhopSDK::Internal::Type::BaseModel + # @!attribute bank + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + # + # @return [String, nil] + required :bank, String, nil?: true + + # @!attribute bic + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + # + # @return [String, nil] + required :bic, String, nil?: true + + # @!method initialize(bank:, bic:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal} + # for more details. + # + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param bank [String, nil] The name of the customer's bank used for the iDEAL transaction. Null if not avai + # + # @param bic [String, nil] The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not availab + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute sepa_debit + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @return [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] + required :sepa_debit, + -> { WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :SepaDebitPaymentMethod] + required :typename, const: :SepaDebitPaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, sepa_debit:, typename: :SepaDebitPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod} + # for more details. + # + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param sepa_debit [WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] The SEPA Direct Debit-specific details for this payment method, including bank c + # + # @param typename [Symbol, :SepaDebitPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod#sepa_debit + class SepaDebit < WhopSDK::Internal::Type::BaseModel + # @!attribute bank_code + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :bank_code, String, nil?: true + + # @!attribute branch_code + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :branch_code, String, nil?: true + + # @!attribute country + # The two-letter ISO country code where the bank account is located. Null if not + # available. + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute last4 + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(bank_code:, branch_code:, country:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit} + # for more details. + # + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @param bank_code [String, nil] The bank code of the financial institution associated with this SEPA account. Nu + # + # @param branch_code [String, nil] The branch code of the financial institution associated with this SEPA account. + # + # @param country [String, nil] The two-letter ISO country code where the bank account is located. Null if not a + # + # @param last4 [String, nil] The last four digits of the IBAN associated with this SEPA account. Null if not + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod)] + end + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdCampaignPauseResponse#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCampaignPauseResponse#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute route + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + # + # @return [String] + required :route, String + + # @!attribute title + # The display name of the product shown to customers on the product page and in + # search results. + # + # @return [String] + required :title, String + + # @!method initialize(id:, route:, title:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignPauseResponse::Product} for more details. + # + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @param id [String] The unique identifier for the product. + # + # @param route [String] The URL slug used in the product's public link (e.g., 'my-product' in whop.com/c + # + # @param title [String] The display name of the product shown to customers on the product page and in se + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdCampaignPauseResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_retrieve_params.rb b/lib/whop_sdk/models/ad_campaign_retrieve_params.rb new file mode 100644 index 00000000..65bc58b6 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_retrieve_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#retrieve + class AdCampaignRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_retrieve_response.rb b/lib/whop_sdk/models/ad_campaign_retrieve_response.rb new file mode 100644 index 00000000..c2d3f0a2 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_retrieve_response.rb @@ -0,0 +1,992 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#retrieve + class AdCampaignRetrieveResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute available_budget + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + # + # @return [Float] + required :available_budget, Float + + # @!attribute billing_ledger_account + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount, nil] + required :billing_ledger_account, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount }, + nil?: true + + # @!attribute clicks_count + # Number of clicks + # + # @return [Integer] + required :clicks_count, Integer + + # @!attribute config + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdCampaignRetrieveResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the ad campaign was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute created_by_user + # The user who created the campaign + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser] + required :created_by_user, -> { WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser } + + # @!attribute daily_budget + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute impressions_count + # Number of impressions (views) + # + # @return [Integer] + required :impressions_count, Integer + + # @!attribute paused_until + # If temporarily paused, the timestamp when the campaign will auto-resume + # + # @return [Time, nil] + required :paused_until, Time, nil?: true + + # @!attribute payment_method + # The payment method used for daily billing (null if using platform balance) + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod, nil] + required :payment_method, union: -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod } + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Platform, nil] + required :platform, enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::Platform }, nil?: true + + # @!attribute product + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::Product, nil] + required :product, -> { WhopSDK::Models::AdCampaignRetrieveResponse::Product }, nil?: true + + # @!attribute purchases_count + # Number of purchases + # + # @return [Integer] + required :purchases_count, Integer + + # @!attribute remaining_balance + # Remaining balance in dollars + # + # @return [Float] + required :remaining_balance, Float + + # @!attribute return_on_ad_spend + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @return [Float] + required :return_on_ad_spend, Float + + # @!attribute revenue + # Total revenue generated from users who converted through this campaign + # + # @return [Float] + required :revenue, Float + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::Status } + + # @!attribute target_country_codes + # Array of ISO3166 country codes for territory targeting + # + # @return [Array] + required :target_country_codes, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!attribute todays_spend + # Amount spent today in dollars + # + # @return [Float] + required :todays_spend, Float + + # @!attribute total_credits + # Total credits added to the campaign in dollars + # + # @return [Float] + required :total_credits, Float + + # @!attribute total_spend + # Total amount spent on conversions in dollars + # + # @return [Float] + required :total_spend, Float + + # @!attribute updated_at + # The datetime the ad campaign was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, available_budget:, billing_ledger_account:, clicks_count:, config:, created_at:, created_by_user:, daily_budget:, impressions_count:, paused_until:, payment_method:, platform:, product:, purchases_count:, remaining_balance:, return_on_ad_spend:, revenue:, status:, target_country_codes:, title:, todays_spend:, total_credits:, total_spend:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse} for more details. + # + # An advertising campaign running on an external platform or within Whop. + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param available_budget [Float] Available budget in dollars, capped at daily budget minus today's spend for dail + # + # @param billing_ledger_account [WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount, nil] The ledger account being charged for platform balance billing (null if using car + # + # @param clicks_count [Integer] Number of clicks + # + # @param config [WhopSDK::Models::AdCampaignRetrieveResponse::Config, nil] Meta campaign configuration (objective, budget, bidding, etc.). Null for non-Met + # + # @param created_at [Time] The datetime the ad campaign was created. + # + # @param created_by_user [WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser] The user who created the campaign + # + # @param daily_budget [Float, nil] Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # + # @param impressions_count [Integer] Number of impressions (views) + # + # @param paused_until [Time, nil] If temporarily paused, the timestamp when the campaign will auto-resume + # + # @param payment_method [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod, nil] The payment method used for daily billing (null if using platform balance) + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Platform, nil] The platforms where an ad campaign can run. + # + # @param product [WhopSDK::Models::AdCampaignRetrieveResponse::Product, nil] The access pass being promoted. Null for campaigns that don't target a specific + # + # @param purchases_count [Integer] Number of purchases + # + # @param remaining_balance [Float] Remaining balance in dollars + # + # @param return_on_ad_spend [Float] Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @param revenue [Float] Total revenue generated from users who converted through this campaign + # + # @param status [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Status] Current status of the campaign (active, paused, or inactive) + # + # @param target_country_codes [Array] Array of ISO3166 country codes for territory targeting + # + # @param title [String] The title of the ad campaign + # + # @param todays_spend [Float] Amount spent today in dollars + # + # @param total_credits [Float] Total credits added to the campaign in dollars + # + # @param total_spend [Float] Total amount spent on conversions in dollars + # + # @param updated_at [Time] The datetime the ad campaign was last updated. + + # @see WhopSDK::Models::AdCampaignRetrieveResponse#billing_ledger_account + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ledger account. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @param id [String] The unique identifier for the ledger account. + end + + # @see WhopSDK::Models::AdCampaignRetrieveResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # The bidding strategy used to optimize spend for this campaign. + # + # @return [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy }, + nil?: true + + # @!attribute budget_optimization + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + # + # @return [Boolean, nil] + required :budget_optimization, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute end_time + # The scheduled end time of the campaign (ISO8601). + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute objective + # The campaign objective that determines how Meta optimizes delivery. + # + # @return [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective, nil] + required :objective, + enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective }, + nil?: true + + # @!attribute special_categories + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + # + # @return [Array, nil] + required :special_categories, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute start_time + # The scheduled start time of the campaign (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute status + # The campaign status as set by the advertiser (active or paused). + # + # @return [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status, nil] + required :status, enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, end_time:, objective:, special_categories:, start_time:, status:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::Config} for more details. + # + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy, nil] The bidding strategy used to optimize spend for this campaign. + # + # @param budget_optimization [Boolean, nil] Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # + # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). + # + # @param objective [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective, nil] The campaign objective that determines how Meta optimizes delivery. + # + # @param special_categories [Array, nil] Special ad categories required by the platform (e.g., housing, employment, credi + # + # @param start_time [String, nil] The scheduled start time of the campaign (ISO8601). + # + # @param status [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status, nil] The campaign status as set by the advertiser (active or paused). + + # The bidding strategy used to optimize spend for this campaign. + # + # @see WhopSDK::Models::AdCampaignRetrieveResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # The campaign objective that determines how Meta optimizes delivery. + # + # @see WhopSDK::Models::AdCampaignRetrieveResponse::Config#objective + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS = :awareness + TRAFFIC = :traffic + ENGAGEMENT = :engagement + LEADS = :leads + SALES = :sales + + # @!method self.values + # @return [Array] + end + + # The campaign status as set by the advertiser (active or paused). + # + # @see WhopSDK::Models::AdCampaignRetrieveResponse::Config#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdCampaignRetrieveResponse#created_by_user + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the user. + # + # @return [String] + required :id, String + + # @!attribute name + # The user's display name shown on their public profile. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute username + # The user's unique username shown on their public profile. + # + # @return [String] + required :username, String + + # @!method initialize(id:, name:, username:) + # The user who created the campaign + # + # @param id [String] The unique identifier for the user. + # + # @param name [String, nil] The user's display name shown on their public profile. + # + # @param username [String] The user's unique username shown on their public profile. + end + + # The payment method used for daily billing (null if using platform balance) + # + # @see WhopSDK::Models::AdCampaignRetrieveResponse#payment_method + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # A saved payment method with no type-specific details available. + variant :BasePaymentMethod, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod } + + # A saved card payment method, including brand, last four digits, and expiration details. + variant :CardPaymentMethod, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod } + + # A saved US bank account payment method, including bank name, last four digits, and account type. + variant :UsBankAccountPaymentMethod, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod } + + # A saved Cash App payment method, including the buyer's cashtag and unique identifier. + variant :CashappPaymentMethod, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod } + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + variant :IdealPaymentMethod, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod } + + # A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits. + variant :SepaDebitPaymentMethod, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :BasePaymentMethod] + required :typename, const: :BasePaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, typename: :BasePaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod} + # for more details. + # + # A saved payment method with no type-specific details available. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :BasePaymentMethod] The typename of this object + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute card + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card] + required :card, -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CardPaymentMethod] + required :typename, const: :CardPaymentMethod + + # @!method initialize(id:, card:, created_at:, payment_method_type:, typename: :CardPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod} + # for more details. + # + # A saved card payment method, including brand, last four digits, and expiration + # details. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param card [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card] The card-specific details for this payment method, including brand, last four di + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CardPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod#card + class Card < WhopSDK::Internal::Type::BaseModel + # @!attribute brand + # Possible card brands that a payment token can have + # + # @return [Symbol, WhopSDK::Models::CardBrands, nil] + required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true + + # @!attribute exp_month + # The two-digit expiration month of the card (1-12). Null if not available. + # + # @return [Integer, nil] + required :exp_month, Integer, nil?: true + + # @!attribute exp_year + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + # + # @return [Integer, nil] + required :exp_year, Integer, nil?: true + + # @!attribute last4 + # The last four digits of the card number. Null if not available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(brand:, exp_month:, exp_year:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card} + # for more details. + # + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have + # + # @param exp_month [Integer, nil] The two-digit expiration month of the card (1-12). Null if not available. + # + # @param exp_year [Integer, nil] The two-digit expiration year of the card (e.g., 27 for 2027). Null if not avail + # + # @param last4 [String, nil] The last four digits of the card number. Null if not available. + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :UsBankAccountPaymentMethod] + required :typename, const: :UsBankAccountPaymentMethod + + # @!attribute us_bank_account + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] + required :us_bank_account, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount } + + # @!method initialize(id:, created_at:, payment_method_type:, us_bank_account:, typename: :UsBankAccountPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod} + # for more details. + # + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param us_bank_account [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] The bank account-specific details for this payment method, including bank name a + # + # @param typename [Symbol, :UsBankAccountPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod#us_bank_account + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute account_type + # The type of bank account (e.g., checking, savings). + # + # @return [String] + required :account_type, String + + # @!attribute bank_name + # The name of the financial institution holding the account. + # + # @return [String] + required :bank_name, String + + # @!attribute last4 + # The last four digits of the bank account number. + # + # @return [String] + required :last4, String + + # @!method initialize(account_type:, bank_name:, last4:) + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @param account_type [String] The type of bank account (e.g., checking, savings). + # + # @param bank_name [String] The name of the financial institution holding the account. + # + # @param last4 [String] The last four digits of the bank account number. + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute cashapp + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp] + required :cashapp, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CashappPaymentMethod] + required :typename, const: :CashappPaymentMethod + + # @!method initialize(id:, cashapp:, created_at:, payment_method_type:, typename: :CashappPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod} + # for more details. + # + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param cashapp [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp] The Cash App-specific details for this payment method, including cashtag and buy + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CashappPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod#cashapp + class Cashapp < WhopSDK::Internal::Type::BaseModel + # @!attribute buyer_id + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + # + # @return [String, nil] + required :buyer_id, String, nil?: true + + # @!attribute cashtag + # The public cashtag handle of the buyer on Cash App. Null if not available. + # + # @return [String, nil] + required :cashtag, String, nil?: true + + # @!method initialize(buyer_id:, cashtag:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp} + # for more details. + # + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @param buyer_id [String, nil] The unique and immutable identifier assigned by Cash App to the buyer. Null if n + # + # @param cashtag [String, nil] The public cashtag handle of the buyer on Cash App. Null if not available. + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute ideal + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal] + required :ideal, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal } + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :IdealPaymentMethod] + required :typename, const: :IdealPaymentMethod + + # @!method initialize(id:, created_at:, ideal:, payment_method_type:, typename: :IdealPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod} + # for more details. + # + # A saved iDEAL payment method, including the customer's bank name and BIC code. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param ideal [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal] The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :IdealPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod#ideal + class Ideal < WhopSDK::Internal::Type::BaseModel + # @!attribute bank + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + # + # @return [String, nil] + required :bank, String, nil?: true + + # @!attribute bic + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + # + # @return [String, nil] + required :bic, String, nil?: true + + # @!method initialize(bank:, bic:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal} + # for more details. + # + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param bank [String, nil] The name of the customer's bank used for the iDEAL transaction. Null if not avai + # + # @param bic [String, nil] The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not availab + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute sepa_debit + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] + required :sepa_debit, + -> { WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :SepaDebitPaymentMethod] + required :typename, const: :SepaDebitPaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, sepa_debit:, typename: :SepaDebitPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod} + # for more details. + # + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param sepa_debit [WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] The SEPA Direct Debit-specific details for this payment method, including bank c + # + # @param typename [Symbol, :SepaDebitPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod#sepa_debit + class SepaDebit < WhopSDK::Internal::Type::BaseModel + # @!attribute bank_code + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :bank_code, String, nil?: true + + # @!attribute branch_code + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :branch_code, String, nil?: true + + # @!attribute country + # The two-letter ISO country code where the bank account is located. Null if not + # available. + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute last4 + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(bank_code:, branch_code:, country:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit} + # for more details. + # + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @param bank_code [String, nil] The bank code of the financial institution associated with this SEPA account. Nu + # + # @param branch_code [String, nil] The branch code of the financial institution associated with this SEPA account. + # + # @param country [String, nil] The two-letter ISO country code where the bank account is located. Null if not a + # + # @param last4 [String, nil] The last four digits of the IBAN associated with this SEPA account. Null if not + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod)] + end + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdCampaignRetrieveResponse#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCampaignRetrieveResponse#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute route + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + # + # @return [String] + required :route, String + + # @!attribute title + # The display name of the product shown to customers on the product page and in + # search results. + # + # @return [String] + required :title, String + + # @!method initialize(id:, route:, title:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignRetrieveResponse::Product} for more details. + # + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @param id [String] The unique identifier for the product. + # + # @param route [String] The URL slug used in the product's public link (e.g., 'my-product' in whop.com/c + # + # @param title [String] The display name of the product shown to customers on the product page and in se + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdCampaignRetrieveResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_unpause_params.rb b/lib/whop_sdk/models/ad_campaign_unpause_params.rb new file mode 100644 index 00000000..6ebae33a --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_unpause_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#unpause + class AdCampaignUnpauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_unpause_response.rb b/lib/whop_sdk/models/ad_campaign_unpause_response.rb new file mode 100644 index 00000000..853ce73f --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_unpause_response.rb @@ -0,0 +1,992 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#unpause + class AdCampaignUnpauseResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute available_budget + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + # + # @return [Float] + required :available_budget, Float + + # @!attribute billing_ledger_account + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount, nil] + required :billing_ledger_account, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount }, + nil?: true + + # @!attribute clicks_count + # Number of clicks + # + # @return [Integer] + required :clicks_count, Integer + + # @!attribute config + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdCampaignUnpauseResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the ad campaign was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute created_by_user + # The user who created the campaign + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser] + required :created_by_user, -> { WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser } + + # @!attribute daily_budget + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute impressions_count + # Number of impressions (views) + # + # @return [Integer] + required :impressions_count, Integer + + # @!attribute paused_until + # If temporarily paused, the timestamp when the campaign will auto-resume + # + # @return [Time, nil] + required :paused_until, Time, nil?: true + + # @!attribute payment_method + # The payment method used for daily billing (null if using platform balance) + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod, nil] + required :payment_method, union: -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod } + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Platform, nil] + required :platform, enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::Platform }, nil?: true + + # @!attribute product + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::Product, nil] + required :product, -> { WhopSDK::Models::AdCampaignUnpauseResponse::Product }, nil?: true + + # @!attribute purchases_count + # Number of purchases + # + # @return [Integer] + required :purchases_count, Integer + + # @!attribute remaining_balance + # Remaining balance in dollars + # + # @return [Float] + required :remaining_balance, Float + + # @!attribute return_on_ad_spend + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @return [Float] + required :return_on_ad_spend, Float + + # @!attribute revenue + # Total revenue generated from users who converted through this campaign + # + # @return [Float] + required :revenue, Float + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::Status } + + # @!attribute target_country_codes + # Array of ISO3166 country codes for territory targeting + # + # @return [Array] + required :target_country_codes, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!attribute todays_spend + # Amount spent today in dollars + # + # @return [Float] + required :todays_spend, Float + + # @!attribute total_credits + # Total credits added to the campaign in dollars + # + # @return [Float] + required :total_credits, Float + + # @!attribute total_spend + # Total amount spent on conversions in dollars + # + # @return [Float] + required :total_spend, Float + + # @!attribute updated_at + # The datetime the ad campaign was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, available_budget:, billing_ledger_account:, clicks_count:, config:, created_at:, created_by_user:, daily_budget:, impressions_count:, paused_until:, payment_method:, platform:, product:, purchases_count:, remaining_balance:, return_on_ad_spend:, revenue:, status:, target_country_codes:, title:, todays_spend:, total_credits:, total_spend:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse} for more details. + # + # An advertising campaign running on an external platform or within Whop. + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param available_budget [Float] Available budget in dollars, capped at daily budget minus today's spend for dail + # + # @param billing_ledger_account [WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount, nil] The ledger account being charged for platform balance billing (null if using car + # + # @param clicks_count [Integer] Number of clicks + # + # @param config [WhopSDK::Models::AdCampaignUnpauseResponse::Config, nil] Meta campaign configuration (objective, budget, bidding, etc.). Null for non-Met + # + # @param created_at [Time] The datetime the ad campaign was created. + # + # @param created_by_user [WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser] The user who created the campaign + # + # @param daily_budget [Float, nil] Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # + # @param impressions_count [Integer] Number of impressions (views) + # + # @param paused_until [Time, nil] If temporarily paused, the timestamp when the campaign will auto-resume + # + # @param payment_method [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod, nil] The payment method used for daily billing (null if using platform balance) + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Platform, nil] The platforms where an ad campaign can run. + # + # @param product [WhopSDK::Models::AdCampaignUnpauseResponse::Product, nil] The access pass being promoted. Null for campaigns that don't target a specific + # + # @param purchases_count [Integer] Number of purchases + # + # @param remaining_balance [Float] Remaining balance in dollars + # + # @param return_on_ad_spend [Float] Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @param revenue [Float] Total revenue generated from users who converted through this campaign + # + # @param status [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Status] Current status of the campaign (active, paused, or inactive) + # + # @param target_country_codes [Array] Array of ISO3166 country codes for territory targeting + # + # @param title [String] The title of the ad campaign + # + # @param todays_spend [Float] Amount spent today in dollars + # + # @param total_credits [Float] Total credits added to the campaign in dollars + # + # @param total_spend [Float] Total amount spent on conversions in dollars + # + # @param updated_at [Time] The datetime the ad campaign was last updated. + + # @see WhopSDK::Models::AdCampaignUnpauseResponse#billing_ledger_account + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ledger account. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @param id [String] The unique identifier for the ledger account. + end + + # @see WhopSDK::Models::AdCampaignUnpauseResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # The bidding strategy used to optimize spend for this campaign. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy }, + nil?: true + + # @!attribute budget_optimization + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + # + # @return [Boolean, nil] + required :budget_optimization, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute end_time + # The scheduled end time of the campaign (ISO8601). + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute objective + # The campaign objective that determines how Meta optimizes delivery. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective, nil] + required :objective, + enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective }, + nil?: true + + # @!attribute special_categories + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + # + # @return [Array, nil] + required :special_categories, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute start_time + # The scheduled start time of the campaign (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute status + # The campaign status as set by the advertiser (active or paused). + # + # @return [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status, nil] + required :status, enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, end_time:, objective:, special_categories:, start_time:, status:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::Config} for more details. + # + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy, nil] The bidding strategy used to optimize spend for this campaign. + # + # @param budget_optimization [Boolean, nil] Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # + # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). + # + # @param objective [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective, nil] The campaign objective that determines how Meta optimizes delivery. + # + # @param special_categories [Array, nil] Special ad categories required by the platform (e.g., housing, employment, credi + # + # @param start_time [String, nil] The scheduled start time of the campaign (ISO8601). + # + # @param status [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status, nil] The campaign status as set by the advertiser (active or paused). + + # The bidding strategy used to optimize spend for this campaign. + # + # @see WhopSDK::Models::AdCampaignUnpauseResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # The campaign objective that determines how Meta optimizes delivery. + # + # @see WhopSDK::Models::AdCampaignUnpauseResponse::Config#objective + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS = :awareness + TRAFFIC = :traffic + ENGAGEMENT = :engagement + LEADS = :leads + SALES = :sales + + # @!method self.values + # @return [Array] + end + + # The campaign status as set by the advertiser (active or paused). + # + # @see WhopSDK::Models::AdCampaignUnpauseResponse::Config#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdCampaignUnpauseResponse#created_by_user + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the user. + # + # @return [String] + required :id, String + + # @!attribute name + # The user's display name shown on their public profile. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute username + # The user's unique username shown on their public profile. + # + # @return [String] + required :username, String + + # @!method initialize(id:, name:, username:) + # The user who created the campaign + # + # @param id [String] The unique identifier for the user. + # + # @param name [String, nil] The user's display name shown on their public profile. + # + # @param username [String] The user's unique username shown on their public profile. + end + + # The payment method used for daily billing (null if using platform balance) + # + # @see WhopSDK::Models::AdCampaignUnpauseResponse#payment_method + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # A saved payment method with no type-specific details available. + variant :BasePaymentMethod, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod } + + # A saved card payment method, including brand, last four digits, and expiration details. + variant :CardPaymentMethod, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod } + + # A saved US bank account payment method, including bank name, last four digits, and account type. + variant :UsBankAccountPaymentMethod, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod } + + # A saved Cash App payment method, including the buyer's cashtag and unique identifier. + variant :CashappPaymentMethod, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod } + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + variant :IdealPaymentMethod, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod } + + # A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits. + variant :SepaDebitPaymentMethod, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :BasePaymentMethod] + required :typename, const: :BasePaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, typename: :BasePaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod} + # for more details. + # + # A saved payment method with no type-specific details available. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :BasePaymentMethod] The typename of this object + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute card + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card] + required :card, -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CardPaymentMethod] + required :typename, const: :CardPaymentMethod + + # @!method initialize(id:, card:, created_at:, payment_method_type:, typename: :CardPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod} + # for more details. + # + # A saved card payment method, including brand, last four digits, and expiration + # details. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param card [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card] The card-specific details for this payment method, including brand, last four di + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CardPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod#card + class Card < WhopSDK::Internal::Type::BaseModel + # @!attribute brand + # Possible card brands that a payment token can have + # + # @return [Symbol, WhopSDK::Models::CardBrands, nil] + required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true + + # @!attribute exp_month + # The two-digit expiration month of the card (1-12). Null if not available. + # + # @return [Integer, nil] + required :exp_month, Integer, nil?: true + + # @!attribute exp_year + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + # + # @return [Integer, nil] + required :exp_year, Integer, nil?: true + + # @!attribute last4 + # The last four digits of the card number. Null if not available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(brand:, exp_month:, exp_year:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card} + # for more details. + # + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have + # + # @param exp_month [Integer, nil] The two-digit expiration month of the card (1-12). Null if not available. + # + # @param exp_year [Integer, nil] The two-digit expiration year of the card (e.g., 27 for 2027). Null if not avail + # + # @param last4 [String, nil] The last four digits of the card number. Null if not available. + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :UsBankAccountPaymentMethod] + required :typename, const: :UsBankAccountPaymentMethod + + # @!attribute us_bank_account + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] + required :us_bank_account, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount } + + # @!method initialize(id:, created_at:, payment_method_type:, us_bank_account:, typename: :UsBankAccountPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod} + # for more details. + # + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param us_bank_account [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] The bank account-specific details for this payment method, including bank name a + # + # @param typename [Symbol, :UsBankAccountPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod#us_bank_account + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute account_type + # The type of bank account (e.g., checking, savings). + # + # @return [String] + required :account_type, String + + # @!attribute bank_name + # The name of the financial institution holding the account. + # + # @return [String] + required :bank_name, String + + # @!attribute last4 + # The last four digits of the bank account number. + # + # @return [String] + required :last4, String + + # @!method initialize(account_type:, bank_name:, last4:) + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @param account_type [String] The type of bank account (e.g., checking, savings). + # + # @param bank_name [String] The name of the financial institution holding the account. + # + # @param last4 [String] The last four digits of the bank account number. + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute cashapp + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp] + required :cashapp, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CashappPaymentMethod] + required :typename, const: :CashappPaymentMethod + + # @!method initialize(id:, cashapp:, created_at:, payment_method_type:, typename: :CashappPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod} + # for more details. + # + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param cashapp [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp] The Cash App-specific details for this payment method, including cashtag and buy + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CashappPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod#cashapp + class Cashapp < WhopSDK::Internal::Type::BaseModel + # @!attribute buyer_id + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + # + # @return [String, nil] + required :buyer_id, String, nil?: true + + # @!attribute cashtag + # The public cashtag handle of the buyer on Cash App. Null if not available. + # + # @return [String, nil] + required :cashtag, String, nil?: true + + # @!method initialize(buyer_id:, cashtag:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp} + # for more details. + # + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @param buyer_id [String, nil] The unique and immutable identifier assigned by Cash App to the buyer. Null if n + # + # @param cashtag [String, nil] The public cashtag handle of the buyer on Cash App. Null if not available. + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute ideal + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal] + required :ideal, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal } + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :IdealPaymentMethod] + required :typename, const: :IdealPaymentMethod + + # @!method initialize(id:, created_at:, ideal:, payment_method_type:, typename: :IdealPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod} + # for more details. + # + # A saved iDEAL payment method, including the customer's bank name and BIC code. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param ideal [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal] The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :IdealPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod#ideal + class Ideal < WhopSDK::Internal::Type::BaseModel + # @!attribute bank + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + # + # @return [String, nil] + required :bank, String, nil?: true + + # @!attribute bic + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + # + # @return [String, nil] + required :bic, String, nil?: true + + # @!method initialize(bank:, bic:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal} + # for more details. + # + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param bank [String, nil] The name of the customer's bank used for the iDEAL transaction. Null if not avai + # + # @param bic [String, nil] The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not availab + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute sepa_debit + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] + required :sepa_debit, + -> { WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :SepaDebitPaymentMethod] + required :typename, const: :SepaDebitPaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, sepa_debit:, typename: :SepaDebitPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod} + # for more details. + # + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param sepa_debit [WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] The SEPA Direct Debit-specific details for this payment method, including bank c + # + # @param typename [Symbol, :SepaDebitPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod#sepa_debit + class SepaDebit < WhopSDK::Internal::Type::BaseModel + # @!attribute bank_code + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :bank_code, String, nil?: true + + # @!attribute branch_code + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :branch_code, String, nil?: true + + # @!attribute country + # The two-letter ISO country code where the bank account is located. Null if not + # available. + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute last4 + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(bank_code:, branch_code:, country:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit} + # for more details. + # + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @param bank_code [String, nil] The bank code of the financial institution associated with this SEPA account. Nu + # + # @param branch_code [String, nil] The branch code of the financial institution associated with this SEPA account. + # + # @param country [String, nil] The two-letter ISO country code where the bank account is located. Null if not a + # + # @param last4 [String, nil] The last four digits of the IBAN associated with this SEPA account. Null if not + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod)] + end + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdCampaignUnpauseResponse#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCampaignUnpauseResponse#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute route + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + # + # @return [String] + required :route, String + + # @!attribute title + # The display name of the product shown to customers on the product page and in + # search results. + # + # @return [String] + required :title, String + + # @!method initialize(id:, route:, title:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUnpauseResponse::Product} for more details. + # + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @param id [String] The unique identifier for the product. + # + # @param route [String] The URL slug used in the product's public link (e.g., 'my-product' in whop.com/c + # + # @param title [String] The display name of the product shown to customers on the product page and in se + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdCampaignUnpauseResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_update_params.rb b/lib/whop_sdk/models/ad_campaign_update_params.rb new file mode 100644 index 00000000..b186bf95 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_update_params.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#update + class AdCampaignUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute ad_creative_set_ids + # Array of creative set IDs to link to this campaign. + # + # @return [Array, nil] + optional :ad_creative_set_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute budget + # Budget amount in dollars. + # + # @return [Float, nil] + optional :budget, Float, nil?: true + + # @!attribute budget_type + # The budget type for an ad campaign or ad group. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateParams::BudgetType, nil] + optional :budget_type, enum: -> { WhopSDK::AdCampaignUpdateParams::BudgetType }, nil?: true + + # @!attribute config + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + # + # @return [WhopSDK::Models::AdCampaignUpdateParams::Config, nil] + optional :config, -> { WhopSDK::AdCampaignUpdateParams::Config }, nil?: true + + # @!attribute daily_budget + # Daily budget in dollars (minimum $5). + # + # @return [Float, nil] + optional :daily_budget, Float, nil?: true + + # @!attribute product_id + # The unique identifier of the product (access pass) to promote. + # + # @return [String, nil] + optional :product_id, String, nil?: true + + # @!attribute target_country_codes + # Array of ISO3166 country codes for territory targeting. + # + # @return [Array, nil] + optional :target_country_codes, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute title + # The title of the ad campaign. Must be max 100 characters. + # + # @return [String, nil] + optional :title, String, nil?: true + + # @!method initialize(id:, ad_creative_set_ids: nil, budget: nil, budget_type: nil, config: nil, daily_budget: nil, product_id: nil, target_country_codes: nil, title: nil, request_options: {}) + # @param id [String] + # + # @param ad_creative_set_ids [Array, nil] Array of creative set IDs to link to this campaign. + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdCampaignUpdateParams::BudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param config [WhopSDK::Models::AdCampaignUpdateParams::Config, nil] Unified campaign configuration (conversion goal, budget, bidding, etc.). + # + # @param daily_budget [Float, nil] Daily budget in dollars (minimum $5). + # + # @param product_id [String, nil] The unique identifier of the product (access pass) to promote. + # + # @param target_country_codes [Array, nil] Array of ISO3166 country codes for territory targeting. + # + # @param title [String, nil] The title of the ad campaign. Must be max 100 characters. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The budget type for an ad campaign or ad group. + module BudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY = :daily + LIFETIME = :lifetime + + # @!method self.values + # @return [Array] + end + + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @return [Integer, nil] + optional :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # The bidding strategy used to optimize spend for this campaign. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateParams::Config::BidStrategy, nil] + optional :bid_strategy, enum: -> { WhopSDK::AdCampaignUpdateParams::Config::BidStrategy }, nil?: true + + # @!attribute budget_optimization + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + # + # @return [Boolean, nil] + optional :budget_optimization, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute end_time + # The scheduled end time of the campaign (ISO8601). + # + # @return [String, nil] + optional :end_time, String, nil?: true + + # @!attribute lifetime_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :lifetime_budget, Integer, nil?: true + + # @!attribute objective + # The campaign objective that determines how Meta optimizes delivery. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateParams::Config::Objective, nil] + optional :objective, enum: -> { WhopSDK::AdCampaignUpdateParams::Config::Objective }, nil?: true + + # @!attribute special_categories + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + # + # @return [Array, nil] + optional :special_categories, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute start_time + # The scheduled start time of the campaign (ISO8601). + # + # @return [String, nil] + optional :start_time, String, nil?: true + + # @!attribute status + # The campaign status as set by the advertiser (active or paused). + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateParams::Config::Status, nil] + optional :status, enum: -> { WhopSDK::AdCampaignUpdateParams::Config::Status }, nil?: true + + # @!method initialize(bid_amount: nil, bid_strategy: nil, budget_optimization: nil, end_time: nil, lifetime_budget: nil, objective: nil, special_categories: nil, start_time: nil, status: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateParams::Config} for more details. + # + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdCampaignUpdateParams::Config::BidStrategy, nil] The bidding strategy used to optimize spend for this campaign. + # + # @param budget_optimization [Boolean, nil] Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # + # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). + # + # @param lifetime_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param objective [Symbol, WhopSDK::Models::AdCampaignUpdateParams::Config::Objective, nil] The campaign objective that determines how Meta optimizes delivery. + # + # @param special_categories [Array, nil] Special ad categories required by the platform (e.g., housing, employment, credi + # + # @param start_time [String, nil] The scheduled start time of the campaign (ISO8601). + # + # @param status [Symbol, WhopSDK::Models::AdCampaignUpdateParams::Config::Status, nil] The campaign status as set by the advertiser (active or paused). + + # The bidding strategy used to optimize spend for this campaign. + # + # @see WhopSDK::Models::AdCampaignUpdateParams::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # The campaign objective that determines how Meta optimizes delivery. + # + # @see WhopSDK::Models::AdCampaignUpdateParams::Config#objective + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS = :awareness + TRAFFIC = :traffic + ENGAGEMENT = :engagement + LEADS = :leads + SALES = :sales + + # @!method self.values + # @return [Array] + end + + # The campaign status as set by the advertiser (active or paused). + # + # @see WhopSDK::Models::AdCampaignUpdateParams::Config#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_update_response.rb b/lib/whop_sdk/models/ad_campaign_update_response.rb new file mode 100644 index 00000000..6bd2ea84 --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_update_response.rb @@ -0,0 +1,990 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdCampaigns#update + class AdCampaignUpdateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute available_budget + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + # + # @return [Float] + required :available_budget, Float + + # @!attribute billing_ledger_account + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount, nil] + required :billing_ledger_account, + -> { WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount }, + nil?: true + + # @!attribute clicks_count + # Number of clicks + # + # @return [Integer] + required :clicks_count, Integer + + # @!attribute config + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdCampaignUpdateResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the ad campaign was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute created_by_user + # The user who created the campaign + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser] + required :created_by_user, -> { WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser } + + # @!attribute daily_budget + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute impressions_count + # Number of impressions (views) + # + # @return [Integer] + required :impressions_count, Integer + + # @!attribute paused_until + # If temporarily paused, the timestamp when the campaign will auto-resume + # + # @return [Time, nil] + required :paused_until, Time, nil?: true + + # @!attribute payment_method + # The payment method used for daily billing (null if using platform balance) + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod, nil] + required :payment_method, union: -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod } + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Platform, nil] + required :platform, enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::Platform }, nil?: true + + # @!attribute product + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::Product, nil] + required :product, -> { WhopSDK::Models::AdCampaignUpdateResponse::Product }, nil?: true + + # @!attribute purchases_count + # Number of purchases + # + # @return [Integer] + required :purchases_count, Integer + + # @!attribute remaining_balance + # Remaining balance in dollars + # + # @return [Float] + required :remaining_balance, Float + + # @!attribute return_on_ad_spend + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @return [Float] + required :return_on_ad_spend, Float + + # @!attribute revenue + # Total revenue generated from users who converted through this campaign + # + # @return [Float] + required :revenue, Float + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::Status } + + # @!attribute target_country_codes + # Array of ISO3166 country codes for territory targeting + # + # @return [Array] + required :target_country_codes, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!attribute todays_spend + # Amount spent today in dollars + # + # @return [Float] + required :todays_spend, Float + + # @!attribute total_credits + # Total credits added to the campaign in dollars + # + # @return [Float] + required :total_credits, Float + + # @!attribute total_spend + # Total amount spent on conversions in dollars + # + # @return [Float] + required :total_spend, Float + + # @!attribute updated_at + # The datetime the ad campaign was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, available_budget:, billing_ledger_account:, clicks_count:, config:, created_at:, created_by_user:, daily_budget:, impressions_count:, paused_until:, payment_method:, platform:, product:, purchases_count:, remaining_balance:, return_on_ad_spend:, revenue:, status:, target_country_codes:, title:, todays_spend:, total_credits:, total_spend:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse} for more details. + # + # An advertising campaign running on an external platform or within Whop. + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param available_budget [Float] Available budget in dollars, capped at daily budget minus today's spend for dail + # + # @param billing_ledger_account [WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount, nil] The ledger account being charged for platform balance billing (null if using car + # + # @param clicks_count [Integer] Number of clicks + # + # @param config [WhopSDK::Models::AdCampaignUpdateResponse::Config, nil] Meta campaign configuration (objective, budget, bidding, etc.). Null for non-Met + # + # @param created_at [Time] The datetime the ad campaign was created. + # + # @param created_by_user [WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser] The user who created the campaign + # + # @param daily_budget [Float, nil] Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # + # @param impressions_count [Integer] Number of impressions (views) + # + # @param paused_until [Time, nil] If temporarily paused, the timestamp when the campaign will auto-resume + # + # @param payment_method [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod, nil] The payment method used for daily billing (null if using platform balance) + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Platform, nil] The platforms where an ad campaign can run. + # + # @param product [WhopSDK::Models::AdCampaignUpdateResponse::Product, nil] The access pass being promoted. Null for campaigns that don't target a specific + # + # @param purchases_count [Integer] Number of purchases + # + # @param remaining_balance [Float] Remaining balance in dollars + # + # @param return_on_ad_spend [Float] Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + # + # @param revenue [Float] Total revenue generated from users who converted through this campaign + # + # @param status [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Status] Current status of the campaign (active, paused, or inactive) + # + # @param target_country_codes [Array] Array of ISO3166 country codes for territory targeting + # + # @param title [String] The title of the ad campaign + # + # @param todays_spend [Float] Amount spent today in dollars + # + # @param total_credits [Float] Total credits added to the campaign in dollars + # + # @param total_spend [Float] Total amount spent on conversions in dollars + # + # @param updated_at [Time] The datetime the ad campaign was last updated. + + # @see WhopSDK::Models::AdCampaignUpdateResponse#billing_ledger_account + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ledger account. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The ledger account being charged for platform balance billing (null if using + # card) + # + # @param id [String] The unique identifier for the ledger account. + end + + # @see WhopSDK::Models::AdCampaignUpdateResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # The bidding strategy used to optimize spend for this campaign. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy }, + nil?: true + + # @!attribute budget_optimization + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + # + # @return [Boolean, nil] + required :budget_optimization, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute end_time + # The scheduled end time of the campaign (ISO8601). + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute objective + # The campaign objective that determines how Meta optimizes delivery. + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective, nil] + required :objective, enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective }, nil?: true + + # @!attribute special_categories + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + # + # @return [Array, nil] + required :special_categories, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute start_time + # The scheduled start time of the campaign (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute status + # The campaign status as set by the advertiser (active or paused). + # + # @return [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Config::Status, nil] + required :status, enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::Config::Status }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, end_time:, objective:, special_categories:, start_time:, status:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::Config} for more details. + # + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Only used when bid_strategy is bid_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy, nil] The bidding strategy used to optimize spend for this campaign. + # + # @param budget_optimization [Boolean, nil] Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # + # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). + # + # @param objective [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective, nil] The campaign objective that determines how Meta optimizes delivery. + # + # @param special_categories [Array, nil] Special ad categories required by the platform (e.g., housing, employment, credi + # + # @param start_time [String, nil] The scheduled start time of the campaign (ISO8601). + # + # @param status [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Config::Status, nil] The campaign status as set by the advertiser (active or paused). + + # The bidding strategy used to optimize spend for this campaign. + # + # @see WhopSDK::Models::AdCampaignUpdateResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # The campaign objective that determines how Meta optimizes delivery. + # + # @see WhopSDK::Models::AdCampaignUpdateResponse::Config#objective + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS = :awareness + TRAFFIC = :traffic + ENGAGEMENT = :engagement + LEADS = :leads + SALES = :sales + + # @!method self.values + # @return [Array] + end + + # The campaign status as set by the advertiser (active or paused). + # + # @see WhopSDK::Models::AdCampaignUpdateResponse::Config#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdCampaignUpdateResponse#created_by_user + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the user. + # + # @return [String] + required :id, String + + # @!attribute name + # The user's display name shown on their public profile. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute username + # The user's unique username shown on their public profile. + # + # @return [String] + required :username, String + + # @!method initialize(id:, name:, username:) + # The user who created the campaign + # + # @param id [String] The unique identifier for the user. + # + # @param name [String, nil] The user's display name shown on their public profile. + # + # @param username [String] The user's unique username shown on their public profile. + end + + # The payment method used for daily billing (null if using platform balance) + # + # @see WhopSDK::Models::AdCampaignUpdateResponse#payment_method + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # A saved payment method with no type-specific details available. + variant :BasePaymentMethod, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod } + + # A saved card payment method, including brand, last four digits, and expiration details. + variant :CardPaymentMethod, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod } + + # A saved US bank account payment method, including bank name, last four digits, and account type. + variant :UsBankAccountPaymentMethod, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod } + + # A saved Cash App payment method, including the buyer's cashtag and unique identifier. + variant :CashappPaymentMethod, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod } + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + variant :IdealPaymentMethod, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod } + + # A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits. + variant :SepaDebitPaymentMethod, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :BasePaymentMethod] + required :typename, const: :BasePaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, typename: :BasePaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod} + # for more details. + # + # A saved payment method with no type-specific details available. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :BasePaymentMethod] The typename of this object + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute card + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card] + required :card, -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CardPaymentMethod] + required :typename, const: :CardPaymentMethod + + # @!method initialize(id:, card:, created_at:, payment_method_type:, typename: :CardPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod} + # for more details. + # + # A saved card payment method, including brand, last four digits, and expiration + # details. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param card [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card] The card-specific details for this payment method, including brand, last four di + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CardPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod#card + class Card < WhopSDK::Internal::Type::BaseModel + # @!attribute brand + # Possible card brands that a payment token can have + # + # @return [Symbol, WhopSDK::Models::CardBrands, nil] + required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true + + # @!attribute exp_month + # The two-digit expiration month of the card (1-12). Null if not available. + # + # @return [Integer, nil] + required :exp_month, Integer, nil?: true + + # @!attribute exp_year + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + # + # @return [Integer, nil] + required :exp_year, Integer, nil?: true + + # @!attribute last4 + # The last four digits of the card number. Null if not available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(brand:, exp_month:, exp_year:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card} + # for more details. + # + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + # + # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have + # + # @param exp_month [Integer, nil] The two-digit expiration month of the card (1-12). Null if not available. + # + # @param exp_year [Integer, nil] The two-digit expiration year of the card (e.g., 27 for 2027). Null if not avail + # + # @param last4 [String, nil] The last four digits of the card number. Null if not available. + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :UsBankAccountPaymentMethod] + required :typename, const: :UsBankAccountPaymentMethod + + # @!attribute us_bank_account + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] + required :us_bank_account, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount } + + # @!method initialize(id:, created_at:, payment_method_type:, us_bank_account:, typename: :UsBankAccountPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod} + # for more details. + # + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param us_bank_account [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount] The bank account-specific details for this payment method, including bank name a + # + # @param typename [Symbol, :UsBankAccountPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod#us_bank_account + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + # @!attribute account_type + # The type of bank account (e.g., checking, savings). + # + # @return [String] + required :account_type, String + + # @!attribute bank_name + # The name of the financial institution holding the account. + # + # @return [String] + required :bank_name, String + + # @!attribute last4 + # The last four digits of the bank account number. + # + # @return [String] + required :last4, String + + # @!method initialize(account_type:, bank_name:, last4:) + # The bank account-specific details for this payment method, including bank name + # and last four digits. + # + # @param account_type [String] The type of bank account (e.g., checking, savings). + # + # @param bank_name [String] The name of the financial institution holding the account. + # + # @param last4 [String] The last four digits of the bank account number. + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute cashapp + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp] + required :cashapp, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp } + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :CashappPaymentMethod] + required :typename, const: :CashappPaymentMethod + + # @!method initialize(id:, cashapp:, created_at:, payment_method_type:, typename: :CashappPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod} + # for more details. + # + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param cashapp [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp] The Cash App-specific details for this payment method, including cashtag and buy + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :CashappPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod#cashapp + class Cashapp < WhopSDK::Internal::Type::BaseModel + # @!attribute buyer_id + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + # + # @return [String, nil] + required :buyer_id, String, nil?: true + + # @!attribute cashtag + # The public cashtag handle of the buyer on Cash App. Null if not available. + # + # @return [String, nil] + required :cashtag, String, nil?: true + + # @!method initialize(buyer_id:, cashtag:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp} + # for more details. + # + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + # + # @param buyer_id [String, nil] The unique and immutable identifier assigned by Cash App to the buyer. Null if n + # + # @param cashtag [String, nil] The public cashtag handle of the buyer on Cash App. Null if not available. + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute ideal + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal] + required :ideal, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal } + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :IdealPaymentMethod] + required :typename, const: :IdealPaymentMethod + + # @!method initialize(id:, created_at:, ideal:, payment_method_type:, typename: :IdealPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod} + # for more details. + # + # A saved iDEAL payment method, including the customer's bank name and BIC code. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param ideal [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal] The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param typename [Symbol, :IdealPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod#ideal + class Ideal < WhopSDK::Internal::Type::BaseModel + # @!attribute bank + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + # + # @return [String, nil] + required :bank, String, nil?: true + + # @!attribute bic + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + # + # @return [String, nil] + required :bic, String, nil?: true + + # @!method initialize(bank:, bic:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal} + # for more details. + # + # The iDEAL-specific details for this payment method, including bank name and BIC. + # + # @param bank [String, nil] The name of the customer's bank used for the iDEAL transaction. Null if not avai + # + # @param bic [String, nil] The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not availab + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + # + # @return [String] + required :id, String + + # @!attribute created_at + # The time of the event in ISO 8601 UTC format with millisecond precision + # + # @return [Time] + required :created_at, Time + + # @!attribute payment_method_type + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + # + # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] + required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } + + # @!attribute sepa_debit + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] + required :sepa_debit, + -> { WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :SepaDebitPaymentMethod] + required :typename, const: :SepaDebitPaymentMethod + + # @!method initialize(id:, created_at:, payment_method_type:, sepa_debit:, typename: :SepaDebitPaymentMethod) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod} + # for more details. + # + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + # + # @param id [String] Represents a unique identifier that is Base64 obfuscated. It is often used to re + # + # @param created_at [Time] The time of the event in ISO 8601 UTC format with millisecond precision + # + # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of payment instrument stored on file (e.g., card, us_bank_account, cash + # + # @param sepa_debit [WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit] The SEPA Direct Debit-specific details for this payment method, including bank c + # + # @param typename [Symbol, :SepaDebitPaymentMethod] The typename of this object + + # @see WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod#sepa_debit + class SepaDebit < WhopSDK::Internal::Type::BaseModel + # @!attribute bank_code + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :bank_code, String, nil?: true + + # @!attribute branch_code + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + # + # @return [String, nil] + required :branch_code, String, nil?: true + + # @!attribute country + # The two-letter ISO country code where the bank account is located. Null if not + # available. + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute last4 + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + # + # @return [String, nil] + required :last4, String, nil?: true + + # @!method initialize(bank_code:, branch_code:, country:, last4:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit} + # for more details. + # + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + # + # @param bank_code [String, nil] The bank code of the financial institution associated with this SEPA account. Nu + # + # @param branch_code [String, nil] The branch code of the financial institution associated with this SEPA account. + # + # @param country [String, nil] The two-letter ISO country code where the bank account is located. Null if not a + # + # @param last4 [String, nil] The last four digits of the IBAN associated with this SEPA account. Null if not + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod, WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod)] + end + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdCampaignUpdateResponse#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCampaignUpdateResponse#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute route + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + # + # @return [String] + required :route, String + + # @!attribute title + # The display name of the product shown to customers on the product page and in + # search results. + # + # @return [String] + required :title, String + + # @!method initialize(id:, route:, title:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignUpdateResponse::Product} for more details. + # + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + # + # @param id [String] The unique identifier for the product. + # + # @param route [String] The URL slug used in the product's public link (e.g., 'my-product' in whop.com/c + # + # @param title [String] The display name of the product shown to customers on the product page and in se + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdCampaignUpdateResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_create_params.rb b/lib/whop_sdk/models/ad_create_params.rb new file mode 100644 index 00000000..952a65cd --- /dev/null +++ b/lib/whop_sdk/models/ad_create_params.rb @@ -0,0 +1,1157 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Ads#create + class AdCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute ad_group_id + # The unique identifier of the ad group to create this ad in. + # + # @return [String] + required :ad_group_id, String + + # @!attribute creative_set_id + # The unique identifier of the creative set to use. + # + # @return [String, nil] + optional :creative_set_id, String, nil?: true + + # @!attribute existing_instagram_media_id + # ID of an existing Instagram media item to use as the ad creative (instead of a + # creative set or Facebook post). + # + # @return [String, nil] + optional :existing_instagram_media_id, String, nil?: true + + # @!attribute existing_post_id + # ID of an existing Facebook post to use as the ad creative (instead of a creative + # set). + # + # @return [String, nil] + optional :existing_post_id, String, nil?: true + + # @!attribute platform_config + # Platform-specific configuration. Must match the campaign platform. + # + # @return [WhopSDK::Models::AdCreateParams::PlatformConfig, nil] + optional :platform_config, -> { WhopSDK::AdCreateParams::PlatformConfig }, nil?: true + + # @!attribute status + # The status of an external ad. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::Status, nil] + optional :status, enum: -> { WhopSDK::AdCreateParams::Status }, nil?: true + + # @!method initialize(ad_group_id:, creative_set_id: nil, existing_instagram_media_id: nil, existing_post_id: nil, platform_config: nil, status: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCreateParams} for more details. + # + # @param ad_group_id [String] The unique identifier of the ad group to create this ad in. + # + # @param creative_set_id [String, nil] The unique identifier of the creative set to use. + # + # @param existing_instagram_media_id [String, nil] ID of an existing Instagram media item to use as the ad creative (instead of a c + # + # @param existing_post_id [String, nil] ID of an existing Facebook post to use as the ad creative (instead of a creative + # + # @param platform_config [WhopSDK::Models::AdCreateParams::PlatformConfig, nil] Platform-specific configuration. Must match the campaign platform. + # + # @param status [Symbol, WhopSDK::Models::AdCreateParams::Status, nil] The status of an external ad. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + # @!attribute meta + # Configuration for Meta (Facebook/Instagram) ads. + # + # @return [WhopSDK::Models::AdCreateParams::PlatformConfig::Meta, nil] + optional :meta, -> { WhopSDK::AdCreateParams::PlatformConfig::Meta }, nil?: true + + # @!attribute tiktok + # Configuration for TikTok ads. + # + # @return [WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok, nil] + optional :tiktok, -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok }, nil?: true + + # @!method initialize(meta: nil, tiktok: nil) + # Platform-specific configuration. Must match the campaign platform. + # + # @param meta [WhopSDK::Models::AdCreateParams::PlatformConfig::Meta, nil] Configuration for Meta (Facebook/Instagram) ads. + # + # @param tiktok [WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok, nil] Configuration for TikTok ads. + + # @see WhopSDK::Models::AdCreateParams::PlatformConfig#meta + class Meta < WhopSDK::Internal::Type::BaseModel + # @!attribute call_to_action_type + # Call-to-action button type. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::CallToActionType, nil] + optional :call_to_action_type, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType }, + nil?: true + + # @!attribute carousel_cards + # Per-card carousel config. + # + # @return [Array, nil] + optional :carousel_cards, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard] + }, + nil?: true + + # @!attribute description + # Description of the ad creative (legacy single-value). + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!attribute descriptions + # Up to 5 description variants, rendered via Meta asset_feed_spec. + # + # @return [Array, nil] + optional :descriptions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute existing_instagram_media_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :existing_instagram_media_id, String, nil?: true + + # @!attribute existing_post_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :existing_post_id, String, nil?: true + + # @!attribute headline + # Headline of the ad creative (legacy single-value). + # + # @return [String, nil] + optional :headline, String, nil?: true + + # @!attribute headlines + # Up to 5 headline variants, rendered via Meta asset_feed_spec. + # + # @return [Array, nil] + optional :headlines, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute instagram_actor_id + # Unique identifier of the Instagram account. + # + # @return [String, nil] + optional :instagram_actor_id, String, nil?: true + + # @!attribute lead_form_config + # Lead generation form configuration (JSON). + # + # @return [Hash{Symbol=>Object}, nil] + optional :lead_form_config, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute link_url + # Destination URL. + # + # @return [String, nil] + optional :link_url, String, nil?: true + + # @!attribute multi_advertiser_enrollment + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment, nil] + optional :multi_advertiser_enrollment, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment }, + nil?: true + + # @!attribute name + # Ad name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute page_id + # Unique identifier of the Facebook Page. + # + # @return [String, nil] + optional :page_id, String, nil?: true + + # @!attribute page_welcome_message + # Messenger welcome message / ice-breaker template (JSON). + # + # @return [Hash{Symbol=>Object}, nil] + optional :page_welcome_message, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute primary_text + # Primary text of the ad creative (legacy single-value). + # + # @return [String, nil] + optional :primary_text, String, nil?: true + + # @!attribute primary_texts + # Up to 5 primary-text variants, rendered via Meta asset_feed_spec. + # + # @return [Array, nil] + optional :primary_texts, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute url_tags + # URL query parameters appended to the destination link. + # + # @return [String, nil] + optional :url_tags, String, nil?: true + + # @!method initialize(call_to_action_type: nil, carousel_cards: nil, description: nil, descriptions: nil, existing_instagram_media_id: nil, existing_post_id: nil, headline: nil, headlines: nil, instagram_actor_id: nil, lead_form_config: nil, link_url: nil, multi_advertiser_enrollment: nil, name: nil, page_id: nil, page_welcome_message: nil, primary_text: nil, primary_texts: nil, url_tags: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCreateParams::PlatformConfig::Meta} for more details. + # + # Configuration for Meta (Facebook/Instagram) ads. + # + # @param call_to_action_type [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::CallToActionType, nil] Call-to-action button type. + # + # @param carousel_cards [Array, nil] Per-card carousel config. + # + # @param description [String, nil] Description of the ad creative (legacy single-value). + # + # @param descriptions [Array, nil] Up to 5 description variants, rendered via Meta asset_feed_spec. + # + # @param existing_instagram_media_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param existing_post_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param headline [String, nil] Headline of the ad creative (legacy single-value). + # + # @param headlines [Array, nil] Up to 5 headline variants, rendered via Meta asset_feed_spec. + # + # @param instagram_actor_id [String, nil] Unique identifier of the Instagram account. + # + # @param lead_form_config [Hash{Symbol=>Object}, nil] Lead generation form configuration (JSON). + # + # @param link_url [String, nil] Destination URL. + # + # @param multi_advertiser_enrollment [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment, nil] + # + # @param name [String, nil] Ad name. + # + # @param page_id [String, nil] Unique identifier of the Facebook Page. + # + # @param page_welcome_message [Hash{Symbol=>Object}, nil] Messenger welcome message / ice-breaker template (JSON). + # + # @param primary_text [String, nil] Primary text of the ad creative (legacy single-value). + # + # @param primary_texts [Array, nil] Up to 5 primary-text variants, rendered via Meta asset_feed_spec. + # + # @param url_tags [String, nil] URL query parameters appended to the destination link. + + # Call-to-action button type. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Meta#call_to_action_type + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE = :LEARN_MORE + SHOP_NOW = :SHOP_NOW + SIGN_UP = :SIGN_UP + SUBSCRIBE = :SUBSCRIBE + GET_STARTED = :GET_STARTED + BOOK_NOW = :BOOK_NOW + APPLY_NOW = :APPLY_NOW + CONTACT_US = :CONTACT_US + DOWNLOAD = :DOWNLOAD + ORDER_NOW = :ORDER_NOW + BUY_NOW = :BUY_NOW + GET_QUOTE = :GET_QUOTE + MESSAGE_PAGE = :MESSAGE_PAGE + WHATSAPP_MESSAGE = :WHATSAPP_MESSAGE + INSTAGRAM_MESSAGE = :INSTAGRAM_MESSAGE + CALL_NOW = :CALL_NOW + GET_DIRECTIONS = :GET_DIRECTIONS + SEND_UPDATES = :SEND_UPDATES + GET_OFFER = :GET_OFFER + WATCH_MORE = :WATCH_MORE + LISTEN_NOW = :LISTEN_NOW + PLAY_GAME = :PLAY_GAME + OPEN_LINK = :OPEN_LINK + NO_BUTTON = :NO_BUTTON + GET_OFFER_VIEW = :GET_OFFER_VIEW + GET_EVENT_TICKETS = :GET_EVENT_TICKETS + SEE_MENU = :SEE_MENU + REQUEST_TIME = :REQUEST_TIME + EVENT_RSVP = :EVENT_RSVP + SEE_DETAILS = :SEE_DETAILS + + # @!method self.values + # @return [Array] + end + + class CarouselCard < WhopSDK::Internal::Type::BaseModel + # @!attribute call_to_action_type + # CTA button type (e.g., SHOP_NOW, LEARN_MORE). + # + # @return [String, nil] + optional :call_to_action_type, String, nil?: true + + # @!attribute description + # Card description (max 30 chars recommended). + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!attribute link + # Destination URL for this card (defaults to ad destination). + # + # @return [String, nil] + optional :link, String, nil?: true + + # @!attribute name + # Card title (max 35 chars recommended). + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!method initialize(call_to_action_type: nil, description: nil, link: nil, name: nil) + # Per-card configuration for a carousel ad. + # + # @param call_to_action_type [String, nil] CTA button type (e.g., SHOP_NOW, LEARN_MORE). + # + # @param description [String, nil] Card description (max 30 chars recommended). + # + # @param link [String, nil] Destination URL for this card (defaults to ad destination). + # + # @param name [String, nil] Card title (max 35 chars recommended). + end + + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Meta#multi_advertiser_enrollment + module MultiAdvertiserEnrollment + extend WhopSDK::Internal::Type::Enum + + OPT_IN = :OPT_IN + OPT_OUT = :OPT_OUT + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdCreateParams::PlatformConfig#tiktok + class Tiktok < WhopSDK::Internal::Type::BaseModel + # @!attribute access_pass_tag + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :access_pass_tag, String, nil?: true + + # @!attribute ad_format + # Ad format (SINGLE_IMAGE, SINGLE_VIDEO, CAROUSEL_ADS, CATALOG_CAROUSEL, + # LIVE_CONTENT). + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::AdFormat, nil] + optional :ad_format, + enum: -> { + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat + }, + nil?: true + + # @!attribute ad_name + # Ad name. + # + # @return [String, nil] + optional :ad_name, String, nil?: true + + # @!attribute ad_text + # Ad copy (single variant). + # + # @return [String, nil] + optional :ad_text, String, nil?: true + + # @!attribute ad_texts + # Ad copy variants for search ads (up to 5). + # + # @return [Array, nil] + optional :ad_texts, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute aigc_disclosure_type + # Whether the ad creative is AI-generated content. See docs/tiktok_api/ad.md § + # aigc_disclosure_type. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType, nil] + optional :aigc_disclosure_type, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType }, + nil?: true + + # @!attribute auto_disclaimer_types + # Automatic disclaimer categories (e.g., FINANCE, ALCOHOL). + # + # @return [Array, nil] + optional :auto_disclaimer_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute automate_creative_enabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :automate_creative_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute brand_safety_postbid_partner + # Post-bid brand-safety vendor. See docs/tiktok_api/ad.md § + # brand_safety_postbid_partner. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner, nil] + optional :brand_safety_postbid_partner, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner }, + nil?: true + + # @!attribute brand_safety_vast_url + # VAST URL for brand safety measurement. + # + # @return [String, nil] + optional :brand_safety_vast_url, String, nil?: true + + # @!attribute call_to_action + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::CallToAction, nil] + optional :call_to_action, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction }, + nil?: true + + # @!attribute call_to_action_enabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :call_to_action_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute call_to_action_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :call_to_action_id, String, nil?: true + + # @!attribute call_to_action_mode + # How the call-to-action text is chosen. STANDARD uses a single fixed CTA; DYNAMIC + # lets TikTok rotate through a set of CTAs to maximize performance. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode, nil] + optional :call_to_action_mode, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode }, + nil?: true + + # @!attribute card_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :card_id, String, nil?: true + + # @!attribute carousel_image_index + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :carousel_image_index, Integer, nil?: true + + # @!attribute catalog_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :catalog_id, String, nil?: true + + # @!attribute click_tracking_url + # Third-party click tracker URL. + # + # @return [String, nil] + optional :click_tracking_url, String, nil?: true + + # @!attribute cpp_url + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :cpp_url, String, nil?: true + + # @!attribute creative_authorized + # Whether the creator has authorized the use of this creative for paid promotion + # (Spark Ads). + # + # @return [Boolean, nil] + optional :creative_authorized, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute creative_auto_enhancement_strategy_list + # + # @return [Array, nil] + optional :creative_auto_enhancement_strategy_list, + WhopSDK::Internal::Type::ArrayOf[String], + nil?: true + + # @!attribute dark_post_status + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus, nil] + optional :dark_post_status, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus }, + nil?: true + + # @!attribute deeplink + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :deeplink, String, nil?: true + + # @!attribute deeplink_format_type + # How the ad's deeplink is resolved. See docs/tiktok_api/ad.md § + # deeplink_format_type. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType, nil] + optional :deeplink_format_type, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType }, + nil?: true + + # @!attribute deeplink_type + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :deeplink_type, String, nil?: true + + # @!attribute deeplink_utm_params + # UTM params appended to the deeplink. + # + # @return [ArrayObject}>, nil] + optional :deeplink_utm_params, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute disclaimer_clickable_texts + # Clickable disclaimer segments (text + url). + # + # @return [ArrayObject}>, nil] + optional :disclaimer_clickable_texts, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute disclaimer_text + # Plain text shown when disclaimer_type is DISCLAIMER_TEXT / DISCLAIMER_WITH_URL. + # + # @return [String, nil] + optional :disclaimer_text, String, nil?: true + + # @!attribute disclaimer_type + # Ad disclaimer mode. See docs/tiktok_api/ad.md § disclaimer_type. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType, nil] + optional :disclaimer_type, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType }, + nil?: true + + # @!attribute dynamic_destination + # Dynamic destination strategy for shopping ads. + # + # @return [String, nil] + optional :dynamic_destination, String, nil?: true + + # @!attribute dynamic_format + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :dynamic_format, String, nil?: true + + # @!attribute end_card_cta + # End-card CTA text for video ads. + # + # @return [String, nil] + optional :end_card_cta, String, nil?: true + + # @!attribute fallback_type + # Destination fallback when a deferred deeplink cannot open the app. See + # docs/tiktok_api/ad.md § fallback_type. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::FallbackType, nil] + optional :fallback_type, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType }, + nil?: true + + # @!attribute identity_authorized_bc_id + # Business Center ID (required when identity_type is BC_AUTH_TT). + # + # @return [String, nil] + optional :identity_authorized_bc_id, String, nil?: true + + # @!attribute identity_id + # Unique identifier of the identity. + # + # @return [String, nil] + optional :identity_id, String, nil?: true + + # @!attribute identity_type + # Identity type. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::IdentityType, nil] + optional :identity_type, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType }, + nil?: true + + # @!attribute image_ids + # Unique identifiers of the images. + # + # @return [Array, nil] + optional :image_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute impression_tracking_url + # Third-party impression tracker URL. + # + # @return [String, nil] + optional :impression_tracking_url, String, nil?: true + + # @!attribute item_duet_status + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus, nil] + optional :item_duet_status, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus }, + nil?: true + + # @!attribute item_group_ids + # + # @return [Array, nil] + optional :item_group_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute item_stitch_status + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus, nil] + optional :item_stitch_status, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus }, + nil?: true + + # @!attribute landing_page_url + # Landing page URL. + # + # @return [String, nil] + optional :landing_page_url, String, nil?: true + + # @!attribute link_url + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :link_url, String, nil?: true + + # @!attribute music_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :music_id, String, nil?: true + + # @!attribute page_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :page_id, String, nil?: true + + # @!attribute product_display_field_list + # Fields displayed on dynamic product cards. + # + # @return [Array, nil] + optional :product_display_field_list, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute product_set_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :product_set_id, String, nil?: true + + # @!attribute product_specific_type + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :product_specific_type, String, nil?: true + + # @!attribute promotional_music_disabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :promotional_music_disabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute shopping_ads_fallback_type + # Fallback destination for shopping ads when the primary target is unavailable. + # See docs/tiktok_api/ad.md § shopping_ads_fallback_type. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType, nil] + optional :shopping_ads_fallback_type, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType }, + nil?: true + + # @!attribute shopping_ads_video_package_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :shopping_ads_video_package_id, String, nil?: true + + # @!attribute showcase_products + # + # @return [ArrayObject}>, nil] + optional :showcase_products, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute sku_ids + # + # @return [Array, nil] + optional :sku_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute tiktok_item_id + # TikTok item ID for Spark Ads (promotes an organic post). + # + # @return [String, nil] + optional :tiktok_item_id, String, nil?: true + + # @!attribute tracking_app_id + # TikTok MMP-tracked app ID. + # + # @return [String, nil] + optional :tracking_app_id, String, nil?: true + + # @!attribute tracking_message_event_set_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :tracking_message_event_set_id, String, nil?: true + + # @!attribute tracking_offline_event_set_ids + # Offline event set IDs for attribution. + # + # @return [Array, nil] + optional :tracking_offline_event_set_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute tracking_pixel_id + # TikTok pixel ID used for conversion tracking on this ad. + # + # @return [String, nil] + optional :tracking_pixel_id, String, nil?: true + + # @!attribute utm_params + # + # @return [ArrayObject}>, nil] + optional :utm_params, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute vertical_video_strategy + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :vertical_video_strategy, String, nil?: true + + # @!attribute video_id + # Unique identifier of the video. + # + # @return [String, nil] + optional :video_id, String, nil?: true + + # @!attribute video_view_tracking_url + # Third-party video-view tracker URL. + # + # @return [String, nil] + optional :video_view_tracking_url, String, nil?: true + + # @!attribute viewability_postbid_partner + # Post-bid viewability measurement partner. See docs/tiktok_api/ad.md § + # viewability_postbid_partner. + # + # @return [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner, nil] + optional :viewability_postbid_partner, + enum: -> { WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner }, + nil?: true + + # @!attribute viewability_vast_url + # VAST URL for viewability measurement. + # + # @return [String, nil] + optional :viewability_vast_url, String, nil?: true + + # @!method initialize(access_pass_tag: nil, ad_format: nil, ad_name: nil, ad_text: nil, ad_texts: nil, aigc_disclosure_type: nil, auto_disclaimer_types: nil, automate_creative_enabled: nil, brand_safety_postbid_partner: nil, brand_safety_vast_url: nil, call_to_action: nil, call_to_action_enabled: nil, call_to_action_id: nil, call_to_action_mode: nil, card_id: nil, carousel_image_index: nil, catalog_id: nil, click_tracking_url: nil, cpp_url: nil, creative_authorized: nil, creative_auto_enhancement_strategy_list: nil, dark_post_status: nil, deeplink: nil, deeplink_format_type: nil, deeplink_type: nil, deeplink_utm_params: nil, disclaimer_clickable_texts: nil, disclaimer_text: nil, disclaimer_type: nil, dynamic_destination: nil, dynamic_format: nil, end_card_cta: nil, fallback_type: nil, identity_authorized_bc_id: nil, identity_id: nil, identity_type: nil, image_ids: nil, impression_tracking_url: nil, item_duet_status: nil, item_group_ids: nil, item_stitch_status: nil, landing_page_url: nil, link_url: nil, music_id: nil, page_id: nil, product_display_field_list: nil, product_set_id: nil, product_specific_type: nil, promotional_music_disabled: nil, shopping_ads_fallback_type: nil, shopping_ads_video_package_id: nil, showcase_products: nil, sku_ids: nil, tiktok_item_id: nil, tracking_app_id: nil, tracking_message_event_set_id: nil, tracking_offline_event_set_ids: nil, tracking_pixel_id: nil, utm_params: nil, vertical_video_strategy: nil, video_id: nil, video_view_tracking_url: nil, viewability_postbid_partner: nil, viewability_vast_url: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok} for more details. + # + # Configuration for TikTok ads. + # + # @param access_pass_tag [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param ad_format [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::AdFormat, nil] Ad format (SINGLE_IMAGE, SINGLE_VIDEO, CAROUSEL_ADS, CATALOG_CAROUSEL, LIVE_CONT + # + # @param ad_name [String, nil] Ad name. + # + # @param ad_text [String, nil] Ad copy (single variant). + # + # @param ad_texts [Array, nil] Ad copy variants for search ads (up to 5). + # + # @param aigc_disclosure_type [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType, nil] Whether the ad creative is AI-generated content. See docs/tiktok_api/ad.md § aig + # + # @param auto_disclaimer_types [Array, nil] Automatic disclaimer categories (e.g., FINANCE, ALCOHOL). + # + # @param automate_creative_enabled [Boolean, nil] Represents `true` or `false` values. + # + # @param brand_safety_postbid_partner [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner, nil] Post-bid brand-safety vendor. See docs/tiktok_api/ad.md § brand_safety_postbid_p + # + # @param brand_safety_vast_url [String, nil] VAST URL for brand safety measurement. + # + # @param call_to_action [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::CallToAction, nil] TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @param call_to_action_enabled [Boolean, nil] Represents `true` or `false` values. + # + # @param call_to_action_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param call_to_action_mode [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode, nil] How the call-to-action text is chosen. STANDARD uses a single fixed CTA; DYNAMIC + # + # @param card_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param carousel_image_index [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param catalog_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param click_tracking_url [String, nil] Third-party click tracker URL. + # + # @param cpp_url [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param creative_authorized [Boolean, nil] Whether the creator has authorized the use of this creative for paid promotion ( + # + # @param creative_auto_enhancement_strategy_list [Array, nil] + # + # @param dark_post_status [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus, nil] + # + # @param deeplink [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param deeplink_format_type [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType, nil] How the ad's deeplink is resolved. See docs/tiktok_api/ad.md § deeplink_format_t + # + # @param deeplink_type [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param deeplink_utm_params [ArrayObject}>, nil] UTM params appended to the deeplink. + # + # @param disclaimer_clickable_texts [ArrayObject}>, nil] Clickable disclaimer segments (text + url). + # + # @param disclaimer_text [String, nil] Plain text shown when disclaimer_type is DISCLAIMER_TEXT / DISCLAIMER_WITH_URL. + # + # @param disclaimer_type [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType, nil] Ad disclaimer mode. See docs/tiktok_api/ad.md § disclaimer_type. + # + # @param dynamic_destination [String, nil] Dynamic destination strategy for shopping ads. + # + # @param dynamic_format [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param end_card_cta [String, nil] End-card CTA text for video ads. + # + # @param fallback_type [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::FallbackType, nil] Destination fallback when a deferred deeplink cannot open the app. See docs/tikt + # + # @param identity_authorized_bc_id [String, nil] Business Center ID (required when identity_type is BC_AUTH_TT). + # + # @param identity_id [String, nil] Unique identifier of the identity. + # + # @param identity_type [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::IdentityType, nil] Identity type. + # + # @param image_ids [Array, nil] Unique identifiers of the images. + # + # @param impression_tracking_url [String, nil] Third-party impression tracker URL. + # + # @param item_duet_status [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus, nil] + # + # @param item_group_ids [Array, nil] + # + # @param item_stitch_status [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus, nil] + # + # @param landing_page_url [String, nil] Landing page URL. + # + # @param link_url [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param music_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param page_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param product_display_field_list [Array, nil] Fields displayed on dynamic product cards. + # + # @param product_set_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param product_specific_type [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param promotional_music_disabled [Boolean, nil] Represents `true` or `false` values. + # + # @param shopping_ads_fallback_type [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType, nil] Fallback destination for shopping ads when the primary target is unavailable. Se + # + # @param shopping_ads_video_package_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param showcase_products [ArrayObject}>, nil] + # + # @param sku_ids [Array, nil] + # + # @param tiktok_item_id [String, nil] TikTok item ID for Spark Ads (promotes an organic post). + # + # @param tracking_app_id [String, nil] TikTok MMP-tracked app ID. + # + # @param tracking_message_event_set_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param tracking_offline_event_set_ids [Array, nil] Offline event set IDs for attribution. + # + # @param tracking_pixel_id [String, nil] TikTok pixel ID used for conversion tracking on this ad. + # + # @param utm_params [ArrayObject}>, nil] + # + # @param vertical_video_strategy [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param video_id [String, nil] Unique identifier of the video. + # + # @param video_view_tracking_url [String, nil] Third-party video-view tracker URL. + # + # @param viewability_postbid_partner [Symbol, WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner, nil] Post-bid viewability measurement partner. See docs/tiktok_api/ad.md § viewabilit + # + # @param viewability_vast_url [String, nil] VAST URL for viewability measurement. + + # Ad format (SINGLE_IMAGE, SINGLE_VIDEO, CAROUSEL_ADS, CATALOG_CAROUSEL, + # LIVE_CONTENT). + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#ad_format + module AdFormat + extend WhopSDK::Internal::Type::Enum + + SINGLE_IMAGE = :SINGLE_IMAGE + SINGLE_VIDEO = :SINGLE_VIDEO + CAROUSEL_ADS = :CAROUSEL_ADS + CATALOG_CAROUSEL = :CATALOG_CAROUSEL + LIVE_CONTENT = :LIVE_CONTENT + + # @!method self.values + # @return [Array] + end + + # Whether the ad creative is AI-generated content. See docs/tiktok_api/ad.md § + # aigc_disclosure_type. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#aigc_disclosure_type + module AigcDisclosureType + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + CONTAINS_AIGC = :CONTAINS_AIGC + IS_AIGC = :IS_AIGC + NOT_AIGC = :NOT_AIGC + + # @!method self.values + # @return [Array] + end + + # Post-bid brand-safety vendor. See docs/tiktok_api/ad.md § + # brand_safety_postbid_partner. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#brand_safety_postbid_partner + module BrandSafetyPostbidPartner + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + IAS = :IAS + DOUBLE_VERIFY = :DOUBLE_VERIFY + OPEN_SLATE = :OPEN_SLATE + ZEFR = :ZEFR + + # @!method self.values + # @return [Array] + end + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#call_to_action + module CallToAction + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE = :LEARN_MORE + DOWNLOAD = :DOWNLOAD + SHOP_NOW = :SHOP_NOW + SIGN_UP = :SIGN_UP + CONTACT_US = :CONTACT_US + APPLY_NOW = :APPLY_NOW + BOOK_NOW = :BOOK_NOW + PLAY_GAME = :PLAY_GAME + WATCH_NOW = :WATCH_NOW + READ_MORE = :READ_MORE + VIEW_NOW = :VIEW_NOW + GET_QUOTE = :GET_QUOTE + ORDER_NOW = :ORDER_NOW + INSTALL_NOW = :INSTALL_NOW + GET_SHOWTIMES = :GET_SHOWTIMES + LISTEN_NOW = :LISTEN_NOW + INTERESTED = :INTERESTED + SUBSCRIBE = :SUBSCRIBE + GET_TICKETS_NOW = :GET_TICKETS_NOW + EXPERIENCE_NOW = :EXPERIENCE_NOW + PRE_ORDER_NOW = :PRE_ORDER_NOW + VISIT_STORE = :VISIT_STORE + + # @!method self.values + # @return [Array] + end + + # How the call-to-action text is chosen. STANDARD uses a single fixed CTA; DYNAMIC + # lets TikTok rotate through a set of CTAs to maximize performance. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#call_to_action_mode + module CallToActionMode + extend WhopSDK::Internal::Type::Enum + + STANDARD = :STANDARD + DYNAMIC = :DYNAMIC + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#dark_post_status + module DarkPostStatus + extend WhopSDK::Internal::Type::Enum + + ON = :ON + OFF = :OFF + + # @!method self.values + # @return [Array] + end + + # How the ad's deeplink is resolved. See docs/tiktok_api/ad.md § + # deeplink_format_type. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#deeplink_format_type + module DeeplinkFormatType + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + DEEPLINK = :DEEPLINK + DEFERRED_DEEPLINK = :DEFERRED_DEEPLINK + + # @!method self.values + # @return [Array] + end + + # Ad disclaimer mode. See docs/tiktok_api/ad.md § disclaimer_type. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#disclaimer_type + module DisclaimerType + extend WhopSDK::Internal::Type::Enum + + NONE = :NONE + DISCLAIMER_TEXT = :DISCLAIMER_TEXT + DISCLAIMER_WITH_URL = :DISCLAIMER_WITH_URL + + # @!method self.values + # @return [Array] + end + + # Destination fallback when a deferred deeplink cannot open the app. See + # docs/tiktok_api/ad.md § fallback_type. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#fallback_type + module FallbackType + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + APP_STORE = :APP_STORE + LANDING_PAGE = :LANDING_PAGE + + # @!method self.values + # @return [Array] + end + + # Identity type. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#identity_type + module IdentityType + extend WhopSDK::Internal::Type::Enum + + CUSTOMIZED_USER = :CUSTOMIZED_USER + AUTH_CODE = :AUTH_CODE + TT_USER = :TT_USER + BC_AUTH_TT = :BC_AUTH_TT + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#item_duet_status + module ItemDuetStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE = :ENABLE + DISABLE = :DISABLE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#item_stitch_status + module ItemStitchStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE = :ENABLE + DISABLE = :DISABLE + + # @!method self.values + # @return [Array] + end + + # Fallback destination for shopping ads when the primary target is unavailable. + # See docs/tiktok_api/ad.md § shopping_ads_fallback_type. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#shopping_ads_fallback_type + module ShoppingAdsFallbackType + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + LANDING_PAGE = :LANDING_PAGE + STORE = :STORE + + # @!method self.values + # @return [Array] + end + + # Post-bid viewability measurement partner. See docs/tiktok_api/ad.md § + # viewability_postbid_partner. + # + # @see WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok#viewability_postbid_partner + module ViewabilityPostbidPartner + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + IAS = :IAS + DOUBLE_VERIFY = :DOUBLE_VERIFY + MOAT = :MOAT + + # @!method self.values + # @return [Array] + end + end + end + + # The status of an external ad. + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_create_response.rb b/lib/whop_sdk/models/ad_create_response.rb new file mode 100644 index 00000000..9f94f052 --- /dev/null +++ b/lib/whop_sdk/models/ad_create_response.rb @@ -0,0 +1,505 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Ads#create + class AdCreateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Unique identifier for the ad. + # + # @return [String] + required :id, String + + # @!attribute created_at + # When the ad was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute external_ad_creative_set + # The creative set used by this ad. + # + # @return [WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet, nil] + required :external_ad_creative_set, + -> { WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet }, + nil?: true + + # @!attribute external_ad_group + # The parent ad group. + # + # @return [WhopSDK::Models::AdCreateResponse::ExternalAdGroup] + required :external_ad_group, -> { WhopSDK::Models::AdCreateResponse::ExternalAdGroup } + + # @!attribute platform_config + # Typed platform-specific configuration. + # + # @return [WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType, nil] + required :platform_config, union: -> { WhopSDK::Models::AdCreateResponse::PlatformConfig } + + # @!attribute status + # Current status of the ad. + # + # @return [Symbol, WhopSDK::Models::AdCreateResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdCreateResponse::Status } + + # @!attribute updated_at + # When the ad was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, created_at:, external_ad_creative_set:, external_ad_group:, platform_config:, status:, updated_at:) + # An ad belonging to an ad group + # + # @param id [String] Unique identifier for the ad. + # + # @param created_at [Time] When the ad was created. + # + # @param external_ad_creative_set [WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet, nil] The creative set used by this ad. + # + # @param external_ad_group [WhopSDK::Models::AdCreateResponse::ExternalAdGroup] The parent ad group. + # + # @param platform_config [WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType, nil] Typed platform-specific configuration. + # + # @param status [Symbol, WhopSDK::Models::AdCreateResponse::Status] Current status of the ad. + # + # @param updated_at [Time] When the ad was last updated. + + # @see WhopSDK::Models::AdCreateResponse#external_ad_creative_set + class ExternalAdCreativeSet < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the external ad creative set. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The creative set used by this ad. + # + # @param id [String] The unique identifier for the external ad creative set. + end + + # @see WhopSDK::Models::AdCreateResponse#external_ad_group + class ExternalAdGroup < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the external ad group. + # + # @return [String] + required :id, String + + # @!attribute name + # Human-readable ad group name + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute status + # Current operational status of the ad group + # + # @return [Symbol, WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status] + required :status, enum: -> { WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status } + + # @!method initialize(id:, name:, status:) + # The parent ad group. + # + # @param id [String] The unique identifier for the external ad group. + # + # @param name [String, nil] Human-readable ad group name + # + # @param status [Symbol, WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status] Current operational status of the ad group + + # Current operational status of the ad group + # + # @see WhopSDK::Models::AdCreateResponse::ExternalAdGroup#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + + # Typed platform-specific configuration. + # + # @see WhopSDK::Models::AdCreateResponse#platform_config + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # Meta (Facebook/Instagram) ad configuration. + variant :MetaAdPlatformConfigType, + -> { WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType } + + # TikTok ad configuration. + variant :TiktokAdPlatformConfigType, + -> { WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType } + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute call_to_action_type + # + # @return [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType, nil] + required :call_to_action_type, + enum: -> { WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType }, + nil?: true + + # @!attribute headline + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :headline, String, nil?: true + + # @!attribute instagram_actor_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :instagram_actor_id, String, nil?: true + + # @!attribute link_url + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :link_url, String, nil?: true + + # @!attribute name + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute page_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :page_id, String, nil?: true + + # @!attribute platform + # The ad platform. + # + # @return [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform } + + # @!attribute primary_text + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :primary_text, String, nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :MetaAdPlatformConfigType] + required :typename, const: :MetaAdPlatformConfigType + + # @!attribute url_tags + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :url_tags, String, nil?: true + + # @!method initialize(call_to_action_type:, headline:, instagram_actor_id:, link_url:, name:, page_id:, platform:, primary_text:, url_tags:, typename: :MetaAdPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType} + # for more details. + # + # Meta (Facebook/Instagram) ad configuration. + # + # @param call_to_action_type [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType, nil] + # + # @param headline [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param instagram_actor_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param link_url [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param name [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param page_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform] The ad platform. + # + # @param primary_text [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param url_tags [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param typename [Symbol, :MetaAdPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType#call_to_action_type + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE = :LEARN_MORE + SHOP_NOW = :SHOP_NOW + SIGN_UP = :SIGN_UP + SUBSCRIBE = :SUBSCRIBE + GET_STARTED = :GET_STARTED + BOOK_NOW = :BOOK_NOW + APPLY_NOW = :APPLY_NOW + CONTACT_US = :CONTACT_US + DOWNLOAD = :DOWNLOAD + ORDER_NOW = :ORDER_NOW + BUY_NOW = :BUY_NOW + GET_QUOTE = :GET_QUOTE + MESSAGE_PAGE = :MESSAGE_PAGE + WHATSAPP_MESSAGE = :WHATSAPP_MESSAGE + INSTAGRAM_MESSAGE = :INSTAGRAM_MESSAGE + CALL_NOW = :CALL_NOW + GET_DIRECTIONS = :GET_DIRECTIONS + SEND_UPDATES = :SEND_UPDATES + GET_OFFER = :GET_OFFER + WATCH_MORE = :WATCH_MORE + LISTEN_NOW = :LISTEN_NOW + PLAY_GAME = :PLAY_GAME + OPEN_LINK = :OPEN_LINK + NO_BUTTON = :NO_BUTTON + GET_OFFER_VIEW = :GET_OFFER_VIEW + GET_EVENT_TICKETS = :GET_EVENT_TICKETS + SEE_MENU = :SEE_MENU + REQUEST_TIME = :REQUEST_TIME + EVENT_RSVP = :EVENT_RSVP + SEE_DETAILS = :SEE_DETAILS + + # @!method self.values + # @return [Array] + end + + # The ad platform. + # + # @see WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + end + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute ad_format + # + # @return [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat, nil] + required :ad_format, + enum: -> { WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat }, + nil?: true + + # @!attribute ad_name + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :ad_name, String, nil?: true + + # @!attribute ad_text + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :ad_text, String, nil?: true + + # @!attribute call_to_action + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @return [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction, nil] + required :call_to_action, + enum: -> { WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction }, + nil?: true + + # @!attribute identity_authorized_bc_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_authorized_bc_id, String, nil?: true + + # @!attribute identity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_id, String, nil?: true + + # @!attribute identity_type + # + # @return [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType, nil] + required :identity_type, + enum: -> { WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType }, + nil?: true + + # @!attribute image_ids + # + # @return [Array, nil] + required :image_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute landing_page_url + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :landing_page_url, String, nil?: true + + # @!attribute platform + # The ad platform. + # + # @return [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :TiktokAdPlatformConfigType] + required :typename, const: :TiktokAdPlatformConfigType + + # @!attribute video_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :video_id, String, nil?: true + + # @!method initialize(ad_format:, ad_name:, ad_text:, call_to_action:, identity_authorized_bc_id:, identity_id:, identity_type:, image_ids:, landing_page_url:, platform:, video_id:, typename: :TiktokAdPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType} + # for more details. + # + # TikTok ad configuration. + # + # @param ad_format [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat, nil] + # + # @param ad_name [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param ad_text [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param call_to_action [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction, nil] TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @param identity_authorized_bc_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_type [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType, nil] + # + # @param image_ids [Array, nil] + # + # @param landing_page_url [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform] The ad platform. + # + # @param video_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param typename [Symbol, :TiktokAdPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType#ad_format + module AdFormat + extend WhopSDK::Internal::Type::Enum + + SINGLE_IMAGE = :SINGLE_IMAGE + SINGLE_VIDEO = :SINGLE_VIDEO + CAROUSEL_ADS = :CAROUSEL_ADS + CATALOG_CAROUSEL = :CATALOG_CAROUSEL + LIVE_CONTENT = :LIVE_CONTENT + + # @!method self.values + # @return [Array] + end + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @see WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType#call_to_action + module CallToAction + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE = :LEARN_MORE + DOWNLOAD = :DOWNLOAD + SHOP_NOW = :SHOP_NOW + SIGN_UP = :SIGN_UP + CONTACT_US = :CONTACT_US + APPLY_NOW = :APPLY_NOW + BOOK_NOW = :BOOK_NOW + PLAY_GAME = :PLAY_GAME + WATCH_NOW = :WATCH_NOW + READ_MORE = :READ_MORE + VIEW_NOW = :VIEW_NOW + GET_QUOTE = :GET_QUOTE + ORDER_NOW = :ORDER_NOW + INSTALL_NOW = :INSTALL_NOW + GET_SHOWTIMES = :GET_SHOWTIMES + LISTEN_NOW = :LISTEN_NOW + INTERESTED = :INTERESTED + SUBSCRIBE = :SUBSCRIBE + GET_TICKETS_NOW = :GET_TICKETS_NOW + EXPERIENCE_NOW = :EXPERIENCE_NOW + PRE_ORDER_NOW = :PRE_ORDER_NOW + VISIT_STORE = :VISIT_STORE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType#identity_type + module IdentityType + extend WhopSDK::Internal::Type::Enum + + CUSTOMIZED_USER = :CUSTOMIZED_USER + AUTH_CODE = :AUTH_CODE + TT_USER = :TT_USER + BC_AUTH_TT = :BC_AUTH_TT + + # @!method self.values + # @return [Array] + end + + # The ad platform. + # + # @see WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType)] + end + + # Current status of the ad. + # + # @see WhopSDK::Models::AdCreateResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_group_create_params.rb b/lib/whop_sdk/models/ad_group_create_params.rb new file mode 100644 index 00000000..ca486105 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_create_params.rb @@ -0,0 +1,3208 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#create + class AdGroupCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute campaign_id + # The ad campaign to create this ad group within. + # + # @return [String] + required :campaign_id, String + + # @!attribute budget + # Budget amount in dollars. + # + # @return [Float, nil] + optional :budget, Float, nil?: true + + # @!attribute budget_type + # The budget type for an ad campaign or ad group. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::BudgetType, nil] + optional :budget_type, enum: -> { WhopSDK::AdGroupCreateParams::BudgetType }, nil?: true + + # @!attribute config + # Unified ad group configuration (bidding, optimization, targeting). + # + # @return [WhopSDK::Models::AdGroupCreateParams::Config, nil] + optional :config, -> { WhopSDK::AdGroupCreateParams::Config }, nil?: true + + # @!attribute daily_budget + # Daily budget in dollars. + # + # @return [Float, nil] + optional :daily_budget, Float, nil?: true + + # @!attribute name + # Human-readable ad group name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute platform_config + # Platform-specific ad group configuration. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig, nil] + optional :platform_config, -> { WhopSDK::AdGroupCreateParams::PlatformConfig }, nil?: true + + # @!attribute status + # The status of an external ad group. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::Status, nil] + optional :status, enum: -> { WhopSDK::AdGroupCreateParams::Status }, nil?: true + + # @!method initialize(campaign_id:, budget: nil, budget_type: nil, config: nil, daily_budget: nil, name: nil, platform_config: nil, status: nil, request_options: {}) + # @param campaign_id [String] The ad campaign to create this ad group within. + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdGroupCreateParams::BudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param config [WhopSDK::Models::AdGroupCreateParams::Config, nil] Unified ad group configuration (bidding, optimization, targeting). + # + # @param daily_budget [Float, nil] Daily budget in dollars. + # + # @param name [String, nil] Human-readable ad group name. + # + # @param platform_config [WhopSDK::Models::AdGroupCreateParams::PlatformConfig, nil] Platform-specific ad group configuration. + # + # @param status [Symbol, WhopSDK::Models::AdGroupCreateParams::Status, nil] The status of an external ad group. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The budget type for an ad campaign or ad group. + module BudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY = :daily + LIFETIME = :lifetime + + # @!method self.values + # @return [Array] + end + + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @return [Integer, nil] + optional :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::BidStrategy, nil] + optional :bid_strategy, enum: -> { WhopSDK::AdGroupCreateParams::Config::BidStrategy }, nil?: true + + # @!attribute billing_event + # How you are billed (e.g., impressions, clicks). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::BillingEvent, nil] + optional :billing_event, enum: -> { WhopSDK::AdGroupCreateParams::Config::BillingEvent }, nil?: true + + # @!attribute end_time + # Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @return [String, nil] + optional :end_time, String, nil?: true + + # @!attribute frequency_cap + # Maximum number of times to show ads to each person in the frequency interval. + # + # @return [Integer, nil] + optional :frequency_cap, Integer, nil?: true + + # @!attribute frequency_cap_interval_days + # Number of days for the frequency cap interval. + # + # @return [Integer, nil] + optional :frequency_cap_interval_days, Integer, nil?: true + + # @!attribute optimization_goal + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::OptimizationGoal, nil] + optional :optimization_goal, + enum: -> { WhopSDK::AdGroupCreateParams::Config::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # Budget pacing: standard (even) or accelerated (fast). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::Pacing, nil] + optional :pacing, enum: -> { WhopSDK::AdGroupCreateParams::Config::Pacing }, nil?: true + + # @!attribute start_time + # Scheduled start time (ISO8601). + # + # @return [String, nil] + optional :start_time, String, nil?: true + + # @!attribute targeting + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @return [WhopSDK::Models::AdGroupCreateParams::Config::Targeting, nil] + optional :targeting, -> { WhopSDK::AdGroupCreateParams::Config::Targeting }, nil?: true + + # @!method initialize(bid_amount: nil, bid_strategy: nil, billing_event: nil, end_time: nil, frequency_cap: nil, frequency_cap_interval_days: nil, optimization_goal: nil, pacing: nil, start_time: nil, targeting: nil) + # Unified ad group configuration (bidding, optimization, targeting). + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::BidStrategy, nil] Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::BillingEvent, nil] How you are billed (e.g., impressions, clicks). + # + # @param end_time [String, nil] Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @param frequency_cap [Integer, nil] Maximum number of times to show ads to each person in the frequency interval. + # + # @param frequency_cap_interval_days [Integer, nil] Number of days for the frequency cap interval. + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::OptimizationGoal, nil] What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::Pacing, nil] Budget pacing: standard (even) or accelerated (fast). + # + # @param start_time [String, nil] Scheduled start time (ISO8601). + # + # @param targeting [WhopSDK::Models::AdGroupCreateParams::Config::Targeting, nil] Audience targeting settings (demographics, geo, interests, audiences, devices). + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @see WhopSDK::Models::AdGroupCreateParams::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # How you are billed (e.g., impressions, clicks). + # + # @see WhopSDK::Models::AdGroupCreateParams::Config#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS = :impressions + CLICKS = :clicks + OPTIMIZED_CPM = :optimized_cpm + VIDEO_VIEWS = :video_views + + # @!method self.values + # @return [Array] + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @see WhopSDK::Models::AdGroupCreateParams::Config#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS = :conversions + LINK_CLICKS = :link_clicks + LANDING_PAGE_VIEWS = :landing_page_views + REACH = :reach + IMPRESSIONS = :impressions + APP_INSTALLS = :app_installs + VIDEO_VIEWS = :video_views + LEAD_GENERATION = :lead_generation + VALUE = :value + PAGE_LIKES = :page_likes + CONVERSATIONS = :conversations + AD_RECALL_LIFT = :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :two_second_continuous_video_views + POST_ENGAGEMENT = :post_engagement + EVENT_RESPONSES = :event_responses + REMINDERS_SET = :reminders_set + QUALITY_LEAD = :quality_lead + + # @!method self.values + # @return [Array] + end + + # Budget pacing: standard (even) or accelerated (fast). + # + # @see WhopSDK::Models::AdGroupCreateParams::Config#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD = :standard + ACCELERATED = :accelerated + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::Config#targeting + class Targeting < WhopSDK::Internal::Type::BaseModel + # @!attribute age_max + # Maximum age for demographic targeting. + # + # @return [Integer, nil] + optional :age_max, Integer, nil?: true + + # @!attribute age_min + # Minimum age for demographic targeting. + # + # @return [Integer, nil] + optional :age_min, Integer, nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes to target. + # + # @return [Array, nil] + optional :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute device_platforms + # Device platforms to target. + # + # @return [Array, nil] + optional :device_platforms, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupCreateParams::Config::Targeting::DevicePlatform] + }, + nil?: true + + # @!attribute exclude_audience_ids + # Platform audience IDs to exclude. + # + # @return [Array, nil] + optional :exclude_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute genders + # Genders to target. + # + # @return [Array, nil] + optional :genders, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupCreateParams::Config::Targeting::Gender] + }, + nil?: true + + # @!attribute include_audience_ids + # Platform audience IDs to include. + # + # @return [Array, nil] + optional :include_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute interest_ids + # Platform-specific interest IDs to target. + # + # @return [Array, nil] + optional :interest_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute languages + # Language codes to target. + # + # @return [Array, nil] + optional :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute placement_type + # Placement strategy for ad delivery. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::Targeting::PlacementType, nil] + optional :placement_type, + enum: -> { WhopSDK::AdGroupCreateParams::Config::Targeting::PlacementType }, + nil?: true + + # @!method initialize(age_max: nil, age_min: nil, countries: nil, device_platforms: nil, exclude_audience_ids: nil, genders: nil, include_audience_ids: nil, interest_ids: nil, languages: nil, placement_type: nil) + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @param age_max [Integer, nil] Maximum age for demographic targeting. + # + # @param age_min [Integer, nil] Minimum age for demographic targeting. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes to target. + # + # @param device_platforms [Array, nil] Device platforms to target. + # + # @param exclude_audience_ids [Array, nil] Platform audience IDs to exclude. + # + # @param genders [Array, nil] Genders to target. + # + # @param include_audience_ids [Array, nil] Platform audience IDs to include. + # + # @param interest_ids [Array, nil] Platform-specific interest IDs to target. + # + # @param languages [Array, nil] Language codes to target. + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupCreateParams::Config::Targeting::PlacementType, nil] Placement strategy for ad delivery. + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE = :mobile + DESKTOP = :desktop + + # @!method self.values + # @return [Array] + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE = :male + FEMALE = :female + ALL = :all + + # @!method self.values + # @return [Array] + end + + # Placement strategy for ad delivery. + # + # @see WhopSDK::Models::AdGroupCreateParams::Config::Targeting#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC = :automatic + MANUAL = :manual + + # @!method self.values + # @return [Array] + end + end + end + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + # @!attribute meta + # Meta (Facebook/Instagram) ad set configuration. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta, nil] + optional :meta, -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta }, nil?: true + + # @!attribute tiktok + # TikTok ad group configuration. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok, nil] + optional :tiktok, -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok }, nil?: true + + # @!method initialize(meta: nil, tiktok: nil) + # Platform-specific ad group configuration. + # + # @param meta [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta, nil] Meta (Facebook/Instagram) ad set configuration. + # + # @param tiktok [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok, nil] TikTok ad group configuration. + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig#meta + class Meta < WhopSDK::Internal::Type::BaseModel + # @!attribute android_devices + # + # @return [Array, nil] + optional :android_devices, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute attribution_setting + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :attribution_setting, String, nil?: true + + # @!attribute attribution_spec + # Conversion attribution windows. + # + # @return [Array, nil] + optional :attribution_spec, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec] + }, + nil?: true + + # @!attribute audience_network_positions + # + # @return [Array, nil] + optional :audience_network_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute audience_type + # Audience type for retargeting. + # + # @return [String, nil] + optional :audience_type, String, nil?: true + + # @!attribute bid_amount + # Bid amount in cents. + # + # @return [Integer, nil] + optional :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # Meta bid strategy. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy, nil] + optional :bid_strategy, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy }, + nil?: true + + # @!attribute billing_event + # How you are billed on Meta. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent, nil] + optional :billing_event, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent }, + nil?: true + + # @!attribute brand_safety_content_filter_levels + # + # @return [Array, nil] + optional :brand_safety_content_filter_levels, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute budget_remaining + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :budget_remaining, String, nil?: true + + # @!attribute cost_per_result_goal + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + optional :cost_per_result_goal, Float, nil?: true + + # @!attribute created_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :created_time, String, nil?: true + + # @!attribute daily_budget + # Daily budget in cents. + # + # @return [Integer, nil] + optional :daily_budget, Integer, nil?: true + + # @!attribute daily_min_spend_target + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :daily_min_spend_target, String, nil?: true + + # @!attribute daily_spend_cap + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :daily_spend_cap, String, nil?: true + + # @!attribute destination_type + # Where ads in this ad set direct people. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::DestinationType, nil] + optional :destination_type, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType }, + nil?: true + + # @!attribute dsa_beneficiary + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :dsa_beneficiary, String, nil?: true + + # @!attribute dsa_payor + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :dsa_payor, String, nil?: true + + # @!attribute end_time + # End time (ISO8601). Required for lifetime budgets. + # + # @return [String, nil] + optional :end_time, String, nil?: true + + # @!attribute excluded_geo_locations + # Geo locations to exclude. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations, nil] + optional :excluded_geo_locations, + -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations }, + nil?: true + + # @!attribute facebook_positions + # Facebook ad placements (feed, reels, stories, etc.). + # + # @return [Array, nil] + optional :facebook_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute frequency_control_count + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :frequency_control_count, Integer, nil?: true + + # @!attribute frequency_control_days + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :frequency_control_days, Integer, nil?: true + + # @!attribute frequency_control_type + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :frequency_control_type, String, nil?: true + + # @!attribute geo_cities + # + # @return [Array, nil] + optional :geo_cities, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity] + }, + nil?: true + + # @!attribute geo_locations + # Geo targeting (countries, regions, cities, zips). + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations, nil] + optional :geo_locations, + -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations }, + nil?: true + + # @!attribute geo_regions + # + # @return [Array, nil] + optional :geo_regions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion] + }, + nil?: true + + # @!attribute geo_zips + # + # @return [Array, nil] + optional :geo_zips, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute instagram_actor_id + # Instagram account ID for this ad set. + # + # @return [String, nil] + optional :instagram_actor_id, String, nil?: true + + # @!attribute instagram_positions + # Instagram ad placements (stream, story, reels, etc.). + # + # @return [Array, nil] + optional :instagram_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute ios_devices + # + # @return [Array, nil] + optional :ios_devices, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute is_dynamic_creative + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :is_dynamic_creative, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute lead_conversion_location + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation, nil] + optional :lead_conversion_location, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation }, + nil?: true + + # @!attribute lead_form_config + # Configuration for a Meta lead gen instant form. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig, nil] + optional :lead_form_config, + -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig }, + nil?: true + + # @!attribute lead_gen_form_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :lead_gen_form_id, String, nil?: true + + # @!attribute lifetime_budget + # Lifetime budget in cents. + # + # @return [Integer, nil] + optional :lifetime_budget, Integer, nil?: true + + # @!attribute lifetime_min_spend_target + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :lifetime_min_spend_target, String, nil?: true + + # @!attribute lifetime_spend_cap + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :lifetime_spend_cap, String, nil?: true + + # @!attribute location_types + # + # @return [Array, nil] + optional :location_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute messenger_positions + # + # @return [Array, nil] + optional :messenger_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute optimization_goal + # What this ad set optimizes for on Meta. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal, nil] + optional :optimization_goal, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal }, + nil?: true + + # @!attribute page_id + # Facebook Page ID for this ad set. + # + # @return [String, nil] + optional :page_id, String, nil?: true + + # @!attribute pixel_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :pixel_id, String, nil?: true + + # @!attribute promoted_object + # The object this ad set promotes (pixel, page, etc.). + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject, nil] + optional :promoted_object, + -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject }, + nil?: true + + # @!attribute publisher_platforms + # Platforms to publish on (facebook, instagram, messenger, audience_network). + # + # @return [Array, nil] + optional :publisher_platforms, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute source_adset_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :source_adset_id, String, nil?: true + + # @!attribute start_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :start_time, String, nil?: true + + # @!attribute status + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::Status, nil] + optional :status, + enum: -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::Status + }, + nil?: true + + # @!attribute targeting_automation + # Advantage+ audience expansion settings. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation, nil] + optional :targeting_automation, + -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation }, + nil?: true + + # @!attribute threads_positions + # + # @return [Array, nil] + optional :threads_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute updated_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :updated_time, String, nil?: true + + # @!attribute user_device + # + # @return [Array, nil] + optional :user_device, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute user_os + # + # @return [Array, nil] + optional :user_os, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute whatsapp_phone_number + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :whatsapp_phone_number, String, nil?: true + + # @!attribute whatsapp_positions + # + # @return [Array, nil] + optional :whatsapp_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!method initialize(android_devices: nil, attribution_setting: nil, attribution_spec: nil, audience_network_positions: nil, audience_type: nil, bid_amount: nil, bid_strategy: nil, billing_event: nil, brand_safety_content_filter_levels: nil, budget_remaining: nil, cost_per_result_goal: nil, created_time: nil, daily_budget: nil, daily_min_spend_target: nil, daily_spend_cap: nil, destination_type: nil, dsa_beneficiary: nil, dsa_payor: nil, end_time: nil, excluded_geo_locations: nil, facebook_positions: nil, frequency_control_count: nil, frequency_control_days: nil, frequency_control_type: nil, geo_cities: nil, geo_locations: nil, geo_regions: nil, geo_zips: nil, instagram_actor_id: nil, instagram_positions: nil, ios_devices: nil, is_dynamic_creative: nil, lead_conversion_location: nil, lead_form_config: nil, lead_gen_form_id: nil, lifetime_budget: nil, lifetime_min_spend_target: nil, lifetime_spend_cap: nil, location_types: nil, messenger_positions: nil, optimization_goal: nil, page_id: nil, pixel_id: nil, promoted_object: nil, publisher_platforms: nil, source_adset_id: nil, start_time: nil, status: nil, targeting_automation: nil, threads_positions: nil, updated_time: nil, user_device: nil, user_os: nil, whatsapp_phone_number: nil, whatsapp_positions: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta} for more details. + # + # Meta (Facebook/Instagram) ad set configuration. + # + # @param android_devices [Array, nil] + # + # @param attribution_setting [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param attribution_spec [Array, nil] Conversion attribution windows. + # + # @param audience_network_positions [Array, nil] + # + # @param audience_type [String, nil] Audience type for retargeting. + # + # @param bid_amount [Integer, nil] Bid amount in cents. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy, nil] Meta bid strategy. + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent, nil] How you are billed on Meta. + # + # @param brand_safety_content_filter_levels [Array, nil] + # + # @param budget_remaining [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param cost_per_result_goal [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param created_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param daily_budget [Integer, nil] Daily budget in cents. + # + # @param daily_min_spend_target [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param daily_spend_cap [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param destination_type [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::DestinationType, nil] Where ads in this ad set direct people. + # + # @param dsa_beneficiary [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param dsa_payor [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param end_time [String, nil] End time (ISO8601). Required for lifetime budgets. + # + # @param excluded_geo_locations [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations, nil] Geo locations to exclude. + # + # @param facebook_positions [Array, nil] Facebook ad placements (feed, reels, stories, etc.). + # + # @param frequency_control_count [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param frequency_control_days [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param frequency_control_type [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param geo_cities [Array, nil] + # + # @param geo_locations [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations, nil] Geo targeting (countries, regions, cities, zips). + # + # @param geo_regions [Array, nil] + # + # @param geo_zips [Array, nil] + # + # @param instagram_actor_id [String, nil] Instagram account ID for this ad set. + # + # @param instagram_positions [Array, nil] Instagram ad placements (stream, story, reels, etc.). + # + # @param ios_devices [Array, nil] + # + # @param is_dynamic_creative [Boolean, nil] Represents `true` or `false` values. + # + # @param lead_conversion_location [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation, nil] + # + # @param lead_form_config [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig, nil] Configuration for a Meta lead gen instant form. + # + # @param lead_gen_form_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param lifetime_budget [Integer, nil] Lifetime budget in cents. + # + # @param lifetime_min_spend_target [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param lifetime_spend_cap [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param location_types [Array, nil] + # + # @param messenger_positions [Array, nil] + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal, nil] What this ad set optimizes for on Meta. + # + # @param page_id [String, nil] Facebook Page ID for this ad set. + # + # @param pixel_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param promoted_object [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject, nil] The object this ad set promotes (pixel, page, etc.). + # + # @param publisher_platforms [Array, nil] Platforms to publish on (facebook, instagram, messenger, audience_network). + # + # @param source_adset_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param start_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param status [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::Status, nil] + # + # @param targeting_automation [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation, nil] Advantage+ audience expansion settings. + # + # @param threads_positions [Array, nil] + # + # @param updated_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param user_device [Array, nil] + # + # @param user_os [Array, nil] + # + # @param whatsapp_phone_number [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param whatsapp_positions [Array, nil] + + class AttributionSpec < WhopSDK::Internal::Type::BaseModel + # @!attribute event_type + # Attribution event type (e.g., CLICK_THROUGH, VIEW_THROUGH). + # + # @return [String] + required :event_type, String + + # @!attribute window_days + # Attribution window in days (1, 7, 28). + # + # @return [Integer] + required :window_days, Integer + + # @!method initialize(event_type:, window_days:) + # Meta conversion attribution window. + # + # @param event_type [String] Attribution event type (e.g., CLICK_THROUGH, VIEW_THROUGH). + # + # @param window_days [Integer] Attribution window in days (1, 7, 28). + end + + # Meta bid strategy. + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP = :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP = :LOWEST_COST_WITH_BID_CAP + COST_CAP = :COST_CAP + LOWEST_COST_WITH_MIN_ROAS = :LOWEST_COST_WITH_MIN_ROAS + + # @!method self.values + # @return [Array] + end + + # How you are billed on Meta. + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS = :APP_INSTALLS + CLICKS = :CLICKS + IMPRESSIONS = :IMPRESSIONS + LINK_CLICKS = :LINK_CLICKS + NONE = :NONE + OFFER_CLAIMS = :OFFER_CLAIMS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + THRUPLAY = :THRUPLAY + PURCHASE = :PURCHASE + LISTING_INTERACTION = :LISTING_INTERACTION + + # @!method self.values + # @return [Array] + end + + # Where ads in this ad set direct people. + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#destination_type + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED = :UNDEFINED + WEBSITE = :WEBSITE + APP = :APP + FACEBOOK = :FACEBOOK + MESSENGER = :MESSENGER + WHATSAPP = :WHATSAPP + INSTAGRAM_DIRECT = :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE = :INSTAGRAM_PROFILE + PHONE_CALL = :PHONE_CALL + SHOP_AUTOMATIC = :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC = :APPLINKS_AUTOMATIC + ON_AD = :ON_AD + ON_POST = :ON_POST + ON_VIDEO = :ON_VIDEO + ON_PAGE = :ON_PAGE + ON_EVENT = :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP = :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE = :FACEBOOK_PAGE + INSTAGRAM_LIVE = :INSTAGRAM_LIVE + FACEBOOK_LIVE = :FACEBOOK_LIVE + IMAGINE = :IMAGINE + LEAD_FROM_IG_DIRECT = :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER = :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM = :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL = :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL = :BROADCAST_CHANNEL + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#excluded_geo_locations + class ExcludedGeoLocations < WhopSDK::Internal::Type::BaseModel + # @!attribute cities + # City targets. + # + # @return [Array, nil] + optional :cities, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City] + }, + nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes. + # + # @return [Array, nil] + optional :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute location_types + # Location types (home, recent, travel_in). + # + # @return [Array, nil] + optional :location_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute regions + # Region/state targets. + # + # @return [Array, nil] + optional :regions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region] + }, + nil?: true + + # @!attribute zips + # Zip/postal code targets. + # + # @return [Array, nil] + optional :zips, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip] + }, + nil?: true + + # @!method initialize(cities: nil, countries: nil, location_types: nil, regions: nil, zips: nil) + # Geo locations to exclude. + # + # @param cities [Array, nil] City targets. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes. + # + # @param location_types [Array, nil] Location types (home, recent, travel_in). + # + # @param regions [Array, nil] Region/state targets. + # + # @param zips [Array, nil] Zip/postal code targets. + + class City < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + class Region < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + class Zip < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + end + + class GeoCity < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#geo_locations + class GeoLocations < WhopSDK::Internal::Type::BaseModel + # @!attribute cities + # City targets. + # + # @return [Array, nil] + optional :cities, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City] + }, + nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes. + # + # @return [Array, nil] + optional :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute location_types + # Location types (home, recent, travel_in). + # + # @return [Array, nil] + optional :location_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute regions + # Region/state targets. + # + # @return [Array, nil] + optional :regions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region] + }, + nil?: true + + # @!attribute zips + # Zip/postal code targets. + # + # @return [Array, nil] + optional :zips, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip] + }, + nil?: true + + # @!method initialize(cities: nil, countries: nil, location_types: nil, regions: nil, zips: nil) + # Geo targeting (countries, regions, cities, zips). + # + # @param cities [Array, nil] City targets. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes. + # + # @param location_types [Array, nil] Location types (home, recent, travel_in). + # + # @param regions [Array, nil] Region/state targets. + # + # @param zips [Array, nil] Zip/postal code targets. + + class City < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + class Region < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + class Zip < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + end + + class GeoRegion < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#lead_conversion_location + module LeadConversionLocation + extend WhopSDK::Internal::Type::Enum + + WEBSITE = :website + INSTANT_FORMS = :instant_forms + MESSENGER = :messenger + INSTAGRAM = :instagram + CALLS = :calls + APP = :app + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#lead_form_config + class LeadFormConfig < WhopSDK::Internal::Type::BaseModel + # @!attribute name + # Name of the lead form. + # + # @return [String] + required :name, String + + # @!attribute privacy_policy_url + # URL to your privacy policy. Required by Meta. + # + # @return [String] + required :privacy_policy_url, String + + # @!attribute questions + # Questions to ask on the form. + # + # @return [Array] + required :questions, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question] } + + # @!attribute background_image_source + # Background image source: from_ad or custom. + # + # @return [String, nil] + optional :background_image_source, String, nil?: true + + # @!attribute background_image_url + # URL of custom background image. + # + # @return [String, nil] + optional :background_image_url, String, nil?: true + + # @!attribute conditional_logic_enabled + # Whether conditional logic is enabled for questions. + # + # @return [Boolean, nil] + optional :conditional_logic_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute context_card_button_text + # CTA button text on the greeting card. + # + # @return [String, nil] + optional :context_card_button_text, String, nil?: true + + # @!attribute context_card_content + # Optional greeting card bullet points. + # + # @return [Array, nil] + optional :context_card_content, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute context_card_style + # Greeting layout: PARAGRAPH_STYLE or LIST_STYLE. + # + # @return [String, nil] + optional :context_card_style, String, nil?: true + + # @!attribute context_card_title + # Optional greeting card title. + # + # @return [String, nil] + optional :context_card_title, String, nil?: true + + # @!attribute custom_disclaimer_body + # Custom disclaimer body text. + # + # @return [String, nil] + optional :custom_disclaimer_body, String, nil?: true + + # @!attribute custom_disclaimer_checkboxes + # Consent checkboxes for the custom disclaimer. + # + # @return [Array, nil] + optional :custom_disclaimer_checkboxes, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox] + }, + nil?: true + + # @!attribute custom_disclaimer_title + # Custom disclaimer section title. + # + # @return [String, nil] + optional :custom_disclaimer_title, String, nil?: true + + # @!attribute form_type + # Form type: more_volume, higher_intent, or rich_creative. + # + # @return [String, nil] + optional :form_type, String, nil?: true + + # @!attribute messenger_enabled + # Enable Messenger follow-up after form submission. + # + # @return [Boolean, nil] + optional :messenger_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute phone_verification_enabled + # Require phone number verification via OTP (higher_intent only). + # + # @return [Boolean, nil] + optional :phone_verification_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute privacy_policy_link_text + # Custom link text for privacy policy (max 70 chars). + # + # @return [String, nil] + optional :privacy_policy_link_text, String, nil?: true + + # @!attribute question_page_custom_headline + # Custom headline for the questions page. + # + # @return [String, nil] + optional :question_page_custom_headline, String, nil?: true + + # @!attribute rich_creative_headline + # Headline for rich creative form intro. + # + # @return [String, nil] + optional :rich_creative_headline, String, nil?: true + + # @!attribute rich_creative_overview + # Overview description for rich creative form intro. + # + # @return [String, nil] + optional :rich_creative_overview, String, nil?: true + + # @!attribute rich_creative_url + # Uploaded image URL for rich creative form type. + # + # @return [String, nil] + optional :rich_creative_url, String, nil?: true + + # @!attribute thank_you_pages + # Thank you / ending pages (supports multiple for conditional routing). + # + # @return [Array, nil] + optional :thank_you_pages, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage] + }, + nil?: true + + # @!method initialize(name:, privacy_policy_url:, questions:, background_image_source: nil, background_image_url: nil, conditional_logic_enabled: nil, context_card_button_text: nil, context_card_content: nil, context_card_style: nil, context_card_title: nil, custom_disclaimer_body: nil, custom_disclaimer_checkboxes: nil, custom_disclaimer_title: nil, form_type: nil, messenger_enabled: nil, phone_verification_enabled: nil, privacy_policy_link_text: nil, question_page_custom_headline: nil, rich_creative_headline: nil, rich_creative_overview: nil, rich_creative_url: nil, thank_you_pages: nil) + # Configuration for a Meta lead gen instant form. + # + # @param name [String] Name of the lead form. + # + # @param privacy_policy_url [String] URL to your privacy policy. Required by Meta. + # + # @param questions [Array] Questions to ask on the form. + # + # @param background_image_source [String, nil] Background image source: from_ad or custom. + # + # @param background_image_url [String, nil] URL of custom background image. + # + # @param conditional_logic_enabled [Boolean, nil] Whether conditional logic is enabled for questions. + # + # @param context_card_button_text [String, nil] CTA button text on the greeting card. + # + # @param context_card_content [Array, nil] Optional greeting card bullet points. + # + # @param context_card_style [String, nil] Greeting layout: PARAGRAPH_STYLE or LIST_STYLE. + # + # @param context_card_title [String, nil] Optional greeting card title. + # + # @param custom_disclaimer_body [String, nil] Custom disclaimer body text. + # + # @param custom_disclaimer_checkboxes [Array, nil] Consent checkboxes for the custom disclaimer. + # + # @param custom_disclaimer_title [String, nil] Custom disclaimer section title. + # + # @param form_type [String, nil] Form type: more_volume, higher_intent, or rich_creative. + # + # @param messenger_enabled [Boolean, nil] Enable Messenger follow-up after form submission. + # + # @param phone_verification_enabled [Boolean, nil] Require phone number verification via OTP (higher_intent only). + # + # @param privacy_policy_link_text [String, nil] Custom link text for privacy policy (max 70 chars). + # + # @param question_page_custom_headline [String, nil] Custom headline for the questions page. + # + # @param rich_creative_headline [String, nil] Headline for rich creative form intro. + # + # @param rich_creative_overview [String, nil] Overview description for rich creative form intro. + # + # @param rich_creative_url [String, nil] Uploaded image URL for rich creative form type. + # + # @param thank_you_pages [Array, nil] Thank you / ending pages (supports multiple for conditional routing). + + class Question < WhopSDK::Internal::Type::BaseModel + # @!attribute type + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + # + # @return [String] + required :type, String + + # @!attribute conditional_questions_group_id + # Group ID for conditional question routing. + # + # @return [String, nil] + optional :conditional_questions_group_id, String, nil?: true + + # @!attribute dependent_conditional_questions + # Questions shown conditionally based on this question's answer. + # + # @return [Array, nil] + optional :dependent_conditional_questions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion] + }, + nil?: true + + # @!attribute inline_context + # Helper text shown below the question. + # + # @return [String, nil] + optional :inline_context, String, nil?: true + + # @!attribute key + # Unique key for this question. + # + # @return [String, nil] + optional :key, String, nil?: true + + # @!attribute label + # Custom label for CUSTOM questions. + # + # @return [String, nil] + optional :label, String, nil?: true + + # @!attribute options + # Answer options for multiple choice CUSTOM questions. + # + # @return [Array, nil] + optional :options, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option] + }, + nil?: true + + # @!attribute question_format + # UI hint: short_answer, multiple_choice, or appointment. + # + # @return [String, nil] + optional :question_format, String, nil?: true + + # @!method initialize(type:, conditional_questions_group_id: nil, dependent_conditional_questions: nil, inline_context: nil, key: nil, label: nil, options: nil, question_format: nil) + # A question on a Meta lead gen form. + # + # @param type [String] Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + # + # @param conditional_questions_group_id [String, nil] Group ID for conditional question routing. + # + # @param dependent_conditional_questions [Array, nil] Questions shown conditionally based on this question's answer. + # + # @param inline_context [String, nil] Helper text shown below the question. + # + # @param key [String, nil] Unique key for this question. + # + # @param label [String, nil] Custom label for CUSTOM questions. + # + # @param options [Array, nil] Answer options for multiple choice CUSTOM questions. + # + # @param question_format [String, nil] UI hint: short_answer, multiple_choice, or appointment. + + class DependentConditionalQuestion < WhopSDK::Internal::Type::BaseModel + # @!attribute type + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + # + # @return [String] + required :type, String + + # @!attribute inline_context + # Helper text shown below the question. + # + # @return [String, nil] + optional :inline_context, String, nil?: true + + # @!attribute key + # Unique key for this question. + # + # @return [String, nil] + optional :key, String, nil?: true + + # @!attribute label + # Custom label for CUSTOM questions. + # + # @return [String, nil] + optional :label, String, nil?: true + + # @!attribute options + # Answer options for multiple choice questions. + # + # @return [Array, nil] + optional :options, + -> do + WhopSDK::Internal::Type::ArrayOf[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option + ] + end, + nil?: true + + # @!method initialize(type:, inline_context: nil, key: nil, label: nil, options: nil) + # A dependent conditional question (non-recursive to avoid schema recursion). + # + # @param type [String] Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + # + # @param inline_context [String, nil] Helper text shown below the question. + # + # @param key [String, nil] Unique key for this question. + # + # @param label [String, nil] Custom label for CUSTOM questions. + # + # @param options [Array, nil] Answer options for multiple choice questions. + + class Option < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Unique key for this option. + # + # @return [String] + required :key, String + + # @!attribute value + # Display text for this option. + # + # @return [String] + required :value, String + + # @!attribute logic + # Conditional logic routing for this answer option. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic, nil] + optional :logic, + -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic + }, + nil?: true + + # @!method initialize(key:, value:, logic: nil) + # An answer option for a multiple choice lead form question. + # + # @param key [String] Unique key for this option. + # + # @param value [String] Display text for this option. + # + # @param logic [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic, nil] Conditional logic routing for this answer option. + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option#logic + class Logic < WhopSDK::Internal::Type::BaseModel + # @!attribute type + # Logic type: go_to_question, submit_form, or close_form. + # + # @return [String] + required :type, String + + # @!attribute target_end_page_index + # Index of the end page to route to (for submit_form type). + # + # @return [Integer, nil] + optional :target_end_page_index, Integer, nil?: true + + # @!attribute target_question_index + # Index of the question to route to (for go_to_question type). + # + # @return [Integer, nil] + optional :target_question_index, Integer, nil?: true + + # @!method initialize(type:, target_end_page_index: nil, target_question_index: nil) + # Conditional logic routing for this answer option. + # + # @param type [String] Logic type: go_to_question, submit_form, or close_form. + # + # @param target_end_page_index [Integer, nil] Index of the end page to route to (for submit_form type). + # + # @param target_question_index [Integer, nil] Index of the question to route to (for go_to_question type). + end + end + end + + class Option < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Unique key for this option. + # + # @return [String] + required :key, String + + # @!attribute value + # Display text for this option. + # + # @return [String] + required :value, String + + # @!attribute logic + # Conditional logic routing for this answer option. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic, nil] + optional :logic, + -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic + }, + nil?: true + + # @!method initialize(key:, value:, logic: nil) + # An answer option for a multiple choice lead form question. + # + # @param key [String] Unique key for this option. + # + # @param value [String] Display text for this option. + # + # @param logic [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic, nil] Conditional logic routing for this answer option. + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option#logic + class Logic < WhopSDK::Internal::Type::BaseModel + # @!attribute type + # Logic type: go_to_question, submit_form, or close_form. + # + # @return [String] + required :type, String + + # @!attribute target_end_page_index + # Index of the end page to route to (for submit_form type). + # + # @return [Integer, nil] + optional :target_end_page_index, Integer, nil?: true + + # @!attribute target_question_index + # Index of the question to route to (for go_to_question type). + # + # @return [Integer, nil] + optional :target_question_index, Integer, nil?: true + + # @!method initialize(type:, target_end_page_index: nil, target_question_index: nil) + # Conditional logic routing for this answer option. + # + # @param type [String] Logic type: go_to_question, submit_form, or close_form. + # + # @param target_end_page_index [Integer, nil] Index of the end page to route to (for submit_form type). + # + # @param target_question_index [Integer, nil] Index of the question to route to (for go_to_question type). + end + end + end + + class CustomDisclaimerCheckbox < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Unique key for this checkbox. + # + # @return [String] + required :key, String + + # @!attribute text + # Label text for the checkbox. + # + # @return [String] + required :text, String + + # @!attribute is_checked_by_default + # Whether the checkbox is checked by default. + # + # @return [Boolean, nil] + optional :is_checked_by_default, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute is_required + # Whether the checkbox must be checked to submit. + # + # @return [Boolean, nil] + optional :is_required, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!method initialize(key:, text:, is_checked_by_default: nil, is_required: nil) + # A consent checkbox for the custom disclaimer section. + # + # @param key [String] Unique key for this checkbox. + # + # @param text [String] Label text for the checkbox. + # + # @param is_checked_by_default [Boolean, nil] Whether the checkbox is checked by default. + # + # @param is_required [Boolean, nil] Whether the checkbox must be checked to submit. + end + + class ThankYouPage < WhopSDK::Internal::Type::BaseModel + # @!attribute body + # Body text for this ending page. + # + # @return [String, nil] + optional :body, String, nil?: true + + # @!attribute business_phone + # Business phone number for call CTA. + # + # @return [String, nil] + optional :business_phone, String, nil?: true + + # @!attribute button_text + # Custom button text. + # + # @return [String, nil] + optional :button_text, String, nil?: true + + # @!attribute button_type + # CTA button type: VIEW_WEBSITE, CALL_BUSINESS, DOWNLOAD. + # + # @return [String, nil] + optional :button_type, String, nil?: true + + # @!attribute conditional_question_group_id + # Question group ID for conditional routing to this page. + # + # @return [String, nil] + optional :conditional_question_group_id, String, nil?: true + + # @!attribute enable_messenger + # Enable Messenger follow-up. + # + # @return [Boolean, nil] + optional :enable_messenger, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute gated_file_url + # Uploaded file URL for gated content download. + # + # @return [String, nil] + optional :gated_file_url, String, nil?: true + + # @!attribute link + # URL the button links to. + # + # @return [String, nil] + optional :link, String, nil?: true + + # @!attribute name + # Internal name for this ending page. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute title + # Headline for this ending page. + # + # @return [String, nil] + optional :title, String, nil?: true + + # @!method initialize(body: nil, business_phone: nil, button_text: nil, button_type: nil, conditional_question_group_id: nil, enable_messenger: nil, gated_file_url: nil, link: nil, name: nil, title: nil) + # A thank-you / ending page for a Meta lead gen form. + # + # @param body [String, nil] Body text for this ending page. + # + # @param business_phone [String, nil] Business phone number for call CTA. + # + # @param button_text [String, nil] Custom button text. + # + # @param button_type [String, nil] CTA button type: VIEW_WEBSITE, CALL_BUSINESS, DOWNLOAD. + # + # @param conditional_question_group_id [String, nil] Question group ID for conditional routing to this page. + # + # @param enable_messenger [Boolean, nil] Enable Messenger follow-up. + # + # @param gated_file_url [String, nil] Uploaded file URL for gated content download. + # + # @param link [String, nil] URL the button links to. + # + # @param name [String, nil] Internal name for this ending page. + # + # @param title [String, nil] Headline for this ending page. + end + end + + # What this ad set optimizes for on Meta. + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE = :NONE + APP_INSTALLS = :APP_INSTALLS + AD_RECALL_LIFT = :AD_RECALL_LIFT + ENGAGED_USERS = :ENGAGED_USERS + EVENT_RESPONSES = :EVENT_RESPONSES + IMPRESSIONS = :IMPRESSIONS + LEAD_GENERATION = :LEAD_GENERATION + QUALITY_LEAD = :QUALITY_LEAD + LINK_CLICKS = :LINK_CLICKS + OFFSITE_CONVERSIONS = :OFFSITE_CONVERSIONS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + QUALITY_CALL = :QUALITY_CALL + REACH = :REACH + LANDING_PAGE_VIEWS = :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE = :VISIT_INSTAGRAM_PROFILE + VALUE = :VALUE + THRUPLAY = :THRUPLAY + DERIVED_EVENTS = :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS = :CONVERSATIONS + IN_APP_VALUE = :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION = :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS = :SUBSCRIBERS + REMINDERS_SET = :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT = :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT = :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT = :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH = :ENGAGED_REACH + ENGAGED_PAGE_VIEWS = :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE = :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE = :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION = :MESSAGING_APPOINTMENT_CONVERSION + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#promoted_object + class PromotedObject < WhopSDK::Internal::Type::BaseModel + # @!attribute custom_conversion_id + # Custom conversion rule ID (numeric, from Meta Events Manager). + # + # @return [String, nil] + optional :custom_conversion_id, String, nil?: true + + # @!attribute custom_event_str + # Pixel event name, used when custom_event_type is OTHER. + # + # @return [String, nil] + optional :custom_event_str, String, nil?: true + + # @!attribute custom_event_type + # Custom event type (e.g., PURCHASE, COMPLETE_REGISTRATION, OTHER). + # + # @return [String, nil] + optional :custom_event_type, String, nil?: true + + # @!attribute page_id + # Facebook Page ID. + # + # @return [String, nil] + optional :page_id, String, nil?: true + + # @!attribute pixel_id + # Meta Pixel ID for conversion tracking. + # + # @return [String, nil] + optional :pixel_id, String, nil?: true + + # @!attribute whatsapp_phone_number + # WhatsApp phone number for messaging campaigns. + # + # @return [String, nil] + optional :whatsapp_phone_number, String, nil?: true + + # @!method initialize(custom_conversion_id: nil, custom_event_str: nil, custom_event_type: nil, page_id: nil, pixel_id: nil, whatsapp_phone_number: nil) + # The object this ad set promotes (pixel, page, etc.). + # + # @param custom_conversion_id [String, nil] Custom conversion rule ID (numeric, from Meta Events Manager). + # + # @param custom_event_str [String, nil] Pixel event name, used when custom_event_type is OTHER. + # + # @param custom_event_type [String, nil] Custom event type (e.g., PURCHASE, COMPLETE_REGISTRATION, OTHER). + # + # @param page_id [String, nil] Facebook Page ID. + # + # @param pixel_id [String, nil] Meta Pixel ID for conversion tracking. + # + # @param whatsapp_phone_number [String, nil] WhatsApp phone number for messaging campaigns. + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :ACTIVE + PAUSED = :PAUSED + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta#targeting_automation + class TargetingAutomation < WhopSDK::Internal::Type::BaseModel + # @!attribute advantage_audience + # 0 = off (use exact targeting), 1 = on (let Meta expand audience). + # + # @return [Integer, nil] + optional :advantage_audience, Integer, nil?: true + + # @!method initialize(advantage_audience: nil) + # Advantage+ audience expansion settings. + # + # @param advantage_audience [Integer, nil] 0 = off (use exact targeting), 1 = on (let Meta expand audience). + end + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig#tiktok + class Tiktok < WhopSDK::Internal::Type::BaseModel + # @!attribute actions + # + # @return [Array, nil] + optional :actions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action] + }, + nil?: true + + # @!attribute age_groups + # + # @return [Array, nil] + optional :age_groups, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup] + }, + nil?: true + + # @!attribute app_id + # App ID for app promotion campaigns. + # + # @return [String, nil] + optional :app_id, String, nil?: true + + # @!attribute attribution_event_count + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount, nil] + optional :attribution_event_count, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount }, + nil?: true + + # @!attribute audience_ids + # + # @return [Array, nil] + optional :audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute audience_rule + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + optional :audience_rule, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute audience_type + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType, nil] + optional :audience_type, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType }, + nil?: true + + # @!attribute bid_price + # Bid price (cost per result for Cost Cap). + # + # @return [Float, nil] + optional :bid_price, Float, nil?: true + + # @!attribute bid_type + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::BidType, nil] + optional :bid_type, + enum: -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BidType + }, + nil?: true + + # @!attribute billing_event + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent, nil] + optional :billing_event, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent }, + nil?: true + + # @!attribute brand_safety_type + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType, nil] + optional :brand_safety_type, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType }, + nil?: true + + # @!attribute budget_mode + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode, nil] + optional :budget_mode, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode }, + nil?: true + + # @!attribute carrier_ids + # + # @return [Array, nil] + optional :carrier_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute category_exclusion_ids + # + # @return [Array, nil] + optional :category_exclusion_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute click_attribution_window + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow, nil] + optional :click_attribution_window, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow }, + nil?: true + + # @!attribute comment_disabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :comment_disabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute contextual_tag_ids + # + # @return [Array, nil] + optional :contextual_tag_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute conversion_bid_price + # Target cost per conversion for oCPM. + # + # @return [Float, nil] + optional :conversion_bid_price, Float, nil?: true + + # @!attribute creative_material_mode + # Creative delivery strategy. + # + # @return [String, nil] + optional :creative_material_mode, String, nil?: true + + # @!attribute dayparting + # Ad delivery schedule (48x7 character string). + # + # @return [String, nil] + optional :dayparting, String, nil?: true + + # @!attribute deep_funnel_event_source + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :deep_funnel_event_source, String, nil?: true + + # @!attribute deep_funnel_event_source_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :deep_funnel_event_source_id, String, nil?: true + + # @!attribute deep_funnel_optimization_status + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus, nil] + optional :deep_funnel_optimization_status, + enum: -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus + }, + nil?: true + + # @!attribute device_model_ids + # + # @return [Array, nil] + optional :device_model_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute device_price_ranges + # + # @return [Array, nil] + optional :device_price_ranges, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute engaged_view_attribution_window + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow, nil] + optional :engaged_view_attribution_window, + enum: -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow + }, + nil?: true + + # @!attribute excluded_audience_ids + # + # @return [Array, nil] + optional :excluded_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute excluded_location_ids + # TikTok location/region IDs to exclude. + # + # @return [Array, nil] + optional :excluded_location_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute frequency + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :frequency, Integer, nil?: true + + # @!attribute frequency_schedule + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :frequency_schedule, Integer, nil?: true + + # @!attribute gender + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Gender, nil] + optional :gender, + enum: -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender + }, + nil?: true + + # @!attribute identity_authorized_bc_id + # Business Center ID for BC_AUTH_TT identity. + # + # @return [String, nil] + optional :identity_authorized_bc_id, String, nil?: true + + # @!attribute identity_id + # TikTok identity ID for the ad group. + # + # @return [String, nil] + optional :identity_id, String, nil?: true + + # @!attribute identity_type + # Identity type (AUTH_CODE, TT_USER, BC_AUTH_TT). + # + # @return [String, nil] + optional :identity_type, String, nil?: true + + # @!attribute instant_form_config + # Instant form configuration for lead generation campaigns. + # + # @return [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig, nil] + optional :instant_form_config, + -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig }, + nil?: true + + # @!attribute instant_form_id + # TikTok instant form ID (set automatically when instant_form_config is provided). + # + # @return [String, nil] + optional :instant_form_id, String, nil?: true + + # @!attribute interest_category_ids + # + # @return [Array, nil] + optional :interest_category_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute interest_keyword_ids + # + # @return [Array, nil] + optional :interest_keyword_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute inventory_filter_enabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :inventory_filter_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute ios14_targeting + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting, nil] + optional :ios14_targeting, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting }, + nil?: true + + # @!attribute isp_ids + # + # @return [Array, nil] + optional :isp_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute languages + # + # @return [Array, nil] + optional :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute location_ids + # TikTok location/region IDs for geo targeting. + # + # @return [Array, nil] + optional :location_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute min_android_version + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :min_android_version, String, nil?: true + + # @!attribute min_ios_version + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :min_ios_version, String, nil?: true + + # @!attribute network_types + # + # @return [Array, nil] + optional :network_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute operating_systems + # + # @return [Array, nil] + optional :operating_systems, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperatingSystem] + }, + nil?: true + + # @!attribute operation_status + # Initial status (ENABLE, DISABLE). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus, nil] + optional :operation_status, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus }, + nil?: true + + # @!attribute optimization_event + # Conversion event (e.g., COMPLETE_PAYMENT). + # + # @return [String, nil] + optional :optimization_event, String, nil?: true + + # @!attribute optimization_goal + # What this ad group optimizes for on TikTok. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal, nil] + optional :optimization_goal, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing, nil] + optional :pacing, + enum: -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing + }, + nil?: true + + # @!attribute pangle_audience_package_exclude_ids + # + # @return [Array, nil] + optional :pangle_audience_package_exclude_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute pangle_audience_package_include_ids + # + # @return [Array, nil] + optional :pangle_audience_package_include_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute pangle_block_app_ids + # + # @return [Array, nil] + optional :pangle_block_app_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute pixel_id + # TikTok Pixel ID for conversion tracking. + # + # @return [String, nil] + optional :pixel_id, String, nil?: true + + # @!attribute placement_type + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType, nil] + optional :placement_type, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType }, + nil?: true + + # @!attribute placements + # Placements (PLACEMENT_TIKTOK, PLACEMENT_PANGLE, etc.). + # + # @return [Array, nil] + optional :placements, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute product_set_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :product_set_id, String, nil?: true + + # @!attribute product_source + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource, nil] + optional :product_source, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource }, + nil?: true + + # @!attribute promotion_type + # Promotion type (optimization location). + # + # @return [String, nil] + optional :promotion_type, String, nil?: true + + # @!attribute schedule_end_time + # Schedule end time (UTC, YYYY-MM-DD HH:MM:SS). + # + # @return [String, nil] + optional :schedule_end_time, String, nil?: true + + # @!attribute schedule_start_time + # Schedule start time (UTC, YYYY-MM-DD HH:MM:SS). + # + # @return [String, nil] + optional :schedule_start_time, String, nil?: true + + # @!attribute schedule_type + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType, nil] + optional :schedule_type, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType }, + nil?: true + + # @!attribute secondary_optimization_event + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :secondary_optimization_event, String, nil?: true + + # @!attribute shopping_ads_retargeting_actions_days + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :shopping_ads_retargeting_actions_days, Integer, nil?: true + + # @!attribute shopping_ads_retargeting_type + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType, nil] + optional :shopping_ads_retargeting_type, + enum: -> { + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType + }, + nil?: true + + # @!attribute spending_power + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower, nil] + optional :spending_power, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower }, + nil?: true + + # @!attribute tiktok_subplacements + # TikTok subplacements (IN_FEED, SEARCH_FEED, etc.). + # + # @return [Array, nil] + optional :tiktok_subplacements, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute vertical_sensitivity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :vertical_sensitivity_id, String, nil?: true + + # @!attribute video_download_disabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :video_download_disabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute video_user_actions + # + # @return [Array, nil] + optional :video_user_actions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute view_attribution_window + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow, nil] + optional :view_attribution_window, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow }, + nil?: true + + # @!method initialize(actions: nil, age_groups: nil, app_id: nil, attribution_event_count: nil, audience_ids: nil, audience_rule: nil, audience_type: nil, bid_price: nil, bid_type: nil, billing_event: nil, brand_safety_type: nil, budget_mode: nil, carrier_ids: nil, category_exclusion_ids: nil, click_attribution_window: nil, comment_disabled: nil, contextual_tag_ids: nil, conversion_bid_price: nil, creative_material_mode: nil, dayparting: nil, deep_funnel_event_source: nil, deep_funnel_event_source_id: nil, deep_funnel_optimization_status: nil, device_model_ids: nil, device_price_ranges: nil, engaged_view_attribution_window: nil, excluded_audience_ids: nil, excluded_location_ids: nil, frequency: nil, frequency_schedule: nil, gender: nil, identity_authorized_bc_id: nil, identity_id: nil, identity_type: nil, instant_form_config: nil, instant_form_id: nil, interest_category_ids: nil, interest_keyword_ids: nil, inventory_filter_enabled: nil, ios14_targeting: nil, isp_ids: nil, languages: nil, location_ids: nil, min_android_version: nil, min_ios_version: nil, network_types: nil, operating_systems: nil, operation_status: nil, optimization_event: nil, optimization_goal: nil, pacing: nil, pangle_audience_package_exclude_ids: nil, pangle_audience_package_include_ids: nil, pangle_block_app_ids: nil, pixel_id: nil, placement_type: nil, placements: nil, product_set_id: nil, product_source: nil, promotion_type: nil, schedule_end_time: nil, schedule_start_time: nil, schedule_type: nil, secondary_optimization_event: nil, shopping_ads_retargeting_actions_days: nil, shopping_ads_retargeting_type: nil, spending_power: nil, tiktok_subplacements: nil, vertical_sensitivity_id: nil, video_download_disabled: nil, video_user_actions: nil, view_attribution_window: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok} for more details. + # + # TikTok ad group configuration. + # + # @param actions [Array, nil] + # + # @param age_groups [Array, nil] + # + # @param app_id [String, nil] App ID for app promotion campaigns. + # + # @param attribution_event_count [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount, nil] + # + # @param audience_ids [Array, nil] + # + # @param audience_rule [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param audience_type [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType, nil] + # + # @param bid_price [Float, nil] Bid price (cost per result for Cost Cap). + # + # @param bid_type [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::BidType, nil] Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent, nil] How you are billed on TikTok (CPC, CPM, OCPM, CPV). + # + # @param brand_safety_type [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType, nil] + # + # @param budget_mode [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode, nil] Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, BUDGET_MODE_DYNAMIC_DAILY_BUDGE + # + # @param carrier_ids [Array, nil] + # + # @param category_exclusion_ids [Array, nil] + # + # @param click_attribution_window [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow, nil] + # + # @param comment_disabled [Boolean, nil] Represents `true` or `false` values. + # + # @param contextual_tag_ids [Array, nil] + # + # @param conversion_bid_price [Float, nil] Target cost per conversion for oCPM. + # + # @param creative_material_mode [String, nil] Creative delivery strategy. + # + # @param dayparting [String, nil] Ad delivery schedule (48x7 character string). + # + # @param deep_funnel_event_source [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param deep_funnel_event_source_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param deep_funnel_optimization_status [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus, nil] + # + # @param device_model_ids [Array, nil] + # + # @param device_price_ranges [Array, nil] + # + # @param engaged_view_attribution_window [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow, nil] + # + # @param excluded_audience_ids [Array, nil] + # + # @param excluded_location_ids [Array, nil] TikTok location/region IDs to exclude. + # + # @param frequency [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param frequency_schedule [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param gender [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Gender, nil] + # + # @param identity_authorized_bc_id [String, nil] Business Center ID for BC_AUTH_TT identity. + # + # @param identity_id [String, nil] TikTok identity ID for the ad group. + # + # @param identity_type [String, nil] Identity type (AUTH_CODE, TT_USER, BC_AUTH_TT). + # + # @param instant_form_config [WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig, nil] Instant form configuration for lead generation campaigns. + # + # @param instant_form_id [String, nil] TikTok instant form ID (set automatically when instant_form_config is provided). + # + # @param interest_category_ids [Array, nil] + # + # @param interest_keyword_ids [Array, nil] + # + # @param inventory_filter_enabled [Boolean, nil] Represents `true` or `false` values. + # + # @param ios14_targeting [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting, nil] + # + # @param isp_ids [Array, nil] + # + # @param languages [Array, nil] + # + # @param location_ids [Array, nil] TikTok location/region IDs for geo targeting. + # + # @param min_android_version [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param min_ios_version [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param network_types [Array, nil] + # + # @param operating_systems [Array, nil] + # + # @param operation_status [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus, nil] Initial status (ENABLE, DISABLE). + # + # @param optimization_event [String, nil] Conversion event (e.g., COMPLETE_PAYMENT). + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal, nil] What this ad group optimizes for on TikTok. + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing, nil] Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + # + # @param pangle_audience_package_exclude_ids [Array, nil] + # + # @param pangle_audience_package_include_ids [Array, nil] + # + # @param pangle_block_app_ids [Array, nil] + # + # @param pixel_id [String, nil] TikTok Pixel ID for conversion tracking. + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType, nil] Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + # + # @param placements [Array, nil] Placements (PLACEMENT_TIKTOK, PLACEMENT_PANGLE, etc.). + # + # @param product_set_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param product_source [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource, nil] + # + # @param promotion_type [String, nil] Promotion type (optimization location). + # + # @param schedule_end_time [String, nil] Schedule end time (UTC, YYYY-MM-DD HH:MM:SS). + # + # @param schedule_start_time [String, nil] Schedule start time (UTC, YYYY-MM-DD HH:MM:SS). + # + # @param schedule_type [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType, nil] Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + # + # @param secondary_optimization_event [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param shopping_ads_retargeting_actions_days [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param shopping_ads_retargeting_type [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType, nil] + # + # @param spending_power [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower, nil] + # + # @param tiktok_subplacements [Array, nil] TikTok subplacements (IN_FEED, SEARCH_FEED, etc.). + # + # @param vertical_sensitivity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param video_download_disabled [Boolean, nil] Represents `true` or `false` values. + # + # @param video_user_actions [Array, nil] + # + # @param view_attribution_window [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow, nil] + + class Action < WhopSDK::Internal::Type::BaseModel + # @!attribute action_category_ids + # Behavioral category IDs. Use /tool/action_category/ to list them. + # + # @return [Array, nil] + optional :action_category_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute action_period + # Lookback window in days. TikTok accepts 7, 15, 30, 60, 90, or 180. + # + # @return [Integer, nil] + optional :action_period, Integer, nil?: true + + # @!attribute action_scene + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene, nil] + optional :action_scene, + enum: -> { WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene }, + nil?: true + + # @!attribute video_user_actions + # Specific video interactions (WATCHED_TO_END, LIKED, COMMENTED, SHARED, FOLLOWED, + # PROFILE_VISITED). + # + # @return [Array, nil] + optional :video_user_actions, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction] + }, + nil?: true + + # @!method initialize(action_category_ids: nil, action_period: nil, action_scene: nil, video_user_actions: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action} for more + # details. + # + # A single TikTok behavioral targeting entry. One category of past user behavior + # (what they did, over what window, on which kind of content). See + # docs/tiktok_api/ad_group.md § actions. + # + # @param action_category_ids [Array, nil] Behavioral category IDs. Use /tool/action_category/ to list them. + # + # @param action_period [Integer, nil] Lookback window in days. TikTok accepts 7, 15, 30, 60, 90, or 180. + # + # @param action_scene [Symbol, WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene, nil] The category of TikTok content a behavioral targeting rule applies to. See docs/ + # + # @param video_user_actions [Array, nil] Specific video interactions (WATCHED_TO_END, LIKED, COMMENTED, SHARED, FOLLOWED, + + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action#action_scene + module ActionScene + extend WhopSDK::Internal::Type::Enum + + VIDEO_RELATED = :VIDEO_RELATED + CREATOR_RELATED = :CREATOR_RELATED + HASHTAG_RELATED = :HASHTAG_RELATED + LIVE_RELATED = :LIVE_RELATED + + # @!method self.values + # @return [Array] + end + + # Specific past video interactions used for behavioral targeting. See + # docs/tiktok_api/ad_group.md § actions.video_user_actions. + module VideoUserAction + extend WhopSDK::Internal::Type::Enum + + WATCHED_TO_END = :WATCHED_TO_END + LIKED = :LIKED + COMMENTED = :COMMENTED + SHARED = :SHARED + FOLLOWED = :FOLLOWED + PROFILE_VISITED = :PROFILE_VISITED + + # @!method self.values + # @return [Array] + end + end + + # Age groups targetable on TikTok. See docs/tiktok_api/ad_group.md § age_groups. + module AgeGroup + extend WhopSDK::Internal::Type::Enum + + AGE_13_17 = :AGE_13_17 + AGE_18_24 = :AGE_18_24 + AGE_25_34 = :AGE_25_34 + AGE_35_44 = :AGE_35_44 + AGE_45_54 = :AGE_45_54 + AGE_55_100 = :AGE_55_100 + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#attribution_event_count + module AttributionEventCount + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + EVERY = :EVERY + ONCE = :ONCE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#audience_type + module AudienceType + extend WhopSDK::Internal::Type::Enum + + NORMAL = :NORMAL + SMART_INTERESTS_BEHAVIORS = :SMART_INTERESTS_BEHAVIORS + + # @!method self.values + # @return [Array] + end + + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#bid_type + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID = :BID_TYPE_NO_BID + BID_TYPE_CUSTOM = :BID_TYPE_CUSTOM + + # @!method self.values + # @return [Array] + end + + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC = :CPC + CPM = :CPM + OCPM = :OCPM + CPV = :CPV + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#brand_safety_type + module BrandSafetyType + extend WhopSDK::Internal::Type::Enum + + NO_BRAND_SAFETY = :NO_BRAND_SAFETY + STANDARD_INVENTORY = :STANDARD_INVENTORY + LIMITED_INVENTORY = :LIMITED_INVENTORY + FULL_INVENTORY = :FULL_INVENTORY + EXPANDED_INVENTORY = :EXPANDED_INVENTORY + + # @!method self.values + # @return [Array] + end + + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#budget_mode + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY = :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL = :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#click_attribution_window + module ClickAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF = :OFF + ONE_DAY = :ONE_DAY + SEVEN_DAYS = :SEVEN_DAYS + FOURTEEN_DAYS = :FOURTEEN_DAYS + TWENTY_EIGHT_DAYS = :TWENTY_EIGHT_DAYS + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#deep_funnel_optimization_status + module DeepFunnelOptimizationStatus + extend WhopSDK::Internal::Type::Enum + + ON = :ON + OFF = :OFF + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#engaged_view_attribution_window + module EngagedViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF = :OFF + ONE_DAY = :ONE_DAY + SEVEN_DAYS = :SEVEN_DAYS + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#gender + module Gender + extend WhopSDK::Internal::Type::Enum + + GENDER_UNLIMITED = :GENDER_UNLIMITED + GENDER_MALE = :GENDER_MALE + GENDER_FEMALE = :GENDER_FEMALE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#instant_form_config + class InstantFormConfig < WhopSDK::Internal::Type::BaseModel + # @!attribute privacy_policy_url + # URL to your privacy policy. + # + # @return [String] + required :privacy_policy_url, String + + # @!attribute questions + # Form questions (at least one required). + # + # @return [Array] + required :questions, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question] } + + # @!attribute button_text + # Submit button text. + # + # @return [String, nil] + optional :button_text, String, nil?: true + + # @!attribute greeting + # Greeting text shown at the top of the form. + # + # @return [String, nil] + optional :greeting, String, nil?: true + + # @!attribute name + # Form name. Auto-generated if omitted. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!method initialize(privacy_policy_url:, questions:, button_text: nil, greeting: nil, name: nil) + # Instant form configuration for lead generation campaigns. + # + # @param privacy_policy_url [String] URL to your privacy policy. + # + # @param questions [Array] Form questions (at least one required). + # + # @param button_text [String, nil] Submit button text. + # + # @param greeting [String, nil] Greeting text shown at the top of the form. + # + # @param name [String, nil] Form name. Auto-generated if omitted. + + class Question < WhopSDK::Internal::Type::BaseModel + # @!attribute field_type + # Question type (EMAIL, PHONE_NUMBER, NAME, CUSTOM). + # + # @return [String] + required :field_type, String + + # @!attribute label + # Custom label for the question. + # + # @return [String, nil] + optional :label, String, nil?: true + + # @!method initialize(field_type:, label: nil) + # A question for a TikTok instant form. + # + # @param field_type [String] Question type (EMAIL, PHONE_NUMBER, NAME, CUSTOM). + # + # @param label [String, nil] Custom label for the question. + end + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#ios14_targeting + module Ios14Targeting + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + IOS14_MINUS = :IOS14_MINUS + IOS14_PLUS = :IOS14_PLUS + ALL = :ALL + + # @!method self.values + # @return [Array] + end + + # Device operating systems targetable on TikTok. See docs/tiktok_api/ad_group.md § + # operating_systems. + module OperatingSystem + extend WhopSDK::Internal::Type::Enum + + ANDROID = :ANDROID + IOS = :IOS + + # @!method self.values + # @return [Array] + end + + # Initial status (ENABLE, DISABLE). + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#operation_status + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE = :ENABLE + DISABLE = :DISABLE + + # @!method self.values + # @return [Array] + end + + # What this ad group optimizes for on TikTok. + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK = :CLICK + CONVERT = :CONVERT + INSTALL = :INSTALL + IN_APP_EVENT = :IN_APP_EVENT + REACH = :REACH + SHOW = :SHOW + VIDEO_VIEW = :VIDEO_VIEW + ENGAGED_VIEW = :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN = :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION = :LEAD_GENERATION + PREFERRED_LEAD = :PREFERRED_LEAD + CONVERSATION = :CONVERSATION + FOLLOWERS = :FOLLOWERS + PROFILE_VIEWS = :PROFILE_VIEWS + PAGE_VISIT = :PAGE_VISIT + VALUE = :VALUE + AUTOMATIC_VALUE_OPTIMIZATION = :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW = :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT = :DESTINATION_VISIT + MT_LIVE_ROOM = :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE = :PRODUCT_CLICK_IN_LIVE + + # @!method self.values + # @return [Array] + end + + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH = :PACING_MODE_SMOOTH + PACING_MODE_FAST = :PACING_MODE_FAST + + # @!method self.values + # @return [Array] + end + + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC = :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL = :PLACEMENT_TYPE_NORMAL + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#product_source + module ProductSource + extend WhopSDK::Internal::Type::Enum + + CATALOG = :CATALOG + STORE = :STORE + SHOWCASE = :SHOWCASE + + # @!method self.values + # @return [Array] + end + + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + # + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#schedule_type + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END = :SCHEDULE_START_END + SCHEDULE_FROM_NOW = :SCHEDULE_FROM_NOW + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#shopping_ads_retargeting_type + module ShoppingAdsRetargetingType + extend WhopSDK::Internal::Type::Enum + + OFF = :OFF + LAB1 = :LAB1 + LAB2 = :LAB2 + LAB3 = :LAB3 + LAB4 = :LAB4 + LAB5 = :LAB5 + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#spending_power + module SpendingPower + extend WhopSDK::Internal::Type::Enum + + ALL = :ALL + HIGH = :HIGH + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok#view_attribution_window + module ViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF = :OFF + ONE_DAY = :ONE_DAY + SEVEN_DAYS = :SEVEN_DAYS + + # @!method self.values + # @return [Array] + end + end + end + + # The status of an external ad group. + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_group_create_response.rb b/lib/whop_sdk/models/ad_group_create_response.rb new file mode 100644 index 00000000..1752334a --- /dev/null +++ b/lib/whop_sdk/models/ad_group_create_response.rb @@ -0,0 +1,1121 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#create + class AdGroupCreateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the external ad group. + # + # @return [String] + required :id, String + + # @!attribute ad_campaign + # The parent ad campaign + # + # @return [WhopSDK::Models::AdGroupCreateResponse::AdCampaign] + required :ad_campaign, -> { WhopSDK::Models::AdGroupCreateResponse::AdCampaign } + + # @!attribute config + # Unified ad group configuration (platform-agnostic) + # + # @return [WhopSDK::Models::AdGroupCreateResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdGroupCreateResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the external ad group was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute daily_budget + # Daily budget in dollars (nil for lifetime budgets) + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute name + # Human-readable ad group name + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute platform_config + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + # + # @return [WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, nil] + required :platform_config, union: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig } + + # @!attribute status + # Current operational status of the ad group + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdGroupCreateResponse::Status } + + # @!attribute updated_at + # The datetime the external ad group was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, ad_campaign:, config:, created_at:, daily_budget:, name:, platform_config:, status:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupCreateResponse} for more details. + # + # An external ad group (ad set) belonging to an ad campaign + # + # @param id [String] The unique identifier for the external ad group. + # + # @param ad_campaign [WhopSDK::Models::AdGroupCreateResponse::AdCampaign] The parent ad campaign + # + # @param config [WhopSDK::Models::AdGroupCreateResponse::Config, nil] Unified ad group configuration (platform-agnostic) + # + # @param created_at [Time] The datetime the external ad group was created. + # + # @param daily_budget [Float, nil] Daily budget in dollars (nil for lifetime budgets) + # + # @param name [String, nil] Human-readable ad group name + # + # @param platform_config [WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, nil] Typed platform-specific configuration. Use inline fragments (... on MetaAdGroupP + # + # @param status [Symbol, WhopSDK::Models::AdGroupCreateResponse::Status] Current operational status of the ad group + # + # @param updated_at [Time] The datetime the external ad group was last updated. + + # @see WhopSDK::Models::AdGroupCreateResponse#ad_campaign + class AdCampaign < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform, nil] + required :platform, enum: -> { WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform }, nil?: true + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status] + required :status, enum: -> { WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status } + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!method initialize(id:, platform:, status:, title:) + # The parent ad campaign + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param platform [Symbol, WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform, nil] The platforms where an ad campaign can run. + # + # @param status [Symbol, WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status] Current status of the campaign (active, paused, or inactive) + # + # @param title [String] The title of the ad campaign + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdGroupCreateResponse::AdCampaign#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdGroupCreateResponse::AdCampaign#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdGroupCreateResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy }, + nil?: true + + # @!attribute billing_event + # How you are billed (e.g., impressions, clicks). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent }, + nil?: true + + # @!attribute end_time + # Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute frequency_cap + # Maximum number of times to show ads to each person in the frequency interval. + # + # @return [Integer, nil] + required :frequency_cap, Integer, nil?: true + + # @!attribute frequency_cap_interval_days + # Number of days for the frequency cap interval. + # + # @return [Integer, nil] + required :frequency_cap_interval_days, Integer, nil?: true + + # @!attribute optimization_goal + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # Budget pacing: standard (even) or accelerated (fast). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::Pacing, nil] + required :pacing, enum: -> { WhopSDK::Models::AdGroupCreateResponse::Config::Pacing }, nil?: true + + # @!attribute start_time + # Scheduled start time (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute targeting + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @return [WhopSDK::Models::AdGroupCreateResponse::Config::Targeting, nil] + required :targeting, -> { WhopSDK::Models::AdGroupCreateResponse::Config::Targeting }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, billing_event:, end_time:, frequency_cap:, frequency_cap_interval_days:, optimization_goal:, pacing:, start_time:, targeting:) + # Unified ad group configuration (platform-agnostic) + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy, nil] Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent, nil] How you are billed (e.g., impressions, clicks). + # + # @param end_time [String, nil] Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @param frequency_cap [Integer, nil] Maximum number of times to show ads to each person in the frequency interval. + # + # @param frequency_cap_interval_days [Integer, nil] Number of days for the frequency cap interval. + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal, nil] What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::Pacing, nil] Budget pacing: standard (even) or accelerated (fast). + # + # @param start_time [String, nil] Scheduled start time (ISO8601). + # + # @param targeting [WhopSDK::Models::AdGroupCreateResponse::Config::Targeting, nil] Audience targeting settings (demographics, geo, interests, audiences, devices). + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @see WhopSDK::Models::AdGroupCreateResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # How you are billed (e.g., impressions, clicks). + # + # @see WhopSDK::Models::AdGroupCreateResponse::Config#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS = :impressions + CLICKS = :clicks + OPTIMIZED_CPM = :optimized_cpm + VIDEO_VIEWS = :video_views + + # @!method self.values + # @return [Array] + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @see WhopSDK::Models::AdGroupCreateResponse::Config#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS = :conversions + LINK_CLICKS = :link_clicks + LANDING_PAGE_VIEWS = :landing_page_views + REACH = :reach + IMPRESSIONS = :impressions + APP_INSTALLS = :app_installs + VIDEO_VIEWS = :video_views + LEAD_GENERATION = :lead_generation + VALUE = :value + PAGE_LIKES = :page_likes + CONVERSATIONS = :conversations + AD_RECALL_LIFT = :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :two_second_continuous_video_views + POST_ENGAGEMENT = :post_engagement + EVENT_RESPONSES = :event_responses + REMINDERS_SET = :reminders_set + QUALITY_LEAD = :quality_lead + + # @!method self.values + # @return [Array] + end + + # Budget pacing: standard (even) or accelerated (fast). + # + # @see WhopSDK::Models::AdGroupCreateResponse::Config#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD = :standard + ACCELERATED = :accelerated + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::Config#targeting + class Targeting < WhopSDK::Internal::Type::BaseModel + # @!attribute age_max + # Maximum age for demographic targeting. + # + # @return [Integer, nil] + required :age_max, Integer, nil?: true + + # @!attribute age_min + # Minimum age for demographic targeting. + # + # @return [Integer, nil] + required :age_min, Integer, nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes targeted. + # + # @return [Array, nil] + required :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute device_platforms + # Device platforms targeted. + # + # @return [Array, nil] + required :device_platforms, + -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::DevicePlatform] }, + nil?: true + + # @!attribute exclude_audience_ids + # Platform audience IDs excluded. + # + # @return [Array, nil] + required :exclude_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute genders + # Genders targeted. + # + # @return [Array, nil] + required :genders, + -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender] }, + nil?: true + + # @!attribute include_audience_ids + # Platform audience IDs included. + # + # @return [Array, nil] + required :include_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute interest_ids + # Platform-specific interest IDs targeted. + # + # @return [Array, nil] + required :interest_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute languages + # Language codes targeted. + # + # @return [Array, nil] + required :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute placement_type + # Placement strategy for ad delivery. + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType, nil] + required :placement_type, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType }, + nil?: true + + # @!method initialize(age_max:, age_min:, countries:, device_platforms:, exclude_audience_ids:, genders:, include_audience_ids:, interest_ids:, languages:, placement_type:) + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @param age_max [Integer, nil] Maximum age for demographic targeting. + # + # @param age_min [Integer, nil] Minimum age for demographic targeting. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes targeted. + # + # @param device_platforms [Array, nil] Device platforms targeted. + # + # @param exclude_audience_ids [Array, nil] Platform audience IDs excluded. + # + # @param genders [Array, nil] Genders targeted. + # + # @param include_audience_ids [Array, nil] Platform audience IDs included. + # + # @param interest_ids [Array, nil] Platform-specific interest IDs targeted. + # + # @param languages [Array, nil] Language codes targeted. + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType, nil] Placement strategy for ad delivery. + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE = :mobile + DESKTOP = :desktop + + # @!method self.values + # @return [Array] + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE = :male + FEMALE = :female + ALL = :all + + # @!method self.values + # @return [Array] + end + + # Placement strategy for ad delivery. + # + # @see WhopSDK::Models::AdGroupCreateResponse::Config::Targeting#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC = :automatic + MANUAL = :manual + + # @!method self.values + # @return [Array] + end + end + end + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + # + # @see WhopSDK::Models::AdGroupCreateResponse#platform_config + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # Meta (Facebook/Instagram) ad set configuration. + variant :MetaAdGroupPlatformConfigType, + -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType } + + # TikTok ad group configuration. + variant :TiktokAdGroupPlatformConfigType, + -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType } + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute attribution_spec + # + # @return [ArrayObject}>, nil] + required :attribution_spec, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute bid_amount + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy }, + nil?: true + + # @!attribute billing_event + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent }, + nil?: true + + # @!attribute daily_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :daily_budget, Integer, nil?: true + + # @!attribute destination_type + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType, nil] + required :destination_type, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType }, + nil?: true + + # @!attribute end_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute excluded_geo_locations + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :excluded_geo_locations, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute facebook_positions + # + # @return [Array, nil] + required :facebook_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute geo_locations + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :geo_locations, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute instagram_actor_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :instagram_actor_id, String, nil?: true + + # @!attribute instagram_positions + # + # @return [Array, nil] + required :instagram_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute lifetime_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :lifetime_budget, Integer, nil?: true + + # @!attribute optimization_goal + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal }, + nil?: true + + # @!attribute page_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :page_id, String, nil?: true + + # @!attribute platform + # The ad platform (meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform } + + # @!attribute promoted_object + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :promoted_object, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute publisher_platforms + # + # @return [Array, nil] + required :publisher_platforms, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute status + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status, nil] + required :status, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status }, + nil?: true + + # @!attribute targeting_automation + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :targeting_automation, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :MetaAdGroupPlatformConfigType] + required :typename, const: :MetaAdGroupPlatformConfigType + + # @!method initialize(attribution_spec:, bid_amount:, bid_strategy:, billing_event:, daily_budget:, destination_type:, end_time:, excluded_geo_locations:, facebook_positions:, geo_locations:, instagram_actor_id:, instagram_positions:, lifetime_budget:, optimization_goal:, page_id:, platform:, promoted_object:, publisher_platforms:, status:, targeting_automation:, typename: :MetaAdGroupPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType} + # for more details. + # + # Meta (Facebook/Instagram) ad set configuration. + # + # @param attribution_spec [ArrayObject}>, nil] + # + # @param bid_amount [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy, nil] + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent, nil] + # + # @param daily_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param destination_type [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType, nil] + # + # @param end_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param excluded_geo_locations [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param facebook_positions [Array, nil] + # + # @param geo_locations [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param instagram_actor_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param instagram_positions [Array, nil] + # + # @param lifetime_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal, nil] + # + # @param page_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform] The ad platform (meta, tiktok). + # + # @param promoted_object [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param publisher_platforms [Array, nil] + # + # @param status [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status, nil] + # + # @param targeting_automation [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param typename [Symbol, :MetaAdGroupPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP = :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP = :LOWEST_COST_WITH_BID_CAP + COST_CAP = :COST_CAP + LOWEST_COST_WITH_MIN_ROAS = :LOWEST_COST_WITH_MIN_ROAS + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS = :APP_INSTALLS + CLICKS = :CLICKS + IMPRESSIONS = :IMPRESSIONS + LINK_CLICKS = :LINK_CLICKS + NONE = :NONE + OFFER_CLAIMS = :OFFER_CLAIMS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + THRUPLAY = :THRUPLAY + PURCHASE = :PURCHASE + LISTING_INTERACTION = :LISTING_INTERACTION + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#destination_type + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED = :UNDEFINED + WEBSITE = :WEBSITE + APP = :APP + FACEBOOK = :FACEBOOK + MESSENGER = :MESSENGER + WHATSAPP = :WHATSAPP + INSTAGRAM_DIRECT = :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE = :INSTAGRAM_PROFILE + PHONE_CALL = :PHONE_CALL + SHOP_AUTOMATIC = :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC = :APPLINKS_AUTOMATIC + ON_AD = :ON_AD + ON_POST = :ON_POST + ON_VIDEO = :ON_VIDEO + ON_PAGE = :ON_PAGE + ON_EVENT = :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP = :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE = :FACEBOOK_PAGE + INSTAGRAM_LIVE = :INSTAGRAM_LIVE + FACEBOOK_LIVE = :FACEBOOK_LIVE + IMAGINE = :IMAGINE + LEAD_FROM_IG_DIRECT = :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER = :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM = :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL = :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL = :BROADCAST_CHANNEL + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE = :NONE + APP_INSTALLS = :APP_INSTALLS + AD_RECALL_LIFT = :AD_RECALL_LIFT + ENGAGED_USERS = :ENGAGED_USERS + EVENT_RESPONSES = :EVENT_RESPONSES + IMPRESSIONS = :IMPRESSIONS + LEAD_GENERATION = :LEAD_GENERATION + QUALITY_LEAD = :QUALITY_LEAD + LINK_CLICKS = :LINK_CLICKS + OFFSITE_CONVERSIONS = :OFFSITE_CONVERSIONS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + QUALITY_CALL = :QUALITY_CALL + REACH = :REACH + LANDING_PAGE_VIEWS = :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE = :VISIT_INSTAGRAM_PROFILE + VALUE = :VALUE + THRUPLAY = :THRUPLAY + DERIVED_EVENTS = :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS = :CONVERSATIONS + IN_APP_VALUE = :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION = :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS = :SUBSCRIBERS + REMINDERS_SET = :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT = :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT = :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT = :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH = :ENGAGED_REACH + ENGAGED_PAGE_VIEWS = :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE = :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE = :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION = :MESSAGING_APPOINTMENT_CONVERSION + + # @!method self.values + # @return [Array] + end + + # The ad platform (meta, tiktok). + # + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :ACTIVE + PAUSED = :PAUSED + + # @!method self.values + # @return [Array] + end + end + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_price + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + required :bid_price, Float, nil?: true + + # @!attribute bid_type + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType, nil] + required :bid_type, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType }, + nil?: true + + # @!attribute billing_event + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent }, + nil?: true + + # @!attribute budget_mode + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode, nil] + required :budget_mode, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode }, + nil?: true + + # @!attribute conversion_bid_price + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + required :conversion_bid_price, Float, nil?: true + + # @!attribute identity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_id, String, nil?: true + + # @!attribute identity_type + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_type, String, nil?: true + + # @!attribute operation_status + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus, nil] + required :operation_status, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus }, + nil?: true + + # @!attribute optimization_event + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :optimization_event, String, nil?: true + + # @!attribute optimization_goal + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing, nil] + required :pacing, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing }, + nil?: true + + # @!attribute pixel_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :pixel_id, String, nil?: true + + # @!attribute placement_type + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType, nil] + required :placement_type, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType }, + nil?: true + + # @!attribute placements + # + # @return [Array, nil] + required :placements, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute platform + # The ad platform (meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform } + + # @!attribute schedule_end_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :schedule_end_time, String, nil?: true + + # @!attribute schedule_start_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :schedule_start_time, String, nil?: true + + # @!attribute schedule_type + # + # @return [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType, nil] + required :schedule_type, + enum: -> { WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType }, + nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :TiktokAdGroupPlatformConfigType] + required :typename, const: :TiktokAdGroupPlatformConfigType + + # @!method initialize(bid_price:, bid_type:, billing_event:, budget_mode:, conversion_bid_price:, identity_id:, identity_type:, operation_status:, optimization_event:, optimization_goal:, pacing:, pixel_id:, placement_type:, placements:, platform:, schedule_end_time:, schedule_start_time:, schedule_type:, typename: :TiktokAdGroupPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType} + # for more details. + # + # TikTok ad group configuration. + # + # @param bid_price [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param bid_type [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType, nil] + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent, nil] + # + # @param budget_mode [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode, nil] + # + # @param conversion_bid_price [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param identity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_type [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param operation_status [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus, nil] + # + # @param optimization_event [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal, nil] + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing, nil] + # + # @param pixel_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType, nil] + # + # @param placements [Array, nil] + # + # @param platform [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform] The ad platform (meta, tiktok). + # + # @param schedule_end_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param schedule_start_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param schedule_type [Symbol, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType, nil] + # + # @param typename [Symbol, :TiktokAdGroupPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#bid_type + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID = :BID_TYPE_NO_BID + BID_TYPE_CUSTOM = :BID_TYPE_CUSTOM + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC = :CPC + CPM = :CPM + OCPM = :OCPM + CPV = :CPV + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#budget_mode + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY = :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL = :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#operation_status + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE = :ENABLE + DISABLE = :DISABLE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK = :CLICK + CONVERT = :CONVERT + INSTALL = :INSTALL + IN_APP_EVENT = :IN_APP_EVENT + REACH = :REACH + SHOW = :SHOW + VIDEO_VIEW = :VIDEO_VIEW + ENGAGED_VIEW = :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN = :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION = :LEAD_GENERATION + PREFERRED_LEAD = :PREFERRED_LEAD + CONVERSATION = :CONVERSATION + FOLLOWERS = :FOLLOWERS + PROFILE_VIEWS = :PROFILE_VIEWS + PAGE_VISIT = :PAGE_VISIT + VALUE = :VALUE + AUTOMATIC_VALUE_OPTIMIZATION = :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW = :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT = :DESTINATION_VISIT + MT_LIVE_ROOM = :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE = :PRODUCT_CLICK_IN_LIVE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH = :PACING_MODE_SMOOTH + PACING_MODE_FAST = :PACING_MODE_FAST + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC = :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL = :PLACEMENT_TYPE_NORMAL + + # @!method self.values + # @return [Array] + end + + # The ad platform (meta, tiktok). + # + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#schedule_type + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END = :SCHEDULE_START_END + SCHEDULE_FROM_NOW = :SCHEDULE_FROM_NOW + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType)] + end + + # Current operational status of the ad group + # + # @see WhopSDK::Models::AdGroupCreateResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_group_delete_params.rb b/lib/whop_sdk/models/ad_group_delete_params.rb new file mode 100644 index 00000000..bf1a4192 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_delete_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#delete + class AdGroupDeleteParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/ad_group_delete_response.rb b/lib/whop_sdk/models/ad_group_delete_response.rb new file mode 100644 index 00000000..b3264ca9 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_delete_response.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @type [WhopSDK::Internal::Type::Converter] + AdGroupDeleteResponse = WhopSDK::Internal::Type::Boolean + end +end diff --git a/lib/whop_sdk/models/ad_group_list_params.rb b/lib/whop_sdk/models/ad_group_list_params.rb new file mode 100644 index 00000000..0c864686 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_list_params.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#list + class AdGroupListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute after + # Returns the elements in the list that come after the specified cursor. + # + # @return [String, nil] + optional :after, String, nil?: true + + # @!attribute before + # Returns the elements in the list that come before the specified cursor. + # + # @return [String, nil] + optional :before, String, nil?: true + + # @!attribute campaign_id + # Filter by campaign. Provide exactly one of campaign_id or company_id. + # + # @return [String, nil] + optional :campaign_id, String, nil?: true + + # @!attribute company_id + # Filter by company. Provide exactly one of campaign_id or company_id. + # + # @return [String, nil] + optional :company_id, String, nil?: true + + # @!attribute created_after + # Only return ad groups created after this timestamp. + # + # @return [Time, nil] + optional :created_after, Time, nil?: true + + # @!attribute created_before + # Only return ad groups created before this timestamp. + # + # @return [Time, nil] + optional :created_before, Time, nil?: true + + # @!attribute first + # Returns the first _n_ elements from the list. + # + # @return [Integer, nil] + optional :first, Integer, nil?: true + + # @!attribute last + # Returns the last _n_ elements from the list. + # + # @return [Integer, nil] + optional :last, Integer, nil?: true + + # @!attribute query + # Case-insensitive substring match against the ad group name. + # + # @return [String, nil] + optional :query, String, nil?: true + + # @!attribute status + # The status of an external ad group. + # + # @return [Symbol, WhopSDK::Models::AdGroupListParams::Status, nil] + optional :status, enum: -> { WhopSDK::AdGroupListParams::Status }, nil?: true + + # @!method initialize(after: nil, before: nil, campaign_id: nil, company_id: nil, created_after: nil, created_before: nil, first: nil, last: nil, query: nil, status: nil, request_options: {}) + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param campaign_id [String, nil] Filter by campaign. Provide exactly one of campaign_id or company_id. + # + # @param company_id [String, nil] Filter by company. Provide exactly one of campaign_id or company_id. + # + # @param created_after [Time, nil] Only return ad groups created after this timestamp. + # + # @param created_before [Time, nil] Only return ad groups created before this timestamp. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param query [String, nil] Case-insensitive substring match against the ad group name. + # + # @param status [Symbol, WhopSDK::Models::AdGroupListParams::Status, nil] The status of an external ad group. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The status of an external ad group. + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_group_list_response.rb b/lib/whop_sdk/models/ad_group_list_response.rb new file mode 100644 index 00000000..88b4433e --- /dev/null +++ b/lib/whop_sdk/models/ad_group_list_response.rb @@ -0,0 +1,1040 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#list + class AdGroupListResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the external ad group. + # + # @return [String] + required :id, String + + # @!attribute config + # Unified ad group configuration (platform-agnostic) + # + # @return [WhopSDK::Models::AdGroupListResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdGroupListResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the external ad group was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute daily_budget + # Daily budget in dollars (nil for lifetime budgets) + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute name + # Human-readable ad group name + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute platform_config + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + # + # @return [WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, nil] + required :platform_config, union: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig } + + # @!attribute status + # Current operational status of the ad group + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdGroupListResponse::Status } + + # @!attribute updated_at + # The datetime the external ad group was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, config:, created_at:, daily_budget:, name:, platform_config:, status:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupListResponse} for more details. + # + # An external ad group (ad set) belonging to an ad campaign + # + # @param id [String] The unique identifier for the external ad group. + # + # @param config [WhopSDK::Models::AdGroupListResponse::Config, nil] Unified ad group configuration (platform-agnostic) + # + # @param created_at [Time] The datetime the external ad group was created. + # + # @param daily_budget [Float, nil] Daily budget in dollars (nil for lifetime budgets) + # + # @param name [String, nil] Human-readable ad group name + # + # @param platform_config [WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, nil] Typed platform-specific configuration. Use inline fragments (... on MetaAdGroupP + # + # @param status [Symbol, WhopSDK::Models::AdGroupListResponse::Status] Current operational status of the ad group + # + # @param updated_at [Time] The datetime the external ad group was last updated. + + # @see WhopSDK::Models::AdGroupListResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::Config::BidStrategy, nil] + required :bid_strategy, enum: -> { WhopSDK::Models::AdGroupListResponse::Config::BidStrategy }, nil?: true + + # @!attribute billing_event + # How you are billed (e.g., impressions, clicks). + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::Config::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupListResponse::Config::BillingEvent }, + nil?: true + + # @!attribute end_time + # Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute frequency_cap + # Maximum number of times to show ads to each person in the frequency interval. + # + # @return [Integer, nil] + required :frequency_cap, Integer, nil?: true + + # @!attribute frequency_cap_interval_days + # Number of days for the frequency cap interval. + # + # @return [Integer, nil] + required :frequency_cap_interval_days, Integer, nil?: true + + # @!attribute optimization_goal + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # Budget pacing: standard (even) or accelerated (fast). + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::Config::Pacing, nil] + required :pacing, enum: -> { WhopSDK::Models::AdGroupListResponse::Config::Pacing }, nil?: true + + # @!attribute start_time + # Scheduled start time (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute targeting + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @return [WhopSDK::Models::AdGroupListResponse::Config::Targeting, nil] + required :targeting, -> { WhopSDK::Models::AdGroupListResponse::Config::Targeting }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, billing_event:, end_time:, frequency_cap:, frequency_cap_interval_days:, optimization_goal:, pacing:, start_time:, targeting:) + # Unified ad group configuration (platform-agnostic) + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupListResponse::Config::BidStrategy, nil] Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupListResponse::Config::BillingEvent, nil] How you are billed (e.g., impressions, clicks). + # + # @param end_time [String, nil] Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @param frequency_cap [Integer, nil] Maximum number of times to show ads to each person in the frequency interval. + # + # @param frequency_cap_interval_days [Integer, nil] Number of days for the frequency cap interval. + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal, nil] What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupListResponse::Config::Pacing, nil] Budget pacing: standard (even) or accelerated (fast). + # + # @param start_time [String, nil] Scheduled start time (ISO8601). + # + # @param targeting [WhopSDK::Models::AdGroupListResponse::Config::Targeting, nil] Audience targeting settings (demographics, geo, interests, audiences, devices). + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @see WhopSDK::Models::AdGroupListResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # How you are billed (e.g., impressions, clicks). + # + # @see WhopSDK::Models::AdGroupListResponse::Config#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS = :impressions + CLICKS = :clicks + OPTIMIZED_CPM = :optimized_cpm + VIDEO_VIEWS = :video_views + + # @!method self.values + # @return [Array] + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @see WhopSDK::Models::AdGroupListResponse::Config#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS = :conversions + LINK_CLICKS = :link_clicks + LANDING_PAGE_VIEWS = :landing_page_views + REACH = :reach + IMPRESSIONS = :impressions + APP_INSTALLS = :app_installs + VIDEO_VIEWS = :video_views + LEAD_GENERATION = :lead_generation + VALUE = :value + PAGE_LIKES = :page_likes + CONVERSATIONS = :conversations + AD_RECALL_LIFT = :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :two_second_continuous_video_views + POST_ENGAGEMENT = :post_engagement + EVENT_RESPONSES = :event_responses + REMINDERS_SET = :reminders_set + QUALITY_LEAD = :quality_lead + + # @!method self.values + # @return [Array] + end + + # Budget pacing: standard (even) or accelerated (fast). + # + # @see WhopSDK::Models::AdGroupListResponse::Config#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD = :standard + ACCELERATED = :accelerated + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::Config#targeting + class Targeting < WhopSDK::Internal::Type::BaseModel + # @!attribute age_max + # Maximum age for demographic targeting. + # + # @return [Integer, nil] + required :age_max, Integer, nil?: true + + # @!attribute age_min + # Minimum age for demographic targeting. + # + # @return [Integer, nil] + required :age_min, Integer, nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes targeted. + # + # @return [Array, nil] + required :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute device_platforms + # Device platforms targeted. + # + # @return [Array, nil] + required :device_platforms, + -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::AdGroupListResponse::Config::Targeting::DevicePlatform] }, + nil?: true + + # @!attribute exclude_audience_ids + # Platform audience IDs excluded. + # + # @return [Array, nil] + required :exclude_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute genders + # Genders targeted. + # + # @return [Array, nil] + required :genders, + -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender] }, + nil?: true + + # @!attribute include_audience_ids + # Platform audience IDs included. + # + # @return [Array, nil] + required :include_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute interest_ids + # Platform-specific interest IDs targeted. + # + # @return [Array, nil] + required :interest_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute languages + # Language codes targeted. + # + # @return [Array, nil] + required :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute placement_type + # Placement strategy for ad delivery. + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType, nil] + required :placement_type, + enum: -> { WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType }, + nil?: true + + # @!method initialize(age_max:, age_min:, countries:, device_platforms:, exclude_audience_ids:, genders:, include_audience_ids:, interest_ids:, languages:, placement_type:) + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @param age_max [Integer, nil] Maximum age for demographic targeting. + # + # @param age_min [Integer, nil] Minimum age for demographic targeting. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes targeted. + # + # @param device_platforms [Array, nil] Device platforms targeted. + # + # @param exclude_audience_ids [Array, nil] Platform audience IDs excluded. + # + # @param genders [Array, nil] Genders targeted. + # + # @param include_audience_ids [Array, nil] Platform audience IDs included. + # + # @param interest_ids [Array, nil] Platform-specific interest IDs targeted. + # + # @param languages [Array, nil] Language codes targeted. + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType, nil] Placement strategy for ad delivery. + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE = :mobile + DESKTOP = :desktop + + # @!method self.values + # @return [Array] + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE = :male + FEMALE = :female + ALL = :all + + # @!method self.values + # @return [Array] + end + + # Placement strategy for ad delivery. + # + # @see WhopSDK::Models::AdGroupListResponse::Config::Targeting#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC = :automatic + MANUAL = :manual + + # @!method self.values + # @return [Array] + end + end + end + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + # + # @see WhopSDK::Models::AdGroupListResponse#platform_config + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # Meta (Facebook/Instagram) ad set configuration. + variant :MetaAdGroupPlatformConfigType, + -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType } + + # TikTok ad group configuration. + variant :TiktokAdGroupPlatformConfigType, + -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType } + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute attribution_spec + # + # @return [ArrayObject}>, nil] + required :attribution_spec, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute bid_amount + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy }, + nil?: true + + # @!attribute billing_event + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent }, + nil?: true + + # @!attribute daily_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :daily_budget, Integer, nil?: true + + # @!attribute destination_type + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType, nil] + required :destination_type, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType }, + nil?: true + + # @!attribute end_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute excluded_geo_locations + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :excluded_geo_locations, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute facebook_positions + # + # @return [Array, nil] + required :facebook_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute geo_locations + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :geo_locations, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute instagram_actor_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :instagram_actor_id, String, nil?: true + + # @!attribute instagram_positions + # + # @return [Array, nil] + required :instagram_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute lifetime_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :lifetime_budget, Integer, nil?: true + + # @!attribute optimization_goal + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal }, + nil?: true + + # @!attribute page_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :page_id, String, nil?: true + + # @!attribute platform + # The ad platform (meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform } + + # @!attribute promoted_object + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :promoted_object, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute publisher_platforms + # + # @return [Array, nil] + required :publisher_platforms, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute status + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status, nil] + required :status, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status }, + nil?: true + + # @!attribute targeting_automation + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :targeting_automation, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :MetaAdGroupPlatformConfigType] + required :typename, const: :MetaAdGroupPlatformConfigType + + # @!method initialize(attribution_spec:, bid_amount:, bid_strategy:, billing_event:, daily_budget:, destination_type:, end_time:, excluded_geo_locations:, facebook_positions:, geo_locations:, instagram_actor_id:, instagram_positions:, lifetime_budget:, optimization_goal:, page_id:, platform:, promoted_object:, publisher_platforms:, status:, targeting_automation:, typename: :MetaAdGroupPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType} + # for more details. + # + # Meta (Facebook/Instagram) ad set configuration. + # + # @param attribution_spec [ArrayObject}>, nil] + # + # @param bid_amount [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy, nil] + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent, nil] + # + # @param daily_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param destination_type [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType, nil] + # + # @param end_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param excluded_geo_locations [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param facebook_positions [Array, nil] + # + # @param geo_locations [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param instagram_actor_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param instagram_positions [Array, nil] + # + # @param lifetime_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal, nil] + # + # @param page_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform] The ad platform (meta, tiktok). + # + # @param promoted_object [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param publisher_platforms [Array, nil] + # + # @param status [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status, nil] + # + # @param targeting_automation [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param typename [Symbol, :MetaAdGroupPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP = :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP = :LOWEST_COST_WITH_BID_CAP + COST_CAP = :COST_CAP + LOWEST_COST_WITH_MIN_ROAS = :LOWEST_COST_WITH_MIN_ROAS + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS = :APP_INSTALLS + CLICKS = :CLICKS + IMPRESSIONS = :IMPRESSIONS + LINK_CLICKS = :LINK_CLICKS + NONE = :NONE + OFFER_CLAIMS = :OFFER_CLAIMS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + THRUPLAY = :THRUPLAY + PURCHASE = :PURCHASE + LISTING_INTERACTION = :LISTING_INTERACTION + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType#destination_type + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED = :UNDEFINED + WEBSITE = :WEBSITE + APP = :APP + FACEBOOK = :FACEBOOK + MESSENGER = :MESSENGER + WHATSAPP = :WHATSAPP + INSTAGRAM_DIRECT = :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE = :INSTAGRAM_PROFILE + PHONE_CALL = :PHONE_CALL + SHOP_AUTOMATIC = :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC = :APPLINKS_AUTOMATIC + ON_AD = :ON_AD + ON_POST = :ON_POST + ON_VIDEO = :ON_VIDEO + ON_PAGE = :ON_PAGE + ON_EVENT = :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP = :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE = :FACEBOOK_PAGE + INSTAGRAM_LIVE = :INSTAGRAM_LIVE + FACEBOOK_LIVE = :FACEBOOK_LIVE + IMAGINE = :IMAGINE + LEAD_FROM_IG_DIRECT = :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER = :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM = :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL = :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL = :BROADCAST_CHANNEL + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE = :NONE + APP_INSTALLS = :APP_INSTALLS + AD_RECALL_LIFT = :AD_RECALL_LIFT + ENGAGED_USERS = :ENGAGED_USERS + EVENT_RESPONSES = :EVENT_RESPONSES + IMPRESSIONS = :IMPRESSIONS + LEAD_GENERATION = :LEAD_GENERATION + QUALITY_LEAD = :QUALITY_LEAD + LINK_CLICKS = :LINK_CLICKS + OFFSITE_CONVERSIONS = :OFFSITE_CONVERSIONS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + QUALITY_CALL = :QUALITY_CALL + REACH = :REACH + LANDING_PAGE_VIEWS = :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE = :VISIT_INSTAGRAM_PROFILE + VALUE = :VALUE + THRUPLAY = :THRUPLAY + DERIVED_EVENTS = :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS = :CONVERSATIONS + IN_APP_VALUE = :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION = :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS = :SUBSCRIBERS + REMINDERS_SET = :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT = :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT = :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT = :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH = :ENGAGED_REACH + ENGAGED_PAGE_VIEWS = :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE = :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE = :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION = :MESSAGING_APPOINTMENT_CONVERSION + + # @!method self.values + # @return [Array] + end + + # The ad platform (meta, tiktok). + # + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :ACTIVE + PAUSED = :PAUSED + + # @!method self.values + # @return [Array] + end + end + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_price + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + required :bid_price, Float, nil?: true + + # @!attribute bid_type + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType, nil] + required :bid_type, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType }, + nil?: true + + # @!attribute billing_event + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent }, + nil?: true + + # @!attribute budget_mode + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode, nil] + required :budget_mode, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode }, + nil?: true + + # @!attribute conversion_bid_price + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + required :conversion_bid_price, Float, nil?: true + + # @!attribute identity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_id, String, nil?: true + + # @!attribute identity_type + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_type, String, nil?: true + + # @!attribute operation_status + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus, nil] + required :operation_status, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus }, + nil?: true + + # @!attribute optimization_event + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :optimization_event, String, nil?: true + + # @!attribute optimization_goal + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing, nil] + required :pacing, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing }, + nil?: true + + # @!attribute pixel_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :pixel_id, String, nil?: true + + # @!attribute placement_type + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType, nil] + required :placement_type, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType }, + nil?: true + + # @!attribute placements + # + # @return [Array, nil] + required :placements, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute platform + # The ad platform (meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform } + + # @!attribute schedule_end_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :schedule_end_time, String, nil?: true + + # @!attribute schedule_start_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :schedule_start_time, String, nil?: true + + # @!attribute schedule_type + # + # @return [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType, nil] + required :schedule_type, + enum: -> { WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType }, + nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :TiktokAdGroupPlatformConfigType] + required :typename, const: :TiktokAdGroupPlatformConfigType + + # @!method initialize(bid_price:, bid_type:, billing_event:, budget_mode:, conversion_bid_price:, identity_id:, identity_type:, operation_status:, optimization_event:, optimization_goal:, pacing:, pixel_id:, placement_type:, placements:, platform:, schedule_end_time:, schedule_start_time:, schedule_type:, typename: :TiktokAdGroupPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType} + # for more details. + # + # TikTok ad group configuration. + # + # @param bid_price [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param bid_type [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType, nil] + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent, nil] + # + # @param budget_mode [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode, nil] + # + # @param conversion_bid_price [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param identity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_type [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param operation_status [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus, nil] + # + # @param optimization_event [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal, nil] + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing, nil] + # + # @param pixel_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType, nil] + # + # @param placements [Array, nil] + # + # @param platform [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform] The ad platform (meta, tiktok). + # + # @param schedule_end_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param schedule_start_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param schedule_type [Symbol, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType, nil] + # + # @param typename [Symbol, :TiktokAdGroupPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#bid_type + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID = :BID_TYPE_NO_BID + BID_TYPE_CUSTOM = :BID_TYPE_CUSTOM + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC = :CPC + CPM = :CPM + OCPM = :OCPM + CPV = :CPV + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#budget_mode + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY = :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL = :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#operation_status + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE = :ENABLE + DISABLE = :DISABLE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK = :CLICK + CONVERT = :CONVERT + INSTALL = :INSTALL + IN_APP_EVENT = :IN_APP_EVENT + REACH = :REACH + SHOW = :SHOW + VIDEO_VIEW = :VIDEO_VIEW + ENGAGED_VIEW = :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN = :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION = :LEAD_GENERATION + PREFERRED_LEAD = :PREFERRED_LEAD + CONVERSATION = :CONVERSATION + FOLLOWERS = :FOLLOWERS + PROFILE_VIEWS = :PROFILE_VIEWS + PAGE_VISIT = :PAGE_VISIT + VALUE = :VALUE + AUTOMATIC_VALUE_OPTIMIZATION = :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW = :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT = :DESTINATION_VISIT + MT_LIVE_ROOM = :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE = :PRODUCT_CLICK_IN_LIVE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH = :PACING_MODE_SMOOTH + PACING_MODE_FAST = :PACING_MODE_FAST + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC = :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL = :PLACEMENT_TYPE_NORMAL + + # @!method self.values + # @return [Array] + end + + # The ad platform (meta, tiktok). + # + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#schedule_type + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END = :SCHEDULE_START_END + SCHEDULE_FROM_NOW = :SCHEDULE_FROM_NOW + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType)] + end + + # Current operational status of the ad group + # + # @see WhopSDK::Models::AdGroupListResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_group_retrieve_params.rb b/lib/whop_sdk/models/ad_group_retrieve_params.rb new file mode 100644 index 00000000..79b04841 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_retrieve_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#retrieve + class AdGroupRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/ad_group_retrieve_response.rb b/lib/whop_sdk/models/ad_group_retrieve_response.rb new file mode 100644 index 00000000..10c4b9cd --- /dev/null +++ b/lib/whop_sdk/models/ad_group_retrieve_response.rb @@ -0,0 +1,1123 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#retrieve + class AdGroupRetrieveResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the external ad group. + # + # @return [String] + required :id, String + + # @!attribute ad_campaign + # The parent ad campaign + # + # @return [WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign] + required :ad_campaign, -> { WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign } + + # @!attribute config + # Unified ad group configuration (platform-agnostic) + # + # @return [WhopSDK::Models::AdGroupRetrieveResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdGroupRetrieveResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the external ad group was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute daily_budget + # Daily budget in dollars (nil for lifetime budgets) + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute name + # Human-readable ad group name + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute platform_config + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + # + # @return [WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, nil] + required :platform_config, union: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig } + + # @!attribute status + # Current operational status of the ad group + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::Status } + + # @!attribute updated_at + # The datetime the external ad group was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, ad_campaign:, config:, created_at:, daily_budget:, name:, platform_config:, status:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupRetrieveResponse} for more details. + # + # An external ad group (ad set) belonging to an ad campaign + # + # @param id [String] The unique identifier for the external ad group. + # + # @param ad_campaign [WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign] The parent ad campaign + # + # @param config [WhopSDK::Models::AdGroupRetrieveResponse::Config, nil] Unified ad group configuration (platform-agnostic) + # + # @param created_at [Time] The datetime the external ad group was created. + # + # @param daily_budget [Float, nil] Daily budget in dollars (nil for lifetime budgets) + # + # @param name [String, nil] Human-readable ad group name + # + # @param platform_config [WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, nil] Typed platform-specific configuration. Use inline fragments (... on MetaAdGroupP + # + # @param status [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Status] Current operational status of the ad group + # + # @param updated_at [Time] The datetime the external ad group was last updated. + + # @see WhopSDK::Models::AdGroupRetrieveResponse#ad_campaign + class AdCampaign < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform, nil] + required :platform, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform }, + nil?: true + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status] + required :status, enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status } + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!method initialize(id:, platform:, status:, title:) + # The parent ad campaign + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param platform [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform, nil] The platforms where an ad campaign can run. + # + # @param status [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status] Current status of the campaign (active, paused, or inactive) + # + # @param title [String] The title of the ad campaign + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy }, + nil?: true + + # @!attribute billing_event + # How you are billed (e.g., impressions, clicks). + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent }, + nil?: true + + # @!attribute end_time + # Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute frequency_cap + # Maximum number of times to show ads to each person in the frequency interval. + # + # @return [Integer, nil] + required :frequency_cap, Integer, nil?: true + + # @!attribute frequency_cap_interval_days + # Number of days for the frequency cap interval. + # + # @return [Integer, nil] + required :frequency_cap_interval_days, Integer, nil?: true + + # @!attribute optimization_goal + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # Budget pacing: standard (even) or accelerated (fast). + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing, nil] + required :pacing, enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing }, nil?: true + + # @!attribute start_time + # Scheduled start time (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute targeting + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @return [WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting, nil] + required :targeting, -> { WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, billing_event:, end_time:, frequency_cap:, frequency_cap_interval_days:, optimization_goal:, pacing:, start_time:, targeting:) + # Unified ad group configuration (platform-agnostic) + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy, nil] Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent, nil] How you are billed (e.g., impressions, clicks). + # + # @param end_time [String, nil] Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @param frequency_cap [Integer, nil] Maximum number of times to show ads to each person in the frequency interval. + # + # @param frequency_cap_interval_days [Integer, nil] Number of days for the frequency cap interval. + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal, nil] What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing, nil] Budget pacing: standard (even) or accelerated (fast). + # + # @param start_time [String, nil] Scheduled start time (ISO8601). + # + # @param targeting [WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting, nil] Audience targeting settings (demographics, geo, interests, audiences, devices). + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # How you are billed (e.g., impressions, clicks). + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::Config#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS = :impressions + CLICKS = :clicks + OPTIMIZED_CPM = :optimized_cpm + VIDEO_VIEWS = :video_views + + # @!method self.values + # @return [Array] + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::Config#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS = :conversions + LINK_CLICKS = :link_clicks + LANDING_PAGE_VIEWS = :landing_page_views + REACH = :reach + IMPRESSIONS = :impressions + APP_INSTALLS = :app_installs + VIDEO_VIEWS = :video_views + LEAD_GENERATION = :lead_generation + VALUE = :value + PAGE_LIKES = :page_likes + CONVERSATIONS = :conversations + AD_RECALL_LIFT = :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :two_second_continuous_video_views + POST_ENGAGEMENT = :post_engagement + EVENT_RESPONSES = :event_responses + REMINDERS_SET = :reminders_set + QUALITY_LEAD = :quality_lead + + # @!method self.values + # @return [Array] + end + + # Budget pacing: standard (even) or accelerated (fast). + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::Config#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD = :standard + ACCELERATED = :accelerated + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::Config#targeting + class Targeting < WhopSDK::Internal::Type::BaseModel + # @!attribute age_max + # Maximum age for demographic targeting. + # + # @return [Integer, nil] + required :age_max, Integer, nil?: true + + # @!attribute age_min + # Minimum age for demographic targeting. + # + # @return [Integer, nil] + required :age_min, Integer, nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes targeted. + # + # @return [Array, nil] + required :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute device_platforms + # Device platforms targeted. + # + # @return [Array, nil] + required :device_platforms, + -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::DevicePlatform] }, + nil?: true + + # @!attribute exclude_audience_ids + # Platform audience IDs excluded. + # + # @return [Array, nil] + required :exclude_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute genders + # Genders targeted. + # + # @return [Array, nil] + required :genders, + -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender] }, + nil?: true + + # @!attribute include_audience_ids + # Platform audience IDs included. + # + # @return [Array, nil] + required :include_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute interest_ids + # Platform-specific interest IDs targeted. + # + # @return [Array, nil] + required :interest_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute languages + # Language codes targeted. + # + # @return [Array, nil] + required :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute placement_type + # Placement strategy for ad delivery. + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType, nil] + required :placement_type, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType }, + nil?: true + + # @!method initialize(age_max:, age_min:, countries:, device_platforms:, exclude_audience_ids:, genders:, include_audience_ids:, interest_ids:, languages:, placement_type:) + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @param age_max [Integer, nil] Maximum age for demographic targeting. + # + # @param age_min [Integer, nil] Minimum age for demographic targeting. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes targeted. + # + # @param device_platforms [Array, nil] Device platforms targeted. + # + # @param exclude_audience_ids [Array, nil] Platform audience IDs excluded. + # + # @param genders [Array, nil] Genders targeted. + # + # @param include_audience_ids [Array, nil] Platform audience IDs included. + # + # @param interest_ids [Array, nil] Platform-specific interest IDs targeted. + # + # @param languages [Array, nil] Language codes targeted. + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType, nil] Placement strategy for ad delivery. + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE = :mobile + DESKTOP = :desktop + + # @!method self.values + # @return [Array] + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE = :male + FEMALE = :female + ALL = :all + + # @!method self.values + # @return [Array] + end + + # Placement strategy for ad delivery. + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC = :automatic + MANUAL = :manual + + # @!method self.values + # @return [Array] + end + end + end + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + # + # @see WhopSDK::Models::AdGroupRetrieveResponse#platform_config + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # Meta (Facebook/Instagram) ad set configuration. + variant :MetaAdGroupPlatformConfigType, + -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType } + + # TikTok ad group configuration. + variant :TiktokAdGroupPlatformConfigType, + -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType } + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute attribution_spec + # + # @return [ArrayObject}>, nil] + required :attribution_spec, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute bid_amount + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy }, + nil?: true + + # @!attribute billing_event + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent }, + nil?: true + + # @!attribute daily_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :daily_budget, Integer, nil?: true + + # @!attribute destination_type + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType, nil] + required :destination_type, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType }, + nil?: true + + # @!attribute end_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute excluded_geo_locations + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :excluded_geo_locations, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute facebook_positions + # + # @return [Array, nil] + required :facebook_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute geo_locations + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :geo_locations, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute instagram_actor_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :instagram_actor_id, String, nil?: true + + # @!attribute instagram_positions + # + # @return [Array, nil] + required :instagram_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute lifetime_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :lifetime_budget, Integer, nil?: true + + # @!attribute optimization_goal + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal }, + nil?: true + + # @!attribute page_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :page_id, String, nil?: true + + # @!attribute platform + # The ad platform (meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform } + + # @!attribute promoted_object + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :promoted_object, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute publisher_platforms + # + # @return [Array, nil] + required :publisher_platforms, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute status + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status, nil] + required :status, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status }, + nil?: true + + # @!attribute targeting_automation + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :targeting_automation, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :MetaAdGroupPlatformConfigType] + required :typename, const: :MetaAdGroupPlatformConfigType + + # @!method initialize(attribution_spec:, bid_amount:, bid_strategy:, billing_event:, daily_budget:, destination_type:, end_time:, excluded_geo_locations:, facebook_positions:, geo_locations:, instagram_actor_id:, instagram_positions:, lifetime_budget:, optimization_goal:, page_id:, platform:, promoted_object:, publisher_platforms:, status:, targeting_automation:, typename: :MetaAdGroupPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType} + # for more details. + # + # Meta (Facebook/Instagram) ad set configuration. + # + # @param attribution_spec [ArrayObject}>, nil] + # + # @param bid_amount [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy, nil] + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent, nil] + # + # @param daily_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param destination_type [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType, nil] + # + # @param end_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param excluded_geo_locations [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param facebook_positions [Array, nil] + # + # @param geo_locations [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param instagram_actor_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param instagram_positions [Array, nil] + # + # @param lifetime_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal, nil] + # + # @param page_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform] The ad platform (meta, tiktok). + # + # @param promoted_object [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param publisher_platforms [Array, nil] + # + # @param status [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status, nil] + # + # @param targeting_automation [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param typename [Symbol, :MetaAdGroupPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP = :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP = :LOWEST_COST_WITH_BID_CAP + COST_CAP = :COST_CAP + LOWEST_COST_WITH_MIN_ROAS = :LOWEST_COST_WITH_MIN_ROAS + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS = :APP_INSTALLS + CLICKS = :CLICKS + IMPRESSIONS = :IMPRESSIONS + LINK_CLICKS = :LINK_CLICKS + NONE = :NONE + OFFER_CLAIMS = :OFFER_CLAIMS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + THRUPLAY = :THRUPLAY + PURCHASE = :PURCHASE + LISTING_INTERACTION = :LISTING_INTERACTION + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType#destination_type + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED = :UNDEFINED + WEBSITE = :WEBSITE + APP = :APP + FACEBOOK = :FACEBOOK + MESSENGER = :MESSENGER + WHATSAPP = :WHATSAPP + INSTAGRAM_DIRECT = :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE = :INSTAGRAM_PROFILE + PHONE_CALL = :PHONE_CALL + SHOP_AUTOMATIC = :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC = :APPLINKS_AUTOMATIC + ON_AD = :ON_AD + ON_POST = :ON_POST + ON_VIDEO = :ON_VIDEO + ON_PAGE = :ON_PAGE + ON_EVENT = :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP = :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE = :FACEBOOK_PAGE + INSTAGRAM_LIVE = :INSTAGRAM_LIVE + FACEBOOK_LIVE = :FACEBOOK_LIVE + IMAGINE = :IMAGINE + LEAD_FROM_IG_DIRECT = :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER = :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM = :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL = :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL = :BROADCAST_CHANNEL + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE = :NONE + APP_INSTALLS = :APP_INSTALLS + AD_RECALL_LIFT = :AD_RECALL_LIFT + ENGAGED_USERS = :ENGAGED_USERS + EVENT_RESPONSES = :EVENT_RESPONSES + IMPRESSIONS = :IMPRESSIONS + LEAD_GENERATION = :LEAD_GENERATION + QUALITY_LEAD = :QUALITY_LEAD + LINK_CLICKS = :LINK_CLICKS + OFFSITE_CONVERSIONS = :OFFSITE_CONVERSIONS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + QUALITY_CALL = :QUALITY_CALL + REACH = :REACH + LANDING_PAGE_VIEWS = :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE = :VISIT_INSTAGRAM_PROFILE + VALUE = :VALUE + THRUPLAY = :THRUPLAY + DERIVED_EVENTS = :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS = :CONVERSATIONS + IN_APP_VALUE = :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION = :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS = :SUBSCRIBERS + REMINDERS_SET = :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT = :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT = :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT = :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH = :ENGAGED_REACH + ENGAGED_PAGE_VIEWS = :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE = :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE = :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION = :MESSAGING_APPOINTMENT_CONVERSION + + # @!method self.values + # @return [Array] + end + + # The ad platform (meta, tiktok). + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :ACTIVE + PAUSED = :PAUSED + + # @!method self.values + # @return [Array] + end + end + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_price + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + required :bid_price, Float, nil?: true + + # @!attribute bid_type + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType, nil] + required :bid_type, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType }, + nil?: true + + # @!attribute billing_event + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent }, + nil?: true + + # @!attribute budget_mode + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode, nil] + required :budget_mode, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode }, + nil?: true + + # @!attribute conversion_bid_price + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + required :conversion_bid_price, Float, nil?: true + + # @!attribute identity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_id, String, nil?: true + + # @!attribute identity_type + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_type, String, nil?: true + + # @!attribute operation_status + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus, nil] + required :operation_status, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus }, + nil?: true + + # @!attribute optimization_event + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :optimization_event, String, nil?: true + + # @!attribute optimization_goal + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing, nil] + required :pacing, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing }, + nil?: true + + # @!attribute pixel_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :pixel_id, String, nil?: true + + # @!attribute placement_type + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType, nil] + required :placement_type, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType }, + nil?: true + + # @!attribute placements + # + # @return [Array, nil] + required :placements, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute platform + # The ad platform (meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform } + + # @!attribute schedule_end_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :schedule_end_time, String, nil?: true + + # @!attribute schedule_start_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :schedule_start_time, String, nil?: true + + # @!attribute schedule_type + # + # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType, nil] + required :schedule_type, + enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType }, + nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :TiktokAdGroupPlatformConfigType] + required :typename, const: :TiktokAdGroupPlatformConfigType + + # @!method initialize(bid_price:, bid_type:, billing_event:, budget_mode:, conversion_bid_price:, identity_id:, identity_type:, operation_status:, optimization_event:, optimization_goal:, pacing:, pixel_id:, placement_type:, placements:, platform:, schedule_end_time:, schedule_start_time:, schedule_type:, typename: :TiktokAdGroupPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType} + # for more details. + # + # TikTok ad group configuration. + # + # @param bid_price [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param bid_type [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType, nil] + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent, nil] + # + # @param budget_mode [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode, nil] + # + # @param conversion_bid_price [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param identity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_type [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param operation_status [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus, nil] + # + # @param optimization_event [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal, nil] + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing, nil] + # + # @param pixel_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType, nil] + # + # @param placements [Array, nil] + # + # @param platform [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform] The ad platform (meta, tiktok). + # + # @param schedule_end_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param schedule_start_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param schedule_type [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType, nil] + # + # @param typename [Symbol, :TiktokAdGroupPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#bid_type + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID = :BID_TYPE_NO_BID + BID_TYPE_CUSTOM = :BID_TYPE_CUSTOM + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC = :CPC + CPM = :CPM + OCPM = :OCPM + CPV = :CPV + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#budget_mode + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY = :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL = :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#operation_status + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE = :ENABLE + DISABLE = :DISABLE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK = :CLICK + CONVERT = :CONVERT + INSTALL = :INSTALL + IN_APP_EVENT = :IN_APP_EVENT + REACH = :REACH + SHOW = :SHOW + VIDEO_VIEW = :VIDEO_VIEW + ENGAGED_VIEW = :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN = :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION = :LEAD_GENERATION + PREFERRED_LEAD = :PREFERRED_LEAD + CONVERSATION = :CONVERSATION + FOLLOWERS = :FOLLOWERS + PROFILE_VIEWS = :PROFILE_VIEWS + PAGE_VISIT = :PAGE_VISIT + VALUE = :VALUE + AUTOMATIC_VALUE_OPTIMIZATION = :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW = :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT = :DESTINATION_VISIT + MT_LIVE_ROOM = :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE = :PRODUCT_CLICK_IN_LIVE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH = :PACING_MODE_SMOOTH + PACING_MODE_FAST = :PACING_MODE_FAST + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC = :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL = :PLACEMENT_TYPE_NORMAL + + # @!method self.values + # @return [Array] + end + + # The ad platform (meta, tiktok). + # + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#schedule_type + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END = :SCHEDULE_START_END + SCHEDULE_FROM_NOW = :SCHEDULE_FROM_NOW + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType)] + end + + # Current operational status of the ad group + # + # @see WhopSDK::Models::AdGroupRetrieveResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_group_update_params.rb b/lib/whop_sdk/models/ad_group_update_params.rb new file mode 100644 index 00000000..5d3282c4 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_update_params.rb @@ -0,0 +1,3207 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#update + class AdGroupUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute budget + # Budget amount in dollars. + # + # @return [Float, nil] + optional :budget, Float, nil?: true + + # @!attribute budget_type + # The budget type for an ad campaign or ad group. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::BudgetType, nil] + optional :budget_type, enum: -> { WhopSDK::AdGroupUpdateParams::BudgetType }, nil?: true + + # @!attribute config + # Unified ad group configuration (bidding, optimization, targeting). + # + # @return [WhopSDK::Models::AdGroupUpdateParams::Config, nil] + optional :config, -> { WhopSDK::AdGroupUpdateParams::Config }, nil?: true + + # @!attribute daily_budget + # Daily budget in dollars. + # + # @return [Float, nil] + optional :daily_budget, Float, nil?: true + + # @!attribute name + # Human-readable ad group name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute platform_config + # Platform-specific ad group configuration. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig, nil] + optional :platform_config, -> { WhopSDK::AdGroupUpdateParams::PlatformConfig }, nil?: true + + # @!attribute status + # The status of an external ad group. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Status, nil] + optional :status, enum: -> { WhopSDK::AdGroupUpdateParams::Status }, nil?: true + + # @!method initialize(id:, budget: nil, budget_type: nil, config: nil, daily_budget: nil, name: nil, platform_config: nil, status: nil, request_options: {}) + # @param id [String] + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::BudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param config [WhopSDK::Models::AdGroupUpdateParams::Config, nil] Unified ad group configuration (bidding, optimization, targeting). + # + # @param daily_budget [Float, nil] Daily budget in dollars. + # + # @param name [String, nil] Human-readable ad group name. + # + # @param platform_config [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig, nil] Platform-specific ad group configuration. + # + # @param status [Symbol, WhopSDK::Models::AdGroupUpdateParams::Status, nil] The status of an external ad group. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The budget type for an ad campaign or ad group. + module BudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY = :daily + LIFETIME = :lifetime + + # @!method self.values + # @return [Array] + end + + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @return [Integer, nil] + optional :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::BidStrategy, nil] + optional :bid_strategy, enum: -> { WhopSDK::AdGroupUpdateParams::Config::BidStrategy }, nil?: true + + # @!attribute billing_event + # How you are billed (e.g., impressions, clicks). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::BillingEvent, nil] + optional :billing_event, enum: -> { WhopSDK::AdGroupUpdateParams::Config::BillingEvent }, nil?: true + + # @!attribute end_time + # Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @return [String, nil] + optional :end_time, String, nil?: true + + # @!attribute frequency_cap + # Maximum number of times to show ads to each person in the frequency interval. + # + # @return [Integer, nil] + optional :frequency_cap, Integer, nil?: true + + # @!attribute frequency_cap_interval_days + # Number of days for the frequency cap interval. + # + # @return [Integer, nil] + optional :frequency_cap_interval_days, Integer, nil?: true + + # @!attribute optimization_goal + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::OptimizationGoal, nil] + optional :optimization_goal, + enum: -> { WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # Budget pacing: standard (even) or accelerated (fast). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Pacing, nil] + optional :pacing, enum: -> { WhopSDK::AdGroupUpdateParams::Config::Pacing }, nil?: true + + # @!attribute start_time + # Scheduled start time (ISO8601). + # + # @return [String, nil] + optional :start_time, String, nil?: true + + # @!attribute targeting + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @return [WhopSDK::Models::AdGroupUpdateParams::Config::Targeting, nil] + optional :targeting, -> { WhopSDK::AdGroupUpdateParams::Config::Targeting }, nil?: true + + # @!method initialize(bid_amount: nil, bid_strategy: nil, billing_event: nil, end_time: nil, frequency_cap: nil, frequency_cap_interval_days: nil, optimization_goal: nil, pacing: nil, start_time: nil, targeting: nil) + # Unified ad group configuration (bidding, optimization, targeting). + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::BidStrategy, nil] Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::BillingEvent, nil] How you are billed (e.g., impressions, clicks). + # + # @param end_time [String, nil] Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @param frequency_cap [Integer, nil] Maximum number of times to show ads to each person in the frequency interval. + # + # @param frequency_cap_interval_days [Integer, nil] Number of days for the frequency cap interval. + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::OptimizationGoal, nil] What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Pacing, nil] Budget pacing: standard (even) or accelerated (fast). + # + # @param start_time [String, nil] Scheduled start time (ISO8601). + # + # @param targeting [WhopSDK::Models::AdGroupUpdateParams::Config::Targeting, nil] Audience targeting settings (demographics, geo, interests, audiences, devices). + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @see WhopSDK::Models::AdGroupUpdateParams::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # How you are billed (e.g., impressions, clicks). + # + # @see WhopSDK::Models::AdGroupUpdateParams::Config#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS = :impressions + CLICKS = :clicks + OPTIMIZED_CPM = :optimized_cpm + VIDEO_VIEWS = :video_views + + # @!method self.values + # @return [Array] + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @see WhopSDK::Models::AdGroupUpdateParams::Config#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS = :conversions + LINK_CLICKS = :link_clicks + LANDING_PAGE_VIEWS = :landing_page_views + REACH = :reach + IMPRESSIONS = :impressions + APP_INSTALLS = :app_installs + VIDEO_VIEWS = :video_views + LEAD_GENERATION = :lead_generation + VALUE = :value + PAGE_LIKES = :page_likes + CONVERSATIONS = :conversations + AD_RECALL_LIFT = :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :two_second_continuous_video_views + POST_ENGAGEMENT = :post_engagement + EVENT_RESPONSES = :event_responses + REMINDERS_SET = :reminders_set + QUALITY_LEAD = :quality_lead + + # @!method self.values + # @return [Array] + end + + # Budget pacing: standard (even) or accelerated (fast). + # + # @see WhopSDK::Models::AdGroupUpdateParams::Config#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD = :standard + ACCELERATED = :accelerated + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::Config#targeting + class Targeting < WhopSDK::Internal::Type::BaseModel + # @!attribute age_max + # Maximum age for demographic targeting. + # + # @return [Integer, nil] + optional :age_max, Integer, nil?: true + + # @!attribute age_min + # Minimum age for demographic targeting. + # + # @return [Integer, nil] + optional :age_min, Integer, nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes to target. + # + # @return [Array, nil] + optional :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute device_platforms + # Device platforms to target. + # + # @return [Array, nil] + optional :device_platforms, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform] + }, + nil?: true + + # @!attribute exclude_audience_ids + # Platform audience IDs to exclude. + # + # @return [Array, nil] + optional :exclude_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute genders + # Genders to target. + # + # @return [Array, nil] + optional :genders, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender] + }, + nil?: true + + # @!attribute include_audience_ids + # Platform audience IDs to include. + # + # @return [Array, nil] + optional :include_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute interest_ids + # Platform-specific interest IDs to target. + # + # @return [Array, nil] + optional :interest_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute languages + # Language codes to target. + # + # @return [Array, nil] + optional :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute placement_type + # Placement strategy for ad delivery. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::PlacementType, nil] + optional :placement_type, + enum: -> { WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType }, + nil?: true + + # @!method initialize(age_max: nil, age_min: nil, countries: nil, device_platforms: nil, exclude_audience_ids: nil, genders: nil, include_audience_ids: nil, interest_ids: nil, languages: nil, placement_type: nil) + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @param age_max [Integer, nil] Maximum age for demographic targeting. + # + # @param age_min [Integer, nil] Minimum age for demographic targeting. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes to target. + # + # @param device_platforms [Array, nil] Device platforms to target. + # + # @param exclude_audience_ids [Array, nil] Platform audience IDs to exclude. + # + # @param genders [Array, nil] Genders to target. + # + # @param include_audience_ids [Array, nil] Platform audience IDs to include. + # + # @param interest_ids [Array, nil] Platform-specific interest IDs to target. + # + # @param languages [Array, nil] Language codes to target. + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::PlacementType, nil] Placement strategy for ad delivery. + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE = :mobile + DESKTOP = :desktop + + # @!method self.values + # @return [Array] + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE = :male + FEMALE = :female + ALL = :all + + # @!method self.values + # @return [Array] + end + + # Placement strategy for ad delivery. + # + # @see WhopSDK::Models::AdGroupUpdateParams::Config::Targeting#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC = :automatic + MANUAL = :manual + + # @!method self.values + # @return [Array] + end + end + end + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + # @!attribute meta + # Meta (Facebook/Instagram) ad set configuration. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta, nil] + optional :meta, -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta }, nil?: true + + # @!attribute tiktok + # TikTok ad group configuration. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok, nil] + optional :tiktok, -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok }, nil?: true + + # @!method initialize(meta: nil, tiktok: nil) + # Platform-specific ad group configuration. + # + # @param meta [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta, nil] Meta (Facebook/Instagram) ad set configuration. + # + # @param tiktok [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok, nil] TikTok ad group configuration. + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig#meta + class Meta < WhopSDK::Internal::Type::BaseModel + # @!attribute android_devices + # + # @return [Array, nil] + optional :android_devices, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute attribution_setting + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :attribution_setting, String, nil?: true + + # @!attribute attribution_spec + # Conversion attribution windows. + # + # @return [Array, nil] + optional :attribution_spec, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec] + }, + nil?: true + + # @!attribute audience_network_positions + # + # @return [Array, nil] + optional :audience_network_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute audience_type + # Audience type for retargeting. + # + # @return [String, nil] + optional :audience_type, String, nil?: true + + # @!attribute bid_amount + # Bid amount in cents. + # + # @return [Integer, nil] + optional :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # Meta bid strategy. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy, nil] + optional :bid_strategy, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy }, + nil?: true + + # @!attribute billing_event + # How you are billed on Meta. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent, nil] + optional :billing_event, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent }, + nil?: true + + # @!attribute brand_safety_content_filter_levels + # + # @return [Array, nil] + optional :brand_safety_content_filter_levels, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute budget_remaining + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :budget_remaining, String, nil?: true + + # @!attribute cost_per_result_goal + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + optional :cost_per_result_goal, Float, nil?: true + + # @!attribute created_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :created_time, String, nil?: true + + # @!attribute daily_budget + # Daily budget in cents. + # + # @return [Integer, nil] + optional :daily_budget, Integer, nil?: true + + # @!attribute daily_min_spend_target + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :daily_min_spend_target, String, nil?: true + + # @!attribute daily_spend_cap + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :daily_spend_cap, String, nil?: true + + # @!attribute destination_type + # Where ads in this ad set direct people. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType, nil] + optional :destination_type, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType }, + nil?: true + + # @!attribute dsa_beneficiary + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :dsa_beneficiary, String, nil?: true + + # @!attribute dsa_payor + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :dsa_payor, String, nil?: true + + # @!attribute end_time + # End time (ISO8601). Required for lifetime budgets. + # + # @return [String, nil] + optional :end_time, String, nil?: true + + # @!attribute excluded_geo_locations + # Geo locations to exclude. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations, nil] + optional :excluded_geo_locations, + -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations }, + nil?: true + + # @!attribute facebook_positions + # Facebook ad placements (feed, reels, stories, etc.). + # + # @return [Array, nil] + optional :facebook_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute frequency_control_count + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :frequency_control_count, Integer, nil?: true + + # @!attribute frequency_control_days + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :frequency_control_days, Integer, nil?: true + + # @!attribute frequency_control_type + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :frequency_control_type, String, nil?: true + + # @!attribute geo_cities + # + # @return [Array, nil] + optional :geo_cities, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity] + }, + nil?: true + + # @!attribute geo_locations + # Geo targeting (countries, regions, cities, zips). + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations, nil] + optional :geo_locations, + -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations }, + nil?: true + + # @!attribute geo_regions + # + # @return [Array, nil] + optional :geo_regions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion] + }, + nil?: true + + # @!attribute geo_zips + # + # @return [Array, nil] + optional :geo_zips, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute instagram_actor_id + # Instagram account ID for this ad set. + # + # @return [String, nil] + optional :instagram_actor_id, String, nil?: true + + # @!attribute instagram_positions + # Instagram ad placements (stream, story, reels, etc.). + # + # @return [Array, nil] + optional :instagram_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute ios_devices + # + # @return [Array, nil] + optional :ios_devices, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute is_dynamic_creative + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :is_dynamic_creative, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute lead_conversion_location + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation, nil] + optional :lead_conversion_location, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation }, + nil?: true + + # @!attribute lead_form_config + # Configuration for a Meta lead gen instant form. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig, nil] + optional :lead_form_config, + -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig }, + nil?: true + + # @!attribute lead_gen_form_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :lead_gen_form_id, String, nil?: true + + # @!attribute lifetime_budget + # Lifetime budget in cents. + # + # @return [Integer, nil] + optional :lifetime_budget, Integer, nil?: true + + # @!attribute lifetime_min_spend_target + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :lifetime_min_spend_target, String, nil?: true + + # @!attribute lifetime_spend_cap + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :lifetime_spend_cap, String, nil?: true + + # @!attribute location_types + # + # @return [Array, nil] + optional :location_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute messenger_positions + # + # @return [Array, nil] + optional :messenger_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute optimization_goal + # What this ad set optimizes for on Meta. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal, nil] + optional :optimization_goal, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal }, + nil?: true + + # @!attribute page_id + # Facebook Page ID for this ad set. + # + # @return [String, nil] + optional :page_id, String, nil?: true + + # @!attribute pixel_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :pixel_id, String, nil?: true + + # @!attribute promoted_object + # The object this ad set promotes (pixel, page, etc.). + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject, nil] + optional :promoted_object, + -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject }, + nil?: true + + # @!attribute publisher_platforms + # Platforms to publish on (facebook, instagram, messenger, audience_network). + # + # @return [Array, nil] + optional :publisher_platforms, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute source_adset_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :source_adset_id, String, nil?: true + + # @!attribute start_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :start_time, String, nil?: true + + # @!attribute status + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::Status, nil] + optional :status, + enum: -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::Status + }, + nil?: true + + # @!attribute targeting_automation + # Advantage+ audience expansion settings. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation, nil] + optional :targeting_automation, + -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation }, + nil?: true + + # @!attribute threads_positions + # + # @return [Array, nil] + optional :threads_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute updated_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :updated_time, String, nil?: true + + # @!attribute user_device + # + # @return [Array, nil] + optional :user_device, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute user_os + # + # @return [Array, nil] + optional :user_os, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute whatsapp_phone_number + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :whatsapp_phone_number, String, nil?: true + + # @!attribute whatsapp_positions + # + # @return [Array, nil] + optional :whatsapp_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!method initialize(android_devices: nil, attribution_setting: nil, attribution_spec: nil, audience_network_positions: nil, audience_type: nil, bid_amount: nil, bid_strategy: nil, billing_event: nil, brand_safety_content_filter_levels: nil, budget_remaining: nil, cost_per_result_goal: nil, created_time: nil, daily_budget: nil, daily_min_spend_target: nil, daily_spend_cap: nil, destination_type: nil, dsa_beneficiary: nil, dsa_payor: nil, end_time: nil, excluded_geo_locations: nil, facebook_positions: nil, frequency_control_count: nil, frequency_control_days: nil, frequency_control_type: nil, geo_cities: nil, geo_locations: nil, geo_regions: nil, geo_zips: nil, instagram_actor_id: nil, instagram_positions: nil, ios_devices: nil, is_dynamic_creative: nil, lead_conversion_location: nil, lead_form_config: nil, lead_gen_form_id: nil, lifetime_budget: nil, lifetime_min_spend_target: nil, lifetime_spend_cap: nil, location_types: nil, messenger_positions: nil, optimization_goal: nil, page_id: nil, pixel_id: nil, promoted_object: nil, publisher_platforms: nil, source_adset_id: nil, start_time: nil, status: nil, targeting_automation: nil, threads_positions: nil, updated_time: nil, user_device: nil, user_os: nil, whatsapp_phone_number: nil, whatsapp_positions: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta} for more details. + # + # Meta (Facebook/Instagram) ad set configuration. + # + # @param android_devices [Array, nil] + # + # @param attribution_setting [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param attribution_spec [Array, nil] Conversion attribution windows. + # + # @param audience_network_positions [Array, nil] + # + # @param audience_type [String, nil] Audience type for retargeting. + # + # @param bid_amount [Integer, nil] Bid amount in cents. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy, nil] Meta bid strategy. + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent, nil] How you are billed on Meta. + # + # @param brand_safety_content_filter_levels [Array, nil] + # + # @param budget_remaining [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param cost_per_result_goal [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param created_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param daily_budget [Integer, nil] Daily budget in cents. + # + # @param daily_min_spend_target [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param daily_spend_cap [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param destination_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType, nil] Where ads in this ad set direct people. + # + # @param dsa_beneficiary [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param dsa_payor [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param end_time [String, nil] End time (ISO8601). Required for lifetime budgets. + # + # @param excluded_geo_locations [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations, nil] Geo locations to exclude. + # + # @param facebook_positions [Array, nil] Facebook ad placements (feed, reels, stories, etc.). + # + # @param frequency_control_count [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param frequency_control_days [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param frequency_control_type [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param geo_cities [Array, nil] + # + # @param geo_locations [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations, nil] Geo targeting (countries, regions, cities, zips). + # + # @param geo_regions [Array, nil] + # + # @param geo_zips [Array, nil] + # + # @param instagram_actor_id [String, nil] Instagram account ID for this ad set. + # + # @param instagram_positions [Array, nil] Instagram ad placements (stream, story, reels, etc.). + # + # @param ios_devices [Array, nil] + # + # @param is_dynamic_creative [Boolean, nil] Represents `true` or `false` values. + # + # @param lead_conversion_location [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation, nil] + # + # @param lead_form_config [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig, nil] Configuration for a Meta lead gen instant form. + # + # @param lead_gen_form_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param lifetime_budget [Integer, nil] Lifetime budget in cents. + # + # @param lifetime_min_spend_target [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param lifetime_spend_cap [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param location_types [Array, nil] + # + # @param messenger_positions [Array, nil] + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal, nil] What this ad set optimizes for on Meta. + # + # @param page_id [String, nil] Facebook Page ID for this ad set. + # + # @param pixel_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param promoted_object [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject, nil] The object this ad set promotes (pixel, page, etc.). + # + # @param publisher_platforms [Array, nil] Platforms to publish on (facebook, instagram, messenger, audience_network). + # + # @param source_adset_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param start_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param status [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::Status, nil] + # + # @param targeting_automation [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation, nil] Advantage+ audience expansion settings. + # + # @param threads_positions [Array, nil] + # + # @param updated_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param user_device [Array, nil] + # + # @param user_os [Array, nil] + # + # @param whatsapp_phone_number [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param whatsapp_positions [Array, nil] + + class AttributionSpec < WhopSDK::Internal::Type::BaseModel + # @!attribute event_type + # Attribution event type (e.g., CLICK_THROUGH, VIEW_THROUGH). + # + # @return [String] + required :event_type, String + + # @!attribute window_days + # Attribution window in days (1, 7, 28). + # + # @return [Integer] + required :window_days, Integer + + # @!method initialize(event_type:, window_days:) + # Meta conversion attribution window. + # + # @param event_type [String] Attribution event type (e.g., CLICK_THROUGH, VIEW_THROUGH). + # + # @param window_days [Integer] Attribution window in days (1, 7, 28). + end + + # Meta bid strategy. + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP = :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP = :LOWEST_COST_WITH_BID_CAP + COST_CAP = :COST_CAP + LOWEST_COST_WITH_MIN_ROAS = :LOWEST_COST_WITH_MIN_ROAS + + # @!method self.values + # @return [Array] + end + + # How you are billed on Meta. + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS = :APP_INSTALLS + CLICKS = :CLICKS + IMPRESSIONS = :IMPRESSIONS + LINK_CLICKS = :LINK_CLICKS + NONE = :NONE + OFFER_CLAIMS = :OFFER_CLAIMS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + THRUPLAY = :THRUPLAY + PURCHASE = :PURCHASE + LISTING_INTERACTION = :LISTING_INTERACTION + + # @!method self.values + # @return [Array] + end + + # Where ads in this ad set direct people. + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#destination_type + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED = :UNDEFINED + WEBSITE = :WEBSITE + APP = :APP + FACEBOOK = :FACEBOOK + MESSENGER = :MESSENGER + WHATSAPP = :WHATSAPP + INSTAGRAM_DIRECT = :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE = :INSTAGRAM_PROFILE + PHONE_CALL = :PHONE_CALL + SHOP_AUTOMATIC = :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC = :APPLINKS_AUTOMATIC + ON_AD = :ON_AD + ON_POST = :ON_POST + ON_VIDEO = :ON_VIDEO + ON_PAGE = :ON_PAGE + ON_EVENT = :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP = :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE = :FACEBOOK_PAGE + INSTAGRAM_LIVE = :INSTAGRAM_LIVE + FACEBOOK_LIVE = :FACEBOOK_LIVE + IMAGINE = :IMAGINE + LEAD_FROM_IG_DIRECT = :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER = :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM = :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL = :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL = :BROADCAST_CHANNEL + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#excluded_geo_locations + class ExcludedGeoLocations < WhopSDK::Internal::Type::BaseModel + # @!attribute cities + # City targets. + # + # @return [Array, nil] + optional :cities, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City] + }, + nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes. + # + # @return [Array, nil] + optional :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute location_types + # Location types (home, recent, travel_in). + # + # @return [Array, nil] + optional :location_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute regions + # Region/state targets. + # + # @return [Array, nil] + optional :regions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region] + }, + nil?: true + + # @!attribute zips + # Zip/postal code targets. + # + # @return [Array, nil] + optional :zips, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip] + }, + nil?: true + + # @!method initialize(cities: nil, countries: nil, location_types: nil, regions: nil, zips: nil) + # Geo locations to exclude. + # + # @param cities [Array, nil] City targets. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes. + # + # @param location_types [Array, nil] Location types (home, recent, travel_in). + # + # @param regions [Array, nil] Region/state targets. + # + # @param zips [Array, nil] Zip/postal code targets. + + class City < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + class Region < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + class Zip < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + end + + class GeoCity < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#geo_locations + class GeoLocations < WhopSDK::Internal::Type::BaseModel + # @!attribute cities + # City targets. + # + # @return [Array, nil] + optional :cities, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City] + }, + nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes. + # + # @return [Array, nil] + optional :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute location_types + # Location types (home, recent, travel_in). + # + # @return [Array, nil] + optional :location_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute regions + # Region/state targets. + # + # @return [Array, nil] + optional :regions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region] + }, + nil?: true + + # @!attribute zips + # Zip/postal code targets. + # + # @return [Array, nil] + optional :zips, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip] + }, + nil?: true + + # @!method initialize(cities: nil, countries: nil, location_types: nil, regions: nil, zips: nil) + # Geo targeting (countries, regions, cities, zips). + # + # @param cities [Array, nil] City targets. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes. + # + # @param location_types [Array, nil] Location types (home, recent, travel_in). + # + # @param regions [Array, nil] Region/state targets. + # + # @param zips [Array, nil] Zip/postal code targets. + + class City < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + class Region < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + class Zip < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + end + + class GeoRegion < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Meta geo target key/ID. + # + # @return [String] + required :key, String + + # @!attribute country + # Country code for this entry. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute name + # Display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute radius + # Radius in miles (cities only). + # + # @return [Integer, nil] + optional :radius, Integer, nil?: true + + # @!method initialize(key:, country: nil, name: nil, radius: nil) + # A Meta geo target entry (region, city, or zip). + # + # @param key [String] Meta geo target key/ID. + # + # @param country [String, nil] Country code for this entry. + # + # @param name [String, nil] Display name. + # + # @param radius [Integer, nil] Radius in miles (cities only). + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#lead_conversion_location + module LeadConversionLocation + extend WhopSDK::Internal::Type::Enum + + WEBSITE = :website + INSTANT_FORMS = :instant_forms + MESSENGER = :messenger + INSTAGRAM = :instagram + CALLS = :calls + APP = :app + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#lead_form_config + class LeadFormConfig < WhopSDK::Internal::Type::BaseModel + # @!attribute name + # Name of the lead form. + # + # @return [String] + required :name, String + + # @!attribute privacy_policy_url + # URL to your privacy policy. Required by Meta. + # + # @return [String] + required :privacy_policy_url, String + + # @!attribute questions + # Questions to ask on the form. + # + # @return [Array] + required :questions, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question] } + + # @!attribute background_image_source + # Background image source: from_ad or custom. + # + # @return [String, nil] + optional :background_image_source, String, nil?: true + + # @!attribute background_image_url + # URL of custom background image. + # + # @return [String, nil] + optional :background_image_url, String, nil?: true + + # @!attribute conditional_logic_enabled + # Whether conditional logic is enabled for questions. + # + # @return [Boolean, nil] + optional :conditional_logic_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute context_card_button_text + # CTA button text on the greeting card. + # + # @return [String, nil] + optional :context_card_button_text, String, nil?: true + + # @!attribute context_card_content + # Optional greeting card bullet points. + # + # @return [Array, nil] + optional :context_card_content, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute context_card_style + # Greeting layout: PARAGRAPH_STYLE or LIST_STYLE. + # + # @return [String, nil] + optional :context_card_style, String, nil?: true + + # @!attribute context_card_title + # Optional greeting card title. + # + # @return [String, nil] + optional :context_card_title, String, nil?: true + + # @!attribute custom_disclaimer_body + # Custom disclaimer body text. + # + # @return [String, nil] + optional :custom_disclaimer_body, String, nil?: true + + # @!attribute custom_disclaimer_checkboxes + # Consent checkboxes for the custom disclaimer. + # + # @return [Array, nil] + optional :custom_disclaimer_checkboxes, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox] + }, + nil?: true + + # @!attribute custom_disclaimer_title + # Custom disclaimer section title. + # + # @return [String, nil] + optional :custom_disclaimer_title, String, nil?: true + + # @!attribute form_type + # Form type: more_volume, higher_intent, or rich_creative. + # + # @return [String, nil] + optional :form_type, String, nil?: true + + # @!attribute messenger_enabled + # Enable Messenger follow-up after form submission. + # + # @return [Boolean, nil] + optional :messenger_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute phone_verification_enabled + # Require phone number verification via OTP (higher_intent only). + # + # @return [Boolean, nil] + optional :phone_verification_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute privacy_policy_link_text + # Custom link text for privacy policy (max 70 chars). + # + # @return [String, nil] + optional :privacy_policy_link_text, String, nil?: true + + # @!attribute question_page_custom_headline + # Custom headline for the questions page. + # + # @return [String, nil] + optional :question_page_custom_headline, String, nil?: true + + # @!attribute rich_creative_headline + # Headline for rich creative form intro. + # + # @return [String, nil] + optional :rich_creative_headline, String, nil?: true + + # @!attribute rich_creative_overview + # Overview description for rich creative form intro. + # + # @return [String, nil] + optional :rich_creative_overview, String, nil?: true + + # @!attribute rich_creative_url + # Uploaded image URL for rich creative form type. + # + # @return [String, nil] + optional :rich_creative_url, String, nil?: true + + # @!attribute thank_you_pages + # Thank you / ending pages (supports multiple for conditional routing). + # + # @return [Array, nil] + optional :thank_you_pages, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage] + }, + nil?: true + + # @!method initialize(name:, privacy_policy_url:, questions:, background_image_source: nil, background_image_url: nil, conditional_logic_enabled: nil, context_card_button_text: nil, context_card_content: nil, context_card_style: nil, context_card_title: nil, custom_disclaimer_body: nil, custom_disclaimer_checkboxes: nil, custom_disclaimer_title: nil, form_type: nil, messenger_enabled: nil, phone_verification_enabled: nil, privacy_policy_link_text: nil, question_page_custom_headline: nil, rich_creative_headline: nil, rich_creative_overview: nil, rich_creative_url: nil, thank_you_pages: nil) + # Configuration for a Meta lead gen instant form. + # + # @param name [String] Name of the lead form. + # + # @param privacy_policy_url [String] URL to your privacy policy. Required by Meta. + # + # @param questions [Array] Questions to ask on the form. + # + # @param background_image_source [String, nil] Background image source: from_ad or custom. + # + # @param background_image_url [String, nil] URL of custom background image. + # + # @param conditional_logic_enabled [Boolean, nil] Whether conditional logic is enabled for questions. + # + # @param context_card_button_text [String, nil] CTA button text on the greeting card. + # + # @param context_card_content [Array, nil] Optional greeting card bullet points. + # + # @param context_card_style [String, nil] Greeting layout: PARAGRAPH_STYLE or LIST_STYLE. + # + # @param context_card_title [String, nil] Optional greeting card title. + # + # @param custom_disclaimer_body [String, nil] Custom disclaimer body text. + # + # @param custom_disclaimer_checkboxes [Array, nil] Consent checkboxes for the custom disclaimer. + # + # @param custom_disclaimer_title [String, nil] Custom disclaimer section title. + # + # @param form_type [String, nil] Form type: more_volume, higher_intent, or rich_creative. + # + # @param messenger_enabled [Boolean, nil] Enable Messenger follow-up after form submission. + # + # @param phone_verification_enabled [Boolean, nil] Require phone number verification via OTP (higher_intent only). + # + # @param privacy_policy_link_text [String, nil] Custom link text for privacy policy (max 70 chars). + # + # @param question_page_custom_headline [String, nil] Custom headline for the questions page. + # + # @param rich_creative_headline [String, nil] Headline for rich creative form intro. + # + # @param rich_creative_overview [String, nil] Overview description for rich creative form intro. + # + # @param rich_creative_url [String, nil] Uploaded image URL for rich creative form type. + # + # @param thank_you_pages [Array, nil] Thank you / ending pages (supports multiple for conditional routing). + + class Question < WhopSDK::Internal::Type::BaseModel + # @!attribute type + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + # + # @return [String] + required :type, String + + # @!attribute conditional_questions_group_id + # Group ID for conditional question routing. + # + # @return [String, nil] + optional :conditional_questions_group_id, String, nil?: true + + # @!attribute dependent_conditional_questions + # Questions shown conditionally based on this question's answer. + # + # @return [Array, nil] + optional :dependent_conditional_questions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion] + }, + nil?: true + + # @!attribute inline_context + # Helper text shown below the question. + # + # @return [String, nil] + optional :inline_context, String, nil?: true + + # @!attribute key + # Unique key for this question. + # + # @return [String, nil] + optional :key, String, nil?: true + + # @!attribute label + # Custom label for CUSTOM questions. + # + # @return [String, nil] + optional :label, String, nil?: true + + # @!attribute options + # Answer options for multiple choice CUSTOM questions. + # + # @return [Array, nil] + optional :options, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option] + }, + nil?: true + + # @!attribute question_format + # UI hint: short_answer, multiple_choice, or appointment. + # + # @return [String, nil] + optional :question_format, String, nil?: true + + # @!method initialize(type:, conditional_questions_group_id: nil, dependent_conditional_questions: nil, inline_context: nil, key: nil, label: nil, options: nil, question_format: nil) + # A question on a Meta lead gen form. + # + # @param type [String] Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + # + # @param conditional_questions_group_id [String, nil] Group ID for conditional question routing. + # + # @param dependent_conditional_questions [Array, nil] Questions shown conditionally based on this question's answer. + # + # @param inline_context [String, nil] Helper text shown below the question. + # + # @param key [String, nil] Unique key for this question. + # + # @param label [String, nil] Custom label for CUSTOM questions. + # + # @param options [Array, nil] Answer options for multiple choice CUSTOM questions. + # + # @param question_format [String, nil] UI hint: short_answer, multiple_choice, or appointment. + + class DependentConditionalQuestion < WhopSDK::Internal::Type::BaseModel + # @!attribute type + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + # + # @return [String] + required :type, String + + # @!attribute inline_context + # Helper text shown below the question. + # + # @return [String, nil] + optional :inline_context, String, nil?: true + + # @!attribute key + # Unique key for this question. + # + # @return [String, nil] + optional :key, String, nil?: true + + # @!attribute label + # Custom label for CUSTOM questions. + # + # @return [String, nil] + optional :label, String, nil?: true + + # @!attribute options + # Answer options for multiple choice questions. + # + # @return [Array, nil] + optional :options, + -> do + WhopSDK::Internal::Type::ArrayOf[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option + ] + end, + nil?: true + + # @!method initialize(type:, inline_context: nil, key: nil, label: nil, options: nil) + # A dependent conditional question (non-recursive to avoid schema recursion). + # + # @param type [String] Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + # + # @param inline_context [String, nil] Helper text shown below the question. + # + # @param key [String, nil] Unique key for this question. + # + # @param label [String, nil] Custom label for CUSTOM questions. + # + # @param options [Array, nil] Answer options for multiple choice questions. + + class Option < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Unique key for this option. + # + # @return [String] + required :key, String + + # @!attribute value + # Display text for this option. + # + # @return [String] + required :value, String + + # @!attribute logic + # Conditional logic routing for this answer option. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic, nil] + optional :logic, + -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic + }, + nil?: true + + # @!method initialize(key:, value:, logic: nil) + # An answer option for a multiple choice lead form question. + # + # @param key [String] Unique key for this option. + # + # @param value [String] Display text for this option. + # + # @param logic [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic, nil] Conditional logic routing for this answer option. + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option#logic + class Logic < WhopSDK::Internal::Type::BaseModel + # @!attribute type + # Logic type: go_to_question, submit_form, or close_form. + # + # @return [String] + required :type, String + + # @!attribute target_end_page_index + # Index of the end page to route to (for submit_form type). + # + # @return [Integer, nil] + optional :target_end_page_index, Integer, nil?: true + + # @!attribute target_question_index + # Index of the question to route to (for go_to_question type). + # + # @return [Integer, nil] + optional :target_question_index, Integer, nil?: true + + # @!method initialize(type:, target_end_page_index: nil, target_question_index: nil) + # Conditional logic routing for this answer option. + # + # @param type [String] Logic type: go_to_question, submit_form, or close_form. + # + # @param target_end_page_index [Integer, nil] Index of the end page to route to (for submit_form type). + # + # @param target_question_index [Integer, nil] Index of the question to route to (for go_to_question type). + end + end + end + + class Option < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Unique key for this option. + # + # @return [String] + required :key, String + + # @!attribute value + # Display text for this option. + # + # @return [String] + required :value, String + + # @!attribute logic + # Conditional logic routing for this answer option. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic, nil] + optional :logic, + -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic + }, + nil?: true + + # @!method initialize(key:, value:, logic: nil) + # An answer option for a multiple choice lead form question. + # + # @param key [String] Unique key for this option. + # + # @param value [String] Display text for this option. + # + # @param logic [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic, nil] Conditional logic routing for this answer option. + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option#logic + class Logic < WhopSDK::Internal::Type::BaseModel + # @!attribute type + # Logic type: go_to_question, submit_form, or close_form. + # + # @return [String] + required :type, String + + # @!attribute target_end_page_index + # Index of the end page to route to (for submit_form type). + # + # @return [Integer, nil] + optional :target_end_page_index, Integer, nil?: true + + # @!attribute target_question_index + # Index of the question to route to (for go_to_question type). + # + # @return [Integer, nil] + optional :target_question_index, Integer, nil?: true + + # @!method initialize(type:, target_end_page_index: nil, target_question_index: nil) + # Conditional logic routing for this answer option. + # + # @param type [String] Logic type: go_to_question, submit_form, or close_form. + # + # @param target_end_page_index [Integer, nil] Index of the end page to route to (for submit_form type). + # + # @param target_question_index [Integer, nil] Index of the question to route to (for go_to_question type). + end + end + end + + class CustomDisclaimerCheckbox < WhopSDK::Internal::Type::BaseModel + # @!attribute key + # Unique key for this checkbox. + # + # @return [String] + required :key, String + + # @!attribute text + # Label text for the checkbox. + # + # @return [String] + required :text, String + + # @!attribute is_checked_by_default + # Whether the checkbox is checked by default. + # + # @return [Boolean, nil] + optional :is_checked_by_default, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute is_required + # Whether the checkbox must be checked to submit. + # + # @return [Boolean, nil] + optional :is_required, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!method initialize(key:, text:, is_checked_by_default: nil, is_required: nil) + # A consent checkbox for the custom disclaimer section. + # + # @param key [String] Unique key for this checkbox. + # + # @param text [String] Label text for the checkbox. + # + # @param is_checked_by_default [Boolean, nil] Whether the checkbox is checked by default. + # + # @param is_required [Boolean, nil] Whether the checkbox must be checked to submit. + end + + class ThankYouPage < WhopSDK::Internal::Type::BaseModel + # @!attribute body + # Body text for this ending page. + # + # @return [String, nil] + optional :body, String, nil?: true + + # @!attribute business_phone + # Business phone number for call CTA. + # + # @return [String, nil] + optional :business_phone, String, nil?: true + + # @!attribute button_text + # Custom button text. + # + # @return [String, nil] + optional :button_text, String, nil?: true + + # @!attribute button_type + # CTA button type: VIEW_WEBSITE, CALL_BUSINESS, DOWNLOAD. + # + # @return [String, nil] + optional :button_type, String, nil?: true + + # @!attribute conditional_question_group_id + # Question group ID for conditional routing to this page. + # + # @return [String, nil] + optional :conditional_question_group_id, String, nil?: true + + # @!attribute enable_messenger + # Enable Messenger follow-up. + # + # @return [Boolean, nil] + optional :enable_messenger, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute gated_file_url + # Uploaded file URL for gated content download. + # + # @return [String, nil] + optional :gated_file_url, String, nil?: true + + # @!attribute link + # URL the button links to. + # + # @return [String, nil] + optional :link, String, nil?: true + + # @!attribute name + # Internal name for this ending page. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute title + # Headline for this ending page. + # + # @return [String, nil] + optional :title, String, nil?: true + + # @!method initialize(body: nil, business_phone: nil, button_text: nil, button_type: nil, conditional_question_group_id: nil, enable_messenger: nil, gated_file_url: nil, link: nil, name: nil, title: nil) + # A thank-you / ending page for a Meta lead gen form. + # + # @param body [String, nil] Body text for this ending page. + # + # @param business_phone [String, nil] Business phone number for call CTA. + # + # @param button_text [String, nil] Custom button text. + # + # @param button_type [String, nil] CTA button type: VIEW_WEBSITE, CALL_BUSINESS, DOWNLOAD. + # + # @param conditional_question_group_id [String, nil] Question group ID for conditional routing to this page. + # + # @param enable_messenger [Boolean, nil] Enable Messenger follow-up. + # + # @param gated_file_url [String, nil] Uploaded file URL for gated content download. + # + # @param link [String, nil] URL the button links to. + # + # @param name [String, nil] Internal name for this ending page. + # + # @param title [String, nil] Headline for this ending page. + end + end + + # What this ad set optimizes for on Meta. + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE = :NONE + APP_INSTALLS = :APP_INSTALLS + AD_RECALL_LIFT = :AD_RECALL_LIFT + ENGAGED_USERS = :ENGAGED_USERS + EVENT_RESPONSES = :EVENT_RESPONSES + IMPRESSIONS = :IMPRESSIONS + LEAD_GENERATION = :LEAD_GENERATION + QUALITY_LEAD = :QUALITY_LEAD + LINK_CLICKS = :LINK_CLICKS + OFFSITE_CONVERSIONS = :OFFSITE_CONVERSIONS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + QUALITY_CALL = :QUALITY_CALL + REACH = :REACH + LANDING_PAGE_VIEWS = :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE = :VISIT_INSTAGRAM_PROFILE + VALUE = :VALUE + THRUPLAY = :THRUPLAY + DERIVED_EVENTS = :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS = :CONVERSATIONS + IN_APP_VALUE = :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION = :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS = :SUBSCRIBERS + REMINDERS_SET = :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT = :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT = :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT = :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH = :ENGAGED_REACH + ENGAGED_PAGE_VIEWS = :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE = :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE = :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION = :MESSAGING_APPOINTMENT_CONVERSION + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#promoted_object + class PromotedObject < WhopSDK::Internal::Type::BaseModel + # @!attribute custom_conversion_id + # Custom conversion rule ID (numeric, from Meta Events Manager). + # + # @return [String, nil] + optional :custom_conversion_id, String, nil?: true + + # @!attribute custom_event_str + # Pixel event name, used when custom_event_type is OTHER. + # + # @return [String, nil] + optional :custom_event_str, String, nil?: true + + # @!attribute custom_event_type + # Custom event type (e.g., PURCHASE, COMPLETE_REGISTRATION, OTHER). + # + # @return [String, nil] + optional :custom_event_type, String, nil?: true + + # @!attribute page_id + # Facebook Page ID. + # + # @return [String, nil] + optional :page_id, String, nil?: true + + # @!attribute pixel_id + # Meta Pixel ID for conversion tracking. + # + # @return [String, nil] + optional :pixel_id, String, nil?: true + + # @!attribute whatsapp_phone_number + # WhatsApp phone number for messaging campaigns. + # + # @return [String, nil] + optional :whatsapp_phone_number, String, nil?: true + + # @!method initialize(custom_conversion_id: nil, custom_event_str: nil, custom_event_type: nil, page_id: nil, pixel_id: nil, whatsapp_phone_number: nil) + # The object this ad set promotes (pixel, page, etc.). + # + # @param custom_conversion_id [String, nil] Custom conversion rule ID (numeric, from Meta Events Manager). + # + # @param custom_event_str [String, nil] Pixel event name, used when custom_event_type is OTHER. + # + # @param custom_event_type [String, nil] Custom event type (e.g., PURCHASE, COMPLETE_REGISTRATION, OTHER). + # + # @param page_id [String, nil] Facebook Page ID. + # + # @param pixel_id [String, nil] Meta Pixel ID for conversion tracking. + # + # @param whatsapp_phone_number [String, nil] WhatsApp phone number for messaging campaigns. + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :ACTIVE + PAUSED = :PAUSED + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta#targeting_automation + class TargetingAutomation < WhopSDK::Internal::Type::BaseModel + # @!attribute advantage_audience + # 0 = off (use exact targeting), 1 = on (let Meta expand audience). + # + # @return [Integer, nil] + optional :advantage_audience, Integer, nil?: true + + # @!method initialize(advantage_audience: nil) + # Advantage+ audience expansion settings. + # + # @param advantage_audience [Integer, nil] 0 = off (use exact targeting), 1 = on (let Meta expand audience). + end + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig#tiktok + class Tiktok < WhopSDK::Internal::Type::BaseModel + # @!attribute actions + # + # @return [Array, nil] + optional :actions, + -> { + WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action] + }, + nil?: true + + # @!attribute age_groups + # + # @return [Array, nil] + optional :age_groups, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup] + }, + nil?: true + + # @!attribute app_id + # App ID for app promotion campaigns. + # + # @return [String, nil] + optional :app_id, String, nil?: true + + # @!attribute attribution_event_count + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount, nil] + optional :attribution_event_count, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount }, + nil?: true + + # @!attribute audience_ids + # + # @return [Array, nil] + optional :audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute audience_rule + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + optional :audience_rule, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute audience_type + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType, nil] + optional :audience_type, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType }, + nil?: true + + # @!attribute bid_price + # Bid price (cost per result for Cost Cap). + # + # @return [Float, nil] + optional :bid_price, Float, nil?: true + + # @!attribute bid_type + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType, nil] + optional :bid_type, + enum: -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType + }, + nil?: true + + # @!attribute billing_event + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent, nil] + optional :billing_event, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent }, + nil?: true + + # @!attribute brand_safety_type + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType, nil] + optional :brand_safety_type, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType }, + nil?: true + + # @!attribute budget_mode + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode, nil] + optional :budget_mode, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode }, + nil?: true + + # @!attribute carrier_ids + # + # @return [Array, nil] + optional :carrier_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute category_exclusion_ids + # + # @return [Array, nil] + optional :category_exclusion_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute click_attribution_window + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow, nil] + optional :click_attribution_window, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow }, + nil?: true + + # @!attribute comment_disabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :comment_disabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute contextual_tag_ids + # + # @return [Array, nil] + optional :contextual_tag_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute conversion_bid_price + # Target cost per conversion for oCPM. + # + # @return [Float, nil] + optional :conversion_bid_price, Float, nil?: true + + # @!attribute creative_material_mode + # Creative delivery strategy. + # + # @return [String, nil] + optional :creative_material_mode, String, nil?: true + + # @!attribute dayparting + # Ad delivery schedule (48x7 character string). + # + # @return [String, nil] + optional :dayparting, String, nil?: true + + # @!attribute deep_funnel_event_source + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :deep_funnel_event_source, String, nil?: true + + # @!attribute deep_funnel_event_source_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :deep_funnel_event_source_id, String, nil?: true + + # @!attribute deep_funnel_optimization_status + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus, nil] + optional :deep_funnel_optimization_status, + enum: -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus + }, + nil?: true + + # @!attribute device_model_ids + # + # @return [Array, nil] + optional :device_model_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute device_price_ranges + # + # @return [Array, nil] + optional :device_price_ranges, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute engaged_view_attribution_window + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow, nil] + optional :engaged_view_attribution_window, + enum: -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow + }, + nil?: true + + # @!attribute excluded_audience_ids + # + # @return [Array, nil] + optional :excluded_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute excluded_location_ids + # TikTok location/region IDs to exclude. + # + # @return [Array, nil] + optional :excluded_location_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute frequency + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :frequency, Integer, nil?: true + + # @!attribute frequency_schedule + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :frequency_schedule, Integer, nil?: true + + # @!attribute gender + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender, nil] + optional :gender, + enum: -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender + }, + nil?: true + + # @!attribute identity_authorized_bc_id + # Business Center ID for BC_AUTH_TT identity. + # + # @return [String, nil] + optional :identity_authorized_bc_id, String, nil?: true + + # @!attribute identity_id + # TikTok identity ID for the ad group. + # + # @return [String, nil] + optional :identity_id, String, nil?: true + + # @!attribute identity_type + # Identity type (AUTH_CODE, TT_USER, BC_AUTH_TT). + # + # @return [String, nil] + optional :identity_type, String, nil?: true + + # @!attribute instant_form_config + # Instant form configuration for lead generation campaigns. + # + # @return [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig, nil] + optional :instant_form_config, + -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig }, + nil?: true + + # @!attribute instant_form_id + # TikTok instant form ID (set automatically when instant_form_config is provided). + # + # @return [String, nil] + optional :instant_form_id, String, nil?: true + + # @!attribute interest_category_ids + # + # @return [Array, nil] + optional :interest_category_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute interest_keyword_ids + # + # @return [Array, nil] + optional :interest_keyword_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute inventory_filter_enabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :inventory_filter_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute ios14_targeting + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting, nil] + optional :ios14_targeting, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting }, + nil?: true + + # @!attribute isp_ids + # + # @return [Array, nil] + optional :isp_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute languages + # + # @return [Array, nil] + optional :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute location_ids + # TikTok location/region IDs for geo targeting. + # + # @return [Array, nil] + optional :location_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute min_android_version + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :min_android_version, String, nil?: true + + # @!attribute min_ios_version + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :min_ios_version, String, nil?: true + + # @!attribute network_types + # + # @return [Array, nil] + optional :network_types, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute operating_systems + # + # @return [Array, nil] + optional :operating_systems, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperatingSystem] + }, + nil?: true + + # @!attribute operation_status + # Initial status (ENABLE, DISABLE). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus, nil] + optional :operation_status, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus }, + nil?: true + + # @!attribute optimization_event + # Conversion event (e.g., COMPLETE_PAYMENT). + # + # @return [String, nil] + optional :optimization_event, String, nil?: true + + # @!attribute optimization_goal + # What this ad group optimizes for on TikTok. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal, nil] + optional :optimization_goal, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing, nil] + optional :pacing, + enum: -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing + }, + nil?: true + + # @!attribute pangle_audience_package_exclude_ids + # + # @return [Array, nil] + optional :pangle_audience_package_exclude_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute pangle_audience_package_include_ids + # + # @return [Array, nil] + optional :pangle_audience_package_include_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute pangle_block_app_ids + # + # @return [Array, nil] + optional :pangle_block_app_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute pixel_id + # TikTok Pixel ID for conversion tracking. + # + # @return [String, nil] + optional :pixel_id, String, nil?: true + + # @!attribute placement_type + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType, nil] + optional :placement_type, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType }, + nil?: true + + # @!attribute placements + # Placements (PLACEMENT_TIKTOK, PLACEMENT_PANGLE, etc.). + # + # @return [Array, nil] + optional :placements, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute product_set_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :product_set_id, String, nil?: true + + # @!attribute product_source + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource, nil] + optional :product_source, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource }, + nil?: true + + # @!attribute promotion_type + # Promotion type (optimization location). + # + # @return [String, nil] + optional :promotion_type, String, nil?: true + + # @!attribute schedule_end_time + # Schedule end time (UTC, YYYY-MM-DD HH:MM:SS). + # + # @return [String, nil] + optional :schedule_end_time, String, nil?: true + + # @!attribute schedule_start_time + # Schedule start time (UTC, YYYY-MM-DD HH:MM:SS). + # + # @return [String, nil] + optional :schedule_start_time, String, nil?: true + + # @!attribute schedule_type + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType, nil] + optional :schedule_type, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType }, + nil?: true + + # @!attribute secondary_optimization_event + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :secondary_optimization_event, String, nil?: true + + # @!attribute shopping_ads_retargeting_actions_days + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + optional :shopping_ads_retargeting_actions_days, Integer, nil?: true + + # @!attribute shopping_ads_retargeting_type + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType, nil] + optional :shopping_ads_retargeting_type, + enum: -> { + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType + }, + nil?: true + + # @!attribute spending_power + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower, nil] + optional :spending_power, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower }, + nil?: true + + # @!attribute tiktok_subplacements + # TikTok subplacements (IN_FEED, SEARCH_FEED, etc.). + # + # @return [Array, nil] + optional :tiktok_subplacements, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute vertical_sensitivity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + optional :vertical_sensitivity_id, String, nil?: true + + # @!attribute video_download_disabled + # Represents `true` or `false` values. + # + # @return [Boolean, nil] + optional :video_download_disabled, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute video_user_actions + # + # @return [Array, nil] + optional :video_user_actions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute view_attribution_window + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow, nil] + optional :view_attribution_window, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow }, + nil?: true + + # @!method initialize(actions: nil, age_groups: nil, app_id: nil, attribution_event_count: nil, audience_ids: nil, audience_rule: nil, audience_type: nil, bid_price: nil, bid_type: nil, billing_event: nil, brand_safety_type: nil, budget_mode: nil, carrier_ids: nil, category_exclusion_ids: nil, click_attribution_window: nil, comment_disabled: nil, contextual_tag_ids: nil, conversion_bid_price: nil, creative_material_mode: nil, dayparting: nil, deep_funnel_event_source: nil, deep_funnel_event_source_id: nil, deep_funnel_optimization_status: nil, device_model_ids: nil, device_price_ranges: nil, engaged_view_attribution_window: nil, excluded_audience_ids: nil, excluded_location_ids: nil, frequency: nil, frequency_schedule: nil, gender: nil, identity_authorized_bc_id: nil, identity_id: nil, identity_type: nil, instant_form_config: nil, instant_form_id: nil, interest_category_ids: nil, interest_keyword_ids: nil, inventory_filter_enabled: nil, ios14_targeting: nil, isp_ids: nil, languages: nil, location_ids: nil, min_android_version: nil, min_ios_version: nil, network_types: nil, operating_systems: nil, operation_status: nil, optimization_event: nil, optimization_goal: nil, pacing: nil, pangle_audience_package_exclude_ids: nil, pangle_audience_package_include_ids: nil, pangle_block_app_ids: nil, pixel_id: nil, placement_type: nil, placements: nil, product_set_id: nil, product_source: nil, promotion_type: nil, schedule_end_time: nil, schedule_start_time: nil, schedule_type: nil, secondary_optimization_event: nil, shopping_ads_retargeting_actions_days: nil, shopping_ads_retargeting_type: nil, spending_power: nil, tiktok_subplacements: nil, vertical_sensitivity_id: nil, video_download_disabled: nil, video_user_actions: nil, view_attribution_window: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok} for more details. + # + # TikTok ad group configuration. + # + # @param actions [Array, nil] + # + # @param age_groups [Array, nil] + # + # @param app_id [String, nil] App ID for app promotion campaigns. + # + # @param attribution_event_count [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount, nil] + # + # @param audience_ids [Array, nil] + # + # @param audience_rule [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param audience_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType, nil] + # + # @param bid_price [Float, nil] Bid price (cost per result for Cost Cap). + # + # @param bid_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType, nil] Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent, nil] How you are billed on TikTok (CPC, CPM, OCPM, CPV). + # + # @param brand_safety_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType, nil] + # + # @param budget_mode [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode, nil] Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, BUDGET_MODE_DYNAMIC_DAILY_BUDGE + # + # @param carrier_ids [Array, nil] + # + # @param category_exclusion_ids [Array, nil] + # + # @param click_attribution_window [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow, nil] + # + # @param comment_disabled [Boolean, nil] Represents `true` or `false` values. + # + # @param contextual_tag_ids [Array, nil] + # + # @param conversion_bid_price [Float, nil] Target cost per conversion for oCPM. + # + # @param creative_material_mode [String, nil] Creative delivery strategy. + # + # @param dayparting [String, nil] Ad delivery schedule (48x7 character string). + # + # @param deep_funnel_event_source [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param deep_funnel_event_source_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param deep_funnel_optimization_status [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus, nil] + # + # @param device_model_ids [Array, nil] + # + # @param device_price_ranges [Array, nil] + # + # @param engaged_view_attribution_window [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow, nil] + # + # @param excluded_audience_ids [Array, nil] + # + # @param excluded_location_ids [Array, nil] TikTok location/region IDs to exclude. + # + # @param frequency [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param frequency_schedule [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param gender [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender, nil] + # + # @param identity_authorized_bc_id [String, nil] Business Center ID for BC_AUTH_TT identity. + # + # @param identity_id [String, nil] TikTok identity ID for the ad group. + # + # @param identity_type [String, nil] Identity type (AUTH_CODE, TT_USER, BC_AUTH_TT). + # + # @param instant_form_config [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig, nil] Instant form configuration for lead generation campaigns. + # + # @param instant_form_id [String, nil] TikTok instant form ID (set automatically when instant_form_config is provided). + # + # @param interest_category_ids [Array, nil] + # + # @param interest_keyword_ids [Array, nil] + # + # @param inventory_filter_enabled [Boolean, nil] Represents `true` or `false` values. + # + # @param ios14_targeting [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting, nil] + # + # @param isp_ids [Array, nil] + # + # @param languages [Array, nil] + # + # @param location_ids [Array, nil] TikTok location/region IDs for geo targeting. + # + # @param min_android_version [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param min_ios_version [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param network_types [Array, nil] + # + # @param operating_systems [Array, nil] + # + # @param operation_status [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus, nil] Initial status (ENABLE, DISABLE). + # + # @param optimization_event [String, nil] Conversion event (e.g., COMPLETE_PAYMENT). + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal, nil] What this ad group optimizes for on TikTok. + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing, nil] Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + # + # @param pangle_audience_package_exclude_ids [Array, nil] + # + # @param pangle_audience_package_include_ids [Array, nil] + # + # @param pangle_block_app_ids [Array, nil] + # + # @param pixel_id [String, nil] TikTok Pixel ID for conversion tracking. + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType, nil] Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + # + # @param placements [Array, nil] Placements (PLACEMENT_TIKTOK, PLACEMENT_PANGLE, etc.). + # + # @param product_set_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param product_source [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource, nil] + # + # @param promotion_type [String, nil] Promotion type (optimization location). + # + # @param schedule_end_time [String, nil] Schedule end time (UTC, YYYY-MM-DD HH:MM:SS). + # + # @param schedule_start_time [String, nil] Schedule start time (UTC, YYYY-MM-DD HH:MM:SS). + # + # @param schedule_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType, nil] Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + # + # @param secondary_optimization_event [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param shopping_ads_retargeting_actions_days [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param shopping_ads_retargeting_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType, nil] + # + # @param spending_power [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower, nil] + # + # @param tiktok_subplacements [Array, nil] TikTok subplacements (IN_FEED, SEARCH_FEED, etc.). + # + # @param vertical_sensitivity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param video_download_disabled [Boolean, nil] Represents `true` or `false` values. + # + # @param video_user_actions [Array, nil] + # + # @param view_attribution_window [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow, nil] + + class Action < WhopSDK::Internal::Type::BaseModel + # @!attribute action_category_ids + # Behavioral category IDs. Use /tool/action_category/ to list them. + # + # @return [Array, nil] + optional :action_category_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute action_period + # Lookback window in days. TikTok accepts 7, 15, 30, 60, 90, or 180. + # + # @return [Integer, nil] + optional :action_period, Integer, nil?: true + + # @!attribute action_scene + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene, nil] + optional :action_scene, + enum: -> { WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene }, + nil?: true + + # @!attribute video_user_actions + # Specific video interactions (WATCHED_TO_END, LIKED, COMMENTED, SHARED, FOLLOWED, + # PROFILE_VISITED). + # + # @return [Array, nil] + optional :video_user_actions, + -> { + WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction] + }, + nil?: true + + # @!method initialize(action_category_ids: nil, action_period: nil, action_scene: nil, video_user_actions: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action} for more + # details. + # + # A single TikTok behavioral targeting entry. One category of past user behavior + # (what they did, over what window, on which kind of content). See + # docs/tiktok_api/ad_group.md § actions. + # + # @param action_category_ids [Array, nil] Behavioral category IDs. Use /tool/action_category/ to list them. + # + # @param action_period [Integer, nil] Lookback window in days. TikTok accepts 7, 15, 30, 60, 90, or 180. + # + # @param action_scene [Symbol, WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene, nil] The category of TikTok content a behavioral targeting rule applies to. See docs/ + # + # @param video_user_actions [Array, nil] Specific video interactions (WATCHED_TO_END, LIKED, COMMENTED, SHARED, FOLLOWED, + + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action#action_scene + module ActionScene + extend WhopSDK::Internal::Type::Enum + + VIDEO_RELATED = :VIDEO_RELATED + CREATOR_RELATED = :CREATOR_RELATED + HASHTAG_RELATED = :HASHTAG_RELATED + LIVE_RELATED = :LIVE_RELATED + + # @!method self.values + # @return [Array] + end + + # Specific past video interactions used for behavioral targeting. See + # docs/tiktok_api/ad_group.md § actions.video_user_actions. + module VideoUserAction + extend WhopSDK::Internal::Type::Enum + + WATCHED_TO_END = :WATCHED_TO_END + LIKED = :LIKED + COMMENTED = :COMMENTED + SHARED = :SHARED + FOLLOWED = :FOLLOWED + PROFILE_VISITED = :PROFILE_VISITED + + # @!method self.values + # @return [Array] + end + end + + # Age groups targetable on TikTok. See docs/tiktok_api/ad_group.md § age_groups. + module AgeGroup + extend WhopSDK::Internal::Type::Enum + + AGE_13_17 = :AGE_13_17 + AGE_18_24 = :AGE_18_24 + AGE_25_34 = :AGE_25_34 + AGE_35_44 = :AGE_35_44 + AGE_45_54 = :AGE_45_54 + AGE_55_100 = :AGE_55_100 + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#attribution_event_count + module AttributionEventCount + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + EVERY = :EVERY + ONCE = :ONCE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#audience_type + module AudienceType + extend WhopSDK::Internal::Type::Enum + + NORMAL = :NORMAL + SMART_INTERESTS_BEHAVIORS = :SMART_INTERESTS_BEHAVIORS + + # @!method self.values + # @return [Array] + end + + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#bid_type + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID = :BID_TYPE_NO_BID + BID_TYPE_CUSTOM = :BID_TYPE_CUSTOM + + # @!method self.values + # @return [Array] + end + + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC = :CPC + CPM = :CPM + OCPM = :OCPM + CPV = :CPV + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#brand_safety_type + module BrandSafetyType + extend WhopSDK::Internal::Type::Enum + + NO_BRAND_SAFETY = :NO_BRAND_SAFETY + STANDARD_INVENTORY = :STANDARD_INVENTORY + LIMITED_INVENTORY = :LIMITED_INVENTORY + FULL_INVENTORY = :FULL_INVENTORY + EXPANDED_INVENTORY = :EXPANDED_INVENTORY + + # @!method self.values + # @return [Array] + end + + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#budget_mode + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY = :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL = :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#click_attribution_window + module ClickAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF = :OFF + ONE_DAY = :ONE_DAY + SEVEN_DAYS = :SEVEN_DAYS + FOURTEEN_DAYS = :FOURTEEN_DAYS + TWENTY_EIGHT_DAYS = :TWENTY_EIGHT_DAYS + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#deep_funnel_optimization_status + module DeepFunnelOptimizationStatus + extend WhopSDK::Internal::Type::Enum + + ON = :ON + OFF = :OFF + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#engaged_view_attribution_window + module EngagedViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF = :OFF + ONE_DAY = :ONE_DAY + SEVEN_DAYS = :SEVEN_DAYS + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#gender + module Gender + extend WhopSDK::Internal::Type::Enum + + GENDER_UNLIMITED = :GENDER_UNLIMITED + GENDER_MALE = :GENDER_MALE + GENDER_FEMALE = :GENDER_FEMALE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#instant_form_config + class InstantFormConfig < WhopSDK::Internal::Type::BaseModel + # @!attribute privacy_policy_url + # URL to your privacy policy. + # + # @return [String] + required :privacy_policy_url, String + + # @!attribute questions + # Form questions (at least one required). + # + # @return [Array] + required :questions, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question] } + + # @!attribute button_text + # Submit button text. + # + # @return [String, nil] + optional :button_text, String, nil?: true + + # @!attribute greeting + # Greeting text shown at the top of the form. + # + # @return [String, nil] + optional :greeting, String, nil?: true + + # @!attribute name + # Form name. Auto-generated if omitted. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!method initialize(privacy_policy_url:, questions:, button_text: nil, greeting: nil, name: nil) + # Instant form configuration for lead generation campaigns. + # + # @param privacy_policy_url [String] URL to your privacy policy. + # + # @param questions [Array] Form questions (at least one required). + # + # @param button_text [String, nil] Submit button text. + # + # @param greeting [String, nil] Greeting text shown at the top of the form. + # + # @param name [String, nil] Form name. Auto-generated if omitted. + + class Question < WhopSDK::Internal::Type::BaseModel + # @!attribute field_type + # Question type (EMAIL, PHONE_NUMBER, NAME, CUSTOM). + # + # @return [String] + required :field_type, String + + # @!attribute label + # Custom label for the question. + # + # @return [String, nil] + optional :label, String, nil?: true + + # @!method initialize(field_type:, label: nil) + # A question for a TikTok instant form. + # + # @param field_type [String] Question type (EMAIL, PHONE_NUMBER, NAME, CUSTOM). + # + # @param label [String, nil] Custom label for the question. + end + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#ios14_targeting + module Ios14Targeting + extend WhopSDK::Internal::Type::Enum + + UNSET = :UNSET + IOS14_MINUS = :IOS14_MINUS + IOS14_PLUS = :IOS14_PLUS + ALL = :ALL + + # @!method self.values + # @return [Array] + end + + # Device operating systems targetable on TikTok. See docs/tiktok_api/ad_group.md § + # operating_systems. + module OperatingSystem + extend WhopSDK::Internal::Type::Enum + + ANDROID = :ANDROID + IOS = :IOS + + # @!method self.values + # @return [Array] + end + + # Initial status (ENABLE, DISABLE). + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#operation_status + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE = :ENABLE + DISABLE = :DISABLE + + # @!method self.values + # @return [Array] + end + + # What this ad group optimizes for on TikTok. + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK = :CLICK + CONVERT = :CONVERT + INSTALL = :INSTALL + IN_APP_EVENT = :IN_APP_EVENT + REACH = :REACH + SHOW = :SHOW + VIDEO_VIEW = :VIDEO_VIEW + ENGAGED_VIEW = :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN = :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION = :LEAD_GENERATION + PREFERRED_LEAD = :PREFERRED_LEAD + CONVERSATION = :CONVERSATION + FOLLOWERS = :FOLLOWERS + PROFILE_VIEWS = :PROFILE_VIEWS + PAGE_VISIT = :PAGE_VISIT + VALUE = :VALUE + AUTOMATIC_VALUE_OPTIMIZATION = :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW = :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT = :DESTINATION_VISIT + MT_LIVE_ROOM = :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE = :PRODUCT_CLICK_IN_LIVE + + # @!method self.values + # @return [Array] + end + + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH = :PACING_MODE_SMOOTH + PACING_MODE_FAST = :PACING_MODE_FAST + + # @!method self.values + # @return [Array] + end + + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC = :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL = :PLACEMENT_TYPE_NORMAL + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#product_source + module ProductSource + extend WhopSDK::Internal::Type::Enum + + CATALOG = :CATALOG + STORE = :STORE + SHOWCASE = :SHOWCASE + + # @!method self.values + # @return [Array] + end + + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + # + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#schedule_type + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END = :SCHEDULE_START_END + SCHEDULE_FROM_NOW = :SCHEDULE_FROM_NOW + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#shopping_ads_retargeting_type + module ShoppingAdsRetargetingType + extend WhopSDK::Internal::Type::Enum + + OFF = :OFF + LAB1 = :LAB1 + LAB2 = :LAB2 + LAB3 = :LAB3 + LAB4 = :LAB4 + LAB5 = :LAB5 + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#spending_power + module SpendingPower + extend WhopSDK::Internal::Type::Enum + + ALL = :ALL + HIGH = :HIGH + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok#view_attribution_window + module ViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF = :OFF + ONE_DAY = :ONE_DAY + SEVEN_DAYS = :SEVEN_DAYS + + # @!method self.values + # @return [Array] + end + end + end + + # The status of an external ad group. + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_group_update_response.rb b/lib/whop_sdk/models/ad_group_update_response.rb new file mode 100644 index 00000000..09a261b6 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_update_response.rb @@ -0,0 +1,1121 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#update + class AdGroupUpdateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the external ad group. + # + # @return [String] + required :id, String + + # @!attribute ad_campaign + # The parent ad campaign + # + # @return [WhopSDK::Models::AdGroupUpdateResponse::AdCampaign] + required :ad_campaign, -> { WhopSDK::Models::AdGroupUpdateResponse::AdCampaign } + + # @!attribute config + # Unified ad group configuration (platform-agnostic) + # + # @return [WhopSDK::Models::AdGroupUpdateResponse::Config, nil] + required :config, -> { WhopSDK::Models::AdGroupUpdateResponse::Config }, nil?: true + + # @!attribute created_at + # The datetime the external ad group was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute daily_budget + # Daily budget in dollars (nil for lifetime budgets) + # + # @return [Float, nil] + required :daily_budget, Float, nil?: true + + # @!attribute name + # Human-readable ad group name + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute platform_config + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + # + # @return [WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, nil] + required :platform_config, union: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig } + + # @!attribute status + # Current operational status of the ad group + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdGroupUpdateResponse::Status } + + # @!attribute updated_at + # The datetime the external ad group was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, ad_campaign:, config:, created_at:, daily_budget:, name:, platform_config:, status:, updated_at:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupUpdateResponse} for more details. + # + # An external ad group (ad set) belonging to an ad campaign + # + # @param id [String] The unique identifier for the external ad group. + # + # @param ad_campaign [WhopSDK::Models::AdGroupUpdateResponse::AdCampaign] The parent ad campaign + # + # @param config [WhopSDK::Models::AdGroupUpdateResponse::Config, nil] Unified ad group configuration (platform-agnostic) + # + # @param created_at [Time] The datetime the external ad group was created. + # + # @param daily_budget [Float, nil] Daily budget in dollars (nil for lifetime budgets) + # + # @param name [String, nil] Human-readable ad group name + # + # @param platform_config [WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, nil] Typed platform-specific configuration. Use inline fragments (... on MetaAdGroupP + # + # @param status [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Status] Current operational status of the ad group + # + # @param updated_at [Time] The datetime the external ad group was last updated. + + # @see WhopSDK::Models::AdGroupUpdateResponse#ad_campaign + class AdCampaign < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the ad campaign. + # + # @return [String] + required :id, String + + # @!attribute platform + # The platforms where an ad campaign can run. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform, nil] + required :platform, enum: -> { WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform }, nil?: true + + # @!attribute status + # Current status of the campaign (active, paused, or inactive) + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status] + required :status, enum: -> { WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status } + + # @!attribute title + # The title of the ad campaign + # + # @return [String] + required :title, String + + # @!method initialize(id:, platform:, status:, title:) + # The parent ad campaign + # + # @param id [String] The unique identifier for the ad campaign. + # + # @param platform [Symbol, WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform, nil] The platforms where an ad campaign can run. + # + # @param status [Symbol, WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status] Current status of the campaign (active, paused, or inactive) + # + # @param title [String] The title of the ad campaign + + # The platforms where an ad campaign can run. + # + # @see WhopSDK::Models::AdGroupUpdateResponse::AdCampaign#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # Current status of the campaign (active, paused, or inactive) + # + # @see WhopSDK::Models::AdGroupUpdateResponse::AdCampaign#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + STALE = :stale + PENDING_REFUND = :pending_refund + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + + # @see WhopSDK::Models::AdGroupUpdateResponse#config + class Config < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_amount + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy }, + nil?: true + + # @!attribute billing_event + # How you are billed (e.g., impressions, clicks). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent }, + nil?: true + + # @!attribute end_time + # Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute frequency_cap + # Maximum number of times to show ads to each person in the frequency interval. + # + # @return [Integer, nil] + required :frequency_cap, Integer, nil?: true + + # @!attribute frequency_cap_interval_days + # Number of days for the frequency cap interval. + # + # @return [Integer, nil] + required :frequency_cap_interval_days, Integer, nil?: true + + # @!attribute optimization_goal + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # Budget pacing: standard (even) or accelerated (fast). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing, nil] + required :pacing, enum: -> { WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing }, nil?: true + + # @!attribute start_time + # Scheduled start time (ISO8601). + # + # @return [String, nil] + required :start_time, String, nil?: true + + # @!attribute targeting + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @return [WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting, nil] + required :targeting, -> { WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting }, nil?: true + + # @!method initialize(bid_amount:, bid_strategy:, billing_event:, end_time:, frequency_cap:, frequency_cap_interval_days:, optimization_goal:, pacing:, start_time:, targeting:) + # Unified ad group configuration (platform-agnostic) + # + # @param bid_amount [Integer, nil] Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy, nil] Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent, nil] How you are billed (e.g., impressions, clicks). + # + # @param end_time [String, nil] Scheduled end time (ISO8601). Required for lifetime budgets. + # + # @param frequency_cap [Integer, nil] Maximum number of times to show ads to each person in the frequency interval. + # + # @param frequency_cap_interval_days [Integer, nil] Number of days for the frequency cap interval. + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal, nil] What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing, nil] Budget pacing: standard (even) or accelerated (fast). + # + # @param start_time [String, nil] Scheduled start time (ISO8601). + # + # @param targeting [WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting, nil] Audience targeting settings (demographics, geo, interests, audiences, devices). + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + # + # @see WhopSDK::Models::AdGroupUpdateResponse::Config#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST = :lowest_cost + BID_CAP = :bid_cap + COST_CAP = :cost_cap + + # @!method self.values + # @return [Array] + end + + # How you are billed (e.g., impressions, clicks). + # + # @see WhopSDK::Models::AdGroupUpdateResponse::Config#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS = :impressions + CLICKS = :clicks + OPTIMIZED_CPM = :optimized_cpm + VIDEO_VIEWS = :video_views + + # @!method self.values + # @return [Array] + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + # + # @see WhopSDK::Models::AdGroupUpdateResponse::Config#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS = :conversions + LINK_CLICKS = :link_clicks + LANDING_PAGE_VIEWS = :landing_page_views + REACH = :reach + IMPRESSIONS = :impressions + APP_INSTALLS = :app_installs + VIDEO_VIEWS = :video_views + LEAD_GENERATION = :lead_generation + VALUE = :value + PAGE_LIKES = :page_likes + CONVERSATIONS = :conversations + AD_RECALL_LIFT = :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :two_second_continuous_video_views + POST_ENGAGEMENT = :post_engagement + EVENT_RESPONSES = :event_responses + REMINDERS_SET = :reminders_set + QUALITY_LEAD = :quality_lead + + # @!method self.values + # @return [Array] + end + + # Budget pacing: standard (even) or accelerated (fast). + # + # @see WhopSDK::Models::AdGroupUpdateResponse::Config#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD = :standard + ACCELERATED = :accelerated + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::Config#targeting + class Targeting < WhopSDK::Internal::Type::BaseModel + # @!attribute age_max + # Maximum age for demographic targeting. + # + # @return [Integer, nil] + required :age_max, Integer, nil?: true + + # @!attribute age_min + # Minimum age for demographic targeting. + # + # @return [Integer, nil] + required :age_min, Integer, nil?: true + + # @!attribute countries + # ISO 3166-1 alpha-2 country codes targeted. + # + # @return [Array, nil] + required :countries, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute device_platforms + # Device platforms targeted. + # + # @return [Array, nil] + required :device_platforms, + -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::DevicePlatform] }, + nil?: true + + # @!attribute exclude_audience_ids + # Platform audience IDs excluded. + # + # @return [Array, nil] + required :exclude_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute genders + # Genders targeted. + # + # @return [Array, nil] + required :genders, + -> { WhopSDK::Internal::Type::ArrayOf[enum: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender] }, + nil?: true + + # @!attribute include_audience_ids + # Platform audience IDs included. + # + # @return [Array, nil] + required :include_audience_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute interest_ids + # Platform-specific interest IDs targeted. + # + # @return [Array, nil] + required :interest_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute languages + # Language codes targeted. + # + # @return [Array, nil] + required :languages, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute placement_type + # Placement strategy for ad delivery. + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType, nil] + required :placement_type, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType }, + nil?: true + + # @!method initialize(age_max:, age_min:, countries:, device_platforms:, exclude_audience_ids:, genders:, include_audience_ids:, interest_ids:, languages:, placement_type:) + # Audience targeting settings (demographics, geo, interests, audiences, devices). + # + # @param age_max [Integer, nil] Maximum age for demographic targeting. + # + # @param age_min [Integer, nil] Minimum age for demographic targeting. + # + # @param countries [Array, nil] ISO 3166-1 alpha-2 country codes targeted. + # + # @param device_platforms [Array, nil] Device platforms targeted. + # + # @param exclude_audience_ids [Array, nil] Platform audience IDs excluded. + # + # @param genders [Array, nil] Genders targeted. + # + # @param include_audience_ids [Array, nil] Platform audience IDs included. + # + # @param interest_ids [Array, nil] Platform-specific interest IDs targeted. + # + # @param languages [Array, nil] Language codes targeted. + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType, nil] Placement strategy for ad delivery. + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE = :mobile + DESKTOP = :desktop + + # @!method self.values + # @return [Array] + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE = :male + FEMALE = :female + ALL = :all + + # @!method self.values + # @return [Array] + end + + # Placement strategy for ad delivery. + # + # @see WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC = :automatic + MANUAL = :manual + + # @!method self.values + # @return [Array] + end + end + end + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + # + # @see WhopSDK::Models::AdGroupUpdateResponse#platform_config + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # Meta (Facebook/Instagram) ad set configuration. + variant :MetaAdGroupPlatformConfigType, + -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType } + + # TikTok ad group configuration. + variant :TiktokAdGroupPlatformConfigType, + -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType } + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute attribution_spec + # + # @return [ArrayObject}>, nil] + required :attribution_spec, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute bid_amount + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :bid_amount, Integer, nil?: true + + # @!attribute bid_strategy + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy, nil] + required :bid_strategy, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy }, + nil?: true + + # @!attribute billing_event + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent }, + nil?: true + + # @!attribute daily_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :daily_budget, Integer, nil?: true + + # @!attribute destination_type + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType, nil] + required :destination_type, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType }, + nil?: true + + # @!attribute end_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :end_time, String, nil?: true + + # @!attribute excluded_geo_locations + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :excluded_geo_locations, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute facebook_positions + # + # @return [Array, nil] + required :facebook_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute geo_locations + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :geo_locations, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute instagram_actor_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :instagram_actor_id, String, nil?: true + + # @!attribute instagram_positions + # + # @return [Array, nil] + required :instagram_positions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute lifetime_budget + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + # + # @return [Integer, nil] + required :lifetime_budget, Integer, nil?: true + + # @!attribute optimization_goal + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal }, + nil?: true + + # @!attribute page_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :page_id, String, nil?: true + + # @!attribute platform + # The ad platform (meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform } + + # @!attribute promoted_object + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :promoted_object, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute publisher_platforms + # + # @return [Array, nil] + required :publisher_platforms, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute status + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status, nil] + required :status, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status }, + nil?: true + + # @!attribute targeting_automation + # Represents untyped JSON + # + # @return [Hash{Symbol=>Object}, nil] + required :targeting_automation, + WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], + nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :MetaAdGroupPlatformConfigType] + required :typename, const: :MetaAdGroupPlatformConfigType + + # @!method initialize(attribution_spec:, bid_amount:, bid_strategy:, billing_event:, daily_budget:, destination_type:, end_time:, excluded_geo_locations:, facebook_positions:, geo_locations:, instagram_actor_id:, instagram_positions:, lifetime_budget:, optimization_goal:, page_id:, platform:, promoted_object:, publisher_platforms:, status:, targeting_automation:, typename: :MetaAdGroupPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType} + # for more details. + # + # Meta (Facebook/Instagram) ad set configuration. + # + # @param attribution_spec [ArrayObject}>, nil] + # + # @param bid_amount [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param bid_strategy [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy, nil] + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent, nil] + # + # @param daily_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param destination_type [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType, nil] + # + # @param end_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param excluded_geo_locations [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param facebook_positions [Array, nil] + # + # @param geo_locations [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param instagram_actor_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param instagram_positions [Array, nil] + # + # @param lifetime_budget [Integer, nil] Represents non-fractional signed whole numeric values. Int can represent values + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal, nil] + # + # @param page_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform] The ad platform (meta, tiktok). + # + # @param promoted_object [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param publisher_platforms [Array, nil] + # + # @param status [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status, nil] + # + # @param targeting_automation [Hash{Symbol=>Object}, nil] Represents untyped JSON + # + # @param typename [Symbol, :MetaAdGroupPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#bid_strategy + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP = :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP = :LOWEST_COST_WITH_BID_CAP + COST_CAP = :COST_CAP + LOWEST_COST_WITH_MIN_ROAS = :LOWEST_COST_WITH_MIN_ROAS + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS = :APP_INSTALLS + CLICKS = :CLICKS + IMPRESSIONS = :IMPRESSIONS + LINK_CLICKS = :LINK_CLICKS + NONE = :NONE + OFFER_CLAIMS = :OFFER_CLAIMS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + THRUPLAY = :THRUPLAY + PURCHASE = :PURCHASE + LISTING_INTERACTION = :LISTING_INTERACTION + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#destination_type + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED = :UNDEFINED + WEBSITE = :WEBSITE + APP = :APP + FACEBOOK = :FACEBOOK + MESSENGER = :MESSENGER + WHATSAPP = :WHATSAPP + INSTAGRAM_DIRECT = :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE = :INSTAGRAM_PROFILE + PHONE_CALL = :PHONE_CALL + SHOP_AUTOMATIC = :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC = :APPLINKS_AUTOMATIC + ON_AD = :ON_AD + ON_POST = :ON_POST + ON_VIDEO = :ON_VIDEO + ON_PAGE = :ON_PAGE + ON_EVENT = :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP = :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE = :FACEBOOK_PAGE + INSTAGRAM_LIVE = :INSTAGRAM_LIVE + FACEBOOK_LIVE = :FACEBOOK_LIVE + IMAGINE = :IMAGINE + LEAD_FROM_IG_DIRECT = :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER = :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM = :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL = :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL = :BROADCAST_CHANNEL + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE = :NONE + APP_INSTALLS = :APP_INSTALLS + AD_RECALL_LIFT = :AD_RECALL_LIFT + ENGAGED_USERS = :ENGAGED_USERS + EVENT_RESPONSES = :EVENT_RESPONSES + IMPRESSIONS = :IMPRESSIONS + LEAD_GENERATION = :LEAD_GENERATION + QUALITY_LEAD = :QUALITY_LEAD + LINK_CLICKS = :LINK_CLICKS + OFFSITE_CONVERSIONS = :OFFSITE_CONVERSIONS + PAGE_LIKES = :PAGE_LIKES + POST_ENGAGEMENT = :POST_ENGAGEMENT + QUALITY_CALL = :QUALITY_CALL + REACH = :REACH + LANDING_PAGE_VIEWS = :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE = :VISIT_INSTAGRAM_PROFILE + VALUE = :VALUE + THRUPLAY = :THRUPLAY + DERIVED_EVENTS = :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS = :CONVERSATIONS + IN_APP_VALUE = :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION = :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS = :SUBSCRIBERS + REMINDERS_SET = :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT = :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT = :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT = :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH = :ENGAGED_REACH + ENGAGED_PAGE_VIEWS = :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE = :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE = :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION = :MESSAGING_APPOINTMENT_CONVERSION + + # @!method self.values + # @return [Array] + end + + # The ad platform (meta, tiktok). + # + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :ACTIVE + PAUSED = :PAUSED + + # @!method self.values + # @return [Array] + end + end + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute bid_price + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + required :bid_price, Float, nil?: true + + # @!attribute bid_type + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType, nil] + required :bid_type, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType }, + nil?: true + + # @!attribute billing_event + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent, nil] + required :billing_event, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent }, + nil?: true + + # @!attribute budget_mode + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode, nil] + required :budget_mode, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode }, + nil?: true + + # @!attribute conversion_bid_price + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + # + # @return [Float, nil] + required :conversion_bid_price, Float, nil?: true + + # @!attribute identity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_id, String, nil?: true + + # @!attribute identity_type + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_type, String, nil?: true + + # @!attribute operation_status + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus, nil] + required :operation_status, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus }, + nil?: true + + # @!attribute optimization_event + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :optimization_event, String, nil?: true + + # @!attribute optimization_goal + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal, nil] + required :optimization_goal, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal }, + nil?: true + + # @!attribute pacing + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing, nil] + required :pacing, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing }, + nil?: true + + # @!attribute pixel_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :pixel_id, String, nil?: true + + # @!attribute placement_type + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType, nil] + required :placement_type, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType }, + nil?: true + + # @!attribute placements + # + # @return [Array, nil] + required :placements, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute platform + # The ad platform (meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform } + + # @!attribute schedule_end_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :schedule_end_time, String, nil?: true + + # @!attribute schedule_start_time + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :schedule_start_time, String, nil?: true + + # @!attribute schedule_type + # + # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType, nil] + required :schedule_type, + enum: -> { WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType }, + nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :TiktokAdGroupPlatformConfigType] + required :typename, const: :TiktokAdGroupPlatformConfigType + + # @!method initialize(bid_price:, bid_type:, billing_event:, budget_mode:, conversion_bid_price:, identity_id:, identity_type:, operation_status:, optimization_event:, optimization_goal:, pacing:, pixel_id:, placement_type:, placements:, platform:, schedule_end_time:, schedule_start_time:, schedule_type:, typename: :TiktokAdGroupPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType} + # for more details. + # + # TikTok ad group configuration. + # + # @param bid_price [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param bid_type [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType, nil] + # + # @param billing_event [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent, nil] + # + # @param budget_mode [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode, nil] + # + # @param conversion_bid_price [Float, nil] Represents signed double-precision fractional values as specified by [IEEE 754]( + # + # @param identity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_type [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param operation_status [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus, nil] + # + # @param optimization_event [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param optimization_goal [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal, nil] + # + # @param pacing [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing, nil] + # + # @param pixel_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param placement_type [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType, nil] + # + # @param placements [Array, nil] + # + # @param platform [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform] The ad platform (meta, tiktok). + # + # @param schedule_end_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param schedule_start_time [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param schedule_type [Symbol, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType, nil] + # + # @param typename [Symbol, :TiktokAdGroupPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#bid_type + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID = :BID_TYPE_NO_BID + BID_TYPE_CUSTOM = :BID_TYPE_CUSTOM + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#billing_event + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC = :CPC + CPM = :CPM + OCPM = :OCPM + CPV = :CPV + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#budget_mode + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY = :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL = :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#operation_status + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE = :ENABLE + DISABLE = :DISABLE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#optimization_goal + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK = :CLICK + CONVERT = :CONVERT + INSTALL = :INSTALL + IN_APP_EVENT = :IN_APP_EVENT + REACH = :REACH + SHOW = :SHOW + VIDEO_VIEW = :VIDEO_VIEW + ENGAGED_VIEW = :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN = :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION = :LEAD_GENERATION + PREFERRED_LEAD = :PREFERRED_LEAD + CONVERSATION = :CONVERSATION + FOLLOWERS = :FOLLOWERS + PROFILE_VIEWS = :PROFILE_VIEWS + PAGE_VISIT = :PAGE_VISIT + VALUE = :VALUE + AUTOMATIC_VALUE_OPTIMIZATION = :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW = :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT = :DESTINATION_VISIT + MT_LIVE_ROOM = :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE = :PRODUCT_CLICK_IN_LIVE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#pacing + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH = :PACING_MODE_SMOOTH + PACING_MODE_FAST = :PACING_MODE_FAST + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#placement_type + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC = :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL = :PLACEMENT_TYPE_NORMAL + + # @!method self.values + # @return [Array] + end + + # The ad platform (meta, tiktok). + # + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType#schedule_type + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END = :SCHEDULE_START_END + SCHEDULE_FROM_NOW = :SCHEDULE_FROM_NOW + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType)] + end + + # Current operational status of the ad group + # + # @see WhopSDK::Models::AdGroupUpdateResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_list_params.rb b/lib/whop_sdk/models/ad_list_params.rb new file mode 100644 index 00000000..d7a59b21 --- /dev/null +++ b/lib/whop_sdk/models/ad_list_params.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Ads#list + class AdListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute ad_group_id + # Filter by ad group. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + # + # @return [String, nil] + optional :ad_group_id, String, nil?: true + + # @!attribute after + # Returns the elements in the list that come after the specified cursor. + # + # @return [String, nil] + optional :after, String, nil?: true + + # @!attribute before + # Returns the elements in the list that come before the specified cursor. + # + # @return [String, nil] + optional :before, String, nil?: true + + # @!attribute campaign_id + # Filter by campaign. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + # + # @return [String, nil] + optional :campaign_id, String, nil?: true + + # @!attribute company_id + # Filter by company. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + # + # @return [String, nil] + optional :company_id, String, nil?: true + + # @!attribute created_after + # Only return ads created after this timestamp. + # + # @return [Time, nil] + optional :created_after, Time, nil?: true + + # @!attribute created_before + # Only return ads created before this timestamp. + # + # @return [Time, nil] + optional :created_before, Time, nil?: true + + # @!attribute first + # Returns the first _n_ elements from the list. + # + # @return [Integer, nil] + optional :first, Integer, nil?: true + + # @!attribute last + # Returns the last _n_ elements from the list. + # + # @return [Integer, nil] + optional :last, Integer, nil?: true + + # @!attribute status + # The status of an external ad. + # + # @return [Symbol, WhopSDK::Models::AdListParams::Status, nil] + optional :status, enum: -> { WhopSDK::AdListParams::Status }, nil?: true + + # @!method initialize(ad_group_id: nil, after: nil, before: nil, campaign_id: nil, company_id: nil, created_after: nil, created_before: nil, first: nil, last: nil, status: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdListParams} for more details. + # + # @param ad_group_id [String, nil] Filter by ad group. Provide exactly one of ad*group_id, campaign_id, or company* + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param campaign_id [String, nil] Filter by campaign. Provide exactly one of ad*group_id, campaign_id, or company* + # + # @param company_id [String, nil] Filter by company. Provide exactly one of ad_group_id, campaign_id, or company_i + # + # @param created_after [Time, nil] Only return ads created after this timestamp. + # + # @param created_before [Time, nil] Only return ads created before this timestamp. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param status [Symbol, WhopSDK::Models::AdListParams::Status, nil] The status of an external ad. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The status of an external ad. + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_list_response.rb b/lib/whop_sdk/models/ad_list_response.rb new file mode 100644 index 00000000..ad50865e --- /dev/null +++ b/lib/whop_sdk/models/ad_list_response.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Ads#list + class AdListResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Unique identifier for the ad. + # + # @return [String] + required :id, String + + # @!attribute created_at + # When the ad was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute platform_config + # Typed platform-specific configuration. + # + # @return [WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType, nil] + required :platform_config, union: -> { WhopSDK::Models::AdListResponse::PlatformConfig } + + # @!attribute status + # Current status of the ad. + # + # @return [Symbol, WhopSDK::Models::AdListResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdListResponse::Status } + + # @!attribute updated_at + # When the ad was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, created_at:, platform_config:, status:, updated_at:) + # An ad belonging to an ad group + # + # @param id [String] Unique identifier for the ad. + # + # @param created_at [Time] When the ad was created. + # + # @param platform_config [WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType, nil] Typed platform-specific configuration. + # + # @param status [Symbol, WhopSDK::Models::AdListResponse::Status] Current status of the ad. + # + # @param updated_at [Time] When the ad was last updated. + + # Typed platform-specific configuration. + # + # @see WhopSDK::Models::AdListResponse#platform_config + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # Meta (Facebook/Instagram) ad configuration. + variant :MetaAdPlatformConfigType, + -> { WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType } + + # TikTok ad configuration. + variant :TiktokAdPlatformConfigType, + -> { WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType } + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute call_to_action_type + # + # @return [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType, nil] + required :call_to_action_type, + enum: -> { WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType }, + nil?: true + + # @!attribute headline + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :headline, String, nil?: true + + # @!attribute instagram_actor_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :instagram_actor_id, String, nil?: true + + # @!attribute link_url + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :link_url, String, nil?: true + + # @!attribute name + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute page_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :page_id, String, nil?: true + + # @!attribute platform + # The ad platform. + # + # @return [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform } + + # @!attribute primary_text + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :primary_text, String, nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :MetaAdPlatformConfigType] + required :typename, const: :MetaAdPlatformConfigType + + # @!attribute url_tags + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :url_tags, String, nil?: true + + # @!method initialize(call_to_action_type:, headline:, instagram_actor_id:, link_url:, name:, page_id:, platform:, primary_text:, url_tags:, typename: :MetaAdPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType} for + # more details. + # + # Meta (Facebook/Instagram) ad configuration. + # + # @param call_to_action_type [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType, nil] + # + # @param headline [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param instagram_actor_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param link_url [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param name [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param page_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform] The ad platform. + # + # @param primary_text [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param url_tags [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param typename [Symbol, :MetaAdPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType#call_to_action_type + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE = :LEARN_MORE + SHOP_NOW = :SHOP_NOW + SIGN_UP = :SIGN_UP + SUBSCRIBE = :SUBSCRIBE + GET_STARTED = :GET_STARTED + BOOK_NOW = :BOOK_NOW + APPLY_NOW = :APPLY_NOW + CONTACT_US = :CONTACT_US + DOWNLOAD = :DOWNLOAD + ORDER_NOW = :ORDER_NOW + BUY_NOW = :BUY_NOW + GET_QUOTE = :GET_QUOTE + MESSAGE_PAGE = :MESSAGE_PAGE + WHATSAPP_MESSAGE = :WHATSAPP_MESSAGE + INSTAGRAM_MESSAGE = :INSTAGRAM_MESSAGE + CALL_NOW = :CALL_NOW + GET_DIRECTIONS = :GET_DIRECTIONS + SEND_UPDATES = :SEND_UPDATES + GET_OFFER = :GET_OFFER + WATCH_MORE = :WATCH_MORE + LISTEN_NOW = :LISTEN_NOW + PLAY_GAME = :PLAY_GAME + OPEN_LINK = :OPEN_LINK + NO_BUTTON = :NO_BUTTON + GET_OFFER_VIEW = :GET_OFFER_VIEW + GET_EVENT_TICKETS = :GET_EVENT_TICKETS + SEE_MENU = :SEE_MENU + REQUEST_TIME = :REQUEST_TIME + EVENT_RSVP = :EVENT_RSVP + SEE_DETAILS = :SEE_DETAILS + + # @!method self.values + # @return [Array] + end + + # The ad platform. + # + # @see WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + end + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute ad_format + # + # @return [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat, nil] + required :ad_format, + enum: -> { WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat }, + nil?: true + + # @!attribute ad_name + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :ad_name, String, nil?: true + + # @!attribute ad_text + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :ad_text, String, nil?: true + + # @!attribute call_to_action + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @return [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction, nil] + required :call_to_action, + enum: -> { WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction }, + nil?: true + + # @!attribute identity_authorized_bc_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_authorized_bc_id, String, nil?: true + + # @!attribute identity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_id, String, nil?: true + + # @!attribute identity_type + # + # @return [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType, nil] + required :identity_type, + enum: -> { WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType }, + nil?: true + + # @!attribute image_ids + # + # @return [Array, nil] + required :image_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute landing_page_url + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :landing_page_url, String, nil?: true + + # @!attribute platform + # The ad platform. + # + # @return [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :TiktokAdPlatformConfigType] + required :typename, const: :TiktokAdPlatformConfigType + + # @!attribute video_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :video_id, String, nil?: true + + # @!method initialize(ad_format:, ad_name:, ad_text:, call_to_action:, identity_authorized_bc_id:, identity_id:, identity_type:, image_ids:, landing_page_url:, platform:, video_id:, typename: :TiktokAdPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType} + # for more details. + # + # TikTok ad configuration. + # + # @param ad_format [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat, nil] + # + # @param ad_name [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param ad_text [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param call_to_action [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction, nil] TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @param identity_authorized_bc_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_type [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType, nil] + # + # @param image_ids [Array, nil] + # + # @param landing_page_url [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform] The ad platform. + # + # @param video_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param typename [Symbol, :TiktokAdPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType#ad_format + module AdFormat + extend WhopSDK::Internal::Type::Enum + + SINGLE_IMAGE = :SINGLE_IMAGE + SINGLE_VIDEO = :SINGLE_VIDEO + CAROUSEL_ADS = :CAROUSEL_ADS + CATALOG_CAROUSEL = :CATALOG_CAROUSEL + LIVE_CONTENT = :LIVE_CONTENT + + # @!method self.values + # @return [Array] + end + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @see WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType#call_to_action + module CallToAction + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE = :LEARN_MORE + DOWNLOAD = :DOWNLOAD + SHOP_NOW = :SHOP_NOW + SIGN_UP = :SIGN_UP + CONTACT_US = :CONTACT_US + APPLY_NOW = :APPLY_NOW + BOOK_NOW = :BOOK_NOW + PLAY_GAME = :PLAY_GAME + WATCH_NOW = :WATCH_NOW + READ_MORE = :READ_MORE + VIEW_NOW = :VIEW_NOW + GET_QUOTE = :GET_QUOTE + ORDER_NOW = :ORDER_NOW + INSTALL_NOW = :INSTALL_NOW + GET_SHOWTIMES = :GET_SHOWTIMES + LISTEN_NOW = :LISTEN_NOW + INTERESTED = :INTERESTED + SUBSCRIBE = :SUBSCRIBE + GET_TICKETS_NOW = :GET_TICKETS_NOW + EXPERIENCE_NOW = :EXPERIENCE_NOW + PRE_ORDER_NOW = :PRE_ORDER_NOW + VISIT_STORE = :VISIT_STORE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType#identity_type + module IdentityType + extend WhopSDK::Internal::Type::Enum + + CUSTOMIZED_USER = :CUSTOMIZED_USER + AUTH_CODE = :AUTH_CODE + TT_USER = :TT_USER + BC_AUTH_TT = :BC_AUTH_TT + + # @!method self.values + # @return [Array] + end + + # The ad platform. + # + # @see WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType)] + end + + # Current status of the ad. + # + # @see WhopSDK::Models::AdListResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/ad_retrieve_params.rb b/lib/whop_sdk/models/ad_retrieve_params.rb new file mode 100644 index 00000000..48772f97 --- /dev/null +++ b/lib/whop_sdk/models/ad_retrieve_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Ads#retrieve + class AdRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/ad_retrieve_response.rb b/lib/whop_sdk/models/ad_retrieve_response.rb new file mode 100644 index 00000000..63a5327f --- /dev/null +++ b/lib/whop_sdk/models/ad_retrieve_response.rb @@ -0,0 +1,505 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Ads#retrieve + class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Unique identifier for the ad. + # + # @return [String] + required :id, String + + # @!attribute created_at + # When the ad was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute external_ad_creative_set + # The creative set used by this ad. + # + # @return [WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet, nil] + required :external_ad_creative_set, + -> { WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet }, + nil?: true + + # @!attribute external_ad_group + # The parent ad group. + # + # @return [WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup] + required :external_ad_group, -> { WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup } + + # @!attribute platform_config + # Typed platform-specific configuration. + # + # @return [WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType, nil] + required :platform_config, union: -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig } + + # @!attribute status + # Current status of the ad. + # + # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::Status] + required :status, enum: -> { WhopSDK::Models::AdRetrieveResponse::Status } + + # @!attribute updated_at + # When the ad was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, created_at:, external_ad_creative_set:, external_ad_group:, platform_config:, status:, updated_at:) + # An ad belonging to an ad group + # + # @param id [String] Unique identifier for the ad. + # + # @param created_at [Time] When the ad was created. + # + # @param external_ad_creative_set [WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet, nil] The creative set used by this ad. + # + # @param external_ad_group [WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup] The parent ad group. + # + # @param platform_config [WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType, nil] Typed platform-specific configuration. + # + # @param status [Symbol, WhopSDK::Models::AdRetrieveResponse::Status] Current status of the ad. + # + # @param updated_at [Time] When the ad was last updated. + + # @see WhopSDK::Models::AdRetrieveResponse#external_ad_creative_set + class ExternalAdCreativeSet < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the external ad creative set. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The creative set used by this ad. + # + # @param id [String] The unique identifier for the external ad creative set. + end + + # @see WhopSDK::Models::AdRetrieveResponse#external_ad_group + class ExternalAdGroup < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the external ad group. + # + # @return [String] + required :id, String + + # @!attribute name + # Human-readable ad group name + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute status + # Current operational status of the ad group + # + # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status] + required :status, enum: -> { WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status } + + # @!method initialize(id:, name:, status:) + # The parent ad group. + # + # @param id [String] The unique identifier for the external ad group. + # + # @param name [String, nil] Human-readable ad group name + # + # @param status [Symbol, WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status] Current operational status of the ad group + + # Current operational status of the ad group + # + # @see WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + + # Typed platform-specific configuration. + # + # @see WhopSDK::Models::AdRetrieveResponse#platform_config + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # Meta (Facebook/Instagram) ad configuration. + variant :MetaAdPlatformConfigType, + -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType } + + # TikTok ad configuration. + variant :TiktokAdPlatformConfigType, + -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType } + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute call_to_action_type + # + # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType, nil] + required :call_to_action_type, + enum: -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType }, + nil?: true + + # @!attribute headline + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :headline, String, nil?: true + + # @!attribute instagram_actor_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :instagram_actor_id, String, nil?: true + + # @!attribute link_url + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :link_url, String, nil?: true + + # @!attribute name + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute page_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :page_id, String, nil?: true + + # @!attribute platform + # The ad platform. + # + # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform } + + # @!attribute primary_text + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :primary_text, String, nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :MetaAdPlatformConfigType] + required :typename, const: :MetaAdPlatformConfigType + + # @!attribute url_tags + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :url_tags, String, nil?: true + + # @!method initialize(call_to_action_type:, headline:, instagram_actor_id:, link_url:, name:, page_id:, platform:, primary_text:, url_tags:, typename: :MetaAdPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType} + # for more details. + # + # Meta (Facebook/Instagram) ad configuration. + # + # @param call_to_action_type [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType, nil] + # + # @param headline [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param instagram_actor_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param link_url [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param name [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param page_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform] The ad platform. + # + # @param primary_text [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param url_tags [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param typename [Symbol, :MetaAdPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType#call_to_action_type + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE = :LEARN_MORE + SHOP_NOW = :SHOP_NOW + SIGN_UP = :SIGN_UP + SUBSCRIBE = :SUBSCRIBE + GET_STARTED = :GET_STARTED + BOOK_NOW = :BOOK_NOW + APPLY_NOW = :APPLY_NOW + CONTACT_US = :CONTACT_US + DOWNLOAD = :DOWNLOAD + ORDER_NOW = :ORDER_NOW + BUY_NOW = :BUY_NOW + GET_QUOTE = :GET_QUOTE + MESSAGE_PAGE = :MESSAGE_PAGE + WHATSAPP_MESSAGE = :WHATSAPP_MESSAGE + INSTAGRAM_MESSAGE = :INSTAGRAM_MESSAGE + CALL_NOW = :CALL_NOW + GET_DIRECTIONS = :GET_DIRECTIONS + SEND_UPDATES = :SEND_UPDATES + GET_OFFER = :GET_OFFER + WATCH_MORE = :WATCH_MORE + LISTEN_NOW = :LISTEN_NOW + PLAY_GAME = :PLAY_GAME + OPEN_LINK = :OPEN_LINK + NO_BUTTON = :NO_BUTTON + GET_OFFER_VIEW = :GET_OFFER_VIEW + GET_EVENT_TICKETS = :GET_EVENT_TICKETS + SEE_MENU = :SEE_MENU + REQUEST_TIME = :REQUEST_TIME + EVENT_RSVP = :EVENT_RSVP + SEE_DETAILS = :SEE_DETAILS + + # @!method self.values + # @return [Array] + end + + # The ad platform. + # + # @see WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + end + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + # @!attribute ad_format + # + # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat, nil] + required :ad_format, + enum: -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat }, + nil?: true + + # @!attribute ad_name + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :ad_name, String, nil?: true + + # @!attribute ad_text + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :ad_text, String, nil?: true + + # @!attribute call_to_action + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction, nil] + required :call_to_action, + enum: -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction }, + nil?: true + + # @!attribute identity_authorized_bc_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_authorized_bc_id, String, nil?: true + + # @!attribute identity_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :identity_id, String, nil?: true + + # @!attribute identity_type + # + # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType, nil] + required :identity_type, + enum: -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType }, + nil?: true + + # @!attribute image_ids + # + # @return [Array, nil] + required :image_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute landing_page_url + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :landing_page_url, String, nil?: true + + # @!attribute platform + # The ad platform. + # + # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform] + required :platform, + enum: -> { WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform } + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :TiktokAdPlatformConfigType] + required :typename, const: :TiktokAdPlatformConfigType + + # @!attribute video_id + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + # + # @return [String, nil] + required :video_id, String, nil?: true + + # @!method initialize(ad_format:, ad_name:, ad_text:, call_to_action:, identity_authorized_bc_id:, identity_id:, identity_type:, image_ids:, landing_page_url:, platform:, video_id:, typename: :TiktokAdPlatformConfigType) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType} + # for more details. + # + # TikTok ad configuration. + # + # @param ad_format [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat, nil] + # + # @param ad_name [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param ad_text [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param call_to_action [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction, nil] TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @param identity_authorized_bc_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param identity_type [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType, nil] + # + # @param image_ids [Array, nil] + # + # @param landing_page_url [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param platform [Symbol, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform] The ad platform. + # + # @param video_id [String, nil] Represents textual data as UTF-8 character sequences. This type is most often us + # + # @param typename [Symbol, :TiktokAdPlatformConfigType] The typename of this object + + # @see WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType#ad_format + module AdFormat + extend WhopSDK::Internal::Type::Enum + + SINGLE_IMAGE = :SINGLE_IMAGE + SINGLE_VIDEO = :SINGLE_VIDEO + CAROUSEL_ADS = :CAROUSEL_ADS + CATALOG_CAROUSEL = :CATALOG_CAROUSEL + LIVE_CONTENT = :LIVE_CONTENT + + # @!method self.values + # @return [Array] + end + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + # + # @see WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType#call_to_action + module CallToAction + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE = :LEARN_MORE + DOWNLOAD = :DOWNLOAD + SHOP_NOW = :SHOP_NOW + SIGN_UP = :SIGN_UP + CONTACT_US = :CONTACT_US + APPLY_NOW = :APPLY_NOW + BOOK_NOW = :BOOK_NOW + PLAY_GAME = :PLAY_GAME + WATCH_NOW = :WATCH_NOW + READ_MORE = :READ_MORE + VIEW_NOW = :VIEW_NOW + GET_QUOTE = :GET_QUOTE + ORDER_NOW = :ORDER_NOW + INSTALL_NOW = :INSTALL_NOW + GET_SHOWTIMES = :GET_SHOWTIMES + LISTEN_NOW = :LISTEN_NOW + INTERESTED = :INTERESTED + SUBSCRIBE = :SUBSCRIBE + GET_TICKETS_NOW = :GET_TICKETS_NOW + EXPERIENCE_NOW = :EXPERIENCE_NOW + PRE_ORDER_NOW = :PRE_ORDER_NOW + VISIT_STORE = :VISIT_STORE + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType#identity_type + module IdentityType + extend WhopSDK::Internal::Type::Enum + + CUSTOMIZED_USER = :CUSTOMIZED_USER + AUTH_CODE = :AUTH_CODE + TT_USER = :TT_USER + BC_AUTH_TT = :BC_AUTH_TT + + # @!method self.values + # @return [Array] + end + + # The ad platform. + # + # @see WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType#platform + module Platform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType, WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType)] + end + + # Current status of the ad. + # + # @see WhopSDK::Models::AdRetrieveResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + INACTIVE = :inactive + IN_REVIEW = :in_review + REJECTED = :rejected + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/authorized_user_roles.rb b/lib/whop_sdk/models/authorized_user_roles.rb index e40d6b83..8b0cacce 100644 --- a/lib/whop_sdk/models/authorized_user_roles.rb +++ b/lib/whop_sdk/models/authorized_user_roles.rb @@ -10,6 +10,7 @@ module AuthorizedUserRoles ADMIN = :admin SALES_MANAGER = :sales_manager MODERATOR = :moderator + ADVERTISER = :advertiser APP_MANAGER = :app_manager SUPPORT = :support MANAGER = :manager diff --git a/lib/whop_sdk/models/bounty_create_params.rb b/lib/whop_sdk/models/bounty_create_params.rb new file mode 100644 index 00000000..7616f612 --- /dev/null +++ b/lib/whop_sdk/models/bounty_create_params.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Bounties#create + class BountyCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute base_unit_amount + # The amount paid to each approved submission. The total bounty pool funded is + # this amount times accepted_submissions_limit. + # + # @return [Float] + required :base_unit_amount, Float + + # @!attribute currency + # The currency for the bounty pool funding amount. + # + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } + + # @!attribute description + # The description of the bounty. + # + # @return [String] + required :description, String + + # @!attribute title + # The title of the bounty. + # + # @return [String] + required :title, String + + # @!attribute accepted_submissions_limit + # The number of submissions that can be approved before the bounty closes. + # Defaults to 1. + # + # @return [Integer, nil] + optional :accepted_submissions_limit, Integer, nil?: true + + # @!attribute allowed_country_codes + # The ISO3166 country codes where this bounty should be visible. Empty means + # globally visible. + # + # @return [Array, nil] + optional :allowed_country_codes, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute experience_id + # An optional experience to scope the bounty to. + # + # @return [String, nil] + optional :experience_id, String, nil?: true + + # @!attribute origin_account_id + # The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool. + # Defaults to the requester's personal balance when omitted. The requester must be + # the user themself or an owner/admin of the company. + # + # @return [String, nil] + optional :origin_account_id, String, nil?: true + + # @!method initialize(base_unit_amount:, currency:, description:, title:, accepted_submissions_limit: nil, allowed_country_codes: nil, experience_id: nil, origin_account_id: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::BountyCreateParams} for more details. + # + # @param base_unit_amount [Float] The amount paid to each approved submission. The total bounty pool funded is thi + # + # @param currency [Symbol, WhopSDK::Models::Currency] The currency for the bounty pool funding amount. + # + # @param description [String] The description of the bounty. + # + # @param title [String] The title of the bounty. + # + # @param accepted_submissions_limit [Integer, nil] The number of submissions that can be approved before the bounty closes. Default + # + # @param allowed_country_codes [Array, nil] The ISO3166 country codes where this bounty should be visible. Empty means globa + # + # @param experience_id [String, nil] An optional experience to scope the bounty to. + # + # @param origin_account_id [String, nil] The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool. + # D + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/bounty_create_response.rb b/lib/whop_sdk/models/bounty_create_response.rb new file mode 100644 index 00000000..13ee5d09 --- /dev/null +++ b/lib/whop_sdk/models/bounty_create_response.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Bounties#create + class BountyCreateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the bounty. + # + # @return [String] + required :id, String + + # @!attribute bounty_type + # The underlying bounty implementation type. + # + # @return [Symbol, WhopSDK::Models::BountyCreateResponse::BountyType] + required :bounty_type, enum: -> { WhopSDK::Models::BountyCreateResponse::BountyType } + + # @!attribute created_at + # The datetime the bounty was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute currency + # The currency used for the bounty funds. + # + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } + + # @!attribute description + # The description of the bounty. + # + # @return [String] + required :description, String + + # @!attribute status + # The current lifecycle status of the bounty. + # + # @return [Symbol, WhopSDK::Models::BountyCreateResponse::Status] + required :status, enum: -> { WhopSDK::Models::BountyCreateResponse::Status } + + # @!attribute title + # The title of the bounty. + # + # @return [String] + required :title, String + + # @!attribute total_available + # The total amount currently funded in the bounty pool for payout. + # + # @return [Float] + required :total_available, Float + + # @!attribute total_paid + # The total amount paid out for this bounty. + # + # @return [Float] + required :total_paid, Float + + # @!attribute updated_at + # The datetime the bounty was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!attribute vote_threshold + # The number of watcher votes required before the submission can resolve. + # + # @return [Integer] + required :vote_threshold, Integer + + # @!method initialize(id:, bounty_type:, created_at:, currency:, description:, status:, title:, total_available:, total_paid:, updated_at:, vote_threshold:) + # A privately accessible bounty. + # + # @param id [String] The unique identifier for the bounty. + # + # @param bounty_type [Symbol, WhopSDK::Models::BountyCreateResponse::BountyType] The underlying bounty implementation type. + # + # @param created_at [Time] The datetime the bounty was created. + # + # @param currency [Symbol, WhopSDK::Models::Currency] The currency used for the bounty funds. + # + # @param description [String] The description of the bounty. + # + # @param status [Symbol, WhopSDK::Models::BountyCreateResponse::Status] The current lifecycle status of the bounty. + # + # @param title [String] The title of the bounty. + # + # @param total_available [Float] The total amount currently funded in the bounty pool for payout. + # + # @param total_paid [Float] The total amount paid out for this bounty. + # + # @param updated_at [Time] The datetime the bounty was last updated. + # + # @param vote_threshold [Integer] The number of watcher votes required before the submission can resolve. + + # The underlying bounty implementation type. + # + # @see WhopSDK::Models::BountyCreateResponse#bounty_type + module BountyType + extend WhopSDK::Internal::Type::Enum + + CLASSIC = :classic + USER_FUNDED = :user_funded + WORKFORCE = :workforce + + # @!method self.values + # @return [Array] + end + + # The current lifecycle status of the bounty. + # + # @see WhopSDK::Models::BountyCreateResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + PUBLISHED = :published + ARCHIVED = :archived + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/bounty_list_params.rb b/lib/whop_sdk/models/bounty_list_params.rb new file mode 100644 index 00000000..1b676326 --- /dev/null +++ b/lib/whop_sdk/models/bounty_list_params.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Bounties#list + class BountyListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute after + # Returns the elements in the list that come after the specified cursor. + # + # @return [String, nil] + optional :after, String, nil?: true + + # @!attribute before + # Returns the elements in the list that come before the specified cursor. + # + # @return [String, nil] + optional :before, String, nil?: true + + # @!attribute direction + # The direction of the sort. + # + # @return [Symbol, WhopSDK::Models::Direction, nil] + optional :direction, enum: -> { WhopSDK::Direction }, nil?: true + + # @!attribute experience_id + # The experience to list bounties for. When omitted, returns bounties with no + # experience. + # + # @return [String, nil] + optional :experience_id, String, nil?: true + + # @!attribute first + # Returns the first _n_ elements from the list. + # + # @return [Integer, nil] + optional :first, Integer, nil?: true + + # @!attribute last + # Returns the last _n_ elements from the list. + # + # @return [Integer, nil] + optional :last, Integer, nil?: true + + # @!attribute status + # The available bounty statuses to choose from. + # + # @return [Symbol, WhopSDK::Models::BountyListParams::Status, nil] + optional :status, enum: -> { WhopSDK::BountyListParams::Status }, nil?: true + + # @!method initialize(after: nil, before: nil, direction: nil, experience_id: nil, first: nil, last: nil, status: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::BountyListParams} for more details. + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. + # + # @param experience_id [String, nil] The experience to list bounties for. When omitted, returns bounties with no expe + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param status [Symbol, WhopSDK::Models::BountyListParams::Status, nil] The available bounty statuses to choose from. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The available bounty statuses to choose from. + module Status + extend WhopSDK::Internal::Type::Enum + + PUBLISHED = :published + ARCHIVED = :archived + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/bounty_list_response.rb b/lib/whop_sdk/models/bounty_list_response.rb new file mode 100644 index 00000000..972b7a2e --- /dev/null +++ b/lib/whop_sdk/models/bounty_list_response.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Bounties#list + class BountyListResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the bounty. + # + # @return [String] + required :id, String + + # @!attribute bounty_type + # The underlying bounty implementation type. + # + # @return [Symbol, WhopSDK::Models::BountyListResponse::BountyType] + required :bounty_type, enum: -> { WhopSDK::Models::BountyListResponse::BountyType } + + # @!attribute created_at + # The datetime the bounty was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute currency + # The currency used for the bounty funds. + # + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } + + # @!attribute description + # The description of the bounty. + # + # @return [String] + required :description, String + + # @!attribute status + # The current lifecycle status of the bounty. + # + # @return [Symbol, WhopSDK::Models::BountyListResponse::Status] + required :status, enum: -> { WhopSDK::Models::BountyListResponse::Status } + + # @!attribute title + # The title of the bounty. + # + # @return [String] + required :title, String + + # @!attribute total_available + # The total amount currently funded in the bounty pool for payout. + # + # @return [Float] + required :total_available, Float + + # @!attribute total_paid + # The total amount paid out for this bounty. + # + # @return [Float] + required :total_paid, Float + + # @!attribute updated_at + # The datetime the bounty was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!attribute vote_threshold + # The number of watcher votes required before the submission can resolve. + # + # @return [Integer] + required :vote_threshold, Integer + + # @!method initialize(id:, bounty_type:, created_at:, currency:, description:, status:, title:, total_available:, total_paid:, updated_at:, vote_threshold:) + # A privately accessible bounty. + # + # @param id [String] The unique identifier for the bounty. + # + # @param bounty_type [Symbol, WhopSDK::Models::BountyListResponse::BountyType] The underlying bounty implementation type. + # + # @param created_at [Time] The datetime the bounty was created. + # + # @param currency [Symbol, WhopSDK::Models::Currency] The currency used for the bounty funds. + # + # @param description [String] The description of the bounty. + # + # @param status [Symbol, WhopSDK::Models::BountyListResponse::Status] The current lifecycle status of the bounty. + # + # @param title [String] The title of the bounty. + # + # @param total_available [Float] The total amount currently funded in the bounty pool for payout. + # + # @param total_paid [Float] The total amount paid out for this bounty. + # + # @param updated_at [Time] The datetime the bounty was last updated. + # + # @param vote_threshold [Integer] The number of watcher votes required before the submission can resolve. + + # The underlying bounty implementation type. + # + # @see WhopSDK::Models::BountyListResponse#bounty_type + module BountyType + extend WhopSDK::Internal::Type::Enum + + CLASSIC = :classic + USER_FUNDED = :user_funded + WORKFORCE = :workforce + + # @!method self.values + # @return [Array] + end + + # The current lifecycle status of the bounty. + # + # @see WhopSDK::Models::BountyListResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + PUBLISHED = :published + ARCHIVED = :archived + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/bounty_retrieve_params.rb b/lib/whop_sdk/models/bounty_retrieve_params.rb new file mode 100644 index 00000000..460f7b26 --- /dev/null +++ b/lib/whop_sdk/models/bounty_retrieve_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Bounties#retrieve + class BountyRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/bounty_retrieve_response.rb b/lib/whop_sdk/models/bounty_retrieve_response.rb new file mode 100644 index 00000000..48e7bf1b --- /dev/null +++ b/lib/whop_sdk/models/bounty_retrieve_response.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Bounties#retrieve + class BountyRetrieveResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the bounty. + # + # @return [String] + required :id, String + + # @!attribute bounty_type + # The underlying bounty implementation type. + # + # @return [Symbol, WhopSDK::Models::BountyRetrieveResponse::BountyType] + required :bounty_type, enum: -> { WhopSDK::Models::BountyRetrieveResponse::BountyType } + + # @!attribute created_at + # The datetime the bounty was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute currency + # The currency used for the bounty funds. + # + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } + + # @!attribute description + # The description of the bounty. + # + # @return [String] + required :description, String + + # @!attribute status + # The current lifecycle status of the bounty. + # + # @return [Symbol, WhopSDK::Models::BountyRetrieveResponse::Status] + required :status, enum: -> { WhopSDK::Models::BountyRetrieveResponse::Status } + + # @!attribute title + # The title of the bounty. + # + # @return [String] + required :title, String + + # @!attribute total_available + # The total amount currently funded in the bounty pool for payout. + # + # @return [Float] + required :total_available, Float + + # @!attribute total_paid + # The total amount paid out for this bounty. + # + # @return [Float] + required :total_paid, Float + + # @!attribute updated_at + # The datetime the bounty was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!attribute vote_threshold + # The number of watcher votes required before the submission can resolve. + # + # @return [Integer] + required :vote_threshold, Integer + + # @!method initialize(id:, bounty_type:, created_at:, currency:, description:, status:, title:, total_available:, total_paid:, updated_at:, vote_threshold:) + # A privately accessible bounty. + # + # @param id [String] The unique identifier for the bounty. + # + # @param bounty_type [Symbol, WhopSDK::Models::BountyRetrieveResponse::BountyType] The underlying bounty implementation type. + # + # @param created_at [Time] The datetime the bounty was created. + # + # @param currency [Symbol, WhopSDK::Models::Currency] The currency used for the bounty funds. + # + # @param description [String] The description of the bounty. + # + # @param status [Symbol, WhopSDK::Models::BountyRetrieveResponse::Status] The current lifecycle status of the bounty. + # + # @param title [String] The title of the bounty. + # + # @param total_available [Float] The total amount currently funded in the bounty pool for payout. + # + # @param total_paid [Float] The total amount paid out for this bounty. + # + # @param updated_at [Time] The datetime the bounty was last updated. + # + # @param vote_threshold [Integer] The number of watcher votes required before the submission can resolve. + + # The underlying bounty implementation type. + # + # @see WhopSDK::Models::BountyRetrieveResponse#bounty_type + module BountyType + extend WhopSDK::Internal::Type::Enum + + CLASSIC = :classic + USER_FUNDED = :user_funded + WORKFORCE = :workforce + + # @!method self.values + # @return [Array] + end + + # The current lifecycle status of the bounty. + # + # @see WhopSDK::Models::BountyRetrieveResponse#status + module Status + extend WhopSDK::Internal::Type::Enum + + PUBLISHED = :published + ARCHIVED = :archived + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/checkout_configuration.rb b/lib/whop_sdk/models/checkout_configuration.rb index 778a6bcf..5544e0b2 100644 --- a/lib/whop_sdk/models/checkout_configuration.rb +++ b/lib/whop_sdk/models/checkout_configuration.rb @@ -155,6 +155,13 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute adaptive_pricing_enabled + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + # + # @return [Boolean] + required :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean + # @!attribute billing_period # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. @@ -220,7 +227,7 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility] required :visibility, enum: -> { WhopSDK::Visibility } - # @!method initialize(id:, billing_period:, currency:, expiration_days:, initial_price:, plan_type:, release_method:, renewal_price:, trial_period_days:, visibility:) + # @!method initialize(id:, adaptive_pricing_enabled:, billing_period:, currency:, expiration_days:, initial_price:, plan_type:, release_method:, renewal_price:, trial_period_days:, visibility:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfiguration::Plan} for more details. # @@ -228,6 +235,8 @@ class Plan < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for the plan. # + # @param adaptive_pricing_enabled [Boolean] Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # # @param billing_period [Integer, nil] The number of days between each recurring charge. Null for one-time plans. For e # # @param currency [Symbol, WhopSDK::Models::Currency] The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary diff --git a/lib/whop_sdk/models/checkout_configuration_create_params.rb b/lib/whop_sdk/models/checkout_configuration_create_params.rb index 7fdca77c..4a8f5733 100644 --- a/lib/whop_sdk/models/checkout_configuration_create_params.rb +++ b/lib/whop_sdk/models/checkout_configuration_create_params.rb @@ -145,6 +145,12 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Currency] required :currency, enum: -> { WhopSDK::Currency } + # @!attribute adaptive_pricing_enabled + # Whether this plan accepts local currency payments via adaptive pricing. + # + # @return [Boolean, nil] + optional :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + # @!attribute application_fee_amount # The application fee amount collected by the platform from this connected # account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less @@ -300,7 +306,7 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true - # @!method initialize(company_id:, currency:, application_fee_amount: nil, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, visibility: nil) + # @!method initialize(company_id:, currency:, adaptive_pricing_enabled: nil, application_fee_amount: nil, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, visibility: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan} # for more details. @@ -311,6 +317,8 @@ class Plan < WhopSDK::Internal::Type::BaseModel # # @param currency [Symbol, WhopSDK::Models::Currency] The respective currency identifier for the plan. # + # @param adaptive_pricing_enabled [Boolean, nil] Whether this plan accepts local currency payments via adaptive pricing. + # # @param application_fee_amount [Float, nil] The application fee amount collected by the platform from this connected account # # @param billing_period [Integer, nil] The interval in days at which the plan charges (renewal plans). For example, 30 @@ -441,10 +449,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::PaymentMethodConfiguration} # for more details. @@ -456,7 +464,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan#product @@ -574,6 +582,13 @@ class Product < WhopSDK::Internal::Type::BaseModel # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan#checkout_styling class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + # @!attribute background_color + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + # + # @return [String, nil] + optional :background_color, String, nil?: true + # @!attribute border_style # The different border-radius styles available for checkout pages. # @@ -592,10 +607,16 @@ class CheckoutStyling < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::CheckoutFont, nil] optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true - # @!method initialize(border_style: nil, button_color: nil, font_family: nil) + # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::CheckoutStyling} + # for more details. + # # Checkout styling overrides for this session. Overrides plan and company # defaults. # + # @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary + # # @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages. # # @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733). @@ -636,10 +657,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::PaymentMethodConfiguration} # for more details. @@ -651,7 +672,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end end @@ -757,6 +778,13 @@ class CreateCheckoutSessionInputModePaymentWithPlanID < WhopSDK::Internal::Type: # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID#checkout_styling class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + # @!attribute background_color + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + # + # @return [String, nil] + optional :background_color, String, nil?: true + # @!attribute border_style # The different border-radius styles available for checkout pages. # @@ -775,10 +803,16 @@ class CheckoutStyling < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::CheckoutFont, nil] optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true - # @!method initialize(border_style: nil, button_color: nil, font_family: nil) + # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::CheckoutStyling} + # for more details. + # # Checkout styling overrides for this session. Overrides plan and company # defaults. # + # @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary + # # @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages. # # @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733). @@ -819,10 +853,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlanID::PaymentMethodConfiguration} # for more details. @@ -834,7 +868,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end end @@ -931,6 +965,13 @@ class CreateCheckoutSessionInputModeSetup < WhopSDK::Internal::Type::BaseModel # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModeSetup#checkout_styling class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + # @!attribute background_color + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + # + # @return [String, nil] + optional :background_color, String, nil?: true + # @!attribute border_style # The different border-radius styles available for checkout pages. # @@ -949,10 +990,16 @@ class CheckoutStyling < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::CheckoutFont, nil] optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true - # @!method initialize(border_style: nil, button_color: nil, font_family: nil) + # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModeSetup::CheckoutStyling} + # for more details. + # # Checkout styling overrides for this session. Overrides plan and company # defaults. # + # @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary + # # @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages. # # @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733). @@ -983,10 +1030,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModeSetup::PaymentMethodConfiguration} # for more details. @@ -998,7 +1045,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end end diff --git a/lib/whop_sdk/models/checkout_configuration_list_response.rb b/lib/whop_sdk/models/checkout_configuration_list_response.rb index d8eae4ee..9b5f324c 100644 --- a/lib/whop_sdk/models/checkout_configuration_list_response.rb +++ b/lib/whop_sdk/models/checkout_configuration_list_response.rb @@ -156,6 +156,13 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute adaptive_pricing_enabled + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + # + # @return [Boolean] + required :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean + # @!attribute billing_period # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. @@ -221,7 +228,7 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility] required :visibility, enum: -> { WhopSDK::Visibility } - # @!method initialize(id:, billing_period:, currency:, expiration_days:, initial_price:, plan_type:, release_method:, renewal_price:, trial_period_days:, visibility:) + # @!method initialize(id:, adaptive_pricing_enabled:, billing_period:, currency:, expiration_days:, initial_price:, plan_type:, release_method:, renewal_price:, trial_period_days:, visibility:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationListResponse::Plan} for more details. # @@ -229,6 +236,8 @@ class Plan < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for the plan. # + # @param adaptive_pricing_enabled [Boolean] Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # # @param billing_period [Integer, nil] The number of days between each recurring charge. Null for one-time plans. For e # # @param currency [Symbol, WhopSDK::Models::Currency] The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary diff --git a/lib/whop_sdk/models/company_create_api_key_params.rb b/lib/whop_sdk/models/company_create_api_key_params.rb new file mode 100644 index 00000000..8b52d94f --- /dev/null +++ b/lib/whop_sdk/models/company_create_api_key_params.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Companies#create_api_key + class CompanyCreateAPIKeyParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute parent_company_id + # + # @return [String] + required :parent_company_id, String + + # @!attribute child_company_id + # The unique identifier of the connected account to create the API key for (e.g. + # 'biz_xxx'). + # + # @return [String] + required :child_company_id, String + + # @!attribute name + # A human-readable name for the API key, such as 'Production API Key'. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute permissions + # Granular permission statements defining which actions this API key can perform. + # Either permissions or role must be provided. + # + # @return [Array, nil] + optional :permissions, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CompanyCreateAPIKeyParams::Permission] }, + nil?: true + + # @!attribute role + # The different system roles that can be assigned. + # + # @return [Symbol, WhopSDK::Models::CompanyCreateAPIKeyParams::Role, nil] + optional :role, enum: -> { WhopSDK::CompanyCreateAPIKeyParams::Role }, nil?: true + + # @!method initialize(parent_company_id:, child_company_id:, name: nil, permissions: nil, role: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::CompanyCreateAPIKeyParams} for more details. + # + # @param parent_company_id [String] + # + # @param child_company_id [String] The unique identifier of the connected account to create the API key for (e.g. ' + # + # @param name [String, nil] A human-readable name for the API key, such as 'Production API Key'. + # + # @param permissions [Array, nil] Granular permission statements defining which actions this API key can perform. + # + # @param role [Symbol, WhopSDK::Models::CompanyCreateAPIKeyParams::Role, nil] The different system roles that can be assigned. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + class Permission < WhopSDK::Internal::Type::BaseModel + # @!attribute actions + # Actions covered by this statement + # + # @return [Array] + required :actions, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute grant + # Whether the actions are granted or denied + # + # @return [Boolean] + required :grant, WhopSDK::Internal::Type::Boolean + + # @!attribute resources + # Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*_|exp*xxx' or + # 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or + # 'biz_xxx|pass*_' + # + # @return [Array] + required :resources, WhopSDK::Internal::Type::ArrayOf[String] + + # @!method initialize(actions:, grant:, resources:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::CompanyCreateAPIKeyParams::Permission} for more details. + # + # Input for a single permissions statement + # + # @param actions [Array] Actions covered by this statement + # + # @param grant [Boolean] Whether the actions are granted or denied + # + # @param resources [Array] Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*\*|exp_xxx' or + # 'b + end + + # The different system roles that can be assigned. + module Role + extend WhopSDK::Internal::Type::Enum + + OWNER = :owner + ADMIN = :admin + MODERATOR = :moderator + SALES_MANAGER = :sales_manager + ADVERTISER = :advertiser + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/company_create_api_key_response.rb b/lib/whop_sdk/models/company_create_api_key_response.rb new file mode 100644 index 00000000..8e0208a0 --- /dev/null +++ b/lib/whop_sdk/models/company_create_api_key_response.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Companies#create_api_key + class CompanyCreateAPIKeyResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the authorized api key. + # + # @return [String] + required :id, String + + # @!attribute name + # A user set name to identify an API key + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute secret_key + # The secret key used to authenticate requests. Only returned at creation time. + # + # @return [String] + required :secret_key, String + + # @!method initialize(id:, name:, secret_key:) + # An API key created for a child company, including the one-time secret key. + # + # @param id [String] The unique identifier for the authorized api key. + # + # @param name [String, nil] A user set name to identify an API key + # + # @param secret_key [String] The secret key used to authenticate requests. Only returned at creation time. + end + end +end diff --git a/lib/whop_sdk/models/conversion_create_params.rb b/lib/whop_sdk/models/conversion_create_params.rb new file mode 100644 index 00000000..50a5b678 --- /dev/null +++ b/lib/whop_sdk/models/conversion_create_params.rb @@ -0,0 +1,462 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Conversions#create + class ConversionCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute company_id + # The company to associate with this event. + # + # @return [String] + required :company_id, String + + # @!attribute event_name + # The type of event. + # + # @return [Symbol, WhopSDK::Models::ConversionCreateParams::EventName] + required :event_name, enum: -> { WhopSDK::ConversionCreateParams::EventName } + + # @!attribute action_source + # The channel where an event originated + # + # @return [Symbol, WhopSDK::Models::ConversionCreateParams::ActionSource, nil] + optional :action_source, enum: -> { WhopSDK::ConversionCreateParams::ActionSource }, nil?: true + + # @!attribute context + # Tracking and attribution context. + # + # @return [WhopSDK::Models::ConversionCreateParams::Context, nil] + optional :context, -> { WhopSDK::ConversionCreateParams::Context }, nil?: true + + # @!attribute currency + # The available currencies on the platform + # + # @return [Symbol, WhopSDK::Models::Currency, nil] + optional :currency, enum: -> { WhopSDK::Currency }, nil?: true + + # @!attribute custom_name + # Custom event name when event_name is 'custom'. + # + # @return [String, nil] + optional :custom_name, String, nil?: true + + # @!attribute event_id + # Client-provided identifier for deduplication. Generated if omitted. + # + # @return [String, nil] + optional :event_id, String, nil?: true + + # @!attribute event_time + # When the event occurred. Defaults to now. + # + # @return [Time, nil] + optional :event_time, Time, nil?: true + + # @!attribute plan_id + # The plan associated with the event. + # + # @return [String, nil] + optional :plan_id, String, nil?: true + + # @!attribute product_id + # The product associated with the event. + # + # @return [String, nil] + optional :product_id, String, nil?: true + + # @!attribute referrer_url + # The referring URL. + # + # @return [String, nil] + optional :referrer_url, String, nil?: true + + # @!attribute url + # The URL where the event occurred. + # + # @return [String, nil] + optional :url, String, nil?: true + + # @!attribute user + # User identity and profile data. + # + # @return [WhopSDK::Models::ConversionCreateParams::User, nil] + optional :user, -> { WhopSDK::ConversionCreateParams::User }, nil?: true + + # @!attribute value + # Monetary value associated with the event. + # + # @return [Float, nil] + optional :value, Float, nil?: true + + # @!method initialize(company_id:, event_name:, action_source: nil, context: nil, currency: nil, custom_name: nil, event_id: nil, event_time: nil, plan_id: nil, product_id: nil, referrer_url: nil, url: nil, user: nil, value: nil, request_options: {}) + # @param company_id [String] The company to associate with this event. + # + # @param event_name [Symbol, WhopSDK::Models::ConversionCreateParams::EventName] The type of event. + # + # @param action_source [Symbol, WhopSDK::Models::ConversionCreateParams::ActionSource, nil] The channel where an event originated + # + # @param context [WhopSDK::Models::ConversionCreateParams::Context, nil] Tracking and attribution context. + # + # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # + # @param custom_name [String, nil] Custom event name when event_name is 'custom'. + # + # @param event_id [String, nil] Client-provided identifier for deduplication. Generated if omitted. + # + # @param event_time [Time, nil] When the event occurred. Defaults to now. + # + # @param plan_id [String, nil] The plan associated with the event. + # + # @param product_id [String, nil] The product associated with the event. + # + # @param referrer_url [String, nil] The referring URL. + # + # @param url [String, nil] The URL where the event occurred. + # + # @param user [WhopSDK::Models::ConversionCreateParams::User, nil] User identity and profile data. + # + # @param value [Float, nil] Monetary value associated with the event. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The type of event. + module EventName + extend WhopSDK::Internal::Type::Enum + + LEAD = :lead + SUBMIT_APPLICATION = :submit_application + CONTACT = :contact + COMPLETE_REGISTRATION = :complete_registration + SCHEDULE = :schedule + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # The channel where an event originated + module ActionSource + extend WhopSDK::Internal::Type::Enum + + EMAIL = :email + WEBSITE = :website + APP = :app + PHONE_CALL = :phone_call + CHAT = :chat + PHYSICAL_STORE = :physical_store + SYSTEM_GENERATED = :system_generated + BUSINESS_MESSAGING = :business_messaging + OTHER = :other + + # @!method self.values + # @return [Array] + end + + class Context < WhopSDK::Internal::Type::BaseModel + # @!attribute ad_campaign_id + # Ad campaign ID. + # + # @return [String, nil] + optional :ad_campaign_id, String, nil?: true + + # @!attribute ad_id + # Ad ID. + # + # @return [String, nil] + optional :ad_id, String, nil?: true + + # @!attribute ad_set_id + # Ad set ID. + # + # @return [String, nil] + optional :ad_set_id, String, nil?: true + + # @!attribute fbclid + # Facebook click ID. + # + # @return [String, nil] + optional :fbclid, String, nil?: true + + # @!attribute fbp + # Facebook browser pixel ID. + # + # @return [String, nil] + optional :fbp, String, nil?: true + + # @!attribute ga + # Google Analytics client ID. + # + # @return [String, nil] + optional :ga, String, nil?: true + + # @!attribute gclid + # Google click ID. + # + # @return [String, nil] + optional :gclid, String, nil?: true + + # @!attribute ig_sid + # Instagram session ID. + # + # @return [String, nil] + optional :ig_sid, String, nil?: true + + # @!attribute ip_address + # IP address. + # + # @return [String, nil] + optional :ip_address, String, nil?: true + + # @!attribute ttclid + # TikTok click ID. + # + # @return [String, nil] + optional :ttclid, String, nil?: true + + # @!attribute ttp + # TikTok pixel ID. + # + # @return [String, nil] + optional :ttp, String, nil?: true + + # @!attribute user_agent + # Browser user agent string. + # + # @return [String, nil] + optional :user_agent, String, nil?: true + + # @!attribute utm_campaign + # UTM campaign parameter. + # + # @return [String, nil] + optional :utm_campaign, String, nil?: true + + # @!attribute utm_content + # UTM content parameter. + # + # @return [String, nil] + optional :utm_content, String, nil?: true + + # @!attribute utm_id + # UTM ID parameter. + # + # @return [String, nil] + optional :utm_id, String, nil?: true + + # @!attribute utm_medium + # UTM medium parameter. + # + # @return [String, nil] + optional :utm_medium, String, nil?: true + + # @!attribute utm_source + # UTM source parameter. + # + # @return [String, nil] + optional :utm_source, String, nil?: true + + # @!attribute utm_term + # UTM term parameter. + # + # @return [String, nil] + optional :utm_term, String, nil?: true + + # @!method initialize(ad_campaign_id: nil, ad_id: nil, ad_set_id: nil, fbclid: nil, fbp: nil, ga: nil, gclid: nil, ig_sid: nil, ip_address: nil, ttclid: nil, ttp: nil, user_agent: nil, utm_campaign: nil, utm_content: nil, utm_id: nil, utm_medium: nil, utm_source: nil, utm_term: nil) + # Tracking and attribution context. + # + # @param ad_campaign_id [String, nil] Ad campaign ID. + # + # @param ad_id [String, nil] Ad ID. + # + # @param ad_set_id [String, nil] Ad set ID. + # + # @param fbclid [String, nil] Facebook click ID. + # + # @param fbp [String, nil] Facebook browser pixel ID. + # + # @param ga [String, nil] Google Analytics client ID. + # + # @param gclid [String, nil] Google click ID. + # + # @param ig_sid [String, nil] Instagram session ID. + # + # @param ip_address [String, nil] IP address. + # + # @param ttclid [String, nil] TikTok click ID. + # + # @param ttp [String, nil] TikTok pixel ID. + # + # @param user_agent [String, nil] Browser user agent string. + # + # @param utm_campaign [String, nil] UTM campaign parameter. + # + # @param utm_content [String, nil] UTM content parameter. + # + # @param utm_id [String, nil] UTM ID parameter. + # + # @param utm_medium [String, nil] UTM medium parameter. + # + # @param utm_source [String, nil] UTM source parameter. + # + # @param utm_term [String, nil] UTM term parameter. + end + + class User < WhopSDK::Internal::Type::BaseModel + # @!attribute anonymous_id + # An anonymous identifier for the user. + # + # @return [String, nil] + optional :anonymous_id, String, nil?: true + + # @!attribute birthdate + # Date of birth (YYYY-MM-DD). + # + # @return [String, nil] + optional :birthdate, String, nil?: true + + # @!attribute city + # City. + # + # @return [String, nil] + optional :city, String, nil?: true + + # @!attribute country + # Country. + # + # @return [String, nil] + optional :country, String, nil?: true + + # @!attribute email + # Email address. + # + # @return [String, nil] + optional :email, String, nil?: true + + # @!attribute external_id + # An external identifier for the user. + # + # @return [String, nil] + optional :external_id, String, nil?: true + + # @!attribute first_name + # First name. + # + # @return [String, nil] + optional :first_name, String, nil?: true + + # @!attribute gender + # Gender + # + # @return [Symbol, WhopSDK::Models::ConversionCreateParams::User::Gender, nil] + optional :gender, enum: -> { WhopSDK::ConversionCreateParams::User::Gender }, nil?: true + + # @!attribute last_name + # Last name. + # + # @return [String, nil] + optional :last_name, String, nil?: true + + # @!attribute member_id + # The Whop member ID. + # + # @return [String, nil] + optional :member_id, String, nil?: true + + # @!attribute membership_id + # The Whop membership ID. + # + # @return [String, nil] + optional :membership_id, String, nil?: true + + # @!attribute name + # Full display name. + # + # @return [String, nil] + optional :name, String, nil?: true + + # @!attribute phone + # Phone number. + # + # @return [String, nil] + optional :phone, String, nil?: true + + # @!attribute postal_code + # Postal code. + # + # @return [String, nil] + optional :postal_code, String, nil?: true + + # @!attribute state + # State or region. + # + # @return [String, nil] + optional :state, String, nil?: true + + # @!attribute user_id + # The Whop user ID. + # + # @return [String, nil] + optional :user_id, String, nil?: true + + # @!attribute username + # Username. + # + # @return [String, nil] + optional :username, String, nil?: true + + # @!method initialize(anonymous_id: nil, birthdate: nil, city: nil, country: nil, email: nil, external_id: nil, first_name: nil, gender: nil, last_name: nil, member_id: nil, membership_id: nil, name: nil, phone: nil, postal_code: nil, state: nil, user_id: nil, username: nil) + # User identity and profile data. + # + # @param anonymous_id [String, nil] An anonymous identifier for the user. + # + # @param birthdate [String, nil] Date of birth (YYYY-MM-DD). + # + # @param city [String, nil] City. + # + # @param country [String, nil] Country. + # + # @param email [String, nil] Email address. + # + # @param external_id [String, nil] An external identifier for the user. + # + # @param first_name [String, nil] First name. + # + # @param gender [Symbol, WhopSDK::Models::ConversionCreateParams::User::Gender, nil] Gender + # + # @param last_name [String, nil] Last name. + # + # @param member_id [String, nil] The Whop member ID. + # + # @param membership_id [String, nil] The Whop membership ID. + # + # @param name [String, nil] Full display name. + # + # @param phone [String, nil] Phone number. + # + # @param postal_code [String, nil] Postal code. + # + # @param state [String, nil] State or region. + # + # @param user_id [String, nil] The Whop user ID. + # + # @param username [String, nil] Username. + + # Gender + # + # @see WhopSDK::Models::ConversionCreateParams::User#gender + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE = :male + FEMALE = :female + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/whop_sdk/models/conversion_create_response.rb b/lib/whop_sdk/models/conversion_create_response.rb new file mode 100644 index 00000000..833cb168 --- /dev/null +++ b/lib/whop_sdk/models/conversion_create_response.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Conversions#create + class ConversionCreateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the conversion + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # A tracked conversion event + # + # @param id [String] The unique identifier for the conversion + end + end +end diff --git a/lib/whop_sdk/models/currency.rb b/lib/whop_sdk/models/currency.rb index d9a1a38e..45605210 100644 --- a/lib/whop_sdk/models/currency.rb +++ b/lib/whop_sdk/models/currency.rb @@ -92,6 +92,7 @@ module Currency BTC = :btc CNY = :cny USDT = :usdt + KZT = :kzt # @!method self.values # @return [Array] diff --git a/lib/whop_sdk/models/file_create_params.rb b/lib/whop_sdk/models/file_create_params.rb index e525a992..14642026 100644 --- a/lib/whop_sdk/models/file_create_params.rb +++ b/lib/whop_sdk/models/file_create_params.rb @@ -14,13 +14,34 @@ class FileCreateParams < WhopSDK::Internal::Type::BaseModel # @return [String] required :filename, String - # @!method initialize(filename:, request_options: {}) + # @!attribute visibility + # Controls whether an uploaded file is publicly accessible or requires + # authentication to access. + # + # @return [Symbol, WhopSDK::Models::FileCreateParams::Visibility, nil] + optional :visibility, enum: -> { WhopSDK::FileCreateParams::Visibility }, nil?: true + + # @!method initialize(filename:, visibility: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::FileCreateParams} for more details. # # @param filename [String] The name of the file including its extension (e.g., "photo.png" or "document.pdf # + # @param visibility [Symbol, WhopSDK::Models::FileCreateParams::Visibility, nil] Controls whether an uploaded file is publicly accessible or requires authenticat + # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # Controls whether an uploaded file is publicly accessible or requires + # authentication to access. + module Visibility + extend WhopSDK::Internal::Type::Enum + + PUBLIC = :public + PRIVATE = :private + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/whop_sdk/models/file_create_response.rb b/lib/whop_sdk/models/file_create_response.rb index b3aa0078..21dfbc60 100644 --- a/lib/whop_sdk/models/file_create_response.rb +++ b/lib/whop_sdk/models/file_create_response.rb @@ -49,12 +49,20 @@ class FileCreateResponse < WhopSDK::Internal::Type::BaseModel required :upload_url, String, nil?: true # @!attribute url - # The CDN URL for accessing the file. Null if the file has not finished uploading. + # The URL for accessing the file. For public files, this is a permanent CDN URL. + # For private files, this is a signed URL that expires. Null if the file has not + # finished uploading. # # @return [String, nil] required :url, String, nil?: true - # @!method initialize(id:, content_type:, filename:, size:, upload_headers:, upload_status:, upload_url:, url:) + # @!attribute visibility + # Whether the file is publicly accessible or requires authentication. + # + # @return [Symbol, WhopSDK::Models::FileCreateResponse::Visibility] + required :visibility, enum: -> { WhopSDK::Models::FileCreateResponse::Visibility } + + # @!method initialize(id:, content_type:, filename:, size:, upload_headers:, upload_status:, upload_url:, url:, visibility:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::FileCreateResponse} for more details. # @@ -74,7 +82,22 @@ class FileCreateResponse < WhopSDK::Internal::Type::BaseModel # # @param upload_url [String, nil] The presigned URL to upload the file contents to. Only present in the response f # - # @param url [String, nil] The CDN URL for accessing the file. Null if the file has not finished uploading. + # @param url [String, nil] The URL for accessing the file. For public files, this is a permanent CDN URL. F + # + # @param visibility [Symbol, WhopSDK::Models::FileCreateResponse::Visibility] Whether the file is publicly accessible or requires authentication. + + # Whether the file is publicly accessible or requires authentication. + # + # @see WhopSDK::Models::FileCreateResponse#visibility + module Visibility + extend WhopSDK::Internal::Type::Enum + + PUBLIC = :public + PRIVATE = :private + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/whop_sdk/models/file_retrieve_response.rb b/lib/whop_sdk/models/file_retrieve_response.rb index 3e56aa71..8a0d7614 100644 --- a/lib/whop_sdk/models/file_retrieve_response.rb +++ b/lib/whop_sdk/models/file_retrieve_response.rb @@ -35,12 +35,20 @@ class FileRetrieveResponse < WhopSDK::Internal::Type::BaseModel required :upload_status, enum: -> { WhopSDK::UploadStatus } # @!attribute url - # The CDN URL for accessing the file. Null if the file has not finished uploading. + # The URL for accessing the file. For public files, this is a permanent CDN URL. + # For private files, this is a signed URL that expires. Null if the file has not + # finished uploading. # # @return [String, nil] required :url, String, nil?: true - # @!method initialize(id:, content_type:, filename:, size:, upload_status:, url:) + # @!attribute visibility + # Whether the file is publicly accessible or requires authentication. + # + # @return [Symbol, WhopSDK::Models::FileRetrieveResponse::Visibility] + required :visibility, enum: -> { WhopSDK::Models::FileRetrieveResponse::Visibility } + + # @!method initialize(id:, content_type:, filename:, size:, upload_status:, url:, visibility:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::FileRetrieveResponse} for more details. # @@ -56,7 +64,22 @@ class FileRetrieveResponse < WhopSDK::Internal::Type::BaseModel # # @param upload_status [Symbol, WhopSDK::Models::UploadStatus] The current upload status of the file (e.g., pending, ready). # - # @param url [String, nil] The CDN URL for accessing the file. Null if the file has not finished uploading. + # @param url [String, nil] The URL for accessing the file. For public files, this is a permanent CDN URL. F + # + # @param visibility [Symbol, WhopSDK::Models::FileRetrieveResponse::Visibility] Whether the file is publicly accessible or requires authentication. + + # Whether the file is publicly accessible or requires authentication. + # + # @see WhopSDK::Models::FileRetrieveResponse#visibility + module Visibility + extend WhopSDK::Internal::Type::Enum + + PUBLIC = :public + PRIVATE = :private + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/whop_sdk/models/forum_post_list_params.rb b/lib/whop_sdk/models/forum_post_list_params.rb index 62d7beb2..a64178cd 100644 --- a/lib/whop_sdk/models/forum_post_list_params.rb +++ b/lib/whop_sdk/models/forum_post_list_params.rb @@ -31,6 +31,12 @@ class ForumPostListParams < WhopSDK::Internal::Type::BaseModel # @return [Integer, nil] optional :first, Integer, nil?: true + # @!attribute include_bounty_anchors + # Whether to include top-level bounty discussion anchors as rich forum items. + # + # @return [Boolean, nil] + optional :include_bounty_anchors, WhopSDK::Internal::Type::Boolean, nil?: true + # @!attribute last # Returns the last _n_ elements from the list. # @@ -51,7 +57,7 @@ class ForumPostListParams < WhopSDK::Internal::Type::BaseModel # @return [Boolean, nil] optional :pinned, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(experience_id:, after: nil, before: nil, first: nil, last: nil, parent_id: nil, pinned: nil, request_options: {}) + # @!method initialize(experience_id:, after: nil, before: nil, first: nil, include_bounty_anchors: nil, last: nil, parent_id: nil, pinned: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::ForumPostListParams} for more details. # @@ -63,6 +69,8 @@ class ForumPostListParams < WhopSDK::Internal::Type::BaseModel # # @param first [Integer, nil] Returns the first _n_ elements from the list. # + # @param include_bounty_anchors [Boolean, nil] Whether to include top-level bounty discussion anchors as rich forum items. + # # @param last [Integer, nil] Returns the last _n_ elements from the list. # # @param parent_id [String, nil] The unique identifier of a parent post to list comments for. When set, returns r diff --git a/lib/whop_sdk/models/invoice_create_params.rb b/lib/whop_sdk/models/invoice_create_params.rb index eb525859..10f7ca8e 100644 --- a/lib/whop_sdk/models/invoice_create_params.rb +++ b/lib/whop_sdk/models/invoice_create_params.rb @@ -413,10 +413,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProduct::Plan::PaymentMethodConfiguration} # for more details. @@ -428,7 +428,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end end @@ -962,10 +962,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::InvoiceCreateParams::Body::CreateInvoiceInputWithProductID::Plan::PaymentMethodConfiguration} # for more details. @@ -977,7 +977,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end end diff --git a/lib/whop_sdk/models/invoice_update_params.rb b/lib/whop_sdk/models/invoice_update_params.rb index 033c6d05..65b02dba 100644 --- a/lib/whop_sdk/models/invoice_update_params.rb +++ b/lib/whop_sdk/models/invoice_update_params.rb @@ -458,10 +458,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::InvoiceUpdateParams::Plan::PaymentMethodConfiguration} for # more details. @@ -473,7 +473,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end end end diff --git a/lib/whop_sdk/models/membership.rb b/lib/whop_sdk/models/membership.rb index cf9e6cab..0ce3dfa0 100644 --- a/lib/whop_sdk/models/membership.rb +++ b/lib/whop_sdk/models/membership.rb @@ -37,6 +37,14 @@ class Membership < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :cancellation_reason, String, nil?: true + # @!attribute checkout_configuration_id + # The ID of the checkout session/configuration that produced this membership, if + # any. Use this to map memberships back to the checkout configuration that created + # them. + # + # @return [String, nil] + required :checkout_configuration_id, String, nil?: true + # @!attribute company # The company this membership belongs to. # @@ -157,7 +165,7 @@ class Membership < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::Membership::User, nil] required :user, -> { WhopSDK::Membership::User }, nil?: true - # @!method initialize(id:, cancel_at_period_end:, cancel_option:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, custom_field_responses:, joined_at:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:) + # @!method initialize(id:, cancel_at_period_end:, cancel_option:, canceled_at:, cancellation_reason:, checkout_configuration_id:, company:, created_at:, currency:, custom_field_responses:, joined_at:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::Membership} for more details. # @@ -174,6 +182,8 @@ class Membership < WhopSDK::Internal::Type::BaseModel # # @param cancellation_reason [String, nil] Free-text explanation provided by the customer when canceling. Null if the custo # + # @param checkout_configuration_id [String, nil] The ID of the checkout session/configuration that produced this membership, if a + # # @param company [WhopSDK::Models::Membership::Company] The company this membership belongs to. # # @param created_at [Time] The datetime the membership was created. diff --git a/lib/whop_sdk/models/membership_list_response.rb b/lib/whop_sdk/models/membership_list_response.rb index eacd1d59..b48dc236 100644 --- a/lib/whop_sdk/models/membership_list_response.rb +++ b/lib/whop_sdk/models/membership_list_response.rb @@ -38,6 +38,14 @@ class MembershipListResponse < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :cancellation_reason, String, nil?: true + # @!attribute checkout_configuration_id + # The ID of the checkout session/configuration that produced this membership, if + # any. Use this to map memberships back to the checkout configuration that created + # them. + # + # @return [String, nil] + required :checkout_configuration_id, String, nil?: true + # @!attribute company # The company this membership belongs to. # @@ -150,7 +158,7 @@ class MembershipListResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::MembershipListResponse::User, nil] required :user, -> { WhopSDK::Models::MembershipListResponse::User }, nil?: true - # @!method initialize(id:, cancel_at_period_end:, cancel_option:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, joined_at:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:) + # @!method initialize(id:, cancel_at_period_end:, cancel_option:, canceled_at:, cancellation_reason:, checkout_configuration_id:, company:, created_at:, currency:, joined_at:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::MembershipListResponse} for more details. # @@ -167,6 +175,8 @@ class MembershipListResponse < WhopSDK::Internal::Type::BaseModel # # @param cancellation_reason [String, nil] Free-text explanation provided by the customer when canceling. Null if the custo # + # @param checkout_configuration_id [String, nil] The ID of the checkout session/configuration that produced this membership, if a + # # @param company [WhopSDK::Models::MembershipListResponse::Company] The company this membership belongs to. # # @param created_at [Time] The datetime the membership was created. diff --git a/lib/whop_sdk/models/payment.rb b/lib/whop_sdk/models/payment.rb index c374b40f..af227daa 100644 --- a/lib/whop_sdk/models/payment.rb +++ b/lib/whop_sdk/models/payment.rb @@ -52,6 +52,13 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :card_last4, String, nil?: true + # @!attribute checkout_configuration_id + # The ID of the checkout session/configuration that produced this payment, if any. + # Use this to map payments back to the checkout configuration that created them. + # + # @return [String, nil] + required :checkout_configuration_id, String, nil?: true + # @!attribute company # The company for the payment. # @@ -214,6 +221,28 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [Boolean] required :retryable, WhopSDK::Internal::Type::Boolean + # @!attribute settlement_amount + # The payment amount in the creator's settlement currency (what the creator priced + # in). Equal to final_amount for single-currency payments. + # + # @return [Float] + required :settlement_amount, Float + + # @!attribute settlement_currency + # The currency in which the creator receives payouts and fees are charged (e.g., + # 'usd', 'eur'). For multi-currency payments this differs from the payment + # currency. + # + # @return [String] + required :settlement_currency, String + + # @!attribute settlement_exchange_rate + # The locked exchange rate used to convert from the buyer's payment currency to + # the creator's settlement currency. Null for single-currency payments. + # + # @return [Float, nil] + required :settlement_exchange_rate, Float, nil?: true + # @!attribute status # The status of a receipt # @@ -282,7 +311,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [Boolean] required :voidable, WhopSDK::Internal::Type::Boolean - # @!method initialize(id:, amount_after_fees:, application_fee:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, disputes:, failure_message:, financing_installments_count:, financing_transactions:, last_payment_attempt:, member:, membership:, metadata:, next_payment_attempt:, paid_at:, payment_method:, payment_method_type:, payments_failed:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, resolutions:, retryable:, status:, substatus:, subtotal:, tax_amount:, tax_behavior:, tax_refunded_amount:, total:, updated_at:, usd_total:, user:, voidable:) + # @!method initialize(id:, amount_after_fees:, application_fee:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, checkout_configuration_id:, company:, created_at:, currency:, dispute_alerted_at:, disputes:, failure_message:, financing_installments_count:, financing_transactions:, last_payment_attempt:, member:, membership:, metadata:, next_payment_attempt:, paid_at:, payment_method:, payment_method_type:, payments_failed:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, resolutions:, retryable:, settlement_amount:, settlement_currency:, settlement_exchange_rate:, status:, substatus:, subtotal:, tax_amount:, tax_behavior:, tax_refunded_amount:, total:, updated_at:, usd_total:, user:, voidable:) # Some parameter documentations has been truncated, see {WhopSDK::Models::Payment} # for more details. # @@ -305,6 +334,8 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param card_last4 [String, nil] The last four digits of the card used to make this payment. Null if the payment # + # @param checkout_configuration_id [String, nil] The ID of the checkout session/configuration that produced this payment, if any. + # # @param company [WhopSDK::Models::Payment::Company, nil] The company for the payment. # # @param created_at [Time] The datetime the payment was created. @@ -355,6 +386,12 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param retryable [Boolean] True when the payment status is `open` and its membership is in one of the retry # + # @param settlement_amount [Float] The payment amount in the creator's settlement currency (what the creator priced + # + # @param settlement_currency [String] The currency in which the creator receives payouts and fees are charged (e.g., ' + # + # @param settlement_exchange_rate [Float, nil] The locked exchange rate used to convert from the buyer's payment currency to th + # # @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt # # @param substatus [Symbol, WhopSDK::Models::FriendlyReceiptStatus] The friendly status of the payment. diff --git a/lib/whop_sdk/models/payment_list_response.rb b/lib/whop_sdk/models/payment_list_response.rb index 09f2f992..c616b575 100644 --- a/lib/whop_sdk/models/payment_list_response.rb +++ b/lib/whop_sdk/models/payment_list_response.rb @@ -53,6 +53,13 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :card_last4, String, nil?: true + # @!attribute checkout_configuration_id + # The ID of the checkout session/configuration that produced this payment, if any. + # Use this to map payments back to the checkout configuration that created them. + # + # @return [String, nil] + required :checkout_configuration_id, String, nil?: true + # @!attribute company # The company for the payment. # @@ -185,6 +192,14 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # @return [Boolean] required :retryable, WhopSDK::Internal::Type::Boolean + # @!attribute settlement_currency + # The currency in which the creator receives payouts and fees are charged (e.g., + # 'usd', 'eur'). For multi-currency payments this differs from the payment + # currency. + # + # @return [String] + required :settlement_currency, String + # @!attribute status # The status of a receipt # @@ -247,7 +262,7 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # @return [Boolean] required :voidable, WhopSDK::Internal::Type::Boolean - # @!method initialize(id:, amount_after_fees:, application_fee:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, next_payment_attempt:, paid_at:, payment_method:, payment_method_type:, payments_failed:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, tax_amount:, tax_behavior:, total:, updated_at:, usd_total:, user:, voidable:) + # @!method initialize(id:, amount_after_fees:, application_fee:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, checkout_configuration_id:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, next_payment_attempt:, paid_at:, payment_method:, payment_method_type:, payments_failed:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, settlement_currency:, status:, substatus:, subtotal:, tax_amount:, tax_behavior:, total:, updated_at:, usd_total:, user:, voidable:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PaymentListResponse} for more details. # @@ -270,6 +285,8 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # # @param card_last4 [String, nil] The last four digits of the card used to make this payment. Null if the payment # + # @param checkout_configuration_id [String, nil] The ID of the checkout session/configuration that produced this payment, if any. + # # @param company [WhopSDK::Models::PaymentListResponse::Company, nil] The company for the payment. # # @param created_at [Time] The datetime the payment was created. @@ -312,6 +329,8 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # # @param retryable [Boolean] True when the payment status is `open` and its membership is in one of the retry # + # @param settlement_currency [String] The currency in which the creator receives payouts and fees are charged (e.g., ' + # # @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt # # @param substatus [Symbol, WhopSDK::Models::FriendlyReceiptStatus] The friendly status of the payment. diff --git a/lib/whop_sdk/models/payment_method_types.rb b/lib/whop_sdk/models/payment_method_types.rb index e939316f..607588a3 100644 --- a/lib/whop_sdk/models/payment_method_types.rb +++ b/lib/whop_sdk/models/payment_method_types.rb @@ -46,6 +46,7 @@ module PaymentMethodTypes INTERAC = :interac KAKAO_PAY = :kakao_pay KLARNA = :klarna + KLARNA_PAY_NOW = :klarna_pay_now KONBINI = :konbini KR_CARD = :kr_card KR_MARKET = :kr_market diff --git a/lib/whop_sdk/models/payment_refund_params.rb b/lib/whop_sdk/models/payment_refund_params.rb index 837ec91b..b12bb06b 100644 --- a/lib/whop_sdk/models/payment_refund_params.rb +++ b/lib/whop_sdk/models/payment_refund_params.rb @@ -13,8 +13,9 @@ class PaymentRefundParams < WhopSDK::Internal::Type::BaseModel required :id, String # @!attribute partial_amount - # The amount to refund in the payment currency. If omitted, the full payment - # amount is refunded. + # The amount to refund. For multi-currency payments, this is in the charge + # currency (what the buyer paid). For single-currency, this is in the payment + # currency. If omitted, the full payment amount is refunded. # # @return [Float, nil] optional :partial_amount, Float, nil?: true @@ -25,7 +26,7 @@ class PaymentRefundParams < WhopSDK::Internal::Type::BaseModel # # @param id [String] # - # @param partial_amount [Float, nil] The amount to refund in the payment currency. If omitted, the full payment amoun + # @param partial_amount [Float, nil] The amount to refund. For multi-currency payments, this is in the charge currenc # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/whop_sdk/models/plan.rb b/lib/whop_sdk/models/plan.rb index c314d4ef..ae937a9a 100644 --- a/lib/whop_sdk/models/plan.rb +++ b/lib/whop_sdk/models/plan.rb @@ -9,6 +9,13 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute adaptive_pricing_enabled + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + # + # @return [Boolean] + required :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean + # @!attribute billing_period # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. @@ -191,7 +198,7 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility] required :visibility, enum: -> { WhopSDK::Visibility } - # @!method initialize(id:, billing_period:, collect_tax:, company:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, tax_type:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:) + # @!method initialize(id:, adaptive_pricing_enabled:, billing_period:, collect_tax:, company:, created_at:, currency:, custom_fields:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, tax_type:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:) # Some parameter documentations has been truncated, see {WhopSDK::Models::Plan} # for more details. # @@ -201,6 +208,8 @@ class Plan < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for the plan. # + # @param adaptive_pricing_enabled [Boolean] Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # # @param billing_period [Integer, nil] The number of days between each recurring charge. Null for one-time plans. For e # # @param collect_tax [Boolean] Whether tax is collected on purchases of this plan, based on the company's tax c diff --git a/lib/whop_sdk/models/plan_create_params.rb b/lib/whop_sdk/models/plan_create_params.rb index 6d64da63..9997269f 100644 --- a/lib/whop_sdk/models/plan_create_params.rb +++ b/lib/whop_sdk/models/plan_create_params.rb @@ -19,6 +19,12 @@ class PlanCreateParams < WhopSDK::Internal::Type::BaseModel # @return [String] required :product_id, String + # @!attribute adaptive_pricing_enabled + # Whether this plan accepts local currency payments via adaptive pricing. + # + # @return [Boolean, nil] + optional :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + # @!attribute billing_period # The number of days between recurring charges. For example, 30 for monthly or 365 # for yearly. @@ -159,7 +165,7 @@ class PlanCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true - # @!method initialize(company_id:, product_id:, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) + # @!method initialize(company_id:, product_id:, adaptive_pricing_enabled: nil, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PlanCreateParams} for more details. # @@ -167,6 +173,8 @@ class PlanCreateParams < WhopSDK::Internal::Type::BaseModel # # @param product_id [String] The unique identifier of the product to attach this plan to. # + # @param adaptive_pricing_enabled [Boolean, nil] Whether this plan accepts local currency payments via adaptive pricing. + # # @param billing_period [Integer, nil] The number of days between recurring charges. For example, 30 for monthly or 365 # # @param checkout_styling [WhopSDK::Models::PlanCreateParams::CheckoutStyling, nil] Checkout styling overrides for this plan. Pass null to inherit from the company @@ -212,6 +220,13 @@ class PlanCreateParams < WhopSDK::Internal::Type::BaseModel # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + # @!attribute background_color + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + # + # @return [String, nil] + optional :background_color, String, nil?: true + # @!attribute border_style # The different border-radius styles available for checkout pages. # @@ -230,10 +245,15 @@ class CheckoutStyling < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::CheckoutFont, nil] optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true - # @!method initialize(border_style: nil, button_color: nil, font_family: nil) + # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::PlanCreateParams::CheckoutStyling} for more details. + # # Checkout styling overrides for this plan. Pass null to inherit from the company # default. # + # @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary + # # @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages. # # @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733). @@ -327,10 +347,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration} for more # details. @@ -342,7 +362,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end end end diff --git a/lib/whop_sdk/models/plan_list_response.rb b/lib/whop_sdk/models/plan_list_response.rb index 117b159c..97034e64 100644 --- a/lib/whop_sdk/models/plan_list_response.rb +++ b/lib/whop_sdk/models/plan_list_response.rb @@ -10,6 +10,13 @@ class PlanListResponse < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute adaptive_pricing_enabled + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + # + # @return [Boolean] + required :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean + # @!attribute billing_period # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. @@ -173,7 +180,7 @@ class PlanListResponse < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility] required :visibility, enum: -> { WhopSDK::Visibility } - # @!method initialize(id:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:) + # @!method initialize(id:, adaptive_pricing_enabled:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, payment_method_configuration:, plan_type:, product:, purchase_url:, release_method:, renewal_price:, split_pay_required_payments:, stock:, title:, trial_period_days:, unlimited_stock:, updated_at:, visibility:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PlanListResponse} for more details. # @@ -183,6 +190,8 @@ class PlanListResponse < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for the plan. # + # @param adaptive_pricing_enabled [Boolean] Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # # @param billing_period [Integer, nil] The number of days between each recurring charge. Null for one-time plans. For e # # @param company [WhopSDK::Models::PlanListResponse::Company, nil] The company that sells this plan. Null for standalone invoice plans not linked t diff --git a/lib/whop_sdk/models/plan_update_params.rb b/lib/whop_sdk/models/plan_update_params.rb index 759315aa..7efe493d 100644 --- a/lib/whop_sdk/models/plan_update_params.rb +++ b/lib/whop_sdk/models/plan_update_params.rb @@ -12,6 +12,12 @@ class PlanUpdateParams < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute adaptive_pricing_enabled + # Whether this plan accepts local currency payments via adaptive pricing. + # + # @return [Boolean, nil] + optional :adaptive_pricing_enabled, WhopSDK::Internal::Type::Boolean, nil?: true + # @!attribute billing_period # The number of days between recurring charges. For example, 30 for monthly or 365 # for yearly. @@ -152,12 +158,14 @@ class PlanUpdateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true - # @!method initialize(id:, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, offer_cancel_discount: nil, override_tax_type: nil, payment_method_configuration: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) + # @!method initialize(id:, adaptive_pricing_enabled: nil, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, offer_cancel_discount: nil, override_tax_type: nil, payment_method_configuration: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PlanUpdateParams} for more details. # # @param id [String] # + # @param adaptive_pricing_enabled [Boolean, nil] Whether this plan accepts local currency payments via adaptive pricing. + # # @param billing_period [Integer, nil] The number of days between recurring charges. For example, 30 for monthly or 365 # # @param checkout_styling [WhopSDK::Models::PlanUpdateParams::CheckoutStyling, nil] Checkout styling overrides for this plan. Pass null to remove all overrides and @@ -203,6 +211,13 @@ class PlanUpdateParams < WhopSDK::Internal::Type::BaseModel # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + # @!attribute background_color + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + # + # @return [String, nil] + optional :background_color, String, nil?: true + # @!attribute border_style # The different border-radius styles available for checkout pages. # @@ -221,10 +236,15 @@ class CheckoutStyling < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::CheckoutFont, nil] optional :font_family, enum: -> { WhopSDK::CheckoutFont }, nil?: true - # @!method initialize(border_style: nil, button_color: nil, font_family: nil) + # @!method initialize(background_color: nil, border_style: nil, button_color: nil, font_family: nil) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::PlanUpdateParams::CheckoutStyling} for more details. + # # Checkout styling overrides for this plan. Pass null to remove all overrides and # inherit from the company default. # + # @param background_color [String, nil] A hex color code for the checkout page background, applied to the order summary + # # @param border_style [Symbol, WhopSDK::Models::CheckoutShape, nil] The different border-radius styles available for checkout pages. # # @param button_color [String, nil] A hex color code for the button color (e.g. #FF5733). @@ -318,10 +338,10 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. # - # @return [Boolean] - required :include_platform_defaults, WhopSDK::Internal::Type::Boolean + # @return [Boolean, nil] + optional :include_platform_defaults, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(disabled:, enabled:, include_platform_defaults:) + # @!method initialize(disabled:, enabled:, include_platform_defaults: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PlanUpdateParams::PaymentMethodConfiguration} for more # details. @@ -333,7 +353,7 @@ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel # # @param enabled [Array] An array of payment method identifiers that are explicitly enabled. This means t # - # @param include_platform_defaults [Boolean] Whether Whop's platform default payment method enablement settings are included + # @param include_platform_defaults [Boolean, nil] Whether Whop's platform default payment method enablement settings are included end end end diff --git a/lib/whop_sdk/models/stat_describe_params.rb b/lib/whop_sdk/models/stat_describe_params.rb new file mode 100644 index 00000000..0bc1db4f --- /dev/null +++ b/lib/whop_sdk/models/stat_describe_params.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Stats#describe + class StatDescribeParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute company_id + # Scope query to a specific company. + # + # @return [String, nil] + optional :company_id, String, nil?: true + + # @!attribute resource + # Resource path using : as separator (e.g., 'receipts', 'payments:membership', + # 'receipts:gross_revenue'). + # + # @return [String, nil] + optional :resource, String, nil?: true + + # @!attribute user_id + # Scope query to a specific user. + # + # @return [String, nil] + optional :user_id, String, nil?: true + + # @!method initialize(company_id: nil, resource: nil, user_id: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::StatDescribeParams} for more details. + # + # @param company_id [String, nil] Scope query to a specific company. + # + # @param resource [String, nil] Resource path using : as separator (e.g., 'receipts', 'payments:membership', 're + # + # @param user_id [String, nil] Scope query to a specific user. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/stat_describe_response.rb b/lib/whop_sdk/models/stat_describe_response.rb new file mode 100644 index 00000000..e75f3a3e --- /dev/null +++ b/lib/whop_sdk/models/stat_describe_response.rb @@ -0,0 +1,571 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # Root schema description showing available nodes, views, and metrics. + # + # @see WhopSDK::Resources::Stats#describe + module StatDescribeResponse + extend WhopSDK::Internal::Type::Union + + discriminator :typename + + # Root schema description showing available nodes, views, and metrics. + variant :DescribeRoot, -> { WhopSDK::Models::StatDescribeResponse::DescribeRoot } + + # Description of a node (model) including its columns and associations. + variant :DescribeNode, -> { WhopSDK::Models::StatDescribeResponse::DescribeNode } + + # Description of a metric including its configuration and SQL. + variant :DescribeMetric, -> { WhopSDK::Models::StatDescribeResponse::DescribeMetric } + + # Description of an API resource view including its columns and associations. + variant :DescribeView, -> { WhopSDK::Models::StatDescribeResponse::DescribeView } + + class DescribeRoot < WhopSDK::Internal::Type::BaseModel + # @!attribute debug + # Debug information. + # + # @return [WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug, nil] + required :debug, -> { WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug }, nil?: true + + # @!attribute metrics + # Available metrics. + # + # @return [Array] + required :metrics, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric] } + + # @!attribute nodes + # Available root nodes. + # + # @return [Array] + required :nodes, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :DescribeRoot] + required :typename, const: :DescribeRoot + + # @!attribute views + # Available API resource views. + # + # @return [Array] + required :views, WhopSDK::Internal::Type::ArrayOf[String] + + # @!method initialize(debug:, metrics:, nodes:, views:, typename: :DescribeRoot) + # Root schema description showing available nodes, views, and metrics. + # + # @param debug [WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug, nil] Debug information. + # + # @param metrics [Array] Available metrics. + # + # @param nodes [Array] Available root nodes. + # + # @param views [Array] Available API resource views. + # + # @param typename [Symbol, :DescribeRoot] The typename of this object + + # @see WhopSDK::Models::StatDescribeResponse::DescribeRoot#debug + class Debug < WhopSDK::Internal::Type::BaseModel + # @!attribute request_id + # Unique request identifier for debugging. + # + # @return [String, nil] + required :request_id, String, nil?: true + + # @!method initialize(request_id:) + # Debug information. + # + # @param request_id [String, nil] Unique request identifier for debugging. + end + + class Metric < WhopSDK::Internal::Type::BaseModel + # @!attribute name + # The metric name. + # + # @return [String] + required :name, String + + # @!attribute node_path + # The node path this metric operates on. + # + # @return [String] + required :node_path, String + + # @!attribute supported_engines + # Query engines that support this metric. + # + # @return [Array] + required :supported_engines, WhopSDK::Internal::Type::ArrayOf[String] + + # @!method initialize(name:, node_path:, supported_engines:) + # A metric available for querying. + # + # @param name [String] The metric name. + # + # @param node_path [String] The node path this metric operates on. + # + # @param supported_engines [Array] Query engines that support this metric. + end + end + + class DescribeNode < WhopSDK::Internal::Type::BaseModel + # @!attribute associations + # Available associations or child paths. + # + # @return [Array] + required :associations, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeNode::Association] } + + # @!attribute columns + # Available columns. + # + # @return [Array] + required :columns, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute debug + # Debug information. + # + # @return [WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug, nil] + required :debug, -> { WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug }, nil?: true + + # @!attribute engine + # The query engine being used. + # + # @return [String] + required :engine, String + + # @!attribute metrics + # Available metrics for this node. + # + # @return [Array] + required :metrics, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric] } + + # @!attribute node + # The node path being described. + # + # @return [String] + required :node, String + + # @!attribute sample + # Sample data rows. + # + # @return [ArrayObject}>, nil] + required :sample, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute sortable_columns + # Columns that can be used for sorting. + # + # @return [Array] + required :sortable_columns, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :DescribeNode] + required :typename, const: :DescribeNode + + # @!method initialize(associations:, columns:, debug:, engine:, metrics:, node:, sample:, sortable_columns:, typename: :DescribeNode) + # Description of a node (model) including its columns and associations. + # + # @param associations [Array] Available associations or child paths. + # + # @param columns [Array] Available columns. + # + # @param debug [WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug, nil] Debug information. + # + # @param engine [String] The query engine being used. + # + # @param metrics [Array] Available metrics for this node. + # + # @param node [String] The node path being described. + # + # @param sample [ArrayObject}>, nil] Sample data rows. + # + # @param sortable_columns [Array] Columns that can be used for sorting. + # + # @param typename [Symbol, :DescribeNode] The typename of this object + + class Association < WhopSDK::Internal::Type::BaseModel + # @!attribute event_name + # The event name (for event type). + # + # @return [String, nil] + required :event_name, String, nil?: true + + # @!attribute model + # The associated model class name (for model associations). + # + # @return [String, nil] + required :model, String, nil?: true + + # @!attribute name + # The association name. + # + # @return [String] + required :name, String + + # @!attribute path + # The full path (for event associations). + # + # @return [String, nil] + required :path, String, nil?: true + + # @!attribute type + # The type (belongs_to, has_many, has_one, event, namespace). + # + # @return [String] + required :type, String + + # @!method initialize(event_name:, model:, name:, path:, type:) + # An association or child path available for navigation. + # + # @param event_name [String, nil] The event name (for event type). + # + # @param model [String, nil] The associated model class name (for model associations). + # + # @param name [String] The association name. + # + # @param path [String, nil] The full path (for event associations). + # + # @param type [String] The type (belongs_to, has_many, has_one, event, namespace). + end + + # @see WhopSDK::Models::StatDescribeResponse::DescribeNode#debug + class Debug < WhopSDK::Internal::Type::BaseModel + # @!attribute request_id + # Unique request identifier for debugging. + # + # @return [String, nil] + required :request_id, String, nil?: true + + # @!method initialize(request_id:) + # Debug information. + # + # @param request_id [String, nil] Unique request identifier for debugging. + end + + class Metric < WhopSDK::Internal::Type::BaseModel + # @!attribute name + # The metric name. + # + # @return [String] + required :name, String + + # @!attribute node_path + # The node path this metric operates on. + # + # @return [String] + required :node_path, String + + # @!attribute supported_engines + # Query engines that support this metric. + # + # @return [Array] + required :supported_engines, WhopSDK::Internal::Type::ArrayOf[String] + + # @!method initialize(name:, node_path:, supported_engines:) + # A metric available for querying. + # + # @param name [String] The metric name. + # + # @param node_path [String] The node path this metric operates on. + # + # @param supported_engines [Array] Query engines that support this metric. + end + end + + class DescribeMetric < WhopSDK::Internal::Type::BaseModel + # @!attribute breakdownable_columns + # Columns that can be used for breakdowns. + # + # @return [Array] + required :breakdownable_columns, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute debug + # Debug information. + # + # @return [WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug, nil] + required :debug, -> { WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug }, nil?: true + + # @!attribute engine + # The query engine being used. + # + # @return [String] + required :engine, String + + # @!attribute filterable_columns + # Columns that can be used for filtering. + # + # @return [Array] + required :filterable_columns, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute metric + # The metric name. + # + # @return [String] + required :metric, String + + # @!attribute node + # The node path this metric operates on. + # + # @return [String] + required :node, String + + # @!attribute sql + # The generated SQL query. + # + # @return [String, nil] + required :sql, String, nil?: true + + # @!attribute supported_engines + # Query engines that support this metric. + # + # @return [Array] + required :supported_engines, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute timestamp_column + # The timestamp column used for time filtering. + # + # @return [String] + required :timestamp_column, String + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :DescribeMetric] + required :typename, const: :DescribeMetric + + # @!method initialize(breakdownable_columns:, debug:, engine:, filterable_columns:, metric:, node:, sql:, supported_engines:, timestamp_column:, typename: :DescribeMetric) + # Description of a metric including its configuration and SQL. + # + # @param breakdownable_columns [Array] Columns that can be used for breakdowns. + # + # @param debug [WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug, nil] Debug information. + # + # @param engine [String] The query engine being used. + # + # @param filterable_columns [Array] Columns that can be used for filtering. + # + # @param metric [String] The metric name. + # + # @param node [String] The node path this metric operates on. + # + # @param sql [String, nil] The generated SQL query. + # + # @param supported_engines [Array] Query engines that support this metric. + # + # @param timestamp_column [String] The timestamp column used for time filtering. + # + # @param typename [Symbol, :DescribeMetric] The typename of this object + + # @see WhopSDK::Models::StatDescribeResponse::DescribeMetric#debug + class Debug < WhopSDK::Internal::Type::BaseModel + # @!attribute request_id + # Unique request identifier for debugging. + # + # @return [String, nil] + required :request_id, String, nil?: true + + # @!method initialize(request_id:) + # Debug information. + # + # @param request_id [String, nil] Unique request identifier for debugging. + end + end + + class DescribeView < WhopSDK::Internal::Type::BaseModel + # @!attribute associations + # Available associations. + # + # @return [Array] + required :associations, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeView::Association] } + + # @!attribute columns + # Available columns. + # + # @return [Array] + required :columns, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute debug + # Debug information. + # + # @return [WhopSDK::Models::StatDescribeResponse::DescribeView::Debug, nil] + required :debug, -> { WhopSDK::Models::StatDescribeResponse::DescribeView::Debug }, nil?: true + + # @!attribute engine + # The query engine being used. + # + # @return [String] + required :engine, String + + # @!attribute metrics + # Available metrics. + # + # @return [Array] + required :metrics, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeView::Metric] } + + # @!attribute model + # The underlying model class. + # + # @return [String] + required :model, String + + # @!attribute resource + # The API resource name. + # + # @return [String] + required :resource, String + + # @!attribute sample + # Sample data rows. + # + # @return [ArrayObject}>, nil] + required :sample, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute sortable_columns + # Columns that can be used for sorting. + # + # @return [Array] + required :sortable_columns, WhopSDK::Internal::Type::ArrayOf[String] + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :DescribeView] + required :typename, const: :DescribeView + + # @!attribute view + # The view name being described. + # + # @return [String] + required :view, String + + # @!method initialize(associations:, columns:, debug:, engine:, metrics:, model:, resource:, sample:, sortable_columns:, view:, typename: :DescribeView) + # Description of an API resource view including its columns and associations. + # + # @param associations [Array] Available associations. + # + # @param columns [Array] Available columns. + # + # @param debug [WhopSDK::Models::StatDescribeResponse::DescribeView::Debug, nil] Debug information. + # + # @param engine [String] The query engine being used. + # + # @param metrics [Array] Available metrics. + # + # @param model [String] The underlying model class. + # + # @param resource [String] The API resource name. + # + # @param sample [ArrayObject}>, nil] Sample data rows. + # + # @param sortable_columns [Array] Columns that can be used for sorting. + # + # @param view [String] The view name being described. + # + # @param typename [Symbol, :DescribeView] The typename of this object + + class Association < WhopSDK::Internal::Type::BaseModel + # @!attribute event_name + # The event name (for event type). + # + # @return [String, nil] + required :event_name, String, nil?: true + + # @!attribute model + # The associated model class name (for model associations). + # + # @return [String, nil] + required :model, String, nil?: true + + # @!attribute name + # The association name. + # + # @return [String] + required :name, String + + # @!attribute path + # The full path (for event associations). + # + # @return [String, nil] + required :path, String, nil?: true + + # @!attribute type + # The type (belongs_to, has_many, has_one, event, namespace). + # + # @return [String] + required :type, String + + # @!method initialize(event_name:, model:, name:, path:, type:) + # An association or child path available for navigation. + # + # @param event_name [String, nil] The event name (for event type). + # + # @param model [String, nil] The associated model class name (for model associations). + # + # @param name [String] The association name. + # + # @param path [String, nil] The full path (for event associations). + # + # @param type [String] The type (belongs_to, has_many, has_one, event, namespace). + end + + # @see WhopSDK::Models::StatDescribeResponse::DescribeView#debug + class Debug < WhopSDK::Internal::Type::BaseModel + # @!attribute request_id + # Unique request identifier for debugging. + # + # @return [String, nil] + required :request_id, String, nil?: true + + # @!method initialize(request_id:) + # Debug information. + # + # @param request_id [String, nil] Unique request identifier for debugging. + end + + class Metric < WhopSDK::Internal::Type::BaseModel + # @!attribute name + # The metric name. + # + # @return [String] + required :name, String + + # @!attribute node_path + # The node path this metric operates on. + # + # @return [String] + required :node_path, String + + # @!attribute supported_engines + # Query engines that support this metric. + # + # @return [Array] + required :supported_engines, WhopSDK::Internal::Type::ArrayOf[String] + + # @!method initialize(name:, node_path:, supported_engines:) + # A metric available for querying. + # + # @param name [String] The metric name. + # + # @param node_path [String] The node path this metric operates on. + # + # @param supported_engines [Array] Query engines that support this metric. + end + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::StatDescribeResponse::DescribeRoot, WhopSDK::Models::StatDescribeResponse::DescribeNode, WhopSDK::Models::StatDescribeResponse::DescribeMetric, WhopSDK::Models::StatDescribeResponse::DescribeView)] + end + end +end diff --git a/lib/whop_sdk/models/stat_query_metric_params.rb b/lib/whop_sdk/models/stat_query_metric_params.rb new file mode 100644 index 00000000..b59ce324 --- /dev/null +++ b/lib/whop_sdk/models/stat_query_metric_params.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Stats#query_metric + class StatQueryMetricParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute resource + # Metric resource using : as separator (e.g., 'receipts:gross_revenue', + # 'members:new_users'). + # + # @return [String] + required :resource, String + + # @!attribute breakdowns + # Columns to break down the metric by. + # + # @return [Array, nil] + optional :breakdowns, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute company_id + # Scope query to a specific company. + # + # @return [String, nil] + optional :company_id, String, nil?: true + + # @!attribute filters + # Key-value pairs to filter the data. + # + # @return [Hash{Symbol=>Object}, nil] + optional :filters, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!attribute from + # Start of time range (unix timestamp). + # + # @return [Time, nil] + optional :from, Time, nil?: true + + # @!attribute granularity + # Time granularity (daily, weekly, monthly). + # + # @return [String, nil] + optional :granularity, String, nil?: true + + # @!attribute time_zone + # IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. + # Only applies to ClickHouse metrics. + # + # @return [String, nil] + optional :time_zone, String, nil?: true + + # @!attribute to + # End of time range (unix timestamp). + # + # @return [Time, nil] + optional :to, Time, nil?: true + + # @!attribute user_id + # Scope query to a specific user. + # + # @return [String, nil] + optional :user_id, String, nil?: true + + # @!method initialize(resource:, breakdowns: nil, company_id: nil, filters: nil, from: nil, granularity: nil, time_zone: nil, to: nil, user_id: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::StatQueryMetricParams} for more details. + # + # @param resource [String] Metric resource using : as separator (e.g., 'receipts:gross_revenue', 'members:n + # + # @param breakdowns [Array, nil] Columns to break down the metric by. + # + # @param company_id [String, nil] Scope query to a specific company. + # + # @param filters [Hash{Symbol=>Object}, nil] Key-value pairs to filter the data. + # + # @param from [Time, nil] Start of time range (unix timestamp). + # + # @param granularity [String, nil] Time granularity (daily, weekly, monthly). + # + # @param time_zone [String, nil] IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. O + # + # @param to [Time, nil] End of time range (unix timestamp). + # + # @param user_id [String, nil] Scope query to a specific user. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/stat_query_metric_response.rb b/lib/whop_sdk/models/stat_query_metric_response.rb new file mode 100644 index 00000000..623358ef --- /dev/null +++ b/lib/whop_sdk/models/stat_query_metric_response.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Stats#query_metric + class StatQueryMetricResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute columns + # Column names in the order they appear in each data row. + # + # @return [Array, nil] + required :columns, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute data + # Array of data rows, where each row is an array of values matching the columns + # order. + # + # @return [ArrayObject}>, nil] + required :data, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute debug + # Debug information including engine and SQL. + # + # @return [WhopSDK::Models::StatQueryMetricResponse::Debug, nil] + required :debug, -> { WhopSDK::Models::StatQueryMetricResponse::Debug }, nil?: true + + # @!attribute node + # The node path that was queried. + # + # @return [String, nil] + required :node, String, nil?: true + + # @!attribute pagination + # Pagination information. + # + # @return [WhopSDK::Models::StatQueryMetricResponse::Pagination, nil] + required :pagination, -> { WhopSDK::Models::StatQueryMetricResponse::Pagination }, nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :Result] + required :typename, const: :Result + + # @!method initialize(columns:, data:, debug:, node:, pagination:, typename: :Result) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::StatQueryMetricResponse} for more details. + # + # Result from a stats query (raw, metric, or SQL). + # + # @param columns [Array, nil] Column names in the order they appear in each data row. + # + # @param data [ArrayObject}>, nil] Array of data rows, where each row is an array of values matching the columns or + # + # @param debug [WhopSDK::Models::StatQueryMetricResponse::Debug, nil] Debug information including engine and SQL. + # + # @param node [String, nil] The node path that was queried. + # + # @param pagination [WhopSDK::Models::StatQueryMetricResponse::Pagination, nil] Pagination information. + # + # @param typename [Symbol, :Result] The typename of this object + + # @see WhopSDK::Models::StatQueryMetricResponse#debug + class Debug < WhopSDK::Internal::Type::BaseModel + # @!attribute engine + # The query engine used. + # + # @return [String, nil] + required :engine, String, nil?: true + + # @!attribute request_id + # Unique request identifier for debugging. + # + # @return [String, nil] + required :request_id, String, nil?: true + + # @!attribute sql + # The generated SQL query (with IDs sanitized). + # + # @return [String, nil] + required :sql, String, nil?: true + + # @!method initialize(engine:, request_id:, sql:) + # Debug information including engine and SQL. + # + # @param engine [String, nil] The query engine used. + # + # @param request_id [String, nil] Unique request identifier for debugging. + # + # @param sql [String, nil] The generated SQL query (with IDs sanitized). + end + + # @see WhopSDK::Models::StatQueryMetricResponse#pagination + class Pagination < WhopSDK::Internal::Type::BaseModel + # @!attribute next_cursor + # Cursor for the next page of results. + # + # @return [String, nil] + required :next_cursor, String, nil?: true + + # @!method initialize(next_cursor:) + # Pagination information. + # + # @param next_cursor [String, nil] Cursor for the next page of results. + end + end + end +end diff --git a/lib/whop_sdk/models/stat_query_raw_params.rb b/lib/whop_sdk/models/stat_query_raw_params.rb new file mode 100644 index 00000000..bbcc276f --- /dev/null +++ b/lib/whop_sdk/models/stat_query_raw_params.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Stats#query_raw + class StatQueryRawParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute resource + # Resource path using : as separator (e.g., 'members', 'payments:membership'). + # + # @return [String] + required :resource, String + + # @!attribute company_id + # Scope query to a specific company. + # + # @return [String, nil] + optional :company_id, String, nil?: true + + # @!attribute cursor + # Pagination cursor for next page. + # + # @return [String, nil] + optional :cursor, String, nil?: true + + # @!attribute from + # Start of time range (unix timestamp). + # + # @return [Time, nil] + optional :from, Time, nil?: true + + # @!attribute limit + # Number of records to return (max 10000). + # + # @return [Integer, nil] + optional :limit, Integer, nil?: true + + # @!attribute sort + # Column to sort by. + # + # @return [String, nil] + optional :sort, String, nil?: true + + # @!attribute sort_direction + # The direction of the sort. + # + # @return [Symbol, WhopSDK::Models::Direction, nil] + optional :sort_direction, enum: -> { WhopSDK::Direction }, nil?: true + + # @!attribute to + # End of time range (unix timestamp). + # + # @return [Time, nil] + optional :to, Time, nil?: true + + # @!attribute user_id + # Scope query to a specific user. + # + # @return [String, nil] + optional :user_id, String, nil?: true + + # @!method initialize(resource:, company_id: nil, cursor: nil, from: nil, limit: nil, sort: nil, sort_direction: nil, to: nil, user_id: nil, request_options: {}) + # @param resource [String] Resource path using : as separator (e.g., 'members', 'payments:membership'). + # + # @param company_id [String, nil] Scope query to a specific company. + # + # @param cursor [String, nil] Pagination cursor for next page. + # + # @param from [Time, nil] Start of time range (unix timestamp). + # + # @param limit [Integer, nil] Number of records to return (max 10000). + # + # @param sort [String, nil] Column to sort by. + # + # @param sort_direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. + # + # @param to [Time, nil] End of time range (unix timestamp). + # + # @param user_id [String, nil] Scope query to a specific user. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/stat_query_raw_response.rb b/lib/whop_sdk/models/stat_query_raw_response.rb new file mode 100644 index 00000000..7c8edae1 --- /dev/null +++ b/lib/whop_sdk/models/stat_query_raw_response.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Stats#query_raw + class StatQueryRawResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute columns + # Column names in the order they appear in each data row. + # + # @return [Array, nil] + required :columns, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute data + # Array of data rows, where each row is an array of values matching the columns + # order. + # + # @return [ArrayObject}>, nil] + required :data, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute debug + # Debug information including engine and SQL. + # + # @return [WhopSDK::Models::StatQueryRawResponse::Debug, nil] + required :debug, -> { WhopSDK::Models::StatQueryRawResponse::Debug }, nil?: true + + # @!attribute node + # The node path that was queried. + # + # @return [String, nil] + required :node, String, nil?: true + + # @!attribute pagination + # Pagination information. + # + # @return [WhopSDK::Models::StatQueryRawResponse::Pagination, nil] + required :pagination, -> { WhopSDK::Models::StatQueryRawResponse::Pagination }, nil?: true + + # @!method initialize(columns:, data:, debug:, node:, pagination:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::StatQueryRawResponse} for more details. + # + # Result from a stats query (raw, metric, or SQL). + # + # @param columns [Array, nil] Column names in the order they appear in each data row. + # + # @param data [ArrayObject}>, nil] Array of data rows, where each row is an array of values matching the columns or + # + # @param debug [WhopSDK::Models::StatQueryRawResponse::Debug, nil] Debug information including engine and SQL. + # + # @param node [String, nil] The node path that was queried. + # + # @param pagination [WhopSDK::Models::StatQueryRawResponse::Pagination, nil] Pagination information. + + # @see WhopSDK::Models::StatQueryRawResponse#debug + class Debug < WhopSDK::Internal::Type::BaseModel + # @!attribute engine + # The query engine used. + # + # @return [String, nil] + required :engine, String, nil?: true + + # @!attribute request_id + # Unique request identifier for debugging. + # + # @return [String, nil] + required :request_id, String, nil?: true + + # @!attribute sql + # The generated SQL query (with IDs sanitized). + # + # @return [String, nil] + required :sql, String, nil?: true + + # @!method initialize(engine:, request_id:, sql:) + # Debug information including engine and SQL. + # + # @param engine [String, nil] The query engine used. + # + # @param request_id [String, nil] Unique request identifier for debugging. + # + # @param sql [String, nil] The generated SQL query (with IDs sanitized). + end + + # @see WhopSDK::Models::StatQueryRawResponse#pagination + class Pagination < WhopSDK::Internal::Type::BaseModel + # @!attribute next_cursor + # Cursor for the next page of results. + # + # @return [String, nil] + required :next_cursor, String, nil?: true + + # @!method initialize(next_cursor:) + # Pagination information. + # + # @param next_cursor [String, nil] Cursor for the next page of results. + end + end + end +end diff --git a/lib/whop_sdk/models/stat_run_sql_params.rb b/lib/whop_sdk/models/stat_run_sql_params.rb new file mode 100644 index 00000000..bc1049fd --- /dev/null +++ b/lib/whop_sdk/models/stat_run_sql_params.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Stats#run_sql + class StatRunSqlParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute resource + # Resource path using : as separator (e.g., 'receipts', 'payments:membership'). + # + # @return [String] + required :resource, String + + # @!attribute sql + # SQL query. Use SCOPED_DATA as the table name. + # + # @return [String] + required :sql, String + + # @!attribute company_id + # Scope query to a specific company. + # + # @return [String, nil] + optional :company_id, String, nil?: true + + # @!attribute cursor + # Pagination cursor for next page. + # + # @return [String, nil] + optional :cursor, String, nil?: true + + # @!attribute from + # Start of time range (unix timestamp). + # + # @return [Time, nil] + optional :from, Time, nil?: true + + # @!attribute limit + # Number of records to return (max 10000). + # + # @return [Integer, nil] + optional :limit, Integer, nil?: true + + # @!attribute sort + # Column to sort by. + # + # @return [String, nil] + optional :sort, String, nil?: true + + # @!attribute sort_direction + # The direction of the sort. + # + # @return [Symbol, WhopSDK::Models::Direction, nil] + optional :sort_direction, enum: -> { WhopSDK::Direction }, nil?: true + + # @!attribute to + # End of time range (unix timestamp). + # + # @return [Time, nil] + optional :to, Time, nil?: true + + # @!attribute user_id + # Scope query to a specific user. + # + # @return [String, nil] + optional :user_id, String, nil?: true + + # @!method initialize(resource:, sql:, company_id: nil, cursor: nil, from: nil, limit: nil, sort: nil, sort_direction: nil, to: nil, user_id: nil, request_options: {}) + # @param resource [String] Resource path using : as separator (e.g., 'receipts', 'payments:membership'). + # + # @param sql [String] SQL query. Use SCOPED_DATA as the table name. + # + # @param company_id [String, nil] Scope query to a specific company. + # + # @param cursor [String, nil] Pagination cursor for next page. + # + # @param from [Time, nil] Start of time range (unix timestamp). + # + # @param limit [Integer, nil] Number of records to return (max 10000). + # + # @param sort [String, nil] Column to sort by. + # + # @param sort_direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. + # + # @param to [Time, nil] End of time range (unix timestamp). + # + # @param user_id [String, nil] Scope query to a specific user. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/stat_run_sql_response.rb b/lib/whop_sdk/models/stat_run_sql_response.rb new file mode 100644 index 00000000..4e14a84d --- /dev/null +++ b/lib/whop_sdk/models/stat_run_sql_response.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Stats#run_sql + class StatRunSqlResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute columns + # Column names in the order they appear in each data row. + # + # @return [Array, nil] + required :columns, WhopSDK::Internal::Type::ArrayOf[String], nil?: true + + # @!attribute data + # Array of data rows, where each row is an array of values matching the columns + # order. + # + # @return [ArrayObject}>, nil] + required :data, + WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]], + nil?: true + + # @!attribute debug + # Debug information including engine and SQL. + # + # @return [WhopSDK::Models::StatRunSqlResponse::Debug, nil] + required :debug, -> { WhopSDK::Models::StatRunSqlResponse::Debug }, nil?: true + + # @!attribute node + # The node path that was queried. + # + # @return [String, nil] + required :node, String, nil?: true + + # @!attribute pagination + # Pagination information. + # + # @return [WhopSDK::Models::StatRunSqlResponse::Pagination, nil] + required :pagination, -> { WhopSDK::Models::StatRunSqlResponse::Pagination }, nil?: true + + # @!attribute typename + # The typename of this object + # + # @return [Symbol, :Result] + required :typename, const: :Result + + # @!method initialize(columns:, data:, debug:, node:, pagination:, typename: :Result) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::StatRunSqlResponse} for more details. + # + # Result from a stats query (raw, metric, or SQL). + # + # @param columns [Array, nil] Column names in the order they appear in each data row. + # + # @param data [ArrayObject}>, nil] Array of data rows, where each row is an array of values matching the columns or + # + # @param debug [WhopSDK::Models::StatRunSqlResponse::Debug, nil] Debug information including engine and SQL. + # + # @param node [String, nil] The node path that was queried. + # + # @param pagination [WhopSDK::Models::StatRunSqlResponse::Pagination, nil] Pagination information. + # + # @param typename [Symbol, :Result] The typename of this object + + # @see WhopSDK::Models::StatRunSqlResponse#debug + class Debug < WhopSDK::Internal::Type::BaseModel + # @!attribute engine + # The query engine used. + # + # @return [String, nil] + required :engine, String, nil?: true + + # @!attribute request_id + # Unique request identifier for debugging. + # + # @return [String, nil] + required :request_id, String, nil?: true + + # @!attribute sql + # The generated SQL query (with IDs sanitized). + # + # @return [String, nil] + required :sql, String, nil?: true + + # @!method initialize(engine:, request_id:, sql:) + # Debug information including engine and SQL. + # + # @param engine [String, nil] The query engine used. + # + # @param request_id [String, nil] Unique request identifier for debugging. + # + # @param sql [String, nil] The generated SQL query (with IDs sanitized). + end + + # @see WhopSDK::Models::StatRunSqlResponse#pagination + class Pagination < WhopSDK::Internal::Type::BaseModel + # @!attribute next_cursor + # Cursor for the next page of results. + # + # @return [String, nil] + required :next_cursor, String, nil?: true + + # @!method initialize(next_cursor:) + # Pagination information. + # + # @param next_cursor [String, nil] Cursor for the next page of results. + end + end + end +end diff --git a/lib/whop_sdk/models/support_channel_list_params.rb b/lib/whop_sdk/models/support_channel_list_params.rb index 4354b520..72534b90 100644 --- a/lib/whop_sdk/models/support_channel_list_params.rb +++ b/lib/whop_sdk/models/support_channel_list_params.rb @@ -7,12 +7,6 @@ class SupportChannelListParams < WhopSDK::Internal::Type::BaseModel extend WhopSDK::Internal::Type::RequestParameters::Converter include WhopSDK::Internal::Type::RequestParameters - # @!attribute company_id - # The unique identifier of the company to list support channels for. - # - # @return [String] - required :company_id, String - # @!attribute after # Returns the elements in the list that come after the specified cursor. # @@ -25,6 +19,14 @@ class SupportChannelListParams < WhopSDK::Internal::Type::BaseModel # @return [String, nil] optional :before, String, nil?: true + # @!attribute company_id + # The unique identifier of the company to list support channels for. Includes + # channels of child companies. When omitted, returns support channels across all + # companies the user has access to. + # + # @return [String, nil] + optional :company_id, String, nil?: true + # @!attribute direction # The direction of the sort. # @@ -56,16 +58,22 @@ class SupportChannelListParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::SupportChannelListParams::Order, nil] optional :order, enum: -> { WhopSDK::SupportChannelListParams::Order }, nil?: true - # @!method initialize(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, open_: nil, order: nil, request_options: {}) + # @!attribute view + # The perspective to filter support channels by. + # + # @return [Symbol, WhopSDK::Models::SupportChannelListParams::View, nil] + optional :view, enum: -> { WhopSDK::SupportChannelListParams::View }, nil?: true + + # @!method initialize(after: nil, before: nil, company_id: nil, direction: nil, first: nil, last: nil, open_: nil, order: nil, view: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::SupportChannelListParams} for more details. # - # @param company_id [String] The unique identifier of the company to list support channels for. - # # @param after [String, nil] Returns the elements in the list that come after the specified cursor. # # @param before [String, nil] Returns the elements in the list that come before the specified cursor. # + # @param company_id [String, nil] The unique identifier of the company to list support channels for. Includes chan + # # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. # # @param first [Integer, nil] Returns the first _n_ elements from the list. @@ -76,6 +84,8 @@ class SupportChannelListParams < WhopSDK::Internal::Type::BaseModel # # @param order [Symbol, WhopSDK::Models::SupportChannelListParams::Order, nil] Sort options for message channels # + # @param view [Symbol, WhopSDK::Models::SupportChannelListParams::View, nil] The perspective to filter support channels by. + # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] # Sort options for message channels @@ -88,6 +98,18 @@ module Order # @!method self.values # @return [Array] end + + # The perspective to filter support channels by. + module View + extend WhopSDK::Internal::Type::Enum + + ALL = :all + ADMIN = :admin + CUSTOMER = :customer + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/whop_sdk/resources/ad_campaigns.rb b/lib/whop_sdk/resources/ad_campaigns.rb new file mode 100644 index 00000000..aa2f51cb --- /dev/null +++ b/lib/whop_sdk/resources/ad_campaigns.rb @@ -0,0 +1,232 @@ +# frozen_string_literal: true + +module WhopSDK + module Resources + # Ad campaigns + class AdCampaigns + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCampaignCreateParams} for more details. + # + # Creates a new ad campaign for a product. + # + # Required permissions: + # + # - `ad_campaign:create` + # - `access_pass:basic:read` + # - `company:balance:read` + # + # @overload create(company_id:, config:, platform:, title:, ad_creative_set_ids: nil, budget: nil, budget_type: nil, daily_budget: nil, product_id: nil, target_country_codes: nil, request_options: {}) + # + # @param company_id [String] The company ID to create this ad campaign for. + # + # @param config [WhopSDK::Models::AdCampaignCreateParams::Config] Unified campaign configuration (conversion goal, budget, bidding, etc.). + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignCreateParams::Platform] The ad platform to run on (e.g., meta, tiktok). + # + # @param title [String] The title of the ad campaign. Must be max 100 characters. + # + # @param ad_creative_set_ids [Array, nil] Array of creative set IDs to link to this campaign. + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdCampaignCreateParams::BudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param daily_budget [Float, nil] Daily budget in dollars (minimum $5). Required unless lifetime_budget is set in + # + # @param product_id [String, nil] The unique identifier of the product to promote. + # + # @param target_country_codes [Array, nil] Array of ISO3166 country codes for territory targeting. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdCampaignCreateResponse] + # + # @see WhopSDK::Models::AdCampaignCreateParams + def create(params) + parsed, options = WhopSDK::AdCampaignCreateParams.dump_request(params) + @client.request( + method: :post, + path: "ad_campaigns", + body: parsed, + model: WhopSDK::Models::AdCampaignCreateResponse, + options: options + ) + end + + # Retrieves a single ad campaign by its unique identifier. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + # - `access_pass:basic:read` + # - `company:balance:read` + # + # @overload retrieve(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad campaign. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdCampaignRetrieveResponse] + # + # @see WhopSDK::Models::AdCampaignRetrieveParams + def retrieve(id, params = {}) + @client.request( + method: :get, + path: ["ad_campaigns/%1$s", id], + model: WhopSDK::Models::AdCampaignRetrieveResponse, + options: params[:request_options] + ) + end + + # Updates an existing ad campaign. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `access_pass:basic:read` + # - `company:balance:read` + # + # @overload update(id, ad_creative_set_ids: nil, budget: nil, budget_type: nil, config: nil, daily_budget: nil, product_id: nil, target_country_codes: nil, title: nil, request_options: {}) + # + # @param id [String] The unique identifier of the ad campaign to update. + # + # @param ad_creative_set_ids [Array, nil] Array of creative set IDs to link to this campaign. + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdCampaignUpdateParams::BudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param config [WhopSDK::Models::AdCampaignUpdateParams::Config, nil] Unified campaign configuration (conversion goal, budget, bidding, etc.). + # + # @param daily_budget [Float, nil] Daily budget in dollars (minimum $5). + # + # @param product_id [String, nil] The unique identifier of the product (access pass) to promote. + # + # @param target_country_codes [Array, nil] Array of ISO3166 country codes for territory targeting. + # + # @param title [String, nil] The title of the ad campaign. Must be max 100 characters. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdCampaignUpdateResponse] + # + # @see WhopSDK::Models::AdCampaignUpdateParams + def update(id, params = {}) + parsed, options = WhopSDK::AdCampaignUpdateParams.dump_request(params) + @client.request( + method: :patch, + path: ["ad_campaigns/%1$s", id], + body: parsed, + model: WhopSDK::Models::AdCampaignUpdateResponse, + options: options + ) + end + + # Returns a paginated list of ad campaigns for a company, with optional filtering + # by status, and creation date. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + # - `access_pass:basic:read` + # + # @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, query: nil, status: nil, request_options: {}) + # + # @param company_id [String] The unique identifier of the company to list ad campaigns for. + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param created_after [Time, nil] Only return ad campaigns created after this timestamp. + # + # @param created_before [Time, nil] Only return ad campaigns created before this timestamp. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param query [String, nil] Case-insensitive substring match against the campaign title. + # + # @param status [Symbol, WhopSDK::Models::AdCampaignListParams::Status, nil] The status of an ad campaign. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Internal::CursorPage] + # + # @see WhopSDK::Models::AdCampaignListParams + def list(params) + parsed, options = WhopSDK::AdCampaignListParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "ad_campaigns", + query: query, + page: WhopSDK::Internal::CursorPage, + model: WhopSDK::Models::AdCampaignListResponse, + options: options + ) + end + + # Pauses an ad campaign, optionally until a specific date. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `access_pass:basic:read` + # - `company:balance:read` + # + # @overload pause(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad campaign to pause. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdCampaignPauseResponse] + # + # @see WhopSDK::Models::AdCampaignPauseParams + def pause(id, params = {}) + @client.request( + method: :post, + path: ["ad_campaigns/%1$s/pause", id], + model: WhopSDK::Models::AdCampaignPauseResponse, + options: params[:request_options] + ) + end + + # Resumes a paused ad campaign. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `access_pass:basic:read` + # - `company:balance:read` + # + # @overload unpause(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad campaign to unpause. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdCampaignUnpauseResponse] + # + # @see WhopSDK::Models::AdCampaignUnpauseParams + def unpause(id, params = {}) + @client.request( + method: :post, + path: ["ad_campaigns/%1$s/unpause", id], + model: WhopSDK::Models::AdCampaignUnpauseResponse, + options: params[:request_options] + ) + end + + # @api private + # + # @param client [WhopSDK::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/whop_sdk/resources/ad_groups.rb b/lib/whop_sdk/resources/ad_groups.rb new file mode 100644 index 00000000..e756e5c2 --- /dev/null +++ b/lib/whop_sdk/resources/ad_groups.rb @@ -0,0 +1,192 @@ +# frozen_string_literal: true + +module WhopSDK + module Resources + # Ad groups + class AdGroups + # Creates a new ad group within a campaign. + # + # Required permissions: + # + # - `ad_campaign:create` + # - `ad_campaign:basic:read` + # + # @overload create(campaign_id:, budget: nil, budget_type: nil, config: nil, daily_budget: nil, name: nil, platform_config: nil, status: nil, request_options: {}) + # + # @param campaign_id [String] The ad campaign to create this ad group within. + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdGroupCreateParams::BudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param config [WhopSDK::Models::AdGroupCreateParams::Config, nil] Unified ad group configuration (bidding, optimization, targeting). + # + # @param daily_budget [Float, nil] Daily budget in dollars. + # + # @param name [String, nil] Human-readable ad group name. + # + # @param platform_config [WhopSDK::Models::AdGroupCreateParams::PlatformConfig, nil] Platform-specific ad group configuration. + # + # @param status [Symbol, WhopSDK::Models::AdGroupCreateParams::Status, nil] The status of an external ad group. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdGroupCreateResponse] + # + # @see WhopSDK::Models::AdGroupCreateParams + def create(params) + parsed, options = WhopSDK::AdGroupCreateParams.dump_request(params) + @client.request( + method: :post, + path: "ad_groups", + body: parsed, + model: WhopSDK::Models::AdGroupCreateResponse, + options: options + ) + end + + # Retrieves a single ad group by its unique identifier. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + # + # @overload retrieve(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad group. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdGroupRetrieveResponse] + # + # @see WhopSDK::Models::AdGroupRetrieveParams + def retrieve(id, params = {}) + @client.request( + method: :get, + path: ["ad_groups/%1$s", id], + model: WhopSDK::Models::AdGroupRetrieveResponse, + options: params[:request_options] + ) + end + + # Updates an existing ad group. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + # + # @overload update(id, budget: nil, budget_type: nil, config: nil, daily_budget: nil, name: nil, platform_config: nil, status: nil, request_options: {}) + # + # @param id [String] The unique identifier of the ad group to update. + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdGroupUpdateParams::BudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param config [WhopSDK::Models::AdGroupUpdateParams::Config, nil] Unified ad group configuration (bidding, optimization, targeting). + # + # @param daily_budget [Float, nil] Daily budget in dollars. + # + # @param name [String, nil] Human-readable ad group name. + # + # @param platform_config [WhopSDK::Models::AdGroupUpdateParams::PlatformConfig, nil] Platform-specific ad group configuration. + # + # @param status [Symbol, WhopSDK::Models::AdGroupUpdateParams::Status, nil] The status of an external ad group. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdGroupUpdateResponse] + # + # @see WhopSDK::Models::AdGroupUpdateParams + def update(id, params = {}) + parsed, options = WhopSDK::AdGroupUpdateParams.dump_request(params) + @client.request( + method: :patch, + path: ["ad_groups/%1$s", id], + body: parsed, + model: WhopSDK::Models::AdGroupUpdateResponse, + options: options + ) + end + + # Returns a paginated list of ad groups scoped by campaign or company, with + # optional filtering by status and creation date. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + # + # @overload list(after: nil, before: nil, campaign_id: nil, company_id: nil, created_after: nil, created_before: nil, first: nil, last: nil, query: nil, status: nil, request_options: {}) + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param campaign_id [String, nil] Filter by campaign. Provide exactly one of campaign_id or company_id. + # + # @param company_id [String, nil] Filter by company. Provide exactly one of campaign_id or company_id. + # + # @param created_after [Time, nil] Only return ad groups created after this timestamp. + # + # @param created_before [Time, nil] Only return ad groups created before this timestamp. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param query [String, nil] Case-insensitive substring match against the ad group name. + # + # @param status [Symbol, WhopSDK::Models::AdGroupListParams::Status, nil] The status of an external ad group. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Internal::CursorPage] + # + # @see WhopSDK::Models::AdGroupListParams + def list(params = {}) + parsed, options = WhopSDK::AdGroupListParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "ad_groups", + query: query, + page: WhopSDK::Internal::CursorPage, + model: WhopSDK::Models::AdGroupListResponse, + options: options + ) + end + + # Soft-deletes an ad group. + # + # Required permissions: + # + # - `ad_campaign:delete` + # + # @overload delete(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad group to delete. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Boolean] + # + # @see WhopSDK::Models::AdGroupDeleteParams + def delete(id, params = {}) + @client.request( + method: :delete, + path: ["ad_groups/%1$s", id], + model: WhopSDK::Internal::Type::Boolean, + options: params[:request_options] + ) + end + + # @api private + # + # @param client [WhopSDK::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/whop_sdk/resources/ads.rb b/lib/whop_sdk/resources/ads.rb new file mode 100644 index 00000000..befcc096 --- /dev/null +++ b/lib/whop_sdk/resources/ads.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +module WhopSDK + module Resources + # Ads + class Ads + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdCreateParams} for more details. + # + # Create an ad within an ad group. + # + # Required permissions: + # + # - `ad_campaign:create` + # + # @overload create(ad_group_id:, creative_set_id: nil, existing_instagram_media_id: nil, existing_post_id: nil, platform_config: nil, status: nil, request_options: {}) + # + # @param ad_group_id [String] The unique identifier of the ad group to create this ad in. + # + # @param creative_set_id [String, nil] The unique identifier of the creative set to use. + # + # @param existing_instagram_media_id [String, nil] ID of an existing Instagram media item to use as the ad creative (instead of a c + # + # @param existing_post_id [String, nil] ID of an existing Facebook post to use as the ad creative (instead of a creative + # + # @param platform_config [WhopSDK::Models::AdCreateParams::PlatformConfig, nil] Platform-specific configuration. Must match the campaign platform. + # + # @param status [Symbol, WhopSDK::Models::AdCreateParams::Status, nil] The status of an external ad. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdCreateResponse] + # + # @see WhopSDK::Models::AdCreateParams + def create(params) + parsed, options = WhopSDK::AdCreateParams.dump_request(params) + @client.request( + method: :post, + path: "ads", + body: parsed, + model: WhopSDK::Models::AdCreateResponse, + options: options + ) + end + + # Retrieve an ad by its unique identifier. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + # + # @overload retrieve(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdRetrieveResponse] + # + # @see WhopSDK::Models::AdRetrieveParams + def retrieve(id, params = {}) + @client.request( + method: :get, + path: ["ads/%1$s", id], + model: WhopSDK::Models::AdRetrieveResponse, + options: params[:request_options] + ) + end + + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdListParams} for more details. + # + # List ads scoped by ad group, campaign, or company. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + # + # @overload list(ad_group_id: nil, after: nil, before: nil, campaign_id: nil, company_id: nil, created_after: nil, created_before: nil, first: nil, last: nil, status: nil, request_options: {}) + # + # @param ad_group_id [String, nil] Filter by ad group. Provide exactly one of ad*group_id, campaign_id, or company* + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param campaign_id [String, nil] Filter by campaign. Provide exactly one of ad*group_id, campaign_id, or company* + # + # @param company_id [String, nil] Filter by company. Provide exactly one of ad_group_id, campaign_id, or company_i + # + # @param created_after [Time, nil] Only return ads created after this timestamp. + # + # @param created_before [Time, nil] Only return ads created before this timestamp. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param status [Symbol, WhopSDK::Models::AdListParams::Status, nil] The status of an external ad. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Internal::CursorPage] + # + # @see WhopSDK::Models::AdListParams + def list(params = {}) + parsed, options = WhopSDK::AdListParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "ads", + query: query, + page: WhopSDK::Internal::CursorPage, + model: WhopSDK::Models::AdListResponse, + options: options + ) + end + + # @api private + # + # @param client [WhopSDK::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/whop_sdk/resources/bounties.rb b/lib/whop_sdk/resources/bounties.rb new file mode 100644 index 00000000..c48d48e3 --- /dev/null +++ b/lib/whop_sdk/resources/bounties.rb @@ -0,0 +1,120 @@ +# frozen_string_literal: true + +module WhopSDK + module Resources + # Bounties + class Bounties + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::BountyCreateParams} for more details. + # + # Create a new workforce bounty by funding a dedicated bounty pool. + # + # Required permissions: + # + # - `bounty:create` + # + # @overload create(base_unit_amount:, currency:, description:, title:, accepted_submissions_limit: nil, allowed_country_codes: nil, experience_id: nil, origin_account_id: nil, request_options: {}) + # + # @param base_unit_amount [Float] The amount paid to each approved submission. The total bounty pool funded is thi + # + # @param currency [Symbol, WhopSDK::Models::Currency] The currency for the bounty pool funding amount. + # + # @param description [String] The description of the bounty. + # + # @param title [String] The title of the bounty. + # + # @param accepted_submissions_limit [Integer, nil] The number of submissions that can be approved before the bounty closes. Default + # + # @param allowed_country_codes [Array, nil] The ISO3166 country codes where this bounty should be visible. Empty means globa + # + # @param experience_id [String, nil] An optional experience to scope the bounty to. + # + # @param origin_account_id [String, nil] The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool. + # D + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::BountyCreateResponse] + # + # @see WhopSDK::Models::BountyCreateParams + def create(params) + parsed, options = WhopSDK::BountyCreateParams.dump_request(params) + @client.request( + method: :post, + path: "bounties", + body: parsed, + model: WhopSDK::Models::BountyCreateResponse, + options: options + ) + end + + # Retrieves a workforce bounty for the current authenticated user. + # + # @overload retrieve(id, request_options: {}) + # + # @param id [String] The unique identifier of the workforce bounty to retrieve. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::BountyRetrieveResponse] + # + # @see WhopSDK::Models::BountyRetrieveParams + def retrieve(id, params = {}) + @client.request( + method: :get, + path: ["bounties/%1$s", id], + model: WhopSDK::Models::BountyRetrieveResponse, + options: params[:request_options] + ) + end + + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::BountyListParams} for more details. + # + # Returns a paginated list of workforce bounties. When experienceId is provided, + # returns bounties scoped to that experience. When omitted, returns bounties with + # no experience. + # + # @overload list(after: nil, before: nil, direction: nil, experience_id: nil, first: nil, last: nil, status: nil, request_options: {}) + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. + # + # @param experience_id [String, nil] The experience to list bounties for. When omitted, returns bounties with no expe + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param status [Symbol, WhopSDK::Models::BountyListParams::Status, nil] The available bounty statuses to choose from. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Internal::CursorPage] + # + # @see WhopSDK::Models::BountyListParams + def list(params = {}) + parsed, options = WhopSDK::BountyListParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "bounties", + query: query, + page: WhopSDK::Internal::CursorPage, + model: WhopSDK::Models::BountyListResponse, + options: options + ) + end + + # @api private + # + # @param client [WhopSDK::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/whop_sdk/resources/companies.rb b/lib/whop_sdk/resources/companies.rb index f73e5ee8..7ff72aa3 100644 --- a/lib/whop_sdk/resources/companies.rb +++ b/lib/whop_sdk/resources/companies.rb @@ -170,6 +170,40 @@ def list(params = {}) ) end + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::CompanyCreateAPIKeyParams} for more details. + # + # Create an API key for a connected account (child company) owned by a parent + # company. + # + # @overload create_api_key(parent_company_id, child_company_id:, name: nil, permissions: nil, role: nil, request_options: {}) + # + # @param parent_company_id [String] The unique identifier of the parent platform company (e.g. 'biz_xxx'). + # + # @param child_company_id [String] The unique identifier of the connected account to create the API key for (e.g. ' + # + # @param name [String, nil] A human-readable name for the API key, such as 'Production API Key'. + # + # @param permissions [Array, nil] Granular permission statements defining which actions this API key can perform. + # + # @param role [Symbol, WhopSDK::Models::CompanyCreateAPIKeyParams::Role, nil] The different system roles that can be assigned. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::CompanyCreateAPIKeyResponse] + # + # @see WhopSDK::Models::CompanyCreateAPIKeyParams + def create_api_key(parent_company_id, params) + parsed, options = WhopSDK::CompanyCreateAPIKeyParams.dump_request(params) + @client.request( + method: :post, + path: ["companies/%1$s/api_keys", parent_company_id], + body: parsed, + model: WhopSDK::Models::CompanyCreateAPIKeyResponse, + options: options + ) + end + # @api private # # @param client [WhopSDK::Client] diff --git a/lib/whop_sdk/resources/conversions.rb b/lib/whop_sdk/resources/conversions.rb new file mode 100644 index 00000000..fcb00b99 --- /dev/null +++ b/lib/whop_sdk/resources/conversions.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +module WhopSDK + module Resources + # Conversions + class Conversions + # Track a conversion or engagement event for a company. + # + # Required permissions: + # + # - `event:create` + # + # @overload create(company_id:, event_name:, action_source: nil, context: nil, currency: nil, custom_name: nil, event_id: nil, event_time: nil, plan_id: nil, product_id: nil, referrer_url: nil, url: nil, user: nil, value: nil, request_options: {}) + # + # @param company_id [String] The company to associate with this event. + # + # @param event_name [Symbol, WhopSDK::Models::ConversionCreateParams::EventName] The type of event. + # + # @param action_source [Symbol, WhopSDK::Models::ConversionCreateParams::ActionSource, nil] The channel where an event originated + # + # @param context [WhopSDK::Models::ConversionCreateParams::Context, nil] Tracking and attribution context. + # + # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # + # @param custom_name [String, nil] Custom event name when event_name is 'custom'. + # + # @param event_id [String, nil] Client-provided identifier for deduplication. Generated if omitted. + # + # @param event_time [Time, nil] When the event occurred. Defaults to now. + # + # @param plan_id [String, nil] The plan associated with the event. + # + # @param product_id [String, nil] The product associated with the event. + # + # @param referrer_url [String, nil] The referring URL. + # + # @param url [String, nil] The URL where the event occurred. + # + # @param user [WhopSDK::Models::ConversionCreateParams::User, nil] User identity and profile data. + # + # @param value [Float, nil] Monetary value associated with the event. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::ConversionCreateResponse] + # + # @see WhopSDK::Models::ConversionCreateParams + def create(params) + parsed, options = WhopSDK::ConversionCreateParams.dump_request(params) + @client.request( + method: :post, + path: "conversions", + body: parsed, + model: WhopSDK::Models::ConversionCreateResponse, + options: options + ) + end + + # @api private + # + # @param client [WhopSDK::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/whop_sdk/resources/files.rb b/lib/whop_sdk/resources/files.rb index 58567a57..1be513cf 100644 --- a/lib/whop_sdk/resources/files.rb +++ b/lib/whop_sdk/resources/files.rb @@ -10,10 +10,12 @@ class Files # Create a new file record and receive a presigned URL for uploading content to # S3. # - # @overload create(filename:, request_options: {}) + # @overload create(filename:, visibility: nil, request_options: {}) # # @param filename [String] The name of the file including its extension (e.g., "photo.png" or "document.pdf # + # @param visibility [Symbol, WhopSDK::Models::FileCreateParams::Visibility, nil] Controls whether an uploaded file is publicly accessible or requires authenticat + # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [WhopSDK::Models::FileCreateResponse] diff --git a/lib/whop_sdk/resources/forum_posts.rb b/lib/whop_sdk/resources/forum_posts.rb index 8ba9255a..a07e2ae4 100644 --- a/lib/whop_sdk/resources/forum_posts.rb +++ b/lib/whop_sdk/resources/forum_posts.rb @@ -131,7 +131,7 @@ def update(id, params = {}) # # - `forum:read` # - # @overload list(experience_id:, after: nil, before: nil, first: nil, last: nil, parent_id: nil, pinned: nil, request_options: {}) + # @overload list(experience_id:, after: nil, before: nil, first: nil, include_bounty_anchors: nil, last: nil, parent_id: nil, pinned: nil, request_options: {}) # # @param experience_id [String] The unique identifier of the experience to list forum posts for. # @@ -141,6 +141,8 @@ def update(id, params = {}) # # @param first [Integer, nil] Returns the first _n_ elements from the list. # + # @param include_bounty_anchors [Boolean, nil] Whether to include top-level bounty discussion anchors as rich forum items. + # # @param last [Integer, nil] Returns the last _n_ elements from the list. # # @param parent_id [String, nil] The unique identifier of a parent post to list comments for. When set, returns r diff --git a/lib/whop_sdk/resources/payments.rb b/lib/whop_sdk/resources/payments.rb index 9c5060c8..a6ed2107 100644 --- a/lib/whop_sdk/resources/payments.rb +++ b/lib/whop_sdk/resources/payments.rb @@ -210,7 +210,7 @@ def list_fees(id, params = {}) # # @param id [String] The unique identifier of the payment to refund. # - # @param partial_amount [Float, nil] The amount to refund in the payment currency. If omitted, the full payment amoun + # @param partial_amount [Float, nil] The amount to refund. For multi-currency payments, this is in the charge currenc # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/whop_sdk/resources/plans.rb b/lib/whop_sdk/resources/plans.rb index 230df5a7..7d5f397c 100644 --- a/lib/whop_sdk/resources/plans.rb +++ b/lib/whop_sdk/resources/plans.rb @@ -16,12 +16,14 @@ class Plans # - `access_pass:basic:read` # - `plan:basic:read` # - # @overload create(company_id:, product_id:, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) + # @overload create(company_id:, product_id:, adaptive_pricing_enabled: nil, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) # # @param company_id [String] The unique identifier of the company to create this plan for. # # @param product_id [String] The unique identifier of the product to attach this plan to. # + # @param adaptive_pricing_enabled [Boolean, nil] Whether this plan accepts local currency payments via adaptive pricing. + # # @param billing_period [Integer, nil] The number of days between recurring charges. For example, 30 for monthly or 365 # # @param checkout_styling [WhopSDK::Models::PlanCreateParams::CheckoutStyling, nil] Checkout styling overrides for this plan. Pass null to inherit from the company @@ -110,10 +112,12 @@ def retrieve(id, params = {}) # - `access_pass:basic:read` # - `plan:basic:read` # - # @overload update(id, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, offer_cancel_discount: nil, override_tax_type: nil, payment_method_configuration: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) + # @overload update(id, adaptive_pricing_enabled: nil, billing_period: nil, checkout_styling: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, image: nil, initial_price: nil, internal_notes: nil, legacy_payment_method_controls: nil, offer_cancel_discount: nil, override_tax_type: nil, payment_method_configuration: nil, renewal_price: nil, stock: nil, strike_through_initial_price: nil, strike_through_renewal_price: nil, title: nil, trial_period_days: nil, unlimited_stock: nil, visibility: nil, request_options: {}) # # @param id [String] The unique identifier of the plan to update. # + # @param adaptive_pricing_enabled [Boolean, nil] Whether this plan accepts local currency payments via adaptive pricing. + # # @param billing_period [Integer, nil] The number of days between recurring charges. For example, 30 for monthly or 365 # # @param checkout_styling [WhopSDK::Models::PlanUpdateParams::CheckoutStyling, nil] Checkout styling overrides for this plan. Pass null to remove all overrides and diff --git a/lib/whop_sdk/resources/stats.rb b/lib/whop_sdk/resources/stats.rb new file mode 100644 index 00000000..437c60d1 --- /dev/null +++ b/lib/whop_sdk/resources/stats.rb @@ -0,0 +1,186 @@ +# frozen_string_literal: true + +module WhopSDK + module Resources + # Stats + class Stats + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::StatDescribeParams} for more details. + # + # Describe available stats schema. Without resource returns root nodes and + # metrics. With resource returns node columns, associations, and available + # metrics. + # + # Required permissions: + # + # - `stats:read` + # + # @overload describe(company_id: nil, resource: nil, user_id: nil, request_options: {}) + # + # @param company_id [String, nil] Scope query to a specific company. + # + # @param resource [String, nil] Resource path using : as separator (e.g., 'receipts', 'payments:membership', 're + # + # @param user_id [String, nil] Scope query to a specific user. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::StatDescribeResponse::DescribeRoot, WhopSDK::Models::StatDescribeResponse::DescribeNode, WhopSDK::Models::StatDescribeResponse::DescribeMetric, WhopSDK::Models::StatDescribeResponse::DescribeView, nil] + # + # @see WhopSDK::Models::StatDescribeParams + def describe(params = {}) + parsed, options = WhopSDK::StatDescribeParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "stats/describe", + query: query, + model: WhopSDK::Models::StatDescribeResponse, + options: options + ) + end + + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::StatQueryMetricParams} for more details. + # + # Query an aggregated metric. Returns data grouped by period with optional + # breakdowns. + # + # Required permissions: + # + # - `stats:read` + # + # @overload query_metric(resource:, breakdowns: nil, company_id: nil, filters: nil, from: nil, granularity: nil, time_zone: nil, to: nil, user_id: nil, request_options: {}) + # + # @param resource [String] Metric resource using : as separator (e.g., 'receipts:gross_revenue', 'members:n + # + # @param breakdowns [Array, nil] Columns to break down the metric by. + # + # @param company_id [String, nil] Scope query to a specific company. + # + # @param filters [Hash{Symbol=>Object}, nil] Key-value pairs to filter the data. + # + # @param from [Time, nil] Start of time range (unix timestamp). + # + # @param granularity [String, nil] Time granularity (daily, weekly, monthly). + # + # @param time_zone [String, nil] IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. O + # + # @param to [Time, nil] End of time range (unix timestamp). + # + # @param user_id [String, nil] Scope query to a specific user. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::StatQueryMetricResponse] + # + # @see WhopSDK::Models::StatQueryMetricParams + def query_metric(params) + parsed, options = WhopSDK::StatQueryMetricParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "stats/metric", + query: query, + model: WhopSDK::Models::StatQueryMetricResponse, + options: options + ) + end + + # Query raw data from a resource. Returns paginated rows with all columns. + # + # Required permissions: + # + # - `stats:read` + # + # @overload query_raw(resource:, company_id: nil, cursor: nil, from: nil, limit: nil, sort: nil, sort_direction: nil, to: nil, user_id: nil, request_options: {}) + # + # @param resource [String] Resource path using : as separator (e.g., 'members', 'payments:membership'). + # + # @param company_id [String, nil] Scope query to a specific company. + # + # @param cursor [String, nil] Pagination cursor for next page. + # + # @param from [Time, nil] Start of time range (unix timestamp). + # + # @param limit [Integer, nil] Number of records to return (max 10000). + # + # @param sort [String, nil] Column to sort by. + # + # @param sort_direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. + # + # @param to [Time, nil] End of time range (unix timestamp). + # + # @param user_id [String, nil] Scope query to a specific user. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::StatQueryRawResponse] + # + # @see WhopSDK::Models::StatQueryRawParams + def query_raw(params) + parsed, options = WhopSDK::StatQueryRawParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "stats/raw", + query: query, + model: WhopSDK::Models::StatQueryRawResponse, + options: options + ) + end + + # Run custom SQL against a scoped resource. Use SCOPED_DATA as the table name. + # + # Required permissions: + # + # - `stats:read` + # + # @overload run_sql(resource:, sql:, company_id: nil, cursor: nil, from: nil, limit: nil, sort: nil, sort_direction: nil, to: nil, user_id: nil, request_options: {}) + # + # @param resource [String] Resource path using : as separator (e.g., 'receipts', 'payments:membership'). + # + # @param sql [String] SQL query. Use SCOPED_DATA as the table name. + # + # @param company_id [String, nil] Scope query to a specific company. + # + # @param cursor [String, nil] Pagination cursor for next page. + # + # @param from [Time, nil] Start of time range (unix timestamp). + # + # @param limit [Integer, nil] Number of records to return (max 10000). + # + # @param sort [String, nil] Column to sort by. + # + # @param sort_direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. + # + # @param to [Time, nil] End of time range (unix timestamp). + # + # @param user_id [String, nil] Scope query to a specific user. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::StatRunSqlResponse] + # + # @see WhopSDK::Models::StatRunSqlParams + def run_sql(params) + parsed, options = WhopSDK::StatRunSqlParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "stats/sql", + query: query, + model: WhopSDK::Models::StatRunSqlResponse, + options: options + ) + end + + # @api private + # + # @param client [WhopSDK::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/whop_sdk/resources/support_channels.rb b/lib/whop_sdk/resources/support_channels.rb index 6a7a23b4..e4d58957 100644 --- a/lib/whop_sdk/resources/support_channels.rb +++ b/lib/whop_sdk/resources/support_channels.rb @@ -72,14 +72,14 @@ def retrieve(id, params = {}) # # - `support_chat:read` # - # @overload list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, open_: nil, order: nil, request_options: {}) - # - # @param company_id [String] The unique identifier of the company to list support channels for. + # @overload list(after: nil, before: nil, company_id: nil, direction: nil, first: nil, last: nil, open_: nil, order: nil, view: nil, request_options: {}) # # @param after [String, nil] Returns the elements in the list that come after the specified cursor. # # @param before [String, nil] Returns the elements in the list that come before the specified cursor. # + # @param company_id [String, nil] The unique identifier of the company to list support channels for. Includes chan + # # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. # # @param first [Integer, nil] Returns the first _n_ elements from the list. @@ -90,12 +90,14 @@ def retrieve(id, params = {}) # # @param order [Symbol, WhopSDK::Models::SupportChannelListParams::Order, nil] Sort options for message channels # + # @param view [Symbol, WhopSDK::Models::SupportChannelListParams::View, nil] The perspective to filter support channels by. + # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [WhopSDK::Internal::CursorPage] # # @see WhopSDK::Models::SupportChannelListParams - def list(params) + def list(params = {}) parsed, options = WhopSDK::SupportChannelListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( diff --git a/lib/whop_sdk/version.rb b/lib/whop_sdk/version.rb index fcfdf30e..eed1ba80 100644 --- a/lib/whop_sdk/version.rb +++ b/lib/whop_sdk/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module WhopSDK - VERSION = "0.0.38" + VERSION = "0.0.39" end diff --git a/rbi/whop_sdk/client.rbi b/rbi/whop_sdk/client.rbi index 793a3837..a9001f57 100644 --- a/rbi/whop_sdk/client.rbi +++ b/rbi/whop_sdk/client.rbi @@ -236,6 +236,30 @@ module WhopSDK sig { returns(WhopSDK::Resources::Affiliates) } attr_reader :affiliates + # Bounties + sig { returns(WhopSDK::Resources::Bounties) } + attr_reader :bounties + + # Stats + sig { returns(WhopSDK::Resources::Stats) } + attr_reader :stats + + # Ad campaigns + sig { returns(WhopSDK::Resources::AdCampaigns) } + attr_reader :ad_campaigns + + # Ad groups + sig { returns(WhopSDK::Resources::AdGroups) } + attr_reader :ad_groups + + # Ads + sig { returns(WhopSDK::Resources::Ads) } + attr_reader :ads + + # Conversions + sig { returns(WhopSDK::Resources::Conversions) } + attr_reader :conversions + # @api private sig { override.returns(T::Hash[String, String]) } private def auth_headers diff --git a/rbi/whop_sdk/models.rbi b/rbi/whop_sdk/models.rbi index c610d460..6a8a776b 100644 --- a/rbi/whop_sdk/models.rbi +++ b/rbi/whop_sdk/models.rbi @@ -9,6 +9,34 @@ module WhopSDK AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams + AdCampaignCreateParams = WhopSDK::Models::AdCampaignCreateParams + + AdCampaignListParams = WhopSDK::Models::AdCampaignListParams + + AdCampaignPauseParams = WhopSDK::Models::AdCampaignPauseParams + + AdCampaignRetrieveParams = WhopSDK::Models::AdCampaignRetrieveParams + + AdCampaignUnpauseParams = WhopSDK::Models::AdCampaignUnpauseParams + + AdCampaignUpdateParams = WhopSDK::Models::AdCampaignUpdateParams + + AdCreateParams = WhopSDK::Models::AdCreateParams + + AdGroupCreateParams = WhopSDK::Models::AdGroupCreateParams + + AdGroupDeleteParams = WhopSDK::Models::AdGroupDeleteParams + + AdGroupListParams = WhopSDK::Models::AdGroupListParams + + AdGroupRetrieveParams = WhopSDK::Models::AdGroupRetrieveParams + + AdGroupUpdateParams = WhopSDK::Models::AdGroupUpdateParams + + AdListParams = WhopSDK::Models::AdListParams + + AdRetrieveParams = WhopSDK::Models::AdRetrieveParams + Affiliate = WhopSDK::Models::Affiliate AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams @@ -83,6 +111,12 @@ module WhopSDK BillingReasons = WhopSDK::Models::BillingReasons + BountyCreateParams = WhopSDK::Models::BountyCreateParams + + BountyListParams = WhopSDK::Models::BountyListParams + + BountyRetrieveParams = WhopSDK::Models::BountyRetrieveParams + CancelOptions = WhopSDK::Models::CancelOptions CardBrands = WhopSDK::Models::CardBrands @@ -116,6 +150,8 @@ module WhopSDK Company = WhopSDK::Models::Company + CompanyCreateAPIKeyParams = WhopSDK::Models::CompanyCreateAPIKeyParams + CompanyCreateParams = WhopSDK::Models::CompanyCreateParams CompanyListParams = WhopSDK::Models::CompanyListParams @@ -137,6 +173,8 @@ module WhopSDK CompanyUpdateParams = WhopSDK::Models::CompanyUpdateParams + ConversionCreateParams = WhopSDK::Models::ConversionCreateParams + Course = WhopSDK::Models::Course CourseChapter = WhopSDK::Models::CourseChapter @@ -638,6 +676,14 @@ module WhopSDK SocialLinkWebsites = WhopSDK::Models::SocialLinkWebsites + StatDescribeParams = WhopSDK::Models::StatDescribeParams + + StatQueryMetricParams = WhopSDK::Models::StatQueryMetricParams + + StatQueryRawParams = WhopSDK::Models::StatQueryRawParams + + StatRunSqlParams = WhopSDK::Models::StatRunSqlParams + Status = WhopSDK::Models::Status SupportChannel = WhopSDK::Models::SupportChannel diff --git a/rbi/whop_sdk/models/ad_campaign_create_params.rbi b/rbi/whop_sdk/models/ad_campaign_create_params.rbi new file mode 100644 index 00000000..86a6a31e --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_create_params.rbi @@ -0,0 +1,444 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdCampaignCreateParams, WhopSDK::Internal::AnyHash) + end + + # The company ID to create this ad campaign for. + sig { returns(String) } + attr_accessor :company_id + + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + sig { returns(WhopSDK::AdCampaignCreateParams::Config) } + attr_reader :config + + sig do + params(config: WhopSDK::AdCampaignCreateParams::Config::OrHash).void + end + attr_writer :config + + # The ad platform to run on (e.g., meta, tiktok). + sig { returns(WhopSDK::AdCampaignCreateParams::Platform::OrSymbol) } + attr_accessor :platform + + # The title of the ad campaign. Must be max 100 characters. + sig { returns(String) } + attr_accessor :title + + # Array of creative set IDs to link to this campaign. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :ad_creative_set_ids + + # Budget amount in dollars. + sig { returns(T.nilable(Float)) } + attr_accessor :budget + + # The budget type for an ad campaign or ad group. + sig do + returns( + T.nilable(WhopSDK::AdCampaignCreateParams::BudgetType::OrSymbol) + ) + end + attr_accessor :budget_type + + # Daily budget in dollars (minimum $5). Required unless lifetime_budget is set in + # config. + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # The unique identifier of the product to promote. + sig { returns(T.nilable(String)) } + attr_accessor :product_id + + # Array of ISO3166 country codes for territory targeting. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :target_country_codes + + sig do + params( + company_id: String, + config: WhopSDK::AdCampaignCreateParams::Config::OrHash, + platform: WhopSDK::AdCampaignCreateParams::Platform::OrSymbol, + title: String, + ad_creative_set_ids: T.nilable(T::Array[String]), + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdCampaignCreateParams::BudgetType::OrSymbol), + daily_budget: T.nilable(Float), + product_id: T.nilable(String), + target_country_codes: T.nilable(T::Array[String]), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The company ID to create this ad campaign for. + company_id:, + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + config:, + # The ad platform to run on (e.g., meta, tiktok). + platform:, + # The title of the ad campaign. Must be max 100 characters. + title:, + # Array of creative set IDs to link to this campaign. + ad_creative_set_ids: nil, + # Budget amount in dollars. + budget: nil, + # The budget type for an ad campaign or ad group. + budget_type: nil, + # Daily budget in dollars (minimum $5). Required unless lifetime_budget is set in + # config. + daily_budget: nil, + # The unique identifier of the product to promote. + product_id: nil, + # Array of ISO3166 country codes for territory targeting. + target_country_codes: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + company_id: String, + config: WhopSDK::AdCampaignCreateParams::Config, + platform: WhopSDK::AdCampaignCreateParams::Platform::OrSymbol, + title: String, + ad_creative_set_ids: T.nilable(T::Array[String]), + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdCampaignCreateParams::BudgetType::OrSymbol), + daily_budget: T.nilable(Float), + product_id: T.nilable(String), + target_country_codes: T.nilable(T::Array[String]), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdCampaignCreateParams::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # The bidding strategy used to optimize spend for this campaign. + sig do + returns( + T.nilable( + WhopSDK::AdCampaignCreateParams::Config::BidStrategy::OrSymbol + ) + ) + end + attr_accessor :bid_strategy + + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :budget_optimization + + # The scheduled end time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :lifetime_budget + + # The campaign objective that determines how Meta optimizes delivery. + sig do + returns( + T.nilable( + WhopSDK::AdCampaignCreateParams::Config::Objective::OrSymbol + ) + ) + end + attr_accessor :objective + + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :special_categories + + # The scheduled start time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # The campaign status as set by the advertiser (active or paused). + sig do + returns( + T.nilable(WhopSDK::AdCampaignCreateParams::Config::Status::OrSymbol) + ) + end + attr_accessor :status + + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdCampaignCreateParams::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + lifetime_budget: T.nilable(Integer), + objective: + T.nilable( + WhopSDK::AdCampaignCreateParams::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::AdCampaignCreateParams::Config::Status::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + bid_amount: nil, + # The bidding strategy used to optimize spend for this campaign. + bid_strategy: nil, + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + budget_optimization: nil, + # The scheduled end time of the campaign (ISO8601). + end_time: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + lifetime_budget: nil, + # The campaign objective that determines how Meta optimizes delivery. + objective: nil, + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + special_categories: nil, + # The scheduled start time of the campaign (ISO8601). + start_time: nil, + # The campaign status as set by the advertiser (active or paused). + status: nil + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdCampaignCreateParams::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + lifetime_budget: T.nilable(Integer), + objective: + T.nilable( + WhopSDK::AdCampaignCreateParams::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::AdCampaignCreateParams::Config::Status::OrSymbol + ) + } + ) + end + def to_hash + end + + # The bidding strategy used to optimize spend for this campaign. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCampaignCreateParams::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::AdCampaignCreateParams::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::AdCampaignCreateParams::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::AdCampaignCreateParams::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCampaignCreateParams::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign objective that determines how Meta optimizes delivery. + module Objective + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdCampaignCreateParams::Config::Objective) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AWARENESS = + T.let( + :awareness, + WhopSDK::AdCampaignCreateParams::Config::Objective::TaggedSymbol + ) + TRAFFIC = + T.let( + :traffic, + WhopSDK::AdCampaignCreateParams::Config::Objective::TaggedSymbol + ) + ENGAGEMENT = + T.let( + :engagement, + WhopSDK::AdCampaignCreateParams::Config::Objective::TaggedSymbol + ) + LEADS = + T.let( + :leads, + WhopSDK::AdCampaignCreateParams::Config::Objective::TaggedSymbol + ) + SALES = + T.let( + :sales, + WhopSDK::AdCampaignCreateParams::Config::Objective::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCampaignCreateParams::Config::Objective::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign status as set by the advertiser (active or paused). + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdCampaignCreateParams::Config::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::AdCampaignCreateParams::Config::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::AdCampaignCreateParams::Config::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCampaignCreateParams::Config::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The ad platform to run on (e.g., meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdCampaignCreateParams::Platform) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let(:meta, WhopSDK::AdCampaignCreateParams::Platform::TaggedSymbol) + TIKTOK = + T.let( + :tiktok, + WhopSDK::AdCampaignCreateParams::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::AdCampaignCreateParams::Platform::TaggedSymbol] + ) + end + def self.values + end + end + + # The budget type for an ad campaign or ad group. + module BudgetType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdCampaignCreateParams::BudgetType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DAILY = + T.let( + :daily, + WhopSDK::AdCampaignCreateParams::BudgetType::TaggedSymbol + ) + LIFETIME = + T.let( + :lifetime, + WhopSDK::AdCampaignCreateParams::BudgetType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::AdCampaignCreateParams::BudgetType::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_create_response.rbi b/rbi/whop_sdk/models/ad_campaign_create_response.rbi new file mode 100644 index 00000000..4bf28de7 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_create_response.rbi @@ -0,0 +1,1648 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignCreateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + sig { returns(Float) } + attr_accessor :available_budget + + # The ledger account being charged for platform balance billing (null if using + # card) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount + ) + ) + end + attr_reader :billing_ledger_account + + sig do + params( + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount::OrHash + ) + ).void + end + attr_writer :billing_ledger_account + + # Number of clicks + sig { returns(Integer) } + attr_accessor :clicks_count + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignCreateResponse::Config)) + end + attr_reader :config + + sig do + params( + config: + T.nilable(WhopSDK::Models::AdCampaignCreateResponse::Config::OrHash) + ).void + end + attr_writer :config + + # The datetime the ad campaign was created. + sig { returns(Time) } + attr_accessor :created_at + + # The user who created the campaign + sig { returns(WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser) } + attr_reader :created_by_user + + sig do + params( + created_by_user: + WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser::OrHash + ).void + end + attr_writer :created_by_user + + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Number of impressions (views) + sig { returns(Integer) } + attr_accessor :impressions_count + + # If temporarily paused, the timestamp when the campaign will auto-resume + sig { returns(T.nilable(Time)) } + attr_accessor :paused_until + + # The payment method used for daily billing (null if using platform balance) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::Variants + ) + ) + end + attr_accessor :payment_method + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignCreateResponse::Product)) + end + attr_reader :product + + sig do + params( + product: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Product::OrHash + ) + ).void + end + attr_writer :product + + # Number of purchases + sig { returns(Integer) } + attr_accessor :purchases_count + + # Remaining balance in dollars + sig { returns(Float) } + attr_accessor :remaining_balance + + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + sig { returns(Float) } + attr_accessor :return_on_ad_spend + + # Total revenue generated from users who converted through this campaign + sig { returns(Float) } + attr_accessor :revenue + + # Current status of the campaign (active, paused, or inactive) + sig do + returns(WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # Array of ISO3166 country codes for territory targeting + sig { returns(T::Array[String]) } + attr_accessor :target_country_codes + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # Amount spent today in dollars + sig { returns(Float) } + attr_accessor :todays_spend + + # Total credits added to the campaign in dollars + sig { returns(Float) } + attr_accessor :total_credits + + # Total amount spent on conversions in dollars + sig { returns(Float) } + attr_accessor :total_spend + + # The datetime the ad campaign was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An advertising campaign running on an external platform or within Whop. + sig do + params( + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount::OrHash + ), + clicks_count: Integer, + config: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::OrHash + ), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser::OrHash, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod::OrHash, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::OrHash + ) + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Platform::OrSymbol + ), + product: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Product::OrHash + ), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignCreateResponse::Status::OrSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + available_budget:, + # The ledger account being charged for platform balance billing (null if using + # card) + billing_ledger_account:, + # Number of clicks + clicks_count:, + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + config:, + # The datetime the ad campaign was created. + created_at:, + # The user who created the campaign + created_by_user:, + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + daily_budget:, + # Number of impressions (views) + impressions_count:, + # If temporarily paused, the timestamp when the campaign will auto-resume + paused_until:, + # The payment method used for daily billing (null if using platform balance) + payment_method:, + # The platforms where an ad campaign can run. + platform:, + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + product:, + # Number of purchases + purchases_count:, + # Remaining balance in dollars + remaining_balance:, + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + return_on_ad_spend:, + # Total revenue generated from users who converted through this campaign + revenue:, + # Current status of the campaign (active, paused, or inactive) + status:, + # Array of ISO3166 country codes for territory targeting + target_country_codes:, + # The title of the ad campaign + title:, + # Amount spent today in dollars + todays_spend:, + # Total credits added to the campaign in dollars + total_credits:, + # Total amount spent on conversions in dollars + total_spend:, + # The datetime the ad campaign was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount + ), + clicks_count: Integer, + config: + T.nilable(WhopSDK::Models::AdCampaignCreateResponse::Config), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::Variants + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Platform::TaggedSymbol + ), + product: + T.nilable(WhopSDK::Models::AdCampaignCreateResponse::Product), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + ) + end + def to_hash + end + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ledger account. + sig { returns(String) } + attr_accessor :id + + # The ledger account being charged for platform balance billing (null if using + # card) + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the ledger account. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # The bidding strategy used to optimize spend for this campaign. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :budget_optimization + + # The scheduled end time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # The campaign objective that determines how Meta optimizes delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::TaggedSymbol + ) + ) + end + attr_accessor :objective + + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :special_categories + + # The scheduled start time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # The campaign status as set by the advertiser (active or paused). + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::Status::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + bid_amount:, + # The bidding strategy used to optimize spend for this campaign. + bid_strategy:, + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + budget_optimization:, + # The scheduled end time of the campaign (ISO8601). + end_time:, + # The campaign objective that determines how Meta optimizes delivery. + objective:, + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + special_categories:, + # The scheduled start time of the campaign (ISO8601). + start_time:, + # The campaign status as set by the advertiser (active or paused). + status: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy::TaggedSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::TaggedSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignCreateResponse::Config::Status::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # The bidding strategy used to optimize spend for this campaign. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignCreateResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign objective that determines how Meta optimizes delivery. + module Objective + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AWARENESS = + T.let( + :awareness, + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::TaggedSymbol + ) + TRAFFIC = + T.let( + :traffic, + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::TaggedSymbol + ) + ENGAGEMENT = + T.let( + :engagement, + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::TaggedSymbol + ) + LEADS = + T.let( + :leads, + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::TaggedSymbol + ) + SALES = + T.let( + :sales, + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignCreateResponse::Config::Objective::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign status as set by the advertiser (active or paused). + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignCreateResponse::Config::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignCreateResponse::Config::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignCreateResponse::Config::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignCreateResponse::Config::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the user. + sig { returns(String) } + attr_accessor :id + + # The user's display name shown on their public profile. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The user's unique username shown on their public profile. + sig { returns(String) } + attr_accessor :username + + # The user who created the campaign + sig do + params(id: String, name: T.nilable(String), username: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the user. + id:, + # The user's display name shown on their public profile. + name:, + # The user's unique username shown on their public profile. + username: + ) + end + + sig do + override.returns( + { id: String, name: T.nilable(String), username: String } + ) + end + def to_hash + end + end + + # The payment method used for daily billing (null if using platform balance) + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod + ) + ) + end + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved payment method with no type-specific details available. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :BasePaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + returns( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card + ) + end + attr_reader :card + + sig do + params( + card: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card::OrHash + ).void + end + attr_writer :card + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved card payment method, including brand, last four digits, and expiration + # details. + sig do + params( + id: String, + card: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + card:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CardPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + card: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Card < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card, + WhopSDK::Internal::AnyHash + ) + end + + # Possible card brands that a payment token can have + sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) } + attr_accessor :brand + + # The two-digit expiration month of the card (1-12). Null if not available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_month + + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_year + + # The last four digits of the card number. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + params( + brand: T.nilable(WhopSDK::CardBrands::OrSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Possible card brands that a payment token can have + brand:, + # The two-digit expiration month of the card (1-12). Null if not available. + exp_month:, + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + exp_year:, + # The last four digits of the card number. Null if not available. + last4: + ) + end + + sig do + override.returns( + { + brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + returns( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + ) + end + attr_reader :us_bank_account + + sig do + params( + us_bank_account: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash + ).void + end + attr_writer :us_bank_account + + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + us_bank_account: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The bank account-specific details for this payment method, including bank name + # and last four digits. + us_bank_account:, + # The typename of this object + typename: :UsBankAccountPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol, + us_bank_account: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + ) + end + def to_hash + end + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The type of bank account (e.g., checking, savings). + sig { returns(String) } + attr_accessor :account_type + + # The name of the financial institution holding the account. + sig { returns(String) } + attr_accessor :bank_name + + # The last four digits of the bank account number. + sig { returns(String) } + attr_accessor :last4 + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + params( + account_type: String, + bank_name: String, + last4: String + ).returns(T.attached_class) + end + def self.new( + # The type of bank account (e.g., checking, savings). + account_type:, + # The name of the financial institution holding the account. + bank_name:, + # The last four digits of the bank account number. + last4: + ) + end + + sig do + override.returns( + { account_type: String, bank_name: String, last4: String } + ) + end + def to_hash + end + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + returns( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp + ) + end + attr_reader :cashapp + + sig do + params( + cashapp: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash + ).void + end + attr_writer :cashapp + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + sig do + params( + id: String, + cashapp: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + cashapp:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CashappPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + cashapp: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Cashapp < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + WhopSDK::Internal::AnyHash + ) + end + + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + sig { returns(T.nilable(String)) } + attr_accessor :buyer_id + + # The public cashtag handle of the buyer on Cash App. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :cashtag + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + params( + buyer_id: T.nilable(String), + cashtag: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + buyer_id:, + # The public cashtag handle of the buyer on Cash App. Null if not available. + cashtag: + ) + end + + sig do + override.returns( + { buyer_id: T.nilable(String), cashtag: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + returns( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal + ) + end + attr_reader :ideal + + sig do + params( + ideal: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash + ).void + end + attr_writer :ideal + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + sig do + params( + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The iDEAL-specific details for this payment method, including bank name and BIC. + ideal:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :IdealPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Ideal < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + WhopSDK::Internal::AnyHash + ) + end + + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bank + + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bic + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + params(bank: T.nilable(String), bic: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + bank:, + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + bic: + ) + end + + sig do + override.returns( + { bank: T.nilable(String), bic: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + returns( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + ) + end + attr_reader :sepa_debit + + sig do + params( + sepa_debit: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash + ).void + end + attr_writer :sepa_debit + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sepa_debit:, + # The typename of this object + typename: :SepaDebitPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: Symbol + } + ) + end + def to_hash + end + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + WhopSDK::Internal::AnyHash + ) + end + + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :bank_code + + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :branch_code + + # The two-letter ISO country code where the bank account is located. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + params( + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + bank_code:, + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + branch_code:, + # The two-letter ISO country code where the bank account is located. Null if not + # available. + country:, + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + last4: + ) + end + + sig do + override.returns( + { + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::Variants + ] + ) + end + def self.variants + end + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignCreateResponse::Platform) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdCampaignCreateResponse::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdCampaignCreateResponse::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignCreateResponse::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignCreateResponse::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + sig { returns(String) } + attr_accessor :route + + # The display name of the product shown to customers on the product page and in + # search results. + sig { returns(String) } + attr_accessor :title + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + params(id: String, route: String, title: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the product. + id:, + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + route:, + # The display name of the product shown to customers on the product page and in + # search results. + title: + ) + end + + sig { override.returns({ id: String, route: String, title: String }) } + def to_hash + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignCreateResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignCreateResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_list_params.rbi b/rbi/whop_sdk/models/ad_campaign_list_params.rbi new file mode 100644 index 00000000..a498f06c --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_list_params.rbi @@ -0,0 +1,151 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdCampaignListParams, WhopSDK::Internal::AnyHash) + end + + # The unique identifier of the company to list ad campaigns for. + sig { returns(String) } + attr_accessor :company_id + + # Returns the elements in the list that come after the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :after + + # Returns the elements in the list that come before the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :before + + # Only return ad campaigns created after this timestamp. + sig { returns(T.nilable(Time)) } + attr_accessor :created_after + + # Only return ad campaigns created before this timestamp. + sig { returns(T.nilable(Time)) } + attr_accessor :created_before + + # Returns the first _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :first + + # Returns the last _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :last + + # Case-insensitive substring match against the campaign title. + sig { returns(T.nilable(String)) } + attr_accessor :query + + # The status of an ad campaign. + sig do + returns(T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol)) + end + attr_accessor :status + + sig do + params( + company_id: String, + after: T.nilable(String), + before: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + query: T.nilable(String), + status: T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The unique identifier of the company to list ad campaigns for. + company_id:, + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # Only return ad campaigns created after this timestamp. + created_after: nil, + # Only return ad campaigns created before this timestamp. + created_before: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # Case-insensitive substring match against the campaign title. + query: nil, + # The status of an ad campaign. + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + company_id: String, + after: T.nilable(String), + before: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + query: T.nilable(String), + status: T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # The status of an ad campaign. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::AdCampaignListParams::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let(:active, WhopSDK::AdCampaignListParams::Status::TaggedSymbol) + PAUSED = + T.let(:paused, WhopSDK::AdCampaignListParams::Status::TaggedSymbol) + INACTIVE = + T.let(:inactive, WhopSDK::AdCampaignListParams::Status::TaggedSymbol) + STALE = + T.let(:stale, WhopSDK::AdCampaignListParams::Status::TaggedSymbol) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::AdCampaignListParams::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::AdCampaignListParams::Status::TaggedSymbol + ) + DRAFT = + T.let(:draft, WhopSDK::AdCampaignListParams::Status::TaggedSymbol) + IN_REVIEW = + T.let(:in_review, WhopSDK::AdCampaignListParams::Status::TaggedSymbol) + FLAGGED = + T.let(:flagged, WhopSDK::AdCampaignListParams::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::AdCampaignListParams::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_list_response.rbi b/rbi/whop_sdk/models/ad_campaign_list_response.rbi new file mode 100644 index 00000000..7b77b2a0 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_list_response.rbi @@ -0,0 +1,372 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignListResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignListResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + sig { returns(Float) } + attr_accessor :available_budget + + # Number of clicks + sig { returns(Integer) } + attr_accessor :clicks_count + + # The datetime the ad campaign was created. + sig { returns(Time) } + attr_accessor :created_at + + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Number of impressions (views) + sig { returns(Integer) } + attr_accessor :impressions_count + + # If temporarily paused, the timestamp when the campaign will auto-resume + sig { returns(T.nilable(Time)) } + attr_accessor :paused_until + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignListResponse::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignListResponse::Product)) + end + attr_reader :product + + sig do + params( + product: + T.nilable(WhopSDK::Models::AdCampaignListResponse::Product::OrHash) + ).void + end + attr_writer :product + + # Number of purchases + sig { returns(Integer) } + attr_accessor :purchases_count + + # Remaining balance in dollars + sig { returns(Float) } + attr_accessor :remaining_balance + + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + sig { returns(Float) } + attr_accessor :return_on_ad_spend + + # Total revenue generated from users who converted through this campaign + sig { returns(Float) } + attr_accessor :revenue + + # Current status of the campaign (active, paused, or inactive) + sig do + returns(WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # Array of ISO3166 country codes for territory targeting + sig { returns(T::Array[String]) } + attr_accessor :target_country_codes + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # Amount spent today in dollars + sig { returns(Float) } + attr_accessor :todays_spend + + # Total credits added to the campaign in dollars + sig { returns(Float) } + attr_accessor :total_credits + + # Total amount spent on conversions in dollars + sig { returns(Float) } + attr_accessor :total_spend + + # The datetime the ad campaign was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An advertising campaign running on an external platform or within Whop. + sig do + params( + id: String, + available_budget: Float, + clicks_count: Integer, + created_at: Time, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + platform: + T.nilable( + WhopSDK::Models::AdCampaignListResponse::Platform::OrSymbol + ), + product: + T.nilable(WhopSDK::Models::AdCampaignListResponse::Product::OrHash), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignListResponse::Status::OrSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + available_budget:, + # Number of clicks + clicks_count:, + # The datetime the ad campaign was created. + created_at:, + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + daily_budget:, + # Number of impressions (views) + impressions_count:, + # If temporarily paused, the timestamp when the campaign will auto-resume + paused_until:, + # The platforms where an ad campaign can run. + platform:, + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + product:, + # Number of purchases + purchases_count:, + # Remaining balance in dollars + remaining_balance:, + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + return_on_ad_spend:, + # Total revenue generated from users who converted through this campaign + revenue:, + # Current status of the campaign (active, paused, or inactive) + status:, + # Array of ISO3166 country codes for territory targeting + target_country_codes:, + # The title of the ad campaign + title:, + # Amount spent today in dollars + todays_spend:, + # Total credits added to the campaign in dollars + total_credits:, + # Total amount spent on conversions in dollars + total_spend:, + # The datetime the ad campaign was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + available_budget: Float, + clicks_count: Integer, + created_at: Time, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + platform: + T.nilable( + WhopSDK::Models::AdCampaignListResponse::Platform::TaggedSymbol + ), + product: + T.nilable(WhopSDK::Models::AdCampaignListResponse::Product), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + ) + end + def to_hash + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignListResponse::Platform) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdCampaignListResponse::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdCampaignListResponse::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignListResponse::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignListResponse::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + sig { returns(String) } + attr_accessor :route + + # The display name of the product shown to customers on the product page and in + # search results. + sig { returns(String) } + attr_accessor :title + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + params(id: String, route: String, title: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the product. + id:, + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + route:, + # The display name of the product shown to customers on the product page and in + # search results. + title: + ) + end + + sig { override.returns({ id: String, route: String, title: String }) } + def to_hash + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignListResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_pause_params.rbi b/rbi/whop_sdk/models/ad_campaign_pause_params.rbi new file mode 100644 index 00000000..bacad19b --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_pause_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignPauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdCampaignPauseParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_pause_response.rbi b/rbi/whop_sdk/models/ad_campaign_pause_response.rbi new file mode 100644 index 00000000..694481aa --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_pause_response.rbi @@ -0,0 +1,1643 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + sig { returns(Float) } + attr_accessor :available_budget + + # The ledger account being charged for platform balance billing (null if using + # card) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount + ) + ) + end + attr_reader :billing_ledger_account + + sig do + params( + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount::OrHash + ) + ).void + end + attr_writer :billing_ledger_account + + # Number of clicks + sig { returns(Integer) } + attr_accessor :clicks_count + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignPauseResponse::Config)) + end + attr_reader :config + + sig do + params( + config: + T.nilable(WhopSDK::Models::AdCampaignPauseResponse::Config::OrHash) + ).void + end + attr_writer :config + + # The datetime the ad campaign was created. + sig { returns(Time) } + attr_accessor :created_at + + # The user who created the campaign + sig { returns(WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser) } + attr_reader :created_by_user + + sig do + params( + created_by_user: + WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser::OrHash + ).void + end + attr_writer :created_by_user + + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Number of impressions (views) + sig { returns(Integer) } + attr_accessor :impressions_count + + # If temporarily paused, the timestamp when the campaign will auto-resume + sig { returns(T.nilable(Time)) } + attr_accessor :paused_until + + # The payment method used for daily billing (null if using platform balance) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::Variants + ) + ) + end + attr_accessor :payment_method + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignPauseResponse::Product)) + end + attr_reader :product + + sig do + params( + product: + T.nilable(WhopSDK::Models::AdCampaignPauseResponse::Product::OrHash) + ).void + end + attr_writer :product + + # Number of purchases + sig { returns(Integer) } + attr_accessor :purchases_count + + # Remaining balance in dollars + sig { returns(Float) } + attr_accessor :remaining_balance + + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + sig { returns(Float) } + attr_accessor :return_on_ad_spend + + # Total revenue generated from users who converted through this campaign + sig { returns(Float) } + attr_accessor :revenue + + # Current status of the campaign (active, paused, or inactive) + sig do + returns(WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # Array of ISO3166 country codes for territory targeting + sig { returns(T::Array[String]) } + attr_accessor :target_country_codes + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # Amount spent today in dollars + sig { returns(Float) } + attr_accessor :todays_spend + + # Total credits added to the campaign in dollars + sig { returns(Float) } + attr_accessor :total_credits + + # Total amount spent on conversions in dollars + sig { returns(Float) } + attr_accessor :total_spend + + # The datetime the ad campaign was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An advertising campaign running on an external platform or within Whop. + sig do + params( + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount::OrHash + ), + clicks_count: Integer, + config: + T.nilable(WhopSDK::Models::AdCampaignPauseResponse::Config::OrHash), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser::OrHash, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod::OrHash, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::OrHash + ) + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Platform::OrSymbol + ), + product: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Product::OrHash + ), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignPauseResponse::Status::OrSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + available_budget:, + # The ledger account being charged for platform balance billing (null if using + # card) + billing_ledger_account:, + # Number of clicks + clicks_count:, + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + config:, + # The datetime the ad campaign was created. + created_at:, + # The user who created the campaign + created_by_user:, + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + daily_budget:, + # Number of impressions (views) + impressions_count:, + # If temporarily paused, the timestamp when the campaign will auto-resume + paused_until:, + # The payment method used for daily billing (null if using platform balance) + payment_method:, + # The platforms where an ad campaign can run. + platform:, + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + product:, + # Number of purchases + purchases_count:, + # Remaining balance in dollars + remaining_balance:, + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + return_on_ad_spend:, + # Total revenue generated from users who converted through this campaign + revenue:, + # Current status of the campaign (active, paused, or inactive) + status:, + # Array of ISO3166 country codes for territory targeting + target_country_codes:, + # The title of the ad campaign + title:, + # Amount spent today in dollars + todays_spend:, + # Total credits added to the campaign in dollars + total_credits:, + # Total amount spent on conversions in dollars + total_spend:, + # The datetime the ad campaign was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount + ), + clicks_count: Integer, + config: T.nilable(WhopSDK::Models::AdCampaignPauseResponse::Config), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::Variants + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Platform::TaggedSymbol + ), + product: + T.nilable(WhopSDK::Models::AdCampaignPauseResponse::Product), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + ) + end + def to_hash + end + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ledger account. + sig { returns(String) } + attr_accessor :id + + # The ledger account being charged for platform balance billing (null if using + # card) + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the ledger account. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # The bidding strategy used to optimize spend for this campaign. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :budget_optimization + + # The scheduled end time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # The campaign objective that determines how Meta optimizes delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::TaggedSymbol + ) + ) + end + attr_accessor :objective + + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :special_categories + + # The scheduled start time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # The campaign status as set by the advertiser (active or paused). + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::Status::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + bid_amount:, + # The bidding strategy used to optimize spend for this campaign. + bid_strategy:, + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + budget_optimization:, + # The scheduled end time of the campaign (ISO8601). + end_time:, + # The campaign objective that determines how Meta optimizes delivery. + objective:, + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + special_categories:, + # The scheduled start time of the campaign (ISO8601). + start_time:, + # The campaign status as set by the advertiser (active or paused). + status: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy::TaggedSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::TaggedSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignPauseResponse::Config::Status::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # The bidding strategy used to optimize spend for this campaign. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignPauseResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign objective that determines how Meta optimizes delivery. + module Objective + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AWARENESS = + T.let( + :awareness, + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::TaggedSymbol + ) + TRAFFIC = + T.let( + :traffic, + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::TaggedSymbol + ) + ENGAGEMENT = + T.let( + :engagement, + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::TaggedSymbol + ) + LEADS = + T.let( + :leads, + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::TaggedSymbol + ) + SALES = + T.let( + :sales, + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignPauseResponse::Config::Objective::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign status as set by the advertiser (active or paused). + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignPauseResponse::Config::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignPauseResponse::Config::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignPauseResponse::Config::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignPauseResponse::Config::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the user. + sig { returns(String) } + attr_accessor :id + + # The user's display name shown on their public profile. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The user's unique username shown on their public profile. + sig { returns(String) } + attr_accessor :username + + # The user who created the campaign + sig do + params(id: String, name: T.nilable(String), username: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the user. + id:, + # The user's display name shown on their public profile. + name:, + # The user's unique username shown on their public profile. + username: + ) + end + + sig do + override.returns( + { id: String, name: T.nilable(String), username: String } + ) + end + def to_hash + end + end + + # The payment method used for daily billing (null if using platform balance) + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod + ) + ) + end + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved payment method with no type-specific details available. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :BasePaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + returns( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card + ) + end + attr_reader :card + + sig do + params( + card: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card::OrHash + ).void + end + attr_writer :card + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved card payment method, including brand, last four digits, and expiration + # details. + sig do + params( + id: String, + card: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + card:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CardPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + card: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Card < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card, + WhopSDK::Internal::AnyHash + ) + end + + # Possible card brands that a payment token can have + sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) } + attr_accessor :brand + + # The two-digit expiration month of the card (1-12). Null if not available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_month + + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_year + + # The last four digits of the card number. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + params( + brand: T.nilable(WhopSDK::CardBrands::OrSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Possible card brands that a payment token can have + brand:, + # The two-digit expiration month of the card (1-12). Null if not available. + exp_month:, + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + exp_year:, + # The last four digits of the card number. Null if not available. + last4: + ) + end + + sig do + override.returns( + { + brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + returns( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + ) + end + attr_reader :us_bank_account + + sig do + params( + us_bank_account: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash + ).void + end + attr_writer :us_bank_account + + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + us_bank_account: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The bank account-specific details for this payment method, including bank name + # and last four digits. + us_bank_account:, + # The typename of this object + typename: :UsBankAccountPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol, + us_bank_account: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + ) + end + def to_hash + end + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The type of bank account (e.g., checking, savings). + sig { returns(String) } + attr_accessor :account_type + + # The name of the financial institution holding the account. + sig { returns(String) } + attr_accessor :bank_name + + # The last four digits of the bank account number. + sig { returns(String) } + attr_accessor :last4 + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + params( + account_type: String, + bank_name: String, + last4: String + ).returns(T.attached_class) + end + def self.new( + # The type of bank account (e.g., checking, savings). + account_type:, + # The name of the financial institution holding the account. + bank_name:, + # The last four digits of the bank account number. + last4: + ) + end + + sig do + override.returns( + { account_type: String, bank_name: String, last4: String } + ) + end + def to_hash + end + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + returns( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp + ) + end + attr_reader :cashapp + + sig do + params( + cashapp: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash + ).void + end + attr_writer :cashapp + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + sig do + params( + id: String, + cashapp: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + cashapp:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CashappPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + cashapp: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Cashapp < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + WhopSDK::Internal::AnyHash + ) + end + + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + sig { returns(T.nilable(String)) } + attr_accessor :buyer_id + + # The public cashtag handle of the buyer on Cash App. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :cashtag + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + params( + buyer_id: T.nilable(String), + cashtag: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + buyer_id:, + # The public cashtag handle of the buyer on Cash App. Null if not available. + cashtag: + ) + end + + sig do + override.returns( + { buyer_id: T.nilable(String), cashtag: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + returns( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal + ) + end + attr_reader :ideal + + sig do + params( + ideal: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash + ).void + end + attr_writer :ideal + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + sig do + params( + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The iDEAL-specific details for this payment method, including bank name and BIC. + ideal:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :IdealPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Ideal < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + WhopSDK::Internal::AnyHash + ) + end + + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bank + + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bic + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + params(bank: T.nilable(String), bic: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + bank:, + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + bic: + ) + end + + sig do + override.returns( + { bank: T.nilable(String), bic: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + returns( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + ) + end + attr_reader :sepa_debit + + sig do + params( + sepa_debit: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash + ).void + end + attr_writer :sepa_debit + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sepa_debit:, + # The typename of this object + typename: :SepaDebitPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: Symbol + } + ) + end + def to_hash + end + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + WhopSDK::Internal::AnyHash + ) + end + + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :bank_code + + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :branch_code + + # The two-letter ISO country code where the bank account is located. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + params( + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + bank_code:, + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + branch_code:, + # The two-letter ISO country code where the bank account is located. Null if not + # available. + country:, + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + last4: + ) + end + + sig do + override.returns( + { + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::Variants + ] + ) + end + def self.variants + end + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignPauseResponse::Platform) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdCampaignPauseResponse::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdCampaignPauseResponse::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignPauseResponse::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignPauseResponse::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + sig { returns(String) } + attr_accessor :route + + # The display name of the product shown to customers on the product page and in + # search results. + sig { returns(String) } + attr_accessor :title + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + params(id: String, route: String, title: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the product. + id:, + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + route:, + # The display name of the product shown to customers on the product page and in + # search results. + title: + ) + end + + sig { override.returns({ id: String, route: String, title: String }) } + def to_hash + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignPauseResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_retrieve_params.rbi b/rbi/whop_sdk/models/ad_campaign_retrieve_params.rbi new file mode 100644 index 00000000..6afe2710 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_retrieve_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdCampaignRetrieveParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_retrieve_response.rbi b/rbi/whop_sdk/models/ad_campaign_retrieve_response.rbi new file mode 100644 index 00000000..cdd92d46 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_retrieve_response.rbi @@ -0,0 +1,1654 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignRetrieveResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + sig { returns(Float) } + attr_accessor :available_budget + + # The ledger account being charged for platform balance billing (null if using + # card) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount + ) + ) + end + attr_reader :billing_ledger_account + + sig do + params( + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount::OrHash + ) + ).void + end + attr_writer :billing_ledger_account + + # Number of clicks + sig { returns(Integer) } + attr_accessor :clicks_count + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignRetrieveResponse::Config)) + end + attr_reader :config + + sig do + params( + config: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::OrHash + ) + ).void + end + attr_writer :config + + # The datetime the ad campaign was created. + sig { returns(Time) } + attr_accessor :created_at + + # The user who created the campaign + sig do + returns(WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser) + end + attr_reader :created_by_user + + sig do + params( + created_by_user: + WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser::OrHash + ).void + end + attr_writer :created_by_user + + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Number of impressions (views) + sig { returns(Integer) } + attr_accessor :impressions_count + + # If temporarily paused, the timestamp when the campaign will auto-resume + sig { returns(T.nilable(Time)) } + attr_accessor :paused_until + + # The payment method used for daily billing (null if using platform balance) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::Variants + ) + ) + end + attr_accessor :payment_method + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignRetrieveResponse::Product)) + end + attr_reader :product + + sig do + params( + product: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Product::OrHash + ) + ).void + end + attr_writer :product + + # Number of purchases + sig { returns(Integer) } + attr_accessor :purchases_count + + # Remaining balance in dollars + sig { returns(Float) } + attr_accessor :remaining_balance + + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + sig { returns(Float) } + attr_accessor :return_on_ad_spend + + # Total revenue generated from users who converted through this campaign + sig { returns(Float) } + attr_accessor :revenue + + # Current status of the campaign (active, paused, or inactive) + sig do + returns( + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + end + attr_accessor :status + + # Array of ISO3166 country codes for territory targeting + sig { returns(T::Array[String]) } + attr_accessor :target_country_codes + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # Amount spent today in dollars + sig { returns(Float) } + attr_accessor :todays_spend + + # Total credits added to the campaign in dollars + sig { returns(Float) } + attr_accessor :total_credits + + # Total amount spent on conversions in dollars + sig { returns(Float) } + attr_accessor :total_spend + + # The datetime the ad campaign was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An advertising campaign running on an external platform or within Whop. + sig do + params( + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount::OrHash + ), + clicks_count: Integer, + config: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::OrHash + ), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser::OrHash, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod::OrHash, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::OrHash + ) + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Platform::OrSymbol + ), + product: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Product::OrHash + ), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignRetrieveResponse::Status::OrSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + available_budget:, + # The ledger account being charged for platform balance billing (null if using + # card) + billing_ledger_account:, + # Number of clicks + clicks_count:, + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + config:, + # The datetime the ad campaign was created. + created_at:, + # The user who created the campaign + created_by_user:, + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + daily_budget:, + # Number of impressions (views) + impressions_count:, + # If temporarily paused, the timestamp when the campaign will auto-resume + paused_until:, + # The payment method used for daily billing (null if using platform balance) + payment_method:, + # The platforms where an ad campaign can run. + platform:, + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + product:, + # Number of purchases + purchases_count:, + # Remaining balance in dollars + remaining_balance:, + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + return_on_ad_spend:, + # Total revenue generated from users who converted through this campaign + revenue:, + # Current status of the campaign (active, paused, or inactive) + status:, + # Array of ISO3166 country codes for territory targeting + target_country_codes:, + # The title of the ad campaign + title:, + # Amount spent today in dollars + todays_spend:, + # Total credits added to the campaign in dollars + total_credits:, + # Total amount spent on conversions in dollars + total_spend:, + # The datetime the ad campaign was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount + ), + clicks_count: Integer, + config: + T.nilable(WhopSDK::Models::AdCampaignRetrieveResponse::Config), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::Variants + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Platform::TaggedSymbol + ), + product: + T.nilable(WhopSDK::Models::AdCampaignRetrieveResponse::Product), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + ) + end + def to_hash + end + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ledger account. + sig { returns(String) } + attr_accessor :id + + # The ledger account being charged for platform balance billing (null if using + # card) + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the ledger account. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # The bidding strategy used to optimize spend for this campaign. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :budget_optimization + + # The scheduled end time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # The campaign objective that determines how Meta optimizes delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::TaggedSymbol + ) + ) + end + attr_accessor :objective + + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :special_categories + + # The scheduled start time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # The campaign status as set by the advertiser (active or paused). + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + bid_amount:, + # The bidding strategy used to optimize spend for this campaign. + bid_strategy:, + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + budget_optimization:, + # The scheduled end time of the campaign (ISO8601). + end_time:, + # The campaign objective that determines how Meta optimizes delivery. + objective:, + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + special_categories:, + # The scheduled start time of the campaign (ISO8601). + start_time:, + # The campaign status as set by the advertiser (active or paused). + status: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy::TaggedSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::TaggedSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # The bidding strategy used to optimize spend for this campaign. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignRetrieveResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign objective that determines how Meta optimizes delivery. + module Objective + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AWARENESS = + T.let( + :awareness, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::TaggedSymbol + ) + TRAFFIC = + T.let( + :traffic, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::TaggedSymbol + ) + ENGAGEMENT = + T.let( + :engagement, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::TaggedSymbol + ) + LEADS = + T.let( + :leads, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::TaggedSymbol + ) + SALES = + T.let( + :sales, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Objective::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign status as set by the advertiser (active or paused). + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignRetrieveResponse::Config::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the user. + sig { returns(String) } + attr_accessor :id + + # The user's display name shown on their public profile. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The user's unique username shown on their public profile. + sig { returns(String) } + attr_accessor :username + + # The user who created the campaign + sig do + params(id: String, name: T.nilable(String), username: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the user. + id:, + # The user's display name shown on their public profile. + name:, + # The user's unique username shown on their public profile. + username: + ) + end + + sig do + override.returns( + { id: String, name: T.nilable(String), username: String } + ) + end + def to_hash + end + end + + # The payment method used for daily billing (null if using platform balance) + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod + ) + ) + end + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved payment method with no type-specific details available. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :BasePaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + returns( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card + ) + end + attr_reader :card + + sig do + params( + card: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card::OrHash + ).void + end + attr_writer :card + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved card payment method, including brand, last four digits, and expiration + # details. + sig do + params( + id: String, + card: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + card:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CardPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + card: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Card < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card, + WhopSDK::Internal::AnyHash + ) + end + + # Possible card brands that a payment token can have + sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) } + attr_accessor :brand + + # The two-digit expiration month of the card (1-12). Null if not available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_month + + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_year + + # The last four digits of the card number. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + params( + brand: T.nilable(WhopSDK::CardBrands::OrSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Possible card brands that a payment token can have + brand:, + # The two-digit expiration month of the card (1-12). Null if not available. + exp_month:, + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + exp_year:, + # The last four digits of the card number. Null if not available. + last4: + ) + end + + sig do + override.returns( + { + brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + returns( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + ) + end + attr_reader :us_bank_account + + sig do + params( + us_bank_account: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash + ).void + end + attr_writer :us_bank_account + + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + us_bank_account: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The bank account-specific details for this payment method, including bank name + # and last four digits. + us_bank_account:, + # The typename of this object + typename: :UsBankAccountPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol, + us_bank_account: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + ) + end + def to_hash + end + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The type of bank account (e.g., checking, savings). + sig { returns(String) } + attr_accessor :account_type + + # The name of the financial institution holding the account. + sig { returns(String) } + attr_accessor :bank_name + + # The last four digits of the bank account number. + sig { returns(String) } + attr_accessor :last4 + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + params( + account_type: String, + bank_name: String, + last4: String + ).returns(T.attached_class) + end + def self.new( + # The type of bank account (e.g., checking, savings). + account_type:, + # The name of the financial institution holding the account. + bank_name:, + # The last four digits of the bank account number. + last4: + ) + end + + sig do + override.returns( + { account_type: String, bank_name: String, last4: String } + ) + end + def to_hash + end + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + returns( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp + ) + end + attr_reader :cashapp + + sig do + params( + cashapp: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash + ).void + end + attr_writer :cashapp + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + sig do + params( + id: String, + cashapp: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + cashapp:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CashappPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + cashapp: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Cashapp < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + WhopSDK::Internal::AnyHash + ) + end + + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + sig { returns(T.nilable(String)) } + attr_accessor :buyer_id + + # The public cashtag handle of the buyer on Cash App. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :cashtag + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + params( + buyer_id: T.nilable(String), + cashtag: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + buyer_id:, + # The public cashtag handle of the buyer on Cash App. Null if not available. + cashtag: + ) + end + + sig do + override.returns( + { buyer_id: T.nilable(String), cashtag: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + returns( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal + ) + end + attr_reader :ideal + + sig do + params( + ideal: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash + ).void + end + attr_writer :ideal + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + sig do + params( + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The iDEAL-specific details for this payment method, including bank name and BIC. + ideal:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :IdealPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Ideal < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal, + WhopSDK::Internal::AnyHash + ) + end + + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bank + + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bic + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + params(bank: T.nilable(String), bic: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + bank:, + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + bic: + ) + end + + sig do + override.returns( + { bank: T.nilable(String), bic: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + returns( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + ) + end + attr_reader :sepa_debit + + sig do + params( + sepa_debit: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash + ).void + end + attr_writer :sepa_debit + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sepa_debit:, + # The typename of this object + typename: :SepaDebitPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: Symbol + } + ) + end + def to_hash + end + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + WhopSDK::Internal::AnyHash + ) + end + + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :bank_code + + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :branch_code + + # The two-letter ISO country code where the bank account is located. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + params( + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + bank_code:, + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + branch_code:, + # The two-letter ISO country code where the bank account is located. Null if not + # available. + country:, + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + last4: + ) + end + + sig do + override.returns( + { + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::Variants + ] + ) + end + def self.variants + end + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Platform) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdCampaignRetrieveResponse::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdCampaignRetrieveResponse::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignRetrieveResponse::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignRetrieveResponse::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + sig { returns(String) } + attr_accessor :route + + # The display name of the product shown to customers on the product page and in + # search results. + sig { returns(String) } + attr_accessor :title + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + params(id: String, route: String, title: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the product. + id:, + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + route:, + # The display name of the product shown to customers on the product page and in + # search results. + title: + ) + end + + sig { override.returns({ id: String, route: String, title: String }) } + def to_hash + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_unpause_params.rbi b/rbi/whop_sdk/models/ad_campaign_unpause_params.rbi new file mode 100644 index 00000000..236d8907 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_unpause_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignUnpauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdCampaignUnpauseParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_unpause_response.rbi b/rbi/whop_sdk/models/ad_campaign_unpause_response.rbi new file mode 100644 index 00000000..9f8fcdb6 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_unpause_response.rbi @@ -0,0 +1,1652 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignUnpauseResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + sig { returns(Float) } + attr_accessor :available_budget + + # The ledger account being charged for platform balance billing (null if using + # card) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount + ) + ) + end + attr_reader :billing_ledger_account + + sig do + params( + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount::OrHash + ) + ).void + end + attr_writer :billing_ledger_account + + # Number of clicks + sig { returns(Integer) } + attr_accessor :clicks_count + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignUnpauseResponse::Config)) + end + attr_reader :config + + sig do + params( + config: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::OrHash + ) + ).void + end + attr_writer :config + + # The datetime the ad campaign was created. + sig { returns(Time) } + attr_accessor :created_at + + # The user who created the campaign + sig { returns(WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser) } + attr_reader :created_by_user + + sig do + params( + created_by_user: + WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser::OrHash + ).void + end + attr_writer :created_by_user + + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Number of impressions (views) + sig { returns(Integer) } + attr_accessor :impressions_count + + # If temporarily paused, the timestamp when the campaign will auto-resume + sig { returns(T.nilable(Time)) } + attr_accessor :paused_until + + # The payment method used for daily billing (null if using platform balance) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::Variants + ) + ) + end + attr_accessor :payment_method + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignUnpauseResponse::Product)) + end + attr_reader :product + + sig do + params( + product: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Product::OrHash + ) + ).void + end + attr_writer :product + + # Number of purchases + sig { returns(Integer) } + attr_accessor :purchases_count + + # Remaining balance in dollars + sig { returns(Float) } + attr_accessor :remaining_balance + + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + sig { returns(Float) } + attr_accessor :return_on_ad_spend + + # Total revenue generated from users who converted through this campaign + sig { returns(Float) } + attr_accessor :revenue + + # Current status of the campaign (active, paused, or inactive) + sig do + returns( + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + end + attr_accessor :status + + # Array of ISO3166 country codes for territory targeting + sig { returns(T::Array[String]) } + attr_accessor :target_country_codes + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # Amount spent today in dollars + sig { returns(Float) } + attr_accessor :todays_spend + + # Total credits added to the campaign in dollars + sig { returns(Float) } + attr_accessor :total_credits + + # Total amount spent on conversions in dollars + sig { returns(Float) } + attr_accessor :total_spend + + # The datetime the ad campaign was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An advertising campaign running on an external platform or within Whop. + sig do + params( + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount::OrHash + ), + clicks_count: Integer, + config: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::OrHash + ), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser::OrHash, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::OrHash + ) + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Platform::OrSymbol + ), + product: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Product::OrHash + ), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUnpauseResponse::Status::OrSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + available_budget:, + # The ledger account being charged for platform balance billing (null if using + # card) + billing_ledger_account:, + # Number of clicks + clicks_count:, + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + config:, + # The datetime the ad campaign was created. + created_at:, + # The user who created the campaign + created_by_user:, + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + daily_budget:, + # Number of impressions (views) + impressions_count:, + # If temporarily paused, the timestamp when the campaign will auto-resume + paused_until:, + # The payment method used for daily billing (null if using platform balance) + payment_method:, + # The platforms where an ad campaign can run. + platform:, + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + product:, + # Number of purchases + purchases_count:, + # Remaining balance in dollars + remaining_balance:, + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + return_on_ad_spend:, + # Total revenue generated from users who converted through this campaign + revenue:, + # Current status of the campaign (active, paused, or inactive) + status:, + # Array of ISO3166 country codes for territory targeting + target_country_codes:, + # The title of the ad campaign + title:, + # Amount spent today in dollars + todays_spend:, + # Total credits added to the campaign in dollars + total_credits:, + # Total amount spent on conversions in dollars + total_spend:, + # The datetime the ad campaign was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount + ), + clicks_count: Integer, + config: + T.nilable(WhopSDK::Models::AdCampaignUnpauseResponse::Config), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::Variants + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Platform::TaggedSymbol + ), + product: + T.nilable(WhopSDK::Models::AdCampaignUnpauseResponse::Product), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + ) + end + def to_hash + end + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ledger account. + sig { returns(String) } + attr_accessor :id + + # The ledger account being charged for platform balance billing (null if using + # card) + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the ledger account. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # The bidding strategy used to optimize spend for this campaign. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :budget_optimization + + # The scheduled end time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # The campaign objective that determines how Meta optimizes delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::TaggedSymbol + ) + ) + end + attr_accessor :objective + + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :special_categories + + # The scheduled start time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # The campaign status as set by the advertiser (active or paused). + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + bid_amount:, + # The bidding strategy used to optimize spend for this campaign. + bid_strategy:, + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + budget_optimization:, + # The scheduled end time of the campaign (ISO8601). + end_time:, + # The campaign objective that determines how Meta optimizes delivery. + objective:, + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + special_categories:, + # The scheduled start time of the campaign (ISO8601). + start_time:, + # The campaign status as set by the advertiser (active or paused). + status: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy::TaggedSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::TaggedSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # The bidding strategy used to optimize spend for this campaign. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUnpauseResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign objective that determines how Meta optimizes delivery. + module Objective + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AWARENESS = + T.let( + :awareness, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::TaggedSymbol + ) + TRAFFIC = + T.let( + :traffic, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::TaggedSymbol + ) + ENGAGEMENT = + T.let( + :engagement, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::TaggedSymbol + ) + LEADS = + T.let( + :leads, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::TaggedSymbol + ) + SALES = + T.let( + :sales, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Objective::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign status as set by the advertiser (active or paused). + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUnpauseResponse::Config::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the user. + sig { returns(String) } + attr_accessor :id + + # The user's display name shown on their public profile. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The user's unique username shown on their public profile. + sig { returns(String) } + attr_accessor :username + + # The user who created the campaign + sig do + params(id: String, name: T.nilable(String), username: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the user. + id:, + # The user's display name shown on their public profile. + name:, + # The user's unique username shown on their public profile. + username: + ) + end + + sig do + override.returns( + { id: String, name: T.nilable(String), username: String } + ) + end + def to_hash + end + end + + # The payment method used for daily billing (null if using platform balance) + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod + ) + ) + end + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved payment method with no type-specific details available. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :BasePaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + returns( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card + ) + end + attr_reader :card + + sig do + params( + card: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card::OrHash + ).void + end + attr_writer :card + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved card payment method, including brand, last four digits, and expiration + # details. + sig do + params( + id: String, + card: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + card:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CardPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + card: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Card < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card, + WhopSDK::Internal::AnyHash + ) + end + + # Possible card brands that a payment token can have + sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) } + attr_accessor :brand + + # The two-digit expiration month of the card (1-12). Null if not available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_month + + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_year + + # The last four digits of the card number. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + params( + brand: T.nilable(WhopSDK::CardBrands::OrSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Possible card brands that a payment token can have + brand:, + # The two-digit expiration month of the card (1-12). Null if not available. + exp_month:, + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + exp_year:, + # The last four digits of the card number. Null if not available. + last4: + ) + end + + sig do + override.returns( + { + brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + returns( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + ) + end + attr_reader :us_bank_account + + sig do + params( + us_bank_account: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash + ).void + end + attr_writer :us_bank_account + + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + us_bank_account: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The bank account-specific details for this payment method, including bank name + # and last four digits. + us_bank_account:, + # The typename of this object + typename: :UsBankAccountPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol, + us_bank_account: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + ) + end + def to_hash + end + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The type of bank account (e.g., checking, savings). + sig { returns(String) } + attr_accessor :account_type + + # The name of the financial institution holding the account. + sig { returns(String) } + attr_accessor :bank_name + + # The last four digits of the bank account number. + sig { returns(String) } + attr_accessor :last4 + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + params( + account_type: String, + bank_name: String, + last4: String + ).returns(T.attached_class) + end + def self.new( + # The type of bank account (e.g., checking, savings). + account_type:, + # The name of the financial institution holding the account. + bank_name:, + # The last four digits of the bank account number. + last4: + ) + end + + sig do + override.returns( + { account_type: String, bank_name: String, last4: String } + ) + end + def to_hash + end + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + returns( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp + ) + end + attr_reader :cashapp + + sig do + params( + cashapp: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash + ).void + end + attr_writer :cashapp + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + sig do + params( + id: String, + cashapp: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + cashapp:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CashappPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + cashapp: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Cashapp < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + WhopSDK::Internal::AnyHash + ) + end + + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + sig { returns(T.nilable(String)) } + attr_accessor :buyer_id + + # The public cashtag handle of the buyer on Cash App. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :cashtag + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + params( + buyer_id: T.nilable(String), + cashtag: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + buyer_id:, + # The public cashtag handle of the buyer on Cash App. Null if not available. + cashtag: + ) + end + + sig do + override.returns( + { buyer_id: T.nilable(String), cashtag: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + returns( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal + ) + end + attr_reader :ideal + + sig do + params( + ideal: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash + ).void + end + attr_writer :ideal + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + sig do + params( + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The iDEAL-specific details for this payment method, including bank name and BIC. + ideal:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :IdealPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Ideal < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + WhopSDK::Internal::AnyHash + ) + end + + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bank + + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bic + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + params(bank: T.nilable(String), bic: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + bank:, + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + bic: + ) + end + + sig do + override.returns( + { bank: T.nilable(String), bic: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + returns( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + ) + end + attr_reader :sepa_debit + + sig do + params( + sepa_debit: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash + ).void + end + attr_writer :sepa_debit + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sepa_debit:, + # The typename of this object + typename: :SepaDebitPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: Symbol + } + ) + end + def to_hash + end + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + WhopSDK::Internal::AnyHash + ) + end + + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :bank_code + + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :branch_code + + # The two-letter ISO country code where the bank account is located. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + params( + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + bank_code:, + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + branch_code:, + # The two-letter ISO country code where the bank account is located. Null if not + # available. + country:, + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + last4: + ) + end + + sig do + override.returns( + { + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::Variants + ] + ) + end + def self.variants + end + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Platform) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdCampaignUnpauseResponse::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdCampaignUnpauseResponse::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUnpauseResponse::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUnpauseResponse::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + sig { returns(String) } + attr_accessor :route + + # The display name of the product shown to customers on the product page and in + # search results. + sig { returns(String) } + attr_accessor :title + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + params(id: String, route: String, title: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the product. + id:, + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + route:, + # The display name of the product shown to customers on the product page and in + # search results. + title: + ) + end + + sig { override.returns({ id: String, route: String, title: String }) } + def to_hash + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_update_params.rbi b/rbi/whop_sdk/models/ad_campaign_update_params.rbi new file mode 100644 index 00000000..b424ee50 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_update_params.rbi @@ -0,0 +1,407 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdCampaignUpdateParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + # Array of creative set IDs to link to this campaign. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :ad_creative_set_ids + + # Budget amount in dollars. + sig { returns(T.nilable(Float)) } + attr_accessor :budget + + # The budget type for an ad campaign or ad group. + sig do + returns( + T.nilable(WhopSDK::AdCampaignUpdateParams::BudgetType::OrSymbol) + ) + end + attr_accessor :budget_type + + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + sig { returns(T.nilable(WhopSDK::AdCampaignUpdateParams::Config)) } + attr_reader :config + + sig do + params( + config: T.nilable(WhopSDK::AdCampaignUpdateParams::Config::OrHash) + ).void + end + attr_writer :config + + # Daily budget in dollars (minimum $5). + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # The unique identifier of the product (access pass) to promote. + sig { returns(T.nilable(String)) } + attr_accessor :product_id + + # Array of ISO3166 country codes for territory targeting. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :target_country_codes + + # The title of the ad campaign. Must be max 100 characters. + sig { returns(T.nilable(String)) } + attr_accessor :title + + sig do + params( + id: String, + ad_creative_set_ids: T.nilable(T::Array[String]), + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdCampaignUpdateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdCampaignUpdateParams::Config::OrHash), + daily_budget: T.nilable(Float), + product_id: T.nilable(String), + target_country_codes: T.nilable(T::Array[String]), + title: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # Array of creative set IDs to link to this campaign. + ad_creative_set_ids: nil, + # Budget amount in dollars. + budget: nil, + # The budget type for an ad campaign or ad group. + budget_type: nil, + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + config: nil, + # Daily budget in dollars (minimum $5). + daily_budget: nil, + # The unique identifier of the product (access pass) to promote. + product_id: nil, + # Array of ISO3166 country codes for territory targeting. + target_country_codes: nil, + # The title of the ad campaign. Must be max 100 characters. + title: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + ad_creative_set_ids: T.nilable(T::Array[String]), + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdCampaignUpdateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdCampaignUpdateParams::Config), + daily_budget: T.nilable(Float), + product_id: T.nilable(String), + target_country_codes: T.nilable(T::Array[String]), + title: T.nilable(String), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # The budget type for an ad campaign or ad group. + module BudgetType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdCampaignUpdateParams::BudgetType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DAILY = + T.let( + :daily, + WhopSDK::AdCampaignUpdateParams::BudgetType::TaggedSymbol + ) + LIFETIME = + T.let( + :lifetime, + WhopSDK::AdCampaignUpdateParams::BudgetType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::AdCampaignUpdateParams::BudgetType::TaggedSymbol] + ) + end + def self.values + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdCampaignUpdateParams::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # The bidding strategy used to optimize spend for this campaign. + sig do + returns( + T.nilable( + WhopSDK::AdCampaignUpdateParams::Config::BidStrategy::OrSymbol + ) + ) + end + attr_accessor :bid_strategy + + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :budget_optimization + + # The scheduled end time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :lifetime_budget + + # The campaign objective that determines how Meta optimizes delivery. + sig do + returns( + T.nilable( + WhopSDK::AdCampaignUpdateParams::Config::Objective::OrSymbol + ) + ) + end + attr_accessor :objective + + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :special_categories + + # The scheduled start time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # The campaign status as set by the advertiser (active or paused). + sig do + returns( + T.nilable(WhopSDK::AdCampaignUpdateParams::Config::Status::OrSymbol) + ) + end + attr_accessor :status + + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdCampaignUpdateParams::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + lifetime_budget: T.nilable(Integer), + objective: + T.nilable( + WhopSDK::AdCampaignUpdateParams::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::AdCampaignUpdateParams::Config::Status::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + bid_amount: nil, + # The bidding strategy used to optimize spend for this campaign. + bid_strategy: nil, + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + budget_optimization: nil, + # The scheduled end time of the campaign (ISO8601). + end_time: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + lifetime_budget: nil, + # The campaign objective that determines how Meta optimizes delivery. + objective: nil, + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + special_categories: nil, + # The scheduled start time of the campaign (ISO8601). + start_time: nil, + # The campaign status as set by the advertiser (active or paused). + status: nil + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdCampaignUpdateParams::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + lifetime_budget: T.nilable(Integer), + objective: + T.nilable( + WhopSDK::AdCampaignUpdateParams::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::AdCampaignUpdateParams::Config::Status::OrSymbol + ) + } + ) + end + def to_hash + end + + # The bidding strategy used to optimize spend for this campaign. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCampaignUpdateParams::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::AdCampaignUpdateParams::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::AdCampaignUpdateParams::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::AdCampaignUpdateParams::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCampaignUpdateParams::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign objective that determines how Meta optimizes delivery. + module Objective + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdCampaignUpdateParams::Config::Objective) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AWARENESS = + T.let( + :awareness, + WhopSDK::AdCampaignUpdateParams::Config::Objective::TaggedSymbol + ) + TRAFFIC = + T.let( + :traffic, + WhopSDK::AdCampaignUpdateParams::Config::Objective::TaggedSymbol + ) + ENGAGEMENT = + T.let( + :engagement, + WhopSDK::AdCampaignUpdateParams::Config::Objective::TaggedSymbol + ) + LEADS = + T.let( + :leads, + WhopSDK::AdCampaignUpdateParams::Config::Objective::TaggedSymbol + ) + SALES = + T.let( + :sales, + WhopSDK::AdCampaignUpdateParams::Config::Objective::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCampaignUpdateParams::Config::Objective::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign status as set by the advertiser (active or paused). + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdCampaignUpdateParams::Config::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::AdCampaignUpdateParams::Config::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::AdCampaignUpdateParams::Config::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCampaignUpdateParams::Config::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_update_response.rbi b/rbi/whop_sdk/models/ad_campaign_update_response.rbi new file mode 100644 index 00000000..1f6d5a05 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_update_response.rbi @@ -0,0 +1,1648 @@ +# typed: strong + +module WhopSDK + module Models + class AdCampaignUpdateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + sig { returns(Float) } + attr_accessor :available_budget + + # The ledger account being charged for platform balance billing (null if using + # card) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount + ) + ) + end + attr_reader :billing_ledger_account + + sig do + params( + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount::OrHash + ) + ).void + end + attr_writer :billing_ledger_account + + # Number of clicks + sig { returns(Integer) } + attr_accessor :clicks_count + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignUpdateResponse::Config)) + end + attr_reader :config + + sig do + params( + config: + T.nilable(WhopSDK::Models::AdCampaignUpdateResponse::Config::OrHash) + ).void + end + attr_writer :config + + # The datetime the ad campaign was created. + sig { returns(Time) } + attr_accessor :created_at + + # The user who created the campaign + sig { returns(WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser) } + attr_reader :created_by_user + + sig do + params( + created_by_user: + WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser::OrHash + ).void + end + attr_writer :created_by_user + + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Number of impressions (views) + sig { returns(Integer) } + attr_accessor :impressions_count + + # If temporarily paused, the timestamp when the campaign will auto-resume + sig { returns(T.nilable(Time)) } + attr_accessor :paused_until + + # The payment method used for daily billing (null if using platform balance) + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::Variants + ) + ) + end + attr_accessor :payment_method + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + returns(T.nilable(WhopSDK::Models::AdCampaignUpdateResponse::Product)) + end + attr_reader :product + + sig do + params( + product: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Product::OrHash + ) + ).void + end + attr_writer :product + + # Number of purchases + sig { returns(Integer) } + attr_accessor :purchases_count + + # Remaining balance in dollars + sig { returns(Float) } + attr_accessor :remaining_balance + + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + sig { returns(Float) } + attr_accessor :return_on_ad_spend + + # Total revenue generated from users who converted through this campaign + sig { returns(Float) } + attr_accessor :revenue + + # Current status of the campaign (active, paused, or inactive) + sig do + returns(WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # Array of ISO3166 country codes for territory targeting + sig { returns(T::Array[String]) } + attr_accessor :target_country_codes + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # Amount spent today in dollars + sig { returns(Float) } + attr_accessor :todays_spend + + # Total credits added to the campaign in dollars + sig { returns(Float) } + attr_accessor :total_credits + + # Total amount spent on conversions in dollars + sig { returns(Float) } + attr_accessor :total_spend + + # The datetime the ad campaign was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An advertising campaign running on an external platform or within Whop. + sig do + params( + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount::OrHash + ), + clicks_count: Integer, + config: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::OrHash + ), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser::OrHash, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::OrHash, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::OrHash + ) + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Platform::OrSymbol + ), + product: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Product::OrHash + ), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUpdateResponse::Status::OrSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # Available budget in dollars, capped at daily budget minus today's spend for + # daily campaigns + available_budget:, + # The ledger account being charged for platform balance billing (null if using + # card) + billing_ledger_account:, + # Number of clicks + clicks_count:, + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + config:, + # The datetime the ad campaign was created. + created_at:, + # The user who created the campaign + created_by_user:, + # Effective daily budget in dollars — sum of ad group budgets when set, otherwise + # campaign-level daily budget + daily_budget:, + # Number of impressions (views) + impressions_count:, + # If temporarily paused, the timestamp when the campaign will auto-resume + paused_until:, + # The payment method used for daily billing (null if using platform balance) + payment_method:, + # The platforms where an ad campaign can run. + platform:, + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + product:, + # Number of purchases + purchases_count:, + # Remaining balance in dollars + remaining_balance:, + # Return on Ad Spend (ROAS) percentage - revenue generated divided by ad spend + return_on_ad_spend:, + # Total revenue generated from users who converted through this campaign + revenue:, + # Current status of the campaign (active, paused, or inactive) + status:, + # Array of ISO3166 country codes for territory targeting + target_country_codes:, + # The title of the ad campaign + title:, + # Amount spent today in dollars + todays_spend:, + # Total credits added to the campaign in dollars + total_credits:, + # Total amount spent on conversions in dollars + total_spend:, + # The datetime the ad campaign was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + available_budget: Float, + billing_ledger_account: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount + ), + clicks_count: Integer, + config: + T.nilable(WhopSDK::Models::AdCampaignUpdateResponse::Config), + created_at: Time, + created_by_user: + WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, + daily_budget: T.nilable(Float), + impressions_count: Integer, + paused_until: T.nilable(Time), + payment_method: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::Variants + ), + platform: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Platform::TaggedSymbol + ), + product: + T.nilable(WhopSDK::Models::AdCampaignUpdateResponse::Product), + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol, + target_country_codes: T::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + ) + end + def to_hash + end + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ledger account. + sig { returns(String) } + attr_accessor :id + + # The ledger account being charged for platform balance billing (null if using + # card) + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the ledger account. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # The bidding strategy used to optimize spend for this campaign. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :budget_optimization + + # The scheduled end time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # The campaign objective that determines how Meta optimizes delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::TaggedSymbol + ) + ) + end + attr_accessor :objective + + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :special_categories + + # The scheduled start time of the campaign (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # The campaign status as set by the advertiser (active or paused). + sig do + returns( + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Meta campaign configuration (objective, budget, bidding, etc.). Null for + # non-Meta campaigns — use `tiktokConfig` for TikTok. + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy::OrSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::OrSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::Status::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Only used when bid_strategy is bid_cap. + bid_amount:, + # The bidding strategy used to optimize spend for this campaign. + bid_strategy:, + # Whether campaign budget optimization (CBO) is enabled, allowing the platform to + # distribute budget across ad groups. + budget_optimization:, + # The scheduled end time of the campaign (ISO8601). + end_time:, + # The campaign objective that determines how Meta optimizes delivery. + objective:, + # Special ad categories required by the platform (e.g., housing, employment, + # credit). + special_categories:, + # The scheduled start time of the campaign (ISO8601). + start_time:, + # The campaign status as set by the advertiser (active or paused). + status: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy::TaggedSymbol + ), + budget_optimization: T.nilable(T::Boolean), + end_time: T.nilable(String), + objective: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::TaggedSymbol + ), + special_categories: T.nilable(T::Array[String]), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::Models::AdCampaignUpdateResponse::Config::Status::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # The bidding strategy used to optimize spend for this campaign. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUpdateResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign objective that determines how Meta optimizes delivery. + module Objective + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AWARENESS = + T.let( + :awareness, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::TaggedSymbol + ) + TRAFFIC = + T.let( + :traffic, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::TaggedSymbol + ) + ENGAGEMENT = + T.let( + :engagement, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::TaggedSymbol + ) + LEADS = + T.let( + :leads, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::TaggedSymbol + ) + SALES = + T.let( + :sales, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUpdateResponse::Config::Objective::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The campaign status as set by the advertiser (active or paused). + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignUpdateResponse::Config::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUpdateResponse::Config::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the user. + sig { returns(String) } + attr_accessor :id + + # The user's display name shown on their public profile. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The user's unique username shown on their public profile. + sig { returns(String) } + attr_accessor :username + + # The user who created the campaign + sig do + params(id: String, name: T.nilable(String), username: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the user. + id:, + # The user's display name shown on their public profile. + name:, + # The user's unique username shown on their public profile. + username: + ) + end + + sig do + override.returns( + { id: String, name: T.nilable(String), username: String } + ) + end + def to_hash + end + end + + # The payment method used for daily billing (null if using platform balance) + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod + ) + ) + end + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved payment method with no type-specific details available. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :BasePaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + end + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + returns( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card + ) + end + attr_reader :card + + sig do + params( + card: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card::OrHash + ).void + end + attr_writer :card + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved card payment method, including brand, last four digits, and expiration + # details. + sig do + params( + id: String, + card: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + card:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CardPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + card: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Card < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card, + WhopSDK::Internal::AnyHash + ) + end + + # Possible card brands that a payment token can have + sig { returns(T.nilable(WhopSDK::CardBrands::TaggedSymbol)) } + attr_accessor :brand + + # The two-digit expiration month of the card (1-12). Null if not available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_month + + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + sig { returns(T.nilable(Integer)) } + attr_accessor :exp_year + + # The last four digits of the card number. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The card-specific details for this payment method, including brand, last four + # digits, and expiration. + sig do + params( + brand: T.nilable(WhopSDK::CardBrands::OrSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Possible card brands that a payment token can have + brand:, + # The two-digit expiration month of the card (1-12). Null if not available. + exp_month:, + # The two-digit expiration year of the card (e.g., 27 for 2027). Null if not + # available. + exp_year:, + # The last four digits of the card number. Null if not available. + last4: + ) + end + + sig do + override.returns( + { + brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), + exp_month: T.nilable(Integer), + exp_year: T.nilable(Integer), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + returns( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + ) + end + attr_reader :us_bank_account + + sig do + params( + us_bank_account: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash + ).void + end + attr_writer :us_bank_account + + # A saved US bank account payment method, including bank name, last four digits, + # and account type. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + us_bank_account: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The bank account-specific details for this payment method, including bank name + # and last four digits. + us_bank_account:, + # The typename of this object + typename: :UsBankAccountPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol, + us_bank_account: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + ) + end + def to_hash + end + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + WhopSDK::Internal::AnyHash + ) + end + + # The type of bank account (e.g., checking, savings). + sig { returns(String) } + attr_accessor :account_type + + # The name of the financial institution holding the account. + sig { returns(String) } + attr_accessor :bank_name + + # The last four digits of the bank account number. + sig { returns(String) } + attr_accessor :last4 + + # The bank account-specific details for this payment method, including bank name + # and last four digits. + sig do + params( + account_type: String, + bank_name: String, + last4: String + ).returns(T.attached_class) + end + def self.new( + # The type of bank account (e.g., checking, savings). + account_type:, + # The name of the financial institution holding the account. + bank_name:, + # The last four digits of the bank account number. + last4: + ) + end + + sig do + override.returns( + { account_type: String, bank_name: String, last4: String } + ) + end + def to_hash + end + end + end + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + returns( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp + ) + end + attr_reader :cashapp + + sig do + params( + cashapp: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash + ).void + end + attr_writer :cashapp + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved Cash App payment method, including the buyer's cashtag and unique + # identifier. + sig do + params( + id: String, + cashapp: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp::OrHash, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + cashapp:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :CashappPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + cashapp: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Cashapp < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + WhopSDK::Internal::AnyHash + ) + end + + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + sig { returns(T.nilable(String)) } + attr_accessor :buyer_id + + # The public cashtag handle of the buyer on Cash App. Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :cashtag + + # The Cash App-specific details for this payment method, including cashtag and + # buyer ID. + sig do + params( + buyer_id: T.nilable(String), + cashtag: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The unique and immutable identifier assigned by Cash App to the buyer. Null if + # not available. + buyer_id:, + # The public cashtag handle of the buyer on Cash App. Null if not available. + cashtag: + ) + end + + sig do + override.returns( + { buyer_id: T.nilable(String), cashtag: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + returns( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal + ) + end + attr_reader :ideal + + sig do + params( + ideal: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash + ).void + end + attr_writer :ideal + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved iDEAL payment method, including the customer's bank name and BIC code. + sig do + params( + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal::OrHash, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The iDEAL-specific details for this payment method, including bank name and BIC. + ideal:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The typename of this object + typename: :IdealPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + ideal: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + typename: Symbol + } + ) + end + def to_hash + end + + class Ideal < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + WhopSDK::Internal::AnyHash + ) + end + + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bank + + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :bic + + # The iDEAL-specific details for this payment method, including bank name and BIC. + sig do + params(bank: T.nilable(String), bic: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # The name of the customer's bank used for the iDEAL transaction. Null if not + # available. + bank:, + # The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not + # available. + bic: + ) + end + + sig do + override.returns( + { bank: T.nilable(String), bic: T.nilable(String) } + ) + end + def to_hash + end + end + end + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod, + WhopSDK::Internal::AnyHash + ) + end + + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + sig { returns(String) } + attr_accessor :id + + # The time of the event in ISO 8601 UTC format with millisecond precision + sig { returns(Time) } + attr_accessor :created_at + + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } + attr_accessor :payment_method_type + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + returns( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + ) + end + attr_reader :sepa_debit + + sig do + params( + sepa_debit: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash + ).void + end + attr_writer :sepa_debit + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # A saved SEPA Direct Debit payment method, including the bank code, country, and + # last four IBAN digits. + sig do + params( + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit::OrHash, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents a unique identifier that is Base64 obfuscated. It is often used to + # refetch an object or as key for a cache. The ID type appears in a JSON response + # as a String; however, it is not intended to be human-readable. When expected as + # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) + # input value will be accepted as an ID. + id:, + # The time of the event in ISO 8601 UTC format with millisecond precision + created_at:, + # The type of payment instrument stored on file (e.g., card, us_bank_account, + # cashapp, ideal, sepa_debit). + payment_method_type:, + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sepa_debit:, + # The typename of this object + typename: :SepaDebitPaymentMethod + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol, + sepa_debit: + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: Symbol + } + ) + end + def to_hash + end + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + WhopSDK::Internal::AnyHash + ) + end + + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :bank_code + + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + sig { returns(T.nilable(String)) } + attr_accessor :branch_code + + # The two-letter ISO country code where the bank account is located. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + sig { returns(T.nilable(String)) } + attr_accessor :last4 + + # The SEPA Direct Debit-specific details for this payment method, including bank + # code and last four IBAN digits. + sig do + params( + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The bank code of the financial institution associated with this SEPA account. + # Null if not available. + bank_code:, + # The branch code of the financial institution associated with this SEPA account. + # Null if not available. + branch_code:, + # The two-letter ISO country code where the bank account is located. Null if not + # available. + country:, + # The last four digits of the IBAN associated with this SEPA account. Null if not + # available. + last4: + ) + end + + sig do + override.returns( + { + bank_code: T.nilable(String), + branch_code: T.nilable(String), + country: T.nilable(String), + last4: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::Variants + ] + ) + end + def self.variants + end + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Platform) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdCampaignUpdateResponse::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdCampaignUpdateResponse::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUpdateResponse::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCampaignUpdateResponse::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + sig { returns(String) } + attr_accessor :route + + # The display name of the product shown to customers on the product page and in + # search results. + sig { returns(String) } + attr_accessor :title + + # The access pass being promoted. Null for campaigns that don't target a specific + # product. + sig do + params(id: String, route: String, title: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the product. + id:, + # The URL slug used in the product's public link (e.g., 'my-product' in + # whop.com/company/my-product). + route:, + # The display name of the product shown to customers on the product page and in + # search results. + title: + ) + end + + sig { override.returns({ id: String, route: String, title: String }) } + def to_hash + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_create_params.rbi b/rbi/whop_sdk/models/ad_create_params.rbi new file mode 100644 index 00000000..ab7e1903 --- /dev/null +++ b/rbi/whop_sdk/models/ad_create_params.rbi @@ -0,0 +1,2101 @@ +# typed: strong + +module WhopSDK + module Models + class AdCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdCreateParams, WhopSDK::Internal::AnyHash) + end + + # The unique identifier of the ad group to create this ad in. + sig { returns(String) } + attr_accessor :ad_group_id + + # The unique identifier of the creative set to use. + sig { returns(T.nilable(String)) } + attr_accessor :creative_set_id + + # ID of an existing Instagram media item to use as the ad creative (instead of a + # creative set or Facebook post). + sig { returns(T.nilable(String)) } + attr_accessor :existing_instagram_media_id + + # ID of an existing Facebook post to use as the ad creative (instead of a creative + # set). + sig { returns(T.nilable(String)) } + attr_accessor :existing_post_id + + # Platform-specific configuration. Must match the campaign platform. + sig { returns(T.nilable(WhopSDK::AdCreateParams::PlatformConfig)) } + attr_reader :platform_config + + sig do + params( + platform_config: + T.nilable(WhopSDK::AdCreateParams::PlatformConfig::OrHash) + ).void + end + attr_writer :platform_config + + # The status of an external ad. + sig { returns(T.nilable(WhopSDK::AdCreateParams::Status::OrSymbol)) } + attr_accessor :status + + sig do + params( + ad_group_id: String, + creative_set_id: T.nilable(String), + existing_instagram_media_id: T.nilable(String), + existing_post_id: T.nilable(String), + platform_config: + T.nilable(WhopSDK::AdCreateParams::PlatformConfig::OrHash), + status: T.nilable(WhopSDK::AdCreateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The unique identifier of the ad group to create this ad in. + ad_group_id:, + # The unique identifier of the creative set to use. + creative_set_id: nil, + # ID of an existing Instagram media item to use as the ad creative (instead of a + # creative set or Facebook post). + existing_instagram_media_id: nil, + # ID of an existing Facebook post to use as the ad creative (instead of a creative + # set). + existing_post_id: nil, + # Platform-specific configuration. Must match the campaign platform. + platform_config: nil, + # The status of an external ad. + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + ad_group_id: String, + creative_set_id: T.nilable(String), + existing_instagram_media_id: T.nilable(String), + existing_post_id: T.nilable(String), + platform_config: T.nilable(WhopSDK::AdCreateParams::PlatformConfig), + status: T.nilable(WhopSDK::AdCreateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdCreateParams::PlatformConfig, + WhopSDK::Internal::AnyHash + ) + end + + # Configuration for Meta (Facebook/Instagram) ads. + sig do + returns(T.nilable(WhopSDK::AdCreateParams::PlatformConfig::Meta)) + end + attr_reader :meta + + sig do + params( + meta: + T.nilable(WhopSDK::AdCreateParams::PlatformConfig::Meta::OrHash) + ).void + end + attr_writer :meta + + # Configuration for TikTok ads. + sig do + returns(T.nilable(WhopSDK::AdCreateParams::PlatformConfig::Tiktok)) + end + attr_reader :tiktok + + sig do + params( + tiktok: + T.nilable(WhopSDK::AdCreateParams::PlatformConfig::Tiktok::OrHash) + ).void + end + attr_writer :tiktok + + # Platform-specific configuration. Must match the campaign platform. + sig do + params( + meta: + T.nilable(WhopSDK::AdCreateParams::PlatformConfig::Meta::OrHash), + tiktok: + T.nilable(WhopSDK::AdCreateParams::PlatformConfig::Tiktok::OrHash) + ).returns(T.attached_class) + end + def self.new( + # Configuration for Meta (Facebook/Instagram) ads. + meta: nil, + # Configuration for TikTok ads. + tiktok: nil + ) + end + + sig do + override.returns( + { + meta: T.nilable(WhopSDK::AdCreateParams::PlatformConfig::Meta), + tiktok: T.nilable(WhopSDK::AdCreateParams::PlatformConfig::Tiktok) + } + ) + end + def to_hash + end + + class Meta < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdCreateParams::PlatformConfig::Meta, + WhopSDK::Internal::AnyHash + ) + end + + # Call-to-action button type. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::OrSymbol + ) + ) + end + attr_accessor :call_to_action_type + + # Per-card carousel config. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard + ] + ) + ) + end + attr_accessor :carousel_cards + + # Description of the ad creative (legacy single-value). + sig { returns(T.nilable(String)) } + attr_accessor :description + + # Up to 5 description variants, rendered via Meta asset_feed_spec. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :descriptions + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :existing_instagram_media_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :existing_post_id + + # Headline of the ad creative (legacy single-value). + sig { returns(T.nilable(String)) } + attr_accessor :headline + + # Up to 5 headline variants, rendered via Meta asset_feed_spec. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :headlines + + # Unique identifier of the Instagram account. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + # Lead generation form configuration (JSON). + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :lead_form_config + + # Destination URL. + sig { returns(T.nilable(String)) } + attr_accessor :link_url + + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment::OrSymbol + ) + ) + end + attr_accessor :multi_advertiser_enrollment + + # Ad name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Unique identifier of the Facebook Page. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # Messenger welcome message / ice-breaker template (JSON). + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :page_welcome_message + + # Primary text of the ad creative (legacy single-value). + sig { returns(T.nilable(String)) } + attr_accessor :primary_text + + # Up to 5 primary-text variants, rendered via Meta asset_feed_spec. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :primary_texts + + # URL query parameters appended to the destination link. + sig { returns(T.nilable(String)) } + attr_accessor :url_tags + + # Configuration for Meta (Facebook/Instagram) ads. + sig do + params( + call_to_action_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::OrSymbol + ), + carousel_cards: + T.nilable( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard::OrHash + ] + ), + description: T.nilable(String), + descriptions: T.nilable(T::Array[String]), + existing_instagram_media_id: T.nilable(String), + existing_post_id: T.nilable(String), + headline: T.nilable(String), + headlines: T.nilable(T::Array[String]), + instagram_actor_id: T.nilable(String), + lead_form_config: T.nilable(T::Hash[Symbol, T.anything]), + link_url: T.nilable(String), + multi_advertiser_enrollment: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment::OrSymbol + ), + name: T.nilable(String), + page_id: T.nilable(String), + page_welcome_message: T.nilable(T::Hash[Symbol, T.anything]), + primary_text: T.nilable(String), + primary_texts: T.nilable(T::Array[String]), + url_tags: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Call-to-action button type. + call_to_action_type: nil, + # Per-card carousel config. + carousel_cards: nil, + # Description of the ad creative (legacy single-value). + description: nil, + # Up to 5 description variants, rendered via Meta asset_feed_spec. + descriptions: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + existing_instagram_media_id: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + existing_post_id: nil, + # Headline of the ad creative (legacy single-value). + headline: nil, + # Up to 5 headline variants, rendered via Meta asset_feed_spec. + headlines: nil, + # Unique identifier of the Instagram account. + instagram_actor_id: nil, + # Lead generation form configuration (JSON). + lead_form_config: nil, + # Destination URL. + link_url: nil, + multi_advertiser_enrollment: nil, + # Ad name. + name: nil, + # Unique identifier of the Facebook Page. + page_id: nil, + # Messenger welcome message / ice-breaker template (JSON). + page_welcome_message: nil, + # Primary text of the ad creative (legacy single-value). + primary_text: nil, + # Up to 5 primary-text variants, rendered via Meta asset_feed_spec. + primary_texts: nil, + # URL query parameters appended to the destination link. + url_tags: nil + ) + end + + sig do + override.returns( + { + call_to_action_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::OrSymbol + ), + carousel_cards: + T.nilable( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard + ] + ), + description: T.nilable(String), + descriptions: T.nilable(T::Array[String]), + existing_instagram_media_id: T.nilable(String), + existing_post_id: T.nilable(String), + headline: T.nilable(String), + headlines: T.nilable(T::Array[String]), + instagram_actor_id: T.nilable(String), + lead_form_config: T.nilable(T::Hash[Symbol, T.anything]), + link_url: T.nilable(String), + multi_advertiser_enrollment: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment::OrSymbol + ), + name: T.nilable(String), + page_id: T.nilable(String), + page_welcome_message: T.nilable(T::Hash[Symbol, T.anything]), + primary_text: T.nilable(String), + primary_texts: T.nilable(T::Array[String]), + url_tags: T.nilable(String) + } + ) + end + def to_hash + end + + # Call-to-action button type. + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEARN_MORE = + T.let( + :LEARN_MORE, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + SHOP_NOW = + T.let( + :SHOP_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + SIGN_UP = + T.let( + :SIGN_UP, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + SUBSCRIBE = + T.let( + :SUBSCRIBE, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + GET_STARTED = + T.let( + :GET_STARTED, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + BOOK_NOW = + T.let( + :BOOK_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + APPLY_NOW = + T.let( + :APPLY_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + CONTACT_US = + T.let( + :CONTACT_US, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + DOWNLOAD = + T.let( + :DOWNLOAD, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + ORDER_NOW = + T.let( + :ORDER_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + BUY_NOW = + T.let( + :BUY_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + GET_QUOTE = + T.let( + :GET_QUOTE, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + MESSAGE_PAGE = + T.let( + :MESSAGE_PAGE, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + WHATSAPP_MESSAGE = + T.let( + :WHATSAPP_MESSAGE, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + INSTAGRAM_MESSAGE = + T.let( + :INSTAGRAM_MESSAGE, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + CALL_NOW = + T.let( + :CALL_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + GET_DIRECTIONS = + T.let( + :GET_DIRECTIONS, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + SEND_UPDATES = + T.let( + :SEND_UPDATES, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + GET_OFFER = + T.let( + :GET_OFFER, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + WATCH_MORE = + T.let( + :WATCH_MORE, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + LISTEN_NOW = + T.let( + :LISTEN_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + PLAY_GAME = + T.let( + :PLAY_GAME, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + OPEN_LINK = + T.let( + :OPEN_LINK, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + NO_BUTTON = + T.let( + :NO_BUTTON, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + GET_OFFER_VIEW = + T.let( + :GET_OFFER_VIEW, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + GET_EVENT_TICKETS = + T.let( + :GET_EVENT_TICKETS, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + SEE_MENU = + T.let( + :SEE_MENU, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + REQUEST_TIME = + T.let( + :REQUEST_TIME, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + EVENT_RSVP = + T.let( + :EVENT_RSVP, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + SEE_DETAILS = + T.let( + :SEE_DETAILS, + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Meta::CallToActionType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class CarouselCard < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard, + WhopSDK::Internal::AnyHash + ) + end + + # CTA button type (e.g., SHOP_NOW, LEARN_MORE). + sig { returns(T.nilable(String)) } + attr_accessor :call_to_action_type + + # Card description (max 30 chars recommended). + sig { returns(T.nilable(String)) } + attr_accessor :description + + # Destination URL for this card (defaults to ad destination). + sig { returns(T.nilable(String)) } + attr_accessor :link + + # Card title (max 35 chars recommended). + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Per-card configuration for a carousel ad. + sig do + params( + call_to_action_type: T.nilable(String), + description: T.nilable(String), + link: T.nilable(String), + name: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # CTA button type (e.g., SHOP_NOW, LEARN_MORE). + call_to_action_type: nil, + # Card description (max 30 chars recommended). + description: nil, + # Destination URL for this card (defaults to ad destination). + link: nil, + # Card title (max 35 chars recommended). + name: nil + ) + end + + sig do + override.returns( + { + call_to_action_type: T.nilable(String), + description: T.nilable(String), + link: T.nilable(String), + name: T.nilable(String) + } + ) + end + def to_hash + end + end + + module MultiAdvertiserEnrollment + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OPT_IN = + T.let( + :OPT_IN, + WhopSDK::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment::TaggedSymbol + ) + OPT_OUT = + T.let( + :OPT_OUT, + WhopSDK::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Meta::MultiAdvertiserEnrollment::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Tiktok < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok, + WhopSDK::Internal::AnyHash + ) + end + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :access_pass_tag + + # Ad format (SINGLE_IMAGE, SINGLE_VIDEO, CAROUSEL_ADS, CATALOG_CAROUSEL, + # LIVE_CONTENT). + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::OrSymbol + ) + ) + end + attr_accessor :ad_format + + # Ad name. + sig { returns(T.nilable(String)) } + attr_accessor :ad_name + + # Ad copy (single variant). + sig { returns(T.nilable(String)) } + attr_accessor :ad_text + + # Ad copy variants for search ads (up to 5). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :ad_texts + + # Whether the ad creative is AI-generated content. See docs/tiktok_api/ad.md § + # aigc_disclosure_type. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType::OrSymbol + ) + ) + end + attr_accessor :aigc_disclosure_type + + # Automatic disclaimer categories (e.g., FINANCE, ALCOHOL). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :auto_disclaimer_types + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :automate_creative_enabled + + # Post-bid brand-safety vendor. See docs/tiktok_api/ad.md § + # brand_safety_postbid_partner. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::OrSymbol + ) + ) + end + attr_accessor :brand_safety_postbid_partner + + # VAST URL for brand safety measurement. + sig { returns(T.nilable(String)) } + attr_accessor :brand_safety_vast_url + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::OrSymbol + ) + ) + end + attr_accessor :call_to_action + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :call_to_action_enabled + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :call_to_action_id + + # How the call-to-action text is chosen. STANDARD uses a single fixed CTA; DYNAMIC + # lets TikTok rotate through a set of CTAs to maximize performance. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode::OrSymbol + ) + ) + end + attr_accessor :call_to_action_mode + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :card_id + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :carousel_image_index + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :catalog_id + + # Third-party click tracker URL. + sig { returns(T.nilable(String)) } + attr_accessor :click_tracking_url + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :cpp_url + + # Whether the creator has authorized the use of this creative for paid promotion + # (Spark Ads). + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :creative_authorized + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :creative_auto_enhancement_strategy_list + + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus::OrSymbol + ) + ) + end + attr_accessor :dark_post_status + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :deeplink + + # How the ad's deeplink is resolved. See docs/tiktok_api/ad.md § + # deeplink_format_type. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType::OrSymbol + ) + ) + end + attr_accessor :deeplink_format_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :deeplink_type + + # UTM params appended to the deeplink. + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :deeplink_utm_params + + # Clickable disclaimer segments (text + url). + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :disclaimer_clickable_texts + + # Plain text shown when disclaimer_type is DISCLAIMER_TEXT / DISCLAIMER_WITH_URL. + sig { returns(T.nilable(String)) } + attr_accessor :disclaimer_text + + # Ad disclaimer mode. See docs/tiktok_api/ad.md § disclaimer_type. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType::OrSymbol + ) + ) + end + attr_accessor :disclaimer_type + + # Dynamic destination strategy for shopping ads. + sig { returns(T.nilable(String)) } + attr_accessor :dynamic_destination + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :dynamic_format + + # End-card CTA text for video ads. + sig { returns(T.nilable(String)) } + attr_accessor :end_card_cta + + # Destination fallback when a deferred deeplink cannot open the app. See + # docs/tiktok_api/ad.md § fallback_type. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType::OrSymbol + ) + ) + end + attr_accessor :fallback_type + + # Business Center ID (required when identity_type is BC_AUTH_TT). + sig { returns(T.nilable(String)) } + attr_accessor :identity_authorized_bc_id + + # Unique identifier of the identity. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + # Identity type. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType::OrSymbol + ) + ) + end + attr_accessor :identity_type + + # Unique identifiers of the images. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :image_ids + + # Third-party impression tracker URL. + sig { returns(T.nilable(String)) } + attr_accessor :impression_tracking_url + + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus::OrSymbol + ) + ) + end + attr_accessor :item_duet_status + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :item_group_ids + + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus::OrSymbol + ) + ) + end + attr_accessor :item_stitch_status + + # Landing page URL. + sig { returns(T.nilable(String)) } + attr_accessor :landing_page_url + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :link_url + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :music_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # Fields displayed on dynamic product cards. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :product_display_field_list + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :product_set_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :product_specific_type + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :promotional_music_disabled + + # Fallback destination for shopping ads when the primary target is unavailable. + # See docs/tiktok_api/ad.md § shopping_ads_fallback_type. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType::OrSymbol + ) + ) + end + attr_accessor :shopping_ads_fallback_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :shopping_ads_video_package_id + + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :showcase_products + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :sku_ids + + # TikTok item ID for Spark Ads (promotes an organic post). + sig { returns(T.nilable(String)) } + attr_accessor :tiktok_item_id + + # TikTok MMP-tracked app ID. + sig { returns(T.nilable(String)) } + attr_accessor :tracking_app_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :tracking_message_event_set_id + + # Offline event set IDs for attribution. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tracking_offline_event_set_ids + + # TikTok pixel ID used for conversion tracking on this ad. + sig { returns(T.nilable(String)) } + attr_accessor :tracking_pixel_id + + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :utm_params + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :vertical_video_strategy + + # Unique identifier of the video. + sig { returns(T.nilable(String)) } + attr_accessor :video_id + + # Third-party video-view tracker URL. + sig { returns(T.nilable(String)) } + attr_accessor :video_view_tracking_url + + # Post-bid viewability measurement partner. See docs/tiktok_api/ad.md § + # viewability_postbid_partner. + sig do + returns( + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner::OrSymbol + ) + ) + end + attr_accessor :viewability_postbid_partner + + # VAST URL for viewability measurement. + sig { returns(T.nilable(String)) } + attr_accessor :viewability_vast_url + + # Configuration for TikTok ads. + sig do + params( + access_pass_tag: T.nilable(String), + ad_format: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::OrSymbol + ), + ad_name: T.nilable(String), + ad_text: T.nilable(String), + ad_texts: T.nilable(T::Array[String]), + aigc_disclosure_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType::OrSymbol + ), + auto_disclaimer_types: T.nilable(T::Array[String]), + automate_creative_enabled: T.nilable(T::Boolean), + brand_safety_postbid_partner: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::OrSymbol + ), + brand_safety_vast_url: T.nilable(String), + call_to_action: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::OrSymbol + ), + call_to_action_enabled: T.nilable(T::Boolean), + call_to_action_id: T.nilable(String), + call_to_action_mode: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode::OrSymbol + ), + card_id: T.nilable(String), + carousel_image_index: T.nilable(Integer), + catalog_id: T.nilable(String), + click_tracking_url: T.nilable(String), + cpp_url: T.nilable(String), + creative_authorized: T.nilable(T::Boolean), + creative_auto_enhancement_strategy_list: + T.nilable(T::Array[String]), + dark_post_status: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus::OrSymbol + ), + deeplink: T.nilable(String), + deeplink_format_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType::OrSymbol + ), + deeplink_type: T.nilable(String), + deeplink_utm_params: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + disclaimer_clickable_texts: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + disclaimer_text: T.nilable(String), + disclaimer_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType::OrSymbol + ), + dynamic_destination: T.nilable(String), + dynamic_format: T.nilable(String), + end_card_cta: T.nilable(String), + fallback_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType::OrSymbol + ), + image_ids: T.nilable(T::Array[String]), + impression_tracking_url: T.nilable(String), + item_duet_status: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus::OrSymbol + ), + item_group_ids: T.nilable(T::Array[String]), + item_stitch_status: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus::OrSymbol + ), + landing_page_url: T.nilable(String), + link_url: T.nilable(String), + music_id: T.nilable(String), + page_id: T.nilable(String), + product_display_field_list: T.nilable(T::Array[String]), + product_set_id: T.nilable(String), + product_specific_type: T.nilable(String), + promotional_music_disabled: T.nilable(T::Boolean), + shopping_ads_fallback_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType::OrSymbol + ), + shopping_ads_video_package_id: T.nilable(String), + showcase_products: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + sku_ids: T.nilable(T::Array[String]), + tiktok_item_id: T.nilable(String), + tracking_app_id: T.nilable(String), + tracking_message_event_set_id: T.nilable(String), + tracking_offline_event_set_ids: T.nilable(T::Array[String]), + tracking_pixel_id: T.nilable(String), + utm_params: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + vertical_video_strategy: T.nilable(String), + video_id: T.nilable(String), + video_view_tracking_url: T.nilable(String), + viewability_postbid_partner: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner::OrSymbol + ), + viewability_vast_url: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + access_pass_tag: nil, + # Ad format (SINGLE_IMAGE, SINGLE_VIDEO, CAROUSEL_ADS, CATALOG_CAROUSEL, + # LIVE_CONTENT). + ad_format: nil, + # Ad name. + ad_name: nil, + # Ad copy (single variant). + ad_text: nil, + # Ad copy variants for search ads (up to 5). + ad_texts: nil, + # Whether the ad creative is AI-generated content. See docs/tiktok_api/ad.md § + # aigc_disclosure_type. + aigc_disclosure_type: nil, + # Automatic disclaimer categories (e.g., FINANCE, ALCOHOL). + auto_disclaimer_types: nil, + # Represents `true` or `false` values. + automate_creative_enabled: nil, + # Post-bid brand-safety vendor. See docs/tiktok_api/ad.md § + # brand_safety_postbid_partner. + brand_safety_postbid_partner: nil, + # VAST URL for brand safety measurement. + brand_safety_vast_url: nil, + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + call_to_action: nil, + # Represents `true` or `false` values. + call_to_action_enabled: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + call_to_action_id: nil, + # How the call-to-action text is chosen. STANDARD uses a single fixed CTA; DYNAMIC + # lets TikTok rotate through a set of CTAs to maximize performance. + call_to_action_mode: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + card_id: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + carousel_image_index: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + catalog_id: nil, + # Third-party click tracker URL. + click_tracking_url: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + cpp_url: nil, + # Whether the creator has authorized the use of this creative for paid promotion + # (Spark Ads). + creative_authorized: nil, + creative_auto_enhancement_strategy_list: nil, + dark_post_status: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + deeplink: nil, + # How the ad's deeplink is resolved. See docs/tiktok_api/ad.md § + # deeplink_format_type. + deeplink_format_type: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + deeplink_type: nil, + # UTM params appended to the deeplink. + deeplink_utm_params: nil, + # Clickable disclaimer segments (text + url). + disclaimer_clickable_texts: nil, + # Plain text shown when disclaimer_type is DISCLAIMER_TEXT / DISCLAIMER_WITH_URL. + disclaimer_text: nil, + # Ad disclaimer mode. See docs/tiktok_api/ad.md § disclaimer_type. + disclaimer_type: nil, + # Dynamic destination strategy for shopping ads. + dynamic_destination: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + dynamic_format: nil, + # End-card CTA text for video ads. + end_card_cta: nil, + # Destination fallback when a deferred deeplink cannot open the app. See + # docs/tiktok_api/ad.md § fallback_type. + fallback_type: nil, + # Business Center ID (required when identity_type is BC_AUTH_TT). + identity_authorized_bc_id: nil, + # Unique identifier of the identity. + identity_id: nil, + # Identity type. + identity_type: nil, + # Unique identifiers of the images. + image_ids: nil, + # Third-party impression tracker URL. + impression_tracking_url: nil, + item_duet_status: nil, + item_group_ids: nil, + item_stitch_status: nil, + # Landing page URL. + landing_page_url: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + link_url: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + music_id: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + page_id: nil, + # Fields displayed on dynamic product cards. + product_display_field_list: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + product_set_id: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + product_specific_type: nil, + # Represents `true` or `false` values. + promotional_music_disabled: nil, + # Fallback destination for shopping ads when the primary target is unavailable. + # See docs/tiktok_api/ad.md § shopping_ads_fallback_type. + shopping_ads_fallback_type: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + shopping_ads_video_package_id: nil, + showcase_products: nil, + sku_ids: nil, + # TikTok item ID for Spark Ads (promotes an organic post). + tiktok_item_id: nil, + # TikTok MMP-tracked app ID. + tracking_app_id: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + tracking_message_event_set_id: nil, + # Offline event set IDs for attribution. + tracking_offline_event_set_ids: nil, + # TikTok pixel ID used for conversion tracking on this ad. + tracking_pixel_id: nil, + utm_params: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + vertical_video_strategy: nil, + # Unique identifier of the video. + video_id: nil, + # Third-party video-view tracker URL. + video_view_tracking_url: nil, + # Post-bid viewability measurement partner. See docs/tiktok_api/ad.md § + # viewability_postbid_partner. + viewability_postbid_partner: nil, + # VAST URL for viewability measurement. + viewability_vast_url: nil + ) + end + + sig do + override.returns( + { + access_pass_tag: T.nilable(String), + ad_format: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::OrSymbol + ), + ad_name: T.nilable(String), + ad_text: T.nilable(String), + ad_texts: T.nilable(T::Array[String]), + aigc_disclosure_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType::OrSymbol + ), + auto_disclaimer_types: T.nilable(T::Array[String]), + automate_creative_enabled: T.nilable(T::Boolean), + brand_safety_postbid_partner: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::OrSymbol + ), + brand_safety_vast_url: T.nilable(String), + call_to_action: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::OrSymbol + ), + call_to_action_enabled: T.nilable(T::Boolean), + call_to_action_id: T.nilable(String), + call_to_action_mode: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode::OrSymbol + ), + card_id: T.nilable(String), + carousel_image_index: T.nilable(Integer), + catalog_id: T.nilable(String), + click_tracking_url: T.nilable(String), + cpp_url: T.nilable(String), + creative_authorized: T.nilable(T::Boolean), + creative_auto_enhancement_strategy_list: + T.nilable(T::Array[String]), + dark_post_status: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus::OrSymbol + ), + deeplink: T.nilable(String), + deeplink_format_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType::OrSymbol + ), + deeplink_type: T.nilable(String), + deeplink_utm_params: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + disclaimer_clickable_texts: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + disclaimer_text: T.nilable(String), + disclaimer_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType::OrSymbol + ), + dynamic_destination: T.nilable(String), + dynamic_format: T.nilable(String), + end_card_cta: T.nilable(String), + fallback_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType::OrSymbol + ), + image_ids: T.nilable(T::Array[String]), + impression_tracking_url: T.nilable(String), + item_duet_status: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus::OrSymbol + ), + item_group_ids: T.nilable(T::Array[String]), + item_stitch_status: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus::OrSymbol + ), + landing_page_url: T.nilable(String), + link_url: T.nilable(String), + music_id: T.nilable(String), + page_id: T.nilable(String), + product_display_field_list: T.nilable(T::Array[String]), + product_set_id: T.nilable(String), + product_specific_type: T.nilable(String), + promotional_music_disabled: T.nilable(T::Boolean), + shopping_ads_fallback_type: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType::OrSymbol + ), + shopping_ads_video_package_id: T.nilable(String), + showcase_products: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + sku_ids: T.nilable(T::Array[String]), + tiktok_item_id: T.nilable(String), + tracking_app_id: T.nilable(String), + tracking_message_event_set_id: T.nilable(String), + tracking_offline_event_set_ids: T.nilable(T::Array[String]), + tracking_pixel_id: T.nilable(String), + utm_params: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + vertical_video_strategy: T.nilable(String), + video_id: T.nilable(String), + video_view_tracking_url: T.nilable(String), + viewability_postbid_partner: + T.nilable( + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner::OrSymbol + ), + viewability_vast_url: T.nilable(String) + } + ) + end + def to_hash + end + + # Ad format (SINGLE_IMAGE, SINGLE_VIDEO, CAROUSEL_ADS, CATALOG_CAROUSEL, + # LIVE_CONTENT). + module AdFormat + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SINGLE_IMAGE = + T.let( + :SINGLE_IMAGE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::TaggedSymbol + ) + SINGLE_VIDEO = + T.let( + :SINGLE_VIDEO, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::TaggedSymbol + ) + CAROUSEL_ADS = + T.let( + :CAROUSEL_ADS, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::TaggedSymbol + ) + CATALOG_CAROUSEL = + T.let( + :CATALOG_CAROUSEL, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::TaggedSymbol + ) + LIVE_CONTENT = + T.let( + :LIVE_CONTENT, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AdFormat::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Whether the ad creative is AI-generated content. See docs/tiktok_api/ad.md § + # aigc_disclosure_type. + module AigcDisclosureType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType::TaggedSymbol + ) + CONTAINS_AIGC = + T.let( + :CONTAINS_AIGC, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType::TaggedSymbol + ) + IS_AIGC = + T.let( + :IS_AIGC, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType::TaggedSymbol + ) + NOT_AIGC = + T.let( + :NOT_AIGC, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::AigcDisclosureType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Post-bid brand-safety vendor. See docs/tiktok_api/ad.md § + # brand_safety_postbid_partner. + module BrandSafetyPostbidPartner + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::TaggedSymbol + ) + IAS = + T.let( + :IAS, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::TaggedSymbol + ) + DOUBLE_VERIFY = + T.let( + :DOUBLE_VERIFY, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::TaggedSymbol + ) + OPEN_SLATE = + T.let( + :OPEN_SLATE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::TaggedSymbol + ) + ZEFR = + T.let( + :ZEFR, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::BrandSafetyPostbidPartner::TaggedSymbol + ] + ) + end + def self.values + end + end + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + module CallToAction + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEARN_MORE = + T.let( + :LEARN_MORE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + DOWNLOAD = + T.let( + :DOWNLOAD, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + SHOP_NOW = + T.let( + :SHOP_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + SIGN_UP = + T.let( + :SIGN_UP, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + CONTACT_US = + T.let( + :CONTACT_US, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + APPLY_NOW = + T.let( + :APPLY_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + BOOK_NOW = + T.let( + :BOOK_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + PLAY_GAME = + T.let( + :PLAY_GAME, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + WATCH_NOW = + T.let( + :WATCH_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + READ_MORE = + T.let( + :READ_MORE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + VIEW_NOW = + T.let( + :VIEW_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + GET_QUOTE = + T.let( + :GET_QUOTE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + ORDER_NOW = + T.let( + :ORDER_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + INSTALL_NOW = + T.let( + :INSTALL_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + GET_SHOWTIMES = + T.let( + :GET_SHOWTIMES, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + LISTEN_NOW = + T.let( + :LISTEN_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + INTERESTED = + T.let( + :INTERESTED, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + SUBSCRIBE = + T.let( + :SUBSCRIBE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + GET_TICKETS_NOW = + T.let( + :GET_TICKETS_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + EXPERIENCE_NOW = + T.let( + :EXPERIENCE_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + PRE_ORDER_NOW = + T.let( + :PRE_ORDER_NOW, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + VISIT_STORE = + T.let( + :VISIT_STORE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToAction::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How the call-to-action text is chosen. STANDARD uses a single fixed CTA; DYNAMIC + # lets TikTok rotate through a set of CTAs to maximize performance. + module CallToActionMode + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = + T.let( + :STANDARD, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode::TaggedSymbol + ) + DYNAMIC = + T.let( + :DYNAMIC, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::CallToActionMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module DarkPostStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ON = + T.let( + :ON, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus::TaggedSymbol + ) + OFF = + T.let( + :OFF, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DarkPostStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How the ad's deeplink is resolved. See docs/tiktok_api/ad.md § + # deeplink_format_type. + module DeeplinkFormatType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType::TaggedSymbol + ) + DEEPLINK = + T.let( + :DEEPLINK, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType::TaggedSymbol + ) + DEFERRED_DEEPLINK = + T.let( + :DEFERRED_DEEPLINK, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DeeplinkFormatType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Ad disclaimer mode. See docs/tiktok_api/ad.md § disclaimer_type. + module DisclaimerType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NONE = + T.let( + :NONE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType::TaggedSymbol + ) + DISCLAIMER_TEXT = + T.let( + :DISCLAIMER_TEXT, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType::TaggedSymbol + ) + DISCLAIMER_WITH_URL = + T.let( + :DISCLAIMER_WITH_URL, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::DisclaimerType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Destination fallback when a deferred deeplink cannot open the app. See + # docs/tiktok_api/ad.md § fallback_type. + module FallbackType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType::TaggedSymbol + ) + APP_STORE = + T.let( + :APP_STORE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType::TaggedSymbol + ) + LANDING_PAGE = + T.let( + :LANDING_PAGE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::FallbackType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Identity type. + module IdentityType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CUSTOMIZED_USER = + T.let( + :CUSTOMIZED_USER, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType::TaggedSymbol + ) + AUTH_CODE = + T.let( + :AUTH_CODE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType::TaggedSymbol + ) + TT_USER = + T.let( + :TT_USER, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType::TaggedSymbol + ) + BC_AUTH_TT = + T.let( + :BC_AUTH_TT, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::IdentityType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ItemDuetStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLE = + T.let( + :ENABLE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus::TaggedSymbol + ) + DISABLE = + T.let( + :DISABLE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemDuetStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ItemStitchStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLE = + T.let( + :ENABLE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus::TaggedSymbol + ) + DISABLE = + T.let( + :DISABLE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ItemStitchStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Fallback destination for shopping ads when the primary target is unavailable. + # See docs/tiktok_api/ad.md § shopping_ads_fallback_type. + module ShoppingAdsFallbackType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType::TaggedSymbol + ) + LANDING_PAGE = + T.let( + :LANDING_PAGE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType::TaggedSymbol + ) + STORE = + T.let( + :STORE, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ShoppingAdsFallbackType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Post-bid viewability measurement partner. See docs/tiktok_api/ad.md § + # viewability_postbid_partner. + module ViewabilityPostbidPartner + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner::TaggedSymbol + ) + IAS = + T.let( + :IAS, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner::TaggedSymbol + ) + DOUBLE_VERIFY = + T.let( + :DOUBLE_VERIFY, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner::TaggedSymbol + ) + MOAT = + T.let( + :MOAT, + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdCreateParams::PlatformConfig::Tiktok::ViewabilityPostbidPartner::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + # The status of an external ad. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::AdCreateParams::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = T.let(:active, WhopSDK::AdCreateParams::Status::TaggedSymbol) + PAUSED = T.let(:paused, WhopSDK::AdCreateParams::Status::TaggedSymbol) + INACTIVE = + T.let(:inactive, WhopSDK::AdCreateParams::Status::TaggedSymbol) + IN_REVIEW = + T.let(:in_review, WhopSDK::AdCreateParams::Status::TaggedSymbol) + REJECTED = + T.let(:rejected, WhopSDK::AdCreateParams::Status::TaggedSymbol) + FLAGGED = T.let(:flagged, WhopSDK::AdCreateParams::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::AdCreateParams::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_create_response.rbi b/rbi/whop_sdk/models/ad_create_response.rbi new file mode 100644 index 00000000..9560c4e5 --- /dev/null +++ b/rbi/whop_sdk/models/ad_create_response.rbi @@ -0,0 +1,1125 @@ +# typed: strong + +module WhopSDK + module Models + class AdCreateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Models::AdCreateResponse, WhopSDK::Internal::AnyHash) + end + + # Unique identifier for the ad. + sig { returns(String) } + attr_accessor :id + + # When the ad was created. + sig { returns(Time) } + attr_accessor :created_at + + # The creative set used by this ad. + sig do + returns( + T.nilable(WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet) + ) + end + attr_reader :external_ad_creative_set + + sig do + params( + external_ad_creative_set: + T.nilable( + WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet::OrHash + ) + ).void + end + attr_writer :external_ad_creative_set + + # The parent ad group. + sig { returns(WhopSDK::Models::AdCreateResponse::ExternalAdGroup) } + attr_reader :external_ad_group + + sig do + params( + external_ad_group: + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::OrHash + ).void + end + attr_writer :external_ad_group + + # Typed platform-specific configuration. + sig do + returns( + T.nilable(WhopSDK::Models::AdCreateResponse::PlatformConfig::Variants) + ) + end + attr_accessor :platform_config + + # Current status of the ad. + sig { returns(WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol) } + attr_accessor :status + + # When the ad was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An ad belonging to an ad group + sig do + params( + id: String, + created_at: Time, + external_ad_creative_set: + T.nilable( + WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet::OrHash + ), + external_ad_group: + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::OrHash, + platform_config: + T.nilable( + T.any( + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::OrHash, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::OrHash + ) + ), + status: WhopSDK::Models::AdCreateResponse::Status::OrSymbol, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the ad. + id:, + # When the ad was created. + created_at:, + # The creative set used by this ad. + external_ad_creative_set:, + # The parent ad group. + external_ad_group:, + # Typed platform-specific configuration. + platform_config:, + # Current status of the ad. + status:, + # When the ad was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + external_ad_creative_set: + T.nilable( + WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet + ), + external_ad_group: + WhopSDK::Models::AdCreateResponse::ExternalAdGroup, + platform_config: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::Variants + ), + status: WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol, + updated_at: Time + } + ) + end + def to_hash + end + + class ExternalAdCreativeSet < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the external ad creative set. + sig { returns(String) } + attr_accessor :id + + # The creative set used by this ad. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the external ad creative set. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + + class ExternalAdGroup < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCreateResponse::ExternalAdGroup, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the external ad group. + sig { returns(String) } + attr_accessor :id + + # Human-readable ad group name + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Current operational status of the ad group + sig do + returns( + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + ) + end + attr_accessor :status + + # The parent ad group. + sig do + params( + id: String, + name: T.nilable(String), + status: + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the external ad group. + id:, + # Human-readable ad group name + name:, + # Current operational status of the ad group + status: + ) + end + + sig do + override.returns( + { + id: String, + name: T.nilable(String), + status: + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + } + ) + end + def to_hash + end + + # Current operational status of the ad group + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCreateResponse::ExternalAdGroup::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # Typed platform-specific configuration. + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType + ) + ) + end + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + ) + end + attr_accessor :call_to_action_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :headline + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :link_url + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # The ad platform. + sig do + returns( + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :primary_text + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :url_tags + + # Meta (Facebook/Instagram) ad configuration. + sig do + params( + call_to_action_type: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::OrSymbol + ), + headline: T.nilable(String), + instagram_actor_id: T.nilable(String), + link_url: T.nilable(String), + name: T.nilable(String), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::OrSymbol, + primary_text: T.nilable(String), + url_tags: T.nilable(String), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + call_to_action_type:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + headline:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + instagram_actor_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + link_url:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + name:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + page_id:, + # The ad platform. + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + primary_text:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + url_tags:, + # The typename of this object + typename: :MetaAdPlatformConfigType + ) + end + + sig do + override.returns( + { + call_to_action_type: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ), + headline: T.nilable(String), + instagram_actor_id: T.nilable(String), + link_url: T.nilable(String), + name: T.nilable(String), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol, + primary_text: T.nilable(String), + typename: Symbol, + url_tags: T.nilable(String) + } + ) + end + def to_hash + end + + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEARN_MORE = + T.let( + :LEARN_MORE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SHOP_NOW = + T.let( + :SHOP_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SIGN_UP = + T.let( + :SIGN_UP, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SUBSCRIBE = + T.let( + :SUBSCRIBE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_STARTED = + T.let( + :GET_STARTED, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + BOOK_NOW = + T.let( + :BOOK_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + APPLY_NOW = + T.let( + :APPLY_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + CONTACT_US = + T.let( + :CONTACT_US, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + DOWNLOAD = + T.let( + :DOWNLOAD, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + ORDER_NOW = + T.let( + :ORDER_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + BUY_NOW = + T.let( + :BUY_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_QUOTE = + T.let( + :GET_QUOTE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + MESSAGE_PAGE = + T.let( + :MESSAGE_PAGE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + WHATSAPP_MESSAGE = + T.let( + :WHATSAPP_MESSAGE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + INSTAGRAM_MESSAGE = + T.let( + :INSTAGRAM_MESSAGE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + CALL_NOW = + T.let( + :CALL_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_DIRECTIONS = + T.let( + :GET_DIRECTIONS, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEND_UPDATES = + T.let( + :SEND_UPDATES, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_OFFER = + T.let( + :GET_OFFER, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + WATCH_MORE = + T.let( + :WATCH_MORE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + LISTEN_NOW = + T.let( + :LISTEN_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + PLAY_GAME = + T.let( + :PLAY_GAME, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + OPEN_LINK = + T.let( + :OPEN_LINK, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + NO_BUTTON = + T.let( + :NO_BUTTON, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_OFFER_VIEW = + T.let( + :GET_OFFER_VIEW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_EVENT_TICKETS = + T.let( + :GET_EVENT_TICKETS, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEE_MENU = + T.let( + :SEE_MENU, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + REQUEST_TIME = + T.let( + :REQUEST_TIME, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + EVENT_RSVP = + T.let( + :EVENT_RSVP, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEE_DETAILS = + T.let( + :SEE_DETAILS, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + ) + end + attr_accessor :ad_format + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :ad_name + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :ad_text + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + sig do + returns( + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + ) + end + attr_accessor :call_to_action + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_authorized_bc_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + sig do + returns( + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + ) + end + attr_accessor :identity_type + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :image_ids + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :landing_page_url + + # The ad platform. + sig do + returns( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :video_id + + # TikTok ad configuration. + sig do + params( + ad_format: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::OrSymbol + ), + ad_name: T.nilable(String), + ad_text: T.nilable(String), + call_to_action: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::OrSymbol + ), + image_ids: T.nilable(T::Array[String]), + landing_page_url: T.nilable(String), + platform: + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::OrSymbol, + video_id: T.nilable(String), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + ad_format:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + ad_name:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + ad_text:, + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + call_to_action:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_authorized_bc_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_id:, + identity_type:, + image_ids:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + landing_page_url:, + # The ad platform. + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + video_id:, + # The typename of this object + typename: :TiktokAdPlatformConfigType + ) + end + + sig do + override.returns( + { + ad_format: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ), + ad_name: T.nilable(String), + ad_text: T.nilable(String), + call_to_action: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: + T.nilable( + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ), + image_ids: T.nilable(T::Array[String]), + landing_page_url: T.nilable(String), + platform: + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol, + typename: Symbol, + video_id: T.nilable(String) + } + ) + end + def to_hash + end + + module AdFormat + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SINGLE_IMAGE = + T.let( + :SINGLE_IMAGE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + SINGLE_VIDEO = + T.let( + :SINGLE_VIDEO, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + CAROUSEL_ADS = + T.let( + :CAROUSEL_ADS, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + CATALOG_CAROUSEL = + T.let( + :CATALOG_CAROUSEL, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + LIVE_CONTENT = + T.let( + :LIVE_CONTENT, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ] + ) + end + def self.values + end + end + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + module CallToAction + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEARN_MORE = + T.let( + :LEARN_MORE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + DOWNLOAD = + T.let( + :DOWNLOAD, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SHOP_NOW = + T.let( + :SHOP_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SIGN_UP = + T.let( + :SIGN_UP, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + CONTACT_US = + T.let( + :CONTACT_US, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + APPLY_NOW = + T.let( + :APPLY_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + BOOK_NOW = + T.let( + :BOOK_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + PLAY_GAME = + T.let( + :PLAY_GAME, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + WATCH_NOW = + T.let( + :WATCH_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + READ_MORE = + T.let( + :READ_MORE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + VIEW_NOW = + T.let( + :VIEW_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_QUOTE = + T.let( + :GET_QUOTE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + ORDER_NOW = + T.let( + :ORDER_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + INSTALL_NOW = + T.let( + :INSTALL_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_SHOWTIMES = + T.let( + :GET_SHOWTIMES, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + LISTEN_NOW = + T.let( + :LISTEN_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + INTERESTED = + T.let( + :INTERESTED, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SUBSCRIBE = + T.let( + :SUBSCRIBE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_TICKETS_NOW = + T.let( + :GET_TICKETS_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + EXPERIENCE_NOW = + T.let( + :EXPERIENCE_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + PRE_ORDER_NOW = + T.let( + :PRE_ORDER_NOW, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + VISIT_STORE = + T.let( + :VISIT_STORE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ] + ) + end + def self.values + end + end + + module IdentityType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CUSTOMIZED_USER = + T.let( + :CUSTOMIZED_USER, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + AUTH_CODE = + T.let( + :AUTH_CODE, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + TT_USER = + T.let( + :TT_USER, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + BC_AUTH_TT = + T.let( + :BC_AUTH_TT, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdCreateResponse::PlatformConfig::Variants + ] + ) + end + def self.variants + end + end + + # Current status of the ad. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdCreateResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::Models::AdCreateResponse::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_create_params.rbi b/rbi/whop_sdk/models/ad_group_create_params.rbi new file mode 100644 index 00000000..3c00f8b1 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_create_params.rbi @@ -0,0 +1,6135 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdGroupCreateParams, WhopSDK::Internal::AnyHash) + end + + # The ad campaign to create this ad group within. + sig { returns(String) } + attr_accessor :campaign_id + + # Budget amount in dollars. + sig { returns(T.nilable(Float)) } + attr_accessor :budget + + # The budget type for an ad campaign or ad group. + sig do + returns(T.nilable(WhopSDK::AdGroupCreateParams::BudgetType::OrSymbol)) + end + attr_accessor :budget_type + + # Unified ad group configuration (bidding, optimization, targeting). + sig { returns(T.nilable(WhopSDK::AdGroupCreateParams::Config)) } + attr_reader :config + + sig do + params( + config: T.nilable(WhopSDK::AdGroupCreateParams::Config::OrHash) + ).void + end + attr_writer :config + + # Daily budget in dollars. + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Human-readable ad group name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Platform-specific ad group configuration. + sig { returns(T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig)) } + attr_reader :platform_config + + sig do + params( + platform_config: + T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig::OrHash) + ).void + end + attr_writer :platform_config + + # The status of an external ad group. + sig { returns(T.nilable(WhopSDK::AdGroupCreateParams::Status::OrSymbol)) } + attr_accessor :status + + sig do + params( + campaign_id: String, + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdGroupCreateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdGroupCreateParams::Config::OrHash), + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig::OrHash), + status: T.nilable(WhopSDK::AdGroupCreateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The ad campaign to create this ad group within. + campaign_id:, + # Budget amount in dollars. + budget: nil, + # The budget type for an ad campaign or ad group. + budget_type: nil, + # Unified ad group configuration (bidding, optimization, targeting). + config: nil, + # Daily budget in dollars. + daily_budget: nil, + # Human-readable ad group name. + name: nil, + # Platform-specific ad group configuration. + platform_config: nil, + # The status of an external ad group. + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + campaign_id: String, + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdGroupCreateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdGroupCreateParams::Config), + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig), + status: T.nilable(WhopSDK::AdGroupCreateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # The budget type for an ad campaign or ad group. + module BudgetType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdGroupCreateParams::BudgetType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DAILY = + T.let(:daily, WhopSDK::AdGroupCreateParams::BudgetType::TaggedSymbol) + LIFETIME = + T.let( + :lifetime, + WhopSDK::AdGroupCreateParams::BudgetType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::AdGroupCreateParams::BudgetType::TaggedSymbol] + ) + end + def self.values + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::Config::BidStrategy::OrSymbol + ) + ) + end + attr_accessor :bid_strategy + + # How you are billed (e.g., impressions, clicks). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::Config::BillingEvent::OrSymbol + ) + ) + end + attr_accessor :billing_event + + # Scheduled end time (ISO8601). Required for lifetime budgets. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Maximum number of times to show ads to each person in the frequency interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap + + # Number of days for the frequency cap interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap_interval_days + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::OrSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Budget pacing: standard (even) or accelerated (fast). + sig do + returns( + T.nilable(WhopSDK::AdGroupCreateParams::Config::Pacing::OrSymbol) + ) + end + attr_accessor :pacing + + # Scheduled start time (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + returns(T.nilable(WhopSDK::AdGroupCreateParams::Config::Targeting)) + end + attr_reader :targeting + + sig do + params( + targeting: + T.nilable(WhopSDK::AdGroupCreateParams::Config::Targeting::OrHash) + ).void + end + attr_writer :targeting + + # Unified ad group configuration (bidding, optimization, targeting). + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::BillingEvent::OrSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable(WhopSDK::AdGroupCreateParams::Config::Pacing::OrSymbol), + start_time: T.nilable(String), + targeting: + T.nilable(WhopSDK::AdGroupCreateParams::Config::Targeting::OrHash) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + bid_amount: nil, + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + bid_strategy: nil, + # How you are billed (e.g., impressions, clicks). + billing_event: nil, + # Scheduled end time (ISO8601). Required for lifetime budgets. + end_time: nil, + # Maximum number of times to show ads to each person in the frequency interval. + frequency_cap: nil, + # Number of days for the frequency cap interval. + frequency_cap_interval_days: nil, + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + optimization_goal: nil, + # Budget pacing: standard (even) or accelerated (fast). + pacing: nil, + # Scheduled start time (ISO8601). + start_time: nil, + # Audience targeting settings (demographics, geo, interests, audiences, devices). + targeting: nil + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::BillingEvent::OrSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::Pacing::OrSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable(WhopSDK::AdGroupCreateParams::Config::Targeting) + } + ) + end + def to_hash + end + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdGroupCreateParams::Config::BidStrategy) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::AdGroupCreateParams::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::AdGroupCreateParams::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::AdGroupCreateParams::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed (e.g., impressions, clicks). + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdGroupCreateParams::Config::BillingEvent) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::AdGroupCreateParams::Config::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :clicks, + WhopSDK::AdGroupCreateParams::Config::BillingEvent::TaggedSymbol + ) + OPTIMIZED_CPM = + T.let( + :optimized_cpm, + WhopSDK::AdGroupCreateParams::Config::BillingEvent::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::AdGroupCreateParams::Config::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CONVERSIONS = + T.let( + :conversions, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :link_clicks, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :landing_page_views, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :reach, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :app_installs, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :lead_generation, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :value, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :page_likes, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :conversations, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :ad_recall_lift, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :two_second_continuous_video_views, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :post_engagement, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :event_responses, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :reminders_set, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :quality_lead, + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget pacing: standard (even) or accelerated (fast). + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdGroupCreateParams::Config::Pacing) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = + T.let( + :standard, + WhopSDK::AdGroupCreateParams::Config::Pacing::TaggedSymbol + ) + ACCELERATED = + T.let( + :accelerated, + WhopSDK::AdGroupCreateParams::Config::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Targeting < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::Config::Targeting, + WhopSDK::Internal::AnyHash + ) + end + + # Maximum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_max + + # Minimum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_min + + # ISO 3166-1 alpha-2 country codes to target. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Device platforms to target. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::DevicePlatform::OrSymbol + ] + ) + ) + end + attr_accessor :device_platforms + + # Platform audience IDs to exclude. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_audience_ids + + # Genders to target. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::Gender::OrSymbol + ] + ) + ) + end + attr_accessor :genders + + # Platform audience IDs to include. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_audience_ids + + # Platform-specific interest IDs to target. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_ids + + # Language codes to target. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :languages + + # Placement strategy for ad delivery. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::Config::Targeting::PlacementType::OrSymbol + ) + ) + end + attr_accessor :placement_type + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + params( + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::DevicePlatform::OrSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::Gender::OrSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::Targeting::PlacementType::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Maximum age for demographic targeting. + age_max: nil, + # Minimum age for demographic targeting. + age_min: nil, + # ISO 3166-1 alpha-2 country codes to target. + countries: nil, + # Device platforms to target. + device_platforms: nil, + # Platform audience IDs to exclude. + exclude_audience_ids: nil, + # Genders to target. + genders: nil, + # Platform audience IDs to include. + include_audience_ids: nil, + # Platform-specific interest IDs to target. + interest_ids: nil, + # Language codes to target. + languages: nil, + # Placement strategy for ad delivery. + placement_type: nil + ) + end + + sig do + override.returns( + { + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::DevicePlatform::OrSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::Gender::OrSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::AdGroupCreateParams::Config::Targeting::PlacementType::OrSymbol + ) + } + ) + end + def to_hash + end + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::Config::Targeting::DevicePlatform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MOBILE = + T.let( + :mobile, + WhopSDK::AdGroupCreateParams::Config::Targeting::DevicePlatform::TaggedSymbol + ) + DESKTOP = + T.let( + :desktop, + WhopSDK::AdGroupCreateParams::Config::Targeting::DevicePlatform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::Config::Targeting::Gender + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MALE = + T.let( + :male, + WhopSDK::AdGroupCreateParams::Config::Targeting::Gender::TaggedSymbol + ) + FEMALE = + T.let( + :female, + WhopSDK::AdGroupCreateParams::Config::Targeting::Gender::TaggedSymbol + ) + ALL = + T.let( + :all, + WhopSDK::AdGroupCreateParams::Config::Targeting::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Placement strategy for ad delivery. + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::Config::Targeting::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTOMATIC = + T.let( + :automatic, + WhopSDK::AdGroupCreateParams::Config::Targeting::PlacementType::TaggedSymbol + ) + MANUAL = + T.let( + :manual, + WhopSDK::AdGroupCreateParams::Config::Targeting::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::Config::Targeting::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig, + WhopSDK::Internal::AnyHash + ) + end + + # Meta (Facebook/Instagram) ad set configuration. + sig do + returns(T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig::Meta)) + end + attr_reader :meta + + sig do + params( + meta: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OrHash + ) + ).void + end + attr_writer :meta + + # TikTok ad group configuration. + sig do + returns( + T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok) + ) + end + attr_reader :tiktok + + sig do + params( + tiktok: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OrHash + ) + ).void + end + attr_writer :tiktok + + # Platform-specific ad group configuration. + sig do + params( + meta: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OrHash + ), + tiktok: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Meta (Facebook/Instagram) ad set configuration. + meta: nil, + # TikTok ad group configuration. + tiktok: nil + ) + end + + sig do + override.returns( + { + meta: + T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig::Meta), + tiktok: + T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok) + } + ) + end + def to_hash + end + + class Meta < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :android_devices + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :attribution_setting + + # Conversion attribution windows. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec + ] + ) + ) + end + attr_accessor :attribution_spec + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :audience_network_positions + + # Audience type for retargeting. + sig { returns(T.nilable(String)) } + attr_accessor :audience_type + + # Bid amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # Meta bid strategy. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy::OrSymbol + ) + ) + end + attr_accessor :bid_strategy + + # How you are billed on Meta. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::OrSymbol + ) + ) + end + attr_accessor :billing_event + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :brand_safety_content_filter_levels + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :budget_remaining + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :cost_per_result_goal + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :created_time + + # Daily budget in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_budget + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :daily_min_spend_target + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :daily_spend_cap + + # Where ads in this ad set direct people. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::OrSymbol + ) + ) + end + attr_accessor :destination_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :dsa_beneficiary + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :dsa_payor + + # End time (ISO8601). Required for lifetime budgets. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Geo locations to exclude. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations + ) + ) + end + attr_reader :excluded_geo_locations + + sig do + params( + excluded_geo_locations: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::OrHash + ) + ).void + end + attr_writer :excluded_geo_locations + + # Facebook ad placements (feed, reels, stories, etc.). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :facebook_positions + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_control_count + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_control_days + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :frequency_control_type + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity + ] + ) + ) + end + attr_accessor :geo_cities + + # Geo targeting (countries, regions, cities, zips). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations + ) + ) + end + attr_reader :geo_locations + + sig do + params( + geo_locations: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::OrHash + ) + ).void + end + attr_writer :geo_locations + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion + ] + ) + ) + end + attr_accessor :geo_regions + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :geo_zips + + # Instagram account ID for this ad set. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + # Instagram ad placements (stream, story, reels, etc.). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :instagram_positions + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :ios_devices + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :is_dynamic_creative + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::OrSymbol + ) + ) + end + attr_accessor :lead_conversion_location + + # Configuration for a Meta lead gen instant form. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig + ) + ) + end + attr_reader :lead_form_config + + sig do + params( + lead_form_config: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::OrHash + ) + ).void + end + attr_writer :lead_form_config + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :lead_gen_form_id + + # Lifetime budget in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :lifetime_budget + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :lifetime_min_spend_target + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :lifetime_spend_cap + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :location_types + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :messenger_positions + + # What this ad set optimizes for on Meta. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::OrSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Facebook Page ID for this ad set. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + # The object this ad set promotes (pixel, page, etc.). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject + ) + ) + end + attr_reader :promoted_object + + sig do + params( + promoted_object: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject::OrHash + ) + ).void + end + attr_writer :promoted_object + + # Platforms to publish on (facebook, instagram, messenger, audience_network). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :publisher_platforms + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :source_adset_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::Status::OrSymbol + ) + ) + end + attr_accessor :status + + # Advantage+ audience expansion settings. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation + ) + ) + end + attr_reader :targeting_automation + + sig do + params( + targeting_automation: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation::OrHash + ) + ).void + end + attr_writer :targeting_automation + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :threads_positions + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :updated_time + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :user_device + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :user_os + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :whatsapp_phone_number + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :whatsapp_positions + + # Meta (Facebook/Instagram) ad set configuration. + sig do + params( + android_devices: T.nilable(T::Array[String]), + attribution_setting: T.nilable(String), + attribution_spec: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec::OrHash + ] + ), + audience_network_positions: T.nilable(T::Array[String]), + audience_type: T.nilable(String), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::OrSymbol + ), + brand_safety_content_filter_levels: T.nilable(T::Array[String]), + budget_remaining: T.nilable(String), + cost_per_result_goal: T.nilable(Float), + created_time: T.nilable(String), + daily_budget: T.nilable(Integer), + daily_min_spend_target: T.nilable(String), + daily_spend_cap: T.nilable(String), + destination_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::OrSymbol + ), + dsa_beneficiary: T.nilable(String), + dsa_payor: T.nilable(String), + end_time: T.nilable(String), + excluded_geo_locations: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::OrHash + ), + facebook_positions: T.nilable(T::Array[String]), + frequency_control_count: T.nilable(Integer), + frequency_control_days: T.nilable(Integer), + frequency_control_type: T.nilable(String), + geo_cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity::OrHash + ] + ), + geo_locations: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::OrHash + ), + geo_regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion::OrHash + ] + ), + geo_zips: T.nilable(T::Array[String]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + ios_devices: T.nilable(T::Array[String]), + is_dynamic_creative: T.nilable(T::Boolean), + lead_conversion_location: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::OrSymbol + ), + lead_form_config: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::OrHash + ), + lead_gen_form_id: T.nilable(String), + lifetime_budget: T.nilable(Integer), + lifetime_min_spend_target: T.nilable(String), + lifetime_spend_cap: T.nilable(String), + location_types: T.nilable(T::Array[String]), + messenger_positions: T.nilable(T::Array[String]), + optimization_goal: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::OrSymbol + ), + page_id: T.nilable(String), + pixel_id: T.nilable(String), + promoted_object: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject::OrHash + ), + publisher_platforms: T.nilable(T::Array[String]), + source_adset_id: T.nilable(String), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::Status::OrSymbol + ), + targeting_automation: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation::OrHash + ), + threads_positions: T.nilable(T::Array[String]), + updated_time: T.nilable(String), + user_device: T.nilable(T::Array[String]), + user_os: T.nilable(T::Array[String]), + whatsapp_phone_number: T.nilable(String), + whatsapp_positions: T.nilable(T::Array[String]) + ).returns(T.attached_class) + end + def self.new( + android_devices: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + attribution_setting: nil, + # Conversion attribution windows. + attribution_spec: nil, + audience_network_positions: nil, + # Audience type for retargeting. + audience_type: nil, + # Bid amount in cents. + bid_amount: nil, + # Meta bid strategy. + bid_strategy: nil, + # How you are billed on Meta. + billing_event: nil, + brand_safety_content_filter_levels: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + budget_remaining: nil, + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + cost_per_result_goal: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + created_time: nil, + # Daily budget in cents. + daily_budget: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + daily_min_spend_target: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + daily_spend_cap: nil, + # Where ads in this ad set direct people. + destination_type: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + dsa_beneficiary: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + dsa_payor: nil, + # End time (ISO8601). Required for lifetime budgets. + end_time: nil, + # Geo locations to exclude. + excluded_geo_locations: nil, + # Facebook ad placements (feed, reels, stories, etc.). + facebook_positions: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + frequency_control_count: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + frequency_control_days: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + frequency_control_type: nil, + geo_cities: nil, + # Geo targeting (countries, regions, cities, zips). + geo_locations: nil, + geo_regions: nil, + geo_zips: nil, + # Instagram account ID for this ad set. + instagram_actor_id: nil, + # Instagram ad placements (stream, story, reels, etc.). + instagram_positions: nil, + ios_devices: nil, + # Represents `true` or `false` values. + is_dynamic_creative: nil, + lead_conversion_location: nil, + # Configuration for a Meta lead gen instant form. + lead_form_config: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + lead_gen_form_id: nil, + # Lifetime budget in cents. + lifetime_budget: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + lifetime_min_spend_target: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + lifetime_spend_cap: nil, + location_types: nil, + messenger_positions: nil, + # What this ad set optimizes for on Meta. + optimization_goal: nil, + # Facebook Page ID for this ad set. + page_id: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + pixel_id: nil, + # The object this ad set promotes (pixel, page, etc.). + promoted_object: nil, + # Platforms to publish on (facebook, instagram, messenger, audience_network). + publisher_platforms: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + source_adset_id: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + start_time: nil, + status: nil, + # Advantage+ audience expansion settings. + targeting_automation: nil, + threads_positions: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + updated_time: nil, + user_device: nil, + user_os: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + whatsapp_phone_number: nil, + whatsapp_positions: nil + ) + end + + sig do + override.returns( + { + android_devices: T.nilable(T::Array[String]), + attribution_setting: T.nilable(String), + attribution_spec: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec + ] + ), + audience_network_positions: T.nilable(T::Array[String]), + audience_type: T.nilable(String), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::OrSymbol + ), + brand_safety_content_filter_levels: T.nilable(T::Array[String]), + budget_remaining: T.nilable(String), + cost_per_result_goal: T.nilable(Float), + created_time: T.nilable(String), + daily_budget: T.nilable(Integer), + daily_min_spend_target: T.nilable(String), + daily_spend_cap: T.nilable(String), + destination_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::OrSymbol + ), + dsa_beneficiary: T.nilable(String), + dsa_payor: T.nilable(String), + end_time: T.nilable(String), + excluded_geo_locations: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations + ), + facebook_positions: T.nilable(T::Array[String]), + frequency_control_count: T.nilable(Integer), + frequency_control_days: T.nilable(Integer), + frequency_control_type: T.nilable(String), + geo_cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity + ] + ), + geo_locations: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations + ), + geo_regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion + ] + ), + geo_zips: T.nilable(T::Array[String]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + ios_devices: T.nilable(T::Array[String]), + is_dynamic_creative: T.nilable(T::Boolean), + lead_conversion_location: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::OrSymbol + ), + lead_form_config: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig + ), + lead_gen_form_id: T.nilable(String), + lifetime_budget: T.nilable(Integer), + lifetime_min_spend_target: T.nilable(String), + lifetime_spend_cap: T.nilable(String), + location_types: T.nilable(T::Array[String]), + messenger_positions: T.nilable(T::Array[String]), + optimization_goal: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::OrSymbol + ), + page_id: T.nilable(String), + pixel_id: T.nilable(String), + promoted_object: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject + ), + publisher_platforms: T.nilable(T::Array[String]), + source_adset_id: T.nilable(String), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::Status::OrSymbol + ), + targeting_automation: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation + ), + threads_positions: T.nilable(T::Array[String]), + updated_time: T.nilable(String), + user_device: T.nilable(T::Array[String]), + user_os: T.nilable(T::Array[String]), + whatsapp_phone_number: T.nilable(String), + whatsapp_positions: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class AttributionSpec < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec, + WhopSDK::Internal::AnyHash + ) + end + + # Attribution event type (e.g., CLICK_THROUGH, VIEW_THROUGH). + sig { returns(String) } + attr_accessor :event_type + + # Attribution window in days (1, 7, 28). + sig { returns(Integer) } + attr_accessor :window_days + + # Meta conversion attribution window. + sig do + params(event_type: String, window_days: Integer).returns( + T.attached_class + ) + end + def self.new( + # Attribution event type (e.g., CLICK_THROUGH, VIEW_THROUGH). + event_type:, + # Attribution window in days (1, 7, 28). + window_days: + ) + end + + sig do + override.returns({ event_type: String, window_days: Integer }) + end + def to_hash + end + end + + # Meta bid strategy. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST_WITHOUT_CAP = + T.let( + :LOWEST_COST_WITHOUT_CAP, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_BID_CAP = + T.let( + :LOWEST_COST_WITH_BID_CAP, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :COST_CAP, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_MIN_ROAS = + T.let( + :LOWEST_COST_WITH_MIN_ROAS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed on Meta. + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :CLICKS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + NONE = + T.let( + :NONE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + OFFER_CLAIMS = + T.let( + :OFFER_CLAIMS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + PURCHASE = + T.let( + :PURCHASE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + LISTING_INTERACTION = + T.let( + :LISTING_INTERACTION, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Where ads in this ad set direct people. + module DestinationType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNDEFINED = + T.let( + :UNDEFINED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + WEBSITE = + T.let( + :WEBSITE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + APP = + T.let( + :APP, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + FACEBOOK = + T.let( + :FACEBOOK, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSENGER = + T.let( + :MESSENGER, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + WHATSAPP = + T.let( + :WHATSAPP, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + INSTAGRAM_DIRECT = + T.let( + :INSTAGRAM_DIRECT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE = + T.let( + :INSTAGRAM_PROFILE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + PHONE_CALL = + T.let( + :PHONE_CALL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + SHOP_AUTOMATIC = + T.let( + :SHOP_AUTOMATIC, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + APPLINKS_AUTOMATIC = + T.let( + :APPLINKS_AUTOMATIC, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_AD = + T.let( + :ON_AD, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_POST = + T.let( + :ON_POST, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_VIDEO = + T.let( + :ON_VIDEO, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_PAGE = + T.let( + :ON_PAGE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_EVENT = + T.let( + :ON_EVENT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSAGING_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_MESSENGER_WHATSAPP, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = + T.let( + :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + FACEBOOK_PAGE = + T.let( + :FACEBOOK_PAGE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + INSTAGRAM_LIVE = + T.let( + :INSTAGRAM_LIVE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + FACEBOOK_LIVE = + T.let( + :FACEBOOK_LIVE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + IMAGINE = + T.let( + :IMAGINE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + LEAD_FROM_IG_DIRECT = + T.let( + :LEAD_FROM_IG_DIRECT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + LEAD_FROM_MESSENGER = + T.let( + :LEAD_FROM_MESSENGER, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + WEBSITE_AND_LEAD_FORM = + T.let( + :WEBSITE_AND_LEAD_FORM, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + WEBSITE_AND_PHONE_CALL = + T.let( + :WEBSITE_AND_PHONE_CALL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + BROADCAST_CHANNEL = + T.let( + :BROADCAST_CHANNEL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class ExcludedGeoLocations < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations, + WhopSDK::Internal::AnyHash + ) + end + + # City targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City + ] + ) + ) + end + attr_accessor :cities + + # ISO 3166-1 alpha-2 country codes. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Location types (home, recent, travel_in). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :location_types + + # Region/state targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region + ] + ) + ) + end + attr_accessor :regions + + # Zip/postal code targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip + ] + ) + ) + end + attr_accessor :zips + + # Geo locations to exclude. + sig do + params( + cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City::OrHash + ] + ), + countries: T.nilable(T::Array[String]), + location_types: T.nilable(T::Array[String]), + regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region::OrHash + ] + ), + zips: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # City targets. + cities: nil, + # ISO 3166-1 alpha-2 country codes. + countries: nil, + # Location types (home, recent, travel_in). + location_types: nil, + # Region/state targets. + regions: nil, + # Zip/postal code targets. + zips: nil + ) + end + + sig do + override.returns( + { + cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City + ] + ), + countries: T.nilable(T::Array[String]), + location_types: T.nilable(T::Array[String]), + regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region + ] + ), + zips: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip + ] + ) + } + ) + end + def to_hash + end + + class City < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class Region < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class Zip < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + + class GeoCity < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class GeoLocations < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations, + WhopSDK::Internal::AnyHash + ) + end + + # City targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City + ] + ) + ) + end + attr_accessor :cities + + # ISO 3166-1 alpha-2 country codes. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Location types (home, recent, travel_in). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :location_types + + # Region/state targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region + ] + ) + ) + end + attr_accessor :regions + + # Zip/postal code targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip + ] + ) + ) + end + attr_accessor :zips + + # Geo targeting (countries, regions, cities, zips). + sig do + params( + cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City::OrHash + ] + ), + countries: T.nilable(T::Array[String]), + location_types: T.nilable(T::Array[String]), + regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region::OrHash + ] + ), + zips: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # City targets. + cities: nil, + # ISO 3166-1 alpha-2 country codes. + countries: nil, + # Location types (home, recent, travel_in). + location_types: nil, + # Region/state targets. + regions: nil, + # Zip/postal code targets. + zips: nil + ) + end + + sig do + override.returns( + { + cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City + ] + ), + countries: T.nilable(T::Array[String]), + location_types: T.nilable(T::Array[String]), + regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region + ] + ), + zips: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip + ] + ) + } + ) + end + def to_hash + end + + class City < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class Region < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class Zip < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + + class GeoRegion < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + module LeadConversionLocation + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WEBSITE = + T.let( + :website, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + INSTANT_FORMS = + T.let( + :instant_forms, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + MESSENGER = + T.let( + :messenger, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + INSTAGRAM = + T.let( + :instagram, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + CALLS = + T.let( + :calls, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + APP = + T.let( + :app, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LeadFormConfig < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig, + WhopSDK::Internal::AnyHash + ) + end + + # Name of the lead form. + sig { returns(String) } + attr_accessor :name + + # URL to your privacy policy. Required by Meta. + sig { returns(String) } + attr_accessor :privacy_policy_url + + # Questions to ask on the form. + sig do + returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question + ] + ) + end + attr_accessor :questions + + # Background image source: from_ad or custom. + sig { returns(T.nilable(String)) } + attr_accessor :background_image_source + + # URL of custom background image. + sig { returns(T.nilable(String)) } + attr_accessor :background_image_url + + # Whether conditional logic is enabled for questions. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :conditional_logic_enabled + + # CTA button text on the greeting card. + sig { returns(T.nilable(String)) } + attr_accessor :context_card_button_text + + # Optional greeting card bullet points. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :context_card_content + + # Greeting layout: PARAGRAPH_STYLE or LIST_STYLE. + sig { returns(T.nilable(String)) } + attr_accessor :context_card_style + + # Optional greeting card title. + sig { returns(T.nilable(String)) } + attr_accessor :context_card_title + + # Custom disclaimer body text. + sig { returns(T.nilable(String)) } + attr_accessor :custom_disclaimer_body + + # Consent checkboxes for the custom disclaimer. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox + ] + ) + ) + end + attr_accessor :custom_disclaimer_checkboxes + + # Custom disclaimer section title. + sig { returns(T.nilable(String)) } + attr_accessor :custom_disclaimer_title + + # Form type: more_volume, higher_intent, or rich_creative. + sig { returns(T.nilable(String)) } + attr_accessor :form_type + + # Enable Messenger follow-up after form submission. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :messenger_enabled + + # Require phone number verification via OTP (higher_intent only). + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :phone_verification_enabled + + # Custom link text for privacy policy (max 70 chars). + sig { returns(T.nilable(String)) } + attr_accessor :privacy_policy_link_text + + # Custom headline for the questions page. + sig { returns(T.nilable(String)) } + attr_accessor :question_page_custom_headline + + # Headline for rich creative form intro. + sig { returns(T.nilable(String)) } + attr_accessor :rich_creative_headline + + # Overview description for rich creative form intro. + sig { returns(T.nilable(String)) } + attr_accessor :rich_creative_overview + + # Uploaded image URL for rich creative form type. + sig { returns(T.nilable(String)) } + attr_accessor :rich_creative_url + + # Thank you / ending pages (supports multiple for conditional routing). + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage + ] + ) + ) + end + attr_accessor :thank_you_pages + + # Configuration for a Meta lead gen instant form. + sig do + params( + name: String, + privacy_policy_url: String, + questions: + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::OrHash + ], + background_image_source: T.nilable(String), + background_image_url: T.nilable(String), + conditional_logic_enabled: T.nilable(T::Boolean), + context_card_button_text: T.nilable(String), + context_card_content: T.nilable(T::Array[String]), + context_card_style: T.nilable(String), + context_card_title: T.nilable(String), + custom_disclaimer_body: T.nilable(String), + custom_disclaimer_checkboxes: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox::OrHash + ] + ), + custom_disclaimer_title: T.nilable(String), + form_type: T.nilable(String), + messenger_enabled: T.nilable(T::Boolean), + phone_verification_enabled: T.nilable(T::Boolean), + privacy_policy_link_text: T.nilable(String), + question_page_custom_headline: T.nilable(String), + rich_creative_headline: T.nilable(String), + rich_creative_overview: T.nilable(String), + rich_creative_url: T.nilable(String), + thank_you_pages: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # Name of the lead form. + name:, + # URL to your privacy policy. Required by Meta. + privacy_policy_url:, + # Questions to ask on the form. + questions:, + # Background image source: from_ad or custom. + background_image_source: nil, + # URL of custom background image. + background_image_url: nil, + # Whether conditional logic is enabled for questions. + conditional_logic_enabled: nil, + # CTA button text on the greeting card. + context_card_button_text: nil, + # Optional greeting card bullet points. + context_card_content: nil, + # Greeting layout: PARAGRAPH_STYLE or LIST_STYLE. + context_card_style: nil, + # Optional greeting card title. + context_card_title: nil, + # Custom disclaimer body text. + custom_disclaimer_body: nil, + # Consent checkboxes for the custom disclaimer. + custom_disclaimer_checkboxes: nil, + # Custom disclaimer section title. + custom_disclaimer_title: nil, + # Form type: more_volume, higher_intent, or rich_creative. + form_type: nil, + # Enable Messenger follow-up after form submission. + messenger_enabled: nil, + # Require phone number verification via OTP (higher_intent only). + phone_verification_enabled: nil, + # Custom link text for privacy policy (max 70 chars). + privacy_policy_link_text: nil, + # Custom headline for the questions page. + question_page_custom_headline: nil, + # Headline for rich creative form intro. + rich_creative_headline: nil, + # Overview description for rich creative form intro. + rich_creative_overview: nil, + # Uploaded image URL for rich creative form type. + rich_creative_url: nil, + # Thank you / ending pages (supports multiple for conditional routing). + thank_you_pages: nil + ) + end + + sig do + override.returns( + { + name: String, + privacy_policy_url: String, + questions: + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question + ], + background_image_source: T.nilable(String), + background_image_url: T.nilable(String), + conditional_logic_enabled: T.nilable(T::Boolean), + context_card_button_text: T.nilable(String), + context_card_content: T.nilable(T::Array[String]), + context_card_style: T.nilable(String), + context_card_title: T.nilable(String), + custom_disclaimer_body: T.nilable(String), + custom_disclaimer_checkboxes: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox + ] + ), + custom_disclaimer_title: T.nilable(String), + form_type: T.nilable(String), + messenger_enabled: T.nilable(T::Boolean), + phone_verification_enabled: T.nilable(T::Boolean), + privacy_policy_link_text: T.nilable(String), + question_page_custom_headline: T.nilable(String), + rich_creative_headline: T.nilable(String), + rich_creative_overview: T.nilable(String), + rich_creative_url: T.nilable(String), + thank_you_pages: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage + ] + ) + } + ) + end + def to_hash + end + + class Question < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question, + WhopSDK::Internal::AnyHash + ) + end + + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + sig { returns(String) } + attr_accessor :type + + # Group ID for conditional question routing. + sig { returns(T.nilable(String)) } + attr_accessor :conditional_questions_group_id + + # Questions shown conditionally based on this question's answer. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion + ] + ) + ) + end + attr_accessor :dependent_conditional_questions + + # Helper text shown below the question. + sig { returns(T.nilable(String)) } + attr_accessor :inline_context + + # Unique key for this question. + sig { returns(T.nilable(String)) } + attr_accessor :key + + # Custom label for CUSTOM questions. + sig { returns(T.nilable(String)) } + attr_accessor :label + + # Answer options for multiple choice CUSTOM questions. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option + ] + ) + ) + end + attr_accessor :options + + # UI hint: short_answer, multiple_choice, or appointment. + sig { returns(T.nilable(String)) } + attr_accessor :question_format + + # A question on a Meta lead gen form. + sig do + params( + type: String, + conditional_questions_group_id: T.nilable(String), + dependent_conditional_questions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::OrHash + ] + ), + inline_context: T.nilable(String), + key: T.nilable(String), + label: T.nilable(String), + options: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::OrHash + ] + ), + question_format: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + type:, + # Group ID for conditional question routing. + conditional_questions_group_id: nil, + # Questions shown conditionally based on this question's answer. + dependent_conditional_questions: nil, + # Helper text shown below the question. + inline_context: nil, + # Unique key for this question. + key: nil, + # Custom label for CUSTOM questions. + label: nil, + # Answer options for multiple choice CUSTOM questions. + options: nil, + # UI hint: short_answer, multiple_choice, or appointment. + question_format: nil + ) + end + + sig do + override.returns( + { + type: String, + conditional_questions_group_id: T.nilable(String), + dependent_conditional_questions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion + ] + ), + inline_context: T.nilable(String), + key: T.nilable(String), + label: T.nilable(String), + options: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option + ] + ), + question_format: T.nilable(String) + } + ) + end + def to_hash + end + + class DependentConditionalQuestion < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion, + WhopSDK::Internal::AnyHash + ) + end + + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + sig { returns(String) } + attr_accessor :type + + # Helper text shown below the question. + sig { returns(T.nilable(String)) } + attr_accessor :inline_context + + # Unique key for this question. + sig { returns(T.nilable(String)) } + attr_accessor :key + + # Custom label for CUSTOM questions. + sig { returns(T.nilable(String)) } + attr_accessor :label + + # Answer options for multiple choice questions. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option + ] + ) + ) + end + attr_accessor :options + + # A dependent conditional question (non-recursive to avoid schema recursion). + sig do + params( + type: String, + inline_context: T.nilable(String), + key: T.nilable(String), + label: T.nilable(String), + options: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + type:, + # Helper text shown below the question. + inline_context: nil, + # Unique key for this question. + key: nil, + # Custom label for CUSTOM questions. + label: nil, + # Answer options for multiple choice questions. + options: nil + ) + end + + sig do + override.returns( + { + type: String, + inline_context: T.nilable(String), + key: T.nilable(String), + label: T.nilable(String), + options: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option + ] + ) + } + ) + end + def to_hash + end + + class Option < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option, + WhopSDK::Internal::AnyHash + ) + end + + # Unique key for this option. + sig { returns(String) } + attr_accessor :key + + # Display text for this option. + sig { returns(String) } + attr_accessor :value + + # Conditional logic routing for this answer option. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic + ) + ) + end + attr_reader :logic + + sig do + params( + logic: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic::OrHash + ) + ).void + end + attr_writer :logic + + # An answer option for a multiple choice lead form question. + sig do + params( + key: String, + value: String, + logic: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Unique key for this option. + key:, + # Display text for this option. + value:, + # Conditional logic routing for this answer option. + logic: nil + ) + end + + sig do + override.returns( + { + key: String, + value: String, + logic: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic + ) + } + ) + end + def to_hash + end + + class Logic < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic, + WhopSDK::Internal::AnyHash + ) + end + + # Logic type: go_to_question, submit_form, or close_form. + sig { returns(String) } + attr_accessor :type + + # Index of the end page to route to (for submit_form type). + sig { returns(T.nilable(Integer)) } + attr_accessor :target_end_page_index + + # Index of the question to route to (for go_to_question type). + sig { returns(T.nilable(Integer)) } + attr_accessor :target_question_index + + # Conditional logic routing for this answer option. + sig do + params( + type: String, + target_end_page_index: T.nilable(Integer), + target_question_index: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Logic type: go_to_question, submit_form, or close_form. + type:, + # Index of the end page to route to (for submit_form type). + target_end_page_index: nil, + # Index of the question to route to (for go_to_question type). + target_question_index: nil + ) + end + + sig do + override.returns( + { + type: String, + target_end_page_index: T.nilable(Integer), + target_question_index: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + end + + class Option < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option, + WhopSDK::Internal::AnyHash + ) + end + + # Unique key for this option. + sig { returns(String) } + attr_accessor :key + + # Display text for this option. + sig { returns(String) } + attr_accessor :value + + # Conditional logic routing for this answer option. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic + ) + ) + end + attr_reader :logic + + sig do + params( + logic: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic::OrHash + ) + ).void + end + attr_writer :logic + + # An answer option for a multiple choice lead form question. + sig do + params( + key: String, + value: String, + logic: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Unique key for this option. + key:, + # Display text for this option. + value:, + # Conditional logic routing for this answer option. + logic: nil + ) + end + + sig do + override.returns( + { + key: String, + value: String, + logic: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic + ) + } + ) + end + def to_hash + end + + class Logic < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic, + WhopSDK::Internal::AnyHash + ) + end + + # Logic type: go_to_question, submit_form, or close_form. + sig { returns(String) } + attr_accessor :type + + # Index of the end page to route to (for submit_form type). + sig { returns(T.nilable(Integer)) } + attr_accessor :target_end_page_index + + # Index of the question to route to (for go_to_question type). + sig { returns(T.nilable(Integer)) } + attr_accessor :target_question_index + + # Conditional logic routing for this answer option. + sig do + params( + type: String, + target_end_page_index: T.nilable(Integer), + target_question_index: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Logic type: go_to_question, submit_form, or close_form. + type:, + # Index of the end page to route to (for submit_form type). + target_end_page_index: nil, + # Index of the question to route to (for go_to_question type). + target_question_index: nil + ) + end + + sig do + override.returns( + { + type: String, + target_end_page_index: T.nilable(Integer), + target_question_index: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + end + + class CustomDisclaimerCheckbox < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox, + WhopSDK::Internal::AnyHash + ) + end + + # Unique key for this checkbox. + sig { returns(String) } + attr_accessor :key + + # Label text for the checkbox. + sig { returns(String) } + attr_accessor :text + + # Whether the checkbox is checked by default. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :is_checked_by_default + + # Whether the checkbox must be checked to submit. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :is_required + + # A consent checkbox for the custom disclaimer section. + sig do + params( + key: String, + text: String, + is_checked_by_default: T.nilable(T::Boolean), + is_required: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # Unique key for this checkbox. + key:, + # Label text for the checkbox. + text:, + # Whether the checkbox is checked by default. + is_checked_by_default: nil, + # Whether the checkbox must be checked to submit. + is_required: nil + ) + end + + sig do + override.returns( + { + key: String, + text: String, + is_checked_by_default: T.nilable(T::Boolean), + is_required: T.nilable(T::Boolean) + } + ) + end + def to_hash + end + end + + class ThankYouPage < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage, + WhopSDK::Internal::AnyHash + ) + end + + # Body text for this ending page. + sig { returns(T.nilable(String)) } + attr_accessor :body + + # Business phone number for call CTA. + sig { returns(T.nilable(String)) } + attr_accessor :business_phone + + # Custom button text. + sig { returns(T.nilable(String)) } + attr_accessor :button_text + + # CTA button type: VIEW_WEBSITE, CALL_BUSINESS, DOWNLOAD. + sig { returns(T.nilable(String)) } + attr_accessor :button_type + + # Question group ID for conditional routing to this page. + sig { returns(T.nilable(String)) } + attr_accessor :conditional_question_group_id + + # Enable Messenger follow-up. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :enable_messenger + + # Uploaded file URL for gated content download. + sig { returns(T.nilable(String)) } + attr_accessor :gated_file_url + + # URL the button links to. + sig { returns(T.nilable(String)) } + attr_accessor :link + + # Internal name for this ending page. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Headline for this ending page. + sig { returns(T.nilable(String)) } + attr_accessor :title + + # A thank-you / ending page for a Meta lead gen form. + sig do + params( + body: T.nilable(String), + business_phone: T.nilable(String), + button_text: T.nilable(String), + button_type: T.nilable(String), + conditional_question_group_id: T.nilable(String), + enable_messenger: T.nilable(T::Boolean), + gated_file_url: T.nilable(String), + link: T.nilable(String), + name: T.nilable(String), + title: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Body text for this ending page. + body: nil, + # Business phone number for call CTA. + business_phone: nil, + # Custom button text. + button_text: nil, + # CTA button type: VIEW_WEBSITE, CALL_BUSINESS, DOWNLOAD. + button_type: nil, + # Question group ID for conditional routing to this page. + conditional_question_group_id: nil, + # Enable Messenger follow-up. + enable_messenger: nil, + # Uploaded file URL for gated content download. + gated_file_url: nil, + # URL the button links to. + link: nil, + # Internal name for this ending page. + name: nil, + # Headline for this ending page. + title: nil + ) + end + + sig do + override.returns( + { + body: T.nilable(String), + business_phone: T.nilable(String), + button_text: T.nilable(String), + button_type: T.nilable(String), + conditional_question_group_id: T.nilable(String), + enable_messenger: T.nilable(T::Boolean), + gated_file_url: T.nilable(String), + link: T.nilable(String), + name: T.nilable(String), + title: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + # What this ad set optimizes for on Meta. + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NONE = + T.let( + :NONE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :AD_RECALL_LIFT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + ENGAGED_USERS = + T.let( + :ENGAGED_USERS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :EVENT_RESPONSES, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :QUALITY_LEAD, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + OFFSITE_CONVERSIONS = + T.let( + :OFFSITE_CONVERSIONS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + QUALITY_CALL = + T.let( + :QUALITY_CALL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :LANDING_PAGE_VIEWS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + VISIT_INSTAGRAM_PROFILE = + T.let( + :VISIT_INSTAGRAM_PROFILE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + DERIVED_EVENTS = + T.let( + :DERIVED_EVENTS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = + T.let( + :APP_INSTALLS_AND_OFFSITE_CONVERSIONS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :CONVERSATIONS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + IN_APP_VALUE = + T.let( + :IN_APP_VALUE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + MESSAGING_PURCHASE_CONVERSION = + T.let( + :MESSAGING_PURCHASE_CONVERSION, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + SUBSCRIBERS = + T.let( + :SUBSCRIBERS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :REMINDERS_SET, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + MEANINGFUL_CALL_ATTEMPT = + T.let( + :MEANINGFUL_CALL_ATTEMPT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + PROFILE_VISIT = + T.let( + :PROFILE_VISIT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + PROFILE_AND_PAGE_ENGAGEMENT = + T.let( + :PROFILE_AND_PAGE_ENGAGEMENT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + ENGAGED_REACH = + T.let( + :ENGAGED_REACH, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + ENGAGED_PAGE_VIEWS = + T.let( + :ENGAGED_PAGE_VIEWS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = + T.let( + :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + ADVERTISER_SILOED_VALUE = + T.let( + :ADVERTISER_SILOED_VALUE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_OBJECTIVE = + T.let( + :AUTOMATIC_OBJECTIVE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + MESSAGING_APPOINTMENT_CONVERSION = + T.let( + :MESSAGING_APPOINTMENT_CONVERSION, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + class PromotedObject < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject, + WhopSDK::Internal::AnyHash + ) + end + + # Custom conversion rule ID (numeric, from Meta Events Manager). + sig { returns(T.nilable(String)) } + attr_accessor :custom_conversion_id + + # Pixel event name, used when custom_event_type is OTHER. + sig { returns(T.nilable(String)) } + attr_accessor :custom_event_str + + # Custom event type (e.g., PURCHASE, COMPLETE_REGISTRATION, OTHER). + sig { returns(T.nilable(String)) } + attr_accessor :custom_event_type + + # Facebook Page ID. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # Meta Pixel ID for conversion tracking. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + # WhatsApp phone number for messaging campaigns. + sig { returns(T.nilable(String)) } + attr_accessor :whatsapp_phone_number + + # The object this ad set promotes (pixel, page, etc.). + sig do + params( + custom_conversion_id: T.nilable(String), + custom_event_str: T.nilable(String), + custom_event_type: T.nilable(String), + page_id: T.nilable(String), + pixel_id: T.nilable(String), + whatsapp_phone_number: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Custom conversion rule ID (numeric, from Meta Events Manager). + custom_conversion_id: nil, + # Pixel event name, used when custom_event_type is OTHER. + custom_event_str: nil, + # Custom event type (e.g., PURCHASE, COMPLETE_REGISTRATION, OTHER). + custom_event_type: nil, + # Facebook Page ID. + page_id: nil, + # Meta Pixel ID for conversion tracking. + pixel_id: nil, + # WhatsApp phone number for messaging campaigns. + whatsapp_phone_number: nil + ) + end + + sig do + override.returns( + { + custom_conversion_id: T.nilable(String), + custom_event_str: T.nilable(String), + custom_event_type: T.nilable(String), + page_id: T.nilable(String), + pixel_id: T.nilable(String), + whatsapp_phone_number: T.nilable(String) + } + ) + end + def to_hash + end + end + + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::Status::TaggedSymbol + ) + PAUSED = + T.let( + :PAUSED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TargetingAutomation < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation, + WhopSDK::Internal::AnyHash + ) + end + + # 0 = off (use exact targeting), 1 = on (let Meta expand audience). + sig { returns(T.nilable(Integer)) } + attr_accessor :advantage_audience + + # Advantage+ audience expansion settings. + sig do + params(advantage_audience: T.nilable(Integer)).returns( + T.attached_class + ) + end + def self.new( + # 0 = off (use exact targeting), 1 = on (let Meta expand audience). + advantage_audience: nil + ) + end + + sig { override.returns({ advantage_audience: T.nilable(Integer) }) } + def to_hash + end + end + end + + class Tiktok < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok, + WhopSDK::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action + ] + ) + ) + end + attr_accessor :actions + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::OrSymbol + ] + ) + ) + end + attr_accessor :age_groups + + # App ID for app promotion campaigns. + sig { returns(T.nilable(String)) } + attr_accessor :app_id + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount::OrSymbol + ) + ) + end + attr_accessor :attribution_event_count + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :audience_ids + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :audience_rule + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType::OrSymbol + ) + ) + end + attr_accessor :audience_type + + # Bid price (cost per result for Cost Cap). + sig { returns(T.nilable(Float)) } + attr_accessor :bid_price + + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BidType::OrSymbol + ) + ) + end + attr_accessor :bid_type + + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent::OrSymbol + ) + ) + end + attr_accessor :billing_event + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::OrSymbol + ) + ) + end + attr_accessor :brand_safety_type + + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode::OrSymbol + ) + ) + end + attr_accessor :budget_mode + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :carrier_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :category_exclusion_ids + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::OrSymbol + ) + ) + end + attr_accessor :click_attribution_window + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :comment_disabled + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :contextual_tag_ids + + # Target cost per conversion for oCPM. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_bid_price + + # Creative delivery strategy. + sig { returns(T.nilable(String)) } + attr_accessor :creative_material_mode + + # Ad delivery schedule (48x7 character string). + sig { returns(T.nilable(String)) } + attr_accessor :dayparting + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :deep_funnel_event_source + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :deep_funnel_event_source_id + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::OrSymbol + ) + ) + end + attr_accessor :deep_funnel_optimization_status + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :device_model_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :device_price_ranges + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::OrSymbol + ) + ) + end + attr_accessor :engaged_view_attribution_window + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :excluded_audience_ids + + # TikTok location/region IDs to exclude. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :excluded_location_ids + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_schedule + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender::OrSymbol + ) + ) + end + attr_accessor :gender + + # Business Center ID for BC_AUTH_TT identity. + sig { returns(T.nilable(String)) } + attr_accessor :identity_authorized_bc_id + + # TikTok identity ID for the ad group. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + # Identity type (AUTH_CODE, TT_USER, BC_AUTH_TT). + sig { returns(T.nilable(String)) } + attr_accessor :identity_type + + # Instant form configuration for lead generation campaigns. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig + ) + ) + end + attr_reader :instant_form_config + + sig do + params( + instant_form_config: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::OrHash + ) + ).void + end + attr_writer :instant_form_config + + # TikTok instant form ID (set automatically when instant_form_config is provided). + sig { returns(T.nilable(String)) } + attr_accessor :instant_form_id + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_category_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_keyword_ids + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :inventory_filter_enabled + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting::OrSymbol + ) + ) + end + attr_accessor :ios14_targeting + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :isp_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :languages + + # TikTok location/region IDs for geo targeting. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :location_ids + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :min_android_version + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :min_ios_version + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :network_types + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperatingSystem::OrSymbol + ] + ) + ) + end + attr_accessor :operating_systems + + # Initial status (ENABLE, DISABLE). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus::OrSymbol + ) + ) + end + attr_accessor :operation_status + + # Conversion event (e.g., COMPLETE_PAYMENT). + sig { returns(T.nilable(String)) } + attr_accessor :optimization_event + + # What this ad group optimizes for on TikTok. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::OrSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing::OrSymbol + ) + ) + end + attr_accessor :pacing + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :pangle_audience_package_exclude_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :pangle_audience_package_include_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :pangle_block_app_ids + + # TikTok Pixel ID for conversion tracking. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType::OrSymbol + ) + ) + end + attr_accessor :placement_type + + # Placements (PLACEMENT_TIKTOK, PLACEMENT_PANGLE, etc.). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :placements + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :product_set_id + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource::OrSymbol + ) + ) + end + attr_accessor :product_source + + # Promotion type (optimization location). + sig { returns(T.nilable(String)) } + attr_accessor :promotion_type + + # Schedule end time (UTC, YYYY-MM-DD HH:MM:SS). + sig { returns(T.nilable(String)) } + attr_accessor :schedule_end_time + + # Schedule start time (UTC, YYYY-MM-DD HH:MM:SS). + sig { returns(T.nilable(String)) } + attr_accessor :schedule_start_time + + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType::OrSymbol + ) + ) + end + attr_accessor :schedule_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :secondary_optimization_event + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :shopping_ads_retargeting_actions_days + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::OrSymbol + ) + ) + end + attr_accessor :shopping_ads_retargeting_type + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower::OrSymbol + ) + ) + end + attr_accessor :spending_power + + # TikTok subplacements (IN_FEED, SEARCH_FEED, etc.). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tiktok_subplacements + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :vertical_sensitivity_id + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :video_download_disabled + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :video_user_actions + + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow::OrSymbol + ) + ) + end + attr_accessor :view_attribution_window + + # TikTok ad group configuration. + sig do + params( + actions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::OrHash + ] + ), + age_groups: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::OrSymbol + ] + ), + app_id: T.nilable(String), + attribution_event_count: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount::OrSymbol + ), + audience_ids: T.nilable(T::Array[String]), + audience_rule: T.nilable(T::Hash[Symbol, T.anything]), + audience_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType::OrSymbol + ), + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BidType::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent::OrSymbol + ), + brand_safety_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::OrSymbol + ), + budget_mode: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode::OrSymbol + ), + carrier_ids: T.nilable(T::Array[String]), + category_exclusion_ids: T.nilable(T::Array[String]), + click_attribution_window: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::OrSymbol + ), + comment_disabled: T.nilable(T::Boolean), + contextual_tag_ids: T.nilable(T::Array[String]), + conversion_bid_price: T.nilable(Float), + creative_material_mode: T.nilable(String), + dayparting: T.nilable(String), + deep_funnel_event_source: T.nilable(String), + deep_funnel_event_source_id: T.nilable(String), + deep_funnel_optimization_status: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::OrSymbol + ), + device_model_ids: T.nilable(T::Array[String]), + device_price_ranges: T.nilable(T::Array[String]), + engaged_view_attribution_window: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::OrSymbol + ), + excluded_audience_ids: T.nilable(T::Array[String]), + excluded_location_ids: T.nilable(T::Array[String]), + frequency: T.nilable(Integer), + frequency_schedule: T.nilable(Integer), + gender: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + instant_form_config: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::OrHash + ), + instant_form_id: T.nilable(String), + interest_category_ids: T.nilable(T::Array[String]), + interest_keyword_ids: T.nilable(T::Array[String]), + inventory_filter_enabled: T.nilable(T::Boolean), + ios14_targeting: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting::OrSymbol + ), + isp_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + location_ids: T.nilable(T::Array[String]), + min_android_version: T.nilable(String), + min_ios_version: T.nilable(String), + network_types: T.nilable(T::Array[String]), + operating_systems: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperatingSystem::OrSymbol + ] + ), + operation_status: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus::OrSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing::OrSymbol + ), + pangle_audience_package_exclude_ids: T.nilable(T::Array[String]), + pangle_audience_package_include_ids: T.nilable(T::Array[String]), + pangle_block_app_ids: T.nilable(T::Array[String]), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType::OrSymbol + ), + placements: T.nilable(T::Array[String]), + product_set_id: T.nilable(String), + product_source: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource::OrSymbol + ), + promotion_type: T.nilable(String), + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType::OrSymbol + ), + secondary_optimization_event: T.nilable(String), + shopping_ads_retargeting_actions_days: T.nilable(Integer), + shopping_ads_retargeting_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::OrSymbol + ), + spending_power: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower::OrSymbol + ), + tiktok_subplacements: T.nilable(T::Array[String]), + vertical_sensitivity_id: T.nilable(String), + video_download_disabled: T.nilable(T::Boolean), + video_user_actions: T.nilable(T::Array[String]), + view_attribution_window: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + actions: nil, + age_groups: nil, + # App ID for app promotion campaigns. + app_id: nil, + attribution_event_count: nil, + audience_ids: nil, + # Represents untyped JSON + audience_rule: nil, + audience_type: nil, + # Bid price (cost per result for Cost Cap). + bid_price: nil, + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + bid_type: nil, + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + billing_event: nil, + brand_safety_type: nil, + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + budget_mode: nil, + carrier_ids: nil, + category_exclusion_ids: nil, + click_attribution_window: nil, + # Represents `true` or `false` values. + comment_disabled: nil, + contextual_tag_ids: nil, + # Target cost per conversion for oCPM. + conversion_bid_price: nil, + # Creative delivery strategy. + creative_material_mode: nil, + # Ad delivery schedule (48x7 character string). + dayparting: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + deep_funnel_event_source: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + deep_funnel_event_source_id: nil, + deep_funnel_optimization_status: nil, + device_model_ids: nil, + device_price_ranges: nil, + engaged_view_attribution_window: nil, + excluded_audience_ids: nil, + # TikTok location/region IDs to exclude. + excluded_location_ids: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + frequency: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + frequency_schedule: nil, + gender: nil, + # Business Center ID for BC_AUTH_TT identity. + identity_authorized_bc_id: nil, + # TikTok identity ID for the ad group. + identity_id: nil, + # Identity type (AUTH_CODE, TT_USER, BC_AUTH_TT). + identity_type: nil, + # Instant form configuration for lead generation campaigns. + instant_form_config: nil, + # TikTok instant form ID (set automatically when instant_form_config is provided). + instant_form_id: nil, + interest_category_ids: nil, + interest_keyword_ids: nil, + # Represents `true` or `false` values. + inventory_filter_enabled: nil, + ios14_targeting: nil, + isp_ids: nil, + languages: nil, + # TikTok location/region IDs for geo targeting. + location_ids: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + min_android_version: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + min_ios_version: nil, + network_types: nil, + operating_systems: nil, + # Initial status (ENABLE, DISABLE). + operation_status: nil, + # Conversion event (e.g., COMPLETE_PAYMENT). + optimization_event: nil, + # What this ad group optimizes for on TikTok. + optimization_goal: nil, + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + pacing: nil, + pangle_audience_package_exclude_ids: nil, + pangle_audience_package_include_ids: nil, + pangle_block_app_ids: nil, + # TikTok Pixel ID for conversion tracking. + pixel_id: nil, + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + placement_type: nil, + # Placements (PLACEMENT_TIKTOK, PLACEMENT_PANGLE, etc.). + placements: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + product_set_id: nil, + product_source: nil, + # Promotion type (optimization location). + promotion_type: nil, + # Schedule end time (UTC, YYYY-MM-DD HH:MM:SS). + schedule_end_time: nil, + # Schedule start time (UTC, YYYY-MM-DD HH:MM:SS). + schedule_start_time: nil, + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + schedule_type: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + secondary_optimization_event: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + shopping_ads_retargeting_actions_days: nil, + shopping_ads_retargeting_type: nil, + spending_power: nil, + # TikTok subplacements (IN_FEED, SEARCH_FEED, etc.). + tiktok_subplacements: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + vertical_sensitivity_id: nil, + # Represents `true` or `false` values. + video_download_disabled: nil, + video_user_actions: nil, + view_attribution_window: nil + ) + end + + sig do + override.returns( + { + actions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action + ] + ), + age_groups: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::OrSymbol + ] + ), + app_id: T.nilable(String), + attribution_event_count: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount::OrSymbol + ), + audience_ids: T.nilable(T::Array[String]), + audience_rule: T.nilable(T::Hash[Symbol, T.anything]), + audience_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType::OrSymbol + ), + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BidType::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent::OrSymbol + ), + brand_safety_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::OrSymbol + ), + budget_mode: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode::OrSymbol + ), + carrier_ids: T.nilable(T::Array[String]), + category_exclusion_ids: T.nilable(T::Array[String]), + click_attribution_window: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::OrSymbol + ), + comment_disabled: T.nilable(T::Boolean), + contextual_tag_ids: T.nilable(T::Array[String]), + conversion_bid_price: T.nilable(Float), + creative_material_mode: T.nilable(String), + dayparting: T.nilable(String), + deep_funnel_event_source: T.nilable(String), + deep_funnel_event_source_id: T.nilable(String), + deep_funnel_optimization_status: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::OrSymbol + ), + device_model_ids: T.nilable(T::Array[String]), + device_price_ranges: T.nilable(T::Array[String]), + engaged_view_attribution_window: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::OrSymbol + ), + excluded_audience_ids: T.nilable(T::Array[String]), + excluded_location_ids: T.nilable(T::Array[String]), + frequency: T.nilable(Integer), + frequency_schedule: T.nilable(Integer), + gender: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + instant_form_config: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig + ), + instant_form_id: T.nilable(String), + interest_category_ids: T.nilable(T::Array[String]), + interest_keyword_ids: T.nilable(T::Array[String]), + inventory_filter_enabled: T.nilable(T::Boolean), + ios14_targeting: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting::OrSymbol + ), + isp_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + location_ids: T.nilable(T::Array[String]), + min_android_version: T.nilable(String), + min_ios_version: T.nilable(String), + network_types: T.nilable(T::Array[String]), + operating_systems: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperatingSystem::OrSymbol + ] + ), + operation_status: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus::OrSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing::OrSymbol + ), + pangle_audience_package_exclude_ids: + T.nilable(T::Array[String]), + pangle_audience_package_include_ids: + T.nilable(T::Array[String]), + pangle_block_app_ids: T.nilable(T::Array[String]), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType::OrSymbol + ), + placements: T.nilable(T::Array[String]), + product_set_id: T.nilable(String), + product_source: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource::OrSymbol + ), + promotion_type: T.nilable(String), + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType::OrSymbol + ), + secondary_optimization_event: T.nilable(String), + shopping_ads_retargeting_actions_days: T.nilable(Integer), + shopping_ads_retargeting_type: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::OrSymbol + ), + spending_power: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower::OrSymbol + ), + tiktok_subplacements: T.nilable(T::Array[String]), + vertical_sensitivity_id: T.nilable(String), + video_download_disabled: T.nilable(T::Boolean), + video_user_actions: T.nilable(T::Array[String]), + view_attribution_window: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow::OrSymbol + ) + } + ) + end + def to_hash + end + + class Action < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action, + WhopSDK::Internal::AnyHash + ) + end + + # Behavioral category IDs. Use /tool/action_category/ to list them. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :action_category_ids + + # Lookback window in days. TikTok accepts 7, 15, 30, 60, 90, or 180. + sig { returns(T.nilable(Integer)) } + attr_accessor :action_period + + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + sig do + returns( + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene::OrSymbol + ) + ) + end + attr_accessor :action_scene + + # Specific video interactions (WATCHED_TO_END, LIKED, COMMENTED, SHARED, FOLLOWED, + # PROFILE_VISITED). + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::OrSymbol + ] + ) + ) + end + attr_accessor :video_user_actions + + # A single TikTok behavioral targeting entry. One category of past user behavior + # (what they did, over what window, on which kind of content). See + # docs/tiktok_api/ad_group.md § actions. + sig do + params( + action_category_ids: T.nilable(T::Array[String]), + action_period: T.nilable(Integer), + action_scene: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene::OrSymbol + ), + video_user_actions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::OrSymbol + ] + ) + ).returns(T.attached_class) + end + def self.new( + # Behavioral category IDs. Use /tool/action_category/ to list them. + action_category_ids: nil, + # Lookback window in days. TikTok accepts 7, 15, 30, 60, 90, or 180. + action_period: nil, + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + action_scene: nil, + # Specific video interactions (WATCHED_TO_END, LIKED, COMMENTED, SHARED, FOLLOWED, + # PROFILE_VISITED). + video_user_actions: nil + ) + end + + sig do + override.returns( + { + action_category_ids: T.nilable(T::Array[String]), + action_period: T.nilable(Integer), + action_scene: + T.nilable( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene::OrSymbol + ), + video_user_actions: + T.nilable( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::OrSymbol + ] + ) + } + ) + end + def to_hash + end + + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + module ActionScene + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + VIDEO_RELATED = + T.let( + :VIDEO_RELATED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ) + CREATOR_RELATED = + T.let( + :CREATOR_RELATED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ) + HASHTAG_RELATED = + T.let( + :HASHTAG_RELATED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ) + LIVE_RELATED = + T.let( + :LIVE_RELATED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Specific past video interactions used for behavioral targeting. See + # docs/tiktok_api/ad_group.md § actions.video_user_actions. + module VideoUserAction + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WATCHED_TO_END = + T.let( + :WATCHED_TO_END, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + LIKED = + T.let( + :LIKED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + COMMENTED = + T.let( + :COMMENTED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + SHARED = + T.let( + :SHARED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + FOLLOWED = + T.let( + :FOLLOWED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + PROFILE_VISITED = + T.let( + :PROFILE_VISITED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # Age groups targetable on TikTok. See docs/tiktok_api/ad_group.md § age_groups. + module AgeGroup + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AGE_13_17 = + T.let( + :AGE_13_17, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_18_24 = + T.let( + :AGE_18_24, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_25_34 = + T.let( + :AGE_25_34, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_35_44 = + T.let( + :AGE_35_44, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_45_54 = + T.let( + :AGE_45_54, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_55_100 = + T.let( + :AGE_55_100, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ] + ) + end + def self.values + end + end + + module AttributionEventCount + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount::TaggedSymbol + ) + EVERY = + T.let( + :EVERY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount::TaggedSymbol + ) + ONCE = + T.let( + :ONCE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AttributionEventCount::TaggedSymbol + ] + ) + end + def self.values + end + end + + module AudienceType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NORMAL = + T.let( + :NORMAL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType::TaggedSymbol + ) + SMART_INTERESTS_BEHAVIORS = + T.let( + :SMART_INTERESTS_BEHAVIORS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::AudienceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + module BidType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BidType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BID_TYPE_NO_BID = + T.let( + :BID_TYPE_NO_BID, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BidType::TaggedSymbol + ) + BID_TYPE_CUSTOM = + T.let( + :BID_TYPE_CUSTOM, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BidType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BidType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CPC = + T.let( + :CPC, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ) + CPM = + T.let( + :CPM, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ) + OCPM = + T.let( + :OCPM, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ) + CPV = + T.let( + :CPV, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BrandSafetyType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NO_BRAND_SAFETY = + T.let( + :NO_BRAND_SAFETY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + STANDARD_INVENTORY = + T.let( + :STANDARD_INVENTORY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + LIMITED_INVENTORY = + T.let( + :LIMITED_INVENTORY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + FULL_INVENTORY = + T.let( + :FULL_INVENTORY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + EXPANDED_INVENTORY = + T.let( + :EXPANDED_INVENTORY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BUDGET_MODE_DAY = + T.let( + :BUDGET_MODE_DAY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_TOTAL = + T.let( + :BUDGET_MODE_TOTAL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = + T.let( + :BUDGET_MODE_DYNAMIC_DAILY_BUDGET, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::BudgetMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ClickAttributionWindow + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF = + T.let( + :OFF, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + ONE_DAY = + T.let( + :ONE_DAY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + SEVEN_DAYS = + T.let( + :SEVEN_DAYS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + FOURTEEN_DAYS = + T.let( + :FOURTEEN_DAYS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + TWENTY_EIGHT_DAYS = + T.let( + :TWENTY_EIGHT_DAYS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ] + ) + end + def self.values + end + end + + module DeepFunnelOptimizationStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ON = + T.let( + :ON, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::TaggedSymbol + ) + OFF = + T.let( + :OFF, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + module EngagedViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF = + T.let( + :OFF, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::TaggedSymbol + ) + ONE_DAY = + T.let( + :ONE_DAY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::TaggedSymbol + ) + SEVEN_DAYS = + T.let( + :SEVEN_DAYS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GENDER_UNLIMITED = + T.let( + :GENDER_UNLIMITED, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender::TaggedSymbol + ) + GENDER_MALE = + T.let( + :GENDER_MALE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender::TaggedSymbol + ) + GENDER_FEMALE = + T.let( + :GENDER_FEMALE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + + class InstantFormConfig < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig, + WhopSDK::Internal::AnyHash + ) + end + + # URL to your privacy policy. + sig { returns(String) } + attr_accessor :privacy_policy_url + + # Form questions (at least one required). + sig do + returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question + ] + ) + end + attr_accessor :questions + + # Submit button text. + sig { returns(T.nilable(String)) } + attr_accessor :button_text + + # Greeting text shown at the top of the form. + sig { returns(T.nilable(String)) } + attr_accessor :greeting + + # Form name. Auto-generated if omitted. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Instant form configuration for lead generation campaigns. + sig do + params( + privacy_policy_url: String, + questions: + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question::OrHash + ], + button_text: T.nilable(String), + greeting: T.nilable(String), + name: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # URL to your privacy policy. + privacy_policy_url:, + # Form questions (at least one required). + questions:, + # Submit button text. + button_text: nil, + # Greeting text shown at the top of the form. + greeting: nil, + # Form name. Auto-generated if omitted. + name: nil + ) + end + + sig do + override.returns( + { + privacy_policy_url: String, + questions: + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question + ], + button_text: T.nilable(String), + greeting: T.nilable(String), + name: T.nilable(String) + } + ) + end + def to_hash + end + + class Question < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question, + WhopSDK::Internal::AnyHash + ) + end + + # Question type (EMAIL, PHONE_NUMBER, NAME, CUSTOM). + sig { returns(String) } + attr_accessor :field_type + + # Custom label for the question. + sig { returns(T.nilable(String)) } + attr_accessor :label + + # A question for a TikTok instant form. + sig do + params(field_type: String, label: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # Question type (EMAIL, PHONE_NUMBER, NAME, CUSTOM). + field_type:, + # Custom label for the question. + label: nil + ) + end + + sig do + override.returns( + { field_type: String, label: T.nilable(String) } + ) + end + def to_hash + end + end + end + + module Ios14Targeting + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ) + IOS14_MINUS = + T.let( + :IOS14_MINUS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ) + IOS14_PLUS = + T.let( + :IOS14_PLUS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ) + ALL = + T.let( + :ALL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Device operating systems targetable on TikTok. See docs/tiktok_api/ad_group.md § + # operating_systems. + module OperatingSystem + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperatingSystem + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANDROID = + T.let( + :ANDROID, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperatingSystem::TaggedSymbol + ) + IOS = + T.let( + :IOS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperatingSystem::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperatingSystem::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Initial status (ENABLE, DISABLE). + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLE = + T.let( + :ENABLE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus::TaggedSymbol + ) + DISABLE = + T.let( + :DISABLE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OperationStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + # What this ad group optimizes for on TikTok. + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLICK = + T.let( + :CLICK, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + CONVERT = + T.let( + :CONVERT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + INSTALL = + T.let( + :INSTALL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + IN_APP_EVENT = + T.let( + :IN_APP_EVENT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + SHOW = + T.let( + :SHOW, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEW = + T.let( + :VIDEO_VIEW, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW = + T.let( + :ENGAGED_VIEW, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW_FIFTEEN = + T.let( + :ENGAGED_VIEW_FIFTEEN, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + PREFERRED_LEAD = + T.let( + :PREFERRED_LEAD, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + CONVERSATION = + T.let( + :CONVERSATION, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + FOLLOWERS = + T.let( + :FOLLOWERS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + PROFILE_VIEWS = + T.let( + :PROFILE_VIEWS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + PAGE_VISIT = + T.let( + :PAGE_VISIT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_VALUE_OPTIMIZATION = + T.let( + :AUTOMATIC_VALUE_OPTIMIZATION, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + TRAFFIC_LANDING_PAGE_VIEW = + T.let( + :TRAFFIC_LANDING_PAGE_VIEW, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + DESTINATION_VISIT = + T.let( + :DESTINATION_VISIT, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + MT_LIVE_ROOM = + T.let( + :MT_LIVE_ROOM, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + PRODUCT_CLICK_IN_LIVE = + T.let( + :PRODUCT_CLICK_IN_LIVE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PACING_MODE_SMOOTH = + T.let( + :PACING_MODE_SMOOTH, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing::TaggedSymbol + ) + PACING_MODE_FAST = + T.let( + :PACING_MODE_FAST, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PLACEMENT_TYPE_AUTOMATIC = + T.let( + :PLACEMENT_TYPE_AUTOMATIC, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType::TaggedSymbol + ) + PLACEMENT_TYPE_NORMAL = + T.let( + :PLACEMENT_TYPE_NORMAL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ProductSource + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CATALOG = + T.let( + :CATALOG, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource::TaggedSymbol + ) + STORE = + T.let( + :STORE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource::TaggedSymbol + ) + SHOWCASE = + T.let( + :SHOWCASE, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ProductSource::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SCHEDULE_START_END = + T.let( + :SCHEDULE_START_END, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType::TaggedSymbol + ) + SCHEDULE_FROM_NOW = + T.let( + :SCHEDULE_FROM_NOW, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ScheduleType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ShoppingAdsRetargetingType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF = + T.let( + :OFF, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB1 = + T.let( + :LAB1, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB2 = + T.let( + :LAB2, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB3 = + T.let( + :LAB3, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB4 = + T.let( + :LAB4, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB5 = + T.let( + :LAB5, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module SpendingPower + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ALL = + T.let( + :ALL, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower::TaggedSymbol + ) + HIGH = + T.let( + :HIGH, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::SpendingPower::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF = + T.let( + :OFF, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow::TaggedSymbol + ) + ONE_DAY = + T.let( + :ONE_DAY, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow::TaggedSymbol + ) + SEVEN_DAYS = + T.let( + :SEVEN_DAYS, + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::ViewAttributionWindow::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + # The status of an external ad group. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::AdGroupCreateParams::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let(:active, WhopSDK::AdGroupCreateParams::Status::TaggedSymbol) + PAUSED = + T.let(:paused, WhopSDK::AdGroupCreateParams::Status::TaggedSymbol) + INACTIVE = + T.let(:inactive, WhopSDK::AdGroupCreateParams::Status::TaggedSymbol) + IN_REVIEW = + T.let(:in_review, WhopSDK::AdGroupCreateParams::Status::TaggedSymbol) + REJECTED = + T.let(:rejected, WhopSDK::AdGroupCreateParams::Status::TaggedSymbol) + FLAGGED = + T.let(:flagged, WhopSDK::AdGroupCreateParams::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::AdGroupCreateParams::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_create_response.rbi b/rbi/whop_sdk/models/ad_group_create_response.rbi new file mode 100644 index 00000000..1a698f15 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_create_response.rbi @@ -0,0 +1,2596 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupCreateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupCreateResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the external ad group. + sig { returns(String) } + attr_accessor :id + + # The parent ad campaign + sig { returns(WhopSDK::Models::AdGroupCreateResponse::AdCampaign) } + attr_reader :ad_campaign + + sig do + params( + ad_campaign: + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::OrHash + ).void + end + attr_writer :ad_campaign + + # Unified ad group configuration (platform-agnostic) + sig { returns(T.nilable(WhopSDK::Models::AdGroupCreateResponse::Config)) } + attr_reader :config + + sig do + params( + config: + T.nilable(WhopSDK::Models::AdGroupCreateResponse::Config::OrHash) + ).void + end + attr_writer :config + + # The datetime the external ad group was created. + sig { returns(Time) } + attr_accessor :created_at + + # Daily budget in dollars (nil for lifetime budgets) + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Human-readable ad group name + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::Variants + ) + ) + end + attr_accessor :platform_config + + # Current operational status of the ad group + sig do + returns(WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # The datetime the external ad group was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An external ad group (ad set) belonging to an ad campaign + sig do + params( + id: String, + ad_campaign: + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::OrHash, + config: + T.nilable(WhopSDK::Models::AdGroupCreateResponse::Config::OrHash), + created_at: Time, + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable( + T.any( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OrHash, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OrHash + ) + ), + status: WhopSDK::Models::AdGroupCreateResponse::Status::OrSymbol, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the external ad group. + id:, + # The parent ad campaign + ad_campaign:, + # Unified ad group configuration (platform-agnostic) + config:, + # The datetime the external ad group was created. + created_at:, + # Daily budget in dollars (nil for lifetime budgets) + daily_budget:, + # Human-readable ad group name + name:, + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + platform_config:, + # Current operational status of the ad group + status:, + # The datetime the external ad group was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + ad_campaign: WhopSDK::Models::AdGroupCreateResponse::AdCampaign, + config: T.nilable(WhopSDK::Models::AdGroupCreateResponse::Config), + created_at: Time, + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::Variants + ), + status: + WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol, + updated_at: Time + } + ) + end + def to_hash + end + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupCreateResponse::AdCampaign, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # Current status of the campaign (active, paused, or inactive) + sig do + returns( + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + end + attr_accessor :status + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # The parent ad campaign + sig do + params( + id: String, + platform: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform::OrSymbol + ), + status: + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::OrSymbol, + title: String + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # The platforms where an ad campaign can run. + platform:, + # Current status of the campaign (active, paused, or inactive) + status:, + # The title of the ad campaign + title: + ) + end + + sig do + override.returns( + { + id: String, + platform: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform::TaggedSymbol + ), + status: + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol, + title: String + } + ) + end + def to_hash + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::AdCampaign::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupCreateResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # How you are billed (e.g., impressions, clicks). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + # Scheduled end time (ISO8601). Required for lifetime budgets. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Maximum number of times to show ads to each person in the frequency interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap + + # Number of days for the frequency cap interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap_interval_days + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Budget pacing: standard (even) or accelerated (fast). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Pacing::TaggedSymbol + ) + ) + end + attr_accessor :pacing + + # Scheduled start time (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + returns( + T.nilable(WhopSDK::Models::AdGroupCreateResponse::Config::Targeting) + ) + end + attr_reader :targeting + + sig do + params( + targeting: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::OrHash + ) + ).void + end + attr_writer :targeting + + # Unified ad group configuration (platform-agnostic) + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent::OrSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Pacing::OrSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + bid_amount:, + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + bid_strategy:, + # How you are billed (e.g., impressions, clicks). + billing_event:, + # Scheduled end time (ISO8601). Required for lifetime budgets. + end_time:, + # Maximum number of times to show ads to each person in the frequency interval. + frequency_cap:, + # Number of days for the frequency cap interval. + frequency_cap_interval_days:, + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + optimization_goal:, + # Budget pacing: standard (even) or accelerated (fast). + pacing:, + # Scheduled start time (ISO8601). + start_time:, + # Audience targeting settings (demographics, geo, interests, audiences, devices). + targeting: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent::TaggedSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Pacing::TaggedSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting + ) + } + ) + end + def to_hash + end + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed (e.g., impressions, clicks). + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :clicks, + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent::TaggedSymbol + ) + OPTIMIZED_CPM = + T.let( + :optimized_cpm, + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CONVERSIONS = + T.let( + :conversions, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :link_clicks, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :landing_page_views, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :reach, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :app_installs, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :lead_generation, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :value, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :page_likes, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :conversations, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :ad_recall_lift, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :two_second_continuous_video_views, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :post_engagement, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :event_responses, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :reminders_set, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :quality_lead, + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget pacing: standard (even) or accelerated (fast). + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::Config::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = + T.let( + :standard, + WhopSDK::Models::AdGroupCreateResponse::Config::Pacing::TaggedSymbol + ) + ACCELERATED = + T.let( + :accelerated, + WhopSDK::Models::AdGroupCreateResponse::Config::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Targeting < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting, + WhopSDK::Internal::AnyHash + ) + end + + # Maximum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_max + + # Minimum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_min + + # ISO 3166-1 alpha-2 country codes targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Device platforms targeted. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + ) + end + attr_accessor :device_platforms + + # Platform audience IDs excluded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_audience_ids + + # Genders targeted. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender::TaggedSymbol + ] + ) + ) + end + attr_accessor :genders + + # Platform audience IDs included. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_audience_ids + + # Platform-specific interest IDs targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_ids + + # Language codes targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :languages + + # Placement strategy for ad delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + ) + end + attr_accessor :placement_type + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + params( + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::DevicePlatform::OrSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender::OrSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Maximum age for demographic targeting. + age_max:, + # Minimum age for demographic targeting. + age_min:, + # ISO 3166-1 alpha-2 country codes targeted. + countries:, + # Device platforms targeted. + device_platforms:, + # Platform audience IDs excluded. + exclude_audience_ids:, + # Genders targeted. + genders:, + # Platform audience IDs included. + include_audience_ids:, + # Platform-specific interest IDs targeted. + interest_ids:, + # Language codes targeted. + languages:, + # Placement strategy for ad delivery. + placement_type: + ) + end + + sig do + override.returns( + { + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender::TaggedSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::DevicePlatform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MOBILE = + T.let( + :mobile, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ) + DESKTOP = + T.let( + :desktop, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MALE = + T.let( + :male, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender::TaggedSymbol + ) + FEMALE = + T.let( + :female, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender::TaggedSymbol + ) + ALL = + T.let( + :all, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Placement strategy for ad delivery. + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTOMATIC = + T.let( + :automatic, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + MANUAL = + T.let( + :manual, + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType + ) + ) + end + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :attribution_spec + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_budget + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ) + end + attr_accessor :destination_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :excluded_geo_locations + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :facebook_positions + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :geo_locations + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :instagram_positions + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :lifetime_budget + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # The ad platform (meta, tiktok). + sig do + returns( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :promoted_object + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :publisher_platforms + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :targeting_automation + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Meta (Facebook/Instagram) ad set configuration. + sig do + params( + attribution_spec: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::OrSymbol + ), + daily_budget: T.nilable(Integer), + destination_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::OrSymbol + ), + end_time: T.nilable(String), + excluded_geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + facebook_positions: T.nilable(T::Array[String]), + geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + lifetime_budget: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::OrSymbol + ), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::OrSymbol, + promoted_object: T.nilable(T::Hash[Symbol, T.anything]), + publisher_platforms: T.nilable(T::Array[String]), + status: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::OrSymbol + ), + targeting_automation: T.nilable(T::Hash[Symbol, T.anything]), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + attribution_spec:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + bid_amount:, + bid_strategy:, + billing_event:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + daily_budget:, + destination_type:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + end_time:, + # Represents untyped JSON + excluded_geo_locations:, + facebook_positions:, + # Represents untyped JSON + geo_locations:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + instagram_actor_id:, + instagram_positions:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + lifetime_budget:, + optimization_goal:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + page_id:, + # The ad platform (meta, tiktok). + platform:, + # Represents untyped JSON + promoted_object:, + publisher_platforms:, + status:, + # Represents untyped JSON + targeting_automation:, + # The typename of this object + typename: :MetaAdGroupPlatformConfigType + ) + end + + sig do + override.returns( + { + attribution_spec: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ), + daily_budget: T.nilable(Integer), + destination_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ), + end_time: T.nilable(String), + excluded_geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + facebook_positions: T.nilable(T::Array[String]), + geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + lifetime_budget: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol, + promoted_object: T.nilable(T::Hash[Symbol, T.anything]), + publisher_platforms: T.nilable(T::Array[String]), + status: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ), + targeting_automation: T.nilable(T::Hash[Symbol, T.anything]), + typename: Symbol + } + ) + end + def to_hash + end + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST_WITHOUT_CAP = + T.let( + :LOWEST_COST_WITHOUT_CAP, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_BID_CAP = + T.let( + :LOWEST_COST_WITH_BID_CAP, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :COST_CAP, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_MIN_ROAS = + T.let( + :LOWEST_COST_WITH_MIN_ROAS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :CLICKS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + NONE = + T.let( + :NONE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + OFFER_CLAIMS = + T.let( + :OFFER_CLAIMS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + PURCHASE = + T.let( + :PURCHASE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + LISTING_INTERACTION = + T.let( + :LISTING_INTERACTION, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNDEFINED = + T.let( + :UNDEFINED, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE = + T.let( + :WEBSITE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + APP = + T.let( + :APP, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK = + T.let( + :FACEBOOK, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSENGER = + T.let( + :MESSENGER, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WHATSAPP = + T.let( + :WHATSAPP, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_DIRECT = + T.let( + :INSTAGRAM_DIRECT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE = + T.let( + :INSTAGRAM_PROFILE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + PHONE_CALL = + T.let( + :PHONE_CALL, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + SHOP_AUTOMATIC = + T.let( + :SHOP_AUTOMATIC, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + APPLINKS_AUTOMATIC = + T.let( + :APPLINKS_AUTOMATIC, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_AD = + T.let( + :ON_AD, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_POST = + T.let( + :ON_POST, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_VIDEO = + T.let( + :ON_VIDEO, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_PAGE = + T.let( + :ON_PAGE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_EVENT = + T.let( + :ON_EVENT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_MESSENGER_WHATSAPP, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = + T.let( + :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK_PAGE = + T.let( + :FACEBOOK_PAGE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_LIVE = + T.let( + :INSTAGRAM_LIVE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK_LIVE = + T.let( + :FACEBOOK_LIVE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + IMAGINE = + T.let( + :IMAGINE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + LEAD_FROM_IG_DIRECT = + T.let( + :LEAD_FROM_IG_DIRECT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + LEAD_FROM_MESSENGER = + T.let( + :LEAD_FROM_MESSENGER, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE_AND_LEAD_FORM = + T.let( + :WEBSITE_AND_LEAD_FORM, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE_AND_PHONE_CALL = + T.let( + :WEBSITE_AND_PHONE_CALL, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + BROADCAST_CHANNEL = + T.let( + :BROADCAST_CHANNEL, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NONE = + T.let( + :NONE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :AD_RECALL_LIFT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_USERS = + T.let( + :ENGAGED_USERS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :EVENT_RESPONSES, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :QUALITY_LEAD, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + OFFSITE_CONVERSIONS = + T.let( + :OFFSITE_CONVERSIONS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + QUALITY_CALL = + T.let( + :QUALITY_CALL, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :LANDING_PAGE_VIEWS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VISIT_INSTAGRAM_PROFILE = + T.let( + :VISIT_INSTAGRAM_PROFILE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + DERIVED_EVENTS = + T.let( + :DERIVED_EVENTS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = + T.let( + :APP_INSTALLS_AND_OFFSITE_CONVERSIONS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :CONVERSATIONS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IN_APP_VALUE = + T.let( + :IN_APP_VALUE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_PURCHASE_CONVERSION = + T.let( + :MESSAGING_PURCHASE_CONVERSION, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + SUBSCRIBERS = + T.let( + :SUBSCRIBERS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :REMINDERS_SET, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MEANINGFUL_CALL_ATTEMPT = + T.let( + :MEANINGFUL_CALL_ATTEMPT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_VISIT = + T.let( + :PROFILE_VISIT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_AND_PAGE_ENGAGEMENT = + T.let( + :PROFILE_AND_PAGE_ENGAGEMENT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_REACH = + T.let( + :ENGAGED_REACH, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_PAGE_VIEWS = + T.let( + :ENGAGED_PAGE_VIEWS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = + T.let( + :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ADVERTISER_SILOED_VALUE = + T.let( + :ADVERTISER_SILOED_VALUE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_OBJECTIVE = + T.let( + :AUTOMATIC_OBJECTIVE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_APPOINTMENT_CONVERSION = + T.let( + :MESSAGING_APPOINTMENT_CONVERSION, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform (meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + PAUSED = + T.let( + :PAUSED, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :bid_price + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + ) + end + attr_accessor :bid_type + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + ) + end + attr_accessor :budget_mode + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_bid_price + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_type + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + ) + end + attr_accessor :operation_status + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :optimization_event + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + ) + end + attr_accessor :pacing + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + ) + end + attr_accessor :placement_type + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :placements + + # The ad platform (meta, tiktok). + sig do + returns( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :schedule_end_time + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :schedule_start_time + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + ) + end + attr_accessor :schedule_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # TikTok ad group configuration. + sig do + params( + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::OrSymbol + ), + budget_mode: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::OrSymbol + ), + conversion_bid_price: T.nilable(Float), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + operation_status: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::OrSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::OrSymbol + ), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::OrSymbol + ), + placements: T.nilable(T::Array[String]), + platform: + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::OrSymbol, + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::OrSymbol + ), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + bid_price:, + bid_type:, + billing_event:, + budget_mode:, + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + conversion_bid_price:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_type:, + operation_status:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + optimization_event:, + optimization_goal:, + pacing:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + pixel_id:, + placement_type:, + placements:, + # The ad platform (meta, tiktok). + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + schedule_end_time:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + schedule_start_time:, + schedule_type:, + # The typename of this object + typename: :TiktokAdGroupPlatformConfigType + ) + end + + sig do + override.returns( + { + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ), + budget_mode: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ), + conversion_bid_price: T.nilable(Float), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + operation_status: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ), + placements: T.nilable(T::Array[String]), + platform: + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol, + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ), + typename: Symbol + } + ) + end + def to_hash + end + + module BidType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BID_TYPE_NO_BID = + T.let( + :BID_TYPE_NO_BID, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + BID_TYPE_CUSTOM = + T.let( + :BID_TYPE_CUSTOM, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CPC = + T.let( + :CPC, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CPM = + T.let( + :CPM, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + OCPM = + T.let( + :OCPM, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CPV = + T.let( + :CPV, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BUDGET_MODE_DAY = + T.let( + :BUDGET_MODE_DAY, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_TOTAL = + T.let( + :BUDGET_MODE_TOTAL, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = + T.let( + :BUDGET_MODE_DYNAMIC_DAILY_BUDGET, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLE = + T.let( + :ENABLE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + DISABLE = + T.let( + :DISABLE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLICK = + T.let( + :CLICK, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERT = + T.let( + :CONVERT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + INSTALL = + T.let( + :INSTALL, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IN_APP_EVENT = + T.let( + :IN_APP_EVENT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + SHOW = + T.let( + :SHOW, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEW = + T.let( + :VIDEO_VIEW, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW = + T.let( + :ENGAGED_VIEW, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW_FIFTEEN = + T.let( + :ENGAGED_VIEW_FIFTEEN, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PREFERRED_LEAD = + T.let( + :PREFERRED_LEAD, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERSATION = + T.let( + :CONVERSATION, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + FOLLOWERS = + T.let( + :FOLLOWERS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_VIEWS = + T.let( + :PROFILE_VIEWS, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PAGE_VISIT = + T.let( + :PAGE_VISIT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_VALUE_OPTIMIZATION = + T.let( + :AUTOMATIC_VALUE_OPTIMIZATION, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + TRAFFIC_LANDING_PAGE_VIEW = + T.let( + :TRAFFIC_LANDING_PAGE_VIEW, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + DESTINATION_VISIT = + T.let( + :DESTINATION_VISIT, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MT_LIVE_ROOM = + T.let( + :MT_LIVE_ROOM, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PRODUCT_CLICK_IN_LIVE = + T.let( + :PRODUCT_CLICK_IN_LIVE, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PACING_MODE_SMOOTH = + T.let( + :PACING_MODE_SMOOTH, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + PACING_MODE_FAST = + T.let( + :PACING_MODE_FAST, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PLACEMENT_TYPE_AUTOMATIC = + T.let( + :PLACEMENT_TYPE_AUTOMATIC, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + PLACEMENT_TYPE_NORMAL = + T.let( + :PLACEMENT_TYPE_NORMAL, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform (meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SCHEDULE_START_END = + T.let( + :SCHEDULE_START_END, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + SCHEDULE_FROM_NOW = + T.let( + :SCHEDULE_FROM_NOW, + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::Variants + ] + ) + end + def self.variants + end + end + + # Current operational status of the ad group + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdGroupCreateResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupCreateResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_delete_params.rbi b/rbi/whop_sdk/models/ad_group_delete_params.rbi new file mode 100644 index 00000000..02b7fbef --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_delete_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupDeleteParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdGroupDeleteParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_delete_response.rbi b/rbi/whop_sdk/models/ad_group_delete_response.rbi new file mode 100644 index 00000000..41e08622 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_delete_response.rbi @@ -0,0 +1,8 @@ +# typed: strong + +module WhopSDK + module Models + AdGroupDeleteResponse = + T.let(T::Boolean, WhopSDK::Internal::Type::Converter) + end +end diff --git a/rbi/whop_sdk/models/ad_group_list_params.rbi b/rbi/whop_sdk/models/ad_group_list_params.rbi new file mode 100644 index 00000000..c972848b --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_list_params.rbi @@ -0,0 +1,145 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdGroupListParams, WhopSDK::Internal::AnyHash) + end + + # Returns the elements in the list that come after the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :after + + # Returns the elements in the list that come before the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :before + + # Filter by campaign. Provide exactly one of campaign_id or company_id. + sig { returns(T.nilable(String)) } + attr_accessor :campaign_id + + # Filter by company. Provide exactly one of campaign_id or company_id. + sig { returns(T.nilable(String)) } + attr_accessor :company_id + + # Only return ad groups created after this timestamp. + sig { returns(T.nilable(Time)) } + attr_accessor :created_after + + # Only return ad groups created before this timestamp. + sig { returns(T.nilable(Time)) } + attr_accessor :created_before + + # Returns the first _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :first + + # Returns the last _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :last + + # Case-insensitive substring match against the ad group name. + sig { returns(T.nilable(String)) } + attr_accessor :query + + # The status of an external ad group. + sig { returns(T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol)) } + attr_accessor :status + + sig do + params( + after: T.nilable(String), + before: T.nilable(String), + campaign_id: T.nilable(String), + company_id: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + query: T.nilable(String), + status: T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # Filter by campaign. Provide exactly one of campaign_id or company_id. + campaign_id: nil, + # Filter by company. Provide exactly one of campaign_id or company_id. + company_id: nil, + # Only return ad groups created after this timestamp. + created_after: nil, + # Only return ad groups created before this timestamp. + created_before: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # Case-insensitive substring match against the ad group name. + query: nil, + # The status of an external ad group. + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + after: T.nilable(String), + before: T.nilable(String), + campaign_id: T.nilable(String), + company_id: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + query: T.nilable(String), + status: T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # The status of an external ad group. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::AdGroupListParams::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let(:active, WhopSDK::AdGroupListParams::Status::TaggedSymbol) + PAUSED = + T.let(:paused, WhopSDK::AdGroupListParams::Status::TaggedSymbol) + INACTIVE = + T.let(:inactive, WhopSDK::AdGroupListParams::Status::TaggedSymbol) + IN_REVIEW = + T.let(:in_review, WhopSDK::AdGroupListParams::Status::TaggedSymbol) + REJECTED = + T.let(:rejected, WhopSDK::AdGroupListParams::Status::TaggedSymbol) + FLAGGED = + T.let(:flagged, WhopSDK::AdGroupListParams::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::AdGroupListParams::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_list_response.rbi b/rbi/whop_sdk/models/ad_group_list_response.rbi new file mode 100644 index 00000000..17b60e14 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_list_response.rbi @@ -0,0 +1,2393 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupListResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupListResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the external ad group. + sig { returns(String) } + attr_accessor :id + + # Unified ad group configuration (platform-agnostic) + sig { returns(T.nilable(WhopSDK::Models::AdGroupListResponse::Config)) } + attr_reader :config + + sig do + params( + config: + T.nilable(WhopSDK::Models::AdGroupListResponse::Config::OrHash) + ).void + end + attr_writer :config + + # The datetime the external ad group was created. + sig { returns(Time) } + attr_accessor :created_at + + # Daily budget in dollars (nil for lifetime budgets) + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Human-readable ad group name + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::Variants + ) + ) + end + attr_accessor :platform_config + + # Current operational status of the ad group + sig do + returns(WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # The datetime the external ad group was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An external ad group (ad set) belonging to an ad campaign + sig do + params( + id: String, + config: + T.nilable(WhopSDK::Models::AdGroupListResponse::Config::OrHash), + created_at: Time, + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable( + T.any( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OrHash, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OrHash + ) + ), + status: WhopSDK::Models::AdGroupListResponse::Status::OrSymbol, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the external ad group. + id:, + # Unified ad group configuration (platform-agnostic) + config:, + # The datetime the external ad group was created. + created_at:, + # Daily budget in dollars (nil for lifetime budgets) + daily_budget:, + # Human-readable ad group name + name:, + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + platform_config:, + # Current operational status of the ad group + status:, + # The datetime the external ad group was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + config: T.nilable(WhopSDK::Models::AdGroupListResponse::Config), + created_at: Time, + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::Variants + ), + status: WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol, + updated_at: Time + } + ) + end + def to_hash + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupListResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # How you are billed (e.g., impressions, clicks). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + # Scheduled end time (ISO8601). Required for lifetime budgets. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Maximum number of times to show ads to each person in the frequency interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap + + # Number of days for the frequency cap interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap_interval_days + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Budget pacing: standard (even) or accelerated (fast). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Pacing::TaggedSymbol + ) + ) + end + attr_accessor :pacing + + # Scheduled start time (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + returns( + T.nilable(WhopSDK::Models::AdGroupListResponse::Config::Targeting) + ) + end + attr_reader :targeting + + sig do + params( + targeting: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Targeting::OrHash + ) + ).void + end + attr_writer :targeting + + # Unified ad group configuration (platform-agnostic) + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent::OrSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Pacing::OrSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Targeting::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + bid_amount:, + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + bid_strategy:, + # How you are billed (e.g., impressions, clicks). + billing_event:, + # Scheduled end time (ISO8601). Required for lifetime budgets. + end_time:, + # Maximum number of times to show ads to each person in the frequency interval. + frequency_cap:, + # Number of days for the frequency cap interval. + frequency_cap_interval_days:, + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + optimization_goal:, + # Budget pacing: standard (even) or accelerated (fast). + pacing:, + # Scheduled start time (ISO8601). + start_time:, + # Audience targeting settings (demographics, geo, interests, audiences, devices). + targeting: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::BidStrategy::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent::TaggedSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Pacing::TaggedSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Targeting + ) + } + ) + end + def to_hash + end + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdGroupListResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdGroupListResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdGroupListResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed (e.g., impressions, clicks). + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :clicks, + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent::TaggedSymbol + ) + OPTIMIZED_CPM = + T.let( + :optimized_cpm, + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CONVERSIONS = + T.let( + :conversions, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :link_clicks, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :landing_page_views, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :reach, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :app_installs, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :lead_generation, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :value, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :page_likes, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :conversations, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :ad_recall_lift, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :two_second_continuous_video_views, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :post_engagement, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :event_responses, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :reminders_set, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :quality_lead, + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget pacing: standard (even) or accelerated (fast). + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::Config::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = + T.let( + :standard, + WhopSDK::Models::AdGroupListResponse::Config::Pacing::TaggedSymbol + ) + ACCELERATED = + T.let( + :accelerated, + WhopSDK::Models::AdGroupListResponse::Config::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Targeting < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupListResponse::Config::Targeting, + WhopSDK::Internal::AnyHash + ) + end + + # Maximum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_max + + # Minimum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_min + + # ISO 3166-1 alpha-2 country codes targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Device platforms targeted. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + ) + end + attr_accessor :device_platforms + + # Platform audience IDs excluded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_audience_ids + + # Genders targeted. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender::TaggedSymbol + ] + ) + ) + end + attr_accessor :genders + + # Platform audience IDs included. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_audience_ids + + # Platform-specific interest IDs targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_ids + + # Language codes targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :languages + + # Placement strategy for ad delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + ) + end + attr_accessor :placement_type + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + params( + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::DevicePlatform::OrSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender::OrSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Maximum age for demographic targeting. + age_max:, + # Minimum age for demographic targeting. + age_min:, + # ISO 3166-1 alpha-2 country codes targeted. + countries:, + # Device platforms targeted. + device_platforms:, + # Platform audience IDs excluded. + exclude_audience_ids:, + # Genders targeted. + genders:, + # Platform audience IDs included. + include_audience_ids:, + # Platform-specific interest IDs targeted. + interest_ids:, + # Language codes targeted. + languages:, + # Placement strategy for ad delivery. + placement_type: + ) + end + + sig do + override.returns( + { + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender::TaggedSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::DevicePlatform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MOBILE = + T.let( + :mobile, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ) + DESKTOP = + T.let( + :desktop, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MALE = + T.let( + :male, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender::TaggedSymbol + ) + FEMALE = + T.let( + :female, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender::TaggedSymbol + ) + ALL = + T.let( + :all, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Placement strategy for ad delivery. + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTOMATIC = + T.let( + :automatic, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + MANUAL = + T.let( + :manual, + WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::Config::Targeting::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType + ) + ) + end + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :attribution_spec + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_budget + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ) + end + attr_accessor :destination_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :excluded_geo_locations + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :facebook_positions + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :geo_locations + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :instagram_positions + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :lifetime_budget + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # The ad platform (meta, tiktok). + sig do + returns( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :promoted_object + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :publisher_platforms + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :targeting_automation + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Meta (Facebook/Instagram) ad set configuration. + sig do + params( + attribution_spec: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::OrSymbol + ), + daily_budget: T.nilable(Integer), + destination_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::OrSymbol + ), + end_time: T.nilable(String), + excluded_geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + facebook_positions: T.nilable(T::Array[String]), + geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + lifetime_budget: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::OrSymbol + ), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::OrSymbol, + promoted_object: T.nilable(T::Hash[Symbol, T.anything]), + publisher_platforms: T.nilable(T::Array[String]), + status: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::OrSymbol + ), + targeting_automation: T.nilable(T::Hash[Symbol, T.anything]), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + attribution_spec:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + bid_amount:, + bid_strategy:, + billing_event:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + daily_budget:, + destination_type:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + end_time:, + # Represents untyped JSON + excluded_geo_locations:, + facebook_positions:, + # Represents untyped JSON + geo_locations:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + instagram_actor_id:, + instagram_positions:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + lifetime_budget:, + optimization_goal:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + page_id:, + # The ad platform (meta, tiktok). + platform:, + # Represents untyped JSON + promoted_object:, + publisher_platforms:, + status:, + # Represents untyped JSON + targeting_automation:, + # The typename of this object + typename: :MetaAdGroupPlatformConfigType + ) + end + + sig do + override.returns( + { + attribution_spec: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ), + daily_budget: T.nilable(Integer), + destination_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ), + end_time: T.nilable(String), + excluded_geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + facebook_positions: T.nilable(T::Array[String]), + geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + lifetime_budget: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol, + promoted_object: T.nilable(T::Hash[Symbol, T.anything]), + publisher_platforms: T.nilable(T::Array[String]), + status: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ), + targeting_automation: T.nilable(T::Hash[Symbol, T.anything]), + typename: Symbol + } + ) + end + def to_hash + end + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST_WITHOUT_CAP = + T.let( + :LOWEST_COST_WITHOUT_CAP, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_BID_CAP = + T.let( + :LOWEST_COST_WITH_BID_CAP, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :COST_CAP, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_MIN_ROAS = + T.let( + :LOWEST_COST_WITH_MIN_ROAS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :CLICKS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + NONE = + T.let( + :NONE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + OFFER_CLAIMS = + T.let( + :OFFER_CLAIMS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + PURCHASE = + T.let( + :PURCHASE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + LISTING_INTERACTION = + T.let( + :LISTING_INTERACTION, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNDEFINED = + T.let( + :UNDEFINED, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE = + T.let( + :WEBSITE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + APP = + T.let( + :APP, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK = + T.let( + :FACEBOOK, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSENGER = + T.let( + :MESSENGER, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WHATSAPP = + T.let( + :WHATSAPP, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_DIRECT = + T.let( + :INSTAGRAM_DIRECT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE = + T.let( + :INSTAGRAM_PROFILE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + PHONE_CALL = + T.let( + :PHONE_CALL, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + SHOP_AUTOMATIC = + T.let( + :SHOP_AUTOMATIC, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + APPLINKS_AUTOMATIC = + T.let( + :APPLINKS_AUTOMATIC, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_AD = + T.let( + :ON_AD, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_POST = + T.let( + :ON_POST, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_VIDEO = + T.let( + :ON_VIDEO, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_PAGE = + T.let( + :ON_PAGE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_EVENT = + T.let( + :ON_EVENT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_MESSENGER_WHATSAPP, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = + T.let( + :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK_PAGE = + T.let( + :FACEBOOK_PAGE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_LIVE = + T.let( + :INSTAGRAM_LIVE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK_LIVE = + T.let( + :FACEBOOK_LIVE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + IMAGINE = + T.let( + :IMAGINE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + LEAD_FROM_IG_DIRECT = + T.let( + :LEAD_FROM_IG_DIRECT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + LEAD_FROM_MESSENGER = + T.let( + :LEAD_FROM_MESSENGER, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE_AND_LEAD_FORM = + T.let( + :WEBSITE_AND_LEAD_FORM, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE_AND_PHONE_CALL = + T.let( + :WEBSITE_AND_PHONE_CALL, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + BROADCAST_CHANNEL = + T.let( + :BROADCAST_CHANNEL, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NONE = + T.let( + :NONE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :AD_RECALL_LIFT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_USERS = + T.let( + :ENGAGED_USERS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :EVENT_RESPONSES, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :QUALITY_LEAD, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + OFFSITE_CONVERSIONS = + T.let( + :OFFSITE_CONVERSIONS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + QUALITY_CALL = + T.let( + :QUALITY_CALL, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :LANDING_PAGE_VIEWS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VISIT_INSTAGRAM_PROFILE = + T.let( + :VISIT_INSTAGRAM_PROFILE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + DERIVED_EVENTS = + T.let( + :DERIVED_EVENTS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = + T.let( + :APP_INSTALLS_AND_OFFSITE_CONVERSIONS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :CONVERSATIONS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IN_APP_VALUE = + T.let( + :IN_APP_VALUE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_PURCHASE_CONVERSION = + T.let( + :MESSAGING_PURCHASE_CONVERSION, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + SUBSCRIBERS = + T.let( + :SUBSCRIBERS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :REMINDERS_SET, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MEANINGFUL_CALL_ATTEMPT = + T.let( + :MEANINGFUL_CALL_ATTEMPT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_VISIT = + T.let( + :PROFILE_VISIT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_AND_PAGE_ENGAGEMENT = + T.let( + :PROFILE_AND_PAGE_ENGAGEMENT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_REACH = + T.let( + :ENGAGED_REACH, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_PAGE_VIEWS = + T.let( + :ENGAGED_PAGE_VIEWS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = + T.let( + :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ADVERTISER_SILOED_VALUE = + T.let( + :ADVERTISER_SILOED_VALUE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_OBJECTIVE = + T.let( + :AUTOMATIC_OBJECTIVE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_APPOINTMENT_CONVERSION = + T.let( + :MESSAGING_APPOINTMENT_CONVERSION, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform (meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + PAUSED = + T.let( + :PAUSED, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :bid_price + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + ) + end + attr_accessor :bid_type + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + ) + end + attr_accessor :budget_mode + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_bid_price + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_type + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + ) + end + attr_accessor :operation_status + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :optimization_event + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + ) + end + attr_accessor :pacing + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + ) + end + attr_accessor :placement_type + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :placements + + # The ad platform (meta, tiktok). + sig do + returns( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :schedule_end_time + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :schedule_start_time + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + ) + end + attr_accessor :schedule_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # TikTok ad group configuration. + sig do + params( + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::OrSymbol + ), + budget_mode: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::OrSymbol + ), + conversion_bid_price: T.nilable(Float), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + operation_status: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::OrSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::OrSymbol + ), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::OrSymbol + ), + placements: T.nilable(T::Array[String]), + platform: + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::OrSymbol, + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::OrSymbol + ), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + bid_price:, + bid_type:, + billing_event:, + budget_mode:, + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + conversion_bid_price:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_type:, + operation_status:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + optimization_event:, + optimization_goal:, + pacing:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + pixel_id:, + placement_type:, + placements:, + # The ad platform (meta, tiktok). + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + schedule_end_time:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + schedule_start_time:, + schedule_type:, + # The typename of this object + typename: :TiktokAdGroupPlatformConfigType + ) + end + + sig do + override.returns( + { + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ), + budget_mode: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ), + conversion_bid_price: T.nilable(Float), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + operation_status: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ), + placements: T.nilable(T::Array[String]), + platform: + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol, + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ), + typename: Symbol + } + ) + end + def to_hash + end + + module BidType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BID_TYPE_NO_BID = + T.let( + :BID_TYPE_NO_BID, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + BID_TYPE_CUSTOM = + T.let( + :BID_TYPE_CUSTOM, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CPC = + T.let( + :CPC, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CPM = + T.let( + :CPM, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + OCPM = + T.let( + :OCPM, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CPV = + T.let( + :CPV, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BUDGET_MODE_DAY = + T.let( + :BUDGET_MODE_DAY, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_TOTAL = + T.let( + :BUDGET_MODE_TOTAL, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = + T.let( + :BUDGET_MODE_DYNAMIC_DAILY_BUDGET, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLE = + T.let( + :ENABLE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + DISABLE = + T.let( + :DISABLE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLICK = + T.let( + :CLICK, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERT = + T.let( + :CONVERT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + INSTALL = + T.let( + :INSTALL, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IN_APP_EVENT = + T.let( + :IN_APP_EVENT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + SHOW = + T.let( + :SHOW, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEW = + T.let( + :VIDEO_VIEW, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW = + T.let( + :ENGAGED_VIEW, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW_FIFTEEN = + T.let( + :ENGAGED_VIEW_FIFTEEN, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PREFERRED_LEAD = + T.let( + :PREFERRED_LEAD, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERSATION = + T.let( + :CONVERSATION, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + FOLLOWERS = + T.let( + :FOLLOWERS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_VIEWS = + T.let( + :PROFILE_VIEWS, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PAGE_VISIT = + T.let( + :PAGE_VISIT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_VALUE_OPTIMIZATION = + T.let( + :AUTOMATIC_VALUE_OPTIMIZATION, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + TRAFFIC_LANDING_PAGE_VIEW = + T.let( + :TRAFFIC_LANDING_PAGE_VIEW, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + DESTINATION_VISIT = + T.let( + :DESTINATION_VISIT, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MT_LIVE_ROOM = + T.let( + :MT_LIVE_ROOM, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PRODUCT_CLICK_IN_LIVE = + T.let( + :PRODUCT_CLICK_IN_LIVE, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PACING_MODE_SMOOTH = + T.let( + :PACING_MODE_SMOOTH, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + PACING_MODE_FAST = + T.let( + :PACING_MODE_FAST, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PLACEMENT_TYPE_AUTOMATIC = + T.let( + :PLACEMENT_TYPE_AUTOMATIC, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + PLACEMENT_TYPE_NORMAL = + T.let( + :PLACEMENT_TYPE_NORMAL, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform (meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SCHEDULE_START_END = + T.let( + :SCHEDULE_START_END, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + SCHEDULE_FROM_NOW = + T.let( + :SCHEDULE_FROM_NOW, + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupListResponse::PlatformConfig::Variants + ] + ) + end + def self.variants + end + end + + # Current operational status of the ad group + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdGroupListResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_retrieve_params.rbi b/rbi/whop_sdk/models/ad_group_retrieve_params.rbi new file mode 100644 index 00000000..91441b48 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_retrieve_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdGroupRetrieveParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_retrieve_response.rbi b/rbi/whop_sdk/models/ad_group_retrieve_response.rbi new file mode 100644 index 00000000..ff3b2333 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_retrieve_response.rbi @@ -0,0 +1,2600 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupRetrieveResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupRetrieveResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the external ad group. + sig { returns(String) } + attr_accessor :id + + # The parent ad campaign + sig { returns(WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign) } + attr_reader :ad_campaign + + sig do + params( + ad_campaign: + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::OrHash + ).void + end + attr_writer :ad_campaign + + # Unified ad group configuration (platform-agnostic) + sig do + returns(T.nilable(WhopSDK::Models::AdGroupRetrieveResponse::Config)) + end + attr_reader :config + + sig do + params( + config: + T.nilable(WhopSDK::Models::AdGroupRetrieveResponse::Config::OrHash) + ).void + end + attr_writer :config + + # The datetime the external ad group was created. + sig { returns(Time) } + attr_accessor :created_at + + # Daily budget in dollars (nil for lifetime budgets) + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Human-readable ad group name + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::Variants + ) + ) + end + attr_accessor :platform_config + + # Current operational status of the ad group + sig do + returns(WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # The datetime the external ad group was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An external ad group (ad set) belonging to an ad campaign + sig do + params( + id: String, + ad_campaign: + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::OrHash, + config: + T.nilable(WhopSDK::Models::AdGroupRetrieveResponse::Config::OrHash), + created_at: Time, + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable( + T.any( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OrHash, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OrHash + ) + ), + status: WhopSDK::Models::AdGroupRetrieveResponse::Status::OrSymbol, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the external ad group. + id:, + # The parent ad campaign + ad_campaign:, + # Unified ad group configuration (platform-agnostic) + config:, + # The datetime the external ad group was created. + created_at:, + # Daily budget in dollars (nil for lifetime budgets) + daily_budget:, + # Human-readable ad group name + name:, + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + platform_config:, + # Current operational status of the ad group + status:, + # The datetime the external ad group was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, + config: T.nilable(WhopSDK::Models::AdGroupRetrieveResponse::Config), + created_at: Time, + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::Variants + ), + status: + WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol, + updated_at: Time + } + ) + end + def to_hash + end + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # Current status of the campaign (active, paused, or inactive) + sig do + returns( + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + end + attr_accessor :status + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # The parent ad campaign + sig do + params( + id: String, + platform: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform::OrSymbol + ), + status: + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::OrSymbol, + title: String + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # The platforms where an ad campaign can run. + platform:, + # Current status of the campaign (active, paused, or inactive) + status:, + # The title of the ad campaign + title: + ) + end + + sig do + override.returns( + { + id: String, + platform: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform::TaggedSymbol + ), + status: + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol, + title: String + } + ) + end + def to_hash + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupRetrieveResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # How you are billed (e.g., impressions, clicks). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + # Scheduled end time (ISO8601). Required for lifetime budgets. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Maximum number of times to show ads to each person in the frequency interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap + + # Number of days for the frequency cap interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap_interval_days + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Budget pacing: standard (even) or accelerated (fast). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing::TaggedSymbol + ) + ) + end + attr_accessor :pacing + + # Scheduled start time (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting + ) + ) + end + attr_reader :targeting + + sig do + params( + targeting: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::OrHash + ) + ).void + end + attr_writer :targeting + + # Unified ad group configuration (platform-agnostic) + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent::OrSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing::OrSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + bid_amount:, + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + bid_strategy:, + # How you are billed (e.g., impressions, clicks). + billing_event:, + # Scheduled end time (ISO8601). Required for lifetime budgets. + end_time:, + # Maximum number of times to show ads to each person in the frequency interval. + frequency_cap:, + # Number of days for the frequency cap interval. + frequency_cap_interval_days:, + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + optimization_goal:, + # Budget pacing: standard (even) or accelerated (fast). + pacing:, + # Scheduled start time (ISO8601). + start_time:, + # Audience targeting settings (demographics, geo, interests, audiences, devices). + targeting: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent::TaggedSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing::TaggedSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting + ) + } + ) + end + def to_hash + end + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed (e.g., impressions, clicks). + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :clicks, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent::TaggedSymbol + ) + OPTIMIZED_CPM = + T.let( + :optimized_cpm, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CONVERSIONS = + T.let( + :conversions, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :link_clicks, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :landing_page_views, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :reach, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :app_installs, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :lead_generation, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :value, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :page_likes, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :conversations, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :ad_recall_lift, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :two_second_continuous_video_views, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :post_engagement, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :event_responses, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :reminders_set, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :quality_lead, + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget pacing: standard (even) or accelerated (fast). + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = + T.let( + :standard, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing::TaggedSymbol + ) + ACCELERATED = + T.let( + :accelerated, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Targeting < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting, + WhopSDK::Internal::AnyHash + ) + end + + # Maximum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_max + + # Minimum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_min + + # ISO 3166-1 alpha-2 country codes targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Device platforms targeted. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + ) + end + attr_accessor :device_platforms + + # Platform audience IDs excluded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_audience_ids + + # Genders targeted. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender::TaggedSymbol + ] + ) + ) + end + attr_accessor :genders + + # Platform audience IDs included. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_audience_ids + + # Platform-specific interest IDs targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_ids + + # Language codes targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :languages + + # Placement strategy for ad delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + ) + end + attr_accessor :placement_type + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + params( + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::DevicePlatform::OrSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender::OrSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Maximum age for demographic targeting. + age_max:, + # Minimum age for demographic targeting. + age_min:, + # ISO 3166-1 alpha-2 country codes targeted. + countries:, + # Device platforms targeted. + device_platforms:, + # Platform audience IDs excluded. + exclude_audience_ids:, + # Genders targeted. + genders:, + # Platform audience IDs included. + include_audience_ids:, + # Platform-specific interest IDs targeted. + interest_ids:, + # Language codes targeted. + languages:, + # Placement strategy for ad delivery. + placement_type: + ) + end + + sig do + override.returns( + { + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender::TaggedSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::DevicePlatform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MOBILE = + T.let( + :mobile, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ) + DESKTOP = + T.let( + :desktop, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MALE = + T.let( + :male, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender::TaggedSymbol + ) + FEMALE = + T.let( + :female, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender::TaggedSymbol + ) + ALL = + T.let( + :all, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Placement strategy for ad delivery. + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTOMATIC = + T.let( + :automatic, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + MANUAL = + T.let( + :manual, + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType + ) + ) + end + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :attribution_spec + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_budget + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ) + end + attr_accessor :destination_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :excluded_geo_locations + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :facebook_positions + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :geo_locations + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :instagram_positions + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :lifetime_budget + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # The ad platform (meta, tiktok). + sig do + returns( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :promoted_object + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :publisher_platforms + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :targeting_automation + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Meta (Facebook/Instagram) ad set configuration. + sig do + params( + attribution_spec: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::OrSymbol + ), + daily_budget: T.nilable(Integer), + destination_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::OrSymbol + ), + end_time: T.nilable(String), + excluded_geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + facebook_positions: T.nilable(T::Array[String]), + geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + lifetime_budget: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::OrSymbol + ), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::OrSymbol, + promoted_object: T.nilable(T::Hash[Symbol, T.anything]), + publisher_platforms: T.nilable(T::Array[String]), + status: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::OrSymbol + ), + targeting_automation: T.nilable(T::Hash[Symbol, T.anything]), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + attribution_spec:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + bid_amount:, + bid_strategy:, + billing_event:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + daily_budget:, + destination_type:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + end_time:, + # Represents untyped JSON + excluded_geo_locations:, + facebook_positions:, + # Represents untyped JSON + geo_locations:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + instagram_actor_id:, + instagram_positions:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + lifetime_budget:, + optimization_goal:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + page_id:, + # The ad platform (meta, tiktok). + platform:, + # Represents untyped JSON + promoted_object:, + publisher_platforms:, + status:, + # Represents untyped JSON + targeting_automation:, + # The typename of this object + typename: :MetaAdGroupPlatformConfigType + ) + end + + sig do + override.returns( + { + attribution_spec: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ), + daily_budget: T.nilable(Integer), + destination_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ), + end_time: T.nilable(String), + excluded_geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + facebook_positions: T.nilable(T::Array[String]), + geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + lifetime_budget: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol, + promoted_object: T.nilable(T::Hash[Symbol, T.anything]), + publisher_platforms: T.nilable(T::Array[String]), + status: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ), + targeting_automation: T.nilable(T::Hash[Symbol, T.anything]), + typename: Symbol + } + ) + end + def to_hash + end + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST_WITHOUT_CAP = + T.let( + :LOWEST_COST_WITHOUT_CAP, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_BID_CAP = + T.let( + :LOWEST_COST_WITH_BID_CAP, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :COST_CAP, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_MIN_ROAS = + T.let( + :LOWEST_COST_WITH_MIN_ROAS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :CLICKS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + NONE = + T.let( + :NONE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + OFFER_CLAIMS = + T.let( + :OFFER_CLAIMS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + PURCHASE = + T.let( + :PURCHASE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + LISTING_INTERACTION = + T.let( + :LISTING_INTERACTION, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNDEFINED = + T.let( + :UNDEFINED, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE = + T.let( + :WEBSITE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + APP = + T.let( + :APP, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK = + T.let( + :FACEBOOK, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSENGER = + T.let( + :MESSENGER, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WHATSAPP = + T.let( + :WHATSAPP, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_DIRECT = + T.let( + :INSTAGRAM_DIRECT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE = + T.let( + :INSTAGRAM_PROFILE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + PHONE_CALL = + T.let( + :PHONE_CALL, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + SHOP_AUTOMATIC = + T.let( + :SHOP_AUTOMATIC, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + APPLINKS_AUTOMATIC = + T.let( + :APPLINKS_AUTOMATIC, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_AD = + T.let( + :ON_AD, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_POST = + T.let( + :ON_POST, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_VIDEO = + T.let( + :ON_VIDEO, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_PAGE = + T.let( + :ON_PAGE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_EVENT = + T.let( + :ON_EVENT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_MESSENGER_WHATSAPP, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = + T.let( + :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK_PAGE = + T.let( + :FACEBOOK_PAGE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_LIVE = + T.let( + :INSTAGRAM_LIVE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK_LIVE = + T.let( + :FACEBOOK_LIVE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + IMAGINE = + T.let( + :IMAGINE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + LEAD_FROM_IG_DIRECT = + T.let( + :LEAD_FROM_IG_DIRECT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + LEAD_FROM_MESSENGER = + T.let( + :LEAD_FROM_MESSENGER, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE_AND_LEAD_FORM = + T.let( + :WEBSITE_AND_LEAD_FORM, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE_AND_PHONE_CALL = + T.let( + :WEBSITE_AND_PHONE_CALL, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + BROADCAST_CHANNEL = + T.let( + :BROADCAST_CHANNEL, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NONE = + T.let( + :NONE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :AD_RECALL_LIFT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_USERS = + T.let( + :ENGAGED_USERS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :EVENT_RESPONSES, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :QUALITY_LEAD, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + OFFSITE_CONVERSIONS = + T.let( + :OFFSITE_CONVERSIONS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + QUALITY_CALL = + T.let( + :QUALITY_CALL, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :LANDING_PAGE_VIEWS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VISIT_INSTAGRAM_PROFILE = + T.let( + :VISIT_INSTAGRAM_PROFILE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + DERIVED_EVENTS = + T.let( + :DERIVED_EVENTS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = + T.let( + :APP_INSTALLS_AND_OFFSITE_CONVERSIONS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :CONVERSATIONS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IN_APP_VALUE = + T.let( + :IN_APP_VALUE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_PURCHASE_CONVERSION = + T.let( + :MESSAGING_PURCHASE_CONVERSION, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + SUBSCRIBERS = + T.let( + :SUBSCRIBERS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :REMINDERS_SET, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MEANINGFUL_CALL_ATTEMPT = + T.let( + :MEANINGFUL_CALL_ATTEMPT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_VISIT = + T.let( + :PROFILE_VISIT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_AND_PAGE_ENGAGEMENT = + T.let( + :PROFILE_AND_PAGE_ENGAGEMENT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_REACH = + T.let( + :ENGAGED_REACH, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_PAGE_VIEWS = + T.let( + :ENGAGED_PAGE_VIEWS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = + T.let( + :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ADVERTISER_SILOED_VALUE = + T.let( + :ADVERTISER_SILOED_VALUE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_OBJECTIVE = + T.let( + :AUTOMATIC_OBJECTIVE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_APPOINTMENT_CONVERSION = + T.let( + :MESSAGING_APPOINTMENT_CONVERSION, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform (meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + PAUSED = + T.let( + :PAUSED, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :bid_price + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + ) + end + attr_accessor :bid_type + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + ) + end + attr_accessor :budget_mode + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_bid_price + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_type + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + ) + end + attr_accessor :operation_status + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :optimization_event + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + ) + end + attr_accessor :pacing + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + ) + end + attr_accessor :placement_type + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :placements + + # The ad platform (meta, tiktok). + sig do + returns( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :schedule_end_time + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :schedule_start_time + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + ) + end + attr_accessor :schedule_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # TikTok ad group configuration. + sig do + params( + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::OrSymbol + ), + budget_mode: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::OrSymbol + ), + conversion_bid_price: T.nilable(Float), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + operation_status: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::OrSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::OrSymbol + ), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::OrSymbol + ), + placements: T.nilable(T::Array[String]), + platform: + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::OrSymbol, + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::OrSymbol + ), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + bid_price:, + bid_type:, + billing_event:, + budget_mode:, + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + conversion_bid_price:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_type:, + operation_status:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + optimization_event:, + optimization_goal:, + pacing:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + pixel_id:, + placement_type:, + placements:, + # The ad platform (meta, tiktok). + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + schedule_end_time:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + schedule_start_time:, + schedule_type:, + # The typename of this object + typename: :TiktokAdGroupPlatformConfigType + ) + end + + sig do + override.returns( + { + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ), + budget_mode: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ), + conversion_bid_price: T.nilable(Float), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + operation_status: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ), + placements: T.nilable(T::Array[String]), + platform: + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol, + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ), + typename: Symbol + } + ) + end + def to_hash + end + + module BidType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BID_TYPE_NO_BID = + T.let( + :BID_TYPE_NO_BID, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + BID_TYPE_CUSTOM = + T.let( + :BID_TYPE_CUSTOM, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CPC = + T.let( + :CPC, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CPM = + T.let( + :CPM, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + OCPM = + T.let( + :OCPM, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CPV = + T.let( + :CPV, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BUDGET_MODE_DAY = + T.let( + :BUDGET_MODE_DAY, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_TOTAL = + T.let( + :BUDGET_MODE_TOTAL, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = + T.let( + :BUDGET_MODE_DYNAMIC_DAILY_BUDGET, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLE = + T.let( + :ENABLE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + DISABLE = + T.let( + :DISABLE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLICK = + T.let( + :CLICK, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERT = + T.let( + :CONVERT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + INSTALL = + T.let( + :INSTALL, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IN_APP_EVENT = + T.let( + :IN_APP_EVENT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + SHOW = + T.let( + :SHOW, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEW = + T.let( + :VIDEO_VIEW, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW = + T.let( + :ENGAGED_VIEW, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW_FIFTEEN = + T.let( + :ENGAGED_VIEW_FIFTEEN, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PREFERRED_LEAD = + T.let( + :PREFERRED_LEAD, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERSATION = + T.let( + :CONVERSATION, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + FOLLOWERS = + T.let( + :FOLLOWERS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_VIEWS = + T.let( + :PROFILE_VIEWS, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PAGE_VISIT = + T.let( + :PAGE_VISIT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_VALUE_OPTIMIZATION = + T.let( + :AUTOMATIC_VALUE_OPTIMIZATION, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + TRAFFIC_LANDING_PAGE_VIEW = + T.let( + :TRAFFIC_LANDING_PAGE_VIEW, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + DESTINATION_VISIT = + T.let( + :DESTINATION_VISIT, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MT_LIVE_ROOM = + T.let( + :MT_LIVE_ROOM, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PRODUCT_CLICK_IN_LIVE = + T.let( + :PRODUCT_CLICK_IN_LIVE, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PACING_MODE_SMOOTH = + T.let( + :PACING_MODE_SMOOTH, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + PACING_MODE_FAST = + T.let( + :PACING_MODE_FAST, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PLACEMENT_TYPE_AUTOMATIC = + T.let( + :PLACEMENT_TYPE_AUTOMATIC, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + PLACEMENT_TYPE_NORMAL = + T.let( + :PLACEMENT_TYPE_NORMAL, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform (meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SCHEDULE_START_END = + T.let( + :SCHEDULE_START_END, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + SCHEDULE_FROM_NOW = + T.let( + :SCHEDULE_FROM_NOW, + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::Variants + ] + ) + end + def self.variants + end + end + + # Current operational status of the ad group + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_update_params.rbi b/rbi/whop_sdk/models/ad_group_update_params.rbi new file mode 100644 index 00000000..02fd2ef3 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_update_params.rbi @@ -0,0 +1,6133 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdGroupUpdateParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + # Budget amount in dollars. + sig { returns(T.nilable(Float)) } + attr_accessor :budget + + # The budget type for an ad campaign or ad group. + sig do + returns(T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol)) + end + attr_accessor :budget_type + + # Unified ad group configuration (bidding, optimization, targeting). + sig { returns(T.nilable(WhopSDK::AdGroupUpdateParams::Config)) } + attr_reader :config + + sig do + params( + config: T.nilable(WhopSDK::AdGroupUpdateParams::Config::OrHash) + ).void + end + attr_writer :config + + # Daily budget in dollars. + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Human-readable ad group name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Platform-specific ad group configuration. + sig { returns(T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig)) } + attr_reader :platform_config + + sig do + params( + platform_config: + T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig::OrHash) + ).void + end + attr_writer :platform_config + + # The status of an external ad group. + sig { returns(T.nilable(WhopSDK::AdGroupUpdateParams::Status::OrSymbol)) } + attr_accessor :status + + sig do + params( + id: String, + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdGroupUpdateParams::Config::OrHash), + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig::OrHash), + status: T.nilable(WhopSDK::AdGroupUpdateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # Budget amount in dollars. + budget: nil, + # The budget type for an ad campaign or ad group. + budget_type: nil, + # Unified ad group configuration (bidding, optimization, targeting). + config: nil, + # Daily budget in dollars. + daily_budget: nil, + # Human-readable ad group name. + name: nil, + # Platform-specific ad group configuration. + platform_config: nil, + # The status of an external ad group. + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdGroupUpdateParams::Config), + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig), + status: T.nilable(WhopSDK::AdGroupUpdateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # The budget type for an ad campaign or ad group. + module BudgetType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdGroupUpdateParams::BudgetType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DAILY = + T.let(:daily, WhopSDK::AdGroupUpdateParams::BudgetType::TaggedSymbol) + LIFETIME = + T.let( + :lifetime, + WhopSDK::AdGroupUpdateParams::BudgetType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::AdGroupUpdateParams::BudgetType::TaggedSymbol] + ) + end + def self.values + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::BidStrategy::OrSymbol + ) + ) + end + attr_accessor :bid_strategy + + # How you are billed (e.g., impressions, clicks). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::BillingEvent::OrSymbol + ) + ) + end + attr_accessor :billing_event + + # Scheduled end time (ISO8601). Required for lifetime budgets. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Maximum number of times to show ads to each person in the frequency interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap + + # Number of days for the frequency cap interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap_interval_days + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::OrSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Budget pacing: standard (even) or accelerated (fast). + sig do + returns( + T.nilable(WhopSDK::AdGroupUpdateParams::Config::Pacing::OrSymbol) + ) + end + attr_accessor :pacing + + # Scheduled start time (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + returns(T.nilable(WhopSDK::AdGroupUpdateParams::Config::Targeting)) + end + attr_reader :targeting + + sig do + params( + targeting: + T.nilable(WhopSDK::AdGroupUpdateParams::Config::Targeting::OrHash) + ).void + end + attr_writer :targeting + + # Unified ad group configuration (bidding, optimization, targeting). + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::BillingEvent::OrSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable(WhopSDK::AdGroupUpdateParams::Config::Pacing::OrSymbol), + start_time: T.nilable(String), + targeting: + T.nilable(WhopSDK::AdGroupUpdateParams::Config::Targeting::OrHash) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + bid_amount: nil, + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + bid_strategy: nil, + # How you are billed (e.g., impressions, clicks). + billing_event: nil, + # Scheduled end time (ISO8601). Required for lifetime budgets. + end_time: nil, + # Maximum number of times to show ads to each person in the frequency interval. + frequency_cap: nil, + # Number of days for the frequency cap interval. + frequency_cap_interval_days: nil, + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + optimization_goal: nil, + # Budget pacing: standard (even) or accelerated (fast). + pacing: nil, + # Scheduled start time (ISO8601). + start_time: nil, + # Audience targeting settings (demographics, geo, interests, audiences, devices). + targeting: nil + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::BillingEvent::OrSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::Pacing::OrSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable(WhopSDK::AdGroupUpdateParams::Config::Targeting) + } + ) + end + def to_hash + end + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdGroupUpdateParams::Config::BidStrategy) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::AdGroupUpdateParams::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::AdGroupUpdateParams::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::AdGroupUpdateParams::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed (e.g., impressions, clicks). + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdGroupUpdateParams::Config::BillingEvent) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::AdGroupUpdateParams::Config::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :clicks, + WhopSDK::AdGroupUpdateParams::Config::BillingEvent::TaggedSymbol + ) + OPTIMIZED_CPM = + T.let( + :optimized_cpm, + WhopSDK::AdGroupUpdateParams::Config::BillingEvent::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::AdGroupUpdateParams::Config::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CONVERSIONS = + T.let( + :conversions, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :link_clicks, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :landing_page_views, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :reach, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :app_installs, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :lead_generation, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :value, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :page_likes, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :conversations, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :ad_recall_lift, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :two_second_continuous_video_views, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :post_engagement, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :event_responses, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :reminders_set, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :quality_lead, + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget pacing: standard (even) or accelerated (fast). + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdGroupUpdateParams::Config::Pacing) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = + T.let( + :standard, + WhopSDK::AdGroupUpdateParams::Config::Pacing::TaggedSymbol + ) + ACCELERATED = + T.let( + :accelerated, + WhopSDK::AdGroupUpdateParams::Config::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Targeting < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::Config::Targeting, + WhopSDK::Internal::AnyHash + ) + end + + # Maximum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_max + + # Minimum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_min + + # ISO 3166-1 alpha-2 country codes to target. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Device platforms to target. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform::OrSymbol + ] + ) + ) + end + attr_accessor :device_platforms + + # Platform audience IDs to exclude. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_audience_ids + + # Genders to target. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender::OrSymbol + ] + ) + ) + end + attr_accessor :genders + + # Platform audience IDs to include. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_audience_ids + + # Platform-specific interest IDs to target. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_ids + + # Language codes to target. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :languages + + # Placement strategy for ad delivery. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType::OrSymbol + ) + ) + end + attr_accessor :placement_type + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + params( + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform::OrSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender::OrSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Maximum age for demographic targeting. + age_max: nil, + # Minimum age for demographic targeting. + age_min: nil, + # ISO 3166-1 alpha-2 country codes to target. + countries: nil, + # Device platforms to target. + device_platforms: nil, + # Platform audience IDs to exclude. + exclude_audience_ids: nil, + # Genders to target. + genders: nil, + # Platform audience IDs to include. + include_audience_ids: nil, + # Platform-specific interest IDs to target. + interest_ids: nil, + # Language codes to target. + languages: nil, + # Placement strategy for ad delivery. + placement_type: nil + ) + end + + sig do + override.returns( + { + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform::OrSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender::OrSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType::OrSymbol + ) + } + ) + end + def to_hash + end + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MOBILE = + T.let( + :mobile, + WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform::TaggedSymbol + ) + DESKTOP = + T.let( + :desktop, + WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MALE = + T.let( + :male, + WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender::TaggedSymbol + ) + FEMALE = + T.let( + :female, + WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender::TaggedSymbol + ) + ALL = + T.let( + :all, + WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Placement strategy for ad delivery. + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTOMATIC = + T.let( + :automatic, + WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType::TaggedSymbol + ) + MANUAL = + T.let( + :manual, + WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::Config::Targeting::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig, + WhopSDK::Internal::AnyHash + ) + end + + # Meta (Facebook/Instagram) ad set configuration. + sig do + returns(T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta)) + end + attr_reader :meta + + sig do + params( + meta: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OrHash + ) + ).void + end + attr_writer :meta + + # TikTok ad group configuration. + sig do + returns( + T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok) + ) + end + attr_reader :tiktok + + sig do + params( + tiktok: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OrHash + ) + ).void + end + attr_writer :tiktok + + # Platform-specific ad group configuration. + sig do + params( + meta: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OrHash + ), + tiktok: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Meta (Facebook/Instagram) ad set configuration. + meta: nil, + # TikTok ad group configuration. + tiktok: nil + ) + end + + sig do + override.returns( + { + meta: + T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta), + tiktok: + T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok) + } + ) + end + def to_hash + end + + class Meta < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :android_devices + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :attribution_setting + + # Conversion attribution windows. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec + ] + ) + ) + end + attr_accessor :attribution_spec + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :audience_network_positions + + # Audience type for retargeting. + sig { returns(T.nilable(String)) } + attr_accessor :audience_type + + # Bid amount in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # Meta bid strategy. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy::OrSymbol + ) + ) + end + attr_accessor :bid_strategy + + # How you are billed on Meta. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::OrSymbol + ) + ) + end + attr_accessor :billing_event + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :brand_safety_content_filter_levels + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :budget_remaining + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :cost_per_result_goal + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :created_time + + # Daily budget in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_budget + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :daily_min_spend_target + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :daily_spend_cap + + # Where ads in this ad set direct people. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::OrSymbol + ) + ) + end + attr_accessor :destination_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :dsa_beneficiary + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :dsa_payor + + # End time (ISO8601). Required for lifetime budgets. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Geo locations to exclude. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations + ) + ) + end + attr_reader :excluded_geo_locations + + sig do + params( + excluded_geo_locations: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::OrHash + ) + ).void + end + attr_writer :excluded_geo_locations + + # Facebook ad placements (feed, reels, stories, etc.). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :facebook_positions + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_control_count + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_control_days + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :frequency_control_type + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity + ] + ) + ) + end + attr_accessor :geo_cities + + # Geo targeting (countries, regions, cities, zips). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations + ) + ) + end + attr_reader :geo_locations + + sig do + params( + geo_locations: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::OrHash + ) + ).void + end + attr_writer :geo_locations + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion + ] + ) + ) + end + attr_accessor :geo_regions + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :geo_zips + + # Instagram account ID for this ad set. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + # Instagram ad placements (stream, story, reels, etc.). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :instagram_positions + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :ios_devices + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :is_dynamic_creative + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::OrSymbol + ) + ) + end + attr_accessor :lead_conversion_location + + # Configuration for a Meta lead gen instant form. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig + ) + ) + end + attr_reader :lead_form_config + + sig do + params( + lead_form_config: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::OrHash + ) + ).void + end + attr_writer :lead_form_config + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :lead_gen_form_id + + # Lifetime budget in cents. + sig { returns(T.nilable(Integer)) } + attr_accessor :lifetime_budget + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :lifetime_min_spend_target + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :lifetime_spend_cap + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :location_types + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :messenger_positions + + # What this ad set optimizes for on Meta. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::OrSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Facebook Page ID for this ad set. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + # The object this ad set promotes (pixel, page, etc.). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject + ) + ) + end + attr_reader :promoted_object + + sig do + params( + promoted_object: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject::OrHash + ) + ).void + end + attr_writer :promoted_object + + # Platforms to publish on (facebook, instagram, messenger, audience_network). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :publisher_platforms + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :source_adset_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::Status::OrSymbol + ) + ) + end + attr_accessor :status + + # Advantage+ audience expansion settings. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation + ) + ) + end + attr_reader :targeting_automation + + sig do + params( + targeting_automation: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation::OrHash + ) + ).void + end + attr_writer :targeting_automation + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :threads_positions + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :updated_time + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :user_device + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :user_os + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :whatsapp_phone_number + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :whatsapp_positions + + # Meta (Facebook/Instagram) ad set configuration. + sig do + params( + android_devices: T.nilable(T::Array[String]), + attribution_setting: T.nilable(String), + attribution_spec: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec::OrHash + ] + ), + audience_network_positions: T.nilable(T::Array[String]), + audience_type: T.nilable(String), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::OrSymbol + ), + brand_safety_content_filter_levels: T.nilable(T::Array[String]), + budget_remaining: T.nilable(String), + cost_per_result_goal: T.nilable(Float), + created_time: T.nilable(String), + daily_budget: T.nilable(Integer), + daily_min_spend_target: T.nilable(String), + daily_spend_cap: T.nilable(String), + destination_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::OrSymbol + ), + dsa_beneficiary: T.nilable(String), + dsa_payor: T.nilable(String), + end_time: T.nilable(String), + excluded_geo_locations: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::OrHash + ), + facebook_positions: T.nilable(T::Array[String]), + frequency_control_count: T.nilable(Integer), + frequency_control_days: T.nilable(Integer), + frequency_control_type: T.nilable(String), + geo_cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity::OrHash + ] + ), + geo_locations: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::OrHash + ), + geo_regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion::OrHash + ] + ), + geo_zips: T.nilable(T::Array[String]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + ios_devices: T.nilable(T::Array[String]), + is_dynamic_creative: T.nilable(T::Boolean), + lead_conversion_location: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::OrSymbol + ), + lead_form_config: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::OrHash + ), + lead_gen_form_id: T.nilable(String), + lifetime_budget: T.nilable(Integer), + lifetime_min_spend_target: T.nilable(String), + lifetime_spend_cap: T.nilable(String), + location_types: T.nilable(T::Array[String]), + messenger_positions: T.nilable(T::Array[String]), + optimization_goal: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::OrSymbol + ), + page_id: T.nilable(String), + pixel_id: T.nilable(String), + promoted_object: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject::OrHash + ), + publisher_platforms: T.nilable(T::Array[String]), + source_adset_id: T.nilable(String), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::Status::OrSymbol + ), + targeting_automation: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation::OrHash + ), + threads_positions: T.nilable(T::Array[String]), + updated_time: T.nilable(String), + user_device: T.nilable(T::Array[String]), + user_os: T.nilable(T::Array[String]), + whatsapp_phone_number: T.nilable(String), + whatsapp_positions: T.nilable(T::Array[String]) + ).returns(T.attached_class) + end + def self.new( + android_devices: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + attribution_setting: nil, + # Conversion attribution windows. + attribution_spec: nil, + audience_network_positions: nil, + # Audience type for retargeting. + audience_type: nil, + # Bid amount in cents. + bid_amount: nil, + # Meta bid strategy. + bid_strategy: nil, + # How you are billed on Meta. + billing_event: nil, + brand_safety_content_filter_levels: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + budget_remaining: nil, + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + cost_per_result_goal: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + created_time: nil, + # Daily budget in cents. + daily_budget: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + daily_min_spend_target: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + daily_spend_cap: nil, + # Where ads in this ad set direct people. + destination_type: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + dsa_beneficiary: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + dsa_payor: nil, + # End time (ISO8601). Required for lifetime budgets. + end_time: nil, + # Geo locations to exclude. + excluded_geo_locations: nil, + # Facebook ad placements (feed, reels, stories, etc.). + facebook_positions: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + frequency_control_count: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + frequency_control_days: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + frequency_control_type: nil, + geo_cities: nil, + # Geo targeting (countries, regions, cities, zips). + geo_locations: nil, + geo_regions: nil, + geo_zips: nil, + # Instagram account ID for this ad set. + instagram_actor_id: nil, + # Instagram ad placements (stream, story, reels, etc.). + instagram_positions: nil, + ios_devices: nil, + # Represents `true` or `false` values. + is_dynamic_creative: nil, + lead_conversion_location: nil, + # Configuration for a Meta lead gen instant form. + lead_form_config: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + lead_gen_form_id: nil, + # Lifetime budget in cents. + lifetime_budget: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + lifetime_min_spend_target: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + lifetime_spend_cap: nil, + location_types: nil, + messenger_positions: nil, + # What this ad set optimizes for on Meta. + optimization_goal: nil, + # Facebook Page ID for this ad set. + page_id: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + pixel_id: nil, + # The object this ad set promotes (pixel, page, etc.). + promoted_object: nil, + # Platforms to publish on (facebook, instagram, messenger, audience_network). + publisher_platforms: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + source_adset_id: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + start_time: nil, + status: nil, + # Advantage+ audience expansion settings. + targeting_automation: nil, + threads_positions: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + updated_time: nil, + user_device: nil, + user_os: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + whatsapp_phone_number: nil, + whatsapp_positions: nil + ) + end + + sig do + override.returns( + { + android_devices: T.nilable(T::Array[String]), + attribution_setting: T.nilable(String), + attribution_spec: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec + ] + ), + audience_network_positions: T.nilable(T::Array[String]), + audience_type: T.nilable(String), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::OrSymbol + ), + brand_safety_content_filter_levels: T.nilable(T::Array[String]), + budget_remaining: T.nilable(String), + cost_per_result_goal: T.nilable(Float), + created_time: T.nilable(String), + daily_budget: T.nilable(Integer), + daily_min_spend_target: T.nilable(String), + daily_spend_cap: T.nilable(String), + destination_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::OrSymbol + ), + dsa_beneficiary: T.nilable(String), + dsa_payor: T.nilable(String), + end_time: T.nilable(String), + excluded_geo_locations: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations + ), + facebook_positions: T.nilable(T::Array[String]), + frequency_control_count: T.nilable(Integer), + frequency_control_days: T.nilable(Integer), + frequency_control_type: T.nilable(String), + geo_cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity + ] + ), + geo_locations: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations + ), + geo_regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion + ] + ), + geo_zips: T.nilable(T::Array[String]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + ios_devices: T.nilable(T::Array[String]), + is_dynamic_creative: T.nilable(T::Boolean), + lead_conversion_location: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::OrSymbol + ), + lead_form_config: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig + ), + lead_gen_form_id: T.nilable(String), + lifetime_budget: T.nilable(Integer), + lifetime_min_spend_target: T.nilable(String), + lifetime_spend_cap: T.nilable(String), + location_types: T.nilable(T::Array[String]), + messenger_positions: T.nilable(T::Array[String]), + optimization_goal: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::OrSymbol + ), + page_id: T.nilable(String), + pixel_id: T.nilable(String), + promoted_object: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject + ), + publisher_platforms: T.nilable(T::Array[String]), + source_adset_id: T.nilable(String), + start_time: T.nilable(String), + status: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::Status::OrSymbol + ), + targeting_automation: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation + ), + threads_positions: T.nilable(T::Array[String]), + updated_time: T.nilable(String), + user_device: T.nilable(T::Array[String]), + user_os: T.nilable(T::Array[String]), + whatsapp_phone_number: T.nilable(String), + whatsapp_positions: T.nilable(T::Array[String]) + } + ) + end + def to_hash + end + + class AttributionSpec < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec, + WhopSDK::Internal::AnyHash + ) + end + + # Attribution event type (e.g., CLICK_THROUGH, VIEW_THROUGH). + sig { returns(String) } + attr_accessor :event_type + + # Attribution window in days (1, 7, 28). + sig { returns(Integer) } + attr_accessor :window_days + + # Meta conversion attribution window. + sig do + params(event_type: String, window_days: Integer).returns( + T.attached_class + ) + end + def self.new( + # Attribution event type (e.g., CLICK_THROUGH, VIEW_THROUGH). + event_type:, + # Attribution window in days (1, 7, 28). + window_days: + ) + end + + sig do + override.returns({ event_type: String, window_days: Integer }) + end + def to_hash + end + end + + # Meta bid strategy. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST_WITHOUT_CAP = + T.let( + :LOWEST_COST_WITHOUT_CAP, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_BID_CAP = + T.let( + :LOWEST_COST_WITH_BID_CAP, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :COST_CAP, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_MIN_ROAS = + T.let( + :LOWEST_COST_WITH_MIN_ROAS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed on Meta. + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :CLICKS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + NONE = + T.let( + :NONE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + OFFER_CLAIMS = + T.let( + :OFFER_CLAIMS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + PURCHASE = + T.let( + :PURCHASE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + LISTING_INTERACTION = + T.let( + :LISTING_INTERACTION, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Where ads in this ad set direct people. + module DestinationType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNDEFINED = + T.let( + :UNDEFINED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + WEBSITE = + T.let( + :WEBSITE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + APP = + T.let( + :APP, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + FACEBOOK = + T.let( + :FACEBOOK, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSENGER = + T.let( + :MESSENGER, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + WHATSAPP = + T.let( + :WHATSAPP, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + INSTAGRAM_DIRECT = + T.let( + :INSTAGRAM_DIRECT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE = + T.let( + :INSTAGRAM_PROFILE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + PHONE_CALL = + T.let( + :PHONE_CALL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + SHOP_AUTOMATIC = + T.let( + :SHOP_AUTOMATIC, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + APPLINKS_AUTOMATIC = + T.let( + :APPLINKS_AUTOMATIC, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_AD = + T.let( + :ON_AD, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_POST = + T.let( + :ON_POST, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_VIDEO = + T.let( + :ON_VIDEO, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_PAGE = + T.let( + :ON_PAGE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + ON_EVENT = + T.let( + :ON_EVENT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSAGING_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_MESSENGER_WHATSAPP, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = + T.let( + :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + FACEBOOK_PAGE = + T.let( + :FACEBOOK_PAGE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + INSTAGRAM_LIVE = + T.let( + :INSTAGRAM_LIVE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + FACEBOOK_LIVE = + T.let( + :FACEBOOK_LIVE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + IMAGINE = + T.let( + :IMAGINE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + LEAD_FROM_IG_DIRECT = + T.let( + :LEAD_FROM_IG_DIRECT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + LEAD_FROM_MESSENGER = + T.let( + :LEAD_FROM_MESSENGER, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + WEBSITE_AND_LEAD_FORM = + T.let( + :WEBSITE_AND_LEAD_FORM, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + WEBSITE_AND_PHONE_CALL = + T.let( + :WEBSITE_AND_PHONE_CALL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + BROADCAST_CHANNEL = + T.let( + :BROADCAST_CHANNEL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::DestinationType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class ExcludedGeoLocations < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations, + WhopSDK::Internal::AnyHash + ) + end + + # City targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City + ] + ) + ) + end + attr_accessor :cities + + # ISO 3166-1 alpha-2 country codes. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Location types (home, recent, travel_in). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :location_types + + # Region/state targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region + ] + ) + ) + end + attr_accessor :regions + + # Zip/postal code targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip + ] + ) + ) + end + attr_accessor :zips + + # Geo locations to exclude. + sig do + params( + cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City::OrHash + ] + ), + countries: T.nilable(T::Array[String]), + location_types: T.nilable(T::Array[String]), + regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region::OrHash + ] + ), + zips: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # City targets. + cities: nil, + # ISO 3166-1 alpha-2 country codes. + countries: nil, + # Location types (home, recent, travel_in). + location_types: nil, + # Region/state targets. + regions: nil, + # Zip/postal code targets. + zips: nil + ) + end + + sig do + override.returns( + { + cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City + ] + ), + countries: T.nilable(T::Array[String]), + location_types: T.nilable(T::Array[String]), + regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region + ] + ), + zips: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip + ] + ) + } + ) + end + def to_hash + end + + class City < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class Region < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class Zip < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + + class GeoCity < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class GeoLocations < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations, + WhopSDK::Internal::AnyHash + ) + end + + # City targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City + ] + ) + ) + end + attr_accessor :cities + + # ISO 3166-1 alpha-2 country codes. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Location types (home, recent, travel_in). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :location_types + + # Region/state targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region + ] + ) + ) + end + attr_accessor :regions + + # Zip/postal code targets. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip + ] + ) + ) + end + attr_accessor :zips + + # Geo targeting (countries, regions, cities, zips). + sig do + params( + cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City::OrHash + ] + ), + countries: T.nilable(T::Array[String]), + location_types: T.nilable(T::Array[String]), + regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region::OrHash + ] + ), + zips: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # City targets. + cities: nil, + # ISO 3166-1 alpha-2 country codes. + countries: nil, + # Location types (home, recent, travel_in). + location_types: nil, + # Region/state targets. + regions: nil, + # Zip/postal code targets. + zips: nil + ) + end + + sig do + override.returns( + { + cities: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City + ] + ), + countries: T.nilable(T::Array[String]), + location_types: T.nilable(T::Array[String]), + regions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region + ] + ), + zips: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip + ] + ) + } + ) + end + def to_hash + end + + class City < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class Region < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + class Zip < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + + class GeoRegion < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion, + WhopSDK::Internal::AnyHash + ) + end + + # Meta geo target key/ID. + sig { returns(String) } + attr_accessor :key + + # Country code for this entry. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Radius in miles (cities only). + sig { returns(T.nilable(Integer)) } + attr_accessor :radius + + # A Meta geo target entry (region, city, or zip). + sig do + params( + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Meta geo target key/ID. + key:, + # Country code for this entry. + country: nil, + # Display name. + name: nil, + # Radius in miles (cities only). + radius: nil + ) + end + + sig do + override.returns( + { + key: String, + country: T.nilable(String), + name: T.nilable(String), + radius: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + module LeadConversionLocation + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WEBSITE = + T.let( + :website, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + INSTANT_FORMS = + T.let( + :instant_forms, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + MESSENGER = + T.let( + :messenger, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + INSTAGRAM = + T.let( + :instagram, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + CALLS = + T.let( + :calls, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + APP = + T.let( + :app, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadConversionLocation::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LeadFormConfig < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig, + WhopSDK::Internal::AnyHash + ) + end + + # Name of the lead form. + sig { returns(String) } + attr_accessor :name + + # URL to your privacy policy. Required by Meta. + sig { returns(String) } + attr_accessor :privacy_policy_url + + # Questions to ask on the form. + sig do + returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question + ] + ) + end + attr_accessor :questions + + # Background image source: from_ad or custom. + sig { returns(T.nilable(String)) } + attr_accessor :background_image_source + + # URL of custom background image. + sig { returns(T.nilable(String)) } + attr_accessor :background_image_url + + # Whether conditional logic is enabled for questions. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :conditional_logic_enabled + + # CTA button text on the greeting card. + sig { returns(T.nilable(String)) } + attr_accessor :context_card_button_text + + # Optional greeting card bullet points. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :context_card_content + + # Greeting layout: PARAGRAPH_STYLE or LIST_STYLE. + sig { returns(T.nilable(String)) } + attr_accessor :context_card_style + + # Optional greeting card title. + sig { returns(T.nilable(String)) } + attr_accessor :context_card_title + + # Custom disclaimer body text. + sig { returns(T.nilable(String)) } + attr_accessor :custom_disclaimer_body + + # Consent checkboxes for the custom disclaimer. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox + ] + ) + ) + end + attr_accessor :custom_disclaimer_checkboxes + + # Custom disclaimer section title. + sig { returns(T.nilable(String)) } + attr_accessor :custom_disclaimer_title + + # Form type: more_volume, higher_intent, or rich_creative. + sig { returns(T.nilable(String)) } + attr_accessor :form_type + + # Enable Messenger follow-up after form submission. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :messenger_enabled + + # Require phone number verification via OTP (higher_intent only). + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :phone_verification_enabled + + # Custom link text for privacy policy (max 70 chars). + sig { returns(T.nilable(String)) } + attr_accessor :privacy_policy_link_text + + # Custom headline for the questions page. + sig { returns(T.nilable(String)) } + attr_accessor :question_page_custom_headline + + # Headline for rich creative form intro. + sig { returns(T.nilable(String)) } + attr_accessor :rich_creative_headline + + # Overview description for rich creative form intro. + sig { returns(T.nilable(String)) } + attr_accessor :rich_creative_overview + + # Uploaded image URL for rich creative form type. + sig { returns(T.nilable(String)) } + attr_accessor :rich_creative_url + + # Thank you / ending pages (supports multiple for conditional routing). + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage + ] + ) + ) + end + attr_accessor :thank_you_pages + + # Configuration for a Meta lead gen instant form. + sig do + params( + name: String, + privacy_policy_url: String, + questions: + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::OrHash + ], + background_image_source: T.nilable(String), + background_image_url: T.nilable(String), + conditional_logic_enabled: T.nilable(T::Boolean), + context_card_button_text: T.nilable(String), + context_card_content: T.nilable(T::Array[String]), + context_card_style: T.nilable(String), + context_card_title: T.nilable(String), + custom_disclaimer_body: T.nilable(String), + custom_disclaimer_checkboxes: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox::OrHash + ] + ), + custom_disclaimer_title: T.nilable(String), + form_type: T.nilable(String), + messenger_enabled: T.nilable(T::Boolean), + phone_verification_enabled: T.nilable(T::Boolean), + privacy_policy_link_text: T.nilable(String), + question_page_custom_headline: T.nilable(String), + rich_creative_headline: T.nilable(String), + rich_creative_overview: T.nilable(String), + rich_creative_url: T.nilable(String), + thank_you_pages: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # Name of the lead form. + name:, + # URL to your privacy policy. Required by Meta. + privacy_policy_url:, + # Questions to ask on the form. + questions:, + # Background image source: from_ad or custom. + background_image_source: nil, + # URL of custom background image. + background_image_url: nil, + # Whether conditional logic is enabled for questions. + conditional_logic_enabled: nil, + # CTA button text on the greeting card. + context_card_button_text: nil, + # Optional greeting card bullet points. + context_card_content: nil, + # Greeting layout: PARAGRAPH_STYLE or LIST_STYLE. + context_card_style: nil, + # Optional greeting card title. + context_card_title: nil, + # Custom disclaimer body text. + custom_disclaimer_body: nil, + # Consent checkboxes for the custom disclaimer. + custom_disclaimer_checkboxes: nil, + # Custom disclaimer section title. + custom_disclaimer_title: nil, + # Form type: more_volume, higher_intent, or rich_creative. + form_type: nil, + # Enable Messenger follow-up after form submission. + messenger_enabled: nil, + # Require phone number verification via OTP (higher_intent only). + phone_verification_enabled: nil, + # Custom link text for privacy policy (max 70 chars). + privacy_policy_link_text: nil, + # Custom headline for the questions page. + question_page_custom_headline: nil, + # Headline for rich creative form intro. + rich_creative_headline: nil, + # Overview description for rich creative form intro. + rich_creative_overview: nil, + # Uploaded image URL for rich creative form type. + rich_creative_url: nil, + # Thank you / ending pages (supports multiple for conditional routing). + thank_you_pages: nil + ) + end + + sig do + override.returns( + { + name: String, + privacy_policy_url: String, + questions: + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question + ], + background_image_source: T.nilable(String), + background_image_url: T.nilable(String), + conditional_logic_enabled: T.nilable(T::Boolean), + context_card_button_text: T.nilable(String), + context_card_content: T.nilable(T::Array[String]), + context_card_style: T.nilable(String), + context_card_title: T.nilable(String), + custom_disclaimer_body: T.nilable(String), + custom_disclaimer_checkboxes: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox + ] + ), + custom_disclaimer_title: T.nilable(String), + form_type: T.nilable(String), + messenger_enabled: T.nilable(T::Boolean), + phone_verification_enabled: T.nilable(T::Boolean), + privacy_policy_link_text: T.nilable(String), + question_page_custom_headline: T.nilable(String), + rich_creative_headline: T.nilable(String), + rich_creative_overview: T.nilable(String), + rich_creative_url: T.nilable(String), + thank_you_pages: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage + ] + ) + } + ) + end + def to_hash + end + + class Question < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question, + WhopSDK::Internal::AnyHash + ) + end + + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + sig { returns(String) } + attr_accessor :type + + # Group ID for conditional question routing. + sig { returns(T.nilable(String)) } + attr_accessor :conditional_questions_group_id + + # Questions shown conditionally based on this question's answer. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion + ] + ) + ) + end + attr_accessor :dependent_conditional_questions + + # Helper text shown below the question. + sig { returns(T.nilable(String)) } + attr_accessor :inline_context + + # Unique key for this question. + sig { returns(T.nilable(String)) } + attr_accessor :key + + # Custom label for CUSTOM questions. + sig { returns(T.nilable(String)) } + attr_accessor :label + + # Answer options for multiple choice CUSTOM questions. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option + ] + ) + ) + end + attr_accessor :options + + # UI hint: short_answer, multiple_choice, or appointment. + sig { returns(T.nilable(String)) } + attr_accessor :question_format + + # A question on a Meta lead gen form. + sig do + params( + type: String, + conditional_questions_group_id: T.nilable(String), + dependent_conditional_questions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::OrHash + ] + ), + inline_context: T.nilable(String), + key: T.nilable(String), + label: T.nilable(String), + options: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::OrHash + ] + ), + question_format: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + type:, + # Group ID for conditional question routing. + conditional_questions_group_id: nil, + # Questions shown conditionally based on this question's answer. + dependent_conditional_questions: nil, + # Helper text shown below the question. + inline_context: nil, + # Unique key for this question. + key: nil, + # Custom label for CUSTOM questions. + label: nil, + # Answer options for multiple choice CUSTOM questions. + options: nil, + # UI hint: short_answer, multiple_choice, or appointment. + question_format: nil + ) + end + + sig do + override.returns( + { + type: String, + conditional_questions_group_id: T.nilable(String), + dependent_conditional_questions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion + ] + ), + inline_context: T.nilable(String), + key: T.nilable(String), + label: T.nilable(String), + options: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option + ] + ), + question_format: T.nilable(String) + } + ) + end + def to_hash + end + + class DependentConditionalQuestion < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion, + WhopSDK::Internal::AnyHash + ) + end + + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + sig { returns(String) } + attr_accessor :type + + # Helper text shown below the question. + sig { returns(T.nilable(String)) } + attr_accessor :inline_context + + # Unique key for this question. + sig { returns(T.nilable(String)) } + attr_accessor :key + + # Custom label for CUSTOM questions. + sig { returns(T.nilable(String)) } + attr_accessor :label + + # Answer options for multiple choice questions. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option + ] + ) + ) + end + attr_accessor :options + + # A dependent conditional question (non-recursive to avoid schema recursion). + sig do + params( + type: String, + inline_context: T.nilable(String), + key: T.nilable(String), + label: T.nilable(String), + options: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # Question type (EMAIL, FULL_NAME, PHONE, CUSTOM, DATE_TIME, etc.). + type:, + # Helper text shown below the question. + inline_context: nil, + # Unique key for this question. + key: nil, + # Custom label for CUSTOM questions. + label: nil, + # Answer options for multiple choice questions. + options: nil + ) + end + + sig do + override.returns( + { + type: String, + inline_context: T.nilable(String), + key: T.nilable(String), + label: T.nilable(String), + options: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option + ] + ) + } + ) + end + def to_hash + end + + class Option < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option, + WhopSDK::Internal::AnyHash + ) + end + + # Unique key for this option. + sig { returns(String) } + attr_accessor :key + + # Display text for this option. + sig { returns(String) } + attr_accessor :value + + # Conditional logic routing for this answer option. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic + ) + ) + end + attr_reader :logic + + sig do + params( + logic: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic::OrHash + ) + ).void + end + attr_writer :logic + + # An answer option for a multiple choice lead form question. + sig do + params( + key: String, + value: String, + logic: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Unique key for this option. + key:, + # Display text for this option. + value:, + # Conditional logic routing for this answer option. + logic: nil + ) + end + + sig do + override.returns( + { + key: String, + value: String, + logic: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic + ) + } + ) + end + def to_hash + end + + class Logic < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic, + WhopSDK::Internal::AnyHash + ) + end + + # Logic type: go_to_question, submit_form, or close_form. + sig { returns(String) } + attr_accessor :type + + # Index of the end page to route to (for submit_form type). + sig { returns(T.nilable(Integer)) } + attr_accessor :target_end_page_index + + # Index of the question to route to (for go_to_question type). + sig { returns(T.nilable(Integer)) } + attr_accessor :target_question_index + + # Conditional logic routing for this answer option. + sig do + params( + type: String, + target_end_page_index: T.nilable(Integer), + target_question_index: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Logic type: go_to_question, submit_form, or close_form. + type:, + # Index of the end page to route to (for submit_form type). + target_end_page_index: nil, + # Index of the question to route to (for go_to_question type). + target_question_index: nil + ) + end + + sig do + override.returns( + { + type: String, + target_end_page_index: T.nilable(Integer), + target_question_index: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + end + + class Option < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option, + WhopSDK::Internal::AnyHash + ) + end + + # Unique key for this option. + sig { returns(String) } + attr_accessor :key + + # Display text for this option. + sig { returns(String) } + attr_accessor :value + + # Conditional logic routing for this answer option. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic + ) + ) + end + attr_reader :logic + + sig do + params( + logic: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic::OrHash + ) + ).void + end + attr_writer :logic + + # An answer option for a multiple choice lead form question. + sig do + params( + key: String, + value: String, + logic: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Unique key for this option. + key:, + # Display text for this option. + value:, + # Conditional logic routing for this answer option. + logic: nil + ) + end + + sig do + override.returns( + { + key: String, + value: String, + logic: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic + ) + } + ) + end + def to_hash + end + + class Logic < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic, + WhopSDK::Internal::AnyHash + ) + end + + # Logic type: go_to_question, submit_form, or close_form. + sig { returns(String) } + attr_accessor :type + + # Index of the end page to route to (for submit_form type). + sig { returns(T.nilable(Integer)) } + attr_accessor :target_end_page_index + + # Index of the question to route to (for go_to_question type). + sig { returns(T.nilable(Integer)) } + attr_accessor :target_question_index + + # Conditional logic routing for this answer option. + sig do + params( + type: String, + target_end_page_index: T.nilable(Integer), + target_question_index: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # Logic type: go_to_question, submit_form, or close_form. + type:, + # Index of the end page to route to (for submit_form type). + target_end_page_index: nil, + # Index of the question to route to (for go_to_question type). + target_question_index: nil + ) + end + + sig do + override.returns( + { + type: String, + target_end_page_index: T.nilable(Integer), + target_question_index: T.nilable(Integer) + } + ) + end + def to_hash + end + end + end + end + + class CustomDisclaimerCheckbox < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox, + WhopSDK::Internal::AnyHash + ) + end + + # Unique key for this checkbox. + sig { returns(String) } + attr_accessor :key + + # Label text for the checkbox. + sig { returns(String) } + attr_accessor :text + + # Whether the checkbox is checked by default. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :is_checked_by_default + + # Whether the checkbox must be checked to submit. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :is_required + + # A consent checkbox for the custom disclaimer section. + sig do + params( + key: String, + text: String, + is_checked_by_default: T.nilable(T::Boolean), + is_required: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # Unique key for this checkbox. + key:, + # Label text for the checkbox. + text:, + # Whether the checkbox is checked by default. + is_checked_by_default: nil, + # Whether the checkbox must be checked to submit. + is_required: nil + ) + end + + sig do + override.returns( + { + key: String, + text: String, + is_checked_by_default: T.nilable(T::Boolean), + is_required: T.nilable(T::Boolean) + } + ) + end + def to_hash + end + end + + class ThankYouPage < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage, + WhopSDK::Internal::AnyHash + ) + end + + # Body text for this ending page. + sig { returns(T.nilable(String)) } + attr_accessor :body + + # Business phone number for call CTA. + sig { returns(T.nilable(String)) } + attr_accessor :business_phone + + # Custom button text. + sig { returns(T.nilable(String)) } + attr_accessor :button_text + + # CTA button type: VIEW_WEBSITE, CALL_BUSINESS, DOWNLOAD. + sig { returns(T.nilable(String)) } + attr_accessor :button_type + + # Question group ID for conditional routing to this page. + sig { returns(T.nilable(String)) } + attr_accessor :conditional_question_group_id + + # Enable Messenger follow-up. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :enable_messenger + + # Uploaded file URL for gated content download. + sig { returns(T.nilable(String)) } + attr_accessor :gated_file_url + + # URL the button links to. + sig { returns(T.nilable(String)) } + attr_accessor :link + + # Internal name for this ending page. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Headline for this ending page. + sig { returns(T.nilable(String)) } + attr_accessor :title + + # A thank-you / ending page for a Meta lead gen form. + sig do + params( + body: T.nilable(String), + business_phone: T.nilable(String), + button_text: T.nilable(String), + button_type: T.nilable(String), + conditional_question_group_id: T.nilable(String), + enable_messenger: T.nilable(T::Boolean), + gated_file_url: T.nilable(String), + link: T.nilable(String), + name: T.nilable(String), + title: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Body text for this ending page. + body: nil, + # Business phone number for call CTA. + business_phone: nil, + # Custom button text. + button_text: nil, + # CTA button type: VIEW_WEBSITE, CALL_BUSINESS, DOWNLOAD. + button_type: nil, + # Question group ID for conditional routing to this page. + conditional_question_group_id: nil, + # Enable Messenger follow-up. + enable_messenger: nil, + # Uploaded file URL for gated content download. + gated_file_url: nil, + # URL the button links to. + link: nil, + # Internal name for this ending page. + name: nil, + # Headline for this ending page. + title: nil + ) + end + + sig do + override.returns( + { + body: T.nilable(String), + business_phone: T.nilable(String), + button_text: T.nilable(String), + button_type: T.nilable(String), + conditional_question_group_id: T.nilable(String), + enable_messenger: T.nilable(T::Boolean), + gated_file_url: T.nilable(String), + link: T.nilable(String), + name: T.nilable(String), + title: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + # What this ad set optimizes for on Meta. + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NONE = + T.let( + :NONE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :AD_RECALL_LIFT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + ENGAGED_USERS = + T.let( + :ENGAGED_USERS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :EVENT_RESPONSES, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :QUALITY_LEAD, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + OFFSITE_CONVERSIONS = + T.let( + :OFFSITE_CONVERSIONS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + QUALITY_CALL = + T.let( + :QUALITY_CALL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :LANDING_PAGE_VIEWS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + VISIT_INSTAGRAM_PROFILE = + T.let( + :VISIT_INSTAGRAM_PROFILE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + DERIVED_EVENTS = + T.let( + :DERIVED_EVENTS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = + T.let( + :APP_INSTALLS_AND_OFFSITE_CONVERSIONS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :CONVERSATIONS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + IN_APP_VALUE = + T.let( + :IN_APP_VALUE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + MESSAGING_PURCHASE_CONVERSION = + T.let( + :MESSAGING_PURCHASE_CONVERSION, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + SUBSCRIBERS = + T.let( + :SUBSCRIBERS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :REMINDERS_SET, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + MEANINGFUL_CALL_ATTEMPT = + T.let( + :MEANINGFUL_CALL_ATTEMPT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + PROFILE_VISIT = + T.let( + :PROFILE_VISIT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + PROFILE_AND_PAGE_ENGAGEMENT = + T.let( + :PROFILE_AND_PAGE_ENGAGEMENT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + ENGAGED_REACH = + T.let( + :ENGAGED_REACH, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + ENGAGED_PAGE_VIEWS = + T.let( + :ENGAGED_PAGE_VIEWS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = + T.let( + :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + ADVERTISER_SILOED_VALUE = + T.let( + :ADVERTISER_SILOED_VALUE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_OBJECTIVE = + T.let( + :AUTOMATIC_OBJECTIVE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + MESSAGING_APPOINTMENT_CONVERSION = + T.let( + :MESSAGING_APPOINTMENT_CONVERSION, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + class PromotedObject < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject, + WhopSDK::Internal::AnyHash + ) + end + + # Custom conversion rule ID (numeric, from Meta Events Manager). + sig { returns(T.nilable(String)) } + attr_accessor :custom_conversion_id + + # Pixel event name, used when custom_event_type is OTHER. + sig { returns(T.nilable(String)) } + attr_accessor :custom_event_str + + # Custom event type (e.g., PURCHASE, COMPLETE_REGISTRATION, OTHER). + sig { returns(T.nilable(String)) } + attr_accessor :custom_event_type + + # Facebook Page ID. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # Meta Pixel ID for conversion tracking. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + # WhatsApp phone number for messaging campaigns. + sig { returns(T.nilable(String)) } + attr_accessor :whatsapp_phone_number + + # The object this ad set promotes (pixel, page, etc.). + sig do + params( + custom_conversion_id: T.nilable(String), + custom_event_str: T.nilable(String), + custom_event_type: T.nilable(String), + page_id: T.nilable(String), + pixel_id: T.nilable(String), + whatsapp_phone_number: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Custom conversion rule ID (numeric, from Meta Events Manager). + custom_conversion_id: nil, + # Pixel event name, used when custom_event_type is OTHER. + custom_event_str: nil, + # Custom event type (e.g., PURCHASE, COMPLETE_REGISTRATION, OTHER). + custom_event_type: nil, + # Facebook Page ID. + page_id: nil, + # Meta Pixel ID for conversion tracking. + pixel_id: nil, + # WhatsApp phone number for messaging campaigns. + whatsapp_phone_number: nil + ) + end + + sig do + override.returns( + { + custom_conversion_id: T.nilable(String), + custom_event_str: T.nilable(String), + custom_event_type: T.nilable(String), + page_id: T.nilable(String), + pixel_id: T.nilable(String), + whatsapp_phone_number: T.nilable(String) + } + ) + end + def to_hash + end + end + + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::Status::TaggedSymbol + ) + PAUSED = + T.let( + :PAUSED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TargetingAutomation < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation, + WhopSDK::Internal::AnyHash + ) + end + + # 0 = off (use exact targeting), 1 = on (let Meta expand audience). + sig { returns(T.nilable(Integer)) } + attr_accessor :advantage_audience + + # Advantage+ audience expansion settings. + sig do + params(advantage_audience: T.nilable(Integer)).returns( + T.attached_class + ) + end + def self.new( + # 0 = off (use exact targeting), 1 = on (let Meta expand audience). + advantage_audience: nil + ) + end + + sig { override.returns({ advantage_audience: T.nilable(Integer) }) } + def to_hash + end + end + end + + class Tiktok < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok, + WhopSDK::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action + ] + ) + ) + end + attr_accessor :actions + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::OrSymbol + ] + ) + ) + end + attr_accessor :age_groups + + # App ID for app promotion campaigns. + sig { returns(T.nilable(String)) } + attr_accessor :app_id + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount::OrSymbol + ) + ) + end + attr_accessor :attribution_event_count + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :audience_ids + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :audience_rule + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType::OrSymbol + ) + ) + end + attr_accessor :audience_type + + # Bid price (cost per result for Cost Cap). + sig { returns(T.nilable(Float)) } + attr_accessor :bid_price + + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType::OrSymbol + ) + ) + end + attr_accessor :bid_type + + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent::OrSymbol + ) + ) + end + attr_accessor :billing_event + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::OrSymbol + ) + ) + end + attr_accessor :brand_safety_type + + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode::OrSymbol + ) + ) + end + attr_accessor :budget_mode + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :carrier_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :category_exclusion_ids + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::OrSymbol + ) + ) + end + attr_accessor :click_attribution_window + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :comment_disabled + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :contextual_tag_ids + + # Target cost per conversion for oCPM. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_bid_price + + # Creative delivery strategy. + sig { returns(T.nilable(String)) } + attr_accessor :creative_material_mode + + # Ad delivery schedule (48x7 character string). + sig { returns(T.nilable(String)) } + attr_accessor :dayparting + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :deep_funnel_event_source + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :deep_funnel_event_source_id + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::OrSymbol + ) + ) + end + attr_accessor :deep_funnel_optimization_status + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :device_model_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :device_price_ranges + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::OrSymbol + ) + ) + end + attr_accessor :engaged_view_attribution_window + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :excluded_audience_ids + + # TikTok location/region IDs to exclude. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :excluded_location_ids + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_schedule + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender::OrSymbol + ) + ) + end + attr_accessor :gender + + # Business Center ID for BC_AUTH_TT identity. + sig { returns(T.nilable(String)) } + attr_accessor :identity_authorized_bc_id + + # TikTok identity ID for the ad group. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + # Identity type (AUTH_CODE, TT_USER, BC_AUTH_TT). + sig { returns(T.nilable(String)) } + attr_accessor :identity_type + + # Instant form configuration for lead generation campaigns. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig + ) + ) + end + attr_reader :instant_form_config + + sig do + params( + instant_form_config: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::OrHash + ) + ).void + end + attr_writer :instant_form_config + + # TikTok instant form ID (set automatically when instant_form_config is provided). + sig { returns(T.nilable(String)) } + attr_accessor :instant_form_id + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_category_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_keyword_ids + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :inventory_filter_enabled + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting::OrSymbol + ) + ) + end + attr_accessor :ios14_targeting + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :isp_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :languages + + # TikTok location/region IDs for geo targeting. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :location_ids + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :min_android_version + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :min_ios_version + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :network_types + + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperatingSystem::OrSymbol + ] + ) + ) + end + attr_accessor :operating_systems + + # Initial status (ENABLE, DISABLE). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus::OrSymbol + ) + ) + end + attr_accessor :operation_status + + # Conversion event (e.g., COMPLETE_PAYMENT). + sig { returns(T.nilable(String)) } + attr_accessor :optimization_event + + # What this ad group optimizes for on TikTok. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::OrSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing::OrSymbol + ) + ) + end + attr_accessor :pacing + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :pangle_audience_package_exclude_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :pangle_audience_package_include_ids + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :pangle_block_app_ids + + # TikTok Pixel ID for conversion tracking. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType::OrSymbol + ) + ) + end + attr_accessor :placement_type + + # Placements (PLACEMENT_TIKTOK, PLACEMENT_PANGLE, etc.). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :placements + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :product_set_id + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource::OrSymbol + ) + ) + end + attr_accessor :product_source + + # Promotion type (optimization location). + sig { returns(T.nilable(String)) } + attr_accessor :promotion_type + + # Schedule end time (UTC, YYYY-MM-DD HH:MM:SS). + sig { returns(T.nilable(String)) } + attr_accessor :schedule_end_time + + # Schedule start time (UTC, YYYY-MM-DD HH:MM:SS). + sig { returns(T.nilable(String)) } + attr_accessor :schedule_start_time + + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType::OrSymbol + ) + ) + end + attr_accessor :schedule_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :secondary_optimization_event + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :shopping_ads_retargeting_actions_days + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::OrSymbol + ) + ) + end + attr_accessor :shopping_ads_retargeting_type + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower::OrSymbol + ) + ) + end + attr_accessor :spending_power + + # TikTok subplacements (IN_FEED, SEARCH_FEED, etc.). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tiktok_subplacements + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :vertical_sensitivity_id + + # Represents `true` or `false` values. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :video_download_disabled + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :video_user_actions + + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow::OrSymbol + ) + ) + end + attr_accessor :view_attribution_window + + # TikTok ad group configuration. + sig do + params( + actions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::OrHash + ] + ), + age_groups: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::OrSymbol + ] + ), + app_id: T.nilable(String), + attribution_event_count: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount::OrSymbol + ), + audience_ids: T.nilable(T::Array[String]), + audience_rule: T.nilable(T::Hash[Symbol, T.anything]), + audience_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType::OrSymbol + ), + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent::OrSymbol + ), + brand_safety_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::OrSymbol + ), + budget_mode: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode::OrSymbol + ), + carrier_ids: T.nilable(T::Array[String]), + category_exclusion_ids: T.nilable(T::Array[String]), + click_attribution_window: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::OrSymbol + ), + comment_disabled: T.nilable(T::Boolean), + contextual_tag_ids: T.nilable(T::Array[String]), + conversion_bid_price: T.nilable(Float), + creative_material_mode: T.nilable(String), + dayparting: T.nilable(String), + deep_funnel_event_source: T.nilable(String), + deep_funnel_event_source_id: T.nilable(String), + deep_funnel_optimization_status: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::OrSymbol + ), + device_model_ids: T.nilable(T::Array[String]), + device_price_ranges: T.nilable(T::Array[String]), + engaged_view_attribution_window: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::OrSymbol + ), + excluded_audience_ids: T.nilable(T::Array[String]), + excluded_location_ids: T.nilable(T::Array[String]), + frequency: T.nilable(Integer), + frequency_schedule: T.nilable(Integer), + gender: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + instant_form_config: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::OrHash + ), + instant_form_id: T.nilable(String), + interest_category_ids: T.nilable(T::Array[String]), + interest_keyword_ids: T.nilable(T::Array[String]), + inventory_filter_enabled: T.nilable(T::Boolean), + ios14_targeting: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting::OrSymbol + ), + isp_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + location_ids: T.nilable(T::Array[String]), + min_android_version: T.nilable(String), + min_ios_version: T.nilable(String), + network_types: T.nilable(T::Array[String]), + operating_systems: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperatingSystem::OrSymbol + ] + ), + operation_status: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus::OrSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing::OrSymbol + ), + pangle_audience_package_exclude_ids: T.nilable(T::Array[String]), + pangle_audience_package_include_ids: T.nilable(T::Array[String]), + pangle_block_app_ids: T.nilable(T::Array[String]), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType::OrSymbol + ), + placements: T.nilable(T::Array[String]), + product_set_id: T.nilable(String), + product_source: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource::OrSymbol + ), + promotion_type: T.nilable(String), + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType::OrSymbol + ), + secondary_optimization_event: T.nilable(String), + shopping_ads_retargeting_actions_days: T.nilable(Integer), + shopping_ads_retargeting_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::OrSymbol + ), + spending_power: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower::OrSymbol + ), + tiktok_subplacements: T.nilable(T::Array[String]), + vertical_sensitivity_id: T.nilable(String), + video_download_disabled: T.nilable(T::Boolean), + video_user_actions: T.nilable(T::Array[String]), + view_attribution_window: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + actions: nil, + age_groups: nil, + # App ID for app promotion campaigns. + app_id: nil, + attribution_event_count: nil, + audience_ids: nil, + # Represents untyped JSON + audience_rule: nil, + audience_type: nil, + # Bid price (cost per result for Cost Cap). + bid_price: nil, + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + bid_type: nil, + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + billing_event: nil, + brand_safety_type: nil, + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + budget_mode: nil, + carrier_ids: nil, + category_exclusion_ids: nil, + click_attribution_window: nil, + # Represents `true` or `false` values. + comment_disabled: nil, + contextual_tag_ids: nil, + # Target cost per conversion for oCPM. + conversion_bid_price: nil, + # Creative delivery strategy. + creative_material_mode: nil, + # Ad delivery schedule (48x7 character string). + dayparting: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + deep_funnel_event_source: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + deep_funnel_event_source_id: nil, + deep_funnel_optimization_status: nil, + device_model_ids: nil, + device_price_ranges: nil, + engaged_view_attribution_window: nil, + excluded_audience_ids: nil, + # TikTok location/region IDs to exclude. + excluded_location_ids: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + frequency: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + frequency_schedule: nil, + gender: nil, + # Business Center ID for BC_AUTH_TT identity. + identity_authorized_bc_id: nil, + # TikTok identity ID for the ad group. + identity_id: nil, + # Identity type (AUTH_CODE, TT_USER, BC_AUTH_TT). + identity_type: nil, + # Instant form configuration for lead generation campaigns. + instant_form_config: nil, + # TikTok instant form ID (set automatically when instant_form_config is provided). + instant_form_id: nil, + interest_category_ids: nil, + interest_keyword_ids: nil, + # Represents `true` or `false` values. + inventory_filter_enabled: nil, + ios14_targeting: nil, + isp_ids: nil, + languages: nil, + # TikTok location/region IDs for geo targeting. + location_ids: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + min_android_version: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + min_ios_version: nil, + network_types: nil, + operating_systems: nil, + # Initial status (ENABLE, DISABLE). + operation_status: nil, + # Conversion event (e.g., COMPLETE_PAYMENT). + optimization_event: nil, + # What this ad group optimizes for on TikTok. + optimization_goal: nil, + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + pacing: nil, + pangle_audience_package_exclude_ids: nil, + pangle_audience_package_include_ids: nil, + pangle_block_app_ids: nil, + # TikTok Pixel ID for conversion tracking. + pixel_id: nil, + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + placement_type: nil, + # Placements (PLACEMENT_TIKTOK, PLACEMENT_PANGLE, etc.). + placements: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + product_set_id: nil, + product_source: nil, + # Promotion type (optimization location). + promotion_type: nil, + # Schedule end time (UTC, YYYY-MM-DD HH:MM:SS). + schedule_end_time: nil, + # Schedule start time (UTC, YYYY-MM-DD HH:MM:SS). + schedule_start_time: nil, + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + schedule_type: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + secondary_optimization_event: nil, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + shopping_ads_retargeting_actions_days: nil, + shopping_ads_retargeting_type: nil, + spending_power: nil, + # TikTok subplacements (IN_FEED, SEARCH_FEED, etc.). + tiktok_subplacements: nil, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + vertical_sensitivity_id: nil, + # Represents `true` or `false` values. + video_download_disabled: nil, + video_user_actions: nil, + view_attribution_window: nil + ) + end + + sig do + override.returns( + { + actions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action + ] + ), + age_groups: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::OrSymbol + ] + ), + app_id: T.nilable(String), + attribution_event_count: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount::OrSymbol + ), + audience_ids: T.nilable(T::Array[String]), + audience_rule: T.nilable(T::Hash[Symbol, T.anything]), + audience_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType::OrSymbol + ), + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent::OrSymbol + ), + brand_safety_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::OrSymbol + ), + budget_mode: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode::OrSymbol + ), + carrier_ids: T.nilable(T::Array[String]), + category_exclusion_ids: T.nilable(T::Array[String]), + click_attribution_window: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::OrSymbol + ), + comment_disabled: T.nilable(T::Boolean), + contextual_tag_ids: T.nilable(T::Array[String]), + conversion_bid_price: T.nilable(Float), + creative_material_mode: T.nilable(String), + dayparting: T.nilable(String), + deep_funnel_event_source: T.nilable(String), + deep_funnel_event_source_id: T.nilable(String), + deep_funnel_optimization_status: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::OrSymbol + ), + device_model_ids: T.nilable(T::Array[String]), + device_price_ranges: T.nilable(T::Array[String]), + engaged_view_attribution_window: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::OrSymbol + ), + excluded_audience_ids: T.nilable(T::Array[String]), + excluded_location_ids: T.nilable(T::Array[String]), + frequency: T.nilable(Integer), + frequency_schedule: T.nilable(Integer), + gender: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + instant_form_config: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig + ), + instant_form_id: T.nilable(String), + interest_category_ids: T.nilable(T::Array[String]), + interest_keyword_ids: T.nilable(T::Array[String]), + inventory_filter_enabled: T.nilable(T::Boolean), + ios14_targeting: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting::OrSymbol + ), + isp_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + location_ids: T.nilable(T::Array[String]), + min_android_version: T.nilable(String), + min_ios_version: T.nilable(String), + network_types: T.nilable(T::Array[String]), + operating_systems: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperatingSystem::OrSymbol + ] + ), + operation_status: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus::OrSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing::OrSymbol + ), + pangle_audience_package_exclude_ids: + T.nilable(T::Array[String]), + pangle_audience_package_include_ids: + T.nilable(T::Array[String]), + pangle_block_app_ids: T.nilable(T::Array[String]), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType::OrSymbol + ), + placements: T.nilable(T::Array[String]), + product_set_id: T.nilable(String), + product_source: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource::OrSymbol + ), + promotion_type: T.nilable(String), + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType::OrSymbol + ), + secondary_optimization_event: T.nilable(String), + shopping_ads_retargeting_actions_days: T.nilable(Integer), + shopping_ads_retargeting_type: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::OrSymbol + ), + spending_power: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower::OrSymbol + ), + tiktok_subplacements: T.nilable(T::Array[String]), + vertical_sensitivity_id: T.nilable(String), + video_download_disabled: T.nilable(T::Boolean), + video_user_actions: T.nilable(T::Array[String]), + view_attribution_window: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow::OrSymbol + ) + } + ) + end + def to_hash + end + + class Action < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action, + WhopSDK::Internal::AnyHash + ) + end + + # Behavioral category IDs. Use /tool/action_category/ to list them. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :action_category_ids + + # Lookback window in days. TikTok accepts 7, 15, 30, 60, 90, or 180. + sig { returns(T.nilable(Integer)) } + attr_accessor :action_period + + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + sig do + returns( + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene::OrSymbol + ) + ) + end + attr_accessor :action_scene + + # Specific video interactions (WATCHED_TO_END, LIKED, COMMENTED, SHARED, FOLLOWED, + # PROFILE_VISITED). + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::OrSymbol + ] + ) + ) + end + attr_accessor :video_user_actions + + # A single TikTok behavioral targeting entry. One category of past user behavior + # (what they did, over what window, on which kind of content). See + # docs/tiktok_api/ad_group.md § actions. + sig do + params( + action_category_ids: T.nilable(T::Array[String]), + action_period: T.nilable(Integer), + action_scene: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene::OrSymbol + ), + video_user_actions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::OrSymbol + ] + ) + ).returns(T.attached_class) + end + def self.new( + # Behavioral category IDs. Use /tool/action_category/ to list them. + action_category_ids: nil, + # Lookback window in days. TikTok accepts 7, 15, 30, 60, 90, or 180. + action_period: nil, + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + action_scene: nil, + # Specific video interactions (WATCHED_TO_END, LIKED, COMMENTED, SHARED, FOLLOWED, + # PROFILE_VISITED). + video_user_actions: nil + ) + end + + sig do + override.returns( + { + action_category_ids: T.nilable(T::Array[String]), + action_period: T.nilable(Integer), + action_scene: + T.nilable( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene::OrSymbol + ), + video_user_actions: + T.nilable( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::OrSymbol + ] + ) + } + ) + end + def to_hash + end + + # The category of TikTok content a behavioral targeting rule applies to. See + # docs/tiktok_api/ad_group.md § actions. + module ActionScene + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + VIDEO_RELATED = + T.let( + :VIDEO_RELATED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ) + CREATOR_RELATED = + T.let( + :CREATOR_RELATED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ) + HASHTAG_RELATED = + T.let( + :HASHTAG_RELATED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ) + LIVE_RELATED = + T.let( + :LIVE_RELATED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::ActionScene::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Specific past video interactions used for behavioral targeting. See + # docs/tiktok_api/ad_group.md § actions.video_user_actions. + module VideoUserAction + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + WATCHED_TO_END = + T.let( + :WATCHED_TO_END, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + LIKED = + T.let( + :LIKED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + COMMENTED = + T.let( + :COMMENTED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + SHARED = + T.let( + :SHARED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + FOLLOWED = + T.let( + :FOLLOWED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + PROFILE_VISITED = + T.let( + :PROFILE_VISITED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::VideoUserAction::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # Age groups targetable on TikTok. See docs/tiktok_api/ad_group.md § age_groups. + module AgeGroup + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AGE_13_17 = + T.let( + :AGE_13_17, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_18_24 = + T.let( + :AGE_18_24, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_25_34 = + T.let( + :AGE_25_34, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_35_44 = + T.let( + :AGE_35_44, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_45_54 = + T.let( + :AGE_45_54, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + AGE_55_100 = + T.let( + :AGE_55_100, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AgeGroup::TaggedSymbol + ] + ) + end + def self.values + end + end + + module AttributionEventCount + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount::TaggedSymbol + ) + EVERY = + T.let( + :EVERY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount::TaggedSymbol + ) + ONCE = + T.let( + :ONCE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AttributionEventCount::TaggedSymbol + ] + ) + end + def self.values + end + end + + module AudienceType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NORMAL = + T.let( + :NORMAL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType::TaggedSymbol + ) + SMART_INTERESTS_BEHAVIORS = + T.let( + :SMART_INTERESTS_BEHAVIORS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::AudienceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Bidding strategy (BID_TYPE_NO_BID, BID_TYPE_CUSTOM). + module BidType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BID_TYPE_NO_BID = + T.let( + :BID_TYPE_NO_BID, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType::TaggedSymbol + ) + BID_TYPE_CUSTOM = + T.let( + :BID_TYPE_CUSTOM, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BidType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed on TikTok (CPC, CPM, OCPM, CPV). + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CPC = + T.let( + :CPC, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ) + CPM = + T.let( + :CPM, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ) + OCPM = + T.let( + :OCPM, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ) + CPV = + T.let( + :CPV, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BrandSafetyType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NO_BRAND_SAFETY = + T.let( + :NO_BRAND_SAFETY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + STANDARD_INVENTORY = + T.let( + :STANDARD_INVENTORY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + LIMITED_INVENTORY = + T.let( + :LIMITED_INVENTORY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + FULL_INVENTORY = + T.let( + :FULL_INVENTORY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + EXPANDED_INVENTORY = + T.let( + :EXPANDED_INVENTORY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BrandSafetyType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget mode (BUDGET_MODE_DAY, BUDGET_MODE_TOTAL, + # BUDGET_MODE_DYNAMIC_DAILY_BUDGET). + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BUDGET_MODE_DAY = + T.let( + :BUDGET_MODE_DAY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_TOTAL = + T.let( + :BUDGET_MODE_TOTAL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = + T.let( + :BUDGET_MODE_DYNAMIC_DAILY_BUDGET, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::BudgetMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ClickAttributionWindow + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF = + T.let( + :OFF, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + ONE_DAY = + T.let( + :ONE_DAY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + SEVEN_DAYS = + T.let( + :SEVEN_DAYS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + FOURTEEN_DAYS = + T.let( + :FOURTEEN_DAYS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + TWENTY_EIGHT_DAYS = + T.let( + :TWENTY_EIGHT_DAYS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ClickAttributionWindow::TaggedSymbol + ] + ) + end + def self.values + end + end + + module DeepFunnelOptimizationStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ON = + T.let( + :ON, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::TaggedSymbol + ) + OFF = + T.let( + :OFF, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::DeepFunnelOptimizationStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + module EngagedViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF = + T.let( + :OFF, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::TaggedSymbol + ) + ONE_DAY = + T.let( + :ONE_DAY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::TaggedSymbol + ) + SEVEN_DAYS = + T.let( + :SEVEN_DAYS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::EngagedViewAttributionWindow::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GENDER_UNLIMITED = + T.let( + :GENDER_UNLIMITED, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender::TaggedSymbol + ) + GENDER_MALE = + T.let( + :GENDER_MALE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender::TaggedSymbol + ) + GENDER_FEMALE = + T.let( + :GENDER_FEMALE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + + class InstantFormConfig < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig, + WhopSDK::Internal::AnyHash + ) + end + + # URL to your privacy policy. + sig { returns(String) } + attr_accessor :privacy_policy_url + + # Form questions (at least one required). + sig do + returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question + ] + ) + end + attr_accessor :questions + + # Submit button text. + sig { returns(T.nilable(String)) } + attr_accessor :button_text + + # Greeting text shown at the top of the form. + sig { returns(T.nilable(String)) } + attr_accessor :greeting + + # Form name. Auto-generated if omitted. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Instant form configuration for lead generation campaigns. + sig do + params( + privacy_policy_url: String, + questions: + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question::OrHash + ], + button_text: T.nilable(String), + greeting: T.nilable(String), + name: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # URL to your privacy policy. + privacy_policy_url:, + # Form questions (at least one required). + questions:, + # Submit button text. + button_text: nil, + # Greeting text shown at the top of the form. + greeting: nil, + # Form name. Auto-generated if omitted. + name: nil + ) + end + + sig do + override.returns( + { + privacy_policy_url: String, + questions: + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question + ], + button_text: T.nilable(String), + greeting: T.nilable(String), + name: T.nilable(String) + } + ) + end + def to_hash + end + + class Question < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question, + WhopSDK::Internal::AnyHash + ) + end + + # Question type (EMAIL, PHONE_NUMBER, NAME, CUSTOM). + sig { returns(String) } + attr_accessor :field_type + + # Custom label for the question. + sig { returns(T.nilable(String)) } + attr_accessor :label + + # A question for a TikTok instant form. + sig do + params(field_type: String, label: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # Question type (EMAIL, PHONE_NUMBER, NAME, CUSTOM). + field_type:, + # Custom label for the question. + label: nil + ) + end + + sig do + override.returns( + { field_type: String, label: T.nilable(String) } + ) + end + def to_hash + end + end + end + + module Ios14Targeting + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNSET = + T.let( + :UNSET, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ) + IOS14_MINUS = + T.let( + :IOS14_MINUS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ) + IOS14_PLUS = + T.let( + :IOS14_PLUS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ) + ALL = + T.let( + :ALL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Ios14Targeting::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Device operating systems targetable on TikTok. See docs/tiktok_api/ad_group.md § + # operating_systems. + module OperatingSystem + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperatingSystem + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANDROID = + T.let( + :ANDROID, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperatingSystem::TaggedSymbol + ) + IOS = + T.let( + :IOS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperatingSystem::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperatingSystem::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Initial status (ENABLE, DISABLE). + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLE = + T.let( + :ENABLE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus::TaggedSymbol + ) + DISABLE = + T.let( + :DISABLE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OperationStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + # What this ad group optimizes for on TikTok. + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLICK = + T.let( + :CLICK, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + CONVERT = + T.let( + :CONVERT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + INSTALL = + T.let( + :INSTALL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + IN_APP_EVENT = + T.let( + :IN_APP_EVENT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + SHOW = + T.let( + :SHOW, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEW = + T.let( + :VIDEO_VIEW, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW = + T.let( + :ENGAGED_VIEW, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW_FIFTEEN = + T.let( + :ENGAGED_VIEW_FIFTEEN, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + PREFERRED_LEAD = + T.let( + :PREFERRED_LEAD, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + CONVERSATION = + T.let( + :CONVERSATION, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + FOLLOWERS = + T.let( + :FOLLOWERS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + PROFILE_VIEWS = + T.let( + :PROFILE_VIEWS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + PAGE_VISIT = + T.let( + :PAGE_VISIT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_VALUE_OPTIMIZATION = + T.let( + :AUTOMATIC_VALUE_OPTIMIZATION, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + TRAFFIC_LANDING_PAGE_VIEW = + T.let( + :TRAFFIC_LANDING_PAGE_VIEW, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + DESTINATION_VISIT = + T.let( + :DESTINATION_VISIT, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + MT_LIVE_ROOM = + T.let( + :MT_LIVE_ROOM, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + PRODUCT_CLICK_IN_LIVE = + T.let( + :PRODUCT_CLICK_IN_LIVE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget pacing (PACING_MODE_SMOOTH, PACING_MODE_FAST). + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PACING_MODE_SMOOTH = + T.let( + :PACING_MODE_SMOOTH, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing::TaggedSymbol + ) + PACING_MODE_FAST = + T.let( + :PACING_MODE_FAST, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Placement strategy (PLACEMENT_TYPE_AUTOMATIC, PLACEMENT_TYPE_NORMAL). + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PLACEMENT_TYPE_AUTOMATIC = + T.let( + :PLACEMENT_TYPE_AUTOMATIC, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType::TaggedSymbol + ) + PLACEMENT_TYPE_NORMAL = + T.let( + :PLACEMENT_TYPE_NORMAL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ProductSource + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CATALOG = + T.let( + :CATALOG, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource::TaggedSymbol + ) + STORE = + T.let( + :STORE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource::TaggedSymbol + ) + SHOWCASE = + T.let( + :SHOWCASE, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ProductSource::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Schedule type (SCHEDULE_START_END, SCHEDULE_FROM_NOW). + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SCHEDULE_START_END = + T.let( + :SCHEDULE_START_END, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType::TaggedSymbol + ) + SCHEDULE_FROM_NOW = + T.let( + :SCHEDULE_FROM_NOW, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ScheduleType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ShoppingAdsRetargetingType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF = + T.let( + :OFF, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB1 = + T.let( + :LAB1, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB2 = + T.let( + :LAB2, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB3 = + T.let( + :LAB3, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB4 = + T.let( + :LAB4, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + LAB5 = + T.let( + :LAB5, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ShoppingAdsRetargetingType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module SpendingPower + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ALL = + T.let( + :ALL, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower::TaggedSymbol + ) + HIGH = + T.let( + :HIGH, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::SpendingPower::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OFF = + T.let( + :OFF, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow::TaggedSymbol + ) + ONE_DAY = + T.let( + :ONE_DAY, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow::TaggedSymbol + ) + SEVEN_DAYS = + T.let( + :SEVEN_DAYS, + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::ViewAttributionWindow::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + # The status of an external ad group. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::AdGroupUpdateParams::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let(:active, WhopSDK::AdGroupUpdateParams::Status::TaggedSymbol) + PAUSED = + T.let(:paused, WhopSDK::AdGroupUpdateParams::Status::TaggedSymbol) + INACTIVE = + T.let(:inactive, WhopSDK::AdGroupUpdateParams::Status::TaggedSymbol) + IN_REVIEW = + T.let(:in_review, WhopSDK::AdGroupUpdateParams::Status::TaggedSymbol) + REJECTED = + T.let(:rejected, WhopSDK::AdGroupUpdateParams::Status::TaggedSymbol) + FLAGGED = + T.let(:flagged, WhopSDK::AdGroupUpdateParams::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::AdGroupUpdateParams::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_update_response.rbi b/rbi/whop_sdk/models/ad_group_update_response.rbi new file mode 100644 index 00000000..19fefa92 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_update_response.rbi @@ -0,0 +1,2596 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupUpdateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupUpdateResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the external ad group. + sig { returns(String) } + attr_accessor :id + + # The parent ad campaign + sig { returns(WhopSDK::Models::AdGroupUpdateResponse::AdCampaign) } + attr_reader :ad_campaign + + sig do + params( + ad_campaign: + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::OrHash + ).void + end + attr_writer :ad_campaign + + # Unified ad group configuration (platform-agnostic) + sig { returns(T.nilable(WhopSDK::Models::AdGroupUpdateResponse::Config)) } + attr_reader :config + + sig do + params( + config: + T.nilable(WhopSDK::Models::AdGroupUpdateResponse::Config::OrHash) + ).void + end + attr_writer :config + + # The datetime the external ad group was created. + sig { returns(Time) } + attr_accessor :created_at + + # Daily budget in dollars (nil for lifetime budgets) + sig { returns(T.nilable(Float)) } + attr_accessor :daily_budget + + # Human-readable ad group name + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::Variants + ) + ) + end + attr_accessor :platform_config + + # Current operational status of the ad group + sig do + returns(WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # The datetime the external ad group was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An external ad group (ad set) belonging to an ad campaign + sig do + params( + id: String, + ad_campaign: + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::OrHash, + config: + T.nilable(WhopSDK::Models::AdGroupUpdateResponse::Config::OrHash), + created_at: Time, + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable( + T.any( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OrHash, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OrHash + ) + ), + status: WhopSDK::Models::AdGroupUpdateResponse::Status::OrSymbol, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the external ad group. + id:, + # The parent ad campaign + ad_campaign:, + # Unified ad group configuration (platform-agnostic) + config:, + # The datetime the external ad group was created. + created_at:, + # Daily budget in dollars (nil for lifetime budgets) + daily_budget:, + # Human-readable ad group name + name:, + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + platform_config:, + # Current operational status of the ad group + status:, + # The datetime the external ad group was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, + config: T.nilable(WhopSDK::Models::AdGroupUpdateResponse::Config), + created_at: Time, + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::Variants + ), + status: + WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol, + updated_at: Time + } + ) + end + def to_hash + end + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the ad campaign. + sig { returns(String) } + attr_accessor :id + + # The platforms where an ad campaign can run. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform::TaggedSymbol + ) + ) + end + attr_accessor :platform + + # Current status of the campaign (active, paused, or inactive) + sig do + returns( + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + end + attr_accessor :status + + # The title of the ad campaign + sig { returns(String) } + attr_accessor :title + + # The parent ad campaign + sig do + params( + id: String, + platform: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform::OrSymbol + ), + status: + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::OrSymbol, + title: String + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the ad campaign. + id:, + # The platforms where an ad campaign can run. + platform:, + # Current status of the campaign (active, paused, or inactive) + status:, + # The title of the ad campaign + title: + ) + end + + sig do + override.returns( + { + id: String, + platform: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform::TaggedSymbol + ), + status: + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol, + title: String + } + ) + end + def to_hash + end + + # The platforms where an ad campaign can run. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Current status of the campaign (active, paused, or inactive) + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + STALE = + T.let( + :stale, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + PENDING_REFUND = + T.let( + :pending_refund, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + PAYMENT_FAILED = + T.let( + :payment_failed, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + DRAFT = + T.let( + :draft, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class Config < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupUpdateResponse::Config, + WhopSDK::Internal::AnyHash + ) + end + + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + # How you are billed (e.g., impressions, clicks). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + # Scheduled end time (ISO8601). Required for lifetime budgets. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Maximum number of times to show ads to each person in the frequency interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap + + # Number of days for the frequency cap interval. + sig { returns(T.nilable(Integer)) } + attr_accessor :frequency_cap_interval_days + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Budget pacing: standard (even) or accelerated (fast). + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing::TaggedSymbol + ) + ) + end + attr_accessor :pacing + + # Scheduled start time (ISO8601). + sig { returns(T.nilable(String)) } + attr_accessor :start_time + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + returns( + T.nilable(WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting) + ) + end + attr_reader :targeting + + sig do + params( + targeting: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::OrHash + ) + ).void + end + attr_writer :targeting + + # Unified ad group configuration (platform-agnostic) + sig do + params( + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent::OrSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing::OrSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Bid cap amount in cents. Used when bid_strategy is bid_cap or cost_cap. + bid_amount:, + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + bid_strategy:, + # How you are billed (e.g., impressions, clicks). + billing_event:, + # Scheduled end time (ISO8601). Required for lifetime budgets. + end_time:, + # Maximum number of times to show ads to each person in the frequency interval. + frequency_cap:, + # Number of days for the frequency cap interval. + frequency_cap_interval_days:, + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + optimization_goal:, + # Budget pacing: standard (even) or accelerated (fast). + pacing:, + # Scheduled start time (ISO8601). + start_time:, + # Audience targeting settings (demographics, geo, interests, audiences, devices). + targeting: + ) + end + + sig do + override.returns( + { + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent::TaggedSymbol + ), + end_time: T.nilable(String), + frequency_cap: T.nilable(Integer), + frequency_cap_interval_days: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing::TaggedSymbol + ), + start_time: T.nilable(String), + targeting: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting + ) + } + ) + end + def to_hash + end + + # Bid strategy: lowest_cost, bid_cap, or cost_cap. + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST = + T.let( + :lowest_cost, + WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy::TaggedSymbol + ) + BID_CAP = + T.let( + :bid_cap, + WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :cost_cap, + WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + # How you are billed (e.g., impressions, clicks). + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :clicks, + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent::TaggedSymbol + ) + OPTIMIZED_CPM = + T.let( + :optimized_cpm, + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + # What the ad group optimizes for (e.g., conversions, link_clicks, reach). + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CONVERSIONS = + T.let( + :conversions, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :link_clicks, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :landing_page_views, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :reach, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :impressions, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :app_installs, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEWS = + T.let( + :video_views, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :lead_generation, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :value, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :page_likes, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :conversations, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :ad_recall_lift, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :two_second_continuous_video_views, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :post_engagement, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :event_responses, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :reminders_set, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :quality_lead, + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Budget pacing: standard (even) or accelerated (fast). + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = + T.let( + :standard, + WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing::TaggedSymbol + ) + ACCELERATED = + T.let( + :accelerated, + WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Targeting < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting, + WhopSDK::Internal::AnyHash + ) + end + + # Maximum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_max + + # Minimum age for demographic targeting. + sig { returns(T.nilable(Integer)) } + attr_accessor :age_min + + # ISO 3166-1 alpha-2 country codes targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :countries + + # Device platforms targeted. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + ) + end + attr_accessor :device_platforms + + # Platform audience IDs excluded. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :exclude_audience_ids + + # Genders targeted. + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender::TaggedSymbol + ] + ) + ) + end + attr_accessor :genders + + # Platform audience IDs included. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :include_audience_ids + + # Platform-specific interest IDs targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :interest_ids + + # Language codes targeted. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :languages + + # Placement strategy for ad delivery. + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + ) + end + attr_accessor :placement_type + + # Audience targeting settings (demographics, geo, interests, audiences, devices). + sig do + params( + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::DevicePlatform::OrSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender::OrSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Maximum age for demographic targeting. + age_max:, + # Minimum age for demographic targeting. + age_min:, + # ISO 3166-1 alpha-2 country codes targeted. + countries:, + # Device platforms targeted. + device_platforms:, + # Platform audience IDs excluded. + exclude_audience_ids:, + # Genders targeted. + genders:, + # Platform audience IDs included. + include_audience_ids:, + # Platform-specific interest IDs targeted. + interest_ids:, + # Language codes targeted. + languages:, + # Placement strategy for ad delivery. + placement_type: + ) + end + + sig do + override.returns( + { + age_max: T.nilable(Integer), + age_min: T.nilable(Integer), + countries: T.nilable(T::Array[String]), + device_platforms: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ), + exclude_audience_ids: T.nilable(T::Array[String]), + genders: + T.nilable( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender::TaggedSymbol + ] + ), + include_audience_ids: T.nilable(T::Array[String]), + interest_ids: T.nilable(T::Array[String]), + languages: T.nilable(T::Array[String]), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # Device platform targeting options. + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::DevicePlatform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MOBILE = + T.let( + :mobile, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ) + DESKTOP = + T.let( + :desktop, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::DevicePlatform::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Gender targeting options. + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MALE = + T.let( + :male, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender::TaggedSymbol + ) + FEMALE = + T.let( + :female, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender::TaggedSymbol + ) + ALL = + T.let( + :all, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Placement strategy for ad delivery. + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + AUTOMATIC = + T.let( + :automatic, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + MANUAL = + T.let( + :manual, + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + # Typed platform-specific configuration. Use inline fragments (... on + # MetaAdGroupPlatformConfigType). + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType + ) + ) + end + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :attribution_spec + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :bid_amount + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + ) + end + attr_accessor :bid_strategy + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_budget + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ) + end + attr_accessor :destination_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :end_time + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :excluded_geo_locations + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :facebook_positions + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :geo_locations + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :instagram_positions + + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :lifetime_budget + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # The ad platform (meta, tiktok). + sig do + returns( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :promoted_object + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :publisher_platforms + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + ) + end + attr_accessor :status + + # Represents untyped JSON + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :targeting_automation + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Meta (Facebook/Instagram) ad set configuration. + sig do + params( + attribution_spec: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::OrSymbol + ), + daily_budget: T.nilable(Integer), + destination_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::OrSymbol + ), + end_time: T.nilable(String), + excluded_geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + facebook_positions: T.nilable(T::Array[String]), + geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + lifetime_budget: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::OrSymbol + ), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::OrSymbol, + promoted_object: T.nilable(T::Hash[Symbol, T.anything]), + publisher_platforms: T.nilable(T::Array[String]), + status: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::OrSymbol + ), + targeting_automation: T.nilable(T::Hash[Symbol, T.anything]), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + attribution_spec:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + bid_amount:, + bid_strategy:, + billing_event:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + daily_budget:, + destination_type:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + end_time:, + # Represents untyped JSON + excluded_geo_locations:, + facebook_positions:, + # Represents untyped JSON + geo_locations:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + instagram_actor_id:, + instagram_positions:, + # Represents non-fractional signed whole numeric values. Int can represent values + # between -(2^31) and 2^31 - 1. + lifetime_budget:, + optimization_goal:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + page_id:, + # The ad platform (meta, tiktok). + platform:, + # Represents untyped JSON + promoted_object:, + publisher_platforms:, + status:, + # Represents untyped JSON + targeting_automation:, + # The typename of this object + typename: :MetaAdGroupPlatformConfigType + ) + end + + sig do + override.returns( + { + attribution_spec: + T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + bid_amount: T.nilable(Integer), + bid_strategy: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ), + daily_budget: T.nilable(Integer), + destination_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ), + end_time: T.nilable(String), + excluded_geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + facebook_positions: T.nilable(T::Array[String]), + geo_locations: T.nilable(T::Hash[Symbol, T.anything]), + instagram_actor_id: T.nilable(String), + instagram_positions: T.nilable(T::Array[String]), + lifetime_budget: T.nilable(Integer), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol, + promoted_object: T.nilable(T::Hash[Symbol, T.anything]), + publisher_platforms: T.nilable(T::Array[String]), + status: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ), + targeting_automation: T.nilable(T::Hash[Symbol, T.anything]), + typename: Symbol + } + ) + end + def to_hash + end + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LOWEST_COST_WITHOUT_CAP = + T.let( + :LOWEST_COST_WITHOUT_CAP, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_BID_CAP = + T.let( + :LOWEST_COST_WITH_BID_CAP, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + COST_CAP = + T.let( + :COST_CAP, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + LOWEST_COST_WITH_MIN_ROAS = + T.let( + :LOWEST_COST_WITH_MIN_ROAS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BidStrategy::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CLICKS = + T.let( + :CLICKS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + NONE = + T.let( + :NONE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + OFFER_CLAIMS = + T.let( + :OFFER_CLAIMS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + PURCHASE = + T.let( + :PURCHASE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + LISTING_INTERACTION = + T.let( + :LISTING_INTERACTION, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNDEFINED = + T.let( + :UNDEFINED, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE = + T.let( + :WEBSITE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + APP = + T.let( + :APP, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK = + T.let( + :FACEBOOK, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSENGER = + T.let( + :MESSENGER, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WHATSAPP = + T.let( + :WHATSAPP, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_DIRECT = + T.let( + :INSTAGRAM_DIRECT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE = + T.let( + :INSTAGRAM_PROFILE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + PHONE_CALL = + T.let( + :PHONE_CALL, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + SHOP_AUTOMATIC = + T.let( + :SHOP_AUTOMATIC, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + APPLINKS_AUTOMATIC = + T.let( + :APPLINKS_AUTOMATIC, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_AD = + T.let( + :ON_AD, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_POST = + T.let( + :ON_POST, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_VIDEO = + T.let( + :ON_VIDEO, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_PAGE = + T.let( + :ON_PAGE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + ON_EVENT = + T.let( + :ON_EVENT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_MESSENGER_WHATSAPP, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP = + T.let( + :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE = + T.let( + :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK_PAGE = + T.let( + :FACEBOOK_PAGE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + INSTAGRAM_LIVE = + T.let( + :INSTAGRAM_LIVE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + FACEBOOK_LIVE = + T.let( + :FACEBOOK_LIVE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + IMAGINE = + T.let( + :IMAGINE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + LEAD_FROM_IG_DIRECT = + T.let( + :LEAD_FROM_IG_DIRECT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + LEAD_FROM_MESSENGER = + T.let( + :LEAD_FROM_MESSENGER, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE_AND_LEAD_FORM = + T.let( + :WEBSITE_AND_LEAD_FORM, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + WEBSITE_AND_PHONE_CALL = + T.let( + :WEBSITE_AND_PHONE_CALL, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + BROADCAST_CHANNEL = + T.let( + :BROADCAST_CHANNEL, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::DestinationType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + NONE = + T.let( + :NONE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS = + T.let( + :APP_INSTALLS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AD_RECALL_LIFT = + T.let( + :AD_RECALL_LIFT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_USERS = + T.let( + :ENGAGED_USERS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + EVENT_RESPONSES = + T.let( + :EVENT_RESPONSES, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IMPRESSIONS = + T.let( + :IMPRESSIONS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + QUALITY_LEAD = + T.let( + :QUALITY_LEAD, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LINK_CLICKS = + T.let( + :LINK_CLICKS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + OFFSITE_CONVERSIONS = + T.let( + :OFFSITE_CONVERSIONS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PAGE_LIKES = + T.let( + :PAGE_LIKES, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let( + :POST_ENGAGEMENT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + QUALITY_CALL = + T.let( + :QUALITY_CALL, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LANDING_PAGE_VIEWS = + T.let( + :LANDING_PAGE_VIEWS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VISIT_INSTAGRAM_PROFILE = + T.let( + :VISIT_INSTAGRAM_PROFILE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + THRUPLAY = + T.let( + :THRUPLAY, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + DERIVED_EVENTS = + T.let( + :DERIVED_EVENTS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + APP_INSTALLS_AND_OFFSITE_CONVERSIONS = + T.let( + :APP_INSTALLS_AND_OFFSITE_CONVERSIONS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERSATIONS = + T.let( + :CONVERSATIONS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IN_APP_VALUE = + T.let( + :IN_APP_VALUE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_PURCHASE_CONVERSION = + T.let( + :MESSAGING_PURCHASE_CONVERSION, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + SUBSCRIBERS = + T.let( + :SUBSCRIBERS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REMINDERS_SET = + T.let( + :REMINDERS_SET, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MEANINGFUL_CALL_ATTEMPT = + T.let( + :MEANINGFUL_CALL_ATTEMPT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_VISIT = + T.let( + :PROFILE_VISIT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_AND_PAGE_ENGAGEMENT = + T.let( + :PROFILE_AND_PAGE_ENGAGEMENT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS = + T.let( + :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_REACH = + T.let( + :ENGAGED_REACH, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_PAGE_VIEWS = + T.let( + :ENGAGED_PAGE_VIEWS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW = + T.let( + :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ADVERTISER_SILOED_VALUE = + T.let( + :ADVERTISER_SILOED_VALUE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_OBJECTIVE = + T.let( + :AUTOMATIC_OBJECTIVE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MESSAGING_APPOINTMENT_CONVERSION = + T.let( + :MESSAGING_APPOINTMENT_CONVERSION, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform (meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :ACTIVE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + PAUSED = + T.let( + :PAUSED, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :bid_price + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + ) + end + attr_accessor :bid_type + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + ) + end + attr_accessor :billing_event + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + ) + end + attr_accessor :budget_mode + + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_bid_price + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_type + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + ) + end + attr_accessor :operation_status + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :optimization_event + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ) + end + attr_accessor :optimization_goal + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + ) + end + attr_accessor :pacing + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :pixel_id + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + ) + end + attr_accessor :placement_type + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :placements + + # The ad platform (meta, tiktok). + sig do + returns( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :schedule_end_time + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :schedule_start_time + + sig do + returns( + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + ) + end + attr_accessor :schedule_type + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # TikTok ad group configuration. + sig do + params( + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::OrSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::OrSymbol + ), + budget_mode: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::OrSymbol + ), + conversion_bid_price: T.nilable(Float), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + operation_status: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::OrSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::OrSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::OrSymbol + ), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::OrSymbol + ), + placements: T.nilable(T::Array[String]), + platform: + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::OrSymbol, + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::OrSymbol + ), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + bid_price:, + bid_type:, + billing_event:, + budget_mode:, + # Represents signed double-precision fractional values as specified by + # [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). + conversion_bid_price:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_type:, + operation_status:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + optimization_event:, + optimization_goal:, + pacing:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + pixel_id:, + placement_type:, + placements:, + # The ad platform (meta, tiktok). + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + schedule_end_time:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + schedule_start_time:, + schedule_type:, + # The typename of this object + typename: :TiktokAdGroupPlatformConfigType + ) + end + + sig do + override.returns( + { + bid_price: T.nilable(Float), + bid_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ), + billing_event: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ), + budget_mode: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ), + conversion_bid_price: T.nilable(Float), + identity_id: T.nilable(String), + identity_type: T.nilable(String), + operation_status: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ), + optimization_event: T.nilable(String), + optimization_goal: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ), + pacing: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ), + pixel_id: T.nilable(String), + placement_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ), + placements: T.nilable(T::Array[String]), + platform: + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol, + schedule_end_time: T.nilable(String), + schedule_start_time: T.nilable(String), + schedule_type: + T.nilable( + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ), + typename: Symbol + } + ) + end + def to_hash + end + + module BidType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BID_TYPE_NO_BID = + T.let( + :BID_TYPE_NO_BID, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + BID_TYPE_CUSTOM = + T.let( + :BID_TYPE_CUSTOM, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BidType::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CPC = + T.let( + :CPC, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CPM = + T.let( + :CPM, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + OCPM = + T.let( + :OCPM, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + CPV = + T.let( + :CPV, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BillingEvent::TaggedSymbol + ] + ) + end + def self.values + end + end + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + BUDGET_MODE_DAY = + T.let( + :BUDGET_MODE_DAY, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_TOTAL = + T.let( + :BUDGET_MODE_TOTAL, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + BUDGET_MODE_DYNAMIC_DAILY_BUDGET = + T.let( + :BUDGET_MODE_DYNAMIC_DAILY_BUDGET, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::BudgetMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLE = + T.let( + :ENABLE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + DISABLE = + T.let( + :DISABLE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OperationStatus::TaggedSymbol + ] + ) + end + def self.values + end + end + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLICK = + T.let( + :CLICK, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERT = + T.let( + :CONVERT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + INSTALL = + T.let( + :INSTALL, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + IN_APP_EVENT = + T.let( + :IN_APP_EVENT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + REACH = + T.let( + :REACH, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + SHOW = + T.let( + :SHOW, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VIDEO_VIEW = + T.let( + :VIDEO_VIEW, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW = + T.let( + :ENGAGED_VIEW, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + ENGAGED_VIEW_FIFTEEN = + T.let( + :ENGAGED_VIEW_FIFTEEN, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + LEAD_GENERATION = + T.let( + :LEAD_GENERATION, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PREFERRED_LEAD = + T.let( + :PREFERRED_LEAD, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + CONVERSATION = + T.let( + :CONVERSATION, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + FOLLOWERS = + T.let( + :FOLLOWERS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PROFILE_VIEWS = + T.let( + :PROFILE_VIEWS, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PAGE_VISIT = + T.let( + :PAGE_VISIT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + VALUE = + T.let( + :VALUE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + AUTOMATIC_VALUE_OPTIMIZATION = + T.let( + :AUTOMATIC_VALUE_OPTIMIZATION, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + TRAFFIC_LANDING_PAGE_VIEW = + T.let( + :TRAFFIC_LANDING_PAGE_VIEW, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + DESTINATION_VISIT = + T.let( + :DESTINATION_VISIT, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + MT_LIVE_ROOM = + T.let( + :MT_LIVE_ROOM, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + PRODUCT_CLICK_IN_LIVE = + T.let( + :PRODUCT_CLICK_IN_LIVE, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::OptimizationGoal::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Pacing + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PACING_MODE_SMOOTH = + T.let( + :PACING_MODE_SMOOTH, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + PACING_MODE_FAST = + T.let( + :PACING_MODE_FAST, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Pacing::TaggedSymbol + ] + ) + end + def self.values + end + end + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PLACEMENT_TYPE_AUTOMATIC = + T.let( + :PLACEMENT_TYPE_AUTOMATIC, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + PLACEMENT_TYPE_NORMAL = + T.let( + :PLACEMENT_TYPE_NORMAL, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::PlacementType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform (meta, tiktok). + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SCHEDULE_START_END = + T.let( + :SCHEDULE_START_END, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + SCHEDULE_FROM_NOW = + T.let( + :SCHEDULE_FROM_NOW, + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::ScheduleType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::Variants + ] + ) + end + def self.variants + end + end + + # Current operational status of the ad group + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdGroupUpdateResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_list_params.rbi b/rbi/whop_sdk/models/ad_list_params.rbi new file mode 100644 index 00000000..b6026583 --- /dev/null +++ b/rbi/whop_sdk/models/ad_list_params.rbi @@ -0,0 +1,146 @@ +# typed: strong + +module WhopSDK + module Models + class AdListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdListParams, WhopSDK::Internal::AnyHash) + end + + # Filter by ad group. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + sig { returns(T.nilable(String)) } + attr_accessor :ad_group_id + + # Returns the elements in the list that come after the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :after + + # Returns the elements in the list that come before the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :before + + # Filter by campaign. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + sig { returns(T.nilable(String)) } + attr_accessor :campaign_id + + # Filter by company. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + sig { returns(T.nilable(String)) } + attr_accessor :company_id + + # Only return ads created after this timestamp. + sig { returns(T.nilable(Time)) } + attr_accessor :created_after + + # Only return ads created before this timestamp. + sig { returns(T.nilable(Time)) } + attr_accessor :created_before + + # Returns the first _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :first + + # Returns the last _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :last + + # The status of an external ad. + sig { returns(T.nilable(WhopSDK::AdListParams::Status::OrSymbol)) } + attr_accessor :status + + sig do + params( + ad_group_id: T.nilable(String), + after: T.nilable(String), + before: T.nilable(String), + campaign_id: T.nilable(String), + company_id: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + status: T.nilable(WhopSDK::AdListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Filter by ad group. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + ad_group_id: nil, + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # Filter by campaign. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + campaign_id: nil, + # Filter by company. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + company_id: nil, + # Only return ads created after this timestamp. + created_after: nil, + # Only return ads created before this timestamp. + created_before: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # The status of an external ad. + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + ad_group_id: T.nilable(String), + after: T.nilable(String), + before: T.nilable(String), + campaign_id: T.nilable(String), + company_id: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + status: T.nilable(WhopSDK::AdListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # The status of an external ad. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::AdListParams::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = T.let(:active, WhopSDK::AdListParams::Status::TaggedSymbol) + PAUSED = T.let(:paused, WhopSDK::AdListParams::Status::TaggedSymbol) + INACTIVE = T.let(:inactive, WhopSDK::AdListParams::Status::TaggedSymbol) + IN_REVIEW = + T.let(:in_review, WhopSDK::AdListParams::Status::TaggedSymbol) + REJECTED = T.let(:rejected, WhopSDK::AdListParams::Status::TaggedSymbol) + FLAGGED = T.let(:flagged, WhopSDK::AdListParams::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::AdListParams::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_list_response.rbi b/rbi/whop_sdk/models/ad_list_response.rbi new file mode 100644 index 00000000..611b8fe6 --- /dev/null +++ b/rbi/whop_sdk/models/ad_list_response.rbi @@ -0,0 +1,929 @@ +# typed: strong + +module WhopSDK + module Models + class AdListResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Models::AdListResponse, WhopSDK::Internal::AnyHash) + end + + # Unique identifier for the ad. + sig { returns(String) } + attr_accessor :id + + # When the ad was created. + sig { returns(Time) } + attr_accessor :created_at + + # Typed platform-specific configuration. + sig do + returns( + T.nilable(WhopSDK::Models::AdListResponse::PlatformConfig::Variants) + ) + end + attr_accessor :platform_config + + # Current status of the ad. + sig { returns(WhopSDK::Models::AdListResponse::Status::TaggedSymbol) } + attr_accessor :status + + # When the ad was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An ad belonging to an ad group + sig do + params( + id: String, + created_at: Time, + platform_config: + T.nilable( + T.any( + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::OrHash, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::OrHash + ) + ), + status: WhopSDK::Models::AdListResponse::Status::OrSymbol, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the ad. + id:, + # When the ad was created. + created_at:, + # Typed platform-specific configuration. + platform_config:, + # Current status of the ad. + status:, + # When the ad was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + platform_config: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::Variants + ), + status: WhopSDK::Models::AdListResponse::Status::TaggedSymbol, + updated_at: Time + } + ) + end + def to_hash + end + + # Typed platform-specific configuration. + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType + ) + ) + end + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + ) + end + attr_accessor :call_to_action_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :headline + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :link_url + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # The ad platform. + sig do + returns( + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :primary_text + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :url_tags + + # Meta (Facebook/Instagram) ad configuration. + sig do + params( + call_to_action_type: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::OrSymbol + ), + headline: T.nilable(String), + instagram_actor_id: T.nilable(String), + link_url: T.nilable(String), + name: T.nilable(String), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::OrSymbol, + primary_text: T.nilable(String), + url_tags: T.nilable(String), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + call_to_action_type:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + headline:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + instagram_actor_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + link_url:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + name:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + page_id:, + # The ad platform. + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + primary_text:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + url_tags:, + # The typename of this object + typename: :MetaAdPlatformConfigType + ) + end + + sig do + override.returns( + { + call_to_action_type: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ), + headline: T.nilable(String), + instagram_actor_id: T.nilable(String), + link_url: T.nilable(String), + name: T.nilable(String), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol, + primary_text: T.nilable(String), + typename: Symbol, + url_tags: T.nilable(String) + } + ) + end + def to_hash + end + + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEARN_MORE = + T.let( + :LEARN_MORE, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SHOP_NOW = + T.let( + :SHOP_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SIGN_UP = + T.let( + :SIGN_UP, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SUBSCRIBE = + T.let( + :SUBSCRIBE, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_STARTED = + T.let( + :GET_STARTED, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + BOOK_NOW = + T.let( + :BOOK_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + APPLY_NOW = + T.let( + :APPLY_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + CONTACT_US = + T.let( + :CONTACT_US, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + DOWNLOAD = + T.let( + :DOWNLOAD, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + ORDER_NOW = + T.let( + :ORDER_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + BUY_NOW = + T.let( + :BUY_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_QUOTE = + T.let( + :GET_QUOTE, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + MESSAGE_PAGE = + T.let( + :MESSAGE_PAGE, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + WHATSAPP_MESSAGE = + T.let( + :WHATSAPP_MESSAGE, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + INSTAGRAM_MESSAGE = + T.let( + :INSTAGRAM_MESSAGE, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + CALL_NOW = + T.let( + :CALL_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_DIRECTIONS = + T.let( + :GET_DIRECTIONS, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEND_UPDATES = + T.let( + :SEND_UPDATES, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_OFFER = + T.let( + :GET_OFFER, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + WATCH_MORE = + T.let( + :WATCH_MORE, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + LISTEN_NOW = + T.let( + :LISTEN_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + PLAY_GAME = + T.let( + :PLAY_GAME, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + OPEN_LINK = + T.let( + :OPEN_LINK, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + NO_BUTTON = + T.let( + :NO_BUTTON, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_OFFER_VIEW = + T.let( + :GET_OFFER_VIEW, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_EVENT_TICKETS = + T.let( + :GET_EVENT_TICKETS, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEE_MENU = + T.let( + :SEE_MENU, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + REQUEST_TIME = + T.let( + :REQUEST_TIME, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + EVENT_RSVP = + T.let( + :EVENT_RSVP, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEE_DETAILS = + T.let( + :SEE_DETAILS, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + ) + end + attr_accessor :ad_format + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :ad_name + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :ad_text + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + sig do + returns( + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + ) + end + attr_accessor :call_to_action + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_authorized_bc_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + sig do + returns( + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + ) + end + attr_accessor :identity_type + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :image_ids + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :landing_page_url + + # The ad platform. + sig do + returns( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :video_id + + # TikTok ad configuration. + sig do + params( + ad_format: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::OrSymbol + ), + ad_name: T.nilable(String), + ad_text: T.nilable(String), + call_to_action: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::OrSymbol + ), + image_ids: T.nilable(T::Array[String]), + landing_page_url: T.nilable(String), + platform: + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::OrSymbol, + video_id: T.nilable(String), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + ad_format:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + ad_name:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + ad_text:, + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + call_to_action:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_authorized_bc_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_id:, + identity_type:, + image_ids:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + landing_page_url:, + # The ad platform. + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + video_id:, + # The typename of this object + typename: :TiktokAdPlatformConfigType + ) + end + + sig do + override.returns( + { + ad_format: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ), + ad_name: T.nilable(String), + ad_text: T.nilable(String), + call_to_action: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: + T.nilable( + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ), + image_ids: T.nilable(T::Array[String]), + landing_page_url: T.nilable(String), + platform: + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol, + typename: Symbol, + video_id: T.nilable(String) + } + ) + end + def to_hash + end + + module AdFormat + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SINGLE_IMAGE = + T.let( + :SINGLE_IMAGE, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + SINGLE_VIDEO = + T.let( + :SINGLE_VIDEO, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + CAROUSEL_ADS = + T.let( + :CAROUSEL_ADS, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + CATALOG_CAROUSEL = + T.let( + :CATALOG_CAROUSEL, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + LIVE_CONTENT = + T.let( + :LIVE_CONTENT, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ] + ) + end + def self.values + end + end + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + module CallToAction + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEARN_MORE = + T.let( + :LEARN_MORE, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + DOWNLOAD = + T.let( + :DOWNLOAD, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SHOP_NOW = + T.let( + :SHOP_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SIGN_UP = + T.let( + :SIGN_UP, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + CONTACT_US = + T.let( + :CONTACT_US, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + APPLY_NOW = + T.let( + :APPLY_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + BOOK_NOW = + T.let( + :BOOK_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + PLAY_GAME = + T.let( + :PLAY_GAME, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + WATCH_NOW = + T.let( + :WATCH_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + READ_MORE = + T.let( + :READ_MORE, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + VIEW_NOW = + T.let( + :VIEW_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_QUOTE = + T.let( + :GET_QUOTE, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + ORDER_NOW = + T.let( + :ORDER_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + INSTALL_NOW = + T.let( + :INSTALL_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_SHOWTIMES = + T.let( + :GET_SHOWTIMES, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + LISTEN_NOW = + T.let( + :LISTEN_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + INTERESTED = + T.let( + :INTERESTED, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SUBSCRIBE = + T.let( + :SUBSCRIBE, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_TICKETS_NOW = + T.let( + :GET_TICKETS_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + EXPERIENCE_NOW = + T.let( + :EXPERIENCE_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + PRE_ORDER_NOW = + T.let( + :PRE_ORDER_NOW, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + VISIT_STORE = + T.let( + :VISIT_STORE, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ] + ) + end + def self.values + end + end + + module IdentityType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CUSTOMIZED_USER = + T.let( + :CUSTOMIZED_USER, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + AUTH_CODE = + T.let( + :AUTH_CODE, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + TT_USER = + T.let( + :TT_USER, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + BC_AUTH_TT = + T.let( + :BC_AUTH_TT, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[WhopSDK::Models::AdListResponse::PlatformConfig::Variants] + ) + end + def self.variants + end + end + + # Current status of the ad. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdListResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let(:active, WhopSDK::Models::AdListResponse::Status::TaggedSymbol) + PAUSED = + T.let(:paused, WhopSDK::Models::AdListResponse::Status::TaggedSymbol) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdListResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdListResponse::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdListResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let(:flagged, WhopSDK::Models::AdListResponse::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::Models::AdListResponse::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_retrieve_params.rbi b/rbi/whop_sdk/models/ad_retrieve_params.rbi new file mode 100644 index 00000000..83373d17 --- /dev/null +++ b/rbi/whop_sdk/models/ad_retrieve_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdRetrieveParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_retrieve_response.rbi b/rbi/whop_sdk/models/ad_retrieve_response.rbi new file mode 100644 index 00000000..84ca5e55 --- /dev/null +++ b/rbi/whop_sdk/models/ad_retrieve_response.rbi @@ -0,0 +1,1127 @@ +# typed: strong + +module WhopSDK + module Models + class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Models::AdRetrieveResponse, WhopSDK::Internal::AnyHash) + end + + # Unique identifier for the ad. + sig { returns(String) } + attr_accessor :id + + # When the ad was created. + sig { returns(Time) } + attr_accessor :created_at + + # The creative set used by this ad. + sig do + returns( + T.nilable(WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet) + ) + end + attr_reader :external_ad_creative_set + + sig do + params( + external_ad_creative_set: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet::OrHash + ) + ).void + end + attr_writer :external_ad_creative_set + + # The parent ad group. + sig { returns(WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup) } + attr_reader :external_ad_group + + sig do + params( + external_ad_group: + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::OrHash + ).void + end + attr_writer :external_ad_group + + # Typed platform-specific configuration. + sig do + returns( + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::Variants + ) + ) + end + attr_accessor :platform_config + + # Current status of the ad. + sig { returns(WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol) } + attr_accessor :status + + # When the ad was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An ad belonging to an ad group + sig do + params( + id: String, + created_at: Time, + external_ad_creative_set: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet::OrHash + ), + external_ad_group: + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::OrHash, + platform_config: + T.nilable( + T.any( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::OrHash, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::OrHash + ) + ), + status: WhopSDK::Models::AdRetrieveResponse::Status::OrSymbol, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # Unique identifier for the ad. + id:, + # When the ad was created. + created_at:, + # The creative set used by this ad. + external_ad_creative_set:, + # The parent ad group. + external_ad_group:, + # Typed platform-specific configuration. + platform_config:, + # Current status of the ad. + status:, + # When the ad was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + created_at: Time, + external_ad_creative_set: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet + ), + external_ad_group: + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup, + platform_config: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::Variants + ), + status: WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol, + updated_at: Time + } + ) + end + def to_hash + end + + class ExternalAdCreativeSet < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the external ad creative set. + sig { returns(String) } + attr_accessor :id + + # The creative set used by this ad. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the external ad creative set. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + + class ExternalAdGroup < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the external ad group. + sig { returns(String) } + attr_accessor :id + + # Human-readable ad group name + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Current operational status of the ad group + sig do + returns( + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + ) + end + attr_accessor :status + + # The parent ad group. + sig do + params( + id: String, + name: T.nilable(String), + status: + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the external ad group. + id:, + # Human-readable ad group name + name:, + # Current operational status of the ad group + status: + ) + end + + sig do + override.returns( + { + id: String, + name: T.nilable(String), + status: + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + } + ) + end + def to_hash + end + + # Current operational status of the ad group + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # Typed platform-specific configuration. + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType + ) + ) + end + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + ) + end + attr_accessor :call_to_action_type + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :headline + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :instagram_actor_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :link_url + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :page_id + + # The ad platform. + sig do + returns( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :primary_text + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :url_tags + + # Meta (Facebook/Instagram) ad configuration. + sig do + params( + call_to_action_type: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::OrSymbol + ), + headline: T.nilable(String), + instagram_actor_id: T.nilable(String), + link_url: T.nilable(String), + name: T.nilable(String), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::OrSymbol, + primary_text: T.nilable(String), + url_tags: T.nilable(String), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + call_to_action_type:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + headline:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + instagram_actor_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + link_url:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + name:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + page_id:, + # The ad platform. + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + primary_text:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + url_tags:, + # The typename of this object + typename: :MetaAdPlatformConfigType + ) + end + + sig do + override.returns( + { + call_to_action_type: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ), + headline: T.nilable(String), + instagram_actor_id: T.nilable(String), + link_url: T.nilable(String), + name: T.nilable(String), + page_id: T.nilable(String), + platform: + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol, + primary_text: T.nilable(String), + typename: Symbol, + url_tags: T.nilable(String) + } + ) + end + def to_hash + end + + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEARN_MORE = + T.let( + :LEARN_MORE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SHOP_NOW = + T.let( + :SHOP_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SIGN_UP = + T.let( + :SIGN_UP, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SUBSCRIBE = + T.let( + :SUBSCRIBE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_STARTED = + T.let( + :GET_STARTED, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + BOOK_NOW = + T.let( + :BOOK_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + APPLY_NOW = + T.let( + :APPLY_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + CONTACT_US = + T.let( + :CONTACT_US, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + DOWNLOAD = + T.let( + :DOWNLOAD, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + ORDER_NOW = + T.let( + :ORDER_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + BUY_NOW = + T.let( + :BUY_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_QUOTE = + T.let( + :GET_QUOTE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + MESSAGE_PAGE = + T.let( + :MESSAGE_PAGE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + WHATSAPP_MESSAGE = + T.let( + :WHATSAPP_MESSAGE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + INSTAGRAM_MESSAGE = + T.let( + :INSTAGRAM_MESSAGE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + CALL_NOW = + T.let( + :CALL_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_DIRECTIONS = + T.let( + :GET_DIRECTIONS, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEND_UPDATES = + T.let( + :SEND_UPDATES, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_OFFER = + T.let( + :GET_OFFER, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + WATCH_MORE = + T.let( + :WATCH_MORE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + LISTEN_NOW = + T.let( + :LISTEN_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + PLAY_GAME = + T.let( + :PLAY_GAME, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + OPEN_LINK = + T.let( + :OPEN_LINK, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + NO_BUTTON = + T.let( + :NO_BUTTON, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_OFFER_VIEW = + T.let( + :GET_OFFER_VIEW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + GET_EVENT_TICKETS = + T.let( + :GET_EVENT_TICKETS, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEE_MENU = + T.let( + :SEE_MENU, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + REQUEST_TIME = + T.let( + :REQUEST_TIME, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + EVENT_RSVP = + T.let( + :EVENT_RSVP, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + SEE_DETAILS = + T.let( + :SEE_DETAILS, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::CallToActionType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType, + WhopSDK::Internal::AnyHash + ) + end + + sig do + returns( + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + ) + end + attr_accessor :ad_format + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :ad_name + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :ad_text + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + sig do + returns( + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + ) + end + attr_accessor :call_to_action + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_authorized_bc_id + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :identity_id + + sig do + returns( + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + ) + end + attr_accessor :identity_type + + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :image_ids + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :landing_page_url + + # The ad platform. + sig do + returns( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + end + attr_accessor :platform + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + sig { returns(T.nilable(String)) } + attr_accessor :video_id + + # TikTok ad configuration. + sig do + params( + ad_format: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::OrSymbol + ), + ad_name: T.nilable(String), + ad_text: T.nilable(String), + call_to_action: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::OrSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::OrSymbol + ), + image_ids: T.nilable(T::Array[String]), + landing_page_url: T.nilable(String), + platform: + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::OrSymbol, + video_id: T.nilable(String), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + ad_format:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + ad_name:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + ad_text:, + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + call_to_action:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_authorized_bc_id:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + identity_id:, + identity_type:, + image_ids:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + landing_page_url:, + # The ad platform. + platform:, + # Represents textual data as UTF-8 character sequences. This type is most often + # used by GraphQL to represent free-form human-readable text. + video_id:, + # The typename of this object + typename: :TiktokAdPlatformConfigType + ) + end + + sig do + override.returns( + { + ad_format: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ), + ad_name: T.nilable(String), + ad_text: T.nilable(String), + call_to_action: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ), + identity_authorized_bc_id: T.nilable(String), + identity_id: T.nilable(String), + identity_type: + T.nilable( + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ), + image_ids: T.nilable(T::Array[String]), + landing_page_url: T.nilable(String), + platform: + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol, + typename: Symbol, + video_id: T.nilable(String) + } + ) + end + def to_hash + end + + module AdFormat + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SINGLE_IMAGE = + T.let( + :SINGLE_IMAGE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + SINGLE_VIDEO = + T.let( + :SINGLE_VIDEO, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + CAROUSEL_ADS = + T.let( + :CAROUSEL_ADS, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + CATALOG_CAROUSEL = + T.let( + :CATALOG_CAROUSEL, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + LIVE_CONTENT = + T.let( + :LIVE_CONTENT, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::AdFormat::TaggedSymbol + ] + ) + end + def self.values + end + end + + # TikTok call-to-action button text. See docs/tiktok_api/ad.md § call_to_action. + module CallToAction + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEARN_MORE = + T.let( + :LEARN_MORE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + DOWNLOAD = + T.let( + :DOWNLOAD, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SHOP_NOW = + T.let( + :SHOP_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SIGN_UP = + T.let( + :SIGN_UP, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + CONTACT_US = + T.let( + :CONTACT_US, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + APPLY_NOW = + T.let( + :APPLY_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + BOOK_NOW = + T.let( + :BOOK_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + PLAY_GAME = + T.let( + :PLAY_GAME, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + WATCH_NOW = + T.let( + :WATCH_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + READ_MORE = + T.let( + :READ_MORE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + VIEW_NOW = + T.let( + :VIEW_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_QUOTE = + T.let( + :GET_QUOTE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + ORDER_NOW = + T.let( + :ORDER_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + INSTALL_NOW = + T.let( + :INSTALL_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_SHOWTIMES = + T.let( + :GET_SHOWTIMES, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + LISTEN_NOW = + T.let( + :LISTEN_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + INTERESTED = + T.let( + :INTERESTED, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + SUBSCRIBE = + T.let( + :SUBSCRIBE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + GET_TICKETS_NOW = + T.let( + :GET_TICKETS_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + EXPERIENCE_NOW = + T.let( + :EXPERIENCE_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + PRE_ORDER_NOW = + T.let( + :PRE_ORDER_NOW, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + VISIT_STORE = + T.let( + :VISIT_STORE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::CallToAction::TaggedSymbol + ] + ) + end + def self.values + end + end + + module IdentityType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CUSTOMIZED_USER = + T.let( + :CUSTOMIZED_USER, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + AUTH_CODE = + T.let( + :AUTH_CODE, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + TT_USER = + T.let( + :TT_USER, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + BC_AUTH_TT = + T.let( + :BC_AUTH_TT, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::IdentityType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The ad platform. + module Platform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = + T.let( + :meta, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + TIKTOK = + T.let( + :tiktok, + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::Platform::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdRetrieveResponse::PlatformConfig::Variants + ] + ) + end + def self.variants + end + end + + # Current status of the ad. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::AdRetrieveResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = + T.let( + :active, + WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol + ) + PAUSED = + T.let( + :paused, + WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol + ) + INACTIVE = + T.let( + :inactive, + WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol + ) + IN_REVIEW = + T.let( + :in_review, + WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol + ) + REJECTED = + T.let( + :rejected, + WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol + ) + FLAGGED = + T.let( + :flagged, + WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/authorized_user_roles.rbi b/rbi/whop_sdk/models/authorized_user_roles.rbi index 45be740f..684a1487 100644 --- a/rbi/whop_sdk/models/authorized_user_roles.rbi +++ b/rbi/whop_sdk/models/authorized_user_roles.rbi @@ -15,6 +15,8 @@ module WhopSDK SALES_MANAGER = T.let(:sales_manager, WhopSDK::AuthorizedUserRoles::TaggedSymbol) MODERATOR = T.let(:moderator, WhopSDK::AuthorizedUserRoles::TaggedSymbol) + ADVERTISER = + T.let(:advertiser, WhopSDK::AuthorizedUserRoles::TaggedSymbol) APP_MANAGER = T.let(:app_manager, WhopSDK::AuthorizedUserRoles::TaggedSymbol) SUPPORT = T.let(:support, WhopSDK::AuthorizedUserRoles::TaggedSymbol) diff --git a/rbi/whop_sdk/models/bounty_create_params.rbi b/rbi/whop_sdk/models/bounty_create_params.rbi new file mode 100644 index 00000000..2c7f08c6 --- /dev/null +++ b/rbi/whop_sdk/models/bounty_create_params.rbi @@ -0,0 +1,109 @@ +# typed: strong + +module WhopSDK + module Models + class BountyCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::BountyCreateParams, WhopSDK::Internal::AnyHash) + end + + # The amount paid to each approved submission. The total bounty pool funded is + # this amount times accepted_submissions_limit. + sig { returns(Float) } + attr_accessor :base_unit_amount + + # The currency for the bounty pool funding amount. + sig { returns(WhopSDK::Currency::OrSymbol) } + attr_accessor :currency + + # The description of the bounty. + sig { returns(String) } + attr_accessor :description + + # The title of the bounty. + sig { returns(String) } + attr_accessor :title + + # The number of submissions that can be approved before the bounty closes. + # Defaults to 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :accepted_submissions_limit + + # The ISO3166 country codes where this bounty should be visible. Empty means + # globally visible. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_country_codes + + # An optional experience to scope the bounty to. + sig { returns(T.nilable(String)) } + attr_accessor :experience_id + + # The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool. + # Defaults to the requester's personal balance when omitted. The requester must be + # the user themself or an owner/admin of the company. + sig { returns(T.nilable(String)) } + attr_accessor :origin_account_id + + sig do + params( + base_unit_amount: Float, + currency: WhopSDK::Currency::OrSymbol, + description: String, + title: String, + accepted_submissions_limit: T.nilable(Integer), + allowed_country_codes: T.nilable(T::Array[String]), + experience_id: T.nilable(String), + origin_account_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The amount paid to each approved submission. The total bounty pool funded is + # this amount times accepted_submissions_limit. + base_unit_amount:, + # The currency for the bounty pool funding amount. + currency:, + # The description of the bounty. + description:, + # The title of the bounty. + title:, + # The number of submissions that can be approved before the bounty closes. + # Defaults to 1. + accepted_submissions_limit: nil, + # The ISO3166 country codes where this bounty should be visible. Empty means + # globally visible. + allowed_country_codes: nil, + # An optional experience to scope the bounty to. + experience_id: nil, + # The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool. + # Defaults to the requester's personal balance when omitted. The requester must be + # the user themself or an owner/admin of the company. + origin_account_id: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + base_unit_amount: Float, + currency: WhopSDK::Currency::OrSymbol, + description: String, + title: String, + accepted_submissions_limit: T.nilable(Integer), + allowed_country_codes: T.nilable(T::Array[String]), + experience_id: T.nilable(String), + origin_account_id: T.nilable(String), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/bounty_create_response.rbi b/rbi/whop_sdk/models/bounty_create_response.rbi new file mode 100644 index 00000000..f462e89d --- /dev/null +++ b/rbi/whop_sdk/models/bounty_create_response.rbi @@ -0,0 +1,196 @@ +# typed: strong + +module WhopSDK + module Models + class BountyCreateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::BountyCreateResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the bounty. + sig { returns(String) } + attr_accessor :id + + # The underlying bounty implementation type. + sig do + returns(WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol) + end + attr_accessor :bounty_type + + # The datetime the bounty was created. + sig { returns(Time) } + attr_accessor :created_at + + # The currency used for the bounty funds. + sig { returns(WhopSDK::Currency::TaggedSymbol) } + attr_accessor :currency + + # The description of the bounty. + sig { returns(String) } + attr_accessor :description + + # The current lifecycle status of the bounty. + sig do + returns(WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # The title of the bounty. + sig { returns(String) } + attr_accessor :title + + # The total amount currently funded in the bounty pool for payout. + sig { returns(Float) } + attr_accessor :total_available + + # The total amount paid out for this bounty. + sig { returns(Float) } + attr_accessor :total_paid + + # The datetime the bounty was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # The number of watcher votes required before the submission can resolve. + sig { returns(Integer) } + attr_accessor :vote_threshold + + # A privately accessible bounty. + sig do + params( + id: String, + bounty_type: + WhopSDK::Models::BountyCreateResponse::BountyType::OrSymbol, + created_at: Time, + currency: WhopSDK::Currency::OrSymbol, + description: String, + status: WhopSDK::Models::BountyCreateResponse::Status::OrSymbol, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the bounty. + id:, + # The underlying bounty implementation type. + bounty_type:, + # The datetime the bounty was created. + created_at:, + # The currency used for the bounty funds. + currency:, + # The description of the bounty. + description:, + # The current lifecycle status of the bounty. + status:, + # The title of the bounty. + title:, + # The total amount currently funded in the bounty pool for payout. + total_available:, + # The total amount paid out for this bounty. + total_paid:, + # The datetime the bounty was last updated. + updated_at:, + # The number of watcher votes required before the submission can resolve. + vote_threshold: + ) + end + + sig do + override.returns( + { + id: String, + bounty_type: + WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol, + created_at: Time, + currency: WhopSDK::Currency::TaggedSymbol, + description: String, + status: WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + ) + end + def to_hash + end + + # The underlying bounty implementation type. + module BountyType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::BountyCreateResponse::BountyType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLASSIC = + T.let( + :classic, + WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol + ) + USER_FUNDED = + T.let( + :user_funded, + WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol + ) + WORKFORCE = + T.let( + :workforce, + WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::BountyCreateResponse::BountyType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The current lifecycle status of the bounty. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::BountyCreateResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PUBLISHED = + T.let( + :published, + WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol + ) + ARCHIVED = + T.let( + :archived, + WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::BountyCreateResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/bounty_list_params.rbi b/rbi/whop_sdk/models/bounty_list_params.rbi new file mode 100644 index 00000000..e739ebdd --- /dev/null +++ b/rbi/whop_sdk/models/bounty_list_params.rbi @@ -0,0 +1,115 @@ +# typed: strong + +module WhopSDK + module Models + class BountyListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::BountyListParams, WhopSDK::Internal::AnyHash) + end + + # Returns the elements in the list that come after the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :after + + # Returns the elements in the list that come before the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :before + + # The direction of the sort. + sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) } + attr_accessor :direction + + # The experience to list bounties for. When omitted, returns bounties with no + # experience. + sig { returns(T.nilable(String)) } + attr_accessor :experience_id + + # Returns the first _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :first + + # Returns the last _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :last + + # The available bounty statuses to choose from. + sig { returns(T.nilable(WhopSDK::BountyListParams::Status::OrSymbol)) } + attr_accessor :status + + sig do + params( + after: T.nilable(String), + before: T.nilable(String), + direction: T.nilable(WhopSDK::Direction::OrSymbol), + experience_id: T.nilable(String), + first: T.nilable(Integer), + last: T.nilable(Integer), + status: T.nilable(WhopSDK::BountyListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # The direction of the sort. + direction: nil, + # The experience to list bounties for. When omitted, returns bounties with no + # experience. + experience_id: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # The available bounty statuses to choose from. + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + after: T.nilable(String), + before: T.nilable(String), + direction: T.nilable(WhopSDK::Direction::OrSymbol), + experience_id: T.nilable(String), + first: T.nilable(Integer), + last: T.nilable(Integer), + status: T.nilable(WhopSDK::BountyListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # The available bounty statuses to choose from. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::BountyListParams::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PUBLISHED = + T.let(:published, WhopSDK::BountyListParams::Status::TaggedSymbol) + ARCHIVED = + T.let(:archived, WhopSDK::BountyListParams::Status::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::BountyListParams::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/bounty_list_response.rbi b/rbi/whop_sdk/models/bounty_list_response.rbi new file mode 100644 index 00000000..5a11198b --- /dev/null +++ b/rbi/whop_sdk/models/bounty_list_response.rbi @@ -0,0 +1,189 @@ +# typed: strong + +module WhopSDK + module Models + class BountyListResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Models::BountyListResponse, WhopSDK::Internal::AnyHash) + end + + # The unique identifier for the bounty. + sig { returns(String) } + attr_accessor :id + + # The underlying bounty implementation type. + sig do + returns(WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol) + end + attr_accessor :bounty_type + + # The datetime the bounty was created. + sig { returns(Time) } + attr_accessor :created_at + + # The currency used for the bounty funds. + sig { returns(WhopSDK::Currency::TaggedSymbol) } + attr_accessor :currency + + # The description of the bounty. + sig { returns(String) } + attr_accessor :description + + # The current lifecycle status of the bounty. + sig { returns(WhopSDK::Models::BountyListResponse::Status::TaggedSymbol) } + attr_accessor :status + + # The title of the bounty. + sig { returns(String) } + attr_accessor :title + + # The total amount currently funded in the bounty pool for payout. + sig { returns(Float) } + attr_accessor :total_available + + # The total amount paid out for this bounty. + sig { returns(Float) } + attr_accessor :total_paid + + # The datetime the bounty was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # The number of watcher votes required before the submission can resolve. + sig { returns(Integer) } + attr_accessor :vote_threshold + + # A privately accessible bounty. + sig do + params( + id: String, + bounty_type: + WhopSDK::Models::BountyListResponse::BountyType::OrSymbol, + created_at: Time, + currency: WhopSDK::Currency::OrSymbol, + description: String, + status: WhopSDK::Models::BountyListResponse::Status::OrSymbol, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the bounty. + id:, + # The underlying bounty implementation type. + bounty_type:, + # The datetime the bounty was created. + created_at:, + # The currency used for the bounty funds. + currency:, + # The description of the bounty. + description:, + # The current lifecycle status of the bounty. + status:, + # The title of the bounty. + title:, + # The total amount currently funded in the bounty pool for payout. + total_available:, + # The total amount paid out for this bounty. + total_paid:, + # The datetime the bounty was last updated. + updated_at:, + # The number of watcher votes required before the submission can resolve. + vote_threshold: + ) + end + + sig do + override.returns( + { + id: String, + bounty_type: + WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol, + created_at: Time, + currency: WhopSDK::Currency::TaggedSymbol, + description: String, + status: WhopSDK::Models::BountyListResponse::Status::TaggedSymbol, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + ) + end + def to_hash + end + + # The underlying bounty implementation type. + module BountyType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::BountyListResponse::BountyType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLASSIC = + T.let( + :classic, + WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol + ) + USER_FUNDED = + T.let( + :user_funded, + WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol + ) + WORKFORCE = + T.let( + :workforce, + WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::BountyListResponse::BountyType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The current lifecycle status of the bounty. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::BountyListResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PUBLISHED = + T.let( + :published, + WhopSDK::Models::BountyListResponse::Status::TaggedSymbol + ) + ARCHIVED = + T.let( + :archived, + WhopSDK::Models::BountyListResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::Models::BountyListResponse::Status::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/bounty_retrieve_params.rbi b/rbi/whop_sdk/models/bounty_retrieve_params.rbi new file mode 100644 index 00000000..1a926366 --- /dev/null +++ b/rbi/whop_sdk/models/bounty_retrieve_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class BountyRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::BountyRetrieveParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/bounty_retrieve_response.rbi b/rbi/whop_sdk/models/bounty_retrieve_response.rbi new file mode 100644 index 00000000..6c03f901 --- /dev/null +++ b/rbi/whop_sdk/models/bounty_retrieve_response.rbi @@ -0,0 +1,199 @@ +# typed: strong + +module WhopSDK + module Models + class BountyRetrieveResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::BountyRetrieveResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the bounty. + sig { returns(String) } + attr_accessor :id + + # The underlying bounty implementation type. + sig do + returns( + WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol + ) + end + attr_accessor :bounty_type + + # The datetime the bounty was created. + sig { returns(Time) } + attr_accessor :created_at + + # The currency used for the bounty funds. + sig { returns(WhopSDK::Currency::TaggedSymbol) } + attr_accessor :currency + + # The description of the bounty. + sig { returns(String) } + attr_accessor :description + + # The current lifecycle status of the bounty. + sig do + returns(WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol) + end + attr_accessor :status + + # The title of the bounty. + sig { returns(String) } + attr_accessor :title + + # The total amount currently funded in the bounty pool for payout. + sig { returns(Float) } + attr_accessor :total_available + + # The total amount paid out for this bounty. + sig { returns(Float) } + attr_accessor :total_paid + + # The datetime the bounty was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # The number of watcher votes required before the submission can resolve. + sig { returns(Integer) } + attr_accessor :vote_threshold + + # A privately accessible bounty. + sig do + params( + id: String, + bounty_type: + WhopSDK::Models::BountyRetrieveResponse::BountyType::OrSymbol, + created_at: Time, + currency: WhopSDK::Currency::OrSymbol, + description: String, + status: WhopSDK::Models::BountyRetrieveResponse::Status::OrSymbol, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the bounty. + id:, + # The underlying bounty implementation type. + bounty_type:, + # The datetime the bounty was created. + created_at:, + # The currency used for the bounty funds. + currency:, + # The description of the bounty. + description:, + # The current lifecycle status of the bounty. + status:, + # The title of the bounty. + title:, + # The total amount currently funded in the bounty pool for payout. + total_available:, + # The total amount paid out for this bounty. + total_paid:, + # The datetime the bounty was last updated. + updated_at:, + # The number of watcher votes required before the submission can resolve. + vote_threshold: + ) + end + + sig do + override.returns( + { + id: String, + bounty_type: + WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol, + created_at: Time, + currency: WhopSDK::Currency::TaggedSymbol, + description: String, + status: + WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + ) + end + def to_hash + end + + # The underlying bounty implementation type. + module BountyType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::BountyRetrieveResponse::BountyType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CLASSIC = + T.let( + :classic, + WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol + ) + USER_FUNDED = + T.let( + :user_funded, + WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol + ) + WORKFORCE = + T.let( + :workforce, + WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::BountyRetrieveResponse::BountyType::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The current lifecycle status of the bounty. + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::BountyRetrieveResponse::Status) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PUBLISHED = + T.let( + :published, + WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol + ) + ARCHIVED = + T.let( + :archived, + WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::BountyRetrieveResponse::Status::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/checkout_configuration.rbi b/rbi/whop_sdk/models/checkout_configuration.rbi index 9a3beab0..0c40f13d 100644 --- a/rbi/whop_sdk/models/checkout_configuration.rbi +++ b/rbi/whop_sdk/models/checkout_configuration.rbi @@ -230,6 +230,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + sig { returns(T::Boolean) } + attr_accessor :adaptive_pricing_enabled + # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. sig { returns(T.nilable(Integer)) } @@ -281,6 +286,7 @@ module WhopSDK sig do params( id: String, + adaptive_pricing_enabled: T::Boolean, billing_period: T.nilable(Integer), currency: WhopSDK::Currency::OrSymbol, expiration_days: T.nilable(Integer), @@ -295,6 +301,9 @@ module WhopSDK def self.new( # The unique identifier for the plan. id:, + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + adaptive_pricing_enabled:, # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. billing_period:, @@ -331,6 +340,7 @@ module WhopSDK override.returns( { id: String, + adaptive_pricing_enabled: T::Boolean, billing_period: T.nilable(Integer), currency: WhopSDK::Currency::TaggedSymbol, expiration_days: T.nilable(Integer), diff --git a/rbi/whop_sdk/models/checkout_configuration_create_params.rbi b/rbi/whop_sdk/models/checkout_configuration_create_params.rbi index ed732739..c8bbdfaf 100644 --- a/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +++ b/rbi/whop_sdk/models/checkout_configuration_create_params.rbi @@ -275,6 +275,10 @@ module WhopSDK sig { returns(WhopSDK::Currency::OrSymbol) } attr_accessor :currency + # Whether this plan accepts local currency payments via adaptive pricing. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :adaptive_pricing_enabled + # The application fee amount collected by the platform from this connected # account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less # than the total payment amount. Only valid for connected accounts with a parent @@ -431,6 +435,7 @@ module WhopSDK params( company_id: String, currency: WhopSDK::Currency::OrSymbol, + adaptive_pricing_enabled: T.nilable(T::Boolean), application_fee_amount: T.nilable(Float), billing_period: T.nilable(Integer), custom_fields: @@ -473,6 +478,8 @@ module WhopSDK company_id:, # The respective currency identifier for the plan. currency:, + # Whether this plan accepts local currency payments via adaptive pricing. + adaptive_pricing_enabled: nil, # The application fee amount collected by the platform from this connected # account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less # than the total payment amount. Only valid for connected accounts with a parent @@ -534,6 +541,7 @@ module WhopSDK { company_id: String, currency: WhopSDK::Currency::OrSymbol, + adaptive_pricing_enabled: T.nilable(T::Boolean), application_fee_amount: T.nilable(Float), billing_period: T.nilable(Integer), custom_fields: @@ -700,7 +708,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # The explicit payment method configuration for the plan. If not provided, the @@ -709,7 +717,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -724,7 +732,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -733,7 +741,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end @@ -888,6 +896,11 @@ module WhopSDK ) end + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + sig { returns(T.nilable(String)) } + attr_accessor :background_color + # The different border-radius styles available for checkout pages. sig { returns(T.nilable(WhopSDK::CheckoutShape::OrSymbol)) } attr_accessor :border_style @@ -904,12 +917,16 @@ module WhopSDK # defaults. sig do params( + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) ).returns(T.attached_class) end def self.new( + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + background_color: nil, # The different border-radius styles available for checkout pages. border_style: nil, # A hex color code for the button color (e.g. #FF5733). @@ -922,6 +939,7 @@ module WhopSDK sig do override.returns( { + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) @@ -985,7 +1003,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # The explicit payment method configuration for the checkout session. Only applies @@ -994,7 +1012,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -1009,7 +1027,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -1018,7 +1036,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end @@ -1209,6 +1227,11 @@ module WhopSDK ) end + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + sig { returns(T.nilable(String)) } + attr_accessor :background_color + # The different border-radius styles available for checkout pages. sig { returns(T.nilable(WhopSDK::CheckoutShape::OrSymbol)) } attr_accessor :border_style @@ -1225,12 +1248,16 @@ module WhopSDK # defaults. sig do params( + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) ).returns(T.attached_class) end def self.new( + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + background_color: nil, # The different border-radius styles available for checkout pages. border_style: nil, # A hex color code for the button color (e.g. #FF5733). @@ -1243,6 +1270,7 @@ module WhopSDK sig do override.returns( { + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) @@ -1306,7 +1334,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # The explicit payment method configuration for the checkout session. Only applies @@ -1315,7 +1343,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -1330,7 +1358,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -1339,7 +1367,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end @@ -1506,6 +1534,11 @@ module WhopSDK ) end + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + sig { returns(T.nilable(String)) } + attr_accessor :background_color + # The different border-radius styles available for checkout pages. sig { returns(T.nilable(WhopSDK::CheckoutShape::OrSymbol)) } attr_accessor :border_style @@ -1522,12 +1555,16 @@ module WhopSDK # defaults. sig do params( + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) ).returns(T.attached_class) end def self.new( + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + background_color: nil, # The different border-radius styles available for checkout pages. border_style: nil, # A hex color code for the button color (e.g. #FF5733). @@ -1540,6 +1577,7 @@ module WhopSDK sig do override.returns( { + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) @@ -1574,7 +1612,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # The explicit payment method configuration for the checkout session. Only applies @@ -1583,7 +1621,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -1598,7 +1636,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -1607,7 +1645,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end diff --git a/rbi/whop_sdk/models/checkout_configuration_list_response.rbi b/rbi/whop_sdk/models/checkout_configuration_list_response.rbi index 14a7eedc..2c777ac6 100644 --- a/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +++ b/rbi/whop_sdk/models/checkout_configuration_list_response.rbi @@ -248,6 +248,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + sig { returns(T::Boolean) } + attr_accessor :adaptive_pricing_enabled + # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. sig { returns(T.nilable(Integer)) } @@ -299,6 +304,7 @@ module WhopSDK sig do params( id: String, + adaptive_pricing_enabled: T::Boolean, billing_period: T.nilable(Integer), currency: WhopSDK::Currency::OrSymbol, expiration_days: T.nilable(Integer), @@ -313,6 +319,9 @@ module WhopSDK def self.new( # The unique identifier for the plan. id:, + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + adaptive_pricing_enabled:, # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. billing_period:, @@ -349,6 +358,7 @@ module WhopSDK override.returns( { id: String, + adaptive_pricing_enabled: T::Boolean, billing_period: T.nilable(Integer), currency: WhopSDK::Currency::TaggedSymbol, expiration_days: T.nilable(Integer), diff --git a/rbi/whop_sdk/models/company_create_api_key_params.rbi b/rbi/whop_sdk/models/company_create_api_key_params.rbi new file mode 100644 index 00000000..bc8fccf7 --- /dev/null +++ b/rbi/whop_sdk/models/company_create_api_key_params.rbi @@ -0,0 +1,184 @@ +# typed: strong + +module WhopSDK + module Models + class CompanyCreateAPIKeyParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::CompanyCreateAPIKeyParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :parent_company_id + + # The unique identifier of the connected account to create the API key for (e.g. + # 'biz_xxx'). + sig { returns(String) } + attr_accessor :child_company_id + + # A human-readable name for the API key, such as 'Production API Key'. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Granular permission statements defining which actions this API key can perform. + # Either permissions or role must be provided. + sig do + returns( + T.nilable(T::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission]) + ) + end + attr_accessor :permissions + + # The different system roles that can be assigned. + sig do + returns(T.nilable(WhopSDK::CompanyCreateAPIKeyParams::Role::OrSymbol)) + end + attr_accessor :role + + sig do + params( + parent_company_id: String, + child_company_id: String, + name: T.nilable(String), + permissions: + T.nilable( + T::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission::OrHash] + ), + role: T.nilable(WhopSDK::CompanyCreateAPIKeyParams::Role::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + parent_company_id:, + # The unique identifier of the connected account to create the API key for (e.g. + # 'biz_xxx'). + child_company_id:, + # A human-readable name for the API key, such as 'Production API Key'. + name: nil, + # Granular permission statements defining which actions this API key can perform. + # Either permissions or role must be provided. + permissions: nil, + # The different system roles that can be assigned. + role: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + parent_company_id: String, + child_company_id: String, + name: T.nilable(String), + permissions: + T.nilable( + T::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission] + ), + role: T.nilable(WhopSDK::CompanyCreateAPIKeyParams::Role::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + class Permission < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::CompanyCreateAPIKeyParams::Permission, + WhopSDK::Internal::AnyHash + ) + end + + # Actions covered by this statement + sig { returns(T::Array[String]) } + attr_accessor :actions + + # Whether the actions are granted or denied + sig { returns(T::Boolean) } + attr_accessor :grant + + # Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*_|exp*xxx' or + # 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or + # 'biz_xxx|pass*_' + sig { returns(T::Array[String]) } + attr_accessor :resources + + # Input for a single permissions statement + sig do + params( + actions: T::Array[String], + grant: T::Boolean, + resources: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # Actions covered by this statement + actions:, + # Whether the actions are granted or denied + grant:, + # Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*_|exp*xxx' or + # 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or + # 'biz_xxx|pass*_' + resources: + ) + end + + sig do + override.returns( + { + actions: T::Array[String], + grant: T::Boolean, + resources: T::Array[String] + } + ) + end + def to_hash + end + end + + # The different system roles that can be assigned. + module Role + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::CompanyCreateAPIKeyParams::Role) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + OWNER = + T.let(:owner, WhopSDK::CompanyCreateAPIKeyParams::Role::TaggedSymbol) + ADMIN = + T.let(:admin, WhopSDK::CompanyCreateAPIKeyParams::Role::TaggedSymbol) + MODERATOR = + T.let( + :moderator, + WhopSDK::CompanyCreateAPIKeyParams::Role::TaggedSymbol + ) + SALES_MANAGER = + T.let( + :sales_manager, + WhopSDK::CompanyCreateAPIKeyParams::Role::TaggedSymbol + ) + ADVERTISER = + T.let( + :advertiser, + WhopSDK::CompanyCreateAPIKeyParams::Role::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::CompanyCreateAPIKeyParams::Role::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/company_create_api_key_response.rbi b/rbi/whop_sdk/models/company_create_api_key_response.rbi new file mode 100644 index 00000000..3eb88207 --- /dev/null +++ b/rbi/whop_sdk/models/company_create_api_key_response.rbi @@ -0,0 +1,51 @@ +# typed: strong + +module WhopSDK + module Models + class CompanyCreateAPIKeyResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::CompanyCreateAPIKeyResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the authorized api key. + sig { returns(String) } + attr_accessor :id + + # A user set name to identify an API key + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The secret key used to authenticate requests. Only returned at creation time. + sig { returns(String) } + attr_accessor :secret_key + + # An API key created for a child company, including the one-time secret key. + sig do + params(id: String, name: T.nilable(String), secret_key: String).returns( + T.attached_class + ) + end + def self.new( + # The unique identifier for the authorized api key. + id:, + # A user set name to identify an API key + name:, + # The secret key used to authenticate requests. Only returned at creation time. + secret_key: + ) + end + + sig do + override.returns( + { id: String, name: T.nilable(String), secret_key: String } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/conversion_create_params.rbi b/rbi/whop_sdk/models/conversion_create_params.rbi new file mode 100644 index 00000000..60a3e2eb --- /dev/null +++ b/rbi/whop_sdk/models/conversion_create_params.rbi @@ -0,0 +1,661 @@ +# typed: strong + +module WhopSDK + module Models + class ConversionCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::ConversionCreateParams, WhopSDK::Internal::AnyHash) + end + + # The company to associate with this event. + sig { returns(String) } + attr_accessor :company_id + + # The type of event. + sig { returns(WhopSDK::ConversionCreateParams::EventName::OrSymbol) } + attr_accessor :event_name + + # The channel where an event originated + sig do + returns( + T.nilable(WhopSDK::ConversionCreateParams::ActionSource::OrSymbol) + ) + end + attr_accessor :action_source + + # Tracking and attribution context. + sig { returns(T.nilable(WhopSDK::ConversionCreateParams::Context)) } + attr_reader :context + + sig do + params( + context: T.nilable(WhopSDK::ConversionCreateParams::Context::OrHash) + ).void + end + attr_writer :context + + # The available currencies on the platform + sig { returns(T.nilable(WhopSDK::Currency::OrSymbol)) } + attr_accessor :currency + + # Custom event name when event_name is 'custom'. + sig { returns(T.nilable(String)) } + attr_accessor :custom_name + + # Client-provided identifier for deduplication. Generated if omitted. + sig { returns(T.nilable(String)) } + attr_accessor :event_id + + # When the event occurred. Defaults to now. + sig { returns(T.nilable(Time)) } + attr_accessor :event_time + + # The plan associated with the event. + sig { returns(T.nilable(String)) } + attr_accessor :plan_id + + # The product associated with the event. + sig { returns(T.nilable(String)) } + attr_accessor :product_id + + # The referring URL. + sig { returns(T.nilable(String)) } + attr_accessor :referrer_url + + # The URL where the event occurred. + sig { returns(T.nilable(String)) } + attr_accessor :url + + # User identity and profile data. + sig { returns(T.nilable(WhopSDK::ConversionCreateParams::User)) } + attr_reader :user + + sig do + params( + user: T.nilable(WhopSDK::ConversionCreateParams::User::OrHash) + ).void + end + attr_writer :user + + # Monetary value associated with the event. + sig { returns(T.nilable(Float)) } + attr_accessor :value + + sig do + params( + company_id: String, + event_name: WhopSDK::ConversionCreateParams::EventName::OrSymbol, + action_source: + T.nilable(WhopSDK::ConversionCreateParams::ActionSource::OrSymbol), + context: T.nilable(WhopSDK::ConversionCreateParams::Context::OrHash), + currency: T.nilable(WhopSDK::Currency::OrSymbol), + custom_name: T.nilable(String), + event_id: T.nilable(String), + event_time: T.nilable(Time), + plan_id: T.nilable(String), + product_id: T.nilable(String), + referrer_url: T.nilable(String), + url: T.nilable(String), + user: T.nilable(WhopSDK::ConversionCreateParams::User::OrHash), + value: T.nilable(Float), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The company to associate with this event. + company_id:, + # The type of event. + event_name:, + # The channel where an event originated + action_source: nil, + # Tracking and attribution context. + context: nil, + # The available currencies on the platform + currency: nil, + # Custom event name when event_name is 'custom'. + custom_name: nil, + # Client-provided identifier for deduplication. Generated if omitted. + event_id: nil, + # When the event occurred. Defaults to now. + event_time: nil, + # The plan associated with the event. + plan_id: nil, + # The product associated with the event. + product_id: nil, + # The referring URL. + referrer_url: nil, + # The URL where the event occurred. + url: nil, + # User identity and profile data. + user: nil, + # Monetary value associated with the event. + value: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + company_id: String, + event_name: WhopSDK::ConversionCreateParams::EventName::OrSymbol, + action_source: + T.nilable( + WhopSDK::ConversionCreateParams::ActionSource::OrSymbol + ), + context: T.nilable(WhopSDK::ConversionCreateParams::Context), + currency: T.nilable(WhopSDK::Currency::OrSymbol), + custom_name: T.nilable(String), + event_id: T.nilable(String), + event_time: T.nilable(Time), + plan_id: T.nilable(String), + product_id: T.nilable(String), + referrer_url: T.nilable(String), + url: T.nilable(String), + user: T.nilable(WhopSDK::ConversionCreateParams::User), + value: T.nilable(Float), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # The type of event. + module EventName + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::ConversionCreateParams::EventName) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + LEAD = + T.let(:lead, WhopSDK::ConversionCreateParams::EventName::TaggedSymbol) + SUBMIT_APPLICATION = + T.let( + :submit_application, + WhopSDK::ConversionCreateParams::EventName::TaggedSymbol + ) + CONTACT = + T.let( + :contact, + WhopSDK::ConversionCreateParams::EventName::TaggedSymbol + ) + COMPLETE_REGISTRATION = + T.let( + :complete_registration, + WhopSDK::ConversionCreateParams::EventName::TaggedSymbol + ) + SCHEDULE = + T.let( + :schedule, + WhopSDK::ConversionCreateParams::EventName::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + WhopSDK::ConversionCreateParams::EventName::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::ConversionCreateParams::EventName::TaggedSymbol] + ) + end + def self.values + end + end + + # The channel where an event originated + module ActionSource + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::ConversionCreateParams::ActionSource) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EMAIL = + T.let( + :email, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + WEBSITE = + T.let( + :website, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + APP = + T.let( + :app, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + PHONE_CALL = + T.let( + :phone_call, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + CHAT = + T.let( + :chat, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + PHYSICAL_STORE = + T.let( + :physical_store, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + SYSTEM_GENERATED = + T.let( + :system_generated, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + BUSINESS_MESSAGING = + T.let( + :business_messaging, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + OTHER = + T.let( + :other, + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::ConversionCreateParams::ActionSource::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Context < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::ConversionCreateParams::Context, + WhopSDK::Internal::AnyHash + ) + end + + # Ad campaign ID. + sig { returns(T.nilable(String)) } + attr_accessor :ad_campaign_id + + # Ad ID. + sig { returns(T.nilable(String)) } + attr_accessor :ad_id + + # Ad set ID. + sig { returns(T.nilable(String)) } + attr_accessor :ad_set_id + + # Facebook click ID. + sig { returns(T.nilable(String)) } + attr_accessor :fbclid + + # Facebook browser pixel ID. + sig { returns(T.nilable(String)) } + attr_accessor :fbp + + # Google Analytics client ID. + sig { returns(T.nilable(String)) } + attr_accessor :ga + + # Google click ID. + sig { returns(T.nilable(String)) } + attr_accessor :gclid + + # Instagram session ID. + sig { returns(T.nilable(String)) } + attr_accessor :ig_sid + + # IP address. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + + # TikTok click ID. + sig { returns(T.nilable(String)) } + attr_accessor :ttclid + + # TikTok pixel ID. + sig { returns(T.nilable(String)) } + attr_accessor :ttp + + # Browser user agent string. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + + # UTM campaign parameter. + sig { returns(T.nilable(String)) } + attr_accessor :utm_campaign + + # UTM content parameter. + sig { returns(T.nilable(String)) } + attr_accessor :utm_content + + # UTM ID parameter. + sig { returns(T.nilable(String)) } + attr_accessor :utm_id + + # UTM medium parameter. + sig { returns(T.nilable(String)) } + attr_accessor :utm_medium + + # UTM source parameter. + sig { returns(T.nilable(String)) } + attr_accessor :utm_source + + # UTM term parameter. + sig { returns(T.nilable(String)) } + attr_accessor :utm_term + + # Tracking and attribution context. + sig do + params( + ad_campaign_id: T.nilable(String), + ad_id: T.nilable(String), + ad_set_id: T.nilable(String), + fbclid: T.nilable(String), + fbp: T.nilable(String), + ga: T.nilable(String), + gclid: T.nilable(String), + ig_sid: T.nilable(String), + ip_address: T.nilable(String), + ttclid: T.nilable(String), + ttp: T.nilable(String), + user_agent: T.nilable(String), + utm_campaign: T.nilable(String), + utm_content: T.nilable(String), + utm_id: T.nilable(String), + utm_medium: T.nilable(String), + utm_source: T.nilable(String), + utm_term: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Ad campaign ID. + ad_campaign_id: nil, + # Ad ID. + ad_id: nil, + # Ad set ID. + ad_set_id: nil, + # Facebook click ID. + fbclid: nil, + # Facebook browser pixel ID. + fbp: nil, + # Google Analytics client ID. + ga: nil, + # Google click ID. + gclid: nil, + # Instagram session ID. + ig_sid: nil, + # IP address. + ip_address: nil, + # TikTok click ID. + ttclid: nil, + # TikTok pixel ID. + ttp: nil, + # Browser user agent string. + user_agent: nil, + # UTM campaign parameter. + utm_campaign: nil, + # UTM content parameter. + utm_content: nil, + # UTM ID parameter. + utm_id: nil, + # UTM medium parameter. + utm_medium: nil, + # UTM source parameter. + utm_source: nil, + # UTM term parameter. + utm_term: nil + ) + end + + sig do + override.returns( + { + ad_campaign_id: T.nilable(String), + ad_id: T.nilable(String), + ad_set_id: T.nilable(String), + fbclid: T.nilable(String), + fbp: T.nilable(String), + ga: T.nilable(String), + gclid: T.nilable(String), + ig_sid: T.nilable(String), + ip_address: T.nilable(String), + ttclid: T.nilable(String), + ttp: T.nilable(String), + user_agent: T.nilable(String), + utm_campaign: T.nilable(String), + utm_content: T.nilable(String), + utm_id: T.nilable(String), + utm_medium: T.nilable(String), + utm_source: T.nilable(String), + utm_term: T.nilable(String) + } + ) + end + def to_hash + end + end + + class User < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::ConversionCreateParams::User, + WhopSDK::Internal::AnyHash + ) + end + + # An anonymous identifier for the user. + sig { returns(T.nilable(String)) } + attr_accessor :anonymous_id + + # Date of birth (YYYY-MM-DD). + sig { returns(T.nilable(String)) } + attr_accessor :birthdate + + # City. + sig { returns(T.nilable(String)) } + attr_accessor :city + + # Country. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + + # An external identifier for the user. + sig { returns(T.nilable(String)) } + attr_accessor :external_id + + # First name. + sig { returns(T.nilable(String)) } + attr_accessor :first_name + + # Gender + sig do + returns( + T.nilable(WhopSDK::ConversionCreateParams::User::Gender::OrSymbol) + ) + end + attr_accessor :gender + + # Last name. + sig { returns(T.nilable(String)) } + attr_accessor :last_name + + # The Whop member ID. + sig { returns(T.nilable(String)) } + attr_accessor :member_id + + # The Whop membership ID. + sig { returns(T.nilable(String)) } + attr_accessor :membership_id + + # Full display name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Phone number. + sig { returns(T.nilable(String)) } + attr_accessor :phone + + # Postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + + # State or region. + sig { returns(T.nilable(String)) } + attr_accessor :state + + # The Whop user ID. + sig { returns(T.nilable(String)) } + attr_accessor :user_id + + # Username. + sig { returns(T.nilable(String)) } + attr_accessor :username + + # User identity and profile data. + sig do + params( + anonymous_id: T.nilable(String), + birthdate: T.nilable(String), + city: T.nilable(String), + country: T.nilable(String), + email: T.nilable(String), + external_id: T.nilable(String), + first_name: T.nilable(String), + gender: + T.nilable( + WhopSDK::ConversionCreateParams::User::Gender::OrSymbol + ), + last_name: T.nilable(String), + member_id: T.nilable(String), + membership_id: T.nilable(String), + name: T.nilable(String), + phone: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String), + user_id: T.nilable(String), + username: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # An anonymous identifier for the user. + anonymous_id: nil, + # Date of birth (YYYY-MM-DD). + birthdate: nil, + # City. + city: nil, + # Country. + country: nil, + # Email address. + email: nil, + # An external identifier for the user. + external_id: nil, + # First name. + first_name: nil, + # Gender + gender: nil, + # Last name. + last_name: nil, + # The Whop member ID. + member_id: nil, + # The Whop membership ID. + membership_id: nil, + # Full display name. + name: nil, + # Phone number. + phone: nil, + # Postal code. + postal_code: nil, + # State or region. + state: nil, + # The Whop user ID. + user_id: nil, + # Username. + username: nil + ) + end + + sig do + override.returns( + { + anonymous_id: T.nilable(String), + birthdate: T.nilable(String), + city: T.nilable(String), + country: T.nilable(String), + email: T.nilable(String), + external_id: T.nilable(String), + first_name: T.nilable(String), + gender: + T.nilable( + WhopSDK::ConversionCreateParams::User::Gender::OrSymbol + ), + last_name: T.nilable(String), + member_id: T.nilable(String), + membership_id: T.nilable(String), + name: T.nilable(String), + phone: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String), + user_id: T.nilable(String), + username: T.nilable(String) + } + ) + end + def to_hash + end + + # Gender + module Gender + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::ConversionCreateParams::User::Gender) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MALE = + T.let( + :male, + WhopSDK::ConversionCreateParams::User::Gender::TaggedSymbol + ) + FEMALE = + T.let( + :female, + WhopSDK::ConversionCreateParams::User::Gender::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::ConversionCreateParams::User::Gender::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/whop_sdk/models/conversion_create_response.rbi b/rbi/whop_sdk/models/conversion_create_response.rbi new file mode 100644 index 00000000..5a7624bb --- /dev/null +++ b/rbi/whop_sdk/models/conversion_create_response.rbi @@ -0,0 +1,31 @@ +# typed: strong + +module WhopSDK + module Models + class ConversionCreateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::ConversionCreateResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the conversion + sig { returns(String) } + attr_accessor :id + + # A tracked conversion event + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the conversion + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/currency.rbi b/rbi/whop_sdk/models/currency.rbi index 86af0442..46f09eed 100644 --- a/rbi/whop_sdk/models/currency.rbi +++ b/rbi/whop_sdk/models/currency.rbi @@ -95,6 +95,7 @@ module WhopSDK BTC = T.let(:btc, WhopSDK::Currency::TaggedSymbol) CNY = T.let(:cny, WhopSDK::Currency::TaggedSymbol) USDT = T.let(:usdt, WhopSDK::Currency::TaggedSymbol) + KZT = T.let(:kzt, WhopSDK::Currency::TaggedSymbol) sig { override.returns(T::Array[WhopSDK::Currency::TaggedSymbol]) } def self.values diff --git a/rbi/whop_sdk/models/file_create_params.rbi b/rbi/whop_sdk/models/file_create_params.rbi index 78590fd1..898ddf51 100644 --- a/rbi/whop_sdk/models/file_create_params.rbi +++ b/rbi/whop_sdk/models/file_create_params.rbi @@ -16,9 +16,18 @@ module WhopSDK sig { returns(String) } attr_accessor :filename + # Controls whether an uploaded file is publicly accessible or requires + # authentication to access. + sig do + returns(T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol)) + end + attr_accessor :visibility + sig do params( filename: String, + visibility: + T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -26,17 +35,48 @@ module WhopSDK # The name of the file including its extension (e.g., "photo.png" or # "document.pdf"). filename:, + # Controls whether an uploaded file is publicly accessible or requires + # authentication to access. + visibility: nil, request_options: {} ) end sig do override.returns( - { filename: String, request_options: WhopSDK::RequestOptions } + { + filename: String, + visibility: + T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol), + request_options: WhopSDK::RequestOptions + } ) end def to_hash end + + # Controls whether an uploaded file is publicly accessible or requires + # authentication to access. + module Visibility + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::FileCreateParams::Visibility) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PUBLIC = + T.let(:public, WhopSDK::FileCreateParams::Visibility::TaggedSymbol) + PRIVATE = + T.let(:private, WhopSDK::FileCreateParams::Visibility::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::FileCreateParams::Visibility::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/whop_sdk/models/file_create_response.rbi b/rbi/whop_sdk/models/file_create_response.rbi index 2fb8c96a..fe62933b 100644 --- a/rbi/whop_sdk/models/file_create_response.rbi +++ b/rbi/whop_sdk/models/file_create_response.rbi @@ -38,10 +38,18 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :upload_url - # The CDN URL for accessing the file. Null if the file has not finished uploading. + # The URL for accessing the file. For public files, this is a permanent CDN URL. + # For private files, this is a signed URL that expires. Null if the file has not + # finished uploading. sig { returns(T.nilable(String)) } attr_accessor :url + # Whether the file is publicly accessible or requires authentication. + sig do + returns(WhopSDK::Models::FileCreateResponse::Visibility::TaggedSymbol) + end + attr_accessor :visibility + # A file that has been uploaded or is pending upload. sig do params( @@ -52,7 +60,8 @@ module WhopSDK upload_headers: T.nilable(T::Hash[Symbol, T.anything]), upload_status: WhopSDK::UploadStatus::OrSymbol, upload_url: T.nilable(String), - url: T.nilable(String) + url: T.nilable(String), + visibility: WhopSDK::Models::FileCreateResponse::Visibility::OrSymbol ).returns(T.attached_class) end def self.new( @@ -72,8 +81,12 @@ module WhopSDK # The presigned URL to upload the file contents to. Only present in the response # from the create mutation. upload_url:, - # The CDN URL for accessing the file. Null if the file has not finished uploading. - url: + # The URL for accessing the file. For public files, this is a permanent CDN URL. + # For private files, this is a signed URL that expires. Null if the file has not + # finished uploading. + url:, + # Whether the file is publicly accessible or requires authentication. + visibility: ) end @@ -87,12 +100,46 @@ module WhopSDK upload_headers: T.nilable(T::Hash[Symbol, T.anything]), upload_status: WhopSDK::UploadStatus::TaggedSymbol, upload_url: T.nilable(String), - url: T.nilable(String) + url: T.nilable(String), + visibility: + WhopSDK::Models::FileCreateResponse::Visibility::TaggedSymbol } ) end def to_hash end + + # Whether the file is publicly accessible or requires authentication. + module Visibility + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::FileCreateResponse::Visibility) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PUBLIC = + T.let( + :public, + WhopSDK::Models::FileCreateResponse::Visibility::TaggedSymbol + ) + PRIVATE = + T.let( + :private, + WhopSDK::Models::FileCreateResponse::Visibility::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::FileCreateResponse::Visibility::TaggedSymbol + ] + ) + end + def self.values + end + end end end end diff --git a/rbi/whop_sdk/models/file_retrieve_response.rbi b/rbi/whop_sdk/models/file_retrieve_response.rbi index 0b09690d..aea58c37 100644 --- a/rbi/whop_sdk/models/file_retrieve_response.rbi +++ b/rbi/whop_sdk/models/file_retrieve_response.rbi @@ -31,10 +31,18 @@ module WhopSDK sig { returns(WhopSDK::UploadStatus::TaggedSymbol) } attr_accessor :upload_status - # The CDN URL for accessing the file. Null if the file has not finished uploading. + # The URL for accessing the file. For public files, this is a permanent CDN URL. + # For private files, this is a signed URL that expires. Null if the file has not + # finished uploading. sig { returns(T.nilable(String)) } attr_accessor :url + # Whether the file is publicly accessible or requires authentication. + sig do + returns(WhopSDK::Models::FileRetrieveResponse::Visibility::TaggedSymbol) + end + attr_accessor :visibility + # A file that has been uploaded or is pending upload. sig do params( @@ -43,7 +51,9 @@ module WhopSDK filename: T.nilable(String), size: T.nilable(String), upload_status: WhopSDK::UploadStatus::OrSymbol, - url: T.nilable(String) + url: T.nilable(String), + visibility: + WhopSDK::Models::FileRetrieveResponse::Visibility::OrSymbol ).returns(T.attached_class) end def self.new( @@ -57,8 +67,12 @@ module WhopSDK size:, # The current upload status of the file (e.g., pending, ready). upload_status:, - # The CDN URL for accessing the file. Null if the file has not finished uploading. - url: + # The URL for accessing the file. For public files, this is a permanent CDN URL. + # For private files, this is a signed URL that expires. Null if the file has not + # finished uploading. + url:, + # Whether the file is publicly accessible or requires authentication. + visibility: ) end @@ -70,12 +84,46 @@ module WhopSDK filename: T.nilable(String), size: T.nilable(String), upload_status: WhopSDK::UploadStatus::TaggedSymbol, - url: T.nilable(String) + url: T.nilable(String), + visibility: + WhopSDK::Models::FileRetrieveResponse::Visibility::TaggedSymbol } ) end def to_hash end + + # Whether the file is publicly accessible or requires authentication. + module Visibility + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::FileRetrieveResponse::Visibility) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PUBLIC = + T.let( + :public, + WhopSDK::Models::FileRetrieveResponse::Visibility::TaggedSymbol + ) + PRIVATE = + T.let( + :private, + WhopSDK::Models::FileRetrieveResponse::Visibility::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::FileRetrieveResponse::Visibility::TaggedSymbol + ] + ) + end + def self.values + end + end end end end diff --git a/rbi/whop_sdk/models/forum_post_list_params.rbi b/rbi/whop_sdk/models/forum_post_list_params.rbi index b6c70e6d..06eabb7e 100644 --- a/rbi/whop_sdk/models/forum_post_list_params.rbi +++ b/rbi/whop_sdk/models/forum_post_list_params.rbi @@ -27,6 +27,10 @@ module WhopSDK sig { returns(T.nilable(Integer)) } attr_accessor :first + # Whether to include top-level bounty discussion anchors as rich forum items. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :include_bounty_anchors + # Returns the last _n_ elements from the list. sig { returns(T.nilable(Integer)) } attr_accessor :last @@ -47,6 +51,7 @@ module WhopSDK after: T.nilable(String), before: T.nilable(String), first: T.nilable(Integer), + include_bounty_anchors: T.nilable(T::Boolean), last: T.nilable(Integer), parent_id: T.nilable(String), pinned: T.nilable(T::Boolean), @@ -62,6 +67,8 @@ module WhopSDK before: nil, # Returns the first _n_ elements from the list. first: nil, + # Whether to include top-level bounty discussion anchors as rich forum items. + include_bounty_anchors: nil, # Returns the last _n_ elements from the list. last: nil, # The unique identifier of a parent post to list comments for. When set, returns @@ -81,6 +88,7 @@ module WhopSDK after: T.nilable(String), before: T.nilable(String), first: T.nilable(Integer), + include_bounty_anchors: T.nilable(T::Boolean), last: T.nilable(Integer), parent_id: T.nilable(String), pinned: T.nilable(T::Boolean), diff --git a/rbi/whop_sdk/models/invoice_create_params.rbi b/rbi/whop_sdk/models/invoice_create_params.rbi index e2c126fe..4269b098 100644 --- a/rbi/whop_sdk/models/invoice_create_params.rbi +++ b/rbi/whop_sdk/models/invoice_create_params.rbi @@ -628,7 +628,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # The explicit payment method configuration for the plan. If not provided, the @@ -637,7 +637,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -652,7 +652,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -661,7 +661,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end @@ -1419,7 +1419,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # The explicit payment method configuration for the plan. If not provided, the @@ -1428,7 +1428,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -1443,7 +1443,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -1452,7 +1452,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end diff --git a/rbi/whop_sdk/models/invoice_update_params.rbi b/rbi/whop_sdk/models/invoice_update_params.rbi index 86c4b2dc..8424f46c 100644 --- a/rbi/whop_sdk/models/invoice_update_params.rbi +++ b/rbi/whop_sdk/models/invoice_update_params.rbi @@ -615,7 +615,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # The explicit payment method configuration for the plan. If not provided, the @@ -624,7 +624,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -639,7 +639,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -648,7 +648,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end diff --git a/rbi/whop_sdk/models/membership.rbi b/rbi/whop_sdk/models/membership.rbi index 14fd49bf..b2f2c86a 100644 --- a/rbi/whop_sdk/models/membership.rbi +++ b/rbi/whop_sdk/models/membership.rbi @@ -30,6 +30,12 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :cancellation_reason + # The ID of the checkout session/configuration that produced this membership, if + # any. Use this to map memberships back to the checkout configuration that created + # them. + sig { returns(T.nilable(String)) } + attr_accessor :checkout_configuration_id + # The company this membership belongs to. sig { returns(WhopSDK::Membership::Company) } attr_reader :company @@ -146,6 +152,7 @@ module WhopSDK cancel_option: T.nilable(WhopSDK::CancelOptions::OrSymbol), canceled_at: T.nilable(Time), cancellation_reason: T.nilable(String), + checkout_configuration_id: T.nilable(String), company: WhopSDK::Membership::Company::OrHash, created_at: Time, currency: T.nilable(WhopSDK::Currency::OrSymbol), @@ -182,6 +189,10 @@ module WhopSDK # Free-text explanation provided by the customer when canceling. Null if the # customer did not provide a reason. cancellation_reason:, + # The ID of the checkout session/configuration that produced this membership, if + # any. Use this to map memberships back to the checkout configuration that created + # them. + checkout_configuration_id:, # The company this membership belongs to. company:, # The datetime the membership was created. @@ -240,6 +251,7 @@ module WhopSDK cancel_option: T.nilable(WhopSDK::CancelOptions::TaggedSymbol), canceled_at: T.nilable(Time), cancellation_reason: T.nilable(String), + checkout_configuration_id: T.nilable(String), company: WhopSDK::Membership::Company, created_at: Time, currency: T.nilable(WhopSDK::Currency::TaggedSymbol), diff --git a/rbi/whop_sdk/models/membership_list_response.rbi b/rbi/whop_sdk/models/membership_list_response.rbi index f0c2db61..d73e63a0 100644 --- a/rbi/whop_sdk/models/membership_list_response.rbi +++ b/rbi/whop_sdk/models/membership_list_response.rbi @@ -35,6 +35,12 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :cancellation_reason + # The ID of the checkout session/configuration that produced this membership, if + # any. Use this to map memberships back to the checkout configuration that created + # them. + sig { returns(T.nilable(String)) } + attr_accessor :checkout_configuration_id + # The company this membership belongs to. sig { returns(WhopSDK::Models::MembershipListResponse::Company) } attr_reader :company @@ -170,6 +176,7 @@ module WhopSDK cancel_option: T.nilable(WhopSDK::CancelOptions::OrSymbol), canceled_at: T.nilable(Time), cancellation_reason: T.nilable(String), + checkout_configuration_id: T.nilable(String), company: WhopSDK::Models::MembershipListResponse::Company::OrHash, created_at: Time, currency: T.nilable(WhopSDK::Currency::OrSymbol), @@ -208,6 +215,10 @@ module WhopSDK # Free-text explanation provided by the customer when canceling. Null if the # customer did not provide a reason. cancellation_reason:, + # The ID of the checkout session/configuration that produced this membership, if + # any. Use this to map memberships back to the checkout configuration that created + # them. + checkout_configuration_id:, # The company this membership belongs to. company:, # The datetime the membership was created. @@ -263,6 +274,7 @@ module WhopSDK cancel_option: T.nilable(WhopSDK::CancelOptions::TaggedSymbol), canceled_at: T.nilable(Time), cancellation_reason: T.nilable(String), + checkout_configuration_id: T.nilable(String), company: WhopSDK::Models::MembershipListResponse::Company, created_at: Time, currency: T.nilable(WhopSDK::Currency::TaggedSymbol), diff --git a/rbi/whop_sdk/models/payment.rbi b/rbi/whop_sdk/models/payment.rbi index 1e33ee7e..7937920c 100644 --- a/rbi/whop_sdk/models/payment.rbi +++ b/rbi/whop_sdk/models/payment.rbi @@ -53,6 +53,11 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :card_last4 + # The ID of the checkout session/configuration that produced this payment, if any. + # Use this to map payments back to the checkout configuration that created them. + sig { returns(T.nilable(String)) } + attr_accessor :checkout_configuration_id + # The company for the payment. sig { returns(T.nilable(WhopSDK::Payment::Company)) } attr_reader :company @@ -193,6 +198,22 @@ module WhopSDK sig { returns(T::Boolean) } attr_accessor :retryable + # The payment amount in the creator's settlement currency (what the creator priced + # in). Equal to final_amount for single-currency payments. + sig { returns(Float) } + attr_accessor :settlement_amount + + # The currency in which the creator receives payouts and fees are charged (e.g., + # 'usd', 'eur'). For multi-currency payments this differs from the payment + # currency. + sig { returns(String) } + attr_accessor :settlement_currency + + # The locked exchange rate used to convert from the buyer's payment currency to + # the creator's settlement currency. Null for single-currency payments. + sig { returns(T.nilable(Float)) } + attr_accessor :settlement_exchange_rate + # The status of a receipt sig { returns(T.nilable(WhopSDK::ReceiptStatus::TaggedSymbol)) } attr_accessor :status @@ -254,6 +275,7 @@ module WhopSDK billing_reason: T.nilable(WhopSDK::BillingReasons::OrSymbol), card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol), card_last4: T.nilable(String), + checkout_configuration_id: T.nilable(String), company: T.nilable(WhopSDK::Payment::Company::OrHash), created_at: Time, currency: T.nilable(WhopSDK::Currency::OrSymbol), @@ -281,6 +303,9 @@ module WhopSDK resolutions: T.nilable(T::Array[WhopSDK::Payment::Resolution::OrHash]), retryable: T::Boolean, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: T.nilable(Float), status: T.nilable(WhopSDK::ReceiptStatus::OrSymbol), substatus: WhopSDK::FriendlyReceiptStatus::OrSymbol, subtotal: T.nilable(Float), @@ -312,6 +337,9 @@ module WhopSDK # The last four digits of the card used to make this payment. Null if the payment # was not made with a card. card_last4:, + # The ID of the checkout session/configuration that produced this payment, if any. + # Use this to map payments back to the checkout configuration that created them. + checkout_configuration_id:, # The company for the payment. company:, # The datetime the payment was created. @@ -373,6 +401,16 @@ module WhopSDK # retry-eligible states (`active`, `trialing`, `completed`, or `past_due`); # otherwise false. Used to decide if Whop can attempt the charge again. retryable:, + # The payment amount in the creator's settlement currency (what the creator priced + # in). Equal to final_amount for single-currency payments. + settlement_amount:, + # The currency in which the creator receives payouts and fees are charged (e.g., + # 'usd', 'eur'). For multi-currency payments this differs from the payment + # currency. + settlement_currency:, + # The locked exchange rate used to convert from the buyer's payment currency to + # the creator's settlement currency. Null for single-currency payments. + settlement_exchange_rate:, # The status of a receipt status:, # The friendly status of the payment. @@ -411,6 +449,7 @@ module WhopSDK billing_reason: T.nilable(WhopSDK::BillingReasons::TaggedSymbol), card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), card_last4: T.nilable(String), + checkout_configuration_id: T.nilable(String), company: T.nilable(WhopSDK::Payment::Company), created_at: Time, currency: T.nilable(WhopSDK::Currency::TaggedSymbol), @@ -438,6 +477,9 @@ module WhopSDK refunded_at: T.nilable(Time), resolutions: T.nilable(T::Array[WhopSDK::Payment::Resolution]), retryable: T::Boolean, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: T.nilable(Float), status: T.nilable(WhopSDK::ReceiptStatus::TaggedSymbol), substatus: WhopSDK::FriendlyReceiptStatus::TaggedSymbol, subtotal: T.nilable(Float), diff --git a/rbi/whop_sdk/models/payment_list_response.rbi b/rbi/whop_sdk/models/payment_list_response.rbi index eae34285..5647a48f 100644 --- a/rbi/whop_sdk/models/payment_list_response.rbi +++ b/rbi/whop_sdk/models/payment_list_response.rbi @@ -68,6 +68,11 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :card_last4 + # The ID of the checkout session/configuration that produced this payment, if any. + # Use this to map payments back to the checkout configuration that created them. + sig { returns(T.nilable(String)) } + attr_accessor :checkout_configuration_id + # The company for the payment. sig { returns(T.nilable(WhopSDK::Models::PaymentListResponse::Company)) } attr_reader :company @@ -221,6 +226,12 @@ module WhopSDK sig { returns(T::Boolean) } attr_accessor :retryable + # The currency in which the creator receives payouts and fees are charged (e.g., + # 'usd', 'eur'). For multi-currency payments this differs from the payment + # currency. + sig { returns(String) } + attr_accessor :settlement_currency + # The status of a receipt sig { returns(T.nilable(WhopSDK::ReceiptStatus::TaggedSymbol)) } attr_accessor :status @@ -288,6 +299,7 @@ module WhopSDK billing_reason: T.nilable(WhopSDK::BillingReasons::OrSymbol), card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol), card_last4: T.nilable(String), + checkout_configuration_id: T.nilable(String), company: T.nilable(WhopSDK::Models::PaymentListResponse::Company::OrHash), created_at: Time, @@ -317,6 +329,7 @@ module WhopSDK refunded_amount: T.nilable(Float), refunded_at: T.nilable(Time), retryable: T::Boolean, + settlement_currency: String, status: T.nilable(WhopSDK::ReceiptStatus::OrSymbol), substatus: WhopSDK::FriendlyReceiptStatus::OrSymbol, subtotal: T.nilable(Float), @@ -347,6 +360,9 @@ module WhopSDK # The last four digits of the card used to make this payment. Null if the payment # was not made with a card. card_last4:, + # The ID of the checkout session/configuration that produced this payment, if any. + # Use this to map payments back to the checkout configuration that created them. + checkout_configuration_id:, # The company for the payment. company:, # The datetime the payment was created. @@ -395,6 +411,10 @@ module WhopSDK # retry-eligible states (`active`, `trialing`, `completed`, or `past_due`); # otherwise false. Used to decide if Whop can attempt the charge again. retryable:, + # The currency in which the creator receives payouts and fees are charged (e.g., + # 'usd', 'eur'). For multi-currency payments this differs from the payment + # currency. + settlement_currency:, # The status of a receipt status:, # The friendly status of the payment. @@ -433,6 +453,7 @@ module WhopSDK billing_reason: T.nilable(WhopSDK::BillingReasons::TaggedSymbol), card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), card_last4: T.nilable(String), + checkout_configuration_id: T.nilable(String), company: T.nilable(WhopSDK::Models::PaymentListResponse::Company), created_at: Time, currency: T.nilable(WhopSDK::Currency::TaggedSymbol), @@ -458,6 +479,7 @@ module WhopSDK refunded_amount: T.nilable(Float), refunded_at: T.nilable(Time), retryable: T::Boolean, + settlement_currency: String, status: T.nilable(WhopSDK::ReceiptStatus::TaggedSymbol), substatus: WhopSDK::FriendlyReceiptStatus::TaggedSymbol, subtotal: T.nilable(Float), diff --git a/rbi/whop_sdk/models/payment_method_types.rbi b/rbi/whop_sdk/models/payment_method_types.rbi index 9ea029fe..fab741d6 100644 --- a/rbi/whop_sdk/models/payment_method_types.rbi +++ b/rbi/whop_sdk/models/payment_method_types.rbi @@ -58,6 +58,8 @@ module WhopSDK INTERAC = T.let(:interac, WhopSDK::PaymentMethodTypes::TaggedSymbol) KAKAO_PAY = T.let(:kakao_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) KLARNA = T.let(:klarna, WhopSDK::PaymentMethodTypes::TaggedSymbol) + KLARNA_PAY_NOW = + T.let(:klarna_pay_now, WhopSDK::PaymentMethodTypes::TaggedSymbol) KONBINI = T.let(:konbini, WhopSDK::PaymentMethodTypes::TaggedSymbol) KR_CARD = T.let(:kr_card, WhopSDK::PaymentMethodTypes::TaggedSymbol) KR_MARKET = T.let(:kr_market, WhopSDK::PaymentMethodTypes::TaggedSymbol) diff --git a/rbi/whop_sdk/models/payment_refund_params.rbi b/rbi/whop_sdk/models/payment_refund_params.rbi index 16ac9735..853e3593 100644 --- a/rbi/whop_sdk/models/payment_refund_params.rbi +++ b/rbi/whop_sdk/models/payment_refund_params.rbi @@ -14,8 +14,9 @@ module WhopSDK sig { returns(String) } attr_accessor :id - # The amount to refund in the payment currency. If omitted, the full payment - # amount is refunded. + # The amount to refund. For multi-currency payments, this is in the charge + # currency (what the buyer paid). For single-currency, this is in the payment + # currency. If omitted, the full payment amount is refunded. sig { returns(T.nilable(Float)) } attr_accessor :partial_amount @@ -28,8 +29,9 @@ module WhopSDK end def self.new( id:, - # The amount to refund in the payment currency. If omitted, the full payment - # amount is refunded. + # The amount to refund. For multi-currency payments, this is in the charge + # currency (what the buyer paid). For single-currency, this is in the payment + # currency. If omitted, the full payment amount is refunded. partial_amount: nil, request_options: {} ) diff --git a/rbi/whop_sdk/models/plan.rbi b/rbi/whop_sdk/models/plan.rbi index e64ae8ba..241c168e 100644 --- a/rbi/whop_sdk/models/plan.rbi +++ b/rbi/whop_sdk/models/plan.rbi @@ -9,6 +9,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + sig { returns(T::Boolean) } + attr_accessor :adaptive_pricing_enabled + # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. sig { returns(T.nilable(Integer)) } @@ -162,6 +167,7 @@ module WhopSDK sig do params( id: String, + adaptive_pricing_enabled: T::Boolean, billing_period: T.nilable(Integer), collect_tax: T::Boolean, company: T.nilable(WhopSDK::Plan::Company::OrHash), @@ -194,6 +200,9 @@ module WhopSDK def self.new( # The unique identifier for the plan. id:, + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + adaptive_pricing_enabled:, # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. billing_period:, @@ -279,6 +288,7 @@ module WhopSDK override.returns( { id: String, + adaptive_pricing_enabled: T::Boolean, billing_period: T.nilable(Integer), collect_tax: T::Boolean, company: T.nilable(WhopSDK::Plan::Company), diff --git a/rbi/whop_sdk/models/plan_create_params.rbi b/rbi/whop_sdk/models/plan_create_params.rbi index af23f952..a72e301e 100644 --- a/rbi/whop_sdk/models/plan_create_params.rbi +++ b/rbi/whop_sdk/models/plan_create_params.rbi @@ -19,6 +19,10 @@ module WhopSDK sig { returns(String) } attr_accessor :product_id + # Whether this plan accepts local currency payments via adaptive pricing. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :adaptive_pricing_enabled + # The number of days between recurring charges. For example, 30 for monthly or 365 # for yearly. sig { returns(T.nilable(Integer)) } @@ -146,6 +150,7 @@ module WhopSDK params( company_id: String, product_id: String, + adaptive_pricing_enabled: T.nilable(T::Boolean), billing_period: T.nilable(Integer), checkout_styling: T.nilable(WhopSDK::PlanCreateParams::CheckoutStyling::OrHash), @@ -180,6 +185,8 @@ module WhopSDK company_id:, # The unique identifier of the product to attach this plan to. product_id:, + # Whether this plan accepts local currency payments via adaptive pricing. + adaptive_pricing_enabled: nil, # The number of days between recurring charges. For example, 30 for monthly or 365 # for yearly. billing_period: nil, @@ -241,6 +248,7 @@ module WhopSDK { company_id: String, product_id: String, + adaptive_pricing_enabled: T.nilable(T::Boolean), billing_period: T.nilable(Integer), checkout_styling: T.nilable(WhopSDK::PlanCreateParams::CheckoutStyling), @@ -281,6 +289,11 @@ module WhopSDK ) end + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + sig { returns(T.nilable(String)) } + attr_accessor :background_color + # The different border-radius styles available for checkout pages. sig { returns(T.nilable(WhopSDK::CheckoutShape::OrSymbol)) } attr_accessor :border_style @@ -297,12 +310,16 @@ module WhopSDK # default. sig do params( + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) ).returns(T.attached_class) end def self.new( + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + background_color: nil, # The different border-radius styles available for checkout pages. border_style: nil, # A hex color code for the button color (e.g. #FF5733). @@ -315,6 +332,7 @@ module WhopSDK sig do override.returns( { + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) @@ -447,7 +465,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # Explicit payment method configuration for the plan. When not provided, the @@ -456,7 +474,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -471,7 +489,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -480,7 +498,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end diff --git a/rbi/whop_sdk/models/plan_list_response.rbi b/rbi/whop_sdk/models/plan_list_response.rbi index 37a3fd32..65aa756c 100644 --- a/rbi/whop_sdk/models/plan_list_response.rbi +++ b/rbi/whop_sdk/models/plan_list_response.rbi @@ -12,6 +12,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + sig { returns(T::Boolean) } + attr_accessor :adaptive_pricing_enabled + # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. sig { returns(T.nilable(Integer)) } @@ -170,6 +175,7 @@ module WhopSDK sig do params( id: String, + adaptive_pricing_enabled: T::Boolean, billing_period: T.nilable(Integer), company: T.nilable(WhopSDK::Models::PlanListResponse::Company::OrHash), @@ -204,6 +210,9 @@ module WhopSDK def self.new( # The unique identifier for the plan. id:, + # Whether the creator has turned on adaptive pricing for this plan. Raw setting — + # does not check processor compatibility or feature flags. + adaptive_pricing_enabled:, # The number of days between each recurring charge. Null for one-time plans. For # example, 30 for monthly or 365 for annual billing. billing_period:, @@ -280,6 +289,7 @@ module WhopSDK override.returns( { id: String, + adaptive_pricing_enabled: T::Boolean, billing_period: T.nilable(Integer), company: T.nilable(WhopSDK::Models::PlanListResponse::Company), created_at: Time, diff --git a/rbi/whop_sdk/models/plan_update_params.rbi b/rbi/whop_sdk/models/plan_update_params.rbi index 369a509c..750640e1 100644 --- a/rbi/whop_sdk/models/plan_update_params.rbi +++ b/rbi/whop_sdk/models/plan_update_params.rbi @@ -14,6 +14,10 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Whether this plan accepts local currency payments via adaptive pricing. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :adaptive_pricing_enabled + # The number of days between recurring charges. For example, 30 for monthly or 365 # for yearly. sig { returns(T.nilable(Integer)) } @@ -140,6 +144,7 @@ module WhopSDK sig do params( id: String, + adaptive_pricing_enabled: T.nilable(T::Boolean), billing_period: T.nilable(Integer), checkout_styling: T.nilable(WhopSDK::PlanUpdateParams::CheckoutStyling::OrHash), @@ -171,6 +176,8 @@ module WhopSDK end def self.new( id:, + # Whether this plan accepts local currency payments via adaptive pricing. + adaptive_pricing_enabled: nil, # The number of days between recurring charges. For example, 30 for monthly or 365 # for yearly. billing_period: nil, @@ -231,6 +238,7 @@ module WhopSDK override.returns( { id: String, + adaptive_pricing_enabled: T.nilable(T::Boolean), billing_period: T.nilable(Integer), checkout_styling: T.nilable(WhopSDK::PlanUpdateParams::CheckoutStyling), @@ -271,6 +279,11 @@ module WhopSDK ) end + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + sig { returns(T.nilable(String)) } + attr_accessor :background_color + # The different border-radius styles available for checkout pages. sig { returns(T.nilable(WhopSDK::CheckoutShape::OrSymbol)) } attr_accessor :border_style @@ -287,12 +300,16 @@ module WhopSDK # inherit from the company default. sig do params( + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) ).returns(T.attached_class) end def self.new( + # A hex color code for the checkout page background, applied to the order summary + # panel (e.g. #F4F4F5). + background_color: nil, # The different border-radius styles available for checkout pages. border_style: nil, # A hex color code for the button color (e.g. #FF5733). @@ -305,6 +322,7 @@ module WhopSDK sig do override.returns( { + background_color: T.nilable(String), border_style: T.nilable(WhopSDK::CheckoutShape::OrSymbol), button_color: T.nilable(String), font_family: T.nilable(WhopSDK::CheckoutFont::OrSymbol) @@ -437,7 +455,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - sig { returns(T::Boolean) } + sig { returns(T.nilable(T::Boolean)) } attr_accessor :include_platform_defaults # Explicit payment method configuration for the plan. Sending null removes any @@ -446,7 +464,7 @@ module WhopSDK params( disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( @@ -461,7 +479,7 @@ module WhopSDK # Whether Whop's platform default payment method enablement settings are included # in this configuration. The full list of default payment methods can be found in # the documentation at docs.whop.com/payments. - include_platform_defaults: + include_platform_defaults: nil ) end @@ -470,7 +488,7 @@ module WhopSDK { disabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], enabled: T::Array[WhopSDK::PaymentMethodTypes::OrSymbol], - include_platform_defaults: T::Boolean + include_platform_defaults: T.nilable(T::Boolean) } ) end diff --git a/rbi/whop_sdk/models/stat_describe_params.rbi b/rbi/whop_sdk/models/stat_describe_params.rbi new file mode 100644 index 00000000..5149d824 --- /dev/null +++ b/rbi/whop_sdk/models/stat_describe_params.rbi @@ -0,0 +1,61 @@ +# typed: strong + +module WhopSDK + module Models + class StatDescribeParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::StatDescribeParams, WhopSDK::Internal::AnyHash) + end + + # Scope query to a specific company. + sig { returns(T.nilable(String)) } + attr_accessor :company_id + + # Resource path using : as separator (e.g., 'receipts', 'payments:membership', + # 'receipts:gross_revenue'). + sig { returns(T.nilable(String)) } + attr_accessor :resource + + # Scope query to a specific user. + sig { returns(T.nilable(String)) } + attr_accessor :user_id + + sig do + params( + company_id: T.nilable(String), + resource: T.nilable(String), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Scope query to a specific company. + company_id: nil, + # Resource path using : as separator (e.g., 'receipts', 'payments:membership', + # 'receipts:gross_revenue'). + resource: nil, + # Scope query to a specific user. + user_id: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + company_id: T.nilable(String), + resource: T.nilable(String), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/stat_describe_response.rbi b/rbi/whop_sdk/models/stat_describe_response.rbi new file mode 100644 index 00000000..a18ea08c --- /dev/null +++ b/rbi/whop_sdk/models/stat_describe_response.rbi @@ -0,0 +1,974 @@ +# typed: strong + +module WhopSDK + module Models + # Root schema description showing available nodes, views, and metrics. + module StatDescribeResponse + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.nilable( + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeRoot, + WhopSDK::Models::StatDescribeResponse::DescribeNode, + WhopSDK::Models::StatDescribeResponse::DescribeMetric, + WhopSDK::Models::StatDescribeResponse::DescribeView + ) + ) + end + + class DescribeRoot < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeRoot, + WhopSDK::Internal::AnyHash + ) + end + + # Debug information. + sig do + returns( + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug + ) + ) + end + attr_reader :debug + + sig do + params( + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug::OrHash + ) + ).void + end + attr_writer :debug + + # Available metrics. + sig do + returns( + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric + ] + ) + end + attr_accessor :metrics + + # Available root nodes. + sig { returns(T::Array[String]) } + attr_accessor :nodes + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Available API resource views. + sig { returns(T::Array[String]) } + attr_accessor :views + + # Root schema description showing available nodes, views, and metrics. + sig do + params( + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug::OrHash + ), + metrics: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric::OrHash + ], + nodes: T::Array[String], + views: T::Array[String], + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Debug information. + debug:, + # Available metrics. + metrics:, + # Available root nodes. + nodes:, + # Available API resource views. + views:, + # The typename of this object + typename: :DescribeRoot + ) + end + + sig do + override.returns( + { + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug + ), + metrics: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric + ], + nodes: T::Array[String], + typename: Symbol, + views: T::Array[String] + } + ) + end + def to_hash + end + + class Debug < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug, + WhopSDK::Internal::AnyHash + ) + end + + # Unique request identifier for debugging. + sig { returns(T.nilable(String)) } + attr_accessor :request_id + + # Debug information. + sig do + params(request_id: T.nilable(String)).returns(T.attached_class) + end + def self.new( + # Unique request identifier for debugging. + request_id: + ) + end + + sig { override.returns({ request_id: T.nilable(String) }) } + def to_hash + end + end + + class Metric < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric, + WhopSDK::Internal::AnyHash + ) + end + + # The metric name. + sig { returns(String) } + attr_accessor :name + + # The node path this metric operates on. + sig { returns(String) } + attr_accessor :node_path + + # Query engines that support this metric. + sig { returns(T::Array[String]) } + attr_accessor :supported_engines + + # A metric available for querying. + sig do + params( + name: String, + node_path: String, + supported_engines: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The metric name. + name:, + # The node path this metric operates on. + node_path:, + # Query engines that support this metric. + supported_engines: + ) + end + + sig do + override.returns( + { + name: String, + node_path: String, + supported_engines: T::Array[String] + } + ) + end + def to_hash + end + end + end + + class DescribeNode < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeNode, + WhopSDK::Internal::AnyHash + ) + end + + # Available associations or child paths. + sig do + returns( + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeNode::Association + ] + ) + end + attr_accessor :associations + + # Available columns. + sig { returns(T::Array[String]) } + attr_accessor :columns + + # Debug information. + sig do + returns( + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug + ) + ) + end + attr_reader :debug + + sig do + params( + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug::OrHash + ) + ).void + end + attr_writer :debug + + # The query engine being used. + sig { returns(String) } + attr_accessor :engine + + # Available metrics for this node. + sig do + returns( + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric + ] + ) + end + attr_accessor :metrics + + # The node path being described. + sig { returns(String) } + attr_accessor :node + + # Sample data rows. + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :sample + + # Columns that can be used for sorting. + sig { returns(T::Array[String]) } + attr_accessor :sortable_columns + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Description of a node (model) including its columns and associations. + sig do + params( + associations: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeNode::Association::OrHash + ], + columns: T::Array[String], + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug::OrHash + ), + engine: String, + metrics: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric::OrHash + ], + node: String, + sample: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + sortable_columns: T::Array[String], + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Available associations or child paths. + associations:, + # Available columns. + columns:, + # Debug information. + debug:, + # The query engine being used. + engine:, + # Available metrics for this node. + metrics:, + # The node path being described. + node:, + # Sample data rows. + sample:, + # Columns that can be used for sorting. + sortable_columns:, + # The typename of this object + typename: :DescribeNode + ) + end + + sig do + override.returns( + { + associations: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeNode::Association + ], + columns: T::Array[String], + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug + ), + engine: String, + metrics: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric + ], + node: String, + sample: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + sortable_columns: T::Array[String], + typename: Symbol + } + ) + end + def to_hash + end + + class Association < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeNode::Association, + WhopSDK::Internal::AnyHash + ) + end + + # The event name (for event type). + sig { returns(T.nilable(String)) } + attr_accessor :event_name + + # The associated model class name (for model associations). + sig { returns(T.nilable(String)) } + attr_accessor :model + + # The association name. + sig { returns(String) } + attr_accessor :name + + # The full path (for event associations). + sig { returns(T.nilable(String)) } + attr_accessor :path + + # The type (belongs_to, has_many, has_one, event, namespace). + sig { returns(String) } + attr_accessor :type + + # An association or child path available for navigation. + sig do + params( + event_name: T.nilable(String), + model: T.nilable(String), + name: String, + path: T.nilable(String), + type: String + ).returns(T.attached_class) + end + def self.new( + # The event name (for event type). + event_name:, + # The associated model class name (for model associations). + model:, + # The association name. + name:, + # The full path (for event associations). + path:, + # The type (belongs_to, has_many, has_one, event, namespace). + type: + ) + end + + sig do + override.returns( + { + event_name: T.nilable(String), + model: T.nilable(String), + name: String, + path: T.nilable(String), + type: String + } + ) + end + def to_hash + end + end + + class Debug < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug, + WhopSDK::Internal::AnyHash + ) + end + + # Unique request identifier for debugging. + sig { returns(T.nilable(String)) } + attr_accessor :request_id + + # Debug information. + sig do + params(request_id: T.nilable(String)).returns(T.attached_class) + end + def self.new( + # Unique request identifier for debugging. + request_id: + ) + end + + sig { override.returns({ request_id: T.nilable(String) }) } + def to_hash + end + end + + class Metric < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric, + WhopSDK::Internal::AnyHash + ) + end + + # The metric name. + sig { returns(String) } + attr_accessor :name + + # The node path this metric operates on. + sig { returns(String) } + attr_accessor :node_path + + # Query engines that support this metric. + sig { returns(T::Array[String]) } + attr_accessor :supported_engines + + # A metric available for querying. + sig do + params( + name: String, + node_path: String, + supported_engines: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The metric name. + name:, + # The node path this metric operates on. + node_path:, + # Query engines that support this metric. + supported_engines: + ) + end + + sig do + override.returns( + { + name: String, + node_path: String, + supported_engines: T::Array[String] + } + ) + end + def to_hash + end + end + end + + class DescribeMetric < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeMetric, + WhopSDK::Internal::AnyHash + ) + end + + # Columns that can be used for breakdowns. + sig { returns(T::Array[String]) } + attr_accessor :breakdownable_columns + + # Debug information. + sig do + returns( + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug + ) + ) + end + attr_reader :debug + + sig do + params( + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug::OrHash + ) + ).void + end + attr_writer :debug + + # The query engine being used. + sig { returns(String) } + attr_accessor :engine + + # Columns that can be used for filtering. + sig { returns(T::Array[String]) } + attr_accessor :filterable_columns + + # The metric name. + sig { returns(String) } + attr_accessor :metric + + # The node path this metric operates on. + sig { returns(String) } + attr_accessor :node + + # The generated SQL query. + sig { returns(T.nilable(String)) } + attr_accessor :sql + + # Query engines that support this metric. + sig { returns(T::Array[String]) } + attr_accessor :supported_engines + + # The timestamp column used for time filtering. + sig { returns(String) } + attr_accessor :timestamp_column + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Description of a metric including its configuration and SQL. + sig do + params( + breakdownable_columns: T::Array[String], + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug::OrHash + ), + engine: String, + filterable_columns: T::Array[String], + metric: String, + node: String, + sql: T.nilable(String), + supported_engines: T::Array[String], + timestamp_column: String, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Columns that can be used for breakdowns. + breakdownable_columns:, + # Debug information. + debug:, + # The query engine being used. + engine:, + # Columns that can be used for filtering. + filterable_columns:, + # The metric name. + metric:, + # The node path this metric operates on. + node:, + # The generated SQL query. + sql:, + # Query engines that support this metric. + supported_engines:, + # The timestamp column used for time filtering. + timestamp_column:, + # The typename of this object + typename: :DescribeMetric + ) + end + + sig do + override.returns( + { + breakdownable_columns: T::Array[String], + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug + ), + engine: String, + filterable_columns: T::Array[String], + metric: String, + node: String, + sql: T.nilable(String), + supported_engines: T::Array[String], + timestamp_column: String, + typename: Symbol + } + ) + end + def to_hash + end + + class Debug < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug, + WhopSDK::Internal::AnyHash + ) + end + + # Unique request identifier for debugging. + sig { returns(T.nilable(String)) } + attr_accessor :request_id + + # Debug information. + sig do + params(request_id: T.nilable(String)).returns(T.attached_class) + end + def self.new( + # Unique request identifier for debugging. + request_id: + ) + end + + sig { override.returns({ request_id: T.nilable(String) }) } + def to_hash + end + end + end + + class DescribeView < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeView, + WhopSDK::Internal::AnyHash + ) + end + + # Available associations. + sig do + returns( + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeView::Association + ] + ) + end + attr_accessor :associations + + # Available columns. + sig { returns(T::Array[String]) } + attr_accessor :columns + + # Debug information. + sig do + returns( + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeView::Debug + ) + ) + end + attr_reader :debug + + sig do + params( + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeView::Debug::OrHash + ) + ).void + end + attr_writer :debug + + # The query engine being used. + sig { returns(String) } + attr_accessor :engine + + # Available metrics. + sig do + returns( + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeView::Metric + ] + ) + end + attr_accessor :metrics + + # The underlying model class. + sig { returns(String) } + attr_accessor :model + + # The API resource name. + sig { returns(String) } + attr_accessor :resource + + # Sample data rows. + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :sample + + # Columns that can be used for sorting. + sig { returns(T::Array[String]) } + attr_accessor :sortable_columns + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # The view name being described. + sig { returns(String) } + attr_accessor :view + + # Description of an API resource view including its columns and associations. + sig do + params( + associations: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeView::Association::OrHash + ], + columns: T::Array[String], + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeView::Debug::OrHash + ), + engine: String, + metrics: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeView::Metric::OrHash + ], + model: String, + resource: String, + sample: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + sortable_columns: T::Array[String], + view: String, + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Available associations. + associations:, + # Available columns. + columns:, + # Debug information. + debug:, + # The query engine being used. + engine:, + # Available metrics. + metrics:, + # The underlying model class. + model:, + # The API resource name. + resource:, + # Sample data rows. + sample:, + # Columns that can be used for sorting. + sortable_columns:, + # The view name being described. + view:, + # The typename of this object + typename: :DescribeView + ) + end + + sig do + override.returns( + { + associations: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeView::Association + ], + columns: T::Array[String], + debug: + T.nilable( + WhopSDK::Models::StatDescribeResponse::DescribeView::Debug + ), + engine: String, + metrics: + T::Array[ + WhopSDK::Models::StatDescribeResponse::DescribeView::Metric + ], + model: String, + resource: String, + sample: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + sortable_columns: T::Array[String], + typename: Symbol, + view: String + } + ) + end + def to_hash + end + + class Association < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeView::Association, + WhopSDK::Internal::AnyHash + ) + end + + # The event name (for event type). + sig { returns(T.nilable(String)) } + attr_accessor :event_name + + # The associated model class name (for model associations). + sig { returns(T.nilable(String)) } + attr_accessor :model + + # The association name. + sig { returns(String) } + attr_accessor :name + + # The full path (for event associations). + sig { returns(T.nilable(String)) } + attr_accessor :path + + # The type (belongs_to, has_many, has_one, event, namespace). + sig { returns(String) } + attr_accessor :type + + # An association or child path available for navigation. + sig do + params( + event_name: T.nilable(String), + model: T.nilable(String), + name: String, + path: T.nilable(String), + type: String + ).returns(T.attached_class) + end + def self.new( + # The event name (for event type). + event_name:, + # The associated model class name (for model associations). + model:, + # The association name. + name:, + # The full path (for event associations). + path:, + # The type (belongs_to, has_many, has_one, event, namespace). + type: + ) + end + + sig do + override.returns( + { + event_name: T.nilable(String), + model: T.nilable(String), + name: String, + path: T.nilable(String), + type: String + } + ) + end + def to_hash + end + end + + class Debug < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeView::Debug, + WhopSDK::Internal::AnyHash + ) + end + + # Unique request identifier for debugging. + sig { returns(T.nilable(String)) } + attr_accessor :request_id + + # Debug information. + sig do + params(request_id: T.nilable(String)).returns(T.attached_class) + end + def self.new( + # Unique request identifier for debugging. + request_id: + ) + end + + sig { override.returns({ request_id: T.nilable(String) }) } + def to_hash + end + end + + class Metric < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatDescribeResponse::DescribeView::Metric, + WhopSDK::Internal::AnyHash + ) + end + + # The metric name. + sig { returns(String) } + attr_accessor :name + + # The node path this metric operates on. + sig { returns(String) } + attr_accessor :node_path + + # Query engines that support this metric. + sig { returns(T::Array[String]) } + attr_accessor :supported_engines + + # A metric available for querying. + sig do + params( + name: String, + node_path: String, + supported_engines: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The metric name. + name:, + # The node path this metric operates on. + node_path:, + # Query engines that support this metric. + supported_engines: + ) + end + + sig do + override.returns( + { + name: String, + node_path: String, + supported_engines: T::Array[String] + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[WhopSDK::Models::StatDescribeResponse::Variants] + ) + end + def self.variants + end + end + end +end diff --git a/rbi/whop_sdk/models/stat_query_metric_params.rbi b/rbi/whop_sdk/models/stat_query_metric_params.rbi new file mode 100644 index 00000000..58e3942e --- /dev/null +++ b/rbi/whop_sdk/models/stat_query_metric_params.rbi @@ -0,0 +1,111 @@ +# typed: strong + +module WhopSDK + module Models + class StatQueryMetricParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::StatQueryMetricParams, WhopSDK::Internal::AnyHash) + end + + # Metric resource using : as separator (e.g., 'receipts:gross_revenue', + # 'members:new_users'). + sig { returns(String) } + attr_accessor :resource + + # Columns to break down the metric by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :breakdowns + + # Scope query to a specific company. + sig { returns(T.nilable(String)) } + attr_accessor :company_id + + # Key-value pairs to filter the data. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :filters + + # Start of time range (unix timestamp). + sig { returns(T.nilable(Time)) } + attr_accessor :from + + # Time granularity (daily, weekly, monthly). + sig { returns(T.nilable(String)) } + attr_accessor :granularity + + # IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. + # Only applies to ClickHouse metrics. + sig { returns(T.nilable(String)) } + attr_accessor :time_zone + + # End of time range (unix timestamp). + sig { returns(T.nilable(Time)) } + attr_accessor :to + + # Scope query to a specific user. + sig { returns(T.nilable(String)) } + attr_accessor :user_id + + sig do + params( + resource: String, + breakdowns: T.nilable(T::Array[String]), + company_id: T.nilable(String), + filters: T.nilable(T::Hash[Symbol, T.anything]), + from: T.nilable(Time), + granularity: T.nilable(String), + time_zone: T.nilable(String), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Metric resource using : as separator (e.g., 'receipts:gross_revenue', + # 'members:new_users'). + resource:, + # Columns to break down the metric by. + breakdowns: nil, + # Scope query to a specific company. + company_id: nil, + # Key-value pairs to filter the data. + filters: nil, + # Start of time range (unix timestamp). + from: nil, + # Time granularity (daily, weekly, monthly). + granularity: nil, + # IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. + # Only applies to ClickHouse metrics. + time_zone: nil, + # End of time range (unix timestamp). + to: nil, + # Scope query to a specific user. + user_id: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + resource: String, + breakdowns: T.nilable(T::Array[String]), + company_id: T.nilable(String), + filters: T.nilable(T::Hash[Symbol, T.anything]), + from: T.nilable(Time), + granularity: T.nilable(String), + time_zone: T.nilable(String), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/stat_query_metric_response.rbi b/rbi/whop_sdk/models/stat_query_metric_response.rbi new file mode 100644 index 00000000..b167e5f7 --- /dev/null +++ b/rbi/whop_sdk/models/stat_query_metric_response.rbi @@ -0,0 +1,188 @@ +# typed: strong + +module WhopSDK + module Models + class StatQueryMetricResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatQueryMetricResponse, + WhopSDK::Internal::AnyHash + ) + end + + # Column names in the order they appear in each data row. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :columns + + # Array of data rows, where each row is an array of values matching the columns + # order. + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :data + + # Debug information including engine and SQL. + sig do + returns(T.nilable(WhopSDK::Models::StatQueryMetricResponse::Debug)) + end + attr_reader :debug + + sig do + params( + debug: + T.nilable(WhopSDK::Models::StatQueryMetricResponse::Debug::OrHash) + ).void + end + attr_writer :debug + + # The node path that was queried. + sig { returns(T.nilable(String)) } + attr_accessor :node + + # Pagination information. + sig do + returns(T.nilable(WhopSDK::Models::StatQueryMetricResponse::Pagination)) + end + attr_reader :pagination + + sig do + params( + pagination: + T.nilable( + WhopSDK::Models::StatQueryMetricResponse::Pagination::OrHash + ) + ).void + end + attr_writer :pagination + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Result from a stats query (raw, metric, or SQL). + sig do + params( + columns: T.nilable(T::Array[String]), + data: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + debug: + T.nilable(WhopSDK::Models::StatQueryMetricResponse::Debug::OrHash), + node: T.nilable(String), + pagination: + T.nilable( + WhopSDK::Models::StatQueryMetricResponse::Pagination::OrHash + ), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Column names in the order they appear in each data row. + columns:, + # Array of data rows, where each row is an array of values matching the columns + # order. + data:, + # Debug information including engine and SQL. + debug:, + # The node path that was queried. + node:, + # Pagination information. + pagination:, + # The typename of this object + typename: :Result + ) + end + + sig do + override.returns( + { + columns: T.nilable(T::Array[String]), + data: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + debug: T.nilable(WhopSDK::Models::StatQueryMetricResponse::Debug), + node: T.nilable(String), + pagination: + T.nilable(WhopSDK::Models::StatQueryMetricResponse::Pagination), + typename: Symbol + } + ) + end + def to_hash + end + + class Debug < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatQueryMetricResponse::Debug, + WhopSDK::Internal::AnyHash + ) + end + + # The query engine used. + sig { returns(T.nilable(String)) } + attr_accessor :engine + + # Unique request identifier for debugging. + sig { returns(T.nilable(String)) } + attr_accessor :request_id + + # The generated SQL query (with IDs sanitized). + sig { returns(T.nilable(String)) } + attr_accessor :sql + + # Debug information including engine and SQL. + sig do + params( + engine: T.nilable(String), + request_id: T.nilable(String), + sql: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The query engine used. + engine:, + # Unique request identifier for debugging. + request_id:, + # The generated SQL query (with IDs sanitized). + sql: + ) + end + + sig do + override.returns( + { + engine: T.nilable(String), + request_id: T.nilable(String), + sql: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Pagination < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatQueryMetricResponse::Pagination, + WhopSDK::Internal::AnyHash + ) + end + + # Cursor for the next page of results. + sig { returns(T.nilable(String)) } + attr_accessor :next_cursor + + # Pagination information. + sig { params(next_cursor: T.nilable(String)).returns(T.attached_class) } + def self.new( + # Cursor for the next page of results. + next_cursor: + ) + end + + sig { override.returns({ next_cursor: T.nilable(String) }) } + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/stat_query_raw_params.rbi b/rbi/whop_sdk/models/stat_query_raw_params.rbi new file mode 100644 index 00000000..e8786d1b --- /dev/null +++ b/rbi/whop_sdk/models/stat_query_raw_params.rbi @@ -0,0 +1,107 @@ +# typed: strong + +module WhopSDK + module Models + class StatQueryRawParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::StatQueryRawParams, WhopSDK::Internal::AnyHash) + end + + # Resource path using : as separator (e.g., 'members', 'payments:membership'). + sig { returns(String) } + attr_accessor :resource + + # Scope query to a specific company. + sig { returns(T.nilable(String)) } + attr_accessor :company_id + + # Pagination cursor for next page. + sig { returns(T.nilable(String)) } + attr_accessor :cursor + + # Start of time range (unix timestamp). + sig { returns(T.nilable(Time)) } + attr_accessor :from + + # Number of records to return (max 10000). + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + + # Column to sort by. + sig { returns(T.nilable(String)) } + attr_accessor :sort + + # The direction of the sort. + sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) } + attr_accessor :sort_direction + + # End of time range (unix timestamp). + sig { returns(T.nilable(Time)) } + attr_accessor :to + + # Scope query to a specific user. + sig { returns(T.nilable(String)) } + attr_accessor :user_id + + sig do + params( + resource: String, + company_id: T.nilable(String), + cursor: T.nilable(String), + from: T.nilable(Time), + limit: T.nilable(Integer), + sort: T.nilable(String), + sort_direction: T.nilable(WhopSDK::Direction::OrSymbol), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Resource path using : as separator (e.g., 'members', 'payments:membership'). + resource:, + # Scope query to a specific company. + company_id: nil, + # Pagination cursor for next page. + cursor: nil, + # Start of time range (unix timestamp). + from: nil, + # Number of records to return (max 10000). + limit: nil, + # Column to sort by. + sort: nil, + # The direction of the sort. + sort_direction: nil, + # End of time range (unix timestamp). + to: nil, + # Scope query to a specific user. + user_id: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + resource: String, + company_id: T.nilable(String), + cursor: T.nilable(String), + from: T.nilable(Time), + limit: T.nilable(Integer), + sort: T.nilable(String), + sort_direction: T.nilable(WhopSDK::Direction::OrSymbol), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/stat_query_raw_response.rbi b/rbi/whop_sdk/models/stat_query_raw_response.rbi new file mode 100644 index 00000000..975afa94 --- /dev/null +++ b/rbi/whop_sdk/models/stat_query_raw_response.rbi @@ -0,0 +1,173 @@ +# typed: strong + +module WhopSDK + module Models + class StatQueryRawResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatQueryRawResponse, + WhopSDK::Internal::AnyHash + ) + end + + # Column names in the order they appear in each data row. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :columns + + # Array of data rows, where each row is an array of values matching the columns + # order. + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :data + + # Debug information including engine and SQL. + sig { returns(T.nilable(WhopSDK::Models::StatQueryRawResponse::Debug)) } + attr_reader :debug + + sig do + params( + debug: T.nilable(WhopSDK::Models::StatQueryRawResponse::Debug::OrHash) + ).void + end + attr_writer :debug + + # The node path that was queried. + sig { returns(T.nilable(String)) } + attr_accessor :node + + # Pagination information. + sig do + returns(T.nilable(WhopSDK::Models::StatQueryRawResponse::Pagination)) + end + attr_reader :pagination + + sig do + params( + pagination: + T.nilable(WhopSDK::Models::StatQueryRawResponse::Pagination::OrHash) + ).void + end + attr_writer :pagination + + # Result from a stats query (raw, metric, or SQL). + sig do + params( + columns: T.nilable(T::Array[String]), + data: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + debug: + T.nilable(WhopSDK::Models::StatQueryRawResponse::Debug::OrHash), + node: T.nilable(String), + pagination: + T.nilable(WhopSDK::Models::StatQueryRawResponse::Pagination::OrHash) + ).returns(T.attached_class) + end + def self.new( + # Column names in the order they appear in each data row. + columns:, + # Array of data rows, where each row is an array of values matching the columns + # order. + data:, + # Debug information including engine and SQL. + debug:, + # The node path that was queried. + node:, + # Pagination information. + pagination: + ) + end + + sig do + override.returns( + { + columns: T.nilable(T::Array[String]), + data: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + debug: T.nilable(WhopSDK::Models::StatQueryRawResponse::Debug), + node: T.nilable(String), + pagination: + T.nilable(WhopSDK::Models::StatQueryRawResponse::Pagination) + } + ) + end + def to_hash + end + + class Debug < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatQueryRawResponse::Debug, + WhopSDK::Internal::AnyHash + ) + end + + # The query engine used. + sig { returns(T.nilable(String)) } + attr_accessor :engine + + # Unique request identifier for debugging. + sig { returns(T.nilable(String)) } + attr_accessor :request_id + + # The generated SQL query (with IDs sanitized). + sig { returns(T.nilable(String)) } + attr_accessor :sql + + # Debug information including engine and SQL. + sig do + params( + engine: T.nilable(String), + request_id: T.nilable(String), + sql: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The query engine used. + engine:, + # Unique request identifier for debugging. + request_id:, + # The generated SQL query (with IDs sanitized). + sql: + ) + end + + sig do + override.returns( + { + engine: T.nilable(String), + request_id: T.nilable(String), + sql: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Pagination < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatQueryRawResponse::Pagination, + WhopSDK::Internal::AnyHash + ) + end + + # Cursor for the next page of results. + sig { returns(T.nilable(String)) } + attr_accessor :next_cursor + + # Pagination information. + sig { params(next_cursor: T.nilable(String)).returns(T.attached_class) } + def self.new( + # Cursor for the next page of results. + next_cursor: + ) + end + + sig { override.returns({ next_cursor: T.nilable(String) }) } + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/stat_run_sql_params.rbi b/rbi/whop_sdk/models/stat_run_sql_params.rbi new file mode 100644 index 00000000..0d3a3c2a --- /dev/null +++ b/rbi/whop_sdk/models/stat_run_sql_params.rbi @@ -0,0 +1,115 @@ +# typed: strong + +module WhopSDK + module Models + class StatRunSqlParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::StatRunSqlParams, WhopSDK::Internal::AnyHash) + end + + # Resource path using : as separator (e.g., 'receipts', 'payments:membership'). + sig { returns(String) } + attr_accessor :resource + + # SQL query. Use SCOPED_DATA as the table name. + sig { returns(String) } + attr_accessor :sql + + # Scope query to a specific company. + sig { returns(T.nilable(String)) } + attr_accessor :company_id + + # Pagination cursor for next page. + sig { returns(T.nilable(String)) } + attr_accessor :cursor + + # Start of time range (unix timestamp). + sig { returns(T.nilable(Time)) } + attr_accessor :from + + # Number of records to return (max 10000). + sig { returns(T.nilable(Integer)) } + attr_accessor :limit + + # Column to sort by. + sig { returns(T.nilable(String)) } + attr_accessor :sort + + # The direction of the sort. + sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) } + attr_accessor :sort_direction + + # End of time range (unix timestamp). + sig { returns(T.nilable(Time)) } + attr_accessor :to + + # Scope query to a specific user. + sig { returns(T.nilable(String)) } + attr_accessor :user_id + + sig do + params( + resource: String, + sql: String, + company_id: T.nilable(String), + cursor: T.nilable(String), + from: T.nilable(Time), + limit: T.nilable(Integer), + sort: T.nilable(String), + sort_direction: T.nilable(WhopSDK::Direction::OrSymbol), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Resource path using : as separator (e.g., 'receipts', 'payments:membership'). + resource:, + # SQL query. Use SCOPED_DATA as the table name. + sql:, + # Scope query to a specific company. + company_id: nil, + # Pagination cursor for next page. + cursor: nil, + # Start of time range (unix timestamp). + from: nil, + # Number of records to return (max 10000). + limit: nil, + # Column to sort by. + sort: nil, + # The direction of the sort. + sort_direction: nil, + # End of time range (unix timestamp). + to: nil, + # Scope query to a specific user. + user_id: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + resource: String, + sql: String, + company_id: T.nilable(String), + cursor: T.nilable(String), + from: T.nilable(Time), + limit: T.nilable(Integer), + sort: T.nilable(String), + sort_direction: T.nilable(WhopSDK::Direction::OrSymbol), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/stat_run_sql_response.rbi b/rbi/whop_sdk/models/stat_run_sql_response.rbi new file mode 100644 index 00000000..c74aba8e --- /dev/null +++ b/rbi/whop_sdk/models/stat_run_sql_response.rbi @@ -0,0 +1,177 @@ +# typed: strong + +module WhopSDK + module Models + class StatRunSqlResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Models::StatRunSqlResponse, WhopSDK::Internal::AnyHash) + end + + # Column names in the order they appear in each data row. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :columns + + # Array of data rows, where each row is an array of values matching the columns + # order. + sig { returns(T.nilable(T::Array[T::Hash[Symbol, T.anything]])) } + attr_accessor :data + + # Debug information including engine and SQL. + sig { returns(T.nilable(WhopSDK::Models::StatRunSqlResponse::Debug)) } + attr_reader :debug + + sig do + params( + debug: T.nilable(WhopSDK::Models::StatRunSqlResponse::Debug::OrHash) + ).void + end + attr_writer :debug + + # The node path that was queried. + sig { returns(T.nilable(String)) } + attr_accessor :node + + # Pagination information. + sig do + returns(T.nilable(WhopSDK::Models::StatRunSqlResponse::Pagination)) + end + attr_reader :pagination + + sig do + params( + pagination: + T.nilable(WhopSDK::Models::StatRunSqlResponse::Pagination::OrHash) + ).void + end + attr_writer :pagination + + # The typename of this object + sig { returns(Symbol) } + attr_accessor :typename + + # Result from a stats query (raw, metric, or SQL). + sig do + params( + columns: T.nilable(T::Array[String]), + data: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + debug: T.nilable(WhopSDK::Models::StatRunSqlResponse::Debug::OrHash), + node: T.nilable(String), + pagination: + T.nilable(WhopSDK::Models::StatRunSqlResponse::Pagination::OrHash), + typename: Symbol + ).returns(T.attached_class) + end + def self.new( + # Column names in the order they appear in each data row. + columns:, + # Array of data rows, where each row is an array of values matching the columns + # order. + data:, + # Debug information including engine and SQL. + debug:, + # The node path that was queried. + node:, + # Pagination information. + pagination:, + # The typename of this object + typename: :Result + ) + end + + sig do + override.returns( + { + columns: T.nilable(T::Array[String]), + data: T.nilable(T::Array[T::Hash[Symbol, T.anything]]), + debug: T.nilable(WhopSDK::Models::StatRunSqlResponse::Debug), + node: T.nilable(String), + pagination: + T.nilable(WhopSDK::Models::StatRunSqlResponse::Pagination), + typename: Symbol + } + ) + end + def to_hash + end + + class Debug < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatRunSqlResponse::Debug, + WhopSDK::Internal::AnyHash + ) + end + + # The query engine used. + sig { returns(T.nilable(String)) } + attr_accessor :engine + + # Unique request identifier for debugging. + sig { returns(T.nilable(String)) } + attr_accessor :request_id + + # The generated SQL query (with IDs sanitized). + sig { returns(T.nilable(String)) } + attr_accessor :sql + + # Debug information including engine and SQL. + sig do + params( + engine: T.nilable(String), + request_id: T.nilable(String), + sql: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The query engine used. + engine:, + # Unique request identifier for debugging. + request_id:, + # The generated SQL query (with IDs sanitized). + sql: + ) + end + + sig do + override.returns( + { + engine: T.nilable(String), + request_id: T.nilable(String), + sql: T.nilable(String) + } + ) + end + def to_hash + end + end + + class Pagination < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::StatRunSqlResponse::Pagination, + WhopSDK::Internal::AnyHash + ) + end + + # Cursor for the next page of results. + sig { returns(T.nilable(String)) } + attr_accessor :next_cursor + + # Pagination information. + sig { params(next_cursor: T.nilable(String)).returns(T.attached_class) } + def self.new( + # Cursor for the next page of results. + next_cursor: + ) + end + + sig { override.returns({ next_cursor: T.nilable(String) }) } + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/support_channel_list_params.rbi b/rbi/whop_sdk/models/support_channel_list_params.rbi index 68a4ba47..d15d9af6 100644 --- a/rbi/whop_sdk/models/support_channel_list_params.rbi +++ b/rbi/whop_sdk/models/support_channel_list_params.rbi @@ -11,10 +11,6 @@ module WhopSDK T.any(WhopSDK::SupportChannelListParams, WhopSDK::Internal::AnyHash) end - # The unique identifier of the company to list support channels for. - sig { returns(String) } - attr_accessor :company_id - # Returns the elements in the list that come after the specified cursor. sig { returns(T.nilable(String)) } attr_accessor :after @@ -23,6 +19,12 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :before + # The unique identifier of the company to list support channels for. Includes + # channels of child companies. When omitted, returns support channels across all + # companies the user has access to. + sig { returns(T.nilable(String)) } + attr_accessor :company_id + # The direction of the sort. sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) } attr_accessor :direction @@ -46,26 +48,35 @@ module WhopSDK end attr_accessor :order + # The perspective to filter support channels by. + sig do + returns(T.nilable(WhopSDK::SupportChannelListParams::View::OrSymbol)) + end + attr_accessor :view + sig do params( - company_id: String, after: T.nilable(String), before: T.nilable(String), + company_id: T.nilable(String), direction: T.nilable(WhopSDK::Direction::OrSymbol), first: T.nilable(Integer), last: T.nilable(Integer), open_: T.nilable(T::Boolean), order: T.nilable(WhopSDK::SupportChannelListParams::Order::OrSymbol), + view: T.nilable(WhopSDK::SupportChannelListParams::View::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( - # The unique identifier of the company to list support channels for. - company_id:, # Returns the elements in the list that come after the specified cursor. after: nil, # Returns the elements in the list that come before the specified cursor. before: nil, + # The unique identifier of the company to list support channels for. Includes + # channels of child companies. When omitted, returns support channels across all + # companies the user has access to. + company_id: nil, # The direction of the sort. direction: nil, # Returns the first _n_ elements from the list. @@ -77,6 +88,8 @@ module WhopSDK open_: nil, # Sort options for message channels order: nil, + # The perspective to filter support channels by. + view: nil, request_options: {} ) end @@ -84,15 +97,16 @@ module WhopSDK sig do override.returns( { - company_id: String, after: T.nilable(String), before: T.nilable(String), + company_id: T.nilable(String), direction: T.nilable(WhopSDK::Direction::OrSymbol), first: T.nilable(Integer), last: T.nilable(Integer), open_: T.nilable(T::Boolean), order: T.nilable(WhopSDK::SupportChannelListParams::Order::OrSymbol), + view: T.nilable(WhopSDK::SupportChannelListParams::View::OrSymbol), request_options: WhopSDK::RequestOptions } ) @@ -129,6 +143,34 @@ module WhopSDK def self.values end end + + # The perspective to filter support channels by. + module View + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::SupportChannelListParams::View) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ALL = T.let(:all, WhopSDK::SupportChannelListParams::View::TaggedSymbol) + ADMIN = + T.let(:admin, WhopSDK::SupportChannelListParams::View::TaggedSymbol) + CUSTOMER = + T.let( + :customer, + WhopSDK::SupportChannelListParams::View::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::SupportChannelListParams::View::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/whop_sdk/resources/ad_campaigns.rbi b/rbi/whop_sdk/resources/ad_campaigns.rbi new file mode 100644 index 00000000..6dbfdbc1 --- /dev/null +++ b/rbi/whop_sdk/resources/ad_campaigns.rbi @@ -0,0 +1,213 @@ +# typed: strong + +module WhopSDK + module Resources + # Ad campaigns + class AdCampaigns + # Creates a new ad campaign for a product. + # + # Required permissions: + # + # - `ad_campaign:create` + # - `access_pass:basic:read` + # - `company:balance:read` + sig do + params( + company_id: String, + config: WhopSDK::AdCampaignCreateParams::Config::OrHash, + platform: WhopSDK::AdCampaignCreateParams::Platform::OrSymbol, + title: String, + ad_creative_set_ids: T.nilable(T::Array[String]), + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdCampaignCreateParams::BudgetType::OrSymbol), + daily_budget: T.nilable(Float), + product_id: T.nilable(String), + target_country_codes: T.nilable(T::Array[String]), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdCampaignCreateResponse) + end + def create( + # The company ID to create this ad campaign for. + company_id:, + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + config:, + # The ad platform to run on (e.g., meta, tiktok). + platform:, + # The title of the ad campaign. Must be max 100 characters. + title:, + # Array of creative set IDs to link to this campaign. + ad_creative_set_ids: nil, + # Budget amount in dollars. + budget: nil, + # The budget type for an ad campaign or ad group. + budget_type: nil, + # Daily budget in dollars (minimum $5). Required unless lifetime_budget is set in + # config. + daily_budget: nil, + # The unique identifier of the product to promote. + product_id: nil, + # Array of ISO3166 country codes for territory targeting. + target_country_codes: nil, + request_options: {} + ) + end + + # Retrieves a single ad campaign by its unique identifier. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + # - `access_pass:basic:read` + # - `company:balance:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdCampaignRetrieveResponse) + end + def retrieve( + # The unique identifier of the ad campaign. + id, + request_options: {} + ) + end + + # Updates an existing ad campaign. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `access_pass:basic:read` + # - `company:balance:read` + sig do + params( + id: String, + ad_creative_set_ids: T.nilable(T::Array[String]), + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdCampaignUpdateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdCampaignUpdateParams::Config::OrHash), + daily_budget: T.nilable(Float), + product_id: T.nilable(String), + target_country_codes: T.nilable(T::Array[String]), + title: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdCampaignUpdateResponse) + end + def update( + # The unique identifier of the ad campaign to update. + id, + # Array of creative set IDs to link to this campaign. + ad_creative_set_ids: nil, + # Budget amount in dollars. + budget: nil, + # The budget type for an ad campaign or ad group. + budget_type: nil, + # Unified campaign configuration (conversion goal, budget, bidding, etc.). + config: nil, + # Daily budget in dollars (minimum $5). + daily_budget: nil, + # The unique identifier of the product (access pass) to promote. + product_id: nil, + # Array of ISO3166 country codes for territory targeting. + target_country_codes: nil, + # The title of the ad campaign. Must be max 100 characters. + title: nil, + request_options: {} + ) + end + + # Returns a paginated list of ad campaigns for a company, with optional filtering + # by status, and creation date. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + # - `access_pass:basic:read` + sig do + params( + company_id: String, + after: T.nilable(String), + before: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + query: T.nilable(String), + status: T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns( + WhopSDK::Internal::CursorPage[WhopSDK::Models::AdCampaignListResponse] + ) + end + def list( + # The unique identifier of the company to list ad campaigns for. + company_id:, + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # Only return ad campaigns created after this timestamp. + created_after: nil, + # Only return ad campaigns created before this timestamp. + created_before: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # Case-insensitive substring match against the campaign title. + query: nil, + # The status of an ad campaign. + status: nil, + request_options: {} + ) + end + + # Pauses an ad campaign, optionally until a specific date. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `access_pass:basic:read` + # - `company:balance:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdCampaignPauseResponse) + end + def pause( + # The unique identifier of the ad campaign to pause. + id, + request_options: {} + ) + end + + # Resumes a paused ad campaign. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `access_pass:basic:read` + # - `company:balance:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdCampaignUnpauseResponse) + end + def unpause( + # The unique identifier of the ad campaign to unpause. + id, + request_options: {} + ) + end + + # @api private + sig { params(client: WhopSDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/whop_sdk/resources/ad_groups.rbi b/rbi/whop_sdk/resources/ad_groups.rbi new file mode 100644 index 00000000..0b7e2f39 --- /dev/null +++ b/rbi/whop_sdk/resources/ad_groups.rbi @@ -0,0 +1,181 @@ +# typed: strong + +module WhopSDK + module Resources + # Ad groups + class AdGroups + # Creates a new ad group within a campaign. + # + # Required permissions: + # + # - `ad_campaign:create` + # - `ad_campaign:basic:read` + sig do + params( + campaign_id: String, + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdGroupCreateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdGroupCreateParams::Config::OrHash), + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable(WhopSDK::AdGroupCreateParams::PlatformConfig::OrHash), + status: T.nilable(WhopSDK::AdGroupCreateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdGroupCreateResponse) + end + def create( + # The ad campaign to create this ad group within. + campaign_id:, + # Budget amount in dollars. + budget: nil, + # The budget type for an ad campaign or ad group. + budget_type: nil, + # Unified ad group configuration (bidding, optimization, targeting). + config: nil, + # Daily budget in dollars. + daily_budget: nil, + # Human-readable ad group name. + name: nil, + # Platform-specific ad group configuration. + platform_config: nil, + # The status of an external ad group. + status: nil, + request_options: {} + ) + end + + # Retrieves a single ad group by its unique identifier. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdGroupRetrieveResponse) + end + def retrieve( + # The unique identifier of the ad group. + id, + request_options: {} + ) + end + + # Updates an existing ad group. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + sig do + params( + id: String, + budget: T.nilable(Float), + budget_type: + T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol), + config: T.nilable(WhopSDK::AdGroupUpdateParams::Config::OrHash), + daily_budget: T.nilable(Float), + name: T.nilable(String), + platform_config: + T.nilable(WhopSDK::AdGroupUpdateParams::PlatformConfig::OrHash), + status: T.nilable(WhopSDK::AdGroupUpdateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdGroupUpdateResponse) + end + def update( + # The unique identifier of the ad group to update. + id, + # Budget amount in dollars. + budget: nil, + # The budget type for an ad campaign or ad group. + budget_type: nil, + # Unified ad group configuration (bidding, optimization, targeting). + config: nil, + # Daily budget in dollars. + daily_budget: nil, + # Human-readable ad group name. + name: nil, + # Platform-specific ad group configuration. + platform_config: nil, + # The status of an external ad group. + status: nil, + request_options: {} + ) + end + + # Returns a paginated list of ad groups scoped by campaign or company, with + # optional filtering by status and creation date. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + sig do + params( + after: T.nilable(String), + before: T.nilable(String), + campaign_id: T.nilable(String), + company_id: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + query: T.nilable(String), + status: T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns( + WhopSDK::Internal::CursorPage[WhopSDK::Models::AdGroupListResponse] + ) + end + def list( + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # Filter by campaign. Provide exactly one of campaign_id or company_id. + campaign_id: nil, + # Filter by company. Provide exactly one of campaign_id or company_id. + company_id: nil, + # Only return ad groups created after this timestamp. + created_after: nil, + # Only return ad groups created before this timestamp. + created_before: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # Case-insensitive substring match against the ad group name. + query: nil, + # The status of an external ad group. + status: nil, + request_options: {} + ) + end + + # Soft-deletes an ad group. + # + # Required permissions: + # + # - `ad_campaign:delete` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T::Boolean) + end + def delete( + # The unique identifier of the ad group to delete. + id, + request_options: {} + ) + end + + # @api private + sig { params(client: WhopSDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/whop_sdk/resources/ads.rbi b/rbi/whop_sdk/resources/ads.rbi new file mode 100644 index 00000000..420064ca --- /dev/null +++ b/rbi/whop_sdk/resources/ads.rbi @@ -0,0 +1,117 @@ +# typed: strong + +module WhopSDK + module Resources + # Ads + class Ads + # Create an ad within an ad group. + # + # Required permissions: + # + # - `ad_campaign:create` + sig do + params( + ad_group_id: String, + creative_set_id: T.nilable(String), + existing_instagram_media_id: T.nilable(String), + existing_post_id: T.nilable(String), + platform_config: + T.nilable(WhopSDK::AdCreateParams::PlatformConfig::OrHash), + status: T.nilable(WhopSDK::AdCreateParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdCreateResponse) + end + def create( + # The unique identifier of the ad group to create this ad in. + ad_group_id:, + # The unique identifier of the creative set to use. + creative_set_id: nil, + # ID of an existing Instagram media item to use as the ad creative (instead of a + # creative set or Facebook post). + existing_instagram_media_id: nil, + # ID of an existing Facebook post to use as the ad creative (instead of a creative + # set). + existing_post_id: nil, + # Platform-specific configuration. Must match the campaign platform. + platform_config: nil, + # The status of an external ad. + status: nil, + request_options: {} + ) + end + + # Retrieve an ad by its unique identifier. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::AdRetrieveResponse) + end + def retrieve( + # The unique identifier of the ad. + id, + request_options: {} + ) + end + + # List ads scoped by ad group, campaign, or company. + # + # Required permissions: + # + # - `ad_campaign:basic:read` + sig do + params( + ad_group_id: T.nilable(String), + after: T.nilable(String), + before: T.nilable(String), + campaign_id: T.nilable(String), + company_id: T.nilable(String), + created_after: T.nilable(Time), + created_before: T.nilable(Time), + first: T.nilable(Integer), + last: T.nilable(Integer), + status: T.nilable(WhopSDK::AdListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns( + WhopSDK::Internal::CursorPage[WhopSDK::Models::AdListResponse] + ) + end + def list( + # Filter by ad group. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + ad_group_id: nil, + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # Filter by campaign. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + campaign_id: nil, + # Filter by company. Provide exactly one of ad_group_id, campaign_id, or + # company_id. + company_id: nil, + # Only return ads created after this timestamp. + created_after: nil, + # Only return ads created before this timestamp. + created_before: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # The status of an external ad. + status: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: WhopSDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/whop_sdk/resources/bounties.rbi b/rbi/whop_sdk/resources/bounties.rbi new file mode 100644 index 00000000..20e7b095 --- /dev/null +++ b/rbi/whop_sdk/resources/bounties.rbi @@ -0,0 +1,108 @@ +# typed: strong + +module WhopSDK + module Resources + # Bounties + class Bounties + # Create a new workforce bounty by funding a dedicated bounty pool. + # + # Required permissions: + # + # - `bounty:create` + sig do + params( + base_unit_amount: Float, + currency: WhopSDK::Currency::OrSymbol, + description: String, + title: String, + accepted_submissions_limit: T.nilable(Integer), + allowed_country_codes: T.nilable(T::Array[String]), + experience_id: T.nilable(String), + origin_account_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::BountyCreateResponse) + end + def create( + # The amount paid to each approved submission. The total bounty pool funded is + # this amount times accepted_submissions_limit. + base_unit_amount:, + # The currency for the bounty pool funding amount. + currency:, + # The description of the bounty. + description:, + # The title of the bounty. + title:, + # The number of submissions that can be approved before the bounty closes. + # Defaults to 1. + accepted_submissions_limit: nil, + # The ISO3166 country codes where this bounty should be visible. Empty means + # globally visible. + allowed_country_codes: nil, + # An optional experience to scope the bounty to. + experience_id: nil, + # The user (user*\*) or company (biz*\*) tag whose balance funds this bounty pool. + # Defaults to the requester's personal balance when omitted. The requester must be + # the user themself or an owner/admin of the company. + origin_account_id: nil, + request_options: {} + ) + end + + # Retrieves a workforce bounty for the current authenticated user. + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::BountyRetrieveResponse) + end + def retrieve( + # The unique identifier of the workforce bounty to retrieve. + id, + request_options: {} + ) + end + + # Returns a paginated list of workforce bounties. When experienceId is provided, + # returns bounties scoped to that experience. When omitted, returns bounties with + # no experience. + sig do + params( + after: T.nilable(String), + before: T.nilable(String), + direction: T.nilable(WhopSDK::Direction::OrSymbol), + experience_id: T.nilable(String), + first: T.nilable(Integer), + last: T.nilable(Integer), + status: T.nilable(WhopSDK::BountyListParams::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns( + WhopSDK::Internal::CursorPage[WhopSDK::Models::BountyListResponse] + ) + end + def list( + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # The direction of the sort. + direction: nil, + # The experience to list bounties for. When omitted, returns bounties with no + # experience. + experience_id: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # The available bounty statuses to choose from. + status: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: WhopSDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/whop_sdk/resources/companies.rbi b/rbi/whop_sdk/resources/companies.rbi index 14b7358d..c2fda4b7 100644 --- a/rbi/whop_sdk/resources/companies.rbi +++ b/rbi/whop_sdk/resources/companies.rbi @@ -175,6 +175,38 @@ module WhopSDK ) end + # Create an API key for a connected account (child company) owned by a parent + # company. + sig do + params( + parent_company_id: String, + child_company_id: String, + name: T.nilable(String), + permissions: + T.nilable( + T::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission::OrHash] + ), + role: T.nilable(WhopSDK::CompanyCreateAPIKeyParams::Role::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::CompanyCreateAPIKeyResponse) + end + def create_api_key( + # The unique identifier of the parent platform company (e.g. 'biz_xxx'). + parent_company_id, + # The unique identifier of the connected account to create the API key for (e.g. + # 'biz_xxx'). + child_company_id:, + # A human-readable name for the API key, such as 'Production API Key'. + name: nil, + # Granular permission statements defining which actions this API key can perform. + # Either permissions or role must be provided. + permissions: nil, + # The different system roles that can be assigned. + role: nil, + request_options: {} + ) + end + # @api private sig { params(client: WhopSDK::Client).returns(T.attached_class) } def self.new(client:) diff --git a/rbi/whop_sdk/resources/conversions.rbi b/rbi/whop_sdk/resources/conversions.rbi new file mode 100644 index 00000000..ae00c722 --- /dev/null +++ b/rbi/whop_sdk/resources/conversions.rbi @@ -0,0 +1,71 @@ +# typed: strong + +module WhopSDK + module Resources + # Conversions + class Conversions + # Track a conversion or engagement event for a company. + # + # Required permissions: + # + # - `event:create` + sig do + params( + company_id: String, + event_name: WhopSDK::ConversionCreateParams::EventName::OrSymbol, + action_source: + T.nilable(WhopSDK::ConversionCreateParams::ActionSource::OrSymbol), + context: T.nilable(WhopSDK::ConversionCreateParams::Context::OrHash), + currency: T.nilable(WhopSDK::Currency::OrSymbol), + custom_name: T.nilable(String), + event_id: T.nilable(String), + event_time: T.nilable(Time), + plan_id: T.nilable(String), + product_id: T.nilable(String), + referrer_url: T.nilable(String), + url: T.nilable(String), + user: T.nilable(WhopSDK::ConversionCreateParams::User::OrHash), + value: T.nilable(Float), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::ConversionCreateResponse) + end + def create( + # The company to associate with this event. + company_id:, + # The type of event. + event_name:, + # The channel where an event originated + action_source: nil, + # Tracking and attribution context. + context: nil, + # The available currencies on the platform + currency: nil, + # Custom event name when event_name is 'custom'. + custom_name: nil, + # Client-provided identifier for deduplication. Generated if omitted. + event_id: nil, + # When the event occurred. Defaults to now. + event_time: nil, + # The plan associated with the event. + plan_id: nil, + # The product associated with the event. + product_id: nil, + # The referring URL. + referrer_url: nil, + # The URL where the event occurred. + url: nil, + # User identity and profile data. + user: nil, + # Monetary value associated with the event. + value: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: WhopSDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/whop_sdk/resources/files.rbi b/rbi/whop_sdk/resources/files.rbi index 09b9a5ae..81a0c261 100644 --- a/rbi/whop_sdk/resources/files.rbi +++ b/rbi/whop_sdk/resources/files.rbi @@ -9,6 +9,8 @@ module WhopSDK sig do params( filename: String, + visibility: + T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::Models::FileCreateResponse) end @@ -16,6 +18,9 @@ module WhopSDK # The name of the file including its extension (e.g., "photo.png" or # "document.pdf"). filename:, + # Controls whether an uploaded file is publicly accessible or requires + # authentication to access. + visibility: nil, request_options: {} ) end diff --git a/rbi/whop_sdk/resources/forum_posts.rbi b/rbi/whop_sdk/resources/forum_posts.rbi index 7da32b81..bc293cd4 100644 --- a/rbi/whop_sdk/resources/forum_posts.rbi +++ b/rbi/whop_sdk/resources/forum_posts.rbi @@ -140,6 +140,7 @@ module WhopSDK after: T.nilable(String), before: T.nilable(String), first: T.nilable(Integer), + include_bounty_anchors: T.nilable(T::Boolean), last: T.nilable(Integer), parent_id: T.nilable(String), pinned: T.nilable(T::Boolean), @@ -157,6 +158,8 @@ module WhopSDK before: nil, # Returns the first _n_ elements from the list. first: nil, + # Whether to include top-level bounty discussion anchors as rich forum items. + include_bounty_anchors: nil, # Returns the last _n_ elements from the list. last: nil, # The unique identifier of a parent post to list comments for. When set, returns diff --git a/rbi/whop_sdk/resources/payments.rbi b/rbi/whop_sdk/resources/payments.rbi index 8d5b68f9..cd387664 100644 --- a/rbi/whop_sdk/resources/payments.rbi +++ b/rbi/whop_sdk/resources/payments.rbi @@ -211,8 +211,9 @@ module WhopSDK def refund( # The unique identifier of the payment to refund. id, - # The amount to refund in the payment currency. If omitted, the full payment - # amount is refunded. + # The amount to refund. For multi-currency payments, this is in the charge + # currency (what the buyer paid). For single-currency, this is in the payment + # currency. If omitted, the full payment amount is refunded. partial_amount: nil, request_options: {} ) diff --git a/rbi/whop_sdk/resources/plans.rbi b/rbi/whop_sdk/resources/plans.rbi index fa3dd560..19b9e69b 100644 --- a/rbi/whop_sdk/resources/plans.rbi +++ b/rbi/whop_sdk/resources/plans.rbi @@ -16,6 +16,7 @@ module WhopSDK params( company_id: String, product_id: String, + adaptive_pricing_enabled: T.nilable(T::Boolean), billing_period: T.nilable(Integer), checkout_styling: T.nilable(WhopSDK::PlanCreateParams::CheckoutStyling::OrHash), @@ -50,6 +51,8 @@ module WhopSDK company_id:, # The unique identifier of the product to attach this plan to. product_id:, + # Whether this plan accepts local currency payments via adaptive pricing. + adaptive_pricing_enabled: nil, # The number of days between recurring charges. For example, 30 for monthly or 365 # for yearly. billing_period: nil, @@ -135,6 +138,7 @@ module WhopSDK sig do params( id: String, + adaptive_pricing_enabled: T.nilable(T::Boolean), billing_period: T.nilable(Integer), checkout_styling: T.nilable(WhopSDK::PlanUpdateParams::CheckoutStyling::OrHash), @@ -167,6 +171,8 @@ module WhopSDK def update( # The unique identifier of the plan to update. id, + # Whether this plan accepts local currency payments via adaptive pricing. + adaptive_pricing_enabled: nil, # The number of days between recurring charges. For example, 30 for monthly or 365 # for yearly. billing_period: nil, diff --git a/rbi/whop_sdk/resources/stats.rbi b/rbi/whop_sdk/resources/stats.rbi new file mode 100644 index 00000000..92c8009b --- /dev/null +++ b/rbi/whop_sdk/resources/stats.rbi @@ -0,0 +1,172 @@ +# typed: strong + +module WhopSDK + module Resources + # Stats + class Stats + # Describe available stats schema. Without resource returns root nodes and + # metrics. With resource returns node columns, associations, and available + # metrics. + # + # Required permissions: + # + # - `stats:read` + sig do + params( + company_id: T.nilable(String), + resource: T.nilable(String), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.nilable(WhopSDK::Models::StatDescribeResponse::Variants)) + end + def describe( + # Scope query to a specific company. + company_id: nil, + # Resource path using : as separator (e.g., 'receipts', 'payments:membership', + # 'receipts:gross_revenue'). + resource: nil, + # Scope query to a specific user. + user_id: nil, + request_options: {} + ) + end + + # Query an aggregated metric. Returns data grouped by period with optional + # breakdowns. + # + # Required permissions: + # + # - `stats:read` + sig do + params( + resource: String, + breakdowns: T.nilable(T::Array[String]), + company_id: T.nilable(String), + filters: T.nilable(T::Hash[Symbol, T.anything]), + from: T.nilable(Time), + granularity: T.nilable(String), + time_zone: T.nilable(String), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::StatQueryMetricResponse) + end + def query_metric( + # Metric resource using : as separator (e.g., 'receipts:gross_revenue', + # 'members:new_users'). + resource:, + # Columns to break down the metric by. + breakdowns: nil, + # Scope query to a specific company. + company_id: nil, + # Key-value pairs to filter the data. + filters: nil, + # Start of time range (unix timestamp). + from: nil, + # Time granularity (daily, weekly, monthly). + granularity: nil, + # IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. + # Only applies to ClickHouse metrics. + time_zone: nil, + # End of time range (unix timestamp). + to: nil, + # Scope query to a specific user. + user_id: nil, + request_options: {} + ) + end + + # Query raw data from a resource. Returns paginated rows with all columns. + # + # Required permissions: + # + # - `stats:read` + sig do + params( + resource: String, + company_id: T.nilable(String), + cursor: T.nilable(String), + from: T.nilable(Time), + limit: T.nilable(Integer), + sort: T.nilable(String), + sort_direction: T.nilable(WhopSDK::Direction::OrSymbol), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::StatQueryRawResponse) + end + def query_raw( + # Resource path using : as separator (e.g., 'members', 'payments:membership'). + resource:, + # Scope query to a specific company. + company_id: nil, + # Pagination cursor for next page. + cursor: nil, + # Start of time range (unix timestamp). + from: nil, + # Number of records to return (max 10000). + limit: nil, + # Column to sort by. + sort: nil, + # The direction of the sort. + sort_direction: nil, + # End of time range (unix timestamp). + to: nil, + # Scope query to a specific user. + user_id: nil, + request_options: {} + ) + end + + # Run custom SQL against a scoped resource. Use SCOPED_DATA as the table name. + # + # Required permissions: + # + # - `stats:read` + sig do + params( + resource: String, + sql: String, + company_id: T.nilable(String), + cursor: T.nilable(String), + from: T.nilable(Time), + limit: T.nilable(Integer), + sort: T.nilable(String), + sort_direction: T.nilable(WhopSDK::Direction::OrSymbol), + to: T.nilable(Time), + user_id: T.nilable(String), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::StatRunSqlResponse) + end + def run_sql( + # Resource path using : as separator (e.g., 'receipts', 'payments:membership'). + resource:, + # SQL query. Use SCOPED_DATA as the table name. + sql:, + # Scope query to a specific company. + company_id: nil, + # Pagination cursor for next page. + cursor: nil, + # Start of time range (unix timestamp). + from: nil, + # Number of records to return (max 10000). + limit: nil, + # Column to sort by. + sort: nil, + # The direction of the sort. + sort_direction: nil, + # End of time range (unix timestamp). + to: nil, + # Scope query to a specific user. + user_id: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: WhopSDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/whop_sdk/resources/support_channels.rbi b/rbi/whop_sdk/resources/support_channels.rbi index e42f7b5d..4f2813ec 100644 --- a/rbi/whop_sdk/resources/support_channels.rbi +++ b/rbi/whop_sdk/resources/support_channels.rbi @@ -56,14 +56,15 @@ module WhopSDK # - `support_chat:read` sig do params( - company_id: String, after: T.nilable(String), before: T.nilable(String), + company_id: T.nilable(String), direction: T.nilable(WhopSDK::Direction::OrSymbol), first: T.nilable(Integer), last: T.nilable(Integer), open_: T.nilable(T::Boolean), order: T.nilable(WhopSDK::SupportChannelListParams::Order::OrSymbol), + view: T.nilable(WhopSDK::SupportChannelListParams::View::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns( WhopSDK::Internal::CursorPage[ @@ -72,12 +73,14 @@ module WhopSDK ) end def list( - # The unique identifier of the company to list support channels for. - company_id:, # Returns the elements in the list that come after the specified cursor. after: nil, # Returns the elements in the list that come before the specified cursor. before: nil, + # The unique identifier of the company to list support channels for. Includes + # channels of child companies. When omitted, returns support channels across all + # companies the user has access to. + company_id: nil, # The direction of the sort. direction: nil, # Returns the first _n_ elements from the list. @@ -89,6 +92,8 @@ module WhopSDK open_: nil, # Sort options for message channels order: nil, + # The perspective to filter support channels by. + view: nil, request_options: {} ) end diff --git a/scripts/bootstrap b/scripts/bootstrap index 34878642..a5e1b80a 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response diff --git a/sig/whop_sdk/client.rbs b/sig/whop_sdk/client.rbs index 20535135..1d7f6c88 100644 --- a/sig/whop_sdk/client.rbs +++ b/sig/whop_sdk/client.rbs @@ -120,6 +120,18 @@ module WhopSDK attr_reader affiliates: WhopSDK::Resources::Affiliates + attr_reader bounties: WhopSDK::Resources::Bounties + + attr_reader stats: WhopSDK::Resources::Stats + + attr_reader ad_campaigns: WhopSDK::Resources::AdCampaigns + + attr_reader ad_groups: WhopSDK::Resources::AdGroups + + attr_reader ads: WhopSDK::Resources::Ads + + attr_reader conversions: WhopSDK::Resources::Conversions + private def auth_headers: -> ::Hash[String, String] def initialize: ( diff --git a/sig/whop_sdk/models.rbs b/sig/whop_sdk/models.rbs index e7280392..6a26a734 100644 --- a/sig/whop_sdk/models.rbs +++ b/sig/whop_sdk/models.rbs @@ -7,6 +7,34 @@ module WhopSDK class AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams + class AdCampaignCreateParams = WhopSDK::Models::AdCampaignCreateParams + + class AdCampaignListParams = WhopSDK::Models::AdCampaignListParams + + class AdCampaignPauseParams = WhopSDK::Models::AdCampaignPauseParams + + class AdCampaignRetrieveParams = WhopSDK::Models::AdCampaignRetrieveParams + + class AdCampaignUnpauseParams = WhopSDK::Models::AdCampaignUnpauseParams + + class AdCampaignUpdateParams = WhopSDK::Models::AdCampaignUpdateParams + + class AdCreateParams = WhopSDK::Models::AdCreateParams + + class AdGroupCreateParams = WhopSDK::Models::AdGroupCreateParams + + class AdGroupDeleteParams = WhopSDK::Models::AdGroupDeleteParams + + class AdGroupListParams = WhopSDK::Models::AdGroupListParams + + class AdGroupRetrieveParams = WhopSDK::Models::AdGroupRetrieveParams + + class AdGroupUpdateParams = WhopSDK::Models::AdGroupUpdateParams + + class AdListParams = WhopSDK::Models::AdListParams + + class AdRetrieveParams = WhopSDK::Models::AdRetrieveParams + class Affiliate = WhopSDK::Models::Affiliate class AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams @@ -81,6 +109,12 @@ module WhopSDK module BillingReasons = WhopSDK::Models::BillingReasons + class BountyCreateParams = WhopSDK::Models::BountyCreateParams + + class BountyListParams = WhopSDK::Models::BountyListParams + + class BountyRetrieveParams = WhopSDK::Models::BountyRetrieveParams + module CancelOptions = WhopSDK::Models::CancelOptions module CardBrands = WhopSDK::Models::CardBrands @@ -111,6 +145,8 @@ module WhopSDK class Company = WhopSDK::Models::Company + class CompanyCreateAPIKeyParams = WhopSDK::Models::CompanyCreateAPIKeyParams + class CompanyCreateParams = WhopSDK::Models::CompanyCreateParams class CompanyListParams = WhopSDK::Models::CompanyListParams @@ -129,6 +165,8 @@ module WhopSDK class CompanyUpdateParams = WhopSDK::Models::CompanyUpdateParams + class ConversionCreateParams = WhopSDK::Models::ConversionCreateParams + class Course = WhopSDK::Models::Course class CourseChapter = WhopSDK::Models::CourseChapter @@ -603,6 +641,14 @@ module WhopSDK module SocialLinkWebsites = WhopSDK::Models::SocialLinkWebsites + class StatDescribeParams = WhopSDK::Models::StatDescribeParams + + class StatQueryMetricParams = WhopSDK::Models::StatQueryMetricParams + + class StatQueryRawParams = WhopSDK::Models::StatQueryRawParams + + class StatRunSqlParams = WhopSDK::Models::StatRunSqlParams + module Status = WhopSDK::Models::Status class SupportChannel = WhopSDK::Models::SupportChannel diff --git a/sig/whop_sdk/models/ad_campaign_create_params.rbs b/sig/whop_sdk/models/ad_campaign_create_params.rbs new file mode 100644 index 00000000..89338a75 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_create_params.rbs @@ -0,0 +1,187 @@ +module WhopSDK + module Models + type ad_campaign_create_params = + { + company_id: String, + config: WhopSDK::AdCampaignCreateParams::Config, + platform: WhopSDK::Models::AdCampaignCreateParams::platform, + title: String, + ad_creative_set_ids: ::Array[String]?, + budget: Float?, + budget_type: WhopSDK::Models::AdCampaignCreateParams::budget_type?, + daily_budget: Float?, + product_id: String?, + target_country_codes: ::Array[String]? + } + & WhopSDK::Internal::Type::request_parameters + + class AdCampaignCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor company_id: String + + attr_accessor config: WhopSDK::AdCampaignCreateParams::Config + + attr_accessor platform: WhopSDK::Models::AdCampaignCreateParams::platform + + attr_accessor title: String + + attr_accessor ad_creative_set_ids: ::Array[String]? + + attr_accessor budget: Float? + + attr_accessor budget_type: WhopSDK::Models::AdCampaignCreateParams::budget_type? + + attr_accessor daily_budget: Float? + + attr_accessor product_id: String? + + attr_accessor target_country_codes: ::Array[String]? + + def initialize: ( + company_id: String, + config: WhopSDK::AdCampaignCreateParams::Config, + platform: WhopSDK::Models::AdCampaignCreateParams::platform, + title: String, + ?ad_creative_set_ids: ::Array[String]?, + ?budget: Float?, + ?budget_type: WhopSDK::Models::AdCampaignCreateParams::budget_type?, + ?daily_budget: Float?, + ?product_id: String?, + ?target_country_codes: ::Array[String]?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + company_id: String, + config: WhopSDK::AdCampaignCreateParams::Config, + platform: WhopSDK::Models::AdCampaignCreateParams::platform, + title: String, + ad_creative_set_ids: ::Array[String]?, + budget: Float?, + budget_type: WhopSDK::Models::AdCampaignCreateParams::budget_type?, + daily_budget: Float?, + product_id: String?, + target_country_codes: ::Array[String]?, + request_options: WhopSDK::RequestOptions + } + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignCreateParams::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + lifetime_budget: Integer?, + objective: WhopSDK::Models::AdCampaignCreateParams::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignCreateParams::Config::status? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdCampaignCreateParams::Config::bid_strategy? + + attr_accessor budget_optimization: bool? + + attr_accessor end_time: String? + + attr_accessor lifetime_budget: Integer? + + attr_accessor objective: WhopSDK::Models::AdCampaignCreateParams::Config::objective? + + attr_accessor special_categories: ::Array[String]? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdCampaignCreateParams::Config::status? + + def initialize: ( + ?bid_amount: Integer?, + ?bid_strategy: WhopSDK::Models::AdCampaignCreateParams::Config::bid_strategy?, + ?budget_optimization: bool?, + ?end_time: String?, + ?lifetime_budget: Integer?, + ?objective: WhopSDK::Models::AdCampaignCreateParams::Config::objective?, + ?special_categories: ::Array[String]?, + ?start_time: String?, + ?status: WhopSDK::Models::AdCampaignCreateParams::Config::status? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignCreateParams::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + lifetime_budget: Integer?, + objective: WhopSDK::Models::AdCampaignCreateParams::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignCreateParams::Config::status? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateParams::Config::bid_strategy] + end + + type objective = :awareness | :traffic | :engagement | :leads | :sales + + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS: :awareness + TRAFFIC: :traffic + ENGAGEMENT: :engagement + LEADS: :leads + SALES: :sales + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateParams::Config::objective] + end + + type status = :active | :paused + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateParams::Config::status] + end + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateParams::platform] + end + + type budget_type = :daily | :lifetime + + module BudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY: :daily + LIFETIME: :lifetime + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateParams::budget_type] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_create_response.rbs b/sig/whop_sdk/models/ad_campaign_create_response.rbs new file mode 100644 index 00000000..dc99ecae --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_create_response.rbs @@ -0,0 +1,642 @@ +module WhopSDK + module Models + type ad_campaign_create_response = + { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignCreateResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignCreateResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignCreateResponse::platform?, + product: WhopSDK::Models::AdCampaignCreateResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignCreateResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + class AdCampaignCreateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor available_budget: Float + + attr_accessor billing_ledger_account: WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount? + + attr_accessor clicks_count: Integer + + attr_accessor config: WhopSDK::Models::AdCampaignCreateResponse::Config? + + attr_accessor created_at: Time + + attr_accessor created_by_user: WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser + + attr_accessor daily_budget: Float? + + attr_accessor impressions_count: Integer + + attr_accessor paused_until: Time? + + attr_accessor payment_method: WhopSDK::Models::AdCampaignCreateResponse::payment_method? + + attr_accessor platform: WhopSDK::Models::AdCampaignCreateResponse::platform? + + attr_accessor product: WhopSDK::Models::AdCampaignCreateResponse::Product? + + attr_accessor purchases_count: Integer + + attr_accessor remaining_balance: Float + + attr_accessor return_on_ad_spend: Float + + attr_accessor revenue: Float + + attr_accessor status: WhopSDK::Models::AdCampaignCreateResponse::status + + attr_accessor target_country_codes: ::Array[String] + + attr_accessor title: String + + attr_accessor todays_spend: Float + + attr_accessor total_credits: Float + + attr_accessor total_spend: Float + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignCreateResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignCreateResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignCreateResponse::platform?, + product: WhopSDK::Models::AdCampaignCreateResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignCreateResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignCreateResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignCreateResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignCreateResponse::platform?, + product: WhopSDK::Models::AdCampaignCreateResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignCreateResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + type billing_ledger_account = { id: String } + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignCreateResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignCreateResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignCreateResponse::Config::status? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdCampaignCreateResponse::Config::bid_strategy? + + attr_accessor budget_optimization: bool? + + attr_accessor end_time: String? + + attr_accessor objective: WhopSDK::Models::AdCampaignCreateResponse::Config::objective? + + attr_accessor special_categories: ::Array[String]? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdCampaignCreateResponse::Config::status? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignCreateResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignCreateResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignCreateResponse::Config::status? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignCreateResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignCreateResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignCreateResponse::Config::status? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateResponse::Config::bid_strategy] + end + + type objective = :awareness | :traffic | :engagement | :leads | :sales + + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS: :awareness + TRAFFIC: :traffic + ENGAGEMENT: :engagement + LEADS: :leads + SALES: :sales + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateResponse::Config::objective] + end + + type status = :active | :paused + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateResponse::Config::status] + end + end + + type created_by_user = { id: String, name: String?, username: String } + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor username: String + + def initialize: (id: String, name: String?, username: String) -> void + + def to_hash: -> { id: String, name: String?, username: String } + end + + type payment_method = + (WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::BasePaymentMethod + | WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod + | WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod + | WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod + | WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod + | WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod)? + + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + type base_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :BasePaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :BasePaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + end + + type card_payment_method = + { + id: String, + card: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor card: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CardPaymentMethod + + def initialize: ( + id: String, + card: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CardPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + card: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + type card = + { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + + class Card < WhopSDK::Internal::Type::BaseModel + attr_accessor brand: WhopSDK::Models::card_brands? + + attr_accessor exp_month: Integer? + + attr_accessor exp_year: Integer? + + attr_accessor last4: String? + + def initialize: ( + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + last4: String? + ) -> void + + def to_hash: -> { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + end + end + + type us_bank_account_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :UsBankAccountPaymentMethod + + attr_accessor us_bank_account: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + us_bank_account: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + ?typename: :UsBankAccountPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + type us_bank_account = + { account_type: String, bank_name: String, :last4 => String } + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor account_type: String + + attr_accessor bank_name: String + + attr_accessor last4: String + + def initialize: ( + account_type: String, + bank_name: String, + last4: String + ) -> void + + def to_hash: -> { + account_type: String, + bank_name: String, + :last4 => String + } + end + end + + type cashapp_payment_method = + { + id: String, + cashapp: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor cashapp: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CashappPaymentMethod + + def initialize: ( + id: String, + cashapp: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CashappPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + cashapp: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + type cashapp = { buyer_id: String?, cashtag: String? } + + class Cashapp < WhopSDK::Internal::Type::BaseModel + attr_accessor buyer_id: String? + + attr_accessor cashtag: String? + + def initialize: (buyer_id: String?, cashtag: String?) -> void + + def to_hash: -> { buyer_id: String?, cashtag: String? } + end + end + + type ideal_payment_method = + { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor ideal: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :IdealPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :IdealPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + type ideal = { bank: String?, bic: String? } + + class Ideal < WhopSDK::Internal::Type::BaseModel + attr_accessor bank: String? + + attr_accessor bic: String? + + def initialize: (bank: String?, bic: String?) -> void + + def to_hash: -> { bank: String?, bic: String? } + end + end + + type sepa_debit_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor sepa_debit: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + + attr_accessor typename: :SepaDebitPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + ?typename: :SepaDebitPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + type sepa_debit = + { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + attr_accessor bank_code: String? + + attr_accessor branch_code: String? + + attr_accessor country: String? + + attr_accessor last4: String? + + def initialize: ( + bank_code: String?, + branch_code: String?, + country: String?, + last4: String? + ) -> void + + def to_hash: -> { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdCampaignCreateResponse::payment_method] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateResponse::platform] + end + + type product = { id: String, route: String, title: String } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor route: String + + attr_accessor title: String + + def initialize: (id: String, route: String, title: String) -> void + + def to_hash: -> { id: String, route: String, title: String } + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignCreateResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_list_params.rbs b/sig/whop_sdk/models/ad_campaign_list_params.rbs new file mode 100644 index 00000000..85ce9289 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_list_params.rbs @@ -0,0 +1,93 @@ +module WhopSDK + module Models + type ad_campaign_list_params = + { + company_id: String, + after: String?, + before: String?, + created_after: Time?, + created_before: Time?, + first: Integer?, + last: Integer?, + query: String?, + status: WhopSDK::Models::AdCampaignListParams::status? + } + & WhopSDK::Internal::Type::request_parameters + + class AdCampaignListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor company_id: String + + attr_accessor after: String? + + attr_accessor before: String? + + attr_accessor created_after: Time? + + attr_accessor created_before: Time? + + attr_accessor first: Integer? + + attr_accessor last: Integer? + + attr_accessor query: String? + + attr_accessor status: WhopSDK::Models::AdCampaignListParams::status? + + def initialize: ( + company_id: String, + ?after: String?, + ?before: String?, + ?created_after: Time?, + ?created_before: Time?, + ?first: Integer?, + ?last: Integer?, + ?query: String?, + ?status: WhopSDK::Models::AdCampaignListParams::status?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + company_id: String, + after: String?, + before: String?, + created_after: Time?, + created_before: Time?, + first: Integer?, + last: Integer?, + query: String?, + status: WhopSDK::Models::AdCampaignListParams::status?, + request_options: WhopSDK::RequestOptions + } + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignListParams::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_list_response.rbs b/sig/whop_sdk/models/ad_campaign_list_response.rbs new file mode 100644 index 00000000..8477a6d2 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_list_response.rbs @@ -0,0 +1,167 @@ +module WhopSDK + module Models + type ad_campaign_list_response = + { + id: String, + available_budget: Float, + clicks_count: Integer, + created_at: Time, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + platform: WhopSDK::Models::AdCampaignListResponse::platform?, + product: WhopSDK::Models::AdCampaignListResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignListResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + class AdCampaignListResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor available_budget: Float + + attr_accessor clicks_count: Integer + + attr_accessor created_at: Time + + attr_accessor daily_budget: Float? + + attr_accessor impressions_count: Integer + + attr_accessor paused_until: Time? + + attr_accessor platform: WhopSDK::Models::AdCampaignListResponse::platform? + + attr_accessor product: WhopSDK::Models::AdCampaignListResponse::Product? + + attr_accessor purchases_count: Integer + + attr_accessor remaining_balance: Float + + attr_accessor return_on_ad_spend: Float + + attr_accessor revenue: Float + + attr_accessor status: WhopSDK::Models::AdCampaignListResponse::status + + attr_accessor target_country_codes: ::Array[String] + + attr_accessor title: String + + attr_accessor todays_spend: Float + + attr_accessor total_credits: Float + + attr_accessor total_spend: Float + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + available_budget: Float, + clicks_count: Integer, + created_at: Time, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + platform: WhopSDK::Models::AdCampaignListResponse::platform?, + product: WhopSDK::Models::AdCampaignListResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignListResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + available_budget: Float, + clicks_count: Integer, + created_at: Time, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + platform: WhopSDK::Models::AdCampaignListResponse::platform?, + product: WhopSDK::Models::AdCampaignListResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignListResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignListResponse::platform] + end + + type product = { id: String, route: String, title: String } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor route: String + + attr_accessor title: String + + def initialize: (id: String, route: String, title: String) -> void + + def to_hash: -> { id: String, route: String, title: String } + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignListResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_pause_params.rbs b/sig/whop_sdk/models/ad_campaign_pause_params.rbs new file mode 100644 index 00000000..fa86ec52 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_pause_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_campaign_pause_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdCampaignPauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_pause_response.rbs b/sig/whop_sdk/models/ad_campaign_pause_response.rbs new file mode 100644 index 00000000..e652ff52 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_pause_response.rbs @@ -0,0 +1,642 @@ +module WhopSDK + module Models + type ad_campaign_pause_response = + { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignPauseResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignPauseResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignPauseResponse::platform?, + product: WhopSDK::Models::AdCampaignPauseResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignPauseResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor available_budget: Float + + attr_accessor billing_ledger_account: WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount? + + attr_accessor clicks_count: Integer + + attr_accessor config: WhopSDK::Models::AdCampaignPauseResponse::Config? + + attr_accessor created_at: Time + + attr_accessor created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser + + attr_accessor daily_budget: Float? + + attr_accessor impressions_count: Integer + + attr_accessor paused_until: Time? + + attr_accessor payment_method: WhopSDK::Models::AdCampaignPauseResponse::payment_method? + + attr_accessor platform: WhopSDK::Models::AdCampaignPauseResponse::platform? + + attr_accessor product: WhopSDK::Models::AdCampaignPauseResponse::Product? + + attr_accessor purchases_count: Integer + + attr_accessor remaining_balance: Float + + attr_accessor return_on_ad_spend: Float + + attr_accessor revenue: Float + + attr_accessor status: WhopSDK::Models::AdCampaignPauseResponse::status + + attr_accessor target_country_codes: ::Array[String] + + attr_accessor title: String + + attr_accessor todays_spend: Float + + attr_accessor total_credits: Float + + attr_accessor total_spend: Float + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignPauseResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignPauseResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignPauseResponse::platform?, + product: WhopSDK::Models::AdCampaignPauseResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignPauseResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignPauseResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignPauseResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignPauseResponse::platform?, + product: WhopSDK::Models::AdCampaignPauseResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignPauseResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + type billing_ledger_account = { id: String } + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignPauseResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignPauseResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignPauseResponse::Config::status? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdCampaignPauseResponse::Config::bid_strategy? + + attr_accessor budget_optimization: bool? + + attr_accessor end_time: String? + + attr_accessor objective: WhopSDK::Models::AdCampaignPauseResponse::Config::objective? + + attr_accessor special_categories: ::Array[String]? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdCampaignPauseResponse::Config::status? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignPauseResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignPauseResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignPauseResponse::Config::status? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignPauseResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignPauseResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignPauseResponse::Config::status? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::Config::bid_strategy] + end + + type objective = :awareness | :traffic | :engagement | :leads | :sales + + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS: :awareness + TRAFFIC: :traffic + ENGAGEMENT: :engagement + LEADS: :leads + SALES: :sales + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::Config::objective] + end + + type status = :active | :paused + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::Config::status] + end + end + + type created_by_user = { id: String, name: String?, username: String } + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor username: String + + def initialize: (id: String, name: String?, username: String) -> void + + def to_hash: -> { id: String, name: String?, username: String } + end + + type payment_method = + (WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::BasePaymentMethod + | WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod + | WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod + | WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod + | WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod + | WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod)? + + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + type base_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :BasePaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :BasePaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + end + + type card_payment_method = + { + id: String, + card: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor card: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CardPaymentMethod + + def initialize: ( + id: String, + card: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CardPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + card: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + type card = + { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + + class Card < WhopSDK::Internal::Type::BaseModel + attr_accessor brand: WhopSDK::Models::card_brands? + + attr_accessor exp_month: Integer? + + attr_accessor exp_year: Integer? + + attr_accessor last4: String? + + def initialize: ( + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + last4: String? + ) -> void + + def to_hash: -> { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + end + end + + type us_bank_account_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :UsBankAccountPaymentMethod + + attr_accessor us_bank_account: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + us_bank_account: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + ?typename: :UsBankAccountPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + type us_bank_account = + { account_type: String, bank_name: String, :last4 => String } + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor account_type: String + + attr_accessor bank_name: String + + attr_accessor last4: String + + def initialize: ( + account_type: String, + bank_name: String, + last4: String + ) -> void + + def to_hash: -> { + account_type: String, + bank_name: String, + :last4 => String + } + end + end + + type cashapp_payment_method = + { + id: String, + cashapp: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor cashapp: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CashappPaymentMethod + + def initialize: ( + id: String, + cashapp: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CashappPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + cashapp: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + type cashapp = { buyer_id: String?, cashtag: String? } + + class Cashapp < WhopSDK::Internal::Type::BaseModel + attr_accessor buyer_id: String? + + attr_accessor cashtag: String? + + def initialize: (buyer_id: String?, cashtag: String?) -> void + + def to_hash: -> { buyer_id: String?, cashtag: String? } + end + end + + type ideal_payment_method = + { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor ideal: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :IdealPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :IdealPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + type ideal = { bank: String?, bic: String? } + + class Ideal < WhopSDK::Internal::Type::BaseModel + attr_accessor bank: String? + + attr_accessor bic: String? + + def initialize: (bank: String?, bic: String?) -> void + + def to_hash: -> { bank: String?, bic: String? } + end + end + + type sepa_debit_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor sepa_debit: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + + attr_accessor typename: :SepaDebitPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + ?typename: :SepaDebitPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + type sepa_debit = + { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + attr_accessor bank_code: String? + + attr_accessor branch_code: String? + + attr_accessor country: String? + + attr_accessor last4: String? + + def initialize: ( + bank_code: String?, + branch_code: String?, + country: String?, + last4: String? + ) -> void + + def to_hash: -> { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::payment_method] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::platform] + end + + type product = { id: String, route: String, title: String } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor route: String + + attr_accessor title: String + + def initialize: (id: String, route: String, title: String) -> void + + def to_hash: -> { id: String, route: String, title: String } + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_retrieve_params.rbs b/sig/whop_sdk/models/ad_campaign_retrieve_params.rbs new file mode 100644 index 00000000..ec681b75 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_retrieve_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_campaign_retrieve_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdCampaignRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_retrieve_response.rbs b/sig/whop_sdk/models/ad_campaign_retrieve_response.rbs new file mode 100644 index 00000000..0c7cd95c --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_retrieve_response.rbs @@ -0,0 +1,642 @@ +module WhopSDK + module Models + type ad_campaign_retrieve_response = + { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignRetrieveResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignRetrieveResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignRetrieveResponse::platform?, + product: WhopSDK::Models::AdCampaignRetrieveResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignRetrieveResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + class AdCampaignRetrieveResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor available_budget: Float + + attr_accessor billing_ledger_account: WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount? + + attr_accessor clicks_count: Integer + + attr_accessor config: WhopSDK::Models::AdCampaignRetrieveResponse::Config? + + attr_accessor created_at: Time + + attr_accessor created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser + + attr_accessor daily_budget: Float? + + attr_accessor impressions_count: Integer + + attr_accessor paused_until: Time? + + attr_accessor payment_method: WhopSDK::Models::AdCampaignRetrieveResponse::payment_method? + + attr_accessor platform: WhopSDK::Models::AdCampaignRetrieveResponse::platform? + + attr_accessor product: WhopSDK::Models::AdCampaignRetrieveResponse::Product? + + attr_accessor purchases_count: Integer + + attr_accessor remaining_balance: Float + + attr_accessor return_on_ad_spend: Float + + attr_accessor revenue: Float + + attr_accessor status: WhopSDK::Models::AdCampaignRetrieveResponse::status + + attr_accessor target_country_codes: ::Array[String] + + attr_accessor title: String + + attr_accessor todays_spend: Float + + attr_accessor total_credits: Float + + attr_accessor total_spend: Float + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignRetrieveResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignRetrieveResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignRetrieveResponse::platform?, + product: WhopSDK::Models::AdCampaignRetrieveResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignRetrieveResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignRetrieveResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignRetrieveResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignRetrieveResponse::platform?, + product: WhopSDK::Models::AdCampaignRetrieveResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignRetrieveResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + type billing_ledger_account = { id: String } + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignRetrieveResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignRetrieveResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignRetrieveResponse::Config::status? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdCampaignRetrieveResponse::Config::bid_strategy? + + attr_accessor budget_optimization: bool? + + attr_accessor end_time: String? + + attr_accessor objective: WhopSDK::Models::AdCampaignRetrieveResponse::Config::objective? + + attr_accessor special_categories: ::Array[String]? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdCampaignRetrieveResponse::Config::status? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignRetrieveResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignRetrieveResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignRetrieveResponse::Config::status? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignRetrieveResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignRetrieveResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignRetrieveResponse::Config::status? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::Config::bid_strategy] + end + + type objective = :awareness | :traffic | :engagement | :leads | :sales + + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS: :awareness + TRAFFIC: :traffic + ENGAGEMENT: :engagement + LEADS: :leads + SALES: :sales + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::Config::objective] + end + + type status = :active | :paused + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::Config::status] + end + end + + type created_by_user = { id: String, name: String?, username: String } + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor username: String + + def initialize: (id: String, name: String?, username: String) -> void + + def to_hash: -> { id: String, name: String?, username: String } + end + + type payment_method = + (WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::BasePaymentMethod + | WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod + | WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod + | WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod + | WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod + | WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod)? + + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + type base_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :BasePaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :BasePaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + end + + type card_payment_method = + { + id: String, + card: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor card: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CardPaymentMethod + + def initialize: ( + id: String, + card: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CardPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + card: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + type card = + { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + + class Card < WhopSDK::Internal::Type::BaseModel + attr_accessor brand: WhopSDK::Models::card_brands? + + attr_accessor exp_month: Integer? + + attr_accessor exp_year: Integer? + + attr_accessor last4: String? + + def initialize: ( + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + last4: String? + ) -> void + + def to_hash: -> { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + end + end + + type us_bank_account_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :UsBankAccountPaymentMethod + + attr_accessor us_bank_account: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + us_bank_account: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + ?typename: :UsBankAccountPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + type us_bank_account = + { account_type: String, bank_name: String, :last4 => String } + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor account_type: String + + attr_accessor bank_name: String + + attr_accessor last4: String + + def initialize: ( + account_type: String, + bank_name: String, + last4: String + ) -> void + + def to_hash: -> { + account_type: String, + bank_name: String, + :last4 => String + } + end + end + + type cashapp_payment_method = + { + id: String, + cashapp: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor cashapp: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CashappPaymentMethod + + def initialize: ( + id: String, + cashapp: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CashappPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + cashapp: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + type cashapp = { buyer_id: String?, cashtag: String? } + + class Cashapp < WhopSDK::Internal::Type::BaseModel + attr_accessor buyer_id: String? + + attr_accessor cashtag: String? + + def initialize: (buyer_id: String?, cashtag: String?) -> void + + def to_hash: -> { buyer_id: String?, cashtag: String? } + end + end + + type ideal_payment_method = + { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor ideal: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :IdealPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :IdealPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + type ideal = { bank: String?, bic: String? } + + class Ideal < WhopSDK::Internal::Type::BaseModel + attr_accessor bank: String? + + attr_accessor bic: String? + + def initialize: (bank: String?, bic: String?) -> void + + def to_hash: -> { bank: String?, bic: String? } + end + end + + type sepa_debit_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor sepa_debit: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + + attr_accessor typename: :SepaDebitPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + ?typename: :SepaDebitPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + type sepa_debit = + { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + attr_accessor bank_code: String? + + attr_accessor branch_code: String? + + attr_accessor country: String? + + attr_accessor last4: String? + + def initialize: ( + bank_code: String?, + branch_code: String?, + country: String?, + last4: String? + ) -> void + + def to_hash: -> { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::payment_method] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::platform] + end + + type product = { id: String, route: String, title: String } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor route: String + + attr_accessor title: String + + def initialize: (id: String, route: String, title: String) -> void + + def to_hash: -> { id: String, route: String, title: String } + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_unpause_params.rbs b/sig/whop_sdk/models/ad_campaign_unpause_params.rbs new file mode 100644 index 00000000..30be32c7 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_unpause_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_campaign_unpause_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdCampaignUnpauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_unpause_response.rbs b/sig/whop_sdk/models/ad_campaign_unpause_response.rbs new file mode 100644 index 00000000..4cbceed3 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_unpause_response.rbs @@ -0,0 +1,642 @@ +module WhopSDK + module Models + type ad_campaign_unpause_response = + { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignUnpauseResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignUnpauseResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignUnpauseResponse::platform?, + product: WhopSDK::Models::AdCampaignUnpauseResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUnpauseResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + class AdCampaignUnpauseResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor available_budget: Float + + attr_accessor billing_ledger_account: WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount? + + attr_accessor clicks_count: Integer + + attr_accessor config: WhopSDK::Models::AdCampaignUnpauseResponse::Config? + + attr_accessor created_at: Time + + attr_accessor created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser + + attr_accessor daily_budget: Float? + + attr_accessor impressions_count: Integer + + attr_accessor paused_until: Time? + + attr_accessor payment_method: WhopSDK::Models::AdCampaignUnpauseResponse::payment_method? + + attr_accessor platform: WhopSDK::Models::AdCampaignUnpauseResponse::platform? + + attr_accessor product: WhopSDK::Models::AdCampaignUnpauseResponse::Product? + + attr_accessor purchases_count: Integer + + attr_accessor remaining_balance: Float + + attr_accessor return_on_ad_spend: Float + + attr_accessor revenue: Float + + attr_accessor status: WhopSDK::Models::AdCampaignUnpauseResponse::status + + attr_accessor target_country_codes: ::Array[String] + + attr_accessor title: String + + attr_accessor todays_spend: Float + + attr_accessor total_credits: Float + + attr_accessor total_spend: Float + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignUnpauseResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignUnpauseResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignUnpauseResponse::platform?, + product: WhopSDK::Models::AdCampaignUnpauseResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUnpauseResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignUnpauseResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignUnpauseResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignUnpauseResponse::platform?, + product: WhopSDK::Models::AdCampaignUnpauseResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUnpauseResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + type billing_ledger_account = { id: String } + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignUnpauseResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignUnpauseResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignUnpauseResponse::Config::status? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdCampaignUnpauseResponse::Config::bid_strategy? + + attr_accessor budget_optimization: bool? + + attr_accessor end_time: String? + + attr_accessor objective: WhopSDK::Models::AdCampaignUnpauseResponse::Config::objective? + + attr_accessor special_categories: ::Array[String]? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdCampaignUnpauseResponse::Config::status? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignUnpauseResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignUnpauseResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignUnpauseResponse::Config::status? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignUnpauseResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignUnpauseResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignUnpauseResponse::Config::status? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::Config::bid_strategy] + end + + type objective = :awareness | :traffic | :engagement | :leads | :sales + + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS: :awareness + TRAFFIC: :traffic + ENGAGEMENT: :engagement + LEADS: :leads + SALES: :sales + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::Config::objective] + end + + type status = :active | :paused + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::Config::status] + end + end + + type created_by_user = { id: String, name: String?, username: String } + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor username: String + + def initialize: (id: String, name: String?, username: String) -> void + + def to_hash: -> { id: String, name: String?, username: String } + end + + type payment_method = + (WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::BasePaymentMethod + | WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod + | WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod + | WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod + | WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod + | WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod)? + + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + type base_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :BasePaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :BasePaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + end + + type card_payment_method = + { + id: String, + card: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor card: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CardPaymentMethod + + def initialize: ( + id: String, + card: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CardPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + card: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + type card = + { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + + class Card < WhopSDK::Internal::Type::BaseModel + attr_accessor brand: WhopSDK::Models::card_brands? + + attr_accessor exp_month: Integer? + + attr_accessor exp_year: Integer? + + attr_accessor last4: String? + + def initialize: ( + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + last4: String? + ) -> void + + def to_hash: -> { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + end + end + + type us_bank_account_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :UsBankAccountPaymentMethod + + attr_accessor us_bank_account: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + us_bank_account: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + ?typename: :UsBankAccountPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + type us_bank_account = + { account_type: String, bank_name: String, :last4 => String } + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor account_type: String + + attr_accessor bank_name: String + + attr_accessor last4: String + + def initialize: ( + account_type: String, + bank_name: String, + last4: String + ) -> void + + def to_hash: -> { + account_type: String, + bank_name: String, + :last4 => String + } + end + end + + type cashapp_payment_method = + { + id: String, + cashapp: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor cashapp: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CashappPaymentMethod + + def initialize: ( + id: String, + cashapp: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CashappPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + cashapp: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + type cashapp = { buyer_id: String?, cashtag: String? } + + class Cashapp < WhopSDK::Internal::Type::BaseModel + attr_accessor buyer_id: String? + + attr_accessor cashtag: String? + + def initialize: (buyer_id: String?, cashtag: String?) -> void + + def to_hash: -> { buyer_id: String?, cashtag: String? } + end + end + + type ideal_payment_method = + { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor ideal: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :IdealPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :IdealPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + type ideal = { bank: String?, bic: String? } + + class Ideal < WhopSDK::Internal::Type::BaseModel + attr_accessor bank: String? + + attr_accessor bic: String? + + def initialize: (bank: String?, bic: String?) -> void + + def to_hash: -> { bank: String?, bic: String? } + end + end + + type sepa_debit_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor sepa_debit: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + + attr_accessor typename: :SepaDebitPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + ?typename: :SepaDebitPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + type sepa_debit = + { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + attr_accessor bank_code: String? + + attr_accessor branch_code: String? + + attr_accessor country: String? + + attr_accessor last4: String? + + def initialize: ( + bank_code: String?, + branch_code: String?, + country: String?, + last4: String? + ) -> void + + def to_hash: -> { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::payment_method] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::platform] + end + + type product = { id: String, route: String, title: String } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor route: String + + attr_accessor title: String + + def initialize: (id: String, route: String, title: String) -> void + + def to_hash: -> { id: String, route: String, title: String } + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_update_params.rbs b/sig/whop_sdk/models/ad_campaign_update_params.rbs new file mode 100644 index 00000000..04ab8aa2 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_update_params.rbs @@ -0,0 +1,171 @@ +module WhopSDK + module Models + type ad_campaign_update_params = + { + id: String, + ad_creative_set_ids: ::Array[String]?, + budget: Float?, + budget_type: WhopSDK::Models::AdCampaignUpdateParams::budget_type?, + config: WhopSDK::AdCampaignUpdateParams::Config?, + daily_budget: Float?, + product_id: String?, + target_country_codes: ::Array[String]?, + title: String? + } + & WhopSDK::Internal::Type::request_parameters + + class AdCampaignUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor ad_creative_set_ids: ::Array[String]? + + attr_accessor budget: Float? + + attr_accessor budget_type: WhopSDK::Models::AdCampaignUpdateParams::budget_type? + + attr_accessor config: WhopSDK::AdCampaignUpdateParams::Config? + + attr_accessor daily_budget: Float? + + attr_accessor product_id: String? + + attr_accessor target_country_codes: ::Array[String]? + + attr_accessor title: String? + + def initialize: ( + id: String, + ?ad_creative_set_ids: ::Array[String]?, + ?budget: Float?, + ?budget_type: WhopSDK::Models::AdCampaignUpdateParams::budget_type?, + ?config: WhopSDK::AdCampaignUpdateParams::Config?, + ?daily_budget: Float?, + ?product_id: String?, + ?target_country_codes: ::Array[String]?, + ?title: String?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + id: String, + ad_creative_set_ids: ::Array[String]?, + budget: Float?, + budget_type: WhopSDK::Models::AdCampaignUpdateParams::budget_type?, + config: WhopSDK::AdCampaignUpdateParams::Config?, + daily_budget: Float?, + product_id: String?, + target_country_codes: ::Array[String]?, + title: String?, + request_options: WhopSDK::RequestOptions + } + + type budget_type = :daily | :lifetime + + module BudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY: :daily + LIFETIME: :lifetime + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateParams::budget_type] + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignUpdateParams::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + lifetime_budget: Integer?, + objective: WhopSDK::Models::AdCampaignUpdateParams::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignUpdateParams::Config::status? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdCampaignUpdateParams::Config::bid_strategy? + + attr_accessor budget_optimization: bool? + + attr_accessor end_time: String? + + attr_accessor lifetime_budget: Integer? + + attr_accessor objective: WhopSDK::Models::AdCampaignUpdateParams::Config::objective? + + attr_accessor special_categories: ::Array[String]? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdCampaignUpdateParams::Config::status? + + def initialize: ( + ?bid_amount: Integer?, + ?bid_strategy: WhopSDK::Models::AdCampaignUpdateParams::Config::bid_strategy?, + ?budget_optimization: bool?, + ?end_time: String?, + ?lifetime_budget: Integer?, + ?objective: WhopSDK::Models::AdCampaignUpdateParams::Config::objective?, + ?special_categories: ::Array[String]?, + ?start_time: String?, + ?status: WhopSDK::Models::AdCampaignUpdateParams::Config::status? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignUpdateParams::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + lifetime_budget: Integer?, + objective: WhopSDK::Models::AdCampaignUpdateParams::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignUpdateParams::Config::status? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateParams::Config::bid_strategy] + end + + type objective = :awareness | :traffic | :engagement | :leads | :sales + + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS: :awareness + TRAFFIC: :traffic + ENGAGEMENT: :engagement + LEADS: :leads + SALES: :sales + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateParams::Config::objective] + end + + type status = :active | :paused + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateParams::Config::status] + end + end + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign_update_response.rbs b/sig/whop_sdk/models/ad_campaign_update_response.rbs new file mode 100644 index 00000000..936c0b75 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_update_response.rbs @@ -0,0 +1,642 @@ +module WhopSDK + module Models + type ad_campaign_update_response = + { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignUpdateResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignUpdateResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignUpdateResponse::platform?, + product: WhopSDK::Models::AdCampaignUpdateResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUpdateResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + class AdCampaignUpdateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor available_budget: Float + + attr_accessor billing_ledger_account: WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount? + + attr_accessor clicks_count: Integer + + attr_accessor config: WhopSDK::Models::AdCampaignUpdateResponse::Config? + + attr_accessor created_at: Time + + attr_accessor created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser + + attr_accessor daily_budget: Float? + + attr_accessor impressions_count: Integer + + attr_accessor paused_until: Time? + + attr_accessor payment_method: WhopSDK::Models::AdCampaignUpdateResponse::payment_method? + + attr_accessor platform: WhopSDK::Models::AdCampaignUpdateResponse::platform? + + attr_accessor product: WhopSDK::Models::AdCampaignUpdateResponse::Product? + + attr_accessor purchases_count: Integer + + attr_accessor remaining_balance: Float + + attr_accessor return_on_ad_spend: Float + + attr_accessor revenue: Float + + attr_accessor status: WhopSDK::Models::AdCampaignUpdateResponse::status + + attr_accessor target_country_codes: ::Array[String] + + attr_accessor title: String + + attr_accessor todays_spend: Float + + attr_accessor total_credits: Float + + attr_accessor total_spend: Float + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignUpdateResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignUpdateResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignUpdateResponse::platform?, + product: WhopSDK::Models::AdCampaignUpdateResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUpdateResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount?, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignUpdateResponse::Config?, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, + daily_budget: Float?, + impressions_count: Integer, + paused_until: Time?, + payment_method: WhopSDK::Models::AdCampaignUpdateResponse::payment_method?, + platform: WhopSDK::Models::AdCampaignUpdateResponse::platform?, + product: WhopSDK::Models::AdCampaignUpdateResponse::Product?, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUpdateResponse::status, + target_country_codes: ::Array[String], + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + + type billing_ledger_account = { id: String } + + class BillingLedgerAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignUpdateResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignUpdateResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignUpdateResponse::Config::status? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdCampaignUpdateResponse::Config::bid_strategy? + + attr_accessor budget_optimization: bool? + + attr_accessor end_time: String? + + attr_accessor objective: WhopSDK::Models::AdCampaignUpdateResponse::Config::objective? + + attr_accessor special_categories: ::Array[String]? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdCampaignUpdateResponse::Config::status? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignUpdateResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignUpdateResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignUpdateResponse::Config::status? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaignUpdateResponse::Config::bid_strategy?, + budget_optimization: bool?, + end_time: String?, + objective: WhopSDK::Models::AdCampaignUpdateResponse::Config::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaignUpdateResponse::Config::status? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::Config::bid_strategy] + end + + type objective = :awareness | :traffic | :engagement | :leads | :sales + + module Objective + extend WhopSDK::Internal::Type::Enum + + AWARENESS: :awareness + TRAFFIC: :traffic + ENGAGEMENT: :engagement + LEADS: :leads + SALES: :sales + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::Config::objective] + end + + type status = :active | :paused + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::Config::status] + end + end + + type created_by_user = { id: String, name: String?, username: String } + + class CreatedByUser < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor username: String + + def initialize: (id: String, name: String?, username: String) -> void + + def to_hash: -> { id: String, name: String?, username: String } + end + + type payment_method = + (WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::BasePaymentMethod + | WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod + | WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod + | WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod + | WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod + | WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod)? + + module PaymentMethod + extend WhopSDK::Internal::Type::Union + + type base_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + + class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :BasePaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :BasePaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :BasePaymentMethod + } + end + + type card_payment_method = + { + id: String, + card: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor card: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CardPaymentMethod + + def initialize: ( + id: String, + card: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CardPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + card: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CardPaymentMethod::Card, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CardPaymentMethod + } + + type card = + { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + + class Card < WhopSDK::Internal::Type::BaseModel + attr_accessor brand: WhopSDK::Models::card_brands? + + attr_accessor exp_month: Integer? + + attr_accessor exp_year: Integer? + + attr_accessor last4: String? + + def initialize: ( + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + last4: String? + ) -> void + + def to_hash: -> { + brand: WhopSDK::Models::card_brands?, + exp_month: Integer?, + exp_year: Integer?, + :last4 => String? + } + end + end + + type us_bank_account_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :UsBankAccountPaymentMethod + + attr_accessor us_bank_account: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + us_bank_account: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount, + ?typename: :UsBankAccountPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :UsBankAccountPaymentMethod, + us_bank_account: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::UsBankAccountPaymentMethod::UsBankAccount + } + + type us_bank_account = + { account_type: String, bank_name: String, :last4 => String } + + class UsBankAccount < WhopSDK::Internal::Type::BaseModel + attr_accessor account_type: String + + attr_accessor bank_name: String + + attr_accessor last4: String + + def initialize: ( + account_type: String, + bank_name: String, + last4: String + ) -> void + + def to_hash: -> { + account_type: String, + bank_name: String, + :last4 => String + } + end + end + + type cashapp_payment_method = + { + id: String, + cashapp: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + class CashappPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor cashapp: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :CashappPaymentMethod + + def initialize: ( + id: String, + cashapp: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :CashappPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + cashapp: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::CashappPaymentMethod::Cashapp, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :CashappPaymentMethod + } + + type cashapp = { buyer_id: String?, cashtag: String? } + + class Cashapp < WhopSDK::Internal::Type::BaseModel + attr_accessor buyer_id: String? + + attr_accessor cashtag: String? + + def initialize: (buyer_id: String?, cashtag: String?) -> void + + def to_hash: -> { buyer_id: String?, cashtag: String? } + end + end + + type ideal_payment_method = + { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + class IdealPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor ideal: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor typename: :IdealPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + ?typename: :IdealPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + ideal: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::IdealPaymentMethod::Ideal, + payment_method_type: WhopSDK::Models::payment_method_types, + typename: :IdealPaymentMethod + } + + type ideal = { bank: String?, bic: String? } + + class Ideal < WhopSDK::Internal::Type::BaseModel + attr_accessor bank: String? + + attr_accessor bic: String? + + def initialize: (bank: String?, bic: String?) -> void + + def to_hash: -> { bank: String?, bic: String? } + end + end + + type sepa_debit_payment_method = + { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + class SepaDebitPaymentMethod < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types + + attr_accessor sepa_debit: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit + + attr_accessor typename: :SepaDebitPaymentMethod + + def initialize: ( + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + ?typename: :SepaDebitPaymentMethod + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + payment_method_type: WhopSDK::Models::payment_method_types, + sepa_debit: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod::SepaDebitPaymentMethod::SepaDebit, + typename: :SepaDebitPaymentMethod + } + + type sepa_debit = + { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + + class SepaDebit < WhopSDK::Internal::Type::BaseModel + attr_accessor bank_code: String? + + attr_accessor branch_code: String? + + attr_accessor country: String? + + attr_accessor last4: String? + + def initialize: ( + bank_code: String?, + branch_code: String?, + country: String?, + last4: String? + ) -> void + + def to_hash: -> { + bank_code: String?, + branch_code: String?, + country: String?, + :last4 => String? + } + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::payment_method] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::platform] + end + + type product = { id: String, route: String, title: String } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor route: String + + attr_accessor title: String + + def initialize: (id: String, route: String, title: String) -> void + + def to_hash: -> { id: String, route: String, title: String } + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_create_params.rbs b/sig/whop_sdk/models/ad_create_params.rbs new file mode 100644 index 00000000..0a998856 --- /dev/null +++ b/sig/whop_sdk/models/ad_create_params.rbs @@ -0,0 +1,856 @@ +module WhopSDK + module Models + type ad_create_params = + { + ad_group_id: String, + creative_set_id: String?, + existing_instagram_media_id: String?, + existing_post_id: String?, + platform_config: WhopSDK::AdCreateParams::PlatformConfig?, + status: WhopSDK::Models::AdCreateParams::status? + } + & WhopSDK::Internal::Type::request_parameters + + class AdCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor ad_group_id: String + + attr_accessor creative_set_id: String? + + attr_accessor existing_instagram_media_id: String? + + attr_accessor existing_post_id: String? + + attr_accessor platform_config: WhopSDK::AdCreateParams::PlatformConfig? + + attr_accessor status: WhopSDK::Models::AdCreateParams::status? + + def initialize: ( + ad_group_id: String, + ?creative_set_id: String?, + ?existing_instagram_media_id: String?, + ?existing_post_id: String?, + ?platform_config: WhopSDK::AdCreateParams::PlatformConfig?, + ?status: WhopSDK::Models::AdCreateParams::status?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + ad_group_id: String, + creative_set_id: String?, + existing_instagram_media_id: String?, + existing_post_id: String?, + platform_config: WhopSDK::AdCreateParams::PlatformConfig?, + status: WhopSDK::Models::AdCreateParams::status?, + request_options: WhopSDK::RequestOptions + } + + type platform_config = + { + meta: WhopSDK::AdCreateParams::PlatformConfig::Meta?, + tiktok: WhopSDK::AdCreateParams::PlatformConfig::Tiktok? + } + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + attr_accessor meta: WhopSDK::AdCreateParams::PlatformConfig::Meta? + + attr_accessor tiktok: WhopSDK::AdCreateParams::PlatformConfig::Tiktok? + + def initialize: ( + ?meta: WhopSDK::AdCreateParams::PlatformConfig::Meta?, + ?tiktok: WhopSDK::AdCreateParams::PlatformConfig::Tiktok? + ) -> void + + def to_hash: -> { + meta: WhopSDK::AdCreateParams::PlatformConfig::Meta?, + tiktok: WhopSDK::AdCreateParams::PlatformConfig::Tiktok? + } + + type meta = + { + call_to_action_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::call_to_action_type?, + carousel_cards: ::Array[WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard]?, + description: String?, + descriptions: ::Array[String]?, + existing_instagram_media_id: String?, + existing_post_id: String?, + headline: String?, + headlines: ::Array[String]?, + instagram_actor_id: String?, + lead_form_config: ::Hash[Symbol, top]?, + link_url: String?, + multi_advertiser_enrollment: WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::multi_advertiser_enrollment?, + name: String?, + page_id: String?, + page_welcome_message: ::Hash[Symbol, top]?, + primary_text: String?, + primary_texts: ::Array[String]?, + url_tags: String? + } + + class Meta < WhopSDK::Internal::Type::BaseModel + attr_accessor call_to_action_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::call_to_action_type? + + attr_accessor carousel_cards: ::Array[WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard]? + + attr_accessor description: String? + + attr_accessor descriptions: ::Array[String]? + + attr_accessor existing_instagram_media_id: String? + + attr_accessor existing_post_id: String? + + attr_accessor headline: String? + + attr_accessor headlines: ::Array[String]? + + attr_accessor instagram_actor_id: String? + + attr_accessor lead_form_config: ::Hash[Symbol, top]? + + attr_accessor link_url: String? + + attr_accessor multi_advertiser_enrollment: WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::multi_advertiser_enrollment? + + attr_accessor name: String? + + attr_accessor page_id: String? + + attr_accessor page_welcome_message: ::Hash[Symbol, top]? + + attr_accessor primary_text: String? + + attr_accessor primary_texts: ::Array[String]? + + attr_accessor url_tags: String? + + def initialize: ( + ?call_to_action_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::call_to_action_type?, + ?carousel_cards: ::Array[WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard]?, + ?description: String?, + ?descriptions: ::Array[String]?, + ?existing_instagram_media_id: String?, + ?existing_post_id: String?, + ?headline: String?, + ?headlines: ::Array[String]?, + ?instagram_actor_id: String?, + ?lead_form_config: ::Hash[Symbol, top]?, + ?link_url: String?, + ?multi_advertiser_enrollment: WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::multi_advertiser_enrollment?, + ?name: String?, + ?page_id: String?, + ?page_welcome_message: ::Hash[Symbol, top]?, + ?primary_text: String?, + ?primary_texts: ::Array[String]?, + ?url_tags: String? + ) -> void + + def to_hash: -> { + call_to_action_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::call_to_action_type?, + carousel_cards: ::Array[WhopSDK::AdCreateParams::PlatformConfig::Meta::CarouselCard]?, + description: String?, + descriptions: ::Array[String]?, + existing_instagram_media_id: String?, + existing_post_id: String?, + headline: String?, + headlines: ::Array[String]?, + instagram_actor_id: String?, + lead_form_config: ::Hash[Symbol, top]?, + link_url: String?, + multi_advertiser_enrollment: WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::multi_advertiser_enrollment?, + name: String?, + page_id: String?, + page_welcome_message: ::Hash[Symbol, top]?, + primary_text: String?, + primary_texts: ::Array[String]?, + url_tags: String? + } + + type call_to_action_type = + :LEARN_MORE + | :SHOP_NOW + | :SIGN_UP + | :SUBSCRIBE + | :GET_STARTED + | :BOOK_NOW + | :APPLY_NOW + | :CONTACT_US + | :DOWNLOAD + | :ORDER_NOW + | :BUY_NOW + | :GET_QUOTE + | :MESSAGE_PAGE + | :WHATSAPP_MESSAGE + | :INSTAGRAM_MESSAGE + | :CALL_NOW + | :GET_DIRECTIONS + | :SEND_UPDATES + | :GET_OFFER + | :WATCH_MORE + | :LISTEN_NOW + | :PLAY_GAME + | :OPEN_LINK + | :NO_BUTTON + | :GET_OFFER_VIEW + | :GET_EVENT_TICKETS + | :SEE_MENU + | :REQUEST_TIME + | :EVENT_RSVP + | :SEE_DETAILS + + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE: :LEARN_MORE + SHOP_NOW: :SHOP_NOW + SIGN_UP: :SIGN_UP + SUBSCRIBE: :SUBSCRIBE + GET_STARTED: :GET_STARTED + BOOK_NOW: :BOOK_NOW + APPLY_NOW: :APPLY_NOW + CONTACT_US: :CONTACT_US + DOWNLOAD: :DOWNLOAD + ORDER_NOW: :ORDER_NOW + BUY_NOW: :BUY_NOW + GET_QUOTE: :GET_QUOTE + MESSAGE_PAGE: :MESSAGE_PAGE + WHATSAPP_MESSAGE: :WHATSAPP_MESSAGE + INSTAGRAM_MESSAGE: :INSTAGRAM_MESSAGE + CALL_NOW: :CALL_NOW + GET_DIRECTIONS: :GET_DIRECTIONS + SEND_UPDATES: :SEND_UPDATES + GET_OFFER: :GET_OFFER + WATCH_MORE: :WATCH_MORE + LISTEN_NOW: :LISTEN_NOW + PLAY_GAME: :PLAY_GAME + OPEN_LINK: :OPEN_LINK + NO_BUTTON: :NO_BUTTON + GET_OFFER_VIEW: :GET_OFFER_VIEW + GET_EVENT_TICKETS: :GET_EVENT_TICKETS + SEE_MENU: :SEE_MENU + REQUEST_TIME: :REQUEST_TIME + EVENT_RSVP: :EVENT_RSVP + SEE_DETAILS: :SEE_DETAILS + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::call_to_action_type] + end + + type carousel_card = + { + call_to_action_type: String?, + description: String?, + link: String?, + name: String? + } + + class CarouselCard < WhopSDK::Internal::Type::BaseModel + attr_accessor call_to_action_type: String? + + attr_accessor description: String? + + attr_accessor link: String? + + attr_accessor name: String? + + def initialize: ( + ?call_to_action_type: String?, + ?description: String?, + ?link: String?, + ?name: String? + ) -> void + + def to_hash: -> { + call_to_action_type: String?, + description: String?, + link: String?, + name: String? + } + end + + type multi_advertiser_enrollment = :OPT_IN | :OPT_OUT + + module MultiAdvertiserEnrollment + extend WhopSDK::Internal::Type::Enum + + OPT_IN: :OPT_IN + OPT_OUT: :OPT_OUT + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Meta::multi_advertiser_enrollment] + end + end + + type tiktok = + { + access_pass_tag: String?, + ad_format: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ad_format?, + ad_name: String?, + ad_text: String?, + ad_texts: ::Array[String]?, + aigc_disclosure_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::aigc_disclosure_type?, + auto_disclaimer_types: ::Array[String]?, + automate_creative_enabled: bool?, + brand_safety_postbid_partner: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::brand_safety_postbid_partner?, + brand_safety_vast_url: String?, + call_to_action: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action?, + call_to_action_enabled: bool?, + call_to_action_id: String?, + call_to_action_mode: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action_mode?, + card_id: String?, + carousel_image_index: Integer?, + catalog_id: String?, + click_tracking_url: String?, + cpp_url: String?, + creative_authorized: bool?, + creative_auto_enhancement_strategy_list: ::Array[String]?, + dark_post_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::dark_post_status?, + deeplink: String?, + deeplink_format_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::deeplink_format_type?, + deeplink_type: String?, + deeplink_utm_params: ::Array[::Hash[Symbol, top]]?, + disclaimer_clickable_texts: ::Array[::Hash[Symbol, top]]?, + disclaimer_text: String?, + disclaimer_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::disclaimer_type?, + dynamic_destination: String?, + dynamic_format: String?, + end_card_cta: String?, + fallback_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::fallback_type?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::identity_type?, + image_ids: ::Array[String]?, + impression_tracking_url: String?, + item_duet_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_duet_status?, + item_group_ids: ::Array[String]?, + item_stitch_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_stitch_status?, + landing_page_url: String?, + link_url: String?, + music_id: String?, + page_id: String?, + product_display_field_list: ::Array[String]?, + product_set_id: String?, + product_specific_type: String?, + promotional_music_disabled: bool?, + shopping_ads_fallback_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::shopping_ads_fallback_type?, + shopping_ads_video_package_id: String?, + showcase_products: ::Array[::Hash[Symbol, top]]?, + sku_ids: ::Array[String]?, + tiktok_item_id: String?, + tracking_app_id: String?, + tracking_message_event_set_id: String?, + tracking_offline_event_set_ids: ::Array[String]?, + tracking_pixel_id: String?, + utm_params: ::Array[::Hash[Symbol, top]]?, + vertical_video_strategy: String?, + video_id: String?, + video_view_tracking_url: String?, + viewability_postbid_partner: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::viewability_postbid_partner?, + viewability_vast_url: String? + } + + class Tiktok < WhopSDK::Internal::Type::BaseModel + attr_accessor access_pass_tag: String? + + attr_accessor ad_format: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ad_format? + + attr_accessor ad_name: String? + + attr_accessor ad_text: String? + + attr_accessor ad_texts: ::Array[String]? + + attr_accessor aigc_disclosure_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::aigc_disclosure_type? + + attr_accessor auto_disclaimer_types: ::Array[String]? + + attr_accessor automate_creative_enabled: bool? + + attr_accessor brand_safety_postbid_partner: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::brand_safety_postbid_partner? + + attr_accessor brand_safety_vast_url: String? + + attr_accessor call_to_action: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action? + + attr_accessor call_to_action_enabled: bool? + + attr_accessor call_to_action_id: String? + + attr_accessor call_to_action_mode: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action_mode? + + attr_accessor card_id: String? + + attr_accessor carousel_image_index: Integer? + + attr_accessor catalog_id: String? + + attr_accessor click_tracking_url: String? + + attr_accessor cpp_url: String? + + attr_accessor creative_authorized: bool? + + attr_accessor creative_auto_enhancement_strategy_list: ::Array[String]? + + attr_accessor dark_post_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::dark_post_status? + + attr_accessor deeplink: String? + + attr_accessor deeplink_format_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::deeplink_format_type? + + attr_accessor deeplink_type: String? + + attr_accessor deeplink_utm_params: ::Array[::Hash[Symbol, top]]? + + attr_accessor disclaimer_clickable_texts: ::Array[::Hash[Symbol, top]]? + + attr_accessor disclaimer_text: String? + + attr_accessor disclaimer_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::disclaimer_type? + + attr_accessor dynamic_destination: String? + + attr_accessor dynamic_format: String? + + attr_accessor end_card_cta: String? + + attr_accessor fallback_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::fallback_type? + + attr_accessor identity_authorized_bc_id: String? + + attr_accessor identity_id: String? + + attr_accessor identity_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::identity_type? + + attr_accessor image_ids: ::Array[String]? + + attr_accessor impression_tracking_url: String? + + attr_accessor item_duet_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_duet_status? + + attr_accessor item_group_ids: ::Array[String]? + + attr_accessor item_stitch_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_stitch_status? + + attr_accessor landing_page_url: String? + + attr_accessor link_url: String? + + attr_accessor music_id: String? + + attr_accessor page_id: String? + + attr_accessor product_display_field_list: ::Array[String]? + + attr_accessor product_set_id: String? + + attr_accessor product_specific_type: String? + + attr_accessor promotional_music_disabled: bool? + + attr_accessor shopping_ads_fallback_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::shopping_ads_fallback_type? + + attr_accessor shopping_ads_video_package_id: String? + + attr_accessor showcase_products: ::Array[::Hash[Symbol, top]]? + + attr_accessor sku_ids: ::Array[String]? + + attr_accessor tiktok_item_id: String? + + attr_accessor tracking_app_id: String? + + attr_accessor tracking_message_event_set_id: String? + + attr_accessor tracking_offline_event_set_ids: ::Array[String]? + + attr_accessor tracking_pixel_id: String? + + attr_accessor utm_params: ::Array[::Hash[Symbol, top]]? + + attr_accessor vertical_video_strategy: String? + + attr_accessor video_id: String? + + attr_accessor video_view_tracking_url: String? + + attr_accessor viewability_postbid_partner: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::viewability_postbid_partner? + + attr_accessor viewability_vast_url: String? + + def initialize: ( + ?access_pass_tag: String?, + ?ad_format: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ad_format?, + ?ad_name: String?, + ?ad_text: String?, + ?ad_texts: ::Array[String]?, + ?aigc_disclosure_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::aigc_disclosure_type?, + ?auto_disclaimer_types: ::Array[String]?, + ?automate_creative_enabled: bool?, + ?brand_safety_postbid_partner: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::brand_safety_postbid_partner?, + ?brand_safety_vast_url: String?, + ?call_to_action: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action?, + ?call_to_action_enabled: bool?, + ?call_to_action_id: String?, + ?call_to_action_mode: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action_mode?, + ?card_id: String?, + ?carousel_image_index: Integer?, + ?catalog_id: String?, + ?click_tracking_url: String?, + ?cpp_url: String?, + ?creative_authorized: bool?, + ?creative_auto_enhancement_strategy_list: ::Array[String]?, + ?dark_post_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::dark_post_status?, + ?deeplink: String?, + ?deeplink_format_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::deeplink_format_type?, + ?deeplink_type: String?, + ?deeplink_utm_params: ::Array[::Hash[Symbol, top]]?, + ?disclaimer_clickable_texts: ::Array[::Hash[Symbol, top]]?, + ?disclaimer_text: String?, + ?disclaimer_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::disclaimer_type?, + ?dynamic_destination: String?, + ?dynamic_format: String?, + ?end_card_cta: String?, + ?fallback_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::fallback_type?, + ?identity_authorized_bc_id: String?, + ?identity_id: String?, + ?identity_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::identity_type?, + ?image_ids: ::Array[String]?, + ?impression_tracking_url: String?, + ?item_duet_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_duet_status?, + ?item_group_ids: ::Array[String]?, + ?item_stitch_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_stitch_status?, + ?landing_page_url: String?, + ?link_url: String?, + ?music_id: String?, + ?page_id: String?, + ?product_display_field_list: ::Array[String]?, + ?product_set_id: String?, + ?product_specific_type: String?, + ?promotional_music_disabled: bool?, + ?shopping_ads_fallback_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::shopping_ads_fallback_type?, + ?shopping_ads_video_package_id: String?, + ?showcase_products: ::Array[::Hash[Symbol, top]]?, + ?sku_ids: ::Array[String]?, + ?tiktok_item_id: String?, + ?tracking_app_id: String?, + ?tracking_message_event_set_id: String?, + ?tracking_offline_event_set_ids: ::Array[String]?, + ?tracking_pixel_id: String?, + ?utm_params: ::Array[::Hash[Symbol, top]]?, + ?vertical_video_strategy: String?, + ?video_id: String?, + ?video_view_tracking_url: String?, + ?viewability_postbid_partner: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::viewability_postbid_partner?, + ?viewability_vast_url: String? + ) -> void + + def to_hash: -> { + access_pass_tag: String?, + ad_format: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ad_format?, + ad_name: String?, + ad_text: String?, + ad_texts: ::Array[String]?, + aigc_disclosure_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::aigc_disclosure_type?, + auto_disclaimer_types: ::Array[String]?, + automate_creative_enabled: bool?, + brand_safety_postbid_partner: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::brand_safety_postbid_partner?, + brand_safety_vast_url: String?, + call_to_action: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action?, + call_to_action_enabled: bool?, + call_to_action_id: String?, + call_to_action_mode: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action_mode?, + card_id: String?, + carousel_image_index: Integer?, + catalog_id: String?, + click_tracking_url: String?, + cpp_url: String?, + creative_authorized: bool?, + creative_auto_enhancement_strategy_list: ::Array[String]?, + dark_post_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::dark_post_status?, + deeplink: String?, + deeplink_format_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::deeplink_format_type?, + deeplink_type: String?, + deeplink_utm_params: ::Array[::Hash[Symbol, top]]?, + disclaimer_clickable_texts: ::Array[::Hash[Symbol, top]]?, + disclaimer_text: String?, + disclaimer_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::disclaimer_type?, + dynamic_destination: String?, + dynamic_format: String?, + end_card_cta: String?, + fallback_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::fallback_type?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::identity_type?, + image_ids: ::Array[String]?, + impression_tracking_url: String?, + item_duet_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_duet_status?, + item_group_ids: ::Array[String]?, + item_stitch_status: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_stitch_status?, + landing_page_url: String?, + link_url: String?, + music_id: String?, + page_id: String?, + product_display_field_list: ::Array[String]?, + product_set_id: String?, + product_specific_type: String?, + promotional_music_disabled: bool?, + shopping_ads_fallback_type: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::shopping_ads_fallback_type?, + shopping_ads_video_package_id: String?, + showcase_products: ::Array[::Hash[Symbol, top]]?, + sku_ids: ::Array[String]?, + tiktok_item_id: String?, + tracking_app_id: String?, + tracking_message_event_set_id: String?, + tracking_offline_event_set_ids: ::Array[String]?, + tracking_pixel_id: String?, + utm_params: ::Array[::Hash[Symbol, top]]?, + vertical_video_strategy: String?, + video_id: String?, + video_view_tracking_url: String?, + viewability_postbid_partner: WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::viewability_postbid_partner?, + viewability_vast_url: String? + } + + type ad_format = + :SINGLE_IMAGE + | :SINGLE_VIDEO + | :CAROUSEL_ADS + | :CATALOG_CAROUSEL + | :LIVE_CONTENT + + module AdFormat + extend WhopSDK::Internal::Type::Enum + + SINGLE_IMAGE: :SINGLE_IMAGE + SINGLE_VIDEO: :SINGLE_VIDEO + CAROUSEL_ADS: :CAROUSEL_ADS + CATALOG_CAROUSEL: :CATALOG_CAROUSEL + LIVE_CONTENT: :LIVE_CONTENT + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::ad_format] + end + + type aigc_disclosure_type = + :UNSET | :CONTAINS_AIGC | :IS_AIGC | :NOT_AIGC + + module AigcDisclosureType + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + CONTAINS_AIGC: :CONTAINS_AIGC + IS_AIGC: :IS_AIGC + NOT_AIGC: :NOT_AIGC + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::aigc_disclosure_type] + end + + type brand_safety_postbid_partner = + :UNSET | :IAS | :DOUBLE_VERIFY | :OPEN_SLATE | :ZEFR + + module BrandSafetyPostbidPartner + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + IAS: :IAS + DOUBLE_VERIFY: :DOUBLE_VERIFY + OPEN_SLATE: :OPEN_SLATE + ZEFR: :ZEFR + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::brand_safety_postbid_partner] + end + + type call_to_action = + :LEARN_MORE + | :DOWNLOAD + | :SHOP_NOW + | :SIGN_UP + | :CONTACT_US + | :APPLY_NOW + | :BOOK_NOW + | :PLAY_GAME + | :WATCH_NOW + | :READ_MORE + | :VIEW_NOW + | :GET_QUOTE + | :ORDER_NOW + | :INSTALL_NOW + | :GET_SHOWTIMES + | :LISTEN_NOW + | :INTERESTED + | :SUBSCRIBE + | :GET_TICKETS_NOW + | :EXPERIENCE_NOW + | :PRE_ORDER_NOW + | :VISIT_STORE + + module CallToAction + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE: :LEARN_MORE + DOWNLOAD: :DOWNLOAD + SHOP_NOW: :SHOP_NOW + SIGN_UP: :SIGN_UP + CONTACT_US: :CONTACT_US + APPLY_NOW: :APPLY_NOW + BOOK_NOW: :BOOK_NOW + PLAY_GAME: :PLAY_GAME + WATCH_NOW: :WATCH_NOW + READ_MORE: :READ_MORE + VIEW_NOW: :VIEW_NOW + GET_QUOTE: :GET_QUOTE + ORDER_NOW: :ORDER_NOW + INSTALL_NOW: :INSTALL_NOW + GET_SHOWTIMES: :GET_SHOWTIMES + LISTEN_NOW: :LISTEN_NOW + INTERESTED: :INTERESTED + SUBSCRIBE: :SUBSCRIBE + GET_TICKETS_NOW: :GET_TICKETS_NOW + EXPERIENCE_NOW: :EXPERIENCE_NOW + PRE_ORDER_NOW: :PRE_ORDER_NOW + VISIT_STORE: :VISIT_STORE + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action] + end + + type call_to_action_mode = :STANDARD | :DYNAMIC + + module CallToActionMode + extend WhopSDK::Internal::Type::Enum + + STANDARD: :STANDARD + DYNAMIC: :DYNAMIC + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::call_to_action_mode] + end + + type dark_post_status = :ON | :OFF + + module DarkPostStatus + extend WhopSDK::Internal::Type::Enum + + ON: :ON + OFF: :OFF + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::dark_post_status] + end + + type deeplink_format_type = :UNSET | :DEEPLINK | :DEFERRED_DEEPLINK + + module DeeplinkFormatType + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + DEEPLINK: :DEEPLINK + DEFERRED_DEEPLINK: :DEFERRED_DEEPLINK + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::deeplink_format_type] + end + + type disclaimer_type = :NONE | :DISCLAIMER_TEXT | :DISCLAIMER_WITH_URL + + module DisclaimerType + extend WhopSDK::Internal::Type::Enum + + NONE: :NONE + DISCLAIMER_TEXT: :DISCLAIMER_TEXT + DISCLAIMER_WITH_URL: :DISCLAIMER_WITH_URL + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::disclaimer_type] + end + + type fallback_type = :UNSET | :APP_STORE | :LANDING_PAGE + + module FallbackType + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + APP_STORE: :APP_STORE + LANDING_PAGE: :LANDING_PAGE + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::fallback_type] + end + + type identity_type = + :CUSTOMIZED_USER | :AUTH_CODE | :TT_USER | :BC_AUTH_TT + + module IdentityType + extend WhopSDK::Internal::Type::Enum + + CUSTOMIZED_USER: :CUSTOMIZED_USER + AUTH_CODE: :AUTH_CODE + TT_USER: :TT_USER + BC_AUTH_TT: :BC_AUTH_TT + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::identity_type] + end + + type item_duet_status = :ENABLE | :DISABLE + + module ItemDuetStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE: :ENABLE + DISABLE: :DISABLE + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_duet_status] + end + + type item_stitch_status = :ENABLE | :DISABLE + + module ItemStitchStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE: :ENABLE + DISABLE: :DISABLE + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::item_stitch_status] + end + + type shopping_ads_fallback_type = :UNSET | :LANDING_PAGE | :STORE + + module ShoppingAdsFallbackType + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + LANDING_PAGE: :LANDING_PAGE + STORE: :STORE + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::shopping_ads_fallback_type] + end + + type viewability_postbid_partner = + :UNSET | :IAS | :DOUBLE_VERIFY | :MOAT + + module ViewabilityPostbidPartner + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + IAS: :IAS + DOUBLE_VERIFY: :DOUBLE_VERIFY + MOAT: :MOAT + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::PlatformConfig::Tiktok::viewability_postbid_partner] + end + end + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateParams::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_create_response.rbs b/sig/whop_sdk/models/ad_create_response.rbs new file mode 100644 index 00000000..42f5f55a --- /dev/null +++ b/sig/whop_sdk/models/ad_create_response.rbs @@ -0,0 +1,440 @@ +module WhopSDK + module Models + type ad_create_response = + { + id: String, + created_at: Time, + external_ad_creative_set: WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet?, + external_ad_group: WhopSDK::Models::AdCreateResponse::ExternalAdGroup, + platform_config: WhopSDK::Models::AdCreateResponse::platform_config?, + status: WhopSDK::Models::AdCreateResponse::status, + updated_at: Time + } + + class AdCreateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor external_ad_creative_set: WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet? + + attr_accessor external_ad_group: WhopSDK::Models::AdCreateResponse::ExternalAdGroup + + attr_accessor platform_config: WhopSDK::Models::AdCreateResponse::platform_config? + + attr_accessor status: WhopSDK::Models::AdCreateResponse::status + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + created_at: Time, + external_ad_creative_set: WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet?, + external_ad_group: WhopSDK::Models::AdCreateResponse::ExternalAdGroup, + platform_config: WhopSDK::Models::AdCreateResponse::platform_config?, + status: WhopSDK::Models::AdCreateResponse::status, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + external_ad_creative_set: WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet?, + external_ad_group: WhopSDK::Models::AdCreateResponse::ExternalAdGroup, + platform_config: WhopSDK::Models::AdCreateResponse::platform_config?, + status: WhopSDK::Models::AdCreateResponse::status, + updated_at: Time + } + + type external_ad_creative_set = { id: String } + + class ExternalAdCreativeSet < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + + type external_ad_group = + { + id: String, + name: String?, + status: WhopSDK::Models::AdCreateResponse::ExternalAdGroup::status + } + + class ExternalAdGroup < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor status: WhopSDK::Models::AdCreateResponse::ExternalAdGroup::status + + def initialize: ( + id: String, + name: String?, + status: WhopSDK::Models::AdCreateResponse::ExternalAdGroup::status + ) -> void + + def to_hash: -> { + id: String, + name: String?, + status: WhopSDK::Models::AdCreateResponse::ExternalAdGroup::status + } + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateResponse::ExternalAdGroup::status] + end + end + + type platform_config = + (WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType + | WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType)? + + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + type meta_ad_platform_config_type = + { + call_to_action_type: WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + typename: :MetaAdPlatformConfigType, + url_tags: String? + } + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor call_to_action_type: WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type? + + attr_accessor headline: String? + + attr_accessor instagram_actor_id: String? + + attr_accessor link_url: String? + + attr_accessor name: String? + + attr_accessor page_id: String? + + attr_accessor platform: WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::platform + + attr_accessor primary_text: String? + + attr_accessor typename: :MetaAdPlatformConfigType + + attr_accessor url_tags: String? + + def initialize: ( + call_to_action_type: WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + url_tags: String?, + ?typename: :MetaAdPlatformConfigType + ) -> void + + def to_hash: -> { + call_to_action_type: WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + typename: :MetaAdPlatformConfigType, + url_tags: String? + } + + type call_to_action_type = + :LEARN_MORE + | :SHOP_NOW + | :SIGN_UP + | :SUBSCRIBE + | :GET_STARTED + | :BOOK_NOW + | :APPLY_NOW + | :CONTACT_US + | :DOWNLOAD + | :ORDER_NOW + | :BUY_NOW + | :GET_QUOTE + | :MESSAGE_PAGE + | :WHATSAPP_MESSAGE + | :INSTAGRAM_MESSAGE + | :CALL_NOW + | :GET_DIRECTIONS + | :SEND_UPDATES + | :GET_OFFER + | :WATCH_MORE + | :LISTEN_NOW + | :PLAY_GAME + | :OPEN_LINK + | :NO_BUTTON + | :GET_OFFER_VIEW + | :GET_EVENT_TICKETS + | :SEE_MENU + | :REQUEST_TIME + | :EVENT_RSVP + | :SEE_DETAILS + + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE: :LEARN_MORE + SHOP_NOW: :SHOP_NOW + SIGN_UP: :SIGN_UP + SUBSCRIBE: :SUBSCRIBE + GET_STARTED: :GET_STARTED + BOOK_NOW: :BOOK_NOW + APPLY_NOW: :APPLY_NOW + CONTACT_US: :CONTACT_US + DOWNLOAD: :DOWNLOAD + ORDER_NOW: :ORDER_NOW + BUY_NOW: :BUY_NOW + GET_QUOTE: :GET_QUOTE + MESSAGE_PAGE: :MESSAGE_PAGE + WHATSAPP_MESSAGE: :WHATSAPP_MESSAGE + INSTAGRAM_MESSAGE: :INSTAGRAM_MESSAGE + CALL_NOW: :CALL_NOW + GET_DIRECTIONS: :GET_DIRECTIONS + SEND_UPDATES: :SEND_UPDATES + GET_OFFER: :GET_OFFER + WATCH_MORE: :WATCH_MORE + LISTEN_NOW: :LISTEN_NOW + PLAY_GAME: :PLAY_GAME + OPEN_LINK: :OPEN_LINK + NO_BUTTON: :NO_BUTTON + GET_OFFER_VIEW: :GET_OFFER_VIEW + GET_EVENT_TICKETS: :GET_EVENT_TICKETS + SEE_MENU: :SEE_MENU + REQUEST_TIME: :REQUEST_TIME + EVENT_RSVP: :EVENT_RSVP + SEE_DETAILS: :SEE_DETAILS + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateResponse::PlatformConfig::MetaAdPlatformConfigType::platform] + end + end + + type tiktok_ad_platform_config_type = + { + ad_format: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + typename: :TiktokAdPlatformConfigType, + video_id: String? + } + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor ad_format: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format? + + attr_accessor ad_name: String? + + attr_accessor ad_text: String? + + attr_accessor call_to_action: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action? + + attr_accessor identity_authorized_bc_id: String? + + attr_accessor identity_id: String? + + attr_accessor identity_type: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type? + + attr_accessor image_ids: ::Array[String]? + + attr_accessor landing_page_url: String? + + attr_accessor platform: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::platform + + attr_accessor typename: :TiktokAdPlatformConfigType + + attr_accessor video_id: String? + + def initialize: ( + ad_format: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + video_id: String?, + ?typename: :TiktokAdPlatformConfigType + ) -> void + + def to_hash: -> { + ad_format: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + typename: :TiktokAdPlatformConfigType, + video_id: String? + } + + type ad_format = + :SINGLE_IMAGE + | :SINGLE_VIDEO + | :CAROUSEL_ADS + | :CATALOG_CAROUSEL + | :LIVE_CONTENT + + module AdFormat + extend WhopSDK::Internal::Type::Enum + + SINGLE_IMAGE: :SINGLE_IMAGE + SINGLE_VIDEO: :SINGLE_VIDEO + CAROUSEL_ADS: :CAROUSEL_ADS + CATALOG_CAROUSEL: :CATALOG_CAROUSEL + LIVE_CONTENT: :LIVE_CONTENT + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format] + end + + type call_to_action = + :LEARN_MORE + | :DOWNLOAD + | :SHOP_NOW + | :SIGN_UP + | :CONTACT_US + | :APPLY_NOW + | :BOOK_NOW + | :PLAY_GAME + | :WATCH_NOW + | :READ_MORE + | :VIEW_NOW + | :GET_QUOTE + | :ORDER_NOW + | :INSTALL_NOW + | :GET_SHOWTIMES + | :LISTEN_NOW + | :INTERESTED + | :SUBSCRIBE + | :GET_TICKETS_NOW + | :EXPERIENCE_NOW + | :PRE_ORDER_NOW + | :VISIT_STORE + + module CallToAction + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE: :LEARN_MORE + DOWNLOAD: :DOWNLOAD + SHOP_NOW: :SHOP_NOW + SIGN_UP: :SIGN_UP + CONTACT_US: :CONTACT_US + APPLY_NOW: :APPLY_NOW + BOOK_NOW: :BOOK_NOW + PLAY_GAME: :PLAY_GAME + WATCH_NOW: :WATCH_NOW + READ_MORE: :READ_MORE + VIEW_NOW: :VIEW_NOW + GET_QUOTE: :GET_QUOTE + ORDER_NOW: :ORDER_NOW + INSTALL_NOW: :INSTALL_NOW + GET_SHOWTIMES: :GET_SHOWTIMES + LISTEN_NOW: :LISTEN_NOW + INTERESTED: :INTERESTED + SUBSCRIBE: :SUBSCRIBE + GET_TICKETS_NOW: :GET_TICKETS_NOW + EXPERIENCE_NOW: :EXPERIENCE_NOW + PRE_ORDER_NOW: :PRE_ORDER_NOW + VISIT_STORE: :VISIT_STORE + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action] + end + + type identity_type = + :CUSTOMIZED_USER | :AUTH_CODE | :TT_USER | :BC_AUTH_TT + + module IdentityType + extend WhopSDK::Internal::Type::Enum + + CUSTOMIZED_USER: :CUSTOMIZED_USER + AUTH_CODE: :AUTH_CODE + TT_USER: :TT_USER + BC_AUTH_TT: :BC_AUTH_TT + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateResponse::PlatformConfig::TiktokAdPlatformConfigType::platform] + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdCreateResponse::platform_config] + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdCreateResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_group_create_params.rbs b/sig/whop_sdk/models/ad_group_create_params.rbs new file mode 100644 index 00000000..3fb3dca7 --- /dev/null +++ b/sig/whop_sdk/models/ad_group_create_params.rbs @@ -0,0 +1,2439 @@ +module WhopSDK + module Models + type ad_group_create_params = + { + campaign_id: String, + budget: Float?, + budget_type: WhopSDK::Models::AdGroupCreateParams::budget_type?, + config: WhopSDK::AdGroupCreateParams::Config?, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::AdGroupCreateParams::PlatformConfig?, + status: WhopSDK::Models::AdGroupCreateParams::status? + } + & WhopSDK::Internal::Type::request_parameters + + class AdGroupCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor campaign_id: String + + attr_accessor budget: Float? + + attr_accessor budget_type: WhopSDK::Models::AdGroupCreateParams::budget_type? + + attr_accessor config: WhopSDK::AdGroupCreateParams::Config? + + attr_accessor daily_budget: Float? + + attr_accessor name: String? + + attr_accessor platform_config: WhopSDK::AdGroupCreateParams::PlatformConfig? + + attr_accessor status: WhopSDK::Models::AdGroupCreateParams::status? + + def initialize: ( + campaign_id: String, + ?budget: Float?, + ?budget_type: WhopSDK::Models::AdGroupCreateParams::budget_type?, + ?config: WhopSDK::AdGroupCreateParams::Config?, + ?daily_budget: Float?, + ?name: String?, + ?platform_config: WhopSDK::AdGroupCreateParams::PlatformConfig?, + ?status: WhopSDK::Models::AdGroupCreateParams::status?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + campaign_id: String, + budget: Float?, + budget_type: WhopSDK::Models::AdGroupCreateParams::budget_type?, + config: WhopSDK::AdGroupCreateParams::Config?, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::AdGroupCreateParams::PlatformConfig?, + status: WhopSDK::Models::AdGroupCreateParams::status?, + request_options: WhopSDK::RequestOptions + } + + type budget_type = :daily | :lifetime + + module BudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY: :daily + LIFETIME: :lifetime + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::budget_type] + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateParams::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateParams::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupCreateParams::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateParams::Config::pacing?, + start_time: String?, + targeting: WhopSDK::AdGroupCreateParams::Config::Targeting? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupCreateParams::Config::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupCreateParams::Config::billing_event? + + attr_accessor end_time: String? + + attr_accessor frequency_cap: Integer? + + attr_accessor frequency_cap_interval_days: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupCreateParams::Config::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupCreateParams::Config::pacing? + + attr_accessor start_time: String? + + attr_accessor targeting: WhopSDK::AdGroupCreateParams::Config::Targeting? + + def initialize: ( + ?bid_amount: Integer?, + ?bid_strategy: WhopSDK::Models::AdGroupCreateParams::Config::bid_strategy?, + ?billing_event: WhopSDK::Models::AdGroupCreateParams::Config::billing_event?, + ?end_time: String?, + ?frequency_cap: Integer?, + ?frequency_cap_interval_days: Integer?, + ?optimization_goal: WhopSDK::Models::AdGroupCreateParams::Config::optimization_goal?, + ?pacing: WhopSDK::Models::AdGroupCreateParams::Config::pacing?, + ?start_time: String?, + ?targeting: WhopSDK::AdGroupCreateParams::Config::Targeting? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateParams::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateParams::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupCreateParams::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateParams::Config::pacing?, + start_time: String?, + targeting: WhopSDK::AdGroupCreateParams::Config::Targeting? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::Config::bid_strategy] + end + + type billing_event = + :impressions | :clicks | :optimized_cpm | :video_views + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS: :impressions + CLICKS: :clicks + OPTIMIZED_CPM: :optimized_cpm + VIDEO_VIEWS: :video_views + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::Config::billing_event] + end + + type optimization_goal = + :conversions + | :link_clicks + | :landing_page_views + | :reach + | :impressions + | :app_installs + | :video_views + | :lead_generation + | :value + | :page_likes + | :conversations + | :ad_recall_lift + | :two_second_continuous_video_views + | :post_engagement + | :event_responses + | :reminders_set + | :quality_lead + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS: :conversions + LINK_CLICKS: :link_clicks + LANDING_PAGE_VIEWS: :landing_page_views + REACH: :reach + IMPRESSIONS: :impressions + APP_INSTALLS: :app_installs + VIDEO_VIEWS: :video_views + LEAD_GENERATION: :lead_generation + VALUE: :value + PAGE_LIKES: :page_likes + CONVERSATIONS: :conversations + AD_RECALL_LIFT: :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :two_second_continuous_video_views + POST_ENGAGEMENT: :post_engagement + EVENT_RESPONSES: :event_responses + REMINDERS_SET: :reminders_set + QUALITY_LEAD: :quality_lead + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::Config::optimization_goal] + end + + type pacing = :standard | :accelerated + + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD: :standard + ACCELERATED: :accelerated + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::Config::pacing] + end + + type targeting = + { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupCreateParams::Config::Targeting::placement_type? + } + + class Targeting < WhopSDK::Internal::Type::BaseModel + attr_accessor age_max: Integer? + + attr_accessor age_min: Integer? + + attr_accessor countries: ::Array[String]? + + attr_accessor device_platforms: ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::device_platform]? + + attr_accessor exclude_audience_ids: ::Array[String]? + + attr_accessor genders: ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::gender]? + + attr_accessor include_audience_ids: ::Array[String]? + + attr_accessor interest_ids: ::Array[String]? + + attr_accessor languages: ::Array[String]? + + attr_accessor placement_type: WhopSDK::Models::AdGroupCreateParams::Config::Targeting::placement_type? + + def initialize: ( + ?age_max: Integer?, + ?age_min: Integer?, + ?countries: ::Array[String]?, + ?device_platforms: ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::device_platform]?, + ?exclude_audience_ids: ::Array[String]?, + ?genders: ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::gender]?, + ?include_audience_ids: ::Array[String]?, + ?interest_ids: ::Array[String]?, + ?languages: ::Array[String]?, + ?placement_type: WhopSDK::Models::AdGroupCreateParams::Config::Targeting::placement_type? + ) -> void + + def to_hash: -> { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupCreateParams::Config::Targeting::placement_type? + } + + type device_platform = :mobile | :desktop + + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE: :mobile + DESKTOP: :desktop + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::device_platform] + end + + type gender = :male | :female | :all + + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE: :male + FEMALE: :female + ALL: :all + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::gender] + end + + type placement_type = :automatic | :manual + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC: :automatic + MANUAL: :manual + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::Config::Targeting::placement_type] + end + end + end + + type platform_config = + { + meta: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta?, + tiktok: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok? + } + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + attr_accessor meta: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta? + + attr_accessor tiktok: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok? + + def initialize: ( + ?meta: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta?, + ?tiktok: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok? + ) -> void + + def to_hash: -> { + meta: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta?, + tiktok: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok? + } + + type meta = + { + android_devices: ::Array[String]?, + attribution_setting: String?, + attribution_spec: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec]?, + audience_network_positions: ::Array[String]?, + audience_type: String?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::billing_event?, + brand_safety_content_filter_levels: ::Array[String]?, + budget_remaining: String?, + cost_per_result_goal: Float?, + created_time: String?, + daily_budget: Integer?, + daily_min_spend_target: String?, + daily_spend_cap: String?, + destination_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::destination_type?, + dsa_beneficiary: String?, + dsa_payor: String?, + end_time: String?, + excluded_geo_locations: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations?, + facebook_positions: ::Array[String]?, + frequency_control_count: Integer?, + frequency_control_days: Integer?, + frequency_control_type: String?, + geo_cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity]?, + geo_locations: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations?, + geo_regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion]?, + geo_zips: ::Array[String]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + ios_devices: ::Array[String]?, + is_dynamic_creative: bool?, + lead_conversion_location: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::lead_conversion_location?, + lead_form_config: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig?, + lead_gen_form_id: String?, + lifetime_budget: Integer?, + lifetime_min_spend_target: String?, + lifetime_spend_cap: String?, + location_types: ::Array[String]?, + messenger_positions: ::Array[String]?, + optimization_goal: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::optimization_goal?, + page_id: String?, + pixel_id: String?, + promoted_object: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject?, + publisher_platforms: ::Array[String]?, + source_adset_id: String?, + start_time: String?, + status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::status?, + targeting_automation: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation?, + threads_positions: ::Array[String]?, + updated_time: String?, + user_device: ::Array[String]?, + user_os: ::Array[String]?, + whatsapp_phone_number: String?, + whatsapp_positions: ::Array[String]? + } + + class Meta < WhopSDK::Internal::Type::BaseModel + attr_accessor android_devices: ::Array[String]? + + attr_accessor attribution_setting: String? + + attr_accessor attribution_spec: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec]? + + attr_accessor audience_network_positions: ::Array[String]? + + attr_accessor audience_type: String? + + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::billing_event? + + attr_accessor brand_safety_content_filter_levels: ::Array[String]? + + attr_accessor budget_remaining: String? + + attr_accessor cost_per_result_goal: Float? + + attr_accessor created_time: String? + + attr_accessor daily_budget: Integer? + + attr_accessor daily_min_spend_target: String? + + attr_accessor daily_spend_cap: String? + + attr_accessor destination_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::destination_type? + + attr_accessor dsa_beneficiary: String? + + attr_accessor dsa_payor: String? + + attr_accessor end_time: String? + + attr_accessor excluded_geo_locations: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations? + + attr_accessor facebook_positions: ::Array[String]? + + attr_accessor frequency_control_count: Integer? + + attr_accessor frequency_control_days: Integer? + + attr_accessor frequency_control_type: String? + + attr_accessor geo_cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity]? + + attr_accessor geo_locations: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations? + + attr_accessor geo_regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion]? + + attr_accessor geo_zips: ::Array[String]? + + attr_accessor instagram_actor_id: String? + + attr_accessor instagram_positions: ::Array[String]? + + attr_accessor ios_devices: ::Array[String]? + + attr_accessor is_dynamic_creative: bool? + + attr_accessor lead_conversion_location: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::lead_conversion_location? + + attr_accessor lead_form_config: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig? + + attr_accessor lead_gen_form_id: String? + + attr_accessor lifetime_budget: Integer? + + attr_accessor lifetime_min_spend_target: String? + + attr_accessor lifetime_spend_cap: String? + + attr_accessor location_types: ::Array[String]? + + attr_accessor messenger_positions: ::Array[String]? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::optimization_goal? + + attr_accessor page_id: String? + + attr_accessor pixel_id: String? + + attr_accessor promoted_object: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject? + + attr_accessor publisher_platforms: ::Array[String]? + + attr_accessor source_adset_id: String? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::status? + + attr_accessor targeting_automation: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation? + + attr_accessor threads_positions: ::Array[String]? + + attr_accessor updated_time: String? + + attr_accessor user_device: ::Array[String]? + + attr_accessor user_os: ::Array[String]? + + attr_accessor whatsapp_phone_number: String? + + attr_accessor whatsapp_positions: ::Array[String]? + + def initialize: ( + ?android_devices: ::Array[String]?, + ?attribution_setting: String?, + ?attribution_spec: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec]?, + ?audience_network_positions: ::Array[String]?, + ?audience_type: String?, + ?bid_amount: Integer?, + ?bid_strategy: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::bid_strategy?, + ?billing_event: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::billing_event?, + ?brand_safety_content_filter_levels: ::Array[String]?, + ?budget_remaining: String?, + ?cost_per_result_goal: Float?, + ?created_time: String?, + ?daily_budget: Integer?, + ?daily_min_spend_target: String?, + ?daily_spend_cap: String?, + ?destination_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::destination_type?, + ?dsa_beneficiary: String?, + ?dsa_payor: String?, + ?end_time: String?, + ?excluded_geo_locations: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations?, + ?facebook_positions: ::Array[String]?, + ?frequency_control_count: Integer?, + ?frequency_control_days: Integer?, + ?frequency_control_type: String?, + ?geo_cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity]?, + ?geo_locations: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations?, + ?geo_regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion]?, + ?geo_zips: ::Array[String]?, + ?instagram_actor_id: String?, + ?instagram_positions: ::Array[String]?, + ?ios_devices: ::Array[String]?, + ?is_dynamic_creative: bool?, + ?lead_conversion_location: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::lead_conversion_location?, + ?lead_form_config: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig?, + ?lead_gen_form_id: String?, + ?lifetime_budget: Integer?, + ?lifetime_min_spend_target: String?, + ?lifetime_spend_cap: String?, + ?location_types: ::Array[String]?, + ?messenger_positions: ::Array[String]?, + ?optimization_goal: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::optimization_goal?, + ?page_id: String?, + ?pixel_id: String?, + ?promoted_object: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject?, + ?publisher_platforms: ::Array[String]?, + ?source_adset_id: String?, + ?start_time: String?, + ?status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::status?, + ?targeting_automation: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation?, + ?threads_positions: ::Array[String]?, + ?updated_time: String?, + ?user_device: ::Array[String]?, + ?user_os: ::Array[String]?, + ?whatsapp_phone_number: String?, + ?whatsapp_positions: ::Array[String]? + ) -> void + + def to_hash: -> { + android_devices: ::Array[String]?, + attribution_setting: String?, + attribution_spec: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::AttributionSpec]?, + audience_network_positions: ::Array[String]?, + audience_type: String?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::billing_event?, + brand_safety_content_filter_levels: ::Array[String]?, + budget_remaining: String?, + cost_per_result_goal: Float?, + created_time: String?, + daily_budget: Integer?, + daily_min_spend_target: String?, + daily_spend_cap: String?, + destination_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::destination_type?, + dsa_beneficiary: String?, + dsa_payor: String?, + end_time: String?, + excluded_geo_locations: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations?, + facebook_positions: ::Array[String]?, + frequency_control_count: Integer?, + frequency_control_days: Integer?, + frequency_control_type: String?, + geo_cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoCity]?, + geo_locations: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations?, + geo_regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoRegion]?, + geo_zips: ::Array[String]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + ios_devices: ::Array[String]?, + is_dynamic_creative: bool?, + lead_conversion_location: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::lead_conversion_location?, + lead_form_config: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig?, + lead_gen_form_id: String?, + lifetime_budget: Integer?, + lifetime_min_spend_target: String?, + lifetime_spend_cap: String?, + location_types: ::Array[String]?, + messenger_positions: ::Array[String]?, + optimization_goal: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::optimization_goal?, + page_id: String?, + pixel_id: String?, + promoted_object: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::PromotedObject?, + publisher_platforms: ::Array[String]?, + source_adset_id: String?, + start_time: String?, + status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::status?, + targeting_automation: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::TargetingAutomation?, + threads_positions: ::Array[String]?, + updated_time: String?, + user_device: ::Array[String]?, + user_os: ::Array[String]?, + whatsapp_phone_number: String?, + whatsapp_positions: ::Array[String]? + } + + type attribution_spec = { event_type: String, window_days: Integer } + + class AttributionSpec < WhopSDK::Internal::Type::BaseModel + attr_accessor event_type: String + + attr_accessor window_days: Integer + + def initialize: (event_type: String, window_days: Integer) -> void + + def to_hash: -> { event_type: String, window_days: Integer } + end + + type bid_strategy = + :LOWEST_COST_WITHOUT_CAP + | :LOWEST_COST_WITH_BID_CAP + | :COST_CAP + | :LOWEST_COST_WITH_MIN_ROAS + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP: :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP: :LOWEST_COST_WITH_BID_CAP + COST_CAP: :COST_CAP + LOWEST_COST_WITH_MIN_ROAS: :LOWEST_COST_WITH_MIN_ROAS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::bid_strategy] + end + + type billing_event = + :APP_INSTALLS + | :CLICKS + | :IMPRESSIONS + | :LINK_CLICKS + | :NONE + | :OFFER_CLAIMS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :THRUPLAY + | :PURCHASE + | :LISTING_INTERACTION + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS: :APP_INSTALLS + CLICKS: :CLICKS + IMPRESSIONS: :IMPRESSIONS + LINK_CLICKS: :LINK_CLICKS + NONE: :NONE + OFFER_CLAIMS: :OFFER_CLAIMS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + THRUPLAY: :THRUPLAY + PURCHASE: :PURCHASE + LISTING_INTERACTION: :LISTING_INTERACTION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::billing_event] + end + + type destination_type = + :UNDEFINED + | :WEBSITE + | :APP + | :FACEBOOK + | :MESSENGER + | :WHATSAPP + | :INSTAGRAM_DIRECT + | :INSTAGRAM_PROFILE + | :PHONE_CALL + | :SHOP_AUTOMATIC + | :APPLINKS_AUTOMATIC + | :ON_AD + | :ON_POST + | :ON_VIDEO + | :ON_PAGE + | :ON_EVENT + | :MESSAGING_MESSENGER_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + | :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + | :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + | :FACEBOOK_PAGE + | :INSTAGRAM_LIVE + | :FACEBOOK_LIVE + | :IMAGINE + | :LEAD_FROM_IG_DIRECT + | :LEAD_FROM_MESSENGER + | :WEBSITE_AND_LEAD_FORM + | :WEBSITE_AND_PHONE_CALL + | :BROADCAST_CHANNEL + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED: :UNDEFINED + WEBSITE: :WEBSITE + APP: :APP + FACEBOOK: :FACEBOOK + MESSENGER: :MESSENGER + WHATSAPP: :WHATSAPP + INSTAGRAM_DIRECT: :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE: :INSTAGRAM_PROFILE + PHONE_CALL: :PHONE_CALL + SHOP_AUTOMATIC: :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC: :APPLINKS_AUTOMATIC + ON_AD: :ON_AD + ON_POST: :ON_POST + ON_VIDEO: :ON_VIDEO + ON_PAGE: :ON_PAGE + ON_EVENT: :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP: :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE: :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE: :FACEBOOK_PAGE + INSTAGRAM_LIVE: :INSTAGRAM_LIVE + FACEBOOK_LIVE: :FACEBOOK_LIVE + IMAGINE: :IMAGINE + LEAD_FROM_IG_DIRECT: :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER: :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM: :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL: :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL: :BROADCAST_CHANNEL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::destination_type] + end + + type excluded_geo_locations = + { + cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City]?, + countries: ::Array[String]?, + location_types: ::Array[String]?, + regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region]?, + zips: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip]? + } + + class ExcludedGeoLocations < WhopSDK::Internal::Type::BaseModel + attr_accessor cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City]? + + attr_accessor countries: ::Array[String]? + + attr_accessor location_types: ::Array[String]? + + attr_accessor regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region]? + + attr_accessor zips: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip]? + + def initialize: ( + ?cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City]?, + ?countries: ::Array[String]?, + ?location_types: ::Array[String]?, + ?regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region]?, + ?zips: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip]? + ) -> void + + def to_hash: -> { + cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::City]?, + countries: ::Array[String]?, + location_types: ::Array[String]?, + regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region]?, + zips: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip]? + } + + type city = + { key: String, country: String?, name: String?, radius: Integer? } + + class City < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type region = + { key: String, country: String?, name: String?, radius: Integer? } + + class Region < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type zip = + { key: String, country: String?, name: String?, radius: Integer? } + + class Zip < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + end + + type geo_city = + { key: String, country: String?, name: String?, radius: Integer? } + + class GeoCity < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type geo_locations = + { + cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City]?, + countries: ::Array[String]?, + location_types: ::Array[String]?, + regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region]?, + zips: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip]? + } + + class GeoLocations < WhopSDK::Internal::Type::BaseModel + attr_accessor cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City]? + + attr_accessor countries: ::Array[String]? + + attr_accessor location_types: ::Array[String]? + + attr_accessor regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region]? + + attr_accessor zips: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip]? + + def initialize: ( + ?cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City]?, + ?countries: ::Array[String]?, + ?location_types: ::Array[String]?, + ?regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region]?, + ?zips: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip]? + ) -> void + + def to_hash: -> { + cities: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::City]?, + countries: ::Array[String]?, + location_types: ::Array[String]?, + regions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Region]?, + zips: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::GeoLocations::Zip]? + } + + type city = + { key: String, country: String?, name: String?, radius: Integer? } + + class City < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type region = + { key: String, country: String?, name: String?, radius: Integer? } + + class Region < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type zip = + { key: String, country: String?, name: String?, radius: Integer? } + + class Zip < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + end + + type geo_region = + { key: String, country: String?, name: String?, radius: Integer? } + + class GeoRegion < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type lead_conversion_location = + :website | :instant_forms | :messenger | :instagram | :calls | :app + + module LeadConversionLocation + extend WhopSDK::Internal::Type::Enum + + WEBSITE: :website + INSTANT_FORMS: :instant_forms + MESSENGER: :messenger + INSTAGRAM: :instagram + CALLS: :calls + APP: :app + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::lead_conversion_location] + end + + type lead_form_config = + { + name: String, + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question], + background_image_source: String?, + background_image_url: String?, + conditional_logic_enabled: bool?, + context_card_button_text: String?, + context_card_content: ::Array[String]?, + context_card_style: String?, + context_card_title: String?, + custom_disclaimer_body: String?, + custom_disclaimer_checkboxes: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox]?, + custom_disclaimer_title: String?, + form_type: String?, + messenger_enabled: bool?, + phone_verification_enabled: bool?, + privacy_policy_link_text: String?, + question_page_custom_headline: String?, + rich_creative_headline: String?, + rich_creative_overview: String?, + rich_creative_url: String?, + thank_you_pages: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage]? + } + + class LeadFormConfig < WhopSDK::Internal::Type::BaseModel + attr_accessor name: String + + attr_accessor privacy_policy_url: String + + attr_accessor questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question] + + attr_accessor background_image_source: String? + + attr_accessor background_image_url: String? + + attr_accessor conditional_logic_enabled: bool? + + attr_accessor context_card_button_text: String? + + attr_accessor context_card_content: ::Array[String]? + + attr_accessor context_card_style: String? + + attr_accessor context_card_title: String? + + attr_accessor custom_disclaimer_body: String? + + attr_accessor custom_disclaimer_checkboxes: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox]? + + attr_accessor custom_disclaimer_title: String? + + attr_accessor form_type: String? + + attr_accessor messenger_enabled: bool? + + attr_accessor phone_verification_enabled: bool? + + attr_accessor privacy_policy_link_text: String? + + attr_accessor question_page_custom_headline: String? + + attr_accessor rich_creative_headline: String? + + attr_accessor rich_creative_overview: String? + + attr_accessor rich_creative_url: String? + + attr_accessor thank_you_pages: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage]? + + def initialize: ( + name: String, + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question], + ?background_image_source: String?, + ?background_image_url: String?, + ?conditional_logic_enabled: bool?, + ?context_card_button_text: String?, + ?context_card_content: ::Array[String]?, + ?context_card_style: String?, + ?context_card_title: String?, + ?custom_disclaimer_body: String?, + ?custom_disclaimer_checkboxes: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox]?, + ?custom_disclaimer_title: String?, + ?form_type: String?, + ?messenger_enabled: bool?, + ?phone_verification_enabled: bool?, + ?privacy_policy_link_text: String?, + ?question_page_custom_headline: String?, + ?rich_creative_headline: String?, + ?rich_creative_overview: String?, + ?rich_creative_url: String?, + ?thank_you_pages: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage]? + ) -> void + + def to_hash: -> { + name: String, + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question], + background_image_source: String?, + background_image_url: String?, + conditional_logic_enabled: bool?, + context_card_button_text: String?, + context_card_content: ::Array[String]?, + context_card_style: String?, + context_card_title: String?, + custom_disclaimer_body: String?, + custom_disclaimer_checkboxes: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox]?, + custom_disclaimer_title: String?, + form_type: String?, + messenger_enabled: bool?, + phone_verification_enabled: bool?, + privacy_policy_link_text: String?, + question_page_custom_headline: String?, + rich_creative_headline: String?, + rich_creative_overview: String?, + rich_creative_url: String?, + thank_you_pages: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage]? + } + + type question = + { + type: String, + conditional_questions_group_id: String?, + dependent_conditional_questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]?, + inline_context: String?, + key: String?, + label: String?, + options: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]?, + question_format: String? + } + + class Question < WhopSDK::Internal::Type::BaseModel + attr_accessor type: String + + attr_accessor conditional_questions_group_id: String? + + attr_accessor dependent_conditional_questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]? + + attr_accessor inline_context: String? + + attr_accessor key: String? + + attr_accessor label: String? + + attr_accessor options: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]? + + attr_accessor question_format: String? + + def initialize: ( + type: String, + ?conditional_questions_group_id: String?, + ?dependent_conditional_questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]?, + ?inline_context: String?, + ?key: String?, + ?label: String?, + ?options: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]?, + ?question_format: String? + ) -> void + + def to_hash: -> { + type: String, + conditional_questions_group_id: String?, + dependent_conditional_questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]?, + inline_context: String?, + key: String?, + label: String?, + options: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]?, + question_format: String? + } + + type dependent_conditional_question = + { + type: String, + inline_context: String?, + key: String?, + label: String?, + options: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option]? + } + + class DependentConditionalQuestion < WhopSDK::Internal::Type::BaseModel + attr_accessor type: String + + attr_accessor inline_context: String? + + attr_accessor key: String? + + attr_accessor label: String? + + attr_accessor options: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option]? + + def initialize: ( + type: String, + ?inline_context: String?, + ?key: String?, + ?label: String?, + ?options: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option]? + ) -> void + + def to_hash: -> { + type: String, + inline_context: String?, + key: String?, + label: String?, + options: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option]? + } + + type option = + { + key: String, + value: String, + logic: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic? + } + + class Option < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor value: String + + attr_accessor logic: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic? + + def initialize: ( + key: String, + value: String, + ?logic: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic? + ) -> void + + def to_hash: -> { + key: String, + value: String, + logic: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic? + } + + type logic = + { + type: String, + target_end_page_index: Integer?, + target_question_index: Integer? + } + + class Logic < WhopSDK::Internal::Type::BaseModel + attr_accessor type: String + + attr_accessor target_end_page_index: Integer? + + attr_accessor target_question_index: Integer? + + def initialize: ( + type: String, + ?target_end_page_index: Integer?, + ?target_question_index: Integer? + ) -> void + + def to_hash: -> { + type: String, + target_end_page_index: Integer?, + target_question_index: Integer? + } + end + end + end + + type option = + { + key: String, + value: String, + logic: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic? + } + + class Option < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor value: String + + attr_accessor logic: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic? + + def initialize: ( + key: String, + value: String, + ?logic: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic? + ) -> void + + def to_hash: -> { + key: String, + value: String, + logic: WhopSDK::AdGroupCreateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic? + } + + type logic = + { + type: String, + target_end_page_index: Integer?, + target_question_index: Integer? + } + + class Logic < WhopSDK::Internal::Type::BaseModel + attr_accessor type: String + + attr_accessor target_end_page_index: Integer? + + attr_accessor target_question_index: Integer? + + def initialize: ( + type: String, + ?target_end_page_index: Integer?, + ?target_question_index: Integer? + ) -> void + + def to_hash: -> { + type: String, + target_end_page_index: Integer?, + target_question_index: Integer? + } + end + end + end + + type custom_disclaimer_checkbox = + { + key: String, + text: String, + is_checked_by_default: bool?, + is_required: bool? + } + + class CustomDisclaimerCheckbox < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor text: String + + attr_accessor is_checked_by_default: bool? + + attr_accessor is_required: bool? + + def initialize: ( + key: String, + text: String, + ?is_checked_by_default: bool?, + ?is_required: bool? + ) -> void + + def to_hash: -> { + key: String, + text: String, + is_checked_by_default: bool?, + is_required: bool? + } + end + + type thank_you_page = + { + body: String?, + business_phone: String?, + button_text: String?, + button_type: String?, + conditional_question_group_id: String?, + enable_messenger: bool?, + gated_file_url: String?, + link: String?, + name: String?, + title: String? + } + + class ThankYouPage < WhopSDK::Internal::Type::BaseModel + attr_accessor body: String? + + attr_accessor business_phone: String? + + attr_accessor button_text: String? + + attr_accessor button_type: String? + + attr_accessor conditional_question_group_id: String? + + attr_accessor enable_messenger: bool? + + attr_accessor gated_file_url: String? + + attr_accessor link: String? + + attr_accessor name: String? + + attr_accessor title: String? + + def initialize: ( + ?body: String?, + ?business_phone: String?, + ?button_text: String?, + ?button_type: String?, + ?conditional_question_group_id: String?, + ?enable_messenger: bool?, + ?gated_file_url: String?, + ?link: String?, + ?name: String?, + ?title: String? + ) -> void + + def to_hash: -> { + body: String?, + business_phone: String?, + button_text: String?, + button_type: String?, + conditional_question_group_id: String?, + enable_messenger: bool?, + gated_file_url: String?, + link: String?, + name: String?, + title: String? + } + end + end + + type optimization_goal = + :NONE + | :APP_INSTALLS + | :AD_RECALL_LIFT + | :ENGAGED_USERS + | :EVENT_RESPONSES + | :IMPRESSIONS + | :LEAD_GENERATION + | :QUALITY_LEAD + | :LINK_CLICKS + | :OFFSITE_CONVERSIONS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :QUALITY_CALL + | :REACH + | :LANDING_PAGE_VIEWS + | :VISIT_INSTAGRAM_PROFILE + | :VALUE + | :THRUPLAY + | :DERIVED_EVENTS + | :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + | :CONVERSATIONS + | :IN_APP_VALUE + | :MESSAGING_PURCHASE_CONVERSION + | :SUBSCRIBERS + | :REMINDERS_SET + | :MEANINGFUL_CALL_ATTEMPT + | :PROFILE_VISIT + | :PROFILE_AND_PAGE_ENGAGEMENT + | :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + | :ENGAGED_REACH + | :ENGAGED_PAGE_VIEWS + | :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + | :ADVERTISER_SILOED_VALUE + | :AUTOMATIC_OBJECTIVE + | :MESSAGING_APPOINTMENT_CONVERSION + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE: :NONE + APP_INSTALLS: :APP_INSTALLS + AD_RECALL_LIFT: :AD_RECALL_LIFT + ENGAGED_USERS: :ENGAGED_USERS + EVENT_RESPONSES: :EVENT_RESPONSES + IMPRESSIONS: :IMPRESSIONS + LEAD_GENERATION: :LEAD_GENERATION + QUALITY_LEAD: :QUALITY_LEAD + LINK_CLICKS: :LINK_CLICKS + OFFSITE_CONVERSIONS: :OFFSITE_CONVERSIONS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + QUALITY_CALL: :QUALITY_CALL + REACH: :REACH + LANDING_PAGE_VIEWS: :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE: :VISIT_INSTAGRAM_PROFILE + VALUE: :VALUE + THRUPLAY: :THRUPLAY + DERIVED_EVENTS: :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS: :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS: :CONVERSATIONS + IN_APP_VALUE: :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION: :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS: :SUBSCRIBERS + REMINDERS_SET: :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT: :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT: :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT: :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH: :ENGAGED_REACH + ENGAGED_PAGE_VIEWS: :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW: :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE: :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE: :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION: :MESSAGING_APPOINTMENT_CONVERSION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::optimization_goal] + end + + type promoted_object = + { + custom_conversion_id: String?, + custom_event_str: String?, + custom_event_type: String?, + page_id: String?, + pixel_id: String?, + whatsapp_phone_number: String? + } + + class PromotedObject < WhopSDK::Internal::Type::BaseModel + attr_accessor custom_conversion_id: String? + + attr_accessor custom_event_str: String? + + attr_accessor custom_event_type: String? + + attr_accessor page_id: String? + + attr_accessor pixel_id: String? + + attr_accessor whatsapp_phone_number: String? + + def initialize: ( + ?custom_conversion_id: String?, + ?custom_event_str: String?, + ?custom_event_type: String?, + ?page_id: String?, + ?pixel_id: String?, + ?whatsapp_phone_number: String? + ) -> void + + def to_hash: -> { + custom_conversion_id: String?, + custom_event_str: String?, + custom_event_type: String?, + page_id: String?, + pixel_id: String?, + whatsapp_phone_number: String? + } + end + + type status = :ACTIVE | :PAUSED + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :ACTIVE + PAUSED: :PAUSED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Meta::status] + end + + type targeting_automation = { advantage_audience: Integer? } + + class TargetingAutomation < WhopSDK::Internal::Type::BaseModel + attr_accessor advantage_audience: Integer? + + def initialize: (?advantage_audience: Integer?) -> void + + def to_hash: -> { advantage_audience: Integer? } + end + end + + type tiktok = + { + actions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action]?, + age_groups: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::age_group]?, + app_id: String?, + attribution_event_count: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::attribution_event_count?, + audience_ids: ::Array[String]?, + audience_rule: ::Hash[Symbol, top]?, + audience_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::audience_type?, + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::bid_type?, + billing_event: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::billing_event?, + brand_safety_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::brand_safety_type?, + budget_mode: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::budget_mode?, + carrier_ids: ::Array[String]?, + category_exclusion_ids: ::Array[String]?, + click_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::click_attribution_window?, + comment_disabled: bool?, + contextual_tag_ids: ::Array[String]?, + conversion_bid_price: Float?, + creative_material_mode: String?, + dayparting: String?, + deep_funnel_event_source: String?, + deep_funnel_event_source_id: String?, + deep_funnel_optimization_status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status?, + device_model_ids: ::Array[String]?, + device_price_ranges: ::Array[String]?, + engaged_view_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::engaged_view_attribution_window?, + excluded_audience_ids: ::Array[String]?, + excluded_location_ids: ::Array[String]?, + frequency: Integer?, + frequency_schedule: Integer?, + gender: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::gender?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: String?, + instant_form_config: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig?, + instant_form_id: String?, + interest_category_ids: ::Array[String]?, + interest_keyword_ids: ::Array[String]?, + inventory_filter_enabled: bool?, + :ios14_targeting => WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ios14_targeting?, + isp_ids: ::Array[String]?, + languages: ::Array[String]?, + location_ids: ::Array[String]?, + min_android_version: String?, + min_ios_version: String?, + network_types: ::Array[String]?, + operating_systems: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operating_system]?, + operation_status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::pacing?, + pangle_audience_package_exclude_ids: ::Array[String]?, + pangle_audience_package_include_ids: ::Array[String]?, + pangle_block_app_ids: ::Array[String]?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::placement_type?, + placements: ::Array[String]?, + product_set_id: String?, + product_source: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::product_source?, + promotion_type: String?, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::schedule_type?, + secondary_optimization_event: String?, + shopping_ads_retargeting_actions_days: Integer?, + shopping_ads_retargeting_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type?, + spending_power: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::spending_power?, + tiktok_subplacements: ::Array[String]?, + vertical_sensitivity_id: String?, + video_download_disabled: bool?, + video_user_actions: ::Array[String]?, + view_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::view_attribution_window? + } + + class Tiktok < WhopSDK::Internal::Type::BaseModel + attr_accessor actions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action]? + + attr_accessor age_groups: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::age_group]? + + attr_accessor app_id: String? + + attr_accessor attribution_event_count: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::attribution_event_count? + + attr_accessor audience_ids: ::Array[String]? + + attr_accessor audience_rule: ::Hash[Symbol, top]? + + attr_accessor audience_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::audience_type? + + attr_accessor bid_price: Float? + + attr_accessor bid_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::bid_type? + + attr_accessor billing_event: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::billing_event? + + attr_accessor brand_safety_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::brand_safety_type? + + attr_accessor budget_mode: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::budget_mode? + + attr_accessor carrier_ids: ::Array[String]? + + attr_accessor category_exclusion_ids: ::Array[String]? + + attr_accessor click_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::click_attribution_window? + + attr_accessor comment_disabled: bool? + + attr_accessor contextual_tag_ids: ::Array[String]? + + attr_accessor conversion_bid_price: Float? + + attr_accessor creative_material_mode: String? + + attr_accessor dayparting: String? + + attr_accessor deep_funnel_event_source: String? + + attr_accessor deep_funnel_event_source_id: String? + + attr_accessor deep_funnel_optimization_status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status? + + attr_accessor device_model_ids: ::Array[String]? + + attr_accessor device_price_ranges: ::Array[String]? + + attr_accessor engaged_view_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::engaged_view_attribution_window? + + attr_accessor excluded_audience_ids: ::Array[String]? + + attr_accessor excluded_location_ids: ::Array[String]? + + attr_accessor frequency: Integer? + + attr_accessor frequency_schedule: Integer? + + attr_accessor gender: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::gender? + + attr_accessor identity_authorized_bc_id: String? + + attr_accessor identity_id: String? + + attr_accessor identity_type: String? + + attr_accessor instant_form_config: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig? + + attr_accessor instant_form_id: String? + + attr_accessor interest_category_ids: ::Array[String]? + + attr_accessor interest_keyword_ids: ::Array[String]? + + attr_accessor inventory_filter_enabled: bool? + + attr_accessor ios14_targeting: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ios14_targeting? + + attr_accessor isp_ids: ::Array[String]? + + attr_accessor languages: ::Array[String]? + + attr_accessor location_ids: ::Array[String]? + + attr_accessor min_android_version: String? + + attr_accessor min_ios_version: String? + + attr_accessor network_types: ::Array[String]? + + attr_accessor operating_systems: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operating_system]? + + attr_accessor operation_status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operation_status? + + attr_accessor optimization_event: String? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::pacing? + + attr_accessor pangle_audience_package_exclude_ids: ::Array[String]? + + attr_accessor pangle_audience_package_include_ids: ::Array[String]? + + attr_accessor pangle_block_app_ids: ::Array[String]? + + attr_accessor pixel_id: String? + + attr_accessor placement_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::placement_type? + + attr_accessor placements: ::Array[String]? + + attr_accessor product_set_id: String? + + attr_accessor product_source: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::product_source? + + attr_accessor promotion_type: String? + + attr_accessor schedule_end_time: String? + + attr_accessor schedule_start_time: String? + + attr_accessor schedule_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::schedule_type? + + attr_accessor secondary_optimization_event: String? + + attr_accessor shopping_ads_retargeting_actions_days: Integer? + + attr_accessor shopping_ads_retargeting_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type? + + attr_accessor spending_power: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::spending_power? + + attr_accessor tiktok_subplacements: ::Array[String]? + + attr_accessor vertical_sensitivity_id: String? + + attr_accessor video_download_disabled: bool? + + attr_accessor video_user_actions: ::Array[String]? + + attr_accessor view_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::view_attribution_window? + + def initialize: ( + ?actions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action]?, + ?age_groups: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::age_group]?, + ?app_id: String?, + ?attribution_event_count: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::attribution_event_count?, + ?audience_ids: ::Array[String]?, + ?audience_rule: ::Hash[Symbol, top]?, + ?audience_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::audience_type?, + ?bid_price: Float?, + ?bid_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::bid_type?, + ?billing_event: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::billing_event?, + ?brand_safety_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::brand_safety_type?, + ?budget_mode: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::budget_mode?, + ?carrier_ids: ::Array[String]?, + ?category_exclusion_ids: ::Array[String]?, + ?click_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::click_attribution_window?, + ?comment_disabled: bool?, + ?contextual_tag_ids: ::Array[String]?, + ?conversion_bid_price: Float?, + ?creative_material_mode: String?, + ?dayparting: String?, + ?deep_funnel_event_source: String?, + ?deep_funnel_event_source_id: String?, + ?deep_funnel_optimization_status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status?, + ?device_model_ids: ::Array[String]?, + ?device_price_ranges: ::Array[String]?, + ?engaged_view_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::engaged_view_attribution_window?, + ?excluded_audience_ids: ::Array[String]?, + ?excluded_location_ids: ::Array[String]?, + ?frequency: Integer?, + ?frequency_schedule: Integer?, + ?gender: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::gender?, + ?identity_authorized_bc_id: String?, + ?identity_id: String?, + ?identity_type: String?, + ?instant_form_config: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig?, + ?instant_form_id: String?, + ?interest_category_ids: ::Array[String]?, + ?interest_keyword_ids: ::Array[String]?, + ?inventory_filter_enabled: bool?, + ?ios14_targeting: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ios14_targeting?, + ?isp_ids: ::Array[String]?, + ?languages: ::Array[String]?, + ?location_ids: ::Array[String]?, + ?min_android_version: String?, + ?min_ios_version: String?, + ?network_types: ::Array[String]?, + ?operating_systems: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operating_system]?, + ?operation_status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operation_status?, + ?optimization_event: String?, + ?optimization_goal: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::optimization_goal?, + ?pacing: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::pacing?, + ?pangle_audience_package_exclude_ids: ::Array[String]?, + ?pangle_audience_package_include_ids: ::Array[String]?, + ?pangle_block_app_ids: ::Array[String]?, + ?pixel_id: String?, + ?placement_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::placement_type?, + ?placements: ::Array[String]?, + ?product_set_id: String?, + ?product_source: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::product_source?, + ?promotion_type: String?, + ?schedule_end_time: String?, + ?schedule_start_time: String?, + ?schedule_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::schedule_type?, + ?secondary_optimization_event: String?, + ?shopping_ads_retargeting_actions_days: Integer?, + ?shopping_ads_retargeting_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type?, + ?spending_power: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::spending_power?, + ?tiktok_subplacements: ::Array[String]?, + ?vertical_sensitivity_id: String?, + ?video_download_disabled: bool?, + ?video_user_actions: ::Array[String]?, + ?view_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::view_attribution_window? + ) -> void + + def to_hash: -> { + actions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::Action]?, + age_groups: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::age_group]?, + app_id: String?, + attribution_event_count: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::attribution_event_count?, + audience_ids: ::Array[String]?, + audience_rule: ::Hash[Symbol, top]?, + audience_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::audience_type?, + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::bid_type?, + billing_event: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::billing_event?, + brand_safety_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::brand_safety_type?, + budget_mode: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::budget_mode?, + carrier_ids: ::Array[String]?, + category_exclusion_ids: ::Array[String]?, + click_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::click_attribution_window?, + comment_disabled: bool?, + contextual_tag_ids: ::Array[String]?, + conversion_bid_price: Float?, + creative_material_mode: String?, + dayparting: String?, + deep_funnel_event_source: String?, + deep_funnel_event_source_id: String?, + deep_funnel_optimization_status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status?, + device_model_ids: ::Array[String]?, + device_price_ranges: ::Array[String]?, + engaged_view_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::engaged_view_attribution_window?, + excluded_audience_ids: ::Array[String]?, + excluded_location_ids: ::Array[String]?, + frequency: Integer?, + frequency_schedule: Integer?, + gender: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::gender?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: String?, + instant_form_config: WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig?, + instant_form_id: String?, + interest_category_ids: ::Array[String]?, + interest_keyword_ids: ::Array[String]?, + inventory_filter_enabled: bool?, + :ios14_targeting => WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ios14_targeting?, + isp_ids: ::Array[String]?, + languages: ::Array[String]?, + location_ids: ::Array[String]?, + min_android_version: String?, + min_ios_version: String?, + network_types: ::Array[String]?, + operating_systems: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operating_system]?, + operation_status: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::pacing?, + pangle_audience_package_exclude_ids: ::Array[String]?, + pangle_audience_package_include_ids: ::Array[String]?, + pangle_block_app_ids: ::Array[String]?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::placement_type?, + placements: ::Array[String]?, + product_set_id: String?, + product_source: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::product_source?, + promotion_type: String?, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::schedule_type?, + secondary_optimization_event: String?, + shopping_ads_retargeting_actions_days: Integer?, + shopping_ads_retargeting_type: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type?, + spending_power: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::spending_power?, + tiktok_subplacements: ::Array[String]?, + vertical_sensitivity_id: String?, + video_download_disabled: bool?, + video_user_actions: ::Array[String]?, + view_attribution_window: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::view_attribution_window? + } + + type action = + { + action_category_ids: ::Array[String]?, + action_period: Integer?, + action_scene: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::action_scene?, + video_user_actions: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::video_user_action]? + } + + class Action < WhopSDK::Internal::Type::BaseModel + attr_accessor action_category_ids: ::Array[String]? + + attr_accessor action_period: Integer? + + attr_accessor action_scene: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::action_scene? + + attr_accessor video_user_actions: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::video_user_action]? + + def initialize: ( + ?action_category_ids: ::Array[String]?, + ?action_period: Integer?, + ?action_scene: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::action_scene?, + ?video_user_actions: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::video_user_action]? + ) -> void + + def to_hash: -> { + action_category_ids: ::Array[String]?, + action_period: Integer?, + action_scene: WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::action_scene?, + video_user_actions: ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::video_user_action]? + } + + type action_scene = + :VIDEO_RELATED + | :CREATOR_RELATED + | :HASHTAG_RELATED + | :LIVE_RELATED + + module ActionScene + extend WhopSDK::Internal::Type::Enum + + VIDEO_RELATED: :VIDEO_RELATED + CREATOR_RELATED: :CREATOR_RELATED + HASHTAG_RELATED: :HASHTAG_RELATED + LIVE_RELATED: :LIVE_RELATED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::action_scene] + end + + type video_user_action = + :WATCHED_TO_END + | :LIKED + | :COMMENTED + | :SHARED + | :FOLLOWED + | :PROFILE_VISITED + + module VideoUserAction + extend WhopSDK::Internal::Type::Enum + + WATCHED_TO_END: :WATCHED_TO_END + LIKED: :LIKED + COMMENTED: :COMMENTED + SHARED: :SHARED + FOLLOWED: :FOLLOWED + PROFILE_VISITED: :PROFILE_VISITED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::Action::video_user_action] + end + end + + type age_group = + :AGE_13_17 + | :AGE_18_24 + | :AGE_25_34 + | :AGE_35_44 + | :AGE_45_54 + | :AGE_55_100 + + module AgeGroup + extend WhopSDK::Internal::Type::Enum + + AGE_13_17: :AGE_13_17 + AGE_18_24: :AGE_18_24 + AGE_25_34: :AGE_25_34 + AGE_35_44: :AGE_35_44 + AGE_45_54: :AGE_45_54 + AGE_55_100: :AGE_55_100 + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::age_group] + end + + type attribution_event_count = :UNSET | :EVERY | :ONCE + + module AttributionEventCount + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + EVERY: :EVERY + ONCE: :ONCE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::attribution_event_count] + end + + type audience_type = :NORMAL | :SMART_INTERESTS_BEHAVIORS + + module AudienceType + extend WhopSDK::Internal::Type::Enum + + NORMAL: :NORMAL + SMART_INTERESTS_BEHAVIORS: :SMART_INTERESTS_BEHAVIORS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::audience_type] + end + + type bid_type = :BID_TYPE_NO_BID | :BID_TYPE_CUSTOM + + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID: :BID_TYPE_NO_BID + BID_TYPE_CUSTOM: :BID_TYPE_CUSTOM + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::bid_type] + end + + type billing_event = :CPC | :CPM | :OCPM | :CPV + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC: :CPC + CPM: :CPM + OCPM: :OCPM + CPV: :CPV + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::billing_event] + end + + type brand_safety_type = + :NO_BRAND_SAFETY + | :STANDARD_INVENTORY + | :LIMITED_INVENTORY + | :FULL_INVENTORY + | :EXPANDED_INVENTORY + + module BrandSafetyType + extend WhopSDK::Internal::Type::Enum + + NO_BRAND_SAFETY: :NO_BRAND_SAFETY + STANDARD_INVENTORY: :STANDARD_INVENTORY + LIMITED_INVENTORY: :LIMITED_INVENTORY + FULL_INVENTORY: :FULL_INVENTORY + EXPANDED_INVENTORY: :EXPANDED_INVENTORY + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::brand_safety_type] + end + + type budget_mode = + :BUDGET_MODE_DAY + | :BUDGET_MODE_TOTAL + | :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY: :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL: :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET: :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::budget_mode] + end + + type click_attribution_window = + :OFF | :ONE_DAY | :SEVEN_DAYS | :FOURTEEN_DAYS | :TWENTY_EIGHT_DAYS + + module ClickAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF: :OFF + ONE_DAY: :ONE_DAY + SEVEN_DAYS: :SEVEN_DAYS + FOURTEEN_DAYS: :FOURTEEN_DAYS + TWENTY_EIGHT_DAYS: :TWENTY_EIGHT_DAYS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::click_attribution_window] + end + + type deep_funnel_optimization_status = :ON | :OFF + + module DeepFunnelOptimizationStatus + extend WhopSDK::Internal::Type::Enum + + ON: :ON + OFF: :OFF + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status] + end + + type engaged_view_attribution_window = :OFF | :ONE_DAY | :SEVEN_DAYS + + module EngagedViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF: :OFF + ONE_DAY: :ONE_DAY + SEVEN_DAYS: :SEVEN_DAYS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::engaged_view_attribution_window] + end + + type gender = :GENDER_UNLIMITED | :GENDER_MALE | :GENDER_FEMALE + + module Gender + extend WhopSDK::Internal::Type::Enum + + GENDER_UNLIMITED: :GENDER_UNLIMITED + GENDER_MALE: :GENDER_MALE + GENDER_FEMALE: :GENDER_FEMALE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::gender] + end + + type instant_form_config = + { + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question], + button_text: String?, + greeting: String?, + name: String? + } + + class InstantFormConfig < WhopSDK::Internal::Type::BaseModel + attr_accessor privacy_policy_url: String + + attr_accessor questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question] + + attr_accessor button_text: String? + + attr_accessor greeting: String? + + attr_accessor name: String? + + def initialize: ( + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question], + ?button_text: String?, + ?greeting: String?, + ?name: String? + ) -> void + + def to_hash: -> { + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupCreateParams::PlatformConfig::Tiktok::InstantFormConfig::Question], + button_text: String?, + greeting: String?, + name: String? + } + + type question = { field_type: String, label: String? } + + class Question < WhopSDK::Internal::Type::BaseModel + attr_accessor field_type: String + + attr_accessor label: String? + + def initialize: (field_type: String, ?label: String?) -> void + + def to_hash: -> { field_type: String, label: String? } + end + end + + type ios14_targeting = :UNSET | :IOS14_MINUS | :IOS14_PLUS | :ALL + + module Ios14Targeting + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + IOS14_MINUS: :IOS14_MINUS + IOS14_PLUS: :IOS14_PLUS + ALL: :ALL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::ios14_targeting] + end + + type operating_system = :ANDROID | :IOS + + module OperatingSystem + extend WhopSDK::Internal::Type::Enum + + ANDROID: :ANDROID + IOS: :IOS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operating_system] + end + + type operation_status = :ENABLE | :DISABLE + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE: :ENABLE + DISABLE: :DISABLE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::operation_status] + end + + type optimization_goal = + :CLICK + | :CONVERT + | :INSTALL + | :IN_APP_EVENT + | :REACH + | :SHOW + | :VIDEO_VIEW + | :ENGAGED_VIEW + | :ENGAGED_VIEW_FIFTEEN + | :LEAD_GENERATION + | :PREFERRED_LEAD + | :CONVERSATION + | :FOLLOWERS + | :PROFILE_VIEWS + | :PAGE_VISIT + | :VALUE + | :AUTOMATIC_VALUE_OPTIMIZATION + | :TRAFFIC_LANDING_PAGE_VIEW + | :DESTINATION_VISIT + | :MT_LIVE_ROOM + | :PRODUCT_CLICK_IN_LIVE + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK: :CLICK + CONVERT: :CONVERT + INSTALL: :INSTALL + IN_APP_EVENT: :IN_APP_EVENT + REACH: :REACH + SHOW: :SHOW + VIDEO_VIEW: :VIDEO_VIEW + ENGAGED_VIEW: :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN: :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION: :LEAD_GENERATION + PREFERRED_LEAD: :PREFERRED_LEAD + CONVERSATION: :CONVERSATION + FOLLOWERS: :FOLLOWERS + PROFILE_VIEWS: :PROFILE_VIEWS + PAGE_VISIT: :PAGE_VISIT + VALUE: :VALUE + AUTOMATIC_VALUE_OPTIMIZATION: :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW: :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT: :DESTINATION_VISIT + MT_LIVE_ROOM: :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE: :PRODUCT_CLICK_IN_LIVE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::optimization_goal] + end + + type pacing = :PACING_MODE_SMOOTH | :PACING_MODE_FAST + + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH: :PACING_MODE_SMOOTH + PACING_MODE_FAST: :PACING_MODE_FAST + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::pacing] + end + + type placement_type = + :PLACEMENT_TYPE_AUTOMATIC | :PLACEMENT_TYPE_NORMAL + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC: :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL: :PLACEMENT_TYPE_NORMAL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::placement_type] + end + + type product_source = :CATALOG | :STORE | :SHOWCASE + + module ProductSource + extend WhopSDK::Internal::Type::Enum + + CATALOG: :CATALOG + STORE: :STORE + SHOWCASE: :SHOWCASE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::product_source] + end + + type schedule_type = :SCHEDULE_START_END | :SCHEDULE_FROM_NOW + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END: :SCHEDULE_START_END + SCHEDULE_FROM_NOW: :SCHEDULE_FROM_NOW + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::schedule_type] + end + + type shopping_ads_retargeting_type = + :OFF | :LAB1 | :LAB2 | :LAB3 | :LAB4 | :LAB5 + + module ShoppingAdsRetargetingType + extend WhopSDK::Internal::Type::Enum + + OFF: :OFF + LAB1: :LAB1 + LAB2: :LAB2 + LAB3: :LAB3 + LAB4: :LAB4 + LAB5: :LAB5 + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type] + end + + type spending_power = :ALL | :HIGH + + module SpendingPower + extend WhopSDK::Internal::Type::Enum + + ALL: :ALL + HIGH: :HIGH + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::spending_power] + end + + type view_attribution_window = :OFF | :ONE_DAY | :SEVEN_DAYS + + module ViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF: :OFF + ONE_DAY: :ONE_DAY + SEVEN_DAYS: :SEVEN_DAYS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::PlatformConfig::Tiktok::view_attribution_window] + end + end + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateParams::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_group_create_response.rbs b/sig/whop_sdk/models/ad_group_create_response.rbs new file mode 100644 index 00000000..22630ece --- /dev/null +++ b/sig/whop_sdk/models/ad_group_create_response.rbs @@ -0,0 +1,982 @@ +module WhopSDK + module Models + type ad_group_create_response = + { + id: String, + ad_campaign: WhopSDK::Models::AdGroupCreateResponse::AdCampaign, + config: WhopSDK::Models::AdGroupCreateResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupCreateResponse::platform_config?, + status: WhopSDK::Models::AdGroupCreateResponse::status, + updated_at: Time + } + + class AdGroupCreateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor ad_campaign: WhopSDK::Models::AdGroupCreateResponse::AdCampaign + + attr_accessor config: WhopSDK::Models::AdGroupCreateResponse::Config? + + attr_accessor created_at: Time + + attr_accessor daily_budget: Float? + + attr_accessor name: String? + + attr_accessor platform_config: WhopSDK::Models::AdGroupCreateResponse::platform_config? + + attr_accessor status: WhopSDK::Models::AdGroupCreateResponse::status + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + ad_campaign: WhopSDK::Models::AdGroupCreateResponse::AdCampaign, + config: WhopSDK::Models::AdGroupCreateResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupCreateResponse::platform_config?, + status: WhopSDK::Models::AdGroupCreateResponse::status, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + ad_campaign: WhopSDK::Models::AdGroupCreateResponse::AdCampaign, + config: WhopSDK::Models::AdGroupCreateResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupCreateResponse::platform_config?, + status: WhopSDK::Models::AdGroupCreateResponse::status, + updated_at: Time + } + + type ad_campaign = + { + id: String, + platform: WhopSDK::Models::AdGroupCreateResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupCreateResponse::AdCampaign::status, + title: String + } + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor platform: WhopSDK::Models::AdGroupCreateResponse::AdCampaign::platform? + + attr_accessor status: WhopSDK::Models::AdGroupCreateResponse::AdCampaign::status + + attr_accessor title: String + + def initialize: ( + id: String, + platform: WhopSDK::Models::AdGroupCreateResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupCreateResponse::AdCampaign::status, + title: String + ) -> void + + def to_hash: -> { + id: String, + platform: WhopSDK::Models::AdGroupCreateResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupCreateResponse::AdCampaign::status, + title: String + } + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::AdCampaign::platform] + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::AdCampaign::status] + end + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupCreateResponse::Config::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupCreateResponse::Config::billing_event? + + attr_accessor end_time: String? + + attr_accessor frequency_cap: Integer? + + attr_accessor frequency_cap_interval_days: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupCreateResponse::Config::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupCreateResponse::Config::pacing? + + attr_accessor start_time: String? + + attr_accessor targeting: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::bid_strategy] + end + + type billing_event = + :impressions | :clicks | :optimized_cpm | :video_views + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS: :impressions + CLICKS: :clicks + OPTIMIZED_CPM: :optimized_cpm + VIDEO_VIEWS: :video_views + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::billing_event] + end + + type optimization_goal = + :conversions + | :link_clicks + | :landing_page_views + | :reach + | :impressions + | :app_installs + | :video_views + | :lead_generation + | :value + | :page_likes + | :conversations + | :ad_recall_lift + | :two_second_continuous_video_views + | :post_engagement + | :event_responses + | :reminders_set + | :quality_lead + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS: :conversions + LINK_CLICKS: :link_clicks + LANDING_PAGE_VIEWS: :landing_page_views + REACH: :reach + IMPRESSIONS: :impressions + APP_INSTALLS: :app_installs + VIDEO_VIEWS: :video_views + LEAD_GENERATION: :lead_generation + VALUE: :value + PAGE_LIKES: :page_likes + CONVERSATIONS: :conversations + AD_RECALL_LIFT: :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :two_second_continuous_video_views + POST_ENGAGEMENT: :post_engagement + EVENT_RESPONSES: :event_responses + REMINDERS_SET: :reminders_set + QUALITY_LEAD: :quality_lead + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::optimization_goal] + end + + type pacing = :standard | :accelerated + + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD: :standard + ACCELERATED: :accelerated + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::pacing] + end + + type targeting = + { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::placement_type? + } + + class Targeting < WhopSDK::Internal::Type::BaseModel + attr_accessor age_max: Integer? + + attr_accessor age_min: Integer? + + attr_accessor countries: ::Array[String]? + + attr_accessor device_platforms: ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::device_platform]? + + attr_accessor exclude_audience_ids: ::Array[String]? + + attr_accessor genders: ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::gender]? + + attr_accessor include_audience_ids: ::Array[String]? + + attr_accessor interest_ids: ::Array[String]? + + attr_accessor languages: ::Array[String]? + + attr_accessor placement_type: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::placement_type? + + def initialize: ( + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::placement_type? + ) -> void + + def to_hash: -> { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::placement_type? + } + + type device_platform = :mobile | :desktop + + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE: :mobile + DESKTOP: :desktop + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::device_platform] + end + + type gender = :male | :female | :all + + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE: :male + FEMALE: :female + ALL: :all + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::gender] + end + + type placement_type = :automatic | :manual + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC: :automatic + MANUAL: :manual + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::Config::Targeting::placement_type] + end + end + end + + type platform_config = + (WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType + | WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType)? + + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + type meta_ad_group_platform_config_type = + { + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + typename: :MetaAdGroupPlatformConfigType + } + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor attribution_spec: ::Array[::Hash[Symbol, top]]? + + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event? + + attr_accessor daily_budget: Integer? + + attr_accessor destination_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type? + + attr_accessor end_time: String? + + attr_accessor excluded_geo_locations: ::Hash[Symbol, top]? + + attr_accessor facebook_positions: ::Array[String]? + + attr_accessor geo_locations: ::Hash[Symbol, top]? + + attr_accessor instagram_actor_id: String? + + attr_accessor instagram_positions: ::Array[String]? + + attr_accessor lifetime_budget: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal? + + attr_accessor page_id: String? + + attr_accessor platform: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform + + attr_accessor promoted_object: ::Hash[Symbol, top]? + + attr_accessor publisher_platforms: ::Array[String]? + + attr_accessor status: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status? + + attr_accessor targeting_automation: ::Hash[Symbol, top]? + + attr_accessor typename: :MetaAdGroupPlatformConfigType + + def initialize: ( + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + ?typename: :MetaAdGroupPlatformConfigType + ) -> void + + def to_hash: -> { + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + typename: :MetaAdGroupPlatformConfigType + } + + type bid_strategy = + :LOWEST_COST_WITHOUT_CAP + | :LOWEST_COST_WITH_BID_CAP + | :COST_CAP + | :LOWEST_COST_WITH_MIN_ROAS + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP: :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP: :LOWEST_COST_WITH_BID_CAP + COST_CAP: :COST_CAP + LOWEST_COST_WITH_MIN_ROAS: :LOWEST_COST_WITH_MIN_ROAS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy] + end + + type billing_event = + :APP_INSTALLS + | :CLICKS + | :IMPRESSIONS + | :LINK_CLICKS + | :NONE + | :OFFER_CLAIMS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :THRUPLAY + | :PURCHASE + | :LISTING_INTERACTION + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS: :APP_INSTALLS + CLICKS: :CLICKS + IMPRESSIONS: :IMPRESSIONS + LINK_CLICKS: :LINK_CLICKS + NONE: :NONE + OFFER_CLAIMS: :OFFER_CLAIMS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + THRUPLAY: :THRUPLAY + PURCHASE: :PURCHASE + LISTING_INTERACTION: :LISTING_INTERACTION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event] + end + + type destination_type = + :UNDEFINED + | :WEBSITE + | :APP + | :FACEBOOK + | :MESSENGER + | :WHATSAPP + | :INSTAGRAM_DIRECT + | :INSTAGRAM_PROFILE + | :PHONE_CALL + | :SHOP_AUTOMATIC + | :APPLINKS_AUTOMATIC + | :ON_AD + | :ON_POST + | :ON_VIDEO + | :ON_PAGE + | :ON_EVENT + | :MESSAGING_MESSENGER_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + | :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + | :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + | :FACEBOOK_PAGE + | :INSTAGRAM_LIVE + | :FACEBOOK_LIVE + | :IMAGINE + | :LEAD_FROM_IG_DIRECT + | :LEAD_FROM_MESSENGER + | :WEBSITE_AND_LEAD_FORM + | :WEBSITE_AND_PHONE_CALL + | :BROADCAST_CHANNEL + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED: :UNDEFINED + WEBSITE: :WEBSITE + APP: :APP + FACEBOOK: :FACEBOOK + MESSENGER: :MESSENGER + WHATSAPP: :WHATSAPP + INSTAGRAM_DIRECT: :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE: :INSTAGRAM_PROFILE + PHONE_CALL: :PHONE_CALL + SHOP_AUTOMATIC: :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC: :APPLINKS_AUTOMATIC + ON_AD: :ON_AD + ON_POST: :ON_POST + ON_VIDEO: :ON_VIDEO + ON_PAGE: :ON_PAGE + ON_EVENT: :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP: :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE: :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE: :FACEBOOK_PAGE + INSTAGRAM_LIVE: :INSTAGRAM_LIVE + FACEBOOK_LIVE: :FACEBOOK_LIVE + IMAGINE: :IMAGINE + LEAD_FROM_IG_DIRECT: :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER: :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM: :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL: :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL: :BROADCAST_CHANNEL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type] + end + + type optimization_goal = + :NONE + | :APP_INSTALLS + | :AD_RECALL_LIFT + | :ENGAGED_USERS + | :EVENT_RESPONSES + | :IMPRESSIONS + | :LEAD_GENERATION + | :QUALITY_LEAD + | :LINK_CLICKS + | :OFFSITE_CONVERSIONS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :QUALITY_CALL + | :REACH + | :LANDING_PAGE_VIEWS + | :VISIT_INSTAGRAM_PROFILE + | :VALUE + | :THRUPLAY + | :DERIVED_EVENTS + | :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + | :CONVERSATIONS + | :IN_APP_VALUE + | :MESSAGING_PURCHASE_CONVERSION + | :SUBSCRIBERS + | :REMINDERS_SET + | :MEANINGFUL_CALL_ATTEMPT + | :PROFILE_VISIT + | :PROFILE_AND_PAGE_ENGAGEMENT + | :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + | :ENGAGED_REACH + | :ENGAGED_PAGE_VIEWS + | :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + | :ADVERTISER_SILOED_VALUE + | :AUTOMATIC_OBJECTIVE + | :MESSAGING_APPOINTMENT_CONVERSION + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE: :NONE + APP_INSTALLS: :APP_INSTALLS + AD_RECALL_LIFT: :AD_RECALL_LIFT + ENGAGED_USERS: :ENGAGED_USERS + EVENT_RESPONSES: :EVENT_RESPONSES + IMPRESSIONS: :IMPRESSIONS + LEAD_GENERATION: :LEAD_GENERATION + QUALITY_LEAD: :QUALITY_LEAD + LINK_CLICKS: :LINK_CLICKS + OFFSITE_CONVERSIONS: :OFFSITE_CONVERSIONS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + QUALITY_CALL: :QUALITY_CALL + REACH: :REACH + LANDING_PAGE_VIEWS: :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE: :VISIT_INSTAGRAM_PROFILE + VALUE: :VALUE + THRUPLAY: :THRUPLAY + DERIVED_EVENTS: :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS: :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS: :CONVERSATIONS + IN_APP_VALUE: :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION: :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS: :SUBSCRIBERS + REMINDERS_SET: :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT: :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT: :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT: :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH: :ENGAGED_REACH + ENGAGED_PAGE_VIEWS: :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW: :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE: :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE: :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION: :MESSAGING_APPOINTMENT_CONVERSION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform] + end + + type status = :ACTIVE | :PAUSED + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :ACTIVE + PAUSED: :PAUSED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status] + end + end + + type tiktok_ad_group_platform_config_type = + { + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + typename: :TiktokAdGroupPlatformConfigType + } + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_price: Float? + + attr_accessor bid_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type? + + attr_accessor billing_event: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event? + + attr_accessor budget_mode: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode? + + attr_accessor conversion_bid_price: Float? + + attr_accessor identity_id: String? + + attr_accessor identity_type: String? + + attr_accessor operation_status: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status? + + attr_accessor optimization_event: String? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing? + + attr_accessor pixel_id: String? + + attr_accessor placement_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type? + + attr_accessor placements: ::Array[String]? + + attr_accessor platform: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform + + attr_accessor schedule_end_time: String? + + attr_accessor schedule_start_time: String? + + attr_accessor schedule_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type? + + attr_accessor typename: :TiktokAdGroupPlatformConfigType + + def initialize: ( + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + ?typename: :TiktokAdGroupPlatformConfigType + ) -> void + + def to_hash: -> { + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + typename: :TiktokAdGroupPlatformConfigType + } + + type bid_type = :BID_TYPE_NO_BID | :BID_TYPE_CUSTOM + + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID: :BID_TYPE_NO_BID + BID_TYPE_CUSTOM: :BID_TYPE_CUSTOM + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type] + end + + type billing_event = :CPC | :CPM | :OCPM | :CPV + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC: :CPC + CPM: :CPM + OCPM: :OCPM + CPV: :CPV + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event] + end + + type budget_mode = + :BUDGET_MODE_DAY + | :BUDGET_MODE_TOTAL + | :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY: :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL: :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET: :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode] + end + + type operation_status = :ENABLE | :DISABLE + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE: :ENABLE + DISABLE: :DISABLE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status] + end + + type optimization_goal = + :CLICK + | :CONVERT + | :INSTALL + | :IN_APP_EVENT + | :REACH + | :SHOW + | :VIDEO_VIEW + | :ENGAGED_VIEW + | :ENGAGED_VIEW_FIFTEEN + | :LEAD_GENERATION + | :PREFERRED_LEAD + | :CONVERSATION + | :FOLLOWERS + | :PROFILE_VIEWS + | :PAGE_VISIT + | :VALUE + | :AUTOMATIC_VALUE_OPTIMIZATION + | :TRAFFIC_LANDING_PAGE_VIEW + | :DESTINATION_VISIT + | :MT_LIVE_ROOM + | :PRODUCT_CLICK_IN_LIVE + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK: :CLICK + CONVERT: :CONVERT + INSTALL: :INSTALL + IN_APP_EVENT: :IN_APP_EVENT + REACH: :REACH + SHOW: :SHOW + VIDEO_VIEW: :VIDEO_VIEW + ENGAGED_VIEW: :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN: :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION: :LEAD_GENERATION + PREFERRED_LEAD: :PREFERRED_LEAD + CONVERSATION: :CONVERSATION + FOLLOWERS: :FOLLOWERS + PROFILE_VIEWS: :PROFILE_VIEWS + PAGE_VISIT: :PAGE_VISIT + VALUE: :VALUE + AUTOMATIC_VALUE_OPTIMIZATION: :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW: :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT: :DESTINATION_VISIT + MT_LIVE_ROOM: :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE: :PRODUCT_CLICK_IN_LIVE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal] + end + + type pacing = :PACING_MODE_SMOOTH | :PACING_MODE_FAST + + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH: :PACING_MODE_SMOOTH + PACING_MODE_FAST: :PACING_MODE_FAST + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing] + end + + type placement_type = + :PLACEMENT_TYPE_AUTOMATIC | :PLACEMENT_TYPE_NORMAL + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC: :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL: :PLACEMENT_TYPE_NORMAL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform] + end + + type schedule_type = :SCHEDULE_START_END | :SCHEDULE_FROM_NOW + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END: :SCHEDULE_START_END + SCHEDULE_FROM_NOW: :SCHEDULE_FROM_NOW + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type] + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::platform_config] + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupCreateResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_group_delete_params.rbs b/sig/whop_sdk/models/ad_group_delete_params.rbs new file mode 100644 index 00000000..d5596fd4 --- /dev/null +++ b/sig/whop_sdk/models/ad_group_delete_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_group_delete_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdGroupDeleteParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/ad_group_delete_response.rbs b/sig/whop_sdk/models/ad_group_delete_response.rbs new file mode 100644 index 00000000..fd51b106 --- /dev/null +++ b/sig/whop_sdk/models/ad_group_delete_response.rbs @@ -0,0 +1,5 @@ +module WhopSDK + module Models + AdGroupDeleteResponse: WhopSDK::Internal::Type::Converter + end +end diff --git a/sig/whop_sdk/models/ad_group_list_params.rbs b/sig/whop_sdk/models/ad_group_list_params.rbs new file mode 100644 index 00000000..56ca5733 --- /dev/null +++ b/sig/whop_sdk/models/ad_group_list_params.rbs @@ -0,0 +1,87 @@ +module WhopSDK + module Models + type ad_group_list_params = + { + after: String?, + before: String?, + campaign_id: String?, + company_id: String?, + created_after: Time?, + created_before: Time?, + first: Integer?, + last: Integer?, + query: String?, + status: WhopSDK::Models::AdGroupListParams::status? + } + & WhopSDK::Internal::Type::request_parameters + + class AdGroupListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor after: String? + + attr_accessor before: String? + + attr_accessor campaign_id: String? + + attr_accessor company_id: String? + + attr_accessor created_after: Time? + + attr_accessor created_before: Time? + + attr_accessor first: Integer? + + attr_accessor last: Integer? + + attr_accessor query: String? + + attr_accessor status: WhopSDK::Models::AdGroupListParams::status? + + def initialize: ( + ?after: String?, + ?before: String?, + ?campaign_id: String?, + ?company_id: String?, + ?created_after: Time?, + ?created_before: Time?, + ?first: Integer?, + ?last: Integer?, + ?query: String?, + ?status: WhopSDK::Models::AdGroupListParams::status?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + after: String?, + before: String?, + campaign_id: String?, + company_id: String?, + created_after: Time?, + created_before: Time?, + first: Integer?, + last: Integer?, + query: String?, + status: WhopSDK::Models::AdGroupListParams::status?, + request_options: WhopSDK::RequestOptions + } + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListParams::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_group_list_response.rbs b/sig/whop_sdk/models/ad_group_list_response.rbs new file mode 100644 index 00000000..f18de390 --- /dev/null +++ b/sig/whop_sdk/models/ad_group_list_response.rbs @@ -0,0 +1,907 @@ +module WhopSDK + module Models + type ad_group_list_response = + { + id: String, + config: WhopSDK::Models::AdGroupListResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupListResponse::platform_config?, + status: WhopSDK::Models::AdGroupListResponse::status, + updated_at: Time + } + + class AdGroupListResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor config: WhopSDK::Models::AdGroupListResponse::Config? + + attr_accessor created_at: Time + + attr_accessor daily_budget: Float? + + attr_accessor name: String? + + attr_accessor platform_config: WhopSDK::Models::AdGroupListResponse::platform_config? + + attr_accessor status: WhopSDK::Models::AdGroupListResponse::status + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + config: WhopSDK::Models::AdGroupListResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupListResponse::platform_config?, + status: WhopSDK::Models::AdGroupListResponse::status, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + config: WhopSDK::Models::AdGroupListResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupListResponse::platform_config?, + status: WhopSDK::Models::AdGroupListResponse::status, + updated_at: Time + } + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupListResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupListResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupListResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupListResponse::Config::Targeting? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupListResponse::Config::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupListResponse::Config::billing_event? + + attr_accessor end_time: String? + + attr_accessor frequency_cap: Integer? + + attr_accessor frequency_cap_interval_days: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupListResponse::Config::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupListResponse::Config::pacing? + + attr_accessor start_time: String? + + attr_accessor targeting: WhopSDK::Models::AdGroupListResponse::Config::Targeting? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupListResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupListResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupListResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupListResponse::Config::Targeting? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupListResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupListResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupListResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupListResponse::Config::Targeting? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::Config::bid_strategy] + end + + type billing_event = + :impressions | :clicks | :optimized_cpm | :video_views + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS: :impressions + CLICKS: :clicks + OPTIMIZED_CPM: :optimized_cpm + VIDEO_VIEWS: :video_views + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::Config::billing_event] + end + + type optimization_goal = + :conversions + | :link_clicks + | :landing_page_views + | :reach + | :impressions + | :app_installs + | :video_views + | :lead_generation + | :value + | :page_likes + | :conversations + | :ad_recall_lift + | :two_second_continuous_video_views + | :post_engagement + | :event_responses + | :reminders_set + | :quality_lead + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS: :conversions + LINK_CLICKS: :link_clicks + LANDING_PAGE_VIEWS: :landing_page_views + REACH: :reach + IMPRESSIONS: :impressions + APP_INSTALLS: :app_installs + VIDEO_VIEWS: :video_views + LEAD_GENERATION: :lead_generation + VALUE: :value + PAGE_LIKES: :page_likes + CONVERSATIONS: :conversations + AD_RECALL_LIFT: :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :two_second_continuous_video_views + POST_ENGAGEMENT: :post_engagement + EVENT_RESPONSES: :event_responses + REMINDERS_SET: :reminders_set + QUALITY_LEAD: :quality_lead + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::Config::optimization_goal] + end + + type pacing = :standard | :accelerated + + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD: :standard + ACCELERATED: :accelerated + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::Config::pacing] + end + + type targeting = + { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupListResponse::Config::Targeting::placement_type? + } + + class Targeting < WhopSDK::Internal::Type::BaseModel + attr_accessor age_max: Integer? + + attr_accessor age_min: Integer? + + attr_accessor countries: ::Array[String]? + + attr_accessor device_platforms: ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::device_platform]? + + attr_accessor exclude_audience_ids: ::Array[String]? + + attr_accessor genders: ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::gender]? + + attr_accessor include_audience_ids: ::Array[String]? + + attr_accessor interest_ids: ::Array[String]? + + attr_accessor languages: ::Array[String]? + + attr_accessor placement_type: WhopSDK::Models::AdGroupListResponse::Config::Targeting::placement_type? + + def initialize: ( + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupListResponse::Config::Targeting::placement_type? + ) -> void + + def to_hash: -> { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupListResponse::Config::Targeting::placement_type? + } + + type device_platform = :mobile | :desktop + + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE: :mobile + DESKTOP: :desktop + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::device_platform] + end + + type gender = :male | :female | :all + + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE: :male + FEMALE: :female + ALL: :all + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::gender] + end + + type placement_type = :automatic | :manual + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC: :automatic + MANUAL: :manual + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::Config::Targeting::placement_type] + end + end + end + + type platform_config = + (WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType + | WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType)? + + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + type meta_ad_group_platform_config_type = + { + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + typename: :MetaAdGroupPlatformConfigType + } + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor attribution_spec: ::Array[::Hash[Symbol, top]]? + + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event? + + attr_accessor daily_budget: Integer? + + attr_accessor destination_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type? + + attr_accessor end_time: String? + + attr_accessor excluded_geo_locations: ::Hash[Symbol, top]? + + attr_accessor facebook_positions: ::Array[String]? + + attr_accessor geo_locations: ::Hash[Symbol, top]? + + attr_accessor instagram_actor_id: String? + + attr_accessor instagram_positions: ::Array[String]? + + attr_accessor lifetime_budget: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal? + + attr_accessor page_id: String? + + attr_accessor platform: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform + + attr_accessor promoted_object: ::Hash[Symbol, top]? + + attr_accessor publisher_platforms: ::Array[String]? + + attr_accessor status: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status? + + attr_accessor targeting_automation: ::Hash[Symbol, top]? + + attr_accessor typename: :MetaAdGroupPlatformConfigType + + def initialize: ( + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + ?typename: :MetaAdGroupPlatformConfigType + ) -> void + + def to_hash: -> { + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + typename: :MetaAdGroupPlatformConfigType + } + + type bid_strategy = + :LOWEST_COST_WITHOUT_CAP + | :LOWEST_COST_WITH_BID_CAP + | :COST_CAP + | :LOWEST_COST_WITH_MIN_ROAS + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP: :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP: :LOWEST_COST_WITH_BID_CAP + COST_CAP: :COST_CAP + LOWEST_COST_WITH_MIN_ROAS: :LOWEST_COST_WITH_MIN_ROAS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy] + end + + type billing_event = + :APP_INSTALLS + | :CLICKS + | :IMPRESSIONS + | :LINK_CLICKS + | :NONE + | :OFFER_CLAIMS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :THRUPLAY + | :PURCHASE + | :LISTING_INTERACTION + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS: :APP_INSTALLS + CLICKS: :CLICKS + IMPRESSIONS: :IMPRESSIONS + LINK_CLICKS: :LINK_CLICKS + NONE: :NONE + OFFER_CLAIMS: :OFFER_CLAIMS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + THRUPLAY: :THRUPLAY + PURCHASE: :PURCHASE + LISTING_INTERACTION: :LISTING_INTERACTION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event] + end + + type destination_type = + :UNDEFINED + | :WEBSITE + | :APP + | :FACEBOOK + | :MESSENGER + | :WHATSAPP + | :INSTAGRAM_DIRECT + | :INSTAGRAM_PROFILE + | :PHONE_CALL + | :SHOP_AUTOMATIC + | :APPLINKS_AUTOMATIC + | :ON_AD + | :ON_POST + | :ON_VIDEO + | :ON_PAGE + | :ON_EVENT + | :MESSAGING_MESSENGER_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + | :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + | :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + | :FACEBOOK_PAGE + | :INSTAGRAM_LIVE + | :FACEBOOK_LIVE + | :IMAGINE + | :LEAD_FROM_IG_DIRECT + | :LEAD_FROM_MESSENGER + | :WEBSITE_AND_LEAD_FORM + | :WEBSITE_AND_PHONE_CALL + | :BROADCAST_CHANNEL + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED: :UNDEFINED + WEBSITE: :WEBSITE + APP: :APP + FACEBOOK: :FACEBOOK + MESSENGER: :MESSENGER + WHATSAPP: :WHATSAPP + INSTAGRAM_DIRECT: :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE: :INSTAGRAM_PROFILE + PHONE_CALL: :PHONE_CALL + SHOP_AUTOMATIC: :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC: :APPLINKS_AUTOMATIC + ON_AD: :ON_AD + ON_POST: :ON_POST + ON_VIDEO: :ON_VIDEO + ON_PAGE: :ON_PAGE + ON_EVENT: :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP: :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE: :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE: :FACEBOOK_PAGE + INSTAGRAM_LIVE: :INSTAGRAM_LIVE + FACEBOOK_LIVE: :FACEBOOK_LIVE + IMAGINE: :IMAGINE + LEAD_FROM_IG_DIRECT: :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER: :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM: :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL: :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL: :BROADCAST_CHANNEL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type] + end + + type optimization_goal = + :NONE + | :APP_INSTALLS + | :AD_RECALL_LIFT + | :ENGAGED_USERS + | :EVENT_RESPONSES + | :IMPRESSIONS + | :LEAD_GENERATION + | :QUALITY_LEAD + | :LINK_CLICKS + | :OFFSITE_CONVERSIONS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :QUALITY_CALL + | :REACH + | :LANDING_PAGE_VIEWS + | :VISIT_INSTAGRAM_PROFILE + | :VALUE + | :THRUPLAY + | :DERIVED_EVENTS + | :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + | :CONVERSATIONS + | :IN_APP_VALUE + | :MESSAGING_PURCHASE_CONVERSION + | :SUBSCRIBERS + | :REMINDERS_SET + | :MEANINGFUL_CALL_ATTEMPT + | :PROFILE_VISIT + | :PROFILE_AND_PAGE_ENGAGEMENT + | :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + | :ENGAGED_REACH + | :ENGAGED_PAGE_VIEWS + | :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + | :ADVERTISER_SILOED_VALUE + | :AUTOMATIC_OBJECTIVE + | :MESSAGING_APPOINTMENT_CONVERSION + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE: :NONE + APP_INSTALLS: :APP_INSTALLS + AD_RECALL_LIFT: :AD_RECALL_LIFT + ENGAGED_USERS: :ENGAGED_USERS + EVENT_RESPONSES: :EVENT_RESPONSES + IMPRESSIONS: :IMPRESSIONS + LEAD_GENERATION: :LEAD_GENERATION + QUALITY_LEAD: :QUALITY_LEAD + LINK_CLICKS: :LINK_CLICKS + OFFSITE_CONVERSIONS: :OFFSITE_CONVERSIONS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + QUALITY_CALL: :QUALITY_CALL + REACH: :REACH + LANDING_PAGE_VIEWS: :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE: :VISIT_INSTAGRAM_PROFILE + VALUE: :VALUE + THRUPLAY: :THRUPLAY + DERIVED_EVENTS: :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS: :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS: :CONVERSATIONS + IN_APP_VALUE: :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION: :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS: :SUBSCRIBERS + REMINDERS_SET: :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT: :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT: :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT: :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH: :ENGAGED_REACH + ENGAGED_PAGE_VIEWS: :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW: :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE: :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE: :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION: :MESSAGING_APPOINTMENT_CONVERSION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform] + end + + type status = :ACTIVE | :PAUSED + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :ACTIVE + PAUSED: :PAUSED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status] + end + end + + type tiktok_ad_group_platform_config_type = + { + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + typename: :TiktokAdGroupPlatformConfigType + } + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_price: Float? + + attr_accessor bid_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type? + + attr_accessor billing_event: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event? + + attr_accessor budget_mode: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode? + + attr_accessor conversion_bid_price: Float? + + attr_accessor identity_id: String? + + attr_accessor identity_type: String? + + attr_accessor operation_status: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status? + + attr_accessor optimization_event: String? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing? + + attr_accessor pixel_id: String? + + attr_accessor placement_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type? + + attr_accessor placements: ::Array[String]? + + attr_accessor platform: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform + + attr_accessor schedule_end_time: String? + + attr_accessor schedule_start_time: String? + + attr_accessor schedule_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type? + + attr_accessor typename: :TiktokAdGroupPlatformConfigType + + def initialize: ( + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + ?typename: :TiktokAdGroupPlatformConfigType + ) -> void + + def to_hash: -> { + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + typename: :TiktokAdGroupPlatformConfigType + } + + type bid_type = :BID_TYPE_NO_BID | :BID_TYPE_CUSTOM + + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID: :BID_TYPE_NO_BID + BID_TYPE_CUSTOM: :BID_TYPE_CUSTOM + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type] + end + + type billing_event = :CPC | :CPM | :OCPM | :CPV + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC: :CPC + CPM: :CPM + OCPM: :OCPM + CPV: :CPV + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event] + end + + type budget_mode = + :BUDGET_MODE_DAY + | :BUDGET_MODE_TOTAL + | :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY: :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL: :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET: :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode] + end + + type operation_status = :ENABLE | :DISABLE + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE: :ENABLE + DISABLE: :DISABLE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status] + end + + type optimization_goal = + :CLICK + | :CONVERT + | :INSTALL + | :IN_APP_EVENT + | :REACH + | :SHOW + | :VIDEO_VIEW + | :ENGAGED_VIEW + | :ENGAGED_VIEW_FIFTEEN + | :LEAD_GENERATION + | :PREFERRED_LEAD + | :CONVERSATION + | :FOLLOWERS + | :PROFILE_VIEWS + | :PAGE_VISIT + | :VALUE + | :AUTOMATIC_VALUE_OPTIMIZATION + | :TRAFFIC_LANDING_PAGE_VIEW + | :DESTINATION_VISIT + | :MT_LIVE_ROOM + | :PRODUCT_CLICK_IN_LIVE + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK: :CLICK + CONVERT: :CONVERT + INSTALL: :INSTALL + IN_APP_EVENT: :IN_APP_EVENT + REACH: :REACH + SHOW: :SHOW + VIDEO_VIEW: :VIDEO_VIEW + ENGAGED_VIEW: :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN: :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION: :LEAD_GENERATION + PREFERRED_LEAD: :PREFERRED_LEAD + CONVERSATION: :CONVERSATION + FOLLOWERS: :FOLLOWERS + PROFILE_VIEWS: :PROFILE_VIEWS + PAGE_VISIT: :PAGE_VISIT + VALUE: :VALUE + AUTOMATIC_VALUE_OPTIMIZATION: :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW: :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT: :DESTINATION_VISIT + MT_LIVE_ROOM: :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE: :PRODUCT_CLICK_IN_LIVE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal] + end + + type pacing = :PACING_MODE_SMOOTH | :PACING_MODE_FAST + + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH: :PACING_MODE_SMOOTH + PACING_MODE_FAST: :PACING_MODE_FAST + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing] + end + + type placement_type = + :PLACEMENT_TYPE_AUTOMATIC | :PLACEMENT_TYPE_NORMAL + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC: :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL: :PLACEMENT_TYPE_NORMAL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform] + end + + type schedule_type = :SCHEDULE_START_END | :SCHEDULE_FROM_NOW + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END: :SCHEDULE_START_END + SCHEDULE_FROM_NOW: :SCHEDULE_FROM_NOW + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type] + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdGroupListResponse::platform_config] + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_group_retrieve_params.rbs b/sig/whop_sdk/models/ad_group_retrieve_params.rbs new file mode 100644 index 00000000..7cd89f6b --- /dev/null +++ b/sig/whop_sdk/models/ad_group_retrieve_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_group_retrieve_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdGroupRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/ad_group_retrieve_response.rbs b/sig/whop_sdk/models/ad_group_retrieve_response.rbs new file mode 100644 index 00000000..1adbd788 --- /dev/null +++ b/sig/whop_sdk/models/ad_group_retrieve_response.rbs @@ -0,0 +1,982 @@ +module WhopSDK + module Models + type ad_group_retrieve_response = + { + id: String, + ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, + config: WhopSDK::Models::AdGroupRetrieveResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupRetrieveResponse::platform_config?, + status: WhopSDK::Models::AdGroupRetrieveResponse::status, + updated_at: Time + } + + class AdGroupRetrieveResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign + + attr_accessor config: WhopSDK::Models::AdGroupRetrieveResponse::Config? + + attr_accessor created_at: Time + + attr_accessor daily_budget: Float? + + attr_accessor name: String? + + attr_accessor platform_config: WhopSDK::Models::AdGroupRetrieveResponse::platform_config? + + attr_accessor status: WhopSDK::Models::AdGroupRetrieveResponse::status + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, + config: WhopSDK::Models::AdGroupRetrieveResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupRetrieveResponse::platform_config?, + status: WhopSDK::Models::AdGroupRetrieveResponse::status, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, + config: WhopSDK::Models::AdGroupRetrieveResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupRetrieveResponse::platform_config?, + status: WhopSDK::Models::AdGroupRetrieveResponse::status, + updated_at: Time + } + + type ad_campaign = + { + id: String, + platform: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::status, + title: String + } + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor platform: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::platform? + + attr_accessor status: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::status + + attr_accessor title: String + + def initialize: ( + id: String, + platform: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::status, + title: String + ) -> void + + def to_hash: -> { + id: String, + platform: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::status, + title: String + } + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::platform] + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::status] + end + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupRetrieveResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupRetrieveResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupRetrieveResponse::Config::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupRetrieveResponse::Config::billing_event? + + attr_accessor end_time: String? + + attr_accessor frequency_cap: Integer? + + attr_accessor frequency_cap_interval_days: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::Config::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupRetrieveResponse::Config::pacing? + + attr_accessor start_time: String? + + attr_accessor targeting: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupRetrieveResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupRetrieveResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupRetrieveResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupRetrieveResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::bid_strategy] + end + + type billing_event = + :impressions | :clicks | :optimized_cpm | :video_views + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS: :impressions + CLICKS: :clicks + OPTIMIZED_CPM: :optimized_cpm + VIDEO_VIEWS: :video_views + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::billing_event] + end + + type optimization_goal = + :conversions + | :link_clicks + | :landing_page_views + | :reach + | :impressions + | :app_installs + | :video_views + | :lead_generation + | :value + | :page_likes + | :conversations + | :ad_recall_lift + | :two_second_continuous_video_views + | :post_engagement + | :event_responses + | :reminders_set + | :quality_lead + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS: :conversions + LINK_CLICKS: :link_clicks + LANDING_PAGE_VIEWS: :landing_page_views + REACH: :reach + IMPRESSIONS: :impressions + APP_INSTALLS: :app_installs + VIDEO_VIEWS: :video_views + LEAD_GENERATION: :lead_generation + VALUE: :value + PAGE_LIKES: :page_likes + CONVERSATIONS: :conversations + AD_RECALL_LIFT: :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :two_second_continuous_video_views + POST_ENGAGEMENT: :post_engagement + EVENT_RESPONSES: :event_responses + REMINDERS_SET: :reminders_set + QUALITY_LEAD: :quality_lead + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::optimization_goal] + end + + type pacing = :standard | :accelerated + + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD: :standard + ACCELERATED: :accelerated + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::pacing] + end + + type targeting = + { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::placement_type? + } + + class Targeting < WhopSDK::Internal::Type::BaseModel + attr_accessor age_max: Integer? + + attr_accessor age_min: Integer? + + attr_accessor countries: ::Array[String]? + + attr_accessor device_platforms: ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::device_platform]? + + attr_accessor exclude_audience_ids: ::Array[String]? + + attr_accessor genders: ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::gender]? + + attr_accessor include_audience_ids: ::Array[String]? + + attr_accessor interest_ids: ::Array[String]? + + attr_accessor languages: ::Array[String]? + + attr_accessor placement_type: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::placement_type? + + def initialize: ( + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::placement_type? + ) -> void + + def to_hash: -> { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::placement_type? + } + + type device_platform = :mobile | :desktop + + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE: :mobile + DESKTOP: :desktop + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::device_platform] + end + + type gender = :male | :female | :all + + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE: :male + FEMALE: :female + ALL: :all + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::gender] + end + + type placement_type = :automatic | :manual + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC: :automatic + MANUAL: :manual + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::Config::Targeting::placement_type] + end + end + end + + type platform_config = + (WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType + | WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType)? + + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + type meta_ad_group_platform_config_type = + { + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + typename: :MetaAdGroupPlatformConfigType + } + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor attribution_spec: ::Array[::Hash[Symbol, top]]? + + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event? + + attr_accessor daily_budget: Integer? + + attr_accessor destination_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type? + + attr_accessor end_time: String? + + attr_accessor excluded_geo_locations: ::Hash[Symbol, top]? + + attr_accessor facebook_positions: ::Array[String]? + + attr_accessor geo_locations: ::Hash[Symbol, top]? + + attr_accessor instagram_actor_id: String? + + attr_accessor instagram_positions: ::Array[String]? + + attr_accessor lifetime_budget: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal? + + attr_accessor page_id: String? + + attr_accessor platform: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform + + attr_accessor promoted_object: ::Hash[Symbol, top]? + + attr_accessor publisher_platforms: ::Array[String]? + + attr_accessor status: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status? + + attr_accessor targeting_automation: ::Hash[Symbol, top]? + + attr_accessor typename: :MetaAdGroupPlatformConfigType + + def initialize: ( + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + ?typename: :MetaAdGroupPlatformConfigType + ) -> void + + def to_hash: -> { + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + typename: :MetaAdGroupPlatformConfigType + } + + type bid_strategy = + :LOWEST_COST_WITHOUT_CAP + | :LOWEST_COST_WITH_BID_CAP + | :COST_CAP + | :LOWEST_COST_WITH_MIN_ROAS + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP: :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP: :LOWEST_COST_WITH_BID_CAP + COST_CAP: :COST_CAP + LOWEST_COST_WITH_MIN_ROAS: :LOWEST_COST_WITH_MIN_ROAS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy] + end + + type billing_event = + :APP_INSTALLS + | :CLICKS + | :IMPRESSIONS + | :LINK_CLICKS + | :NONE + | :OFFER_CLAIMS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :THRUPLAY + | :PURCHASE + | :LISTING_INTERACTION + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS: :APP_INSTALLS + CLICKS: :CLICKS + IMPRESSIONS: :IMPRESSIONS + LINK_CLICKS: :LINK_CLICKS + NONE: :NONE + OFFER_CLAIMS: :OFFER_CLAIMS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + THRUPLAY: :THRUPLAY + PURCHASE: :PURCHASE + LISTING_INTERACTION: :LISTING_INTERACTION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event] + end + + type destination_type = + :UNDEFINED + | :WEBSITE + | :APP + | :FACEBOOK + | :MESSENGER + | :WHATSAPP + | :INSTAGRAM_DIRECT + | :INSTAGRAM_PROFILE + | :PHONE_CALL + | :SHOP_AUTOMATIC + | :APPLINKS_AUTOMATIC + | :ON_AD + | :ON_POST + | :ON_VIDEO + | :ON_PAGE + | :ON_EVENT + | :MESSAGING_MESSENGER_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + | :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + | :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + | :FACEBOOK_PAGE + | :INSTAGRAM_LIVE + | :FACEBOOK_LIVE + | :IMAGINE + | :LEAD_FROM_IG_DIRECT + | :LEAD_FROM_MESSENGER + | :WEBSITE_AND_LEAD_FORM + | :WEBSITE_AND_PHONE_CALL + | :BROADCAST_CHANNEL + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED: :UNDEFINED + WEBSITE: :WEBSITE + APP: :APP + FACEBOOK: :FACEBOOK + MESSENGER: :MESSENGER + WHATSAPP: :WHATSAPP + INSTAGRAM_DIRECT: :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE: :INSTAGRAM_PROFILE + PHONE_CALL: :PHONE_CALL + SHOP_AUTOMATIC: :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC: :APPLINKS_AUTOMATIC + ON_AD: :ON_AD + ON_POST: :ON_POST + ON_VIDEO: :ON_VIDEO + ON_PAGE: :ON_PAGE + ON_EVENT: :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP: :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE: :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE: :FACEBOOK_PAGE + INSTAGRAM_LIVE: :INSTAGRAM_LIVE + FACEBOOK_LIVE: :FACEBOOK_LIVE + IMAGINE: :IMAGINE + LEAD_FROM_IG_DIRECT: :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER: :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM: :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL: :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL: :BROADCAST_CHANNEL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type] + end + + type optimization_goal = + :NONE + | :APP_INSTALLS + | :AD_RECALL_LIFT + | :ENGAGED_USERS + | :EVENT_RESPONSES + | :IMPRESSIONS + | :LEAD_GENERATION + | :QUALITY_LEAD + | :LINK_CLICKS + | :OFFSITE_CONVERSIONS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :QUALITY_CALL + | :REACH + | :LANDING_PAGE_VIEWS + | :VISIT_INSTAGRAM_PROFILE + | :VALUE + | :THRUPLAY + | :DERIVED_EVENTS + | :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + | :CONVERSATIONS + | :IN_APP_VALUE + | :MESSAGING_PURCHASE_CONVERSION + | :SUBSCRIBERS + | :REMINDERS_SET + | :MEANINGFUL_CALL_ATTEMPT + | :PROFILE_VISIT + | :PROFILE_AND_PAGE_ENGAGEMENT + | :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + | :ENGAGED_REACH + | :ENGAGED_PAGE_VIEWS + | :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + | :ADVERTISER_SILOED_VALUE + | :AUTOMATIC_OBJECTIVE + | :MESSAGING_APPOINTMENT_CONVERSION + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE: :NONE + APP_INSTALLS: :APP_INSTALLS + AD_RECALL_LIFT: :AD_RECALL_LIFT + ENGAGED_USERS: :ENGAGED_USERS + EVENT_RESPONSES: :EVENT_RESPONSES + IMPRESSIONS: :IMPRESSIONS + LEAD_GENERATION: :LEAD_GENERATION + QUALITY_LEAD: :QUALITY_LEAD + LINK_CLICKS: :LINK_CLICKS + OFFSITE_CONVERSIONS: :OFFSITE_CONVERSIONS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + QUALITY_CALL: :QUALITY_CALL + REACH: :REACH + LANDING_PAGE_VIEWS: :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE: :VISIT_INSTAGRAM_PROFILE + VALUE: :VALUE + THRUPLAY: :THRUPLAY + DERIVED_EVENTS: :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS: :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS: :CONVERSATIONS + IN_APP_VALUE: :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION: :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS: :SUBSCRIBERS + REMINDERS_SET: :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT: :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT: :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT: :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH: :ENGAGED_REACH + ENGAGED_PAGE_VIEWS: :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW: :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE: :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE: :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION: :MESSAGING_APPOINTMENT_CONVERSION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform] + end + + type status = :ACTIVE | :PAUSED + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :ACTIVE + PAUSED: :PAUSED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status] + end + end + + type tiktok_ad_group_platform_config_type = + { + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + typename: :TiktokAdGroupPlatformConfigType + } + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_price: Float? + + attr_accessor bid_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type? + + attr_accessor billing_event: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event? + + attr_accessor budget_mode: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode? + + attr_accessor conversion_bid_price: Float? + + attr_accessor identity_id: String? + + attr_accessor identity_type: String? + + attr_accessor operation_status: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status? + + attr_accessor optimization_event: String? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing? + + attr_accessor pixel_id: String? + + attr_accessor placement_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type? + + attr_accessor placements: ::Array[String]? + + attr_accessor platform: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform + + attr_accessor schedule_end_time: String? + + attr_accessor schedule_start_time: String? + + attr_accessor schedule_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type? + + attr_accessor typename: :TiktokAdGroupPlatformConfigType + + def initialize: ( + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + ?typename: :TiktokAdGroupPlatformConfigType + ) -> void + + def to_hash: -> { + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + typename: :TiktokAdGroupPlatformConfigType + } + + type bid_type = :BID_TYPE_NO_BID | :BID_TYPE_CUSTOM + + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID: :BID_TYPE_NO_BID + BID_TYPE_CUSTOM: :BID_TYPE_CUSTOM + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type] + end + + type billing_event = :CPC | :CPM | :OCPM | :CPV + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC: :CPC + CPM: :CPM + OCPM: :OCPM + CPV: :CPV + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event] + end + + type budget_mode = + :BUDGET_MODE_DAY + | :BUDGET_MODE_TOTAL + | :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY: :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL: :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET: :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode] + end + + type operation_status = :ENABLE | :DISABLE + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE: :ENABLE + DISABLE: :DISABLE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status] + end + + type optimization_goal = + :CLICK + | :CONVERT + | :INSTALL + | :IN_APP_EVENT + | :REACH + | :SHOW + | :VIDEO_VIEW + | :ENGAGED_VIEW + | :ENGAGED_VIEW_FIFTEEN + | :LEAD_GENERATION + | :PREFERRED_LEAD + | :CONVERSATION + | :FOLLOWERS + | :PROFILE_VIEWS + | :PAGE_VISIT + | :VALUE + | :AUTOMATIC_VALUE_OPTIMIZATION + | :TRAFFIC_LANDING_PAGE_VIEW + | :DESTINATION_VISIT + | :MT_LIVE_ROOM + | :PRODUCT_CLICK_IN_LIVE + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK: :CLICK + CONVERT: :CONVERT + INSTALL: :INSTALL + IN_APP_EVENT: :IN_APP_EVENT + REACH: :REACH + SHOW: :SHOW + VIDEO_VIEW: :VIDEO_VIEW + ENGAGED_VIEW: :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN: :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION: :LEAD_GENERATION + PREFERRED_LEAD: :PREFERRED_LEAD + CONVERSATION: :CONVERSATION + FOLLOWERS: :FOLLOWERS + PROFILE_VIEWS: :PROFILE_VIEWS + PAGE_VISIT: :PAGE_VISIT + VALUE: :VALUE + AUTOMATIC_VALUE_OPTIMIZATION: :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW: :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT: :DESTINATION_VISIT + MT_LIVE_ROOM: :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE: :PRODUCT_CLICK_IN_LIVE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal] + end + + type pacing = :PACING_MODE_SMOOTH | :PACING_MODE_FAST + + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH: :PACING_MODE_SMOOTH + PACING_MODE_FAST: :PACING_MODE_FAST + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing] + end + + type placement_type = + :PLACEMENT_TYPE_AUTOMATIC | :PLACEMENT_TYPE_NORMAL + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC: :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL: :PLACEMENT_TYPE_NORMAL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform] + end + + type schedule_type = :SCHEDULE_START_END | :SCHEDULE_FROM_NOW + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END: :SCHEDULE_START_END + SCHEDULE_FROM_NOW: :SCHEDULE_FROM_NOW + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type] + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::platform_config] + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_group_update_params.rbs b/sig/whop_sdk/models/ad_group_update_params.rbs new file mode 100644 index 00000000..79431d8f --- /dev/null +++ b/sig/whop_sdk/models/ad_group_update_params.rbs @@ -0,0 +1,2439 @@ +module WhopSDK + module Models + type ad_group_update_params = + { + id: String, + budget: Float?, + budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type?, + config: WhopSDK::AdGroupUpdateParams::Config?, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig?, + status: WhopSDK::Models::AdGroupUpdateParams::status? + } + & WhopSDK::Internal::Type::request_parameters + + class AdGroupUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor budget: Float? + + attr_accessor budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type? + + attr_accessor config: WhopSDK::AdGroupUpdateParams::Config? + + attr_accessor daily_budget: Float? + + attr_accessor name: String? + + attr_accessor platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig? + + attr_accessor status: WhopSDK::Models::AdGroupUpdateParams::status? + + def initialize: ( + id: String, + ?budget: Float?, + ?budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type?, + ?config: WhopSDK::AdGroupUpdateParams::Config?, + ?daily_budget: Float?, + ?name: String?, + ?platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig?, + ?status: WhopSDK::Models::AdGroupUpdateParams::status?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + id: String, + budget: Float?, + budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type?, + config: WhopSDK::AdGroupUpdateParams::Config?, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig?, + status: WhopSDK::Models::AdGroupUpdateParams::status?, + request_options: WhopSDK::RequestOptions + } + + type budget_type = :daily | :lifetime + + module BudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY: :daily + LIFETIME: :lifetime + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::budget_type] + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateParams::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateParams::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupUpdateParams::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateParams::Config::pacing?, + start_time: String?, + targeting: WhopSDK::AdGroupUpdateParams::Config::Targeting? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupUpdateParams::Config::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupUpdateParams::Config::billing_event? + + attr_accessor end_time: String? + + attr_accessor frequency_cap: Integer? + + attr_accessor frequency_cap_interval_days: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupUpdateParams::Config::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupUpdateParams::Config::pacing? + + attr_accessor start_time: String? + + attr_accessor targeting: WhopSDK::AdGroupUpdateParams::Config::Targeting? + + def initialize: ( + ?bid_amount: Integer?, + ?bid_strategy: WhopSDK::Models::AdGroupUpdateParams::Config::bid_strategy?, + ?billing_event: WhopSDK::Models::AdGroupUpdateParams::Config::billing_event?, + ?end_time: String?, + ?frequency_cap: Integer?, + ?frequency_cap_interval_days: Integer?, + ?optimization_goal: WhopSDK::Models::AdGroupUpdateParams::Config::optimization_goal?, + ?pacing: WhopSDK::Models::AdGroupUpdateParams::Config::pacing?, + ?start_time: String?, + ?targeting: WhopSDK::AdGroupUpdateParams::Config::Targeting? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateParams::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateParams::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupUpdateParams::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateParams::Config::pacing?, + start_time: String?, + targeting: WhopSDK::AdGroupUpdateParams::Config::Targeting? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::bid_strategy] + end + + type billing_event = + :impressions | :clicks | :optimized_cpm | :video_views + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS: :impressions + CLICKS: :clicks + OPTIMIZED_CPM: :optimized_cpm + VIDEO_VIEWS: :video_views + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::billing_event] + end + + type optimization_goal = + :conversions + | :link_clicks + | :landing_page_views + | :reach + | :impressions + | :app_installs + | :video_views + | :lead_generation + | :value + | :page_likes + | :conversations + | :ad_recall_lift + | :two_second_continuous_video_views + | :post_engagement + | :event_responses + | :reminders_set + | :quality_lead + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS: :conversions + LINK_CLICKS: :link_clicks + LANDING_PAGE_VIEWS: :landing_page_views + REACH: :reach + IMPRESSIONS: :impressions + APP_INSTALLS: :app_installs + VIDEO_VIEWS: :video_views + LEAD_GENERATION: :lead_generation + VALUE: :value + PAGE_LIKES: :page_likes + CONVERSATIONS: :conversations + AD_RECALL_LIFT: :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :two_second_continuous_video_views + POST_ENGAGEMENT: :post_engagement + EVENT_RESPONSES: :event_responses + REMINDERS_SET: :reminders_set + QUALITY_LEAD: :quality_lead + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::optimization_goal] + end + + type pacing = :standard | :accelerated + + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD: :standard + ACCELERATED: :accelerated + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::pacing] + end + + type targeting = + { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::placement_type? + } + + class Targeting < WhopSDK::Internal::Type::BaseModel + attr_accessor age_max: Integer? + + attr_accessor age_min: Integer? + + attr_accessor countries: ::Array[String]? + + attr_accessor device_platforms: ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::device_platform]? + + attr_accessor exclude_audience_ids: ::Array[String]? + + attr_accessor genders: ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::gender]? + + attr_accessor include_audience_ids: ::Array[String]? + + attr_accessor interest_ids: ::Array[String]? + + attr_accessor languages: ::Array[String]? + + attr_accessor placement_type: WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::placement_type? + + def initialize: ( + ?age_max: Integer?, + ?age_min: Integer?, + ?countries: ::Array[String]?, + ?device_platforms: ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::device_platform]?, + ?exclude_audience_ids: ::Array[String]?, + ?genders: ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::gender]?, + ?include_audience_ids: ::Array[String]?, + ?interest_ids: ::Array[String]?, + ?languages: ::Array[String]?, + ?placement_type: WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::placement_type? + ) -> void + + def to_hash: -> { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::placement_type? + } + + type device_platform = :mobile | :desktop + + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE: :mobile + DESKTOP: :desktop + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::device_platform] + end + + type gender = :male | :female | :all + + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE: :male + FEMALE: :female + ALL: :all + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::gender] + end + + type placement_type = :automatic | :manual + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC: :automatic + MANUAL: :manual + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::Config::Targeting::placement_type] + end + end + end + + type platform_config = + { + meta: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta?, + tiktok: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok? + } + + class PlatformConfig < WhopSDK::Internal::Type::BaseModel + attr_accessor meta: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta? + + attr_accessor tiktok: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok? + + def initialize: ( + ?meta: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta?, + ?tiktok: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok? + ) -> void + + def to_hash: -> { + meta: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta?, + tiktok: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok? + } + + type meta = + { + android_devices: ::Array[String]?, + attribution_setting: String?, + attribution_spec: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec]?, + audience_network_positions: ::Array[String]?, + audience_type: String?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::billing_event?, + brand_safety_content_filter_levels: ::Array[String]?, + budget_remaining: String?, + cost_per_result_goal: Float?, + created_time: String?, + daily_budget: Integer?, + daily_min_spend_target: String?, + daily_spend_cap: String?, + destination_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::destination_type?, + dsa_beneficiary: String?, + dsa_payor: String?, + end_time: String?, + excluded_geo_locations: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations?, + facebook_positions: ::Array[String]?, + frequency_control_count: Integer?, + frequency_control_days: Integer?, + frequency_control_type: String?, + geo_cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity]?, + geo_locations: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations?, + geo_regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion]?, + geo_zips: ::Array[String]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + ios_devices: ::Array[String]?, + is_dynamic_creative: bool?, + lead_conversion_location: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::lead_conversion_location?, + lead_form_config: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig?, + lead_gen_form_id: String?, + lifetime_budget: Integer?, + lifetime_min_spend_target: String?, + lifetime_spend_cap: String?, + location_types: ::Array[String]?, + messenger_positions: ::Array[String]?, + optimization_goal: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::optimization_goal?, + page_id: String?, + pixel_id: String?, + promoted_object: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject?, + publisher_platforms: ::Array[String]?, + source_adset_id: String?, + start_time: String?, + status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::status?, + targeting_automation: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation?, + threads_positions: ::Array[String]?, + updated_time: String?, + user_device: ::Array[String]?, + user_os: ::Array[String]?, + whatsapp_phone_number: String?, + whatsapp_positions: ::Array[String]? + } + + class Meta < WhopSDK::Internal::Type::BaseModel + attr_accessor android_devices: ::Array[String]? + + attr_accessor attribution_setting: String? + + attr_accessor attribution_spec: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec]? + + attr_accessor audience_network_positions: ::Array[String]? + + attr_accessor audience_type: String? + + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::billing_event? + + attr_accessor brand_safety_content_filter_levels: ::Array[String]? + + attr_accessor budget_remaining: String? + + attr_accessor cost_per_result_goal: Float? + + attr_accessor created_time: String? + + attr_accessor daily_budget: Integer? + + attr_accessor daily_min_spend_target: String? + + attr_accessor daily_spend_cap: String? + + attr_accessor destination_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::destination_type? + + attr_accessor dsa_beneficiary: String? + + attr_accessor dsa_payor: String? + + attr_accessor end_time: String? + + attr_accessor excluded_geo_locations: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations? + + attr_accessor facebook_positions: ::Array[String]? + + attr_accessor frequency_control_count: Integer? + + attr_accessor frequency_control_days: Integer? + + attr_accessor frequency_control_type: String? + + attr_accessor geo_cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity]? + + attr_accessor geo_locations: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations? + + attr_accessor geo_regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion]? + + attr_accessor geo_zips: ::Array[String]? + + attr_accessor instagram_actor_id: String? + + attr_accessor instagram_positions: ::Array[String]? + + attr_accessor ios_devices: ::Array[String]? + + attr_accessor is_dynamic_creative: bool? + + attr_accessor lead_conversion_location: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::lead_conversion_location? + + attr_accessor lead_form_config: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig? + + attr_accessor lead_gen_form_id: String? + + attr_accessor lifetime_budget: Integer? + + attr_accessor lifetime_min_spend_target: String? + + attr_accessor lifetime_spend_cap: String? + + attr_accessor location_types: ::Array[String]? + + attr_accessor messenger_positions: ::Array[String]? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::optimization_goal? + + attr_accessor page_id: String? + + attr_accessor pixel_id: String? + + attr_accessor promoted_object: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject? + + attr_accessor publisher_platforms: ::Array[String]? + + attr_accessor source_adset_id: String? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::status? + + attr_accessor targeting_automation: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation? + + attr_accessor threads_positions: ::Array[String]? + + attr_accessor updated_time: String? + + attr_accessor user_device: ::Array[String]? + + attr_accessor user_os: ::Array[String]? + + attr_accessor whatsapp_phone_number: String? + + attr_accessor whatsapp_positions: ::Array[String]? + + def initialize: ( + ?android_devices: ::Array[String]?, + ?attribution_setting: String?, + ?attribution_spec: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec]?, + ?audience_network_positions: ::Array[String]?, + ?audience_type: String?, + ?bid_amount: Integer?, + ?bid_strategy: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::bid_strategy?, + ?billing_event: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::billing_event?, + ?brand_safety_content_filter_levels: ::Array[String]?, + ?budget_remaining: String?, + ?cost_per_result_goal: Float?, + ?created_time: String?, + ?daily_budget: Integer?, + ?daily_min_spend_target: String?, + ?daily_spend_cap: String?, + ?destination_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::destination_type?, + ?dsa_beneficiary: String?, + ?dsa_payor: String?, + ?end_time: String?, + ?excluded_geo_locations: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations?, + ?facebook_positions: ::Array[String]?, + ?frequency_control_count: Integer?, + ?frequency_control_days: Integer?, + ?frequency_control_type: String?, + ?geo_cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity]?, + ?geo_locations: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations?, + ?geo_regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion]?, + ?geo_zips: ::Array[String]?, + ?instagram_actor_id: String?, + ?instagram_positions: ::Array[String]?, + ?ios_devices: ::Array[String]?, + ?is_dynamic_creative: bool?, + ?lead_conversion_location: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::lead_conversion_location?, + ?lead_form_config: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig?, + ?lead_gen_form_id: String?, + ?lifetime_budget: Integer?, + ?lifetime_min_spend_target: String?, + ?lifetime_spend_cap: String?, + ?location_types: ::Array[String]?, + ?messenger_positions: ::Array[String]?, + ?optimization_goal: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::optimization_goal?, + ?page_id: String?, + ?pixel_id: String?, + ?promoted_object: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject?, + ?publisher_platforms: ::Array[String]?, + ?source_adset_id: String?, + ?start_time: String?, + ?status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::status?, + ?targeting_automation: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation?, + ?threads_positions: ::Array[String]?, + ?updated_time: String?, + ?user_device: ::Array[String]?, + ?user_os: ::Array[String]?, + ?whatsapp_phone_number: String?, + ?whatsapp_positions: ::Array[String]? + ) -> void + + def to_hash: -> { + android_devices: ::Array[String]?, + attribution_setting: String?, + attribution_spec: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::AttributionSpec]?, + audience_network_positions: ::Array[String]?, + audience_type: String?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::billing_event?, + brand_safety_content_filter_levels: ::Array[String]?, + budget_remaining: String?, + cost_per_result_goal: Float?, + created_time: String?, + daily_budget: Integer?, + daily_min_spend_target: String?, + daily_spend_cap: String?, + destination_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::destination_type?, + dsa_beneficiary: String?, + dsa_payor: String?, + end_time: String?, + excluded_geo_locations: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations?, + facebook_positions: ::Array[String]?, + frequency_control_count: Integer?, + frequency_control_days: Integer?, + frequency_control_type: String?, + geo_cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoCity]?, + geo_locations: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations?, + geo_regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoRegion]?, + geo_zips: ::Array[String]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + ios_devices: ::Array[String]?, + is_dynamic_creative: bool?, + lead_conversion_location: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::lead_conversion_location?, + lead_form_config: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig?, + lead_gen_form_id: String?, + lifetime_budget: Integer?, + lifetime_min_spend_target: String?, + lifetime_spend_cap: String?, + location_types: ::Array[String]?, + messenger_positions: ::Array[String]?, + optimization_goal: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::optimization_goal?, + page_id: String?, + pixel_id: String?, + promoted_object: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::PromotedObject?, + publisher_platforms: ::Array[String]?, + source_adset_id: String?, + start_time: String?, + status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::status?, + targeting_automation: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::TargetingAutomation?, + threads_positions: ::Array[String]?, + updated_time: String?, + user_device: ::Array[String]?, + user_os: ::Array[String]?, + whatsapp_phone_number: String?, + whatsapp_positions: ::Array[String]? + } + + type attribution_spec = { event_type: String, window_days: Integer } + + class AttributionSpec < WhopSDK::Internal::Type::BaseModel + attr_accessor event_type: String + + attr_accessor window_days: Integer + + def initialize: (event_type: String, window_days: Integer) -> void + + def to_hash: -> { event_type: String, window_days: Integer } + end + + type bid_strategy = + :LOWEST_COST_WITHOUT_CAP + | :LOWEST_COST_WITH_BID_CAP + | :COST_CAP + | :LOWEST_COST_WITH_MIN_ROAS + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP: :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP: :LOWEST_COST_WITH_BID_CAP + COST_CAP: :COST_CAP + LOWEST_COST_WITH_MIN_ROAS: :LOWEST_COST_WITH_MIN_ROAS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::bid_strategy] + end + + type billing_event = + :APP_INSTALLS + | :CLICKS + | :IMPRESSIONS + | :LINK_CLICKS + | :NONE + | :OFFER_CLAIMS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :THRUPLAY + | :PURCHASE + | :LISTING_INTERACTION + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS: :APP_INSTALLS + CLICKS: :CLICKS + IMPRESSIONS: :IMPRESSIONS + LINK_CLICKS: :LINK_CLICKS + NONE: :NONE + OFFER_CLAIMS: :OFFER_CLAIMS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + THRUPLAY: :THRUPLAY + PURCHASE: :PURCHASE + LISTING_INTERACTION: :LISTING_INTERACTION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::billing_event] + end + + type destination_type = + :UNDEFINED + | :WEBSITE + | :APP + | :FACEBOOK + | :MESSENGER + | :WHATSAPP + | :INSTAGRAM_DIRECT + | :INSTAGRAM_PROFILE + | :PHONE_CALL + | :SHOP_AUTOMATIC + | :APPLINKS_AUTOMATIC + | :ON_AD + | :ON_POST + | :ON_VIDEO + | :ON_PAGE + | :ON_EVENT + | :MESSAGING_MESSENGER_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + | :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + | :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + | :FACEBOOK_PAGE + | :INSTAGRAM_LIVE + | :FACEBOOK_LIVE + | :IMAGINE + | :LEAD_FROM_IG_DIRECT + | :LEAD_FROM_MESSENGER + | :WEBSITE_AND_LEAD_FORM + | :WEBSITE_AND_PHONE_CALL + | :BROADCAST_CHANNEL + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED: :UNDEFINED + WEBSITE: :WEBSITE + APP: :APP + FACEBOOK: :FACEBOOK + MESSENGER: :MESSENGER + WHATSAPP: :WHATSAPP + INSTAGRAM_DIRECT: :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE: :INSTAGRAM_PROFILE + PHONE_CALL: :PHONE_CALL + SHOP_AUTOMATIC: :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC: :APPLINKS_AUTOMATIC + ON_AD: :ON_AD + ON_POST: :ON_POST + ON_VIDEO: :ON_VIDEO + ON_PAGE: :ON_PAGE + ON_EVENT: :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP: :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE: :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE: :FACEBOOK_PAGE + INSTAGRAM_LIVE: :INSTAGRAM_LIVE + FACEBOOK_LIVE: :FACEBOOK_LIVE + IMAGINE: :IMAGINE + LEAD_FROM_IG_DIRECT: :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER: :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM: :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL: :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL: :BROADCAST_CHANNEL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::destination_type] + end + + type excluded_geo_locations = + { + cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City]?, + countries: ::Array[String]?, + location_types: ::Array[String]?, + regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region]?, + zips: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip]? + } + + class ExcludedGeoLocations < WhopSDK::Internal::Type::BaseModel + attr_accessor cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City]? + + attr_accessor countries: ::Array[String]? + + attr_accessor location_types: ::Array[String]? + + attr_accessor regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region]? + + attr_accessor zips: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip]? + + def initialize: ( + ?cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City]?, + ?countries: ::Array[String]?, + ?location_types: ::Array[String]?, + ?regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region]?, + ?zips: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip]? + ) -> void + + def to_hash: -> { + cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::City]?, + countries: ::Array[String]?, + location_types: ::Array[String]?, + regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Region]?, + zips: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::ExcludedGeoLocations::Zip]? + } + + type city = + { key: String, country: String?, name: String?, radius: Integer? } + + class City < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type region = + { key: String, country: String?, name: String?, radius: Integer? } + + class Region < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type zip = + { key: String, country: String?, name: String?, radius: Integer? } + + class Zip < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + end + + type geo_city = + { key: String, country: String?, name: String?, radius: Integer? } + + class GeoCity < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type geo_locations = + { + cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City]?, + countries: ::Array[String]?, + location_types: ::Array[String]?, + regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region]?, + zips: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip]? + } + + class GeoLocations < WhopSDK::Internal::Type::BaseModel + attr_accessor cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City]? + + attr_accessor countries: ::Array[String]? + + attr_accessor location_types: ::Array[String]? + + attr_accessor regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region]? + + attr_accessor zips: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip]? + + def initialize: ( + ?cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City]?, + ?countries: ::Array[String]?, + ?location_types: ::Array[String]?, + ?regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region]?, + ?zips: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip]? + ) -> void + + def to_hash: -> { + cities: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::City]?, + countries: ::Array[String]?, + location_types: ::Array[String]?, + regions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Region]?, + zips: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::GeoLocations::Zip]? + } + + type city = + { key: String, country: String?, name: String?, radius: Integer? } + + class City < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type region = + { key: String, country: String?, name: String?, radius: Integer? } + + class Region < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type zip = + { key: String, country: String?, name: String?, radius: Integer? } + + class Zip < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + end + + type geo_region = + { key: String, country: String?, name: String?, radius: Integer? } + + class GeoRegion < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor country: String? + + attr_accessor name: String? + + attr_accessor radius: Integer? + + def initialize: ( + key: String, + ?country: String?, + ?name: String?, + ?radius: Integer? + ) -> void + + def to_hash: -> { + key: String, + country: String?, + name: String?, + radius: Integer? + } + end + + type lead_conversion_location = + :website | :instant_forms | :messenger | :instagram | :calls | :app + + module LeadConversionLocation + extend WhopSDK::Internal::Type::Enum + + WEBSITE: :website + INSTANT_FORMS: :instant_forms + MESSENGER: :messenger + INSTAGRAM: :instagram + CALLS: :calls + APP: :app + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::lead_conversion_location] + end + + type lead_form_config = + { + name: String, + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question], + background_image_source: String?, + background_image_url: String?, + conditional_logic_enabled: bool?, + context_card_button_text: String?, + context_card_content: ::Array[String]?, + context_card_style: String?, + context_card_title: String?, + custom_disclaimer_body: String?, + custom_disclaimer_checkboxes: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox]?, + custom_disclaimer_title: String?, + form_type: String?, + messenger_enabled: bool?, + phone_verification_enabled: bool?, + privacy_policy_link_text: String?, + question_page_custom_headline: String?, + rich_creative_headline: String?, + rich_creative_overview: String?, + rich_creative_url: String?, + thank_you_pages: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage]? + } + + class LeadFormConfig < WhopSDK::Internal::Type::BaseModel + attr_accessor name: String + + attr_accessor privacy_policy_url: String + + attr_accessor questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question] + + attr_accessor background_image_source: String? + + attr_accessor background_image_url: String? + + attr_accessor conditional_logic_enabled: bool? + + attr_accessor context_card_button_text: String? + + attr_accessor context_card_content: ::Array[String]? + + attr_accessor context_card_style: String? + + attr_accessor context_card_title: String? + + attr_accessor custom_disclaimer_body: String? + + attr_accessor custom_disclaimer_checkboxes: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox]? + + attr_accessor custom_disclaimer_title: String? + + attr_accessor form_type: String? + + attr_accessor messenger_enabled: bool? + + attr_accessor phone_verification_enabled: bool? + + attr_accessor privacy_policy_link_text: String? + + attr_accessor question_page_custom_headline: String? + + attr_accessor rich_creative_headline: String? + + attr_accessor rich_creative_overview: String? + + attr_accessor rich_creative_url: String? + + attr_accessor thank_you_pages: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage]? + + def initialize: ( + name: String, + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question], + ?background_image_source: String?, + ?background_image_url: String?, + ?conditional_logic_enabled: bool?, + ?context_card_button_text: String?, + ?context_card_content: ::Array[String]?, + ?context_card_style: String?, + ?context_card_title: String?, + ?custom_disclaimer_body: String?, + ?custom_disclaimer_checkboxes: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox]?, + ?custom_disclaimer_title: String?, + ?form_type: String?, + ?messenger_enabled: bool?, + ?phone_verification_enabled: bool?, + ?privacy_policy_link_text: String?, + ?question_page_custom_headline: String?, + ?rich_creative_headline: String?, + ?rich_creative_overview: String?, + ?rich_creative_url: String?, + ?thank_you_pages: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage]? + ) -> void + + def to_hash: -> { + name: String, + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question], + background_image_source: String?, + background_image_url: String?, + conditional_logic_enabled: bool?, + context_card_button_text: String?, + context_card_content: ::Array[String]?, + context_card_style: String?, + context_card_title: String?, + custom_disclaimer_body: String?, + custom_disclaimer_checkboxes: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::CustomDisclaimerCheckbox]?, + custom_disclaimer_title: String?, + form_type: String?, + messenger_enabled: bool?, + phone_verification_enabled: bool?, + privacy_policy_link_text: String?, + question_page_custom_headline: String?, + rich_creative_headline: String?, + rich_creative_overview: String?, + rich_creative_url: String?, + thank_you_pages: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::ThankYouPage]? + } + + type question = + { + type: String, + conditional_questions_group_id: String?, + dependent_conditional_questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]?, + inline_context: String?, + key: String?, + label: String?, + options: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]?, + question_format: String? + } + + class Question < WhopSDK::Internal::Type::BaseModel + attr_accessor type: String + + attr_accessor conditional_questions_group_id: String? + + attr_accessor dependent_conditional_questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]? + + attr_accessor inline_context: String? + + attr_accessor key: String? + + attr_accessor label: String? + + attr_accessor options: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]? + + attr_accessor question_format: String? + + def initialize: ( + type: String, + ?conditional_questions_group_id: String?, + ?dependent_conditional_questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]?, + ?inline_context: String?, + ?key: String?, + ?label: String?, + ?options: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]?, + ?question_format: String? + ) -> void + + def to_hash: -> { + type: String, + conditional_questions_group_id: String?, + dependent_conditional_questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion]?, + inline_context: String?, + key: String?, + label: String?, + options: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option]?, + question_format: String? + } + + type dependent_conditional_question = + { + type: String, + inline_context: String?, + key: String?, + label: String?, + options: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option]? + } + + class DependentConditionalQuestion < WhopSDK::Internal::Type::BaseModel + attr_accessor type: String + + attr_accessor inline_context: String? + + attr_accessor key: String? + + attr_accessor label: String? + + attr_accessor options: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option]? + + def initialize: ( + type: String, + ?inline_context: String?, + ?key: String?, + ?label: String?, + ?options: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option]? + ) -> void + + def to_hash: -> { + type: String, + inline_context: String?, + key: String?, + label: String?, + options: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option]? + } + + type option = + { + key: String, + value: String, + logic: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic? + } + + class Option < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor value: String + + attr_accessor logic: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic? + + def initialize: ( + key: String, + value: String, + ?logic: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic? + ) -> void + + def to_hash: -> { + key: String, + value: String, + logic: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::DependentConditionalQuestion::Option::Logic? + } + + type logic = + { + type: String, + target_end_page_index: Integer?, + target_question_index: Integer? + } + + class Logic < WhopSDK::Internal::Type::BaseModel + attr_accessor type: String + + attr_accessor target_end_page_index: Integer? + + attr_accessor target_question_index: Integer? + + def initialize: ( + type: String, + ?target_end_page_index: Integer?, + ?target_question_index: Integer? + ) -> void + + def to_hash: -> { + type: String, + target_end_page_index: Integer?, + target_question_index: Integer? + } + end + end + end + + type option = + { + key: String, + value: String, + logic: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic? + } + + class Option < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor value: String + + attr_accessor logic: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic? + + def initialize: ( + key: String, + value: String, + ?logic: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic? + ) -> void + + def to_hash: -> { + key: String, + value: String, + logic: WhopSDK::AdGroupUpdateParams::PlatformConfig::Meta::LeadFormConfig::Question::Option::Logic? + } + + type logic = + { + type: String, + target_end_page_index: Integer?, + target_question_index: Integer? + } + + class Logic < WhopSDK::Internal::Type::BaseModel + attr_accessor type: String + + attr_accessor target_end_page_index: Integer? + + attr_accessor target_question_index: Integer? + + def initialize: ( + type: String, + ?target_end_page_index: Integer?, + ?target_question_index: Integer? + ) -> void + + def to_hash: -> { + type: String, + target_end_page_index: Integer?, + target_question_index: Integer? + } + end + end + end + + type custom_disclaimer_checkbox = + { + key: String, + text: String, + is_checked_by_default: bool?, + is_required: bool? + } + + class CustomDisclaimerCheckbox < WhopSDK::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor text: String + + attr_accessor is_checked_by_default: bool? + + attr_accessor is_required: bool? + + def initialize: ( + key: String, + text: String, + ?is_checked_by_default: bool?, + ?is_required: bool? + ) -> void + + def to_hash: -> { + key: String, + text: String, + is_checked_by_default: bool?, + is_required: bool? + } + end + + type thank_you_page = + { + body: String?, + business_phone: String?, + button_text: String?, + button_type: String?, + conditional_question_group_id: String?, + enable_messenger: bool?, + gated_file_url: String?, + link: String?, + name: String?, + title: String? + } + + class ThankYouPage < WhopSDK::Internal::Type::BaseModel + attr_accessor body: String? + + attr_accessor business_phone: String? + + attr_accessor button_text: String? + + attr_accessor button_type: String? + + attr_accessor conditional_question_group_id: String? + + attr_accessor enable_messenger: bool? + + attr_accessor gated_file_url: String? + + attr_accessor link: String? + + attr_accessor name: String? + + attr_accessor title: String? + + def initialize: ( + ?body: String?, + ?business_phone: String?, + ?button_text: String?, + ?button_type: String?, + ?conditional_question_group_id: String?, + ?enable_messenger: bool?, + ?gated_file_url: String?, + ?link: String?, + ?name: String?, + ?title: String? + ) -> void + + def to_hash: -> { + body: String?, + business_phone: String?, + button_text: String?, + button_type: String?, + conditional_question_group_id: String?, + enable_messenger: bool?, + gated_file_url: String?, + link: String?, + name: String?, + title: String? + } + end + end + + type optimization_goal = + :NONE + | :APP_INSTALLS + | :AD_RECALL_LIFT + | :ENGAGED_USERS + | :EVENT_RESPONSES + | :IMPRESSIONS + | :LEAD_GENERATION + | :QUALITY_LEAD + | :LINK_CLICKS + | :OFFSITE_CONVERSIONS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :QUALITY_CALL + | :REACH + | :LANDING_PAGE_VIEWS + | :VISIT_INSTAGRAM_PROFILE + | :VALUE + | :THRUPLAY + | :DERIVED_EVENTS + | :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + | :CONVERSATIONS + | :IN_APP_VALUE + | :MESSAGING_PURCHASE_CONVERSION + | :SUBSCRIBERS + | :REMINDERS_SET + | :MEANINGFUL_CALL_ATTEMPT + | :PROFILE_VISIT + | :PROFILE_AND_PAGE_ENGAGEMENT + | :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + | :ENGAGED_REACH + | :ENGAGED_PAGE_VIEWS + | :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + | :ADVERTISER_SILOED_VALUE + | :AUTOMATIC_OBJECTIVE + | :MESSAGING_APPOINTMENT_CONVERSION + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE: :NONE + APP_INSTALLS: :APP_INSTALLS + AD_RECALL_LIFT: :AD_RECALL_LIFT + ENGAGED_USERS: :ENGAGED_USERS + EVENT_RESPONSES: :EVENT_RESPONSES + IMPRESSIONS: :IMPRESSIONS + LEAD_GENERATION: :LEAD_GENERATION + QUALITY_LEAD: :QUALITY_LEAD + LINK_CLICKS: :LINK_CLICKS + OFFSITE_CONVERSIONS: :OFFSITE_CONVERSIONS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + QUALITY_CALL: :QUALITY_CALL + REACH: :REACH + LANDING_PAGE_VIEWS: :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE: :VISIT_INSTAGRAM_PROFILE + VALUE: :VALUE + THRUPLAY: :THRUPLAY + DERIVED_EVENTS: :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS: :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS: :CONVERSATIONS + IN_APP_VALUE: :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION: :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS: :SUBSCRIBERS + REMINDERS_SET: :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT: :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT: :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT: :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH: :ENGAGED_REACH + ENGAGED_PAGE_VIEWS: :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW: :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE: :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE: :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION: :MESSAGING_APPOINTMENT_CONVERSION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::optimization_goal] + end + + type promoted_object = + { + custom_conversion_id: String?, + custom_event_str: String?, + custom_event_type: String?, + page_id: String?, + pixel_id: String?, + whatsapp_phone_number: String? + } + + class PromotedObject < WhopSDK::Internal::Type::BaseModel + attr_accessor custom_conversion_id: String? + + attr_accessor custom_event_str: String? + + attr_accessor custom_event_type: String? + + attr_accessor page_id: String? + + attr_accessor pixel_id: String? + + attr_accessor whatsapp_phone_number: String? + + def initialize: ( + ?custom_conversion_id: String?, + ?custom_event_str: String?, + ?custom_event_type: String?, + ?page_id: String?, + ?pixel_id: String?, + ?whatsapp_phone_number: String? + ) -> void + + def to_hash: -> { + custom_conversion_id: String?, + custom_event_str: String?, + custom_event_type: String?, + page_id: String?, + pixel_id: String?, + whatsapp_phone_number: String? + } + end + + type status = :ACTIVE | :PAUSED + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :ACTIVE + PAUSED: :PAUSED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Meta::status] + end + + type targeting_automation = { advantage_audience: Integer? } + + class TargetingAutomation < WhopSDK::Internal::Type::BaseModel + attr_accessor advantage_audience: Integer? + + def initialize: (?advantage_audience: Integer?) -> void + + def to_hash: -> { advantage_audience: Integer? } + end + end + + type tiktok = + { + actions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action]?, + age_groups: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::age_group]?, + app_id: String?, + attribution_event_count: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::attribution_event_count?, + audience_ids: ::Array[String]?, + audience_rule: ::Hash[Symbol, top]?, + audience_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::audience_type?, + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::bid_type?, + billing_event: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::billing_event?, + brand_safety_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::brand_safety_type?, + budget_mode: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::budget_mode?, + carrier_ids: ::Array[String]?, + category_exclusion_ids: ::Array[String]?, + click_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::click_attribution_window?, + comment_disabled: bool?, + contextual_tag_ids: ::Array[String]?, + conversion_bid_price: Float?, + creative_material_mode: String?, + dayparting: String?, + deep_funnel_event_source: String?, + deep_funnel_event_source_id: String?, + deep_funnel_optimization_status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status?, + device_model_ids: ::Array[String]?, + device_price_ranges: ::Array[String]?, + engaged_view_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::engaged_view_attribution_window?, + excluded_audience_ids: ::Array[String]?, + excluded_location_ids: ::Array[String]?, + frequency: Integer?, + frequency_schedule: Integer?, + gender: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::gender?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: String?, + instant_form_config: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig?, + instant_form_id: String?, + interest_category_ids: ::Array[String]?, + interest_keyword_ids: ::Array[String]?, + inventory_filter_enabled: bool?, + :ios14_targeting => WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ios14_targeting?, + isp_ids: ::Array[String]?, + languages: ::Array[String]?, + location_ids: ::Array[String]?, + min_android_version: String?, + min_ios_version: String?, + network_types: ::Array[String]?, + operating_systems: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operating_system]?, + operation_status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::pacing?, + pangle_audience_package_exclude_ids: ::Array[String]?, + pangle_audience_package_include_ids: ::Array[String]?, + pangle_block_app_ids: ::Array[String]?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::placement_type?, + placements: ::Array[String]?, + product_set_id: String?, + product_source: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::product_source?, + promotion_type: String?, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::schedule_type?, + secondary_optimization_event: String?, + shopping_ads_retargeting_actions_days: Integer?, + shopping_ads_retargeting_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type?, + spending_power: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::spending_power?, + tiktok_subplacements: ::Array[String]?, + vertical_sensitivity_id: String?, + video_download_disabled: bool?, + video_user_actions: ::Array[String]?, + view_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::view_attribution_window? + } + + class Tiktok < WhopSDK::Internal::Type::BaseModel + attr_accessor actions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action]? + + attr_accessor age_groups: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::age_group]? + + attr_accessor app_id: String? + + attr_accessor attribution_event_count: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::attribution_event_count? + + attr_accessor audience_ids: ::Array[String]? + + attr_accessor audience_rule: ::Hash[Symbol, top]? + + attr_accessor audience_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::audience_type? + + attr_accessor bid_price: Float? + + attr_accessor bid_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::bid_type? + + attr_accessor billing_event: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::billing_event? + + attr_accessor brand_safety_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::brand_safety_type? + + attr_accessor budget_mode: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::budget_mode? + + attr_accessor carrier_ids: ::Array[String]? + + attr_accessor category_exclusion_ids: ::Array[String]? + + attr_accessor click_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::click_attribution_window? + + attr_accessor comment_disabled: bool? + + attr_accessor contextual_tag_ids: ::Array[String]? + + attr_accessor conversion_bid_price: Float? + + attr_accessor creative_material_mode: String? + + attr_accessor dayparting: String? + + attr_accessor deep_funnel_event_source: String? + + attr_accessor deep_funnel_event_source_id: String? + + attr_accessor deep_funnel_optimization_status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status? + + attr_accessor device_model_ids: ::Array[String]? + + attr_accessor device_price_ranges: ::Array[String]? + + attr_accessor engaged_view_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::engaged_view_attribution_window? + + attr_accessor excluded_audience_ids: ::Array[String]? + + attr_accessor excluded_location_ids: ::Array[String]? + + attr_accessor frequency: Integer? + + attr_accessor frequency_schedule: Integer? + + attr_accessor gender: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::gender? + + attr_accessor identity_authorized_bc_id: String? + + attr_accessor identity_id: String? + + attr_accessor identity_type: String? + + attr_accessor instant_form_config: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig? + + attr_accessor instant_form_id: String? + + attr_accessor interest_category_ids: ::Array[String]? + + attr_accessor interest_keyword_ids: ::Array[String]? + + attr_accessor inventory_filter_enabled: bool? + + attr_accessor ios14_targeting: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ios14_targeting? + + attr_accessor isp_ids: ::Array[String]? + + attr_accessor languages: ::Array[String]? + + attr_accessor location_ids: ::Array[String]? + + attr_accessor min_android_version: String? + + attr_accessor min_ios_version: String? + + attr_accessor network_types: ::Array[String]? + + attr_accessor operating_systems: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operating_system]? + + attr_accessor operation_status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operation_status? + + attr_accessor optimization_event: String? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::pacing? + + attr_accessor pangle_audience_package_exclude_ids: ::Array[String]? + + attr_accessor pangle_audience_package_include_ids: ::Array[String]? + + attr_accessor pangle_block_app_ids: ::Array[String]? + + attr_accessor pixel_id: String? + + attr_accessor placement_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::placement_type? + + attr_accessor placements: ::Array[String]? + + attr_accessor product_set_id: String? + + attr_accessor product_source: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::product_source? + + attr_accessor promotion_type: String? + + attr_accessor schedule_end_time: String? + + attr_accessor schedule_start_time: String? + + attr_accessor schedule_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::schedule_type? + + attr_accessor secondary_optimization_event: String? + + attr_accessor shopping_ads_retargeting_actions_days: Integer? + + attr_accessor shopping_ads_retargeting_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type? + + attr_accessor spending_power: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::spending_power? + + attr_accessor tiktok_subplacements: ::Array[String]? + + attr_accessor vertical_sensitivity_id: String? + + attr_accessor video_download_disabled: bool? + + attr_accessor video_user_actions: ::Array[String]? + + attr_accessor view_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::view_attribution_window? + + def initialize: ( + ?actions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action]?, + ?age_groups: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::age_group]?, + ?app_id: String?, + ?attribution_event_count: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::attribution_event_count?, + ?audience_ids: ::Array[String]?, + ?audience_rule: ::Hash[Symbol, top]?, + ?audience_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::audience_type?, + ?bid_price: Float?, + ?bid_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::bid_type?, + ?billing_event: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::billing_event?, + ?brand_safety_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::brand_safety_type?, + ?budget_mode: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::budget_mode?, + ?carrier_ids: ::Array[String]?, + ?category_exclusion_ids: ::Array[String]?, + ?click_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::click_attribution_window?, + ?comment_disabled: bool?, + ?contextual_tag_ids: ::Array[String]?, + ?conversion_bid_price: Float?, + ?creative_material_mode: String?, + ?dayparting: String?, + ?deep_funnel_event_source: String?, + ?deep_funnel_event_source_id: String?, + ?deep_funnel_optimization_status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status?, + ?device_model_ids: ::Array[String]?, + ?device_price_ranges: ::Array[String]?, + ?engaged_view_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::engaged_view_attribution_window?, + ?excluded_audience_ids: ::Array[String]?, + ?excluded_location_ids: ::Array[String]?, + ?frequency: Integer?, + ?frequency_schedule: Integer?, + ?gender: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::gender?, + ?identity_authorized_bc_id: String?, + ?identity_id: String?, + ?identity_type: String?, + ?instant_form_config: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig?, + ?instant_form_id: String?, + ?interest_category_ids: ::Array[String]?, + ?interest_keyword_ids: ::Array[String]?, + ?inventory_filter_enabled: bool?, + ?ios14_targeting: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ios14_targeting?, + ?isp_ids: ::Array[String]?, + ?languages: ::Array[String]?, + ?location_ids: ::Array[String]?, + ?min_android_version: String?, + ?min_ios_version: String?, + ?network_types: ::Array[String]?, + ?operating_systems: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operating_system]?, + ?operation_status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operation_status?, + ?optimization_event: String?, + ?optimization_goal: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::optimization_goal?, + ?pacing: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::pacing?, + ?pangle_audience_package_exclude_ids: ::Array[String]?, + ?pangle_audience_package_include_ids: ::Array[String]?, + ?pangle_block_app_ids: ::Array[String]?, + ?pixel_id: String?, + ?placement_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::placement_type?, + ?placements: ::Array[String]?, + ?product_set_id: String?, + ?product_source: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::product_source?, + ?promotion_type: String?, + ?schedule_end_time: String?, + ?schedule_start_time: String?, + ?schedule_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::schedule_type?, + ?secondary_optimization_event: String?, + ?shopping_ads_retargeting_actions_days: Integer?, + ?shopping_ads_retargeting_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type?, + ?spending_power: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::spending_power?, + ?tiktok_subplacements: ::Array[String]?, + ?vertical_sensitivity_id: String?, + ?video_download_disabled: bool?, + ?video_user_actions: ::Array[String]?, + ?view_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::view_attribution_window? + ) -> void + + def to_hash: -> { + actions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::Action]?, + age_groups: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::age_group]?, + app_id: String?, + attribution_event_count: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::attribution_event_count?, + audience_ids: ::Array[String]?, + audience_rule: ::Hash[Symbol, top]?, + audience_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::audience_type?, + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::bid_type?, + billing_event: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::billing_event?, + brand_safety_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::brand_safety_type?, + budget_mode: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::budget_mode?, + carrier_ids: ::Array[String]?, + category_exclusion_ids: ::Array[String]?, + click_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::click_attribution_window?, + comment_disabled: bool?, + contextual_tag_ids: ::Array[String]?, + conversion_bid_price: Float?, + creative_material_mode: String?, + dayparting: String?, + deep_funnel_event_source: String?, + deep_funnel_event_source_id: String?, + deep_funnel_optimization_status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status?, + device_model_ids: ::Array[String]?, + device_price_ranges: ::Array[String]?, + engaged_view_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::engaged_view_attribution_window?, + excluded_audience_ids: ::Array[String]?, + excluded_location_ids: ::Array[String]?, + frequency: Integer?, + frequency_schedule: Integer?, + gender: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::gender?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: String?, + instant_form_config: WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig?, + instant_form_id: String?, + interest_category_ids: ::Array[String]?, + interest_keyword_ids: ::Array[String]?, + inventory_filter_enabled: bool?, + :ios14_targeting => WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ios14_targeting?, + isp_ids: ::Array[String]?, + languages: ::Array[String]?, + location_ids: ::Array[String]?, + min_android_version: String?, + min_ios_version: String?, + network_types: ::Array[String]?, + operating_systems: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operating_system]?, + operation_status: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::pacing?, + pangle_audience_package_exclude_ids: ::Array[String]?, + pangle_audience_package_include_ids: ::Array[String]?, + pangle_block_app_ids: ::Array[String]?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::placement_type?, + placements: ::Array[String]?, + product_set_id: String?, + product_source: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::product_source?, + promotion_type: String?, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::schedule_type?, + secondary_optimization_event: String?, + shopping_ads_retargeting_actions_days: Integer?, + shopping_ads_retargeting_type: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type?, + spending_power: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::spending_power?, + tiktok_subplacements: ::Array[String]?, + vertical_sensitivity_id: String?, + video_download_disabled: bool?, + video_user_actions: ::Array[String]?, + view_attribution_window: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::view_attribution_window? + } + + type action = + { + action_category_ids: ::Array[String]?, + action_period: Integer?, + action_scene: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::action_scene?, + video_user_actions: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::video_user_action]? + } + + class Action < WhopSDK::Internal::Type::BaseModel + attr_accessor action_category_ids: ::Array[String]? + + attr_accessor action_period: Integer? + + attr_accessor action_scene: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::action_scene? + + attr_accessor video_user_actions: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::video_user_action]? + + def initialize: ( + ?action_category_ids: ::Array[String]?, + ?action_period: Integer?, + ?action_scene: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::action_scene?, + ?video_user_actions: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::video_user_action]? + ) -> void + + def to_hash: -> { + action_category_ids: ::Array[String]?, + action_period: Integer?, + action_scene: WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::action_scene?, + video_user_actions: ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::video_user_action]? + } + + type action_scene = + :VIDEO_RELATED + | :CREATOR_RELATED + | :HASHTAG_RELATED + | :LIVE_RELATED + + module ActionScene + extend WhopSDK::Internal::Type::Enum + + VIDEO_RELATED: :VIDEO_RELATED + CREATOR_RELATED: :CREATOR_RELATED + HASHTAG_RELATED: :HASHTAG_RELATED + LIVE_RELATED: :LIVE_RELATED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::action_scene] + end + + type video_user_action = + :WATCHED_TO_END + | :LIKED + | :COMMENTED + | :SHARED + | :FOLLOWED + | :PROFILE_VISITED + + module VideoUserAction + extend WhopSDK::Internal::Type::Enum + + WATCHED_TO_END: :WATCHED_TO_END + LIKED: :LIKED + COMMENTED: :COMMENTED + SHARED: :SHARED + FOLLOWED: :FOLLOWED + PROFILE_VISITED: :PROFILE_VISITED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::Action::video_user_action] + end + end + + type age_group = + :AGE_13_17 + | :AGE_18_24 + | :AGE_25_34 + | :AGE_35_44 + | :AGE_45_54 + | :AGE_55_100 + + module AgeGroup + extend WhopSDK::Internal::Type::Enum + + AGE_13_17: :AGE_13_17 + AGE_18_24: :AGE_18_24 + AGE_25_34: :AGE_25_34 + AGE_35_44: :AGE_35_44 + AGE_45_54: :AGE_45_54 + AGE_55_100: :AGE_55_100 + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::age_group] + end + + type attribution_event_count = :UNSET | :EVERY | :ONCE + + module AttributionEventCount + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + EVERY: :EVERY + ONCE: :ONCE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::attribution_event_count] + end + + type audience_type = :NORMAL | :SMART_INTERESTS_BEHAVIORS + + module AudienceType + extend WhopSDK::Internal::Type::Enum + + NORMAL: :NORMAL + SMART_INTERESTS_BEHAVIORS: :SMART_INTERESTS_BEHAVIORS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::audience_type] + end + + type bid_type = :BID_TYPE_NO_BID | :BID_TYPE_CUSTOM + + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID: :BID_TYPE_NO_BID + BID_TYPE_CUSTOM: :BID_TYPE_CUSTOM + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::bid_type] + end + + type billing_event = :CPC | :CPM | :OCPM | :CPV + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC: :CPC + CPM: :CPM + OCPM: :OCPM + CPV: :CPV + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::billing_event] + end + + type brand_safety_type = + :NO_BRAND_SAFETY + | :STANDARD_INVENTORY + | :LIMITED_INVENTORY + | :FULL_INVENTORY + | :EXPANDED_INVENTORY + + module BrandSafetyType + extend WhopSDK::Internal::Type::Enum + + NO_BRAND_SAFETY: :NO_BRAND_SAFETY + STANDARD_INVENTORY: :STANDARD_INVENTORY + LIMITED_INVENTORY: :LIMITED_INVENTORY + FULL_INVENTORY: :FULL_INVENTORY + EXPANDED_INVENTORY: :EXPANDED_INVENTORY + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::brand_safety_type] + end + + type budget_mode = + :BUDGET_MODE_DAY + | :BUDGET_MODE_TOTAL + | :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY: :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL: :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET: :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::budget_mode] + end + + type click_attribution_window = + :OFF | :ONE_DAY | :SEVEN_DAYS | :FOURTEEN_DAYS | :TWENTY_EIGHT_DAYS + + module ClickAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF: :OFF + ONE_DAY: :ONE_DAY + SEVEN_DAYS: :SEVEN_DAYS + FOURTEEN_DAYS: :FOURTEEN_DAYS + TWENTY_EIGHT_DAYS: :TWENTY_EIGHT_DAYS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::click_attribution_window] + end + + type deep_funnel_optimization_status = :ON | :OFF + + module DeepFunnelOptimizationStatus + extend WhopSDK::Internal::Type::Enum + + ON: :ON + OFF: :OFF + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::deep_funnel_optimization_status] + end + + type engaged_view_attribution_window = :OFF | :ONE_DAY | :SEVEN_DAYS + + module EngagedViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF: :OFF + ONE_DAY: :ONE_DAY + SEVEN_DAYS: :SEVEN_DAYS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::engaged_view_attribution_window] + end + + type gender = :GENDER_UNLIMITED | :GENDER_MALE | :GENDER_FEMALE + + module Gender + extend WhopSDK::Internal::Type::Enum + + GENDER_UNLIMITED: :GENDER_UNLIMITED + GENDER_MALE: :GENDER_MALE + GENDER_FEMALE: :GENDER_FEMALE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::gender] + end + + type instant_form_config = + { + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question], + button_text: String?, + greeting: String?, + name: String? + } + + class InstantFormConfig < WhopSDK::Internal::Type::BaseModel + attr_accessor privacy_policy_url: String + + attr_accessor questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question] + + attr_accessor button_text: String? + + attr_accessor greeting: String? + + attr_accessor name: String? + + def initialize: ( + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question], + ?button_text: String?, + ?greeting: String?, + ?name: String? + ) -> void + + def to_hash: -> { + privacy_policy_url: String, + questions: ::Array[WhopSDK::AdGroupUpdateParams::PlatformConfig::Tiktok::InstantFormConfig::Question], + button_text: String?, + greeting: String?, + name: String? + } + + type question = { field_type: String, label: String? } + + class Question < WhopSDK::Internal::Type::BaseModel + attr_accessor field_type: String + + attr_accessor label: String? + + def initialize: (field_type: String, ?label: String?) -> void + + def to_hash: -> { field_type: String, label: String? } + end + end + + type ios14_targeting = :UNSET | :IOS14_MINUS | :IOS14_PLUS | :ALL + + module Ios14Targeting + extend WhopSDK::Internal::Type::Enum + + UNSET: :UNSET + IOS14_MINUS: :IOS14_MINUS + IOS14_PLUS: :IOS14_PLUS + ALL: :ALL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::ios14_targeting] + end + + type operating_system = :ANDROID | :IOS + + module OperatingSystem + extend WhopSDK::Internal::Type::Enum + + ANDROID: :ANDROID + IOS: :IOS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operating_system] + end + + type operation_status = :ENABLE | :DISABLE + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE: :ENABLE + DISABLE: :DISABLE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::operation_status] + end + + type optimization_goal = + :CLICK + | :CONVERT + | :INSTALL + | :IN_APP_EVENT + | :REACH + | :SHOW + | :VIDEO_VIEW + | :ENGAGED_VIEW + | :ENGAGED_VIEW_FIFTEEN + | :LEAD_GENERATION + | :PREFERRED_LEAD + | :CONVERSATION + | :FOLLOWERS + | :PROFILE_VIEWS + | :PAGE_VISIT + | :VALUE + | :AUTOMATIC_VALUE_OPTIMIZATION + | :TRAFFIC_LANDING_PAGE_VIEW + | :DESTINATION_VISIT + | :MT_LIVE_ROOM + | :PRODUCT_CLICK_IN_LIVE + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK: :CLICK + CONVERT: :CONVERT + INSTALL: :INSTALL + IN_APP_EVENT: :IN_APP_EVENT + REACH: :REACH + SHOW: :SHOW + VIDEO_VIEW: :VIDEO_VIEW + ENGAGED_VIEW: :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN: :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION: :LEAD_GENERATION + PREFERRED_LEAD: :PREFERRED_LEAD + CONVERSATION: :CONVERSATION + FOLLOWERS: :FOLLOWERS + PROFILE_VIEWS: :PROFILE_VIEWS + PAGE_VISIT: :PAGE_VISIT + VALUE: :VALUE + AUTOMATIC_VALUE_OPTIMIZATION: :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW: :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT: :DESTINATION_VISIT + MT_LIVE_ROOM: :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE: :PRODUCT_CLICK_IN_LIVE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::optimization_goal] + end + + type pacing = :PACING_MODE_SMOOTH | :PACING_MODE_FAST + + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH: :PACING_MODE_SMOOTH + PACING_MODE_FAST: :PACING_MODE_FAST + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::pacing] + end + + type placement_type = + :PLACEMENT_TYPE_AUTOMATIC | :PLACEMENT_TYPE_NORMAL + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC: :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL: :PLACEMENT_TYPE_NORMAL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::placement_type] + end + + type product_source = :CATALOG | :STORE | :SHOWCASE + + module ProductSource + extend WhopSDK::Internal::Type::Enum + + CATALOG: :CATALOG + STORE: :STORE + SHOWCASE: :SHOWCASE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::product_source] + end + + type schedule_type = :SCHEDULE_START_END | :SCHEDULE_FROM_NOW + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END: :SCHEDULE_START_END + SCHEDULE_FROM_NOW: :SCHEDULE_FROM_NOW + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::schedule_type] + end + + type shopping_ads_retargeting_type = + :OFF | :LAB1 | :LAB2 | :LAB3 | :LAB4 | :LAB5 + + module ShoppingAdsRetargetingType + extend WhopSDK::Internal::Type::Enum + + OFF: :OFF + LAB1: :LAB1 + LAB2: :LAB2 + LAB3: :LAB3 + LAB4: :LAB4 + LAB5: :LAB5 + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::shopping_ads_retargeting_type] + end + + type spending_power = :ALL | :HIGH + + module SpendingPower + extend WhopSDK::Internal::Type::Enum + + ALL: :ALL + HIGH: :HIGH + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::spending_power] + end + + type view_attribution_window = :OFF | :ONE_DAY | :SEVEN_DAYS + + module ViewAttributionWindow + extend WhopSDK::Internal::Type::Enum + + OFF: :OFF + ONE_DAY: :ONE_DAY + SEVEN_DAYS: :SEVEN_DAYS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::PlatformConfig::Tiktok::view_attribution_window] + end + end + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateParams::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_group_update_response.rbs b/sig/whop_sdk/models/ad_group_update_response.rbs new file mode 100644 index 00000000..43c5df50 --- /dev/null +++ b/sig/whop_sdk/models/ad_group_update_response.rbs @@ -0,0 +1,982 @@ +module WhopSDK + module Models + type ad_group_update_response = + { + id: String, + ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, + config: WhopSDK::Models::AdGroupUpdateResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupUpdateResponse::platform_config?, + status: WhopSDK::Models::AdGroupUpdateResponse::status, + updated_at: Time + } + + class AdGroupUpdateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign + + attr_accessor config: WhopSDK::Models::AdGroupUpdateResponse::Config? + + attr_accessor created_at: Time + + attr_accessor daily_budget: Float? + + attr_accessor name: String? + + attr_accessor platform_config: WhopSDK::Models::AdGroupUpdateResponse::platform_config? + + attr_accessor status: WhopSDK::Models::AdGroupUpdateResponse::status + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, + config: WhopSDK::Models::AdGroupUpdateResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupUpdateResponse::platform_config?, + status: WhopSDK::Models::AdGroupUpdateResponse::status, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, + config: WhopSDK::Models::AdGroupUpdateResponse::Config?, + created_at: Time, + daily_budget: Float?, + name: String?, + platform_config: WhopSDK::Models::AdGroupUpdateResponse::platform_config?, + status: WhopSDK::Models::AdGroupUpdateResponse::status, + updated_at: Time + } + + type ad_campaign = + { + id: String, + platform: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::status, + title: String + } + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor platform: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::platform? + + attr_accessor status: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::status + + attr_accessor title: String + + def initialize: ( + id: String, + platform: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::status, + title: String + ) -> void + + def to_hash: -> { + id: String, + platform: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::platform?, + status: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::status, + title: String + } + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::platform] + end + + type status = + :active + | :paused + | :inactive + | :stale + | :pending_refund + | :payment_failed + | :draft + | :in_review + | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + STALE: :stale + PENDING_REFUND: :pending_refund + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::status] + end + end + + type config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting? + } + + class Config < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupUpdateResponse::Config::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupUpdateResponse::Config::billing_event? + + attr_accessor end_time: String? + + attr_accessor frequency_cap: Integer? + + attr_accessor frequency_cap_interval_days: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::Config::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupUpdateResponse::Config::pacing? + + attr_accessor start_time: String? + + attr_accessor targeting: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateResponse::Config::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::Config::billing_event?, + end_time: String?, + frequency_cap: Integer?, + frequency_cap_interval_days: Integer?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::Config::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateResponse::Config::pacing?, + start_time: String?, + targeting: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting? + } + + type bid_strategy = :lowest_cost | :bid_cap | :cost_cap + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST: :lowest_cost + BID_CAP: :bid_cap + COST_CAP: :cost_cap + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::bid_strategy] + end + + type billing_event = + :impressions | :clicks | :optimized_cpm | :video_views + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + IMPRESSIONS: :impressions + CLICKS: :clicks + OPTIMIZED_CPM: :optimized_cpm + VIDEO_VIEWS: :video_views + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::billing_event] + end + + type optimization_goal = + :conversions + | :link_clicks + | :landing_page_views + | :reach + | :impressions + | :app_installs + | :video_views + | :lead_generation + | :value + | :page_likes + | :conversations + | :ad_recall_lift + | :two_second_continuous_video_views + | :post_engagement + | :event_responses + | :reminders_set + | :quality_lead + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CONVERSIONS: :conversions + LINK_CLICKS: :link_clicks + LANDING_PAGE_VIEWS: :landing_page_views + REACH: :reach + IMPRESSIONS: :impressions + APP_INSTALLS: :app_installs + VIDEO_VIEWS: :video_views + LEAD_GENERATION: :lead_generation + VALUE: :value + PAGE_LIKES: :page_likes + CONVERSATIONS: :conversations + AD_RECALL_LIFT: :ad_recall_lift + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :two_second_continuous_video_views + POST_ENGAGEMENT: :post_engagement + EVENT_RESPONSES: :event_responses + REMINDERS_SET: :reminders_set + QUALITY_LEAD: :quality_lead + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::optimization_goal] + end + + type pacing = :standard | :accelerated + + module Pacing + extend WhopSDK::Internal::Type::Enum + + STANDARD: :standard + ACCELERATED: :accelerated + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::pacing] + end + + type targeting = + { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::placement_type? + } + + class Targeting < WhopSDK::Internal::Type::BaseModel + attr_accessor age_max: Integer? + + attr_accessor age_min: Integer? + + attr_accessor countries: ::Array[String]? + + attr_accessor device_platforms: ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::device_platform]? + + attr_accessor exclude_audience_ids: ::Array[String]? + + attr_accessor genders: ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::gender]? + + attr_accessor include_audience_ids: ::Array[String]? + + attr_accessor interest_ids: ::Array[String]? + + attr_accessor languages: ::Array[String]? + + attr_accessor placement_type: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::placement_type? + + def initialize: ( + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::placement_type? + ) -> void + + def to_hash: -> { + age_max: Integer?, + age_min: Integer?, + countries: ::Array[String]?, + device_platforms: ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::device_platform]?, + exclude_audience_ids: ::Array[String]?, + genders: ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::gender]?, + include_audience_ids: ::Array[String]?, + interest_ids: ::Array[String]?, + languages: ::Array[String]?, + placement_type: WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::placement_type? + } + + type device_platform = :mobile | :desktop + + module DevicePlatform + extend WhopSDK::Internal::Type::Enum + + MOBILE: :mobile + DESKTOP: :desktop + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::device_platform] + end + + type gender = :male | :female | :all + + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE: :male + FEMALE: :female + ALL: :all + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::gender] + end + + type placement_type = :automatic | :manual + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + AUTOMATIC: :automatic + MANUAL: :manual + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::Config::Targeting::placement_type] + end + end + end + + type platform_config = + (WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType + | WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType)? + + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + type meta_ad_group_platform_config_type = + { + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + typename: :MetaAdGroupPlatformConfigType + } + + class MetaAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor attribution_spec: ::Array[::Hash[Symbol, top]]? + + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy? + + attr_accessor billing_event: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event? + + attr_accessor daily_budget: Integer? + + attr_accessor destination_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type? + + attr_accessor end_time: String? + + attr_accessor excluded_geo_locations: ::Hash[Symbol, top]? + + attr_accessor facebook_positions: ::Array[String]? + + attr_accessor geo_locations: ::Hash[Symbol, top]? + + attr_accessor instagram_actor_id: String? + + attr_accessor instagram_positions: ::Array[String]? + + attr_accessor lifetime_budget: Integer? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal? + + attr_accessor page_id: String? + + attr_accessor platform: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform + + attr_accessor promoted_object: ::Hash[Symbol, top]? + + attr_accessor publisher_platforms: ::Array[String]? + + attr_accessor status: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status? + + attr_accessor targeting_automation: ::Hash[Symbol, top]? + + attr_accessor typename: :MetaAdGroupPlatformConfigType + + def initialize: ( + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + ?typename: :MetaAdGroupPlatformConfigType + ) -> void + + def to_hash: -> { + attribution_spec: ::Array[::Hash[Symbol, top]]?, + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event?, + daily_budget: Integer?, + destination_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type?, + end_time: String?, + excluded_geo_locations: ::Hash[Symbol, top]?, + facebook_positions: ::Array[String]?, + geo_locations: ::Hash[Symbol, top]?, + instagram_actor_id: String?, + instagram_positions: ::Array[String]?, + lifetime_budget: Integer?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal?, + page_id: String?, + platform: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform, + promoted_object: ::Hash[Symbol, top]?, + publisher_platforms: ::Array[String]?, + status: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status?, + targeting_automation: ::Hash[Symbol, top]?, + typename: :MetaAdGroupPlatformConfigType + } + + type bid_strategy = + :LOWEST_COST_WITHOUT_CAP + | :LOWEST_COST_WITH_BID_CAP + | :COST_CAP + | :LOWEST_COST_WITH_MIN_ROAS + + module BidStrategy + extend WhopSDK::Internal::Type::Enum + + LOWEST_COST_WITHOUT_CAP: :LOWEST_COST_WITHOUT_CAP + LOWEST_COST_WITH_BID_CAP: :LOWEST_COST_WITH_BID_CAP + COST_CAP: :COST_CAP + LOWEST_COST_WITH_MIN_ROAS: :LOWEST_COST_WITH_MIN_ROAS + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::bid_strategy] + end + + type billing_event = + :APP_INSTALLS + | :CLICKS + | :IMPRESSIONS + | :LINK_CLICKS + | :NONE + | :OFFER_CLAIMS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :THRUPLAY + | :PURCHASE + | :LISTING_INTERACTION + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS: :APP_INSTALLS + CLICKS: :CLICKS + IMPRESSIONS: :IMPRESSIONS + LINK_CLICKS: :LINK_CLICKS + NONE: :NONE + OFFER_CLAIMS: :OFFER_CLAIMS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + THRUPLAY: :THRUPLAY + PURCHASE: :PURCHASE + LISTING_INTERACTION: :LISTING_INTERACTION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::billing_event] + end + + type destination_type = + :UNDEFINED + | :WEBSITE + | :APP + | :FACEBOOK + | :MESSENGER + | :WHATSAPP + | :INSTAGRAM_DIRECT + | :INSTAGRAM_PROFILE + | :PHONE_CALL + | :SHOP_AUTOMATIC + | :APPLINKS_AUTOMATIC + | :ON_AD + | :ON_POST + | :ON_VIDEO + | :ON_PAGE + | :ON_EVENT + | :MESSAGING_MESSENGER_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + | :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + | :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + | :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + | :FACEBOOK_PAGE + | :INSTAGRAM_LIVE + | :FACEBOOK_LIVE + | :IMAGINE + | :LEAD_FROM_IG_DIRECT + | :LEAD_FROM_MESSENGER + | :WEBSITE_AND_LEAD_FORM + | :WEBSITE_AND_PHONE_CALL + | :BROADCAST_CHANNEL + + module DestinationType + extend WhopSDK::Internal::Type::Enum + + UNDEFINED: :UNDEFINED + WEBSITE: :WEBSITE + APP: :APP + FACEBOOK: :FACEBOOK + MESSENGER: :MESSENGER + WHATSAPP: :WHATSAPP + INSTAGRAM_DIRECT: :INSTAGRAM_DIRECT + INSTAGRAM_PROFILE: :INSTAGRAM_PROFILE + PHONE_CALL: :PHONE_CALL + SHOP_AUTOMATIC: :SHOP_AUTOMATIC + APPLINKS_AUTOMATIC: :APPLINKS_AUTOMATIC + ON_AD: :ON_AD + ON_POST: :ON_POST + ON_VIDEO: :ON_VIDEO + ON_PAGE: :ON_PAGE + ON_EVENT: :ON_EVENT + MESSAGING_MESSENGER_WHATSAPP: :MESSAGING_MESSENGER_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER + MESSAGING_INSTAGRAM_DIRECT_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_WHATSAPP + MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP: :MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP + INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE: :INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE + FACEBOOK_PAGE: :FACEBOOK_PAGE + INSTAGRAM_LIVE: :INSTAGRAM_LIVE + FACEBOOK_LIVE: :FACEBOOK_LIVE + IMAGINE: :IMAGINE + LEAD_FROM_IG_DIRECT: :LEAD_FROM_IG_DIRECT + LEAD_FROM_MESSENGER: :LEAD_FROM_MESSENGER + WEBSITE_AND_LEAD_FORM: :WEBSITE_AND_LEAD_FORM + WEBSITE_AND_PHONE_CALL: :WEBSITE_AND_PHONE_CALL + BROADCAST_CHANNEL: :BROADCAST_CHANNEL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::destination_type] + end + + type optimization_goal = + :NONE + | :APP_INSTALLS + | :AD_RECALL_LIFT + | :ENGAGED_USERS + | :EVENT_RESPONSES + | :IMPRESSIONS + | :LEAD_GENERATION + | :QUALITY_LEAD + | :LINK_CLICKS + | :OFFSITE_CONVERSIONS + | :PAGE_LIKES + | :POST_ENGAGEMENT + | :QUALITY_CALL + | :REACH + | :LANDING_PAGE_VIEWS + | :VISIT_INSTAGRAM_PROFILE + | :VALUE + | :THRUPLAY + | :DERIVED_EVENTS + | :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + | :CONVERSATIONS + | :IN_APP_VALUE + | :MESSAGING_PURCHASE_CONVERSION + | :SUBSCRIBERS + | :REMINDERS_SET + | :MEANINGFUL_CALL_ATTEMPT + | :PROFILE_VISIT + | :PROFILE_AND_PAGE_ENGAGEMENT + | :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + | :ENGAGED_REACH + | :ENGAGED_PAGE_VIEWS + | :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + | :ADVERTISER_SILOED_VALUE + | :AUTOMATIC_OBJECTIVE + | :MESSAGING_APPOINTMENT_CONVERSION + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + NONE: :NONE + APP_INSTALLS: :APP_INSTALLS + AD_RECALL_LIFT: :AD_RECALL_LIFT + ENGAGED_USERS: :ENGAGED_USERS + EVENT_RESPONSES: :EVENT_RESPONSES + IMPRESSIONS: :IMPRESSIONS + LEAD_GENERATION: :LEAD_GENERATION + QUALITY_LEAD: :QUALITY_LEAD + LINK_CLICKS: :LINK_CLICKS + OFFSITE_CONVERSIONS: :OFFSITE_CONVERSIONS + PAGE_LIKES: :PAGE_LIKES + POST_ENGAGEMENT: :POST_ENGAGEMENT + QUALITY_CALL: :QUALITY_CALL + REACH: :REACH + LANDING_PAGE_VIEWS: :LANDING_PAGE_VIEWS + VISIT_INSTAGRAM_PROFILE: :VISIT_INSTAGRAM_PROFILE + VALUE: :VALUE + THRUPLAY: :THRUPLAY + DERIVED_EVENTS: :DERIVED_EVENTS + APP_INSTALLS_AND_OFFSITE_CONVERSIONS: :APP_INSTALLS_AND_OFFSITE_CONVERSIONS + CONVERSATIONS: :CONVERSATIONS + IN_APP_VALUE: :IN_APP_VALUE + MESSAGING_PURCHASE_CONVERSION: :MESSAGING_PURCHASE_CONVERSION + SUBSCRIBERS: :SUBSCRIBERS + REMINDERS_SET: :REMINDERS_SET + MEANINGFUL_CALL_ATTEMPT: :MEANINGFUL_CALL_ATTEMPT + PROFILE_VISIT: :PROFILE_VISIT + PROFILE_AND_PAGE_ENGAGEMENT: :PROFILE_AND_PAGE_ENGAGEMENT + TWO_SECOND_CONTINUOUS_VIDEO_VIEWS: :TWO_SECOND_CONTINUOUS_VIDEO_VIEWS + ENGAGED_REACH: :ENGAGED_REACH + ENGAGED_PAGE_VIEWS: :ENGAGED_PAGE_VIEWS + MESSAGING_DEEP_CONVERSATION_AND_FOLLOW: :MESSAGING_DEEP_CONVERSATION_AND_FOLLOW + ADVERTISER_SILOED_VALUE: :ADVERTISER_SILOED_VALUE + AUTOMATIC_OBJECTIVE: :AUTOMATIC_OBJECTIVE + MESSAGING_APPOINTMENT_CONVERSION: :MESSAGING_APPOINTMENT_CONVERSION + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::optimization_goal] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::platform] + end + + type status = :ACTIVE | :PAUSED + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :ACTIVE + PAUSED: :PAUSED + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::MetaAdGroupPlatformConfigType::status] + end + end + + type tiktok_ad_group_platform_config_type = + { + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + typename: :TiktokAdGroupPlatformConfigType + } + + class TiktokAdGroupPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_price: Float? + + attr_accessor bid_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type? + + attr_accessor billing_event: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event? + + attr_accessor budget_mode: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode? + + attr_accessor conversion_bid_price: Float? + + attr_accessor identity_id: String? + + attr_accessor identity_type: String? + + attr_accessor operation_status: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status? + + attr_accessor optimization_event: String? + + attr_accessor optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal? + + attr_accessor pacing: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing? + + attr_accessor pixel_id: String? + + attr_accessor placement_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type? + + attr_accessor placements: ::Array[String]? + + attr_accessor platform: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform + + attr_accessor schedule_end_time: String? + + attr_accessor schedule_start_time: String? + + attr_accessor schedule_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type? + + attr_accessor typename: :TiktokAdGroupPlatformConfigType + + def initialize: ( + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + ?typename: :TiktokAdGroupPlatformConfigType + ) -> void + + def to_hash: -> { + bid_price: Float?, + bid_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type?, + billing_event: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event?, + budget_mode: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode?, + conversion_bid_price: Float?, + identity_id: String?, + identity_type: String?, + operation_status: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status?, + optimization_event: String?, + optimization_goal: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal?, + pacing: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing?, + pixel_id: String?, + placement_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type?, + placements: ::Array[String]?, + platform: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform, + schedule_end_time: String?, + schedule_start_time: String?, + schedule_type: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type?, + typename: :TiktokAdGroupPlatformConfigType + } + + type bid_type = :BID_TYPE_NO_BID | :BID_TYPE_CUSTOM + + module BidType + extend WhopSDK::Internal::Type::Enum + + BID_TYPE_NO_BID: :BID_TYPE_NO_BID + BID_TYPE_CUSTOM: :BID_TYPE_CUSTOM + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::bid_type] + end + + type billing_event = :CPC | :CPM | :OCPM | :CPV + + module BillingEvent + extend WhopSDK::Internal::Type::Enum + + CPC: :CPC + CPM: :CPM + OCPM: :OCPM + CPV: :CPV + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::billing_event] + end + + type budget_mode = + :BUDGET_MODE_DAY + | :BUDGET_MODE_TOTAL + | :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + module BudgetMode + extend WhopSDK::Internal::Type::Enum + + BUDGET_MODE_DAY: :BUDGET_MODE_DAY + BUDGET_MODE_TOTAL: :BUDGET_MODE_TOTAL + BUDGET_MODE_DYNAMIC_DAILY_BUDGET: :BUDGET_MODE_DYNAMIC_DAILY_BUDGET + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::budget_mode] + end + + type operation_status = :ENABLE | :DISABLE + + module OperationStatus + extend WhopSDK::Internal::Type::Enum + + ENABLE: :ENABLE + DISABLE: :DISABLE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::operation_status] + end + + type optimization_goal = + :CLICK + | :CONVERT + | :INSTALL + | :IN_APP_EVENT + | :REACH + | :SHOW + | :VIDEO_VIEW + | :ENGAGED_VIEW + | :ENGAGED_VIEW_FIFTEEN + | :LEAD_GENERATION + | :PREFERRED_LEAD + | :CONVERSATION + | :FOLLOWERS + | :PROFILE_VIEWS + | :PAGE_VISIT + | :VALUE + | :AUTOMATIC_VALUE_OPTIMIZATION + | :TRAFFIC_LANDING_PAGE_VIEW + | :DESTINATION_VISIT + | :MT_LIVE_ROOM + | :PRODUCT_CLICK_IN_LIVE + + module OptimizationGoal + extend WhopSDK::Internal::Type::Enum + + CLICK: :CLICK + CONVERT: :CONVERT + INSTALL: :INSTALL + IN_APP_EVENT: :IN_APP_EVENT + REACH: :REACH + SHOW: :SHOW + VIDEO_VIEW: :VIDEO_VIEW + ENGAGED_VIEW: :ENGAGED_VIEW + ENGAGED_VIEW_FIFTEEN: :ENGAGED_VIEW_FIFTEEN + LEAD_GENERATION: :LEAD_GENERATION + PREFERRED_LEAD: :PREFERRED_LEAD + CONVERSATION: :CONVERSATION + FOLLOWERS: :FOLLOWERS + PROFILE_VIEWS: :PROFILE_VIEWS + PAGE_VISIT: :PAGE_VISIT + VALUE: :VALUE + AUTOMATIC_VALUE_OPTIMIZATION: :AUTOMATIC_VALUE_OPTIMIZATION + TRAFFIC_LANDING_PAGE_VIEW: :TRAFFIC_LANDING_PAGE_VIEW + DESTINATION_VISIT: :DESTINATION_VISIT + MT_LIVE_ROOM: :MT_LIVE_ROOM + PRODUCT_CLICK_IN_LIVE: :PRODUCT_CLICK_IN_LIVE + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::optimization_goal] + end + + type pacing = :PACING_MODE_SMOOTH | :PACING_MODE_FAST + + module Pacing + extend WhopSDK::Internal::Type::Enum + + PACING_MODE_SMOOTH: :PACING_MODE_SMOOTH + PACING_MODE_FAST: :PACING_MODE_FAST + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::pacing] + end + + type placement_type = + :PLACEMENT_TYPE_AUTOMATIC | :PLACEMENT_TYPE_NORMAL + + module PlacementType + extend WhopSDK::Internal::Type::Enum + + PLACEMENT_TYPE_AUTOMATIC: :PLACEMENT_TYPE_AUTOMATIC + PLACEMENT_TYPE_NORMAL: :PLACEMENT_TYPE_NORMAL + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::placement_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::platform] + end + + type schedule_type = :SCHEDULE_START_END | :SCHEDULE_FROM_NOW + + module ScheduleType + extend WhopSDK::Internal::Type::Enum + + SCHEDULE_START_END: :SCHEDULE_START_END + SCHEDULE_FROM_NOW: :SCHEDULE_FROM_NOW + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig::TiktokAdGroupPlatformConfigType::schedule_type] + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::platform_config] + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_list_params.rbs b/sig/whop_sdk/models/ad_list_params.rbs new file mode 100644 index 00000000..5031570c --- /dev/null +++ b/sig/whop_sdk/models/ad_list_params.rbs @@ -0,0 +1,87 @@ +module WhopSDK + module Models + type ad_list_params = + { + ad_group_id: String?, + after: String?, + before: String?, + campaign_id: String?, + company_id: String?, + created_after: Time?, + created_before: Time?, + first: Integer?, + last: Integer?, + status: WhopSDK::Models::AdListParams::status? + } + & WhopSDK::Internal::Type::request_parameters + + class AdListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor ad_group_id: String? + + attr_accessor after: String? + + attr_accessor before: String? + + attr_accessor campaign_id: String? + + attr_accessor company_id: String? + + attr_accessor created_after: Time? + + attr_accessor created_before: Time? + + attr_accessor first: Integer? + + attr_accessor last: Integer? + + attr_accessor status: WhopSDK::Models::AdListParams::status? + + def initialize: ( + ?ad_group_id: String?, + ?after: String?, + ?before: String?, + ?campaign_id: String?, + ?company_id: String?, + ?created_after: Time?, + ?created_before: Time?, + ?first: Integer?, + ?last: Integer?, + ?status: WhopSDK::Models::AdListParams::status?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + ad_group_id: String?, + after: String?, + before: String?, + campaign_id: String?, + company_id: String?, + created_after: Time?, + created_before: Time?, + first: Integer?, + last: Integer?, + status: WhopSDK::Models::AdListParams::status?, + request_options: WhopSDK::RequestOptions + } + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdListParams::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_list_response.rbs b/sig/whop_sdk/models/ad_list_response.rbs new file mode 100644 index 00000000..3e6e0000 --- /dev/null +++ b/sig/whop_sdk/models/ad_list_response.rbs @@ -0,0 +1,377 @@ +module WhopSDK + module Models + type ad_list_response = + { + id: String, + created_at: Time, + platform_config: WhopSDK::Models::AdListResponse::platform_config?, + status: WhopSDK::Models::AdListResponse::status, + updated_at: Time + } + + class AdListResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor platform_config: WhopSDK::Models::AdListResponse::platform_config? + + attr_accessor status: WhopSDK::Models::AdListResponse::status + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + created_at: Time, + platform_config: WhopSDK::Models::AdListResponse::platform_config?, + status: WhopSDK::Models::AdListResponse::status, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + platform_config: WhopSDK::Models::AdListResponse::platform_config?, + status: WhopSDK::Models::AdListResponse::status, + updated_at: Time + } + + type platform_config = + (WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType + | WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType)? + + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + type meta_ad_platform_config_type = + { + call_to_action_type: WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + typename: :MetaAdPlatformConfigType, + url_tags: String? + } + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor call_to_action_type: WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type? + + attr_accessor headline: String? + + attr_accessor instagram_actor_id: String? + + attr_accessor link_url: String? + + attr_accessor name: String? + + attr_accessor page_id: String? + + attr_accessor platform: WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::platform + + attr_accessor primary_text: String? + + attr_accessor typename: :MetaAdPlatformConfigType + + attr_accessor url_tags: String? + + def initialize: ( + call_to_action_type: WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + url_tags: String?, + ?typename: :MetaAdPlatformConfigType + ) -> void + + def to_hash: -> { + call_to_action_type: WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + typename: :MetaAdPlatformConfigType, + url_tags: String? + } + + type call_to_action_type = + :LEARN_MORE + | :SHOP_NOW + | :SIGN_UP + | :SUBSCRIBE + | :GET_STARTED + | :BOOK_NOW + | :APPLY_NOW + | :CONTACT_US + | :DOWNLOAD + | :ORDER_NOW + | :BUY_NOW + | :GET_QUOTE + | :MESSAGE_PAGE + | :WHATSAPP_MESSAGE + | :INSTAGRAM_MESSAGE + | :CALL_NOW + | :GET_DIRECTIONS + | :SEND_UPDATES + | :GET_OFFER + | :WATCH_MORE + | :LISTEN_NOW + | :PLAY_GAME + | :OPEN_LINK + | :NO_BUTTON + | :GET_OFFER_VIEW + | :GET_EVENT_TICKETS + | :SEE_MENU + | :REQUEST_TIME + | :EVENT_RSVP + | :SEE_DETAILS + + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE: :LEARN_MORE + SHOP_NOW: :SHOP_NOW + SIGN_UP: :SIGN_UP + SUBSCRIBE: :SUBSCRIBE + GET_STARTED: :GET_STARTED + BOOK_NOW: :BOOK_NOW + APPLY_NOW: :APPLY_NOW + CONTACT_US: :CONTACT_US + DOWNLOAD: :DOWNLOAD + ORDER_NOW: :ORDER_NOW + BUY_NOW: :BUY_NOW + GET_QUOTE: :GET_QUOTE + MESSAGE_PAGE: :MESSAGE_PAGE + WHATSAPP_MESSAGE: :WHATSAPP_MESSAGE + INSTAGRAM_MESSAGE: :INSTAGRAM_MESSAGE + CALL_NOW: :CALL_NOW + GET_DIRECTIONS: :GET_DIRECTIONS + SEND_UPDATES: :SEND_UPDATES + GET_OFFER: :GET_OFFER + WATCH_MORE: :WATCH_MORE + LISTEN_NOW: :LISTEN_NOW + PLAY_GAME: :PLAY_GAME + OPEN_LINK: :OPEN_LINK + NO_BUTTON: :NO_BUTTON + GET_OFFER_VIEW: :GET_OFFER_VIEW + GET_EVENT_TICKETS: :GET_EVENT_TICKETS + SEE_MENU: :SEE_MENU + REQUEST_TIME: :REQUEST_TIME + EVENT_RSVP: :EVENT_RSVP + SEE_DETAILS: :SEE_DETAILS + + def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::PlatformConfig::MetaAdPlatformConfigType::platform] + end + end + + type tiktok_ad_platform_config_type = + { + ad_format: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + typename: :TiktokAdPlatformConfigType, + video_id: String? + } + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor ad_format: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format? + + attr_accessor ad_name: String? + + attr_accessor ad_text: String? + + attr_accessor call_to_action: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action? + + attr_accessor identity_authorized_bc_id: String? + + attr_accessor identity_id: String? + + attr_accessor identity_type: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type? + + attr_accessor image_ids: ::Array[String]? + + attr_accessor landing_page_url: String? + + attr_accessor platform: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::platform + + attr_accessor typename: :TiktokAdPlatformConfigType + + attr_accessor video_id: String? + + def initialize: ( + ad_format: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + video_id: String?, + ?typename: :TiktokAdPlatformConfigType + ) -> void + + def to_hash: -> { + ad_format: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + typename: :TiktokAdPlatformConfigType, + video_id: String? + } + + type ad_format = + :SINGLE_IMAGE + | :SINGLE_VIDEO + | :CAROUSEL_ADS + | :CATALOG_CAROUSEL + | :LIVE_CONTENT + + module AdFormat + extend WhopSDK::Internal::Type::Enum + + SINGLE_IMAGE: :SINGLE_IMAGE + SINGLE_VIDEO: :SINGLE_VIDEO + CAROUSEL_ADS: :CAROUSEL_ADS + CATALOG_CAROUSEL: :CATALOG_CAROUSEL + LIVE_CONTENT: :LIVE_CONTENT + + def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format] + end + + type call_to_action = + :LEARN_MORE + | :DOWNLOAD + | :SHOP_NOW + | :SIGN_UP + | :CONTACT_US + | :APPLY_NOW + | :BOOK_NOW + | :PLAY_GAME + | :WATCH_NOW + | :READ_MORE + | :VIEW_NOW + | :GET_QUOTE + | :ORDER_NOW + | :INSTALL_NOW + | :GET_SHOWTIMES + | :LISTEN_NOW + | :INTERESTED + | :SUBSCRIBE + | :GET_TICKETS_NOW + | :EXPERIENCE_NOW + | :PRE_ORDER_NOW + | :VISIT_STORE + + module CallToAction + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE: :LEARN_MORE + DOWNLOAD: :DOWNLOAD + SHOP_NOW: :SHOP_NOW + SIGN_UP: :SIGN_UP + CONTACT_US: :CONTACT_US + APPLY_NOW: :APPLY_NOW + BOOK_NOW: :BOOK_NOW + PLAY_GAME: :PLAY_GAME + WATCH_NOW: :WATCH_NOW + READ_MORE: :READ_MORE + VIEW_NOW: :VIEW_NOW + GET_QUOTE: :GET_QUOTE + ORDER_NOW: :ORDER_NOW + INSTALL_NOW: :INSTALL_NOW + GET_SHOWTIMES: :GET_SHOWTIMES + LISTEN_NOW: :LISTEN_NOW + INTERESTED: :INTERESTED + SUBSCRIBE: :SUBSCRIBE + GET_TICKETS_NOW: :GET_TICKETS_NOW + EXPERIENCE_NOW: :EXPERIENCE_NOW + PRE_ORDER_NOW: :PRE_ORDER_NOW + VISIT_STORE: :VISIT_STORE + + def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action] + end + + type identity_type = + :CUSTOMIZED_USER | :AUTH_CODE | :TT_USER | :BC_AUTH_TT + + module IdentityType + extend WhopSDK::Internal::Type::Enum + + CUSTOMIZED_USER: :CUSTOMIZED_USER + AUTH_CODE: :AUTH_CODE + TT_USER: :TT_USER + BC_AUTH_TT: :BC_AUTH_TT + + def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::PlatformConfig::TiktokAdPlatformConfigType::platform] + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdListResponse::platform_config] + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/ad_retrieve_params.rbs b/sig/whop_sdk/models/ad_retrieve_params.rbs new file mode 100644 index 00000000..ce0c56f4 --- /dev/null +++ b/sig/whop_sdk/models/ad_retrieve_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_retrieve_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/ad_retrieve_response.rbs b/sig/whop_sdk/models/ad_retrieve_response.rbs new file mode 100644 index 00000000..c220c02f --- /dev/null +++ b/sig/whop_sdk/models/ad_retrieve_response.rbs @@ -0,0 +1,440 @@ +module WhopSDK + module Models + type ad_retrieve_response = + { + id: String, + created_at: Time, + external_ad_creative_set: WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet?, + external_ad_group: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup, + platform_config: WhopSDK::Models::AdRetrieveResponse::platform_config?, + status: WhopSDK::Models::AdRetrieveResponse::status, + updated_at: Time + } + + class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor created_at: Time + + attr_accessor external_ad_creative_set: WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet? + + attr_accessor external_ad_group: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup + + attr_accessor platform_config: WhopSDK::Models::AdRetrieveResponse::platform_config? + + attr_accessor status: WhopSDK::Models::AdRetrieveResponse::status + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + created_at: Time, + external_ad_creative_set: WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet?, + external_ad_group: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup, + platform_config: WhopSDK::Models::AdRetrieveResponse::platform_config?, + status: WhopSDK::Models::AdRetrieveResponse::status, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + created_at: Time, + external_ad_creative_set: WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet?, + external_ad_group: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup, + platform_config: WhopSDK::Models::AdRetrieveResponse::platform_config?, + status: WhopSDK::Models::AdRetrieveResponse::status, + updated_at: Time + } + + type external_ad_creative_set = { id: String } + + class ExternalAdCreativeSet < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + + type external_ad_group = + { + id: String, + name: String?, + status: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::status + } + + class ExternalAdGroup < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor status: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::status + + def initialize: ( + id: String, + name: String?, + status: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::status + ) -> void + + def to_hash: -> { + id: String, + name: String?, + status: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::status + } + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup::status] + end + end + + type platform_config = + (WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType + | WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType)? + + module PlatformConfig + extend WhopSDK::Internal::Type::Union + + type meta_ad_platform_config_type = + { + call_to_action_type: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + typename: :MetaAdPlatformConfigType, + url_tags: String? + } + + class MetaAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor call_to_action_type: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type? + + attr_accessor headline: String? + + attr_accessor instagram_actor_id: String? + + attr_accessor link_url: String? + + attr_accessor name: String? + + attr_accessor page_id: String? + + attr_accessor platform: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::platform + + attr_accessor primary_text: String? + + attr_accessor typename: :MetaAdPlatformConfigType + + attr_accessor url_tags: String? + + def initialize: ( + call_to_action_type: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + url_tags: String?, + ?typename: :MetaAdPlatformConfigType + ) -> void + + def to_hash: -> { + call_to_action_type: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type?, + headline: String?, + instagram_actor_id: String?, + link_url: String?, + name: String?, + page_id: String?, + platform: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::platform, + primary_text: String?, + typename: :MetaAdPlatformConfigType, + url_tags: String? + } + + type call_to_action_type = + :LEARN_MORE + | :SHOP_NOW + | :SIGN_UP + | :SUBSCRIBE + | :GET_STARTED + | :BOOK_NOW + | :APPLY_NOW + | :CONTACT_US + | :DOWNLOAD + | :ORDER_NOW + | :BUY_NOW + | :GET_QUOTE + | :MESSAGE_PAGE + | :WHATSAPP_MESSAGE + | :INSTAGRAM_MESSAGE + | :CALL_NOW + | :GET_DIRECTIONS + | :SEND_UPDATES + | :GET_OFFER + | :WATCH_MORE + | :LISTEN_NOW + | :PLAY_GAME + | :OPEN_LINK + | :NO_BUTTON + | :GET_OFFER_VIEW + | :GET_EVENT_TICKETS + | :SEE_MENU + | :REQUEST_TIME + | :EVENT_RSVP + | :SEE_DETAILS + + module CallToActionType + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE: :LEARN_MORE + SHOP_NOW: :SHOP_NOW + SIGN_UP: :SIGN_UP + SUBSCRIBE: :SUBSCRIBE + GET_STARTED: :GET_STARTED + BOOK_NOW: :BOOK_NOW + APPLY_NOW: :APPLY_NOW + CONTACT_US: :CONTACT_US + DOWNLOAD: :DOWNLOAD + ORDER_NOW: :ORDER_NOW + BUY_NOW: :BUY_NOW + GET_QUOTE: :GET_QUOTE + MESSAGE_PAGE: :MESSAGE_PAGE + WHATSAPP_MESSAGE: :WHATSAPP_MESSAGE + INSTAGRAM_MESSAGE: :INSTAGRAM_MESSAGE + CALL_NOW: :CALL_NOW + GET_DIRECTIONS: :GET_DIRECTIONS + SEND_UPDATES: :SEND_UPDATES + GET_OFFER: :GET_OFFER + WATCH_MORE: :WATCH_MORE + LISTEN_NOW: :LISTEN_NOW + PLAY_GAME: :PLAY_GAME + OPEN_LINK: :OPEN_LINK + NO_BUTTON: :NO_BUTTON + GET_OFFER_VIEW: :GET_OFFER_VIEW + GET_EVENT_TICKETS: :GET_EVENT_TICKETS + SEE_MENU: :SEE_MENU + REQUEST_TIME: :REQUEST_TIME + EVENT_RSVP: :EVENT_RSVP + SEE_DETAILS: :SEE_DETAILS + + def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::call_to_action_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::PlatformConfig::MetaAdPlatformConfigType::platform] + end + end + + type tiktok_ad_platform_config_type = + { + ad_format: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + typename: :TiktokAdPlatformConfigType, + video_id: String? + } + + class TiktokAdPlatformConfigType < WhopSDK::Internal::Type::BaseModel + attr_accessor ad_format: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format? + + attr_accessor ad_name: String? + + attr_accessor ad_text: String? + + attr_accessor call_to_action: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action? + + attr_accessor identity_authorized_bc_id: String? + + attr_accessor identity_id: String? + + attr_accessor identity_type: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type? + + attr_accessor image_ids: ::Array[String]? + + attr_accessor landing_page_url: String? + + attr_accessor platform: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::platform + + attr_accessor typename: :TiktokAdPlatformConfigType + + attr_accessor video_id: String? + + def initialize: ( + ad_format: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + video_id: String?, + ?typename: :TiktokAdPlatformConfigType + ) -> void + + def to_hash: -> { + ad_format: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format?, + ad_name: String?, + ad_text: String?, + call_to_action: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action?, + identity_authorized_bc_id: String?, + identity_id: String?, + identity_type: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type?, + image_ids: ::Array[String]?, + landing_page_url: String?, + platform: WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::platform, + typename: :TiktokAdPlatformConfigType, + video_id: String? + } + + type ad_format = + :SINGLE_IMAGE + | :SINGLE_VIDEO + | :CAROUSEL_ADS + | :CATALOG_CAROUSEL + | :LIVE_CONTENT + + module AdFormat + extend WhopSDK::Internal::Type::Enum + + SINGLE_IMAGE: :SINGLE_IMAGE + SINGLE_VIDEO: :SINGLE_VIDEO + CAROUSEL_ADS: :CAROUSEL_ADS + CATALOG_CAROUSEL: :CATALOG_CAROUSEL + LIVE_CONTENT: :LIVE_CONTENT + + def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::ad_format] + end + + type call_to_action = + :LEARN_MORE + | :DOWNLOAD + | :SHOP_NOW + | :SIGN_UP + | :CONTACT_US + | :APPLY_NOW + | :BOOK_NOW + | :PLAY_GAME + | :WATCH_NOW + | :READ_MORE + | :VIEW_NOW + | :GET_QUOTE + | :ORDER_NOW + | :INSTALL_NOW + | :GET_SHOWTIMES + | :LISTEN_NOW + | :INTERESTED + | :SUBSCRIBE + | :GET_TICKETS_NOW + | :EXPERIENCE_NOW + | :PRE_ORDER_NOW + | :VISIT_STORE + + module CallToAction + extend WhopSDK::Internal::Type::Enum + + LEARN_MORE: :LEARN_MORE + DOWNLOAD: :DOWNLOAD + SHOP_NOW: :SHOP_NOW + SIGN_UP: :SIGN_UP + CONTACT_US: :CONTACT_US + APPLY_NOW: :APPLY_NOW + BOOK_NOW: :BOOK_NOW + PLAY_GAME: :PLAY_GAME + WATCH_NOW: :WATCH_NOW + READ_MORE: :READ_MORE + VIEW_NOW: :VIEW_NOW + GET_QUOTE: :GET_QUOTE + ORDER_NOW: :ORDER_NOW + INSTALL_NOW: :INSTALL_NOW + GET_SHOWTIMES: :GET_SHOWTIMES + LISTEN_NOW: :LISTEN_NOW + INTERESTED: :INTERESTED + SUBSCRIBE: :SUBSCRIBE + GET_TICKETS_NOW: :GET_TICKETS_NOW + EXPERIENCE_NOW: :EXPERIENCE_NOW + PRE_ORDER_NOW: :PRE_ORDER_NOW + VISIT_STORE: :VISIT_STORE + + def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::call_to_action] + end + + type identity_type = + :CUSTOMIZED_USER | :AUTH_CODE | :TT_USER | :BC_AUTH_TT + + module IdentityType + extend WhopSDK::Internal::Type::Enum + + CUSTOMIZED_USER: :CUSTOMIZED_USER + AUTH_CODE: :AUTH_CODE + TT_USER: :TT_USER + BC_AUTH_TT: :BC_AUTH_TT + + def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::identity_type] + end + + type platform = :meta | :tiktok + + module Platform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::PlatformConfig::TiktokAdPlatformConfigType::platform] + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::AdRetrieveResponse::platform_config] + end + + type status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + INACTIVE: :inactive + IN_REVIEW: :in_review + REJECTED: :rejected + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/authorized_user_roles.rbs b/sig/whop_sdk/models/authorized_user_roles.rbs index 49f63cc9..8f95a2e8 100644 --- a/sig/whop_sdk/models/authorized_user_roles.rbs +++ b/sig/whop_sdk/models/authorized_user_roles.rbs @@ -5,6 +5,7 @@ module WhopSDK | :admin | :sales_manager | :moderator + | :advertiser | :app_manager | :support | :manager @@ -17,6 +18,7 @@ module WhopSDK ADMIN: :admin SALES_MANAGER: :sales_manager MODERATOR: :moderator + ADVERTISER: :advertiser APP_MANAGER: :app_manager SUPPORT: :support MANAGER: :manager diff --git a/sig/whop_sdk/models/bounty_create_params.rbs b/sig/whop_sdk/models/bounty_create_params.rbs new file mode 100644 index 00000000..27e088ac --- /dev/null +++ b/sig/whop_sdk/models/bounty_create_params.rbs @@ -0,0 +1,61 @@ +module WhopSDK + module Models + type bounty_create_params = + { + base_unit_amount: Float, + currency: WhopSDK::Models::currency, + description: String, + title: String, + accepted_submissions_limit: Integer?, + allowed_country_codes: ::Array[String]?, + experience_id: String?, + origin_account_id: String? + } + & WhopSDK::Internal::Type::request_parameters + + class BountyCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor base_unit_amount: Float + + attr_accessor currency: WhopSDK::Models::currency + + attr_accessor description: String + + attr_accessor title: String + + attr_accessor accepted_submissions_limit: Integer? + + attr_accessor allowed_country_codes: ::Array[String]? + + attr_accessor experience_id: String? + + attr_accessor origin_account_id: String? + + def initialize: ( + base_unit_amount: Float, + currency: WhopSDK::Models::currency, + description: String, + title: String, + ?accepted_submissions_limit: Integer?, + ?allowed_country_codes: ::Array[String]?, + ?experience_id: String?, + ?origin_account_id: String?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + base_unit_amount: Float, + currency: WhopSDK::Models::currency, + description: String, + title: String, + accepted_submissions_limit: Integer?, + allowed_country_codes: ::Array[String]?, + experience_id: String?, + origin_account_id: String?, + request_options: WhopSDK::RequestOptions + } + end + end +end diff --git a/sig/whop_sdk/models/bounty_create_response.rbs b/sig/whop_sdk/models/bounty_create_response.rbs new file mode 100644 index 00000000..4fbd7f35 --- /dev/null +++ b/sig/whop_sdk/models/bounty_create_response.rbs @@ -0,0 +1,93 @@ +module WhopSDK + module Models + type bounty_create_response = + { + id: String, + bounty_type: WhopSDK::Models::BountyCreateResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyCreateResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + + class BountyCreateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor bounty_type: WhopSDK::Models::BountyCreateResponse::bounty_type + + attr_accessor created_at: Time + + attr_accessor currency: WhopSDK::Models::currency + + attr_accessor description: String + + attr_accessor status: WhopSDK::Models::BountyCreateResponse::status + + attr_accessor title: String + + attr_accessor total_available: Float + + attr_accessor total_paid: Float + + attr_accessor updated_at: Time + + attr_accessor vote_threshold: Integer + + def initialize: ( + id: String, + bounty_type: WhopSDK::Models::BountyCreateResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyCreateResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + ) -> void + + def to_hash: -> { + id: String, + bounty_type: WhopSDK::Models::BountyCreateResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyCreateResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + + type bounty_type = :classic | :user_funded | :workforce + + module BountyType + extend WhopSDK::Internal::Type::Enum + + CLASSIC: :classic + USER_FUNDED: :user_funded + WORKFORCE: :workforce + + def self?.values: -> ::Array[WhopSDK::Models::BountyCreateResponse::bounty_type] + end + + type status = :published | :archived + + module Status + extend WhopSDK::Internal::Type::Enum + + PUBLISHED: :published + ARCHIVED: :archived + + def self?.values: -> ::Array[WhopSDK::Models::BountyCreateResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/bounty_list_params.rbs b/sig/whop_sdk/models/bounty_list_params.rbs new file mode 100644 index 00000000..7c4d0f4b --- /dev/null +++ b/sig/whop_sdk/models/bounty_list_params.rbs @@ -0,0 +1,67 @@ +module WhopSDK + module Models + type bounty_list_params = + { + after: String?, + before: String?, + direction: WhopSDK::Models::direction?, + experience_id: String?, + first: Integer?, + last: Integer?, + status: WhopSDK::Models::BountyListParams::status? + } + & WhopSDK::Internal::Type::request_parameters + + class BountyListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor after: String? + + attr_accessor before: String? + + attr_accessor direction: WhopSDK::Models::direction? + + attr_accessor experience_id: String? + + attr_accessor first: Integer? + + attr_accessor last: Integer? + + attr_accessor status: WhopSDK::Models::BountyListParams::status? + + def initialize: ( + ?after: String?, + ?before: String?, + ?direction: WhopSDK::Models::direction?, + ?experience_id: String?, + ?first: Integer?, + ?last: Integer?, + ?status: WhopSDK::Models::BountyListParams::status?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + after: String?, + before: String?, + direction: WhopSDK::Models::direction?, + experience_id: String?, + first: Integer?, + last: Integer?, + status: WhopSDK::Models::BountyListParams::status?, + request_options: WhopSDK::RequestOptions + } + + type status = :published | :archived + + module Status + extend WhopSDK::Internal::Type::Enum + + PUBLISHED: :published + ARCHIVED: :archived + + def self?.values: -> ::Array[WhopSDK::Models::BountyListParams::status] + end + end + end +end diff --git a/sig/whop_sdk/models/bounty_list_response.rbs b/sig/whop_sdk/models/bounty_list_response.rbs new file mode 100644 index 00000000..a3a5d017 --- /dev/null +++ b/sig/whop_sdk/models/bounty_list_response.rbs @@ -0,0 +1,93 @@ +module WhopSDK + module Models + type bounty_list_response = + { + id: String, + bounty_type: WhopSDK::Models::BountyListResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyListResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + + class BountyListResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor bounty_type: WhopSDK::Models::BountyListResponse::bounty_type + + attr_accessor created_at: Time + + attr_accessor currency: WhopSDK::Models::currency + + attr_accessor description: String + + attr_accessor status: WhopSDK::Models::BountyListResponse::status + + attr_accessor title: String + + attr_accessor total_available: Float + + attr_accessor total_paid: Float + + attr_accessor updated_at: Time + + attr_accessor vote_threshold: Integer + + def initialize: ( + id: String, + bounty_type: WhopSDK::Models::BountyListResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyListResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + ) -> void + + def to_hash: -> { + id: String, + bounty_type: WhopSDK::Models::BountyListResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyListResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + + type bounty_type = :classic | :user_funded | :workforce + + module BountyType + extend WhopSDK::Internal::Type::Enum + + CLASSIC: :classic + USER_FUNDED: :user_funded + WORKFORCE: :workforce + + def self?.values: -> ::Array[WhopSDK::Models::BountyListResponse::bounty_type] + end + + type status = :published | :archived + + module Status + extend WhopSDK::Internal::Type::Enum + + PUBLISHED: :published + ARCHIVED: :archived + + def self?.values: -> ::Array[WhopSDK::Models::BountyListResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/bounty_retrieve_params.rbs b/sig/whop_sdk/models/bounty_retrieve_params.rbs new file mode 100644 index 00000000..1dea4a28 --- /dev/null +++ b/sig/whop_sdk/models/bounty_retrieve_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type bounty_retrieve_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class BountyRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/bounty_retrieve_response.rbs b/sig/whop_sdk/models/bounty_retrieve_response.rbs new file mode 100644 index 00000000..70b63671 --- /dev/null +++ b/sig/whop_sdk/models/bounty_retrieve_response.rbs @@ -0,0 +1,93 @@ +module WhopSDK + module Models + type bounty_retrieve_response = + { + id: String, + bounty_type: WhopSDK::Models::BountyRetrieveResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyRetrieveResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + + class BountyRetrieveResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor bounty_type: WhopSDK::Models::BountyRetrieveResponse::bounty_type + + attr_accessor created_at: Time + + attr_accessor currency: WhopSDK::Models::currency + + attr_accessor description: String + + attr_accessor status: WhopSDK::Models::BountyRetrieveResponse::status + + attr_accessor title: String + + attr_accessor total_available: Float + + attr_accessor total_paid: Float + + attr_accessor updated_at: Time + + attr_accessor vote_threshold: Integer + + def initialize: ( + id: String, + bounty_type: WhopSDK::Models::BountyRetrieveResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyRetrieveResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + ) -> void + + def to_hash: -> { + id: String, + bounty_type: WhopSDK::Models::BountyRetrieveResponse::bounty_type, + created_at: Time, + currency: WhopSDK::Models::currency, + description: String, + status: WhopSDK::Models::BountyRetrieveResponse::status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + + type bounty_type = :classic | :user_funded | :workforce + + module BountyType + extend WhopSDK::Internal::Type::Enum + + CLASSIC: :classic + USER_FUNDED: :user_funded + WORKFORCE: :workforce + + def self?.values: -> ::Array[WhopSDK::Models::BountyRetrieveResponse::bounty_type] + end + + type status = :published | :archived + + module Status + extend WhopSDK::Internal::Type::Enum + + PUBLISHED: :published + ARCHIVED: :archived + + def self?.values: -> ::Array[WhopSDK::Models::BountyRetrieveResponse::status] + end + end + end +end diff --git a/sig/whop_sdk/models/checkout_configuration.rbs b/sig/whop_sdk/models/checkout_configuration.rbs index d2940921..5a011861 100644 --- a/sig/whop_sdk/models/checkout_configuration.rbs +++ b/sig/whop_sdk/models/checkout_configuration.rbs @@ -96,6 +96,7 @@ module WhopSDK type plan = { id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, currency: WhopSDK::Models::currency, expiration_days: Integer?, @@ -110,6 +111,8 @@ module WhopSDK class Plan < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor adaptive_pricing_enabled: bool + attr_accessor billing_period: Integer? attr_accessor currency: WhopSDK::Models::currency @@ -130,6 +133,7 @@ module WhopSDK def initialize: ( id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, currency: WhopSDK::Models::currency, expiration_days: Integer?, @@ -143,6 +147,7 @@ module WhopSDK def to_hash: -> { id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, currency: WhopSDK::Models::currency, expiration_days: Integer?, diff --git a/sig/whop_sdk/models/checkout_configuration_create_params.rbs b/sig/whop_sdk/models/checkout_configuration_create_params.rbs index 3b557e2c..2be13ee5 100644 --- a/sig/whop_sdk/models/checkout_configuration_create_params.rbs +++ b/sig/whop_sdk/models/checkout_configuration_create_params.rbs @@ -97,6 +97,7 @@ module WhopSDK { company_id: String, currency: WhopSDK::Models::currency, + adaptive_pricing_enabled: bool?, application_fee_amount: Float?, billing_period: Integer?, custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::CustomField]?, @@ -125,6 +126,8 @@ module WhopSDK attr_accessor currency: WhopSDK::Models::currency + attr_accessor adaptive_pricing_enabled: bool? + attr_accessor application_fee_amount: Float? attr_accessor billing_period: Integer? @@ -170,6 +173,7 @@ module WhopSDK def initialize: ( company_id: String, currency: WhopSDK::Models::currency, + ?adaptive_pricing_enabled: bool?, ?application_fee_amount: Float?, ?billing_period: Integer?, ?custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::CustomField]?, @@ -196,6 +200,7 @@ module WhopSDK def to_hash: -> { company_id: String, currency: WhopSDK::Models::currency, + adaptive_pricing_enabled: bool?, application_fee_amount: Float?, billing_period: Integer?, custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Body::CreateCheckoutSessionInputModePaymentWithPlan::Plan::CustomField]?, @@ -275,7 +280,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -283,18 +288,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end @@ -373,12 +378,15 @@ module WhopSDK type checkout_styling = { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? } class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + attr_accessor background_color: String? + attr_accessor border_style: WhopSDK::Models::checkout_shape? attr_accessor button_color: String? @@ -386,12 +394,14 @@ module WhopSDK attr_accessor font_family: WhopSDK::Models::checkout_font? def initialize: ( + ?background_color: String?, ?border_style: WhopSDK::Models::checkout_shape?, ?button_color: String?, ?font_family: WhopSDK::Models::checkout_font? ) -> void def to_hash: -> { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? @@ -412,7 +422,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -420,18 +430,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end end @@ -503,12 +513,15 @@ module WhopSDK type checkout_styling = { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? } class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + attr_accessor background_color: String? + attr_accessor border_style: WhopSDK::Models::checkout_shape? attr_accessor button_color: String? @@ -516,12 +529,14 @@ module WhopSDK attr_accessor font_family: WhopSDK::Models::checkout_font? def initialize: ( + ?background_color: String?, ?border_style: WhopSDK::Models::checkout_shape?, ?button_color: String?, ?font_family: WhopSDK::Models::checkout_font? ) -> void def to_hash: -> { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? @@ -542,7 +557,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -550,18 +565,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end end @@ -624,12 +639,15 @@ module WhopSDK type checkout_styling = { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? } class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + attr_accessor background_color: String? + attr_accessor border_style: WhopSDK::Models::checkout_shape? attr_accessor button_color: String? @@ -637,12 +655,14 @@ module WhopSDK attr_accessor font_family: WhopSDK::Models::checkout_font? def initialize: ( + ?background_color: String?, ?border_style: WhopSDK::Models::checkout_shape?, ?button_color: String?, ?font_family: WhopSDK::Models::checkout_font? ) -> void def to_hash: -> { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? @@ -653,7 +673,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -661,18 +681,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end end diff --git a/sig/whop_sdk/models/checkout_configuration_list_response.rbs b/sig/whop_sdk/models/checkout_configuration_list_response.rbs index 4eb67a1d..39b402db 100644 --- a/sig/whop_sdk/models/checkout_configuration_list_response.rbs +++ b/sig/whop_sdk/models/checkout_configuration_list_response.rbs @@ -96,6 +96,7 @@ module WhopSDK type plan = { id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, currency: WhopSDK::Models::currency, expiration_days: Integer?, @@ -110,6 +111,8 @@ module WhopSDK class Plan < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor adaptive_pricing_enabled: bool + attr_accessor billing_period: Integer? attr_accessor currency: WhopSDK::Models::currency @@ -130,6 +133,7 @@ module WhopSDK def initialize: ( id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, currency: WhopSDK::Models::currency, expiration_days: Integer?, @@ -143,6 +147,7 @@ module WhopSDK def to_hash: -> { id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, currency: WhopSDK::Models::currency, expiration_days: Integer?, diff --git a/sig/whop_sdk/models/company_create_api_key_params.rbs b/sig/whop_sdk/models/company_create_api_key_params.rbs new file mode 100644 index 00000000..759ecc2b --- /dev/null +++ b/sig/whop_sdk/models/company_create_api_key_params.rbs @@ -0,0 +1,83 @@ +module WhopSDK + module Models + type company_create_api_key_params = + { + parent_company_id: String, + child_company_id: String, + name: String?, + permissions: ::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission]?, + role: WhopSDK::Models::CompanyCreateAPIKeyParams::role? + } + & WhopSDK::Internal::Type::request_parameters + + class CompanyCreateAPIKeyParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor parent_company_id: String + + attr_accessor child_company_id: String + + attr_accessor name: String? + + attr_accessor permissions: ::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission]? + + attr_accessor role: WhopSDK::Models::CompanyCreateAPIKeyParams::role? + + def initialize: ( + parent_company_id: String, + child_company_id: String, + ?name: String?, + ?permissions: ::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission]?, + ?role: WhopSDK::Models::CompanyCreateAPIKeyParams::role?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + parent_company_id: String, + child_company_id: String, + name: String?, + permissions: ::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission]?, + role: WhopSDK::Models::CompanyCreateAPIKeyParams::role?, + request_options: WhopSDK::RequestOptions + } + + type permission = + { actions: ::Array[String], grant: bool, resources: ::Array[String] } + + class Permission < WhopSDK::Internal::Type::BaseModel + attr_accessor actions: ::Array[String] + + attr_accessor grant: bool + + attr_accessor resources: ::Array[String] + + def initialize: ( + actions: ::Array[String], + grant: bool, + resources: ::Array[String] + ) -> void + + def to_hash: -> { + actions: ::Array[String], + grant: bool, + resources: ::Array[String] + } + end + + type role = :owner | :admin | :moderator | :sales_manager | :advertiser + + module Role + extend WhopSDK::Internal::Type::Enum + + OWNER: :owner + ADMIN: :admin + MODERATOR: :moderator + SALES_MANAGER: :sales_manager + ADVERTISER: :advertiser + + def self?.values: -> ::Array[WhopSDK::Models::CompanyCreateAPIKeyParams::role] + end + end + end +end diff --git a/sig/whop_sdk/models/company_create_api_key_response.rbs b/sig/whop_sdk/models/company_create_api_key_response.rbs new file mode 100644 index 00000000..065d5d1e --- /dev/null +++ b/sig/whop_sdk/models/company_create_api_key_response.rbs @@ -0,0 +1,18 @@ +module WhopSDK + module Models + type company_create_api_key_response = + { id: String, name: String?, secret_key: String } + + class CompanyCreateAPIKeyResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor secret_key: String + + def initialize: (id: String, name: String?, secret_key: String) -> void + + def to_hash: -> { id: String, name: String?, secret_key: String } + end + end +end diff --git a/sig/whop_sdk/models/conversion_create_params.rbs b/sig/whop_sdk/models/conversion_create_params.rbs new file mode 100644 index 00000000..df5e080a --- /dev/null +++ b/sig/whop_sdk/models/conversion_create_params.rbs @@ -0,0 +1,349 @@ +module WhopSDK + module Models + type conversion_create_params = + { + company_id: String, + event_name: WhopSDK::Models::ConversionCreateParams::event_name, + action_source: WhopSDK::Models::ConversionCreateParams::action_source?, + context: WhopSDK::ConversionCreateParams::Context?, + currency: WhopSDK::Models::currency?, + custom_name: String?, + event_id: String?, + event_time: Time?, + plan_id: String?, + product_id: String?, + referrer_url: String?, + url: String?, + user: WhopSDK::ConversionCreateParams::User?, + value: Float? + } + & WhopSDK::Internal::Type::request_parameters + + class ConversionCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor company_id: String + + attr_accessor event_name: WhopSDK::Models::ConversionCreateParams::event_name + + attr_accessor action_source: WhopSDK::Models::ConversionCreateParams::action_source? + + attr_accessor context: WhopSDK::ConversionCreateParams::Context? + + attr_accessor currency: WhopSDK::Models::currency? + + attr_accessor custom_name: String? + + attr_accessor event_id: String? + + attr_accessor event_time: Time? + + attr_accessor plan_id: String? + + attr_accessor product_id: String? + + attr_accessor referrer_url: String? + + attr_accessor url: String? + + attr_accessor user: WhopSDK::ConversionCreateParams::User? + + attr_accessor value: Float? + + def initialize: ( + company_id: String, + event_name: WhopSDK::Models::ConversionCreateParams::event_name, + ?action_source: WhopSDK::Models::ConversionCreateParams::action_source?, + ?context: WhopSDK::ConversionCreateParams::Context?, + ?currency: WhopSDK::Models::currency?, + ?custom_name: String?, + ?event_id: String?, + ?event_time: Time?, + ?plan_id: String?, + ?product_id: String?, + ?referrer_url: String?, + ?url: String?, + ?user: WhopSDK::ConversionCreateParams::User?, + ?value: Float?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + company_id: String, + event_name: WhopSDK::Models::ConversionCreateParams::event_name, + action_source: WhopSDK::Models::ConversionCreateParams::action_source?, + context: WhopSDK::ConversionCreateParams::Context?, + currency: WhopSDK::Models::currency?, + custom_name: String?, + event_id: String?, + event_time: Time?, + plan_id: String?, + product_id: String?, + referrer_url: String?, + url: String?, + user: WhopSDK::ConversionCreateParams::User?, + value: Float?, + request_options: WhopSDK::RequestOptions + } + + type event_name = + :lead + | :submit_application + | :contact + | :complete_registration + | :schedule + | :custom + + module EventName + extend WhopSDK::Internal::Type::Enum + + LEAD: :lead + SUBMIT_APPLICATION: :submit_application + CONTACT: :contact + COMPLETE_REGISTRATION: :complete_registration + SCHEDULE: :schedule + CUSTOM: :custom + + def self?.values: -> ::Array[WhopSDK::Models::ConversionCreateParams::event_name] + end + + type action_source = + :email + | :website + | :app + | :phone_call + | :chat + | :physical_store + | :system_generated + | :business_messaging + | :other + + module ActionSource + extend WhopSDK::Internal::Type::Enum + + EMAIL: :email + WEBSITE: :website + APP: :app + PHONE_CALL: :phone_call + CHAT: :chat + PHYSICAL_STORE: :physical_store + SYSTEM_GENERATED: :system_generated + BUSINESS_MESSAGING: :business_messaging + OTHER: :other + + def self?.values: -> ::Array[WhopSDK::Models::ConversionCreateParams::action_source] + end + + type context = + { + ad_campaign_id: String?, + ad_id: String?, + ad_set_id: String?, + fbclid: String?, + fbp: String?, + ga: String?, + gclid: String?, + ig_sid: String?, + ip_address: String?, + ttclid: String?, + ttp: String?, + user_agent: String?, + utm_campaign: String?, + utm_content: String?, + utm_id: String?, + utm_medium: String?, + utm_source: String?, + utm_term: String? + } + + class Context < WhopSDK::Internal::Type::BaseModel + attr_accessor ad_campaign_id: String? + + attr_accessor ad_id: String? + + attr_accessor ad_set_id: String? + + attr_accessor fbclid: String? + + attr_accessor fbp: String? + + attr_accessor ga: String? + + attr_accessor gclid: String? + + attr_accessor ig_sid: String? + + attr_accessor ip_address: String? + + attr_accessor ttclid: String? + + attr_accessor ttp: String? + + attr_accessor user_agent: String? + + attr_accessor utm_campaign: String? + + attr_accessor utm_content: String? + + attr_accessor utm_id: String? + + attr_accessor utm_medium: String? + + attr_accessor utm_source: String? + + attr_accessor utm_term: String? + + def initialize: ( + ?ad_campaign_id: String?, + ?ad_id: String?, + ?ad_set_id: String?, + ?fbclid: String?, + ?fbp: String?, + ?ga: String?, + ?gclid: String?, + ?ig_sid: String?, + ?ip_address: String?, + ?ttclid: String?, + ?ttp: String?, + ?user_agent: String?, + ?utm_campaign: String?, + ?utm_content: String?, + ?utm_id: String?, + ?utm_medium: String?, + ?utm_source: String?, + ?utm_term: String? + ) -> void + + def to_hash: -> { + ad_campaign_id: String?, + ad_id: String?, + ad_set_id: String?, + fbclid: String?, + fbp: String?, + ga: String?, + gclid: String?, + ig_sid: String?, + ip_address: String?, + ttclid: String?, + ttp: String?, + user_agent: String?, + utm_campaign: String?, + utm_content: String?, + utm_id: String?, + utm_medium: String?, + utm_source: String?, + utm_term: String? + } + end + + type user = + { + anonymous_id: String?, + birthdate: String?, + city: String?, + country: String?, + email: String?, + external_id: String?, + first_name: String?, + gender: WhopSDK::Models::ConversionCreateParams::User::gender?, + last_name: String?, + member_id: String?, + membership_id: String?, + name: String?, + phone: String?, + postal_code: String?, + state: String?, + user_id: String?, + username: String? + } + + class User < WhopSDK::Internal::Type::BaseModel + attr_accessor anonymous_id: String? + + attr_accessor birthdate: String? + + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor email: String? + + attr_accessor external_id: String? + + attr_accessor first_name: String? + + attr_accessor gender: WhopSDK::Models::ConversionCreateParams::User::gender? + + attr_accessor last_name: String? + + attr_accessor member_id: String? + + attr_accessor membership_id: String? + + attr_accessor name: String? + + attr_accessor phone: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + attr_accessor user_id: String? + + attr_accessor username: String? + + def initialize: ( + ?anonymous_id: String?, + ?birthdate: String?, + ?city: String?, + ?country: String?, + ?email: String?, + ?external_id: String?, + ?first_name: String?, + ?gender: WhopSDK::Models::ConversionCreateParams::User::gender?, + ?last_name: String?, + ?member_id: String?, + ?membership_id: String?, + ?name: String?, + ?phone: String?, + ?postal_code: String?, + ?state: String?, + ?user_id: String?, + ?username: String? + ) -> void + + def to_hash: -> { + anonymous_id: String?, + birthdate: String?, + city: String?, + country: String?, + email: String?, + external_id: String?, + first_name: String?, + gender: WhopSDK::Models::ConversionCreateParams::User::gender?, + last_name: String?, + member_id: String?, + membership_id: String?, + name: String?, + phone: String?, + postal_code: String?, + state: String?, + user_id: String?, + username: String? + } + + type gender = :male | :female + + module Gender + extend WhopSDK::Internal::Type::Enum + + MALE: :male + FEMALE: :female + + def self?.values: -> ::Array[WhopSDK::Models::ConversionCreateParams::User::gender] + end + end + end + end +end diff --git a/sig/whop_sdk/models/conversion_create_response.rbs b/sig/whop_sdk/models/conversion_create_response.rbs new file mode 100644 index 00000000..82fddff3 --- /dev/null +++ b/sig/whop_sdk/models/conversion_create_response.rbs @@ -0,0 +1,13 @@ +module WhopSDK + module Models + type conversion_create_response = { id: String } + + class ConversionCreateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + end +end diff --git a/sig/whop_sdk/models/currency.rbs b/sig/whop_sdk/models/currency.rbs index de2f3810..91254b25 100644 --- a/sig/whop_sdk/models/currency.rbs +++ b/sig/whop_sdk/models/currency.rbs @@ -87,6 +87,7 @@ module WhopSDK | :btc | :cny | :usdt + | :kzt module Currency extend WhopSDK::Internal::Type::Enum @@ -177,6 +178,7 @@ module WhopSDK BTC: :btc CNY: :cny USDT: :usdt + KZT: :kzt def self?.values: -> ::Array[WhopSDK::Models::currency] end diff --git a/sig/whop_sdk/models/file_create_params.rbs b/sig/whop_sdk/models/file_create_params.rbs index 580ea5ea..c750f6a6 100644 --- a/sig/whop_sdk/models/file_create_params.rbs +++ b/sig/whop_sdk/models/file_create_params.rbs @@ -1,7 +1,11 @@ module WhopSDK module Models type file_create_params = - { filename: String } & WhopSDK::Internal::Type::request_parameters + { + filename: String, + visibility: WhopSDK::Models::FileCreateParams::visibility? + } + & WhopSDK::Internal::Type::request_parameters class FileCreateParams < WhopSDK::Internal::Type::BaseModel extend WhopSDK::Internal::Type::RequestParameters::Converter @@ -9,15 +13,30 @@ module WhopSDK attr_accessor filename: String + attr_accessor visibility: WhopSDK::Models::FileCreateParams::visibility? + def initialize: ( filename: String, + ?visibility: WhopSDK::Models::FileCreateParams::visibility?, ?request_options: WhopSDK::request_opts ) -> void def to_hash: -> { filename: String, + visibility: WhopSDK::Models::FileCreateParams::visibility?, request_options: WhopSDK::RequestOptions } + + type visibility = :public | :private + + module Visibility + extend WhopSDK::Internal::Type::Enum + + PUBLIC: :public + PRIVATE: :private + + def self?.values: -> ::Array[WhopSDK::Models::FileCreateParams::visibility] + end end end end diff --git a/sig/whop_sdk/models/file_create_response.rbs b/sig/whop_sdk/models/file_create_response.rbs index 15cdeb80..20491571 100644 --- a/sig/whop_sdk/models/file_create_response.rbs +++ b/sig/whop_sdk/models/file_create_response.rbs @@ -9,7 +9,8 @@ module WhopSDK upload_headers: ::Hash[Symbol, top]?, upload_status: WhopSDK::Models::upload_status, upload_url: String?, - url: String? + url: String?, + visibility: WhopSDK::Models::FileCreateResponse::visibility } class FileCreateResponse < WhopSDK::Internal::Type::BaseModel @@ -29,6 +30,8 @@ module WhopSDK attr_accessor url: String? + attr_accessor visibility: WhopSDK::Models::FileCreateResponse::visibility + def initialize: ( id: String, content_type: String?, @@ -37,7 +40,8 @@ module WhopSDK upload_headers: ::Hash[Symbol, top]?, upload_status: WhopSDK::Models::upload_status, upload_url: String?, - url: String? + url: String?, + visibility: WhopSDK::Models::FileCreateResponse::visibility ) -> void def to_hash: -> { @@ -48,8 +52,20 @@ module WhopSDK upload_headers: ::Hash[Symbol, top]?, upload_status: WhopSDK::Models::upload_status, upload_url: String?, - url: String? + url: String?, + visibility: WhopSDK::Models::FileCreateResponse::visibility } + + type visibility = :public | :private + + module Visibility + extend WhopSDK::Internal::Type::Enum + + PUBLIC: :public + PRIVATE: :private + + def self?.values: -> ::Array[WhopSDK::Models::FileCreateResponse::visibility] + end end end end diff --git a/sig/whop_sdk/models/file_retrieve_response.rbs b/sig/whop_sdk/models/file_retrieve_response.rbs index 3852ba42..d36b0edb 100644 --- a/sig/whop_sdk/models/file_retrieve_response.rbs +++ b/sig/whop_sdk/models/file_retrieve_response.rbs @@ -7,7 +7,8 @@ module WhopSDK filename: String?, size: String?, upload_status: WhopSDK::Models::upload_status, - url: String? + url: String?, + visibility: WhopSDK::Models::FileRetrieveResponse::visibility } class FileRetrieveResponse < WhopSDK::Internal::Type::BaseModel @@ -23,13 +24,16 @@ module WhopSDK attr_accessor url: String? + attr_accessor visibility: WhopSDK::Models::FileRetrieveResponse::visibility + def initialize: ( id: String, content_type: String?, filename: String?, size: String?, upload_status: WhopSDK::Models::upload_status, - url: String? + url: String?, + visibility: WhopSDK::Models::FileRetrieveResponse::visibility ) -> void def to_hash: -> { @@ -38,8 +42,20 @@ module WhopSDK filename: String?, size: String?, upload_status: WhopSDK::Models::upload_status, - url: String? + url: String?, + visibility: WhopSDK::Models::FileRetrieveResponse::visibility } + + type visibility = :public | :private + + module Visibility + extend WhopSDK::Internal::Type::Enum + + PUBLIC: :public + PRIVATE: :private + + def self?.values: -> ::Array[WhopSDK::Models::FileRetrieveResponse::visibility] + end end end end diff --git a/sig/whop_sdk/models/forum_post_list_params.rbs b/sig/whop_sdk/models/forum_post_list_params.rbs index 28cc2f08..e7e93058 100644 --- a/sig/whop_sdk/models/forum_post_list_params.rbs +++ b/sig/whop_sdk/models/forum_post_list_params.rbs @@ -6,6 +6,7 @@ module WhopSDK after: String?, before: String?, first: Integer?, + include_bounty_anchors: bool?, last: Integer?, parent_id: String?, pinned: bool? @@ -24,6 +25,8 @@ module WhopSDK attr_accessor first: Integer? + attr_accessor include_bounty_anchors: bool? + attr_accessor last: Integer? attr_accessor parent_id: String? @@ -35,6 +38,7 @@ module WhopSDK ?after: String?, ?before: String?, ?first: Integer?, + ?include_bounty_anchors: bool?, ?last: Integer?, ?parent_id: String?, ?pinned: bool?, @@ -46,6 +50,7 @@ module WhopSDK after: String?, before: String?, first: Integer?, + include_bounty_anchors: bool?, last: Integer?, parent_id: String?, pinned: bool?, diff --git a/sig/whop_sdk/models/invoice_create_params.rbs b/sig/whop_sdk/models/invoice_create_params.rbs index 0b84d57c..a5a4828c 100644 --- a/sig/whop_sdk/models/invoice_create_params.rbs +++ b/sig/whop_sdk/models/invoice_create_params.rbs @@ -255,7 +255,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -263,18 +263,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end end @@ -608,7 +608,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -616,18 +616,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end end diff --git a/sig/whop_sdk/models/invoice_update_params.rbs b/sig/whop_sdk/models/invoice_update_params.rbs index dbd5ef5b..9858c570 100644 --- a/sig/whop_sdk/models/invoice_update_params.rbs +++ b/sig/whop_sdk/models/invoice_update_params.rbs @@ -299,7 +299,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -307,18 +307,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end end diff --git a/sig/whop_sdk/models/membership.rbs b/sig/whop_sdk/models/membership.rbs index 4f80b5cc..031594b8 100644 --- a/sig/whop_sdk/models/membership.rbs +++ b/sig/whop_sdk/models/membership.rbs @@ -7,6 +7,7 @@ module WhopSDK cancel_option: WhopSDK::Models::cancel_options?, canceled_at: Time?, cancellation_reason: String?, + checkout_configuration_id: String?, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Models::currency?, @@ -38,6 +39,8 @@ module WhopSDK attr_accessor cancellation_reason: String? + attr_accessor checkout_configuration_id: String? + attr_accessor company: WhopSDK::Membership::Company attr_accessor created_at: Time @@ -80,6 +83,7 @@ module WhopSDK cancel_option: WhopSDK::Models::cancel_options?, canceled_at: Time?, cancellation_reason: String?, + checkout_configuration_id: String?, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Models::currency?, @@ -106,6 +110,7 @@ module WhopSDK cancel_option: WhopSDK::Models::cancel_options?, canceled_at: Time?, cancellation_reason: String?, + checkout_configuration_id: String?, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Models::currency?, diff --git a/sig/whop_sdk/models/membership_list_response.rbs b/sig/whop_sdk/models/membership_list_response.rbs index 5901f5fe..611c3d40 100644 --- a/sig/whop_sdk/models/membership_list_response.rbs +++ b/sig/whop_sdk/models/membership_list_response.rbs @@ -7,6 +7,7 @@ module WhopSDK cancel_option: WhopSDK::Models::cancel_options?, canceled_at: Time?, cancellation_reason: String?, + checkout_configuration_id: String?, company: WhopSDK::Models::MembershipListResponse::Company, created_at: Time, currency: WhopSDK::Models::currency?, @@ -37,6 +38,8 @@ module WhopSDK attr_accessor cancellation_reason: String? + attr_accessor checkout_configuration_id: String? + attr_accessor company: WhopSDK::Models::MembershipListResponse::Company attr_accessor created_at: Time @@ -77,6 +80,7 @@ module WhopSDK cancel_option: WhopSDK::Models::cancel_options?, canceled_at: Time?, cancellation_reason: String?, + checkout_configuration_id: String?, company: WhopSDK::Models::MembershipListResponse::Company, created_at: Time, currency: WhopSDK::Models::currency?, @@ -102,6 +106,7 @@ module WhopSDK cancel_option: WhopSDK::Models::cancel_options?, canceled_at: Time?, cancellation_reason: String?, + checkout_configuration_id: String?, company: WhopSDK::Models::MembershipListResponse::Company, created_at: Time, currency: WhopSDK::Models::currency?, diff --git a/sig/whop_sdk/models/payment.rbs b/sig/whop_sdk/models/payment.rbs index 7e24d22d..d2943710 100644 --- a/sig/whop_sdk/models/payment.rbs +++ b/sig/whop_sdk/models/payment.rbs @@ -10,6 +10,7 @@ module WhopSDK billing_reason: WhopSDK::Models::billing_reasons?, card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, + checkout_configuration_id: String?, company: WhopSDK::Payment::Company?, created_at: Time, currency: WhopSDK::Models::currency?, @@ -35,6 +36,9 @@ module WhopSDK refunded_at: Time?, resolutions: ::Array[WhopSDK::Payment::Resolution]?, retryable: bool, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: Float?, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, @@ -65,6 +69,8 @@ module WhopSDK attr_accessor card_last4: String? + attr_accessor checkout_configuration_id: String? + attr_accessor company: WhopSDK::Payment::Company? attr_accessor created_at: Time @@ -115,6 +121,12 @@ module WhopSDK attr_accessor retryable: bool + attr_accessor settlement_amount: Float + + attr_accessor settlement_currency: String + + attr_accessor settlement_exchange_rate: Float? + attr_accessor status: WhopSDK::Models::receipt_status? attr_accessor substatus: WhopSDK::Models::friendly_receipt_status @@ -146,6 +158,7 @@ module WhopSDK billing_reason: WhopSDK::Models::billing_reasons?, card_brand: WhopSDK::Models::card_brands?, card_last4: String?, + checkout_configuration_id: String?, company: WhopSDK::Payment::Company?, created_at: Time, currency: WhopSDK::Models::currency?, @@ -171,6 +184,9 @@ module WhopSDK refunded_at: Time?, resolutions: ::Array[WhopSDK::Payment::Resolution]?, retryable: bool, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: Float?, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, @@ -193,6 +209,7 @@ module WhopSDK billing_reason: WhopSDK::Models::billing_reasons?, card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, + checkout_configuration_id: String?, company: WhopSDK::Payment::Company?, created_at: Time, currency: WhopSDK::Models::currency?, @@ -218,6 +235,9 @@ module WhopSDK refunded_at: Time?, resolutions: ::Array[WhopSDK::Payment::Resolution]?, retryable: bool, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: Float?, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, diff --git a/sig/whop_sdk/models/payment_list_response.rbs b/sig/whop_sdk/models/payment_list_response.rbs index bb383102..908fda2c 100644 --- a/sig/whop_sdk/models/payment_list_response.rbs +++ b/sig/whop_sdk/models/payment_list_response.rbs @@ -10,6 +10,7 @@ module WhopSDK billing_reason: WhopSDK::Models::billing_reasons?, card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, + checkout_configuration_id: String?, company: WhopSDK::Models::PaymentListResponse::Company?, created_at: Time, currency: WhopSDK::Models::currency?, @@ -31,6 +32,7 @@ module WhopSDK refunded_amount: Float?, refunded_at: Time?, retryable: bool, + settlement_currency: String, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, @@ -60,6 +62,8 @@ module WhopSDK attr_accessor card_last4: String? + attr_accessor checkout_configuration_id: String? + attr_accessor company: WhopSDK::Models::PaymentListResponse::Company? attr_accessor created_at: Time @@ -102,6 +106,8 @@ module WhopSDK attr_accessor retryable: bool + attr_accessor settlement_currency: String + attr_accessor status: WhopSDK::Models::receipt_status? attr_accessor substatus: WhopSDK::Models::friendly_receipt_status @@ -131,6 +137,7 @@ module WhopSDK billing_reason: WhopSDK::Models::billing_reasons?, card_brand: WhopSDK::Models::card_brands?, card_last4: String?, + checkout_configuration_id: String?, company: WhopSDK::Models::PaymentListResponse::Company?, created_at: Time, currency: WhopSDK::Models::currency?, @@ -152,6 +159,7 @@ module WhopSDK refunded_amount: Float?, refunded_at: Time?, retryable: bool, + settlement_currency: String, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, @@ -173,6 +181,7 @@ module WhopSDK billing_reason: WhopSDK::Models::billing_reasons?, card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, + checkout_configuration_id: String?, company: WhopSDK::Models::PaymentListResponse::Company?, created_at: Time, currency: WhopSDK::Models::currency?, @@ -194,6 +203,7 @@ module WhopSDK refunded_amount: Float?, refunded_at: Time?, retryable: bool, + settlement_currency: String, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, diff --git a/sig/whop_sdk/models/payment_method_types.rbs b/sig/whop_sdk/models/payment_method_types.rbs index 23e82087..ae87b94d 100644 --- a/sig/whop_sdk/models/payment_method_types.rbs +++ b/sig/whop_sdk/models/payment_method_types.rbs @@ -41,6 +41,7 @@ module WhopSDK | :interac | :kakao_pay | :klarna + | :klarna_pay_now | :konbini | :kr_card | :kr_market @@ -146,6 +147,7 @@ module WhopSDK INTERAC: :interac KAKAO_PAY: :kakao_pay KLARNA: :klarna + KLARNA_PAY_NOW: :klarna_pay_now KONBINI: :konbini KR_CARD: :kr_card KR_MARKET: :kr_market diff --git a/sig/whop_sdk/models/plan.rbs b/sig/whop_sdk/models/plan.rbs index 7738f52e..21fe55ce 100644 --- a/sig/whop_sdk/models/plan.rbs +++ b/sig/whop_sdk/models/plan.rbs @@ -3,6 +3,7 @@ module WhopSDK type plan = { id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, collect_tax: bool, company: WhopSDK::Plan::Company?, @@ -34,6 +35,8 @@ module WhopSDK class Plan < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor adaptive_pricing_enabled: bool + attr_accessor billing_period: Integer? attr_accessor collect_tax: bool @@ -88,6 +91,7 @@ module WhopSDK def initialize: ( id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, collect_tax: bool, company: WhopSDK::Plan::Company?, @@ -118,6 +122,7 @@ module WhopSDK def to_hash: -> { id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, collect_tax: bool, company: WhopSDK::Plan::Company?, diff --git a/sig/whop_sdk/models/plan_create_params.rbs b/sig/whop_sdk/models/plan_create_params.rbs index b0c97d08..ed524445 100644 --- a/sig/whop_sdk/models/plan_create_params.rbs +++ b/sig/whop_sdk/models/plan_create_params.rbs @@ -4,6 +4,7 @@ module WhopSDK { company_id: String, product_id: String, + adaptive_pricing_enabled: bool?, billing_period: Integer?, checkout_styling: WhopSDK::PlanCreateParams::CheckoutStyling?, currency: WhopSDK::Models::currency?, @@ -36,6 +37,8 @@ module WhopSDK attr_accessor product_id: String + attr_accessor adaptive_pricing_enabled: bool? + attr_accessor billing_period: Integer? attr_accessor checkout_styling: WhopSDK::PlanCreateParams::CheckoutStyling? @@ -81,6 +84,7 @@ module WhopSDK def initialize: ( company_id: String, product_id: String, + ?adaptive_pricing_enabled: bool?, ?billing_period: Integer?, ?checkout_styling: WhopSDK::PlanCreateParams::CheckoutStyling?, ?currency: WhopSDK::Models::currency?, @@ -108,6 +112,7 @@ module WhopSDK def to_hash: -> { company_id: String, product_id: String, + adaptive_pricing_enabled: bool?, billing_period: Integer?, checkout_styling: WhopSDK::PlanCreateParams::CheckoutStyling?, currency: WhopSDK::Models::currency?, @@ -134,12 +139,15 @@ module WhopSDK type checkout_styling = { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? } class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + attr_accessor background_color: String? + attr_accessor border_style: WhopSDK::Models::checkout_shape? attr_accessor button_color: String? @@ -147,12 +155,14 @@ module WhopSDK attr_accessor font_family: WhopSDK::Models::checkout_font? def initialize: ( + ?background_color: String?, ?border_style: WhopSDK::Models::checkout_shape?, ?button_color: String?, ?font_family: WhopSDK::Models::checkout_font? ) -> void def to_hash: -> { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? @@ -215,7 +225,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -223,18 +233,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end end diff --git a/sig/whop_sdk/models/plan_list_response.rbs b/sig/whop_sdk/models/plan_list_response.rbs index a0f7cabd..fed2ca01 100644 --- a/sig/whop_sdk/models/plan_list_response.rbs +++ b/sig/whop_sdk/models/plan_list_response.rbs @@ -3,6 +3,7 @@ module WhopSDK type plan_list_response = { id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, company: WhopSDK::Models::PlanListResponse::Company?, created_at: Time, @@ -31,6 +32,8 @@ module WhopSDK class PlanListResponse < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor adaptive_pricing_enabled: bool + attr_accessor billing_period: Integer? attr_accessor company: WhopSDK::Models::PlanListResponse::Company? @@ -79,6 +82,7 @@ module WhopSDK def initialize: ( id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, company: WhopSDK::Models::PlanListResponse::Company?, created_at: Time, @@ -106,6 +110,7 @@ module WhopSDK def to_hash: -> { id: String, + adaptive_pricing_enabled: bool, billing_period: Integer?, company: WhopSDK::Models::PlanListResponse::Company?, created_at: Time, diff --git a/sig/whop_sdk/models/plan_update_params.rbs b/sig/whop_sdk/models/plan_update_params.rbs index b12b41ff..a8e1a776 100644 --- a/sig/whop_sdk/models/plan_update_params.rbs +++ b/sig/whop_sdk/models/plan_update_params.rbs @@ -3,6 +3,7 @@ module WhopSDK type plan_update_params = { id: String, + adaptive_pricing_enabled: bool?, billing_period: Integer?, checkout_styling: WhopSDK::PlanUpdateParams::CheckoutStyling?, currency: WhopSDK::Models::currency?, @@ -33,6 +34,8 @@ module WhopSDK attr_accessor id: String + attr_accessor adaptive_pricing_enabled: bool? + attr_accessor billing_period: Integer? attr_accessor checkout_styling: WhopSDK::PlanUpdateParams::CheckoutStyling? @@ -77,6 +80,7 @@ module WhopSDK def initialize: ( id: String, + ?adaptive_pricing_enabled: bool?, ?billing_period: Integer?, ?checkout_styling: WhopSDK::PlanUpdateParams::CheckoutStyling?, ?currency: WhopSDK::Models::currency?, @@ -103,6 +107,7 @@ module WhopSDK def to_hash: -> { id: String, + adaptive_pricing_enabled: bool?, billing_period: Integer?, checkout_styling: WhopSDK::PlanUpdateParams::CheckoutStyling?, currency: WhopSDK::Models::currency?, @@ -129,12 +134,15 @@ module WhopSDK type checkout_styling = { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? } class CheckoutStyling < WhopSDK::Internal::Type::BaseModel + attr_accessor background_color: String? + attr_accessor border_style: WhopSDK::Models::checkout_shape? attr_accessor button_color: String? @@ -142,12 +150,14 @@ module WhopSDK attr_accessor font_family: WhopSDK::Models::checkout_font? def initialize: ( + ?background_color: String?, ?border_style: WhopSDK::Models::checkout_shape?, ?button_color: String?, ?font_family: WhopSDK::Models::checkout_font? ) -> void def to_hash: -> { + background_color: String?, border_style: WhopSDK::Models::checkout_shape?, button_color: String?, font_family: WhopSDK::Models::checkout_font? @@ -210,7 +220,7 @@ module WhopSDK { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel @@ -218,18 +228,18 @@ module WhopSDK attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types] - attr_accessor include_platform_defaults: bool + attr_accessor include_platform_defaults: bool? def initialize: ( disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + ?include_platform_defaults: bool? ) -> void def to_hash: -> { disabled: ::Array[WhopSDK::Models::payment_method_types], enabled: ::Array[WhopSDK::Models::payment_method_types], - include_platform_defaults: bool + include_platform_defaults: bool? } end end diff --git a/sig/whop_sdk/models/stat_describe_params.rbs b/sig/whop_sdk/models/stat_describe_params.rbs new file mode 100644 index 00000000..28ec78cd --- /dev/null +++ b/sig/whop_sdk/models/stat_describe_params.rbs @@ -0,0 +1,32 @@ +module WhopSDK + module Models + type stat_describe_params = + { company_id: String?, resource: String?, user_id: String? } + & WhopSDK::Internal::Type::request_parameters + + class StatDescribeParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor company_id: String? + + attr_accessor resource: String? + + attr_accessor user_id: String? + + def initialize: ( + ?company_id: String?, + ?resource: String?, + ?user_id: String?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + company_id: String?, + resource: String?, + user_id: String?, + request_options: WhopSDK::RequestOptions + } + end + end +end diff --git a/sig/whop_sdk/models/stat_describe_response.rbs b/sig/whop_sdk/models/stat_describe_response.rbs new file mode 100644 index 00000000..b671b444 --- /dev/null +++ b/sig/whop_sdk/models/stat_describe_response.rbs @@ -0,0 +1,433 @@ +module WhopSDK + module Models + type stat_describe_response = + (WhopSDK::Models::StatDescribeResponse::DescribeRoot + | WhopSDK::Models::StatDescribeResponse::DescribeNode + | WhopSDK::Models::StatDescribeResponse::DescribeMetric + | WhopSDK::Models::StatDescribeResponse::DescribeView)? + + module StatDescribeResponse + extend WhopSDK::Internal::Type::Union + + type describe_root = + { + debug: WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug?, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric], + nodes: ::Array[String], + typename: :DescribeRoot, + views: ::Array[String] + } + + class DescribeRoot < WhopSDK::Internal::Type::BaseModel + attr_accessor debug: WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug? + + attr_accessor metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric] + + attr_accessor nodes: ::Array[String] + + attr_accessor typename: :DescribeRoot + + attr_accessor views: ::Array[String] + + def initialize: ( + debug: WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug?, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric], + nodes: ::Array[String], + views: ::Array[String], + ?typename: :DescribeRoot + ) -> void + + def to_hash: -> { + debug: WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug?, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric], + nodes: ::Array[String], + typename: :DescribeRoot, + views: ::Array[String] + } + + type debug = { request_id: String? } + + class Debug < WhopSDK::Internal::Type::BaseModel + attr_accessor request_id: String? + + def initialize: (request_id: String?) -> void + + def to_hash: -> { request_id: String? } + end + + type metric = + { + name: String, + node_path: String, + supported_engines: ::Array[String] + } + + class Metric < WhopSDK::Internal::Type::BaseModel + attr_accessor name: String + + attr_accessor node_path: String + + attr_accessor supported_engines: ::Array[String] + + def initialize: ( + name: String, + node_path: String, + supported_engines: ::Array[String] + ) -> void + + def to_hash: -> { + name: String, + node_path: String, + supported_engines: ::Array[String] + } + end + end + + type describe_node = + { + associations: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeNode::Association], + columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug?, + engine: String, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric], + node: String, + sample: ::Array[::Hash[Symbol, top]]?, + sortable_columns: ::Array[String], + typename: :DescribeNode + } + + class DescribeNode < WhopSDK::Internal::Type::BaseModel + attr_accessor associations: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeNode::Association] + + attr_accessor columns: ::Array[String] + + attr_accessor debug: WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug? + + attr_accessor engine: String + + attr_accessor metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric] + + attr_accessor node: String + + attr_accessor sample: ::Array[::Hash[Symbol, top]]? + + attr_accessor sortable_columns: ::Array[String] + + attr_accessor typename: :DescribeNode + + def initialize: ( + associations: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeNode::Association], + columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug?, + engine: String, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric], + node: String, + sample: ::Array[::Hash[Symbol, top]]?, + sortable_columns: ::Array[String], + ?typename: :DescribeNode + ) -> void + + def to_hash: -> { + associations: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeNode::Association], + columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug?, + engine: String, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric], + node: String, + sample: ::Array[::Hash[Symbol, top]]?, + sortable_columns: ::Array[String], + typename: :DescribeNode + } + + type association = + { + event_name: String?, + model: String?, + name: String, + path: String?, + type: String + } + + class Association < WhopSDK::Internal::Type::BaseModel + attr_accessor event_name: String? + + attr_accessor model: String? + + attr_accessor name: String + + attr_accessor path: String? + + attr_accessor type: String + + def initialize: ( + event_name: String?, + model: String?, + name: String, + path: String?, + type: String + ) -> void + + def to_hash: -> { + event_name: String?, + model: String?, + name: String, + path: String?, + type: String + } + end + + type debug = { request_id: String? } + + class Debug < WhopSDK::Internal::Type::BaseModel + attr_accessor request_id: String? + + def initialize: (request_id: String?) -> void + + def to_hash: -> { request_id: String? } + end + + type metric = + { + name: String, + node_path: String, + supported_engines: ::Array[String] + } + + class Metric < WhopSDK::Internal::Type::BaseModel + attr_accessor name: String + + attr_accessor node_path: String + + attr_accessor supported_engines: ::Array[String] + + def initialize: ( + name: String, + node_path: String, + supported_engines: ::Array[String] + ) -> void + + def to_hash: -> { + name: String, + node_path: String, + supported_engines: ::Array[String] + } + end + end + + type describe_metric = + { + breakdownable_columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug?, + engine: String, + filterable_columns: ::Array[String], + metric: String, + node: String, + sql: String?, + supported_engines: ::Array[String], + timestamp_column: String, + typename: :DescribeMetric + } + + class DescribeMetric < WhopSDK::Internal::Type::BaseModel + attr_accessor breakdownable_columns: ::Array[String] + + attr_accessor debug: WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug? + + attr_accessor engine: String + + attr_accessor filterable_columns: ::Array[String] + + attr_accessor metric: String + + attr_accessor node: String + + attr_accessor sql: String? + + attr_accessor supported_engines: ::Array[String] + + attr_accessor timestamp_column: String + + attr_accessor typename: :DescribeMetric + + def initialize: ( + breakdownable_columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug?, + engine: String, + filterable_columns: ::Array[String], + metric: String, + node: String, + sql: String?, + supported_engines: ::Array[String], + timestamp_column: String, + ?typename: :DescribeMetric + ) -> void + + def to_hash: -> { + breakdownable_columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug?, + engine: String, + filterable_columns: ::Array[String], + metric: String, + node: String, + sql: String?, + supported_engines: ::Array[String], + timestamp_column: String, + typename: :DescribeMetric + } + + type debug = { request_id: String? } + + class Debug < WhopSDK::Internal::Type::BaseModel + attr_accessor request_id: String? + + def initialize: (request_id: String?) -> void + + def to_hash: -> { request_id: String? } + end + end + + type describe_view = + { + associations: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeView::Association], + columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeView::Debug?, + engine: String, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeView::Metric], + model: String, + resource: String, + sample: ::Array[::Hash[Symbol, top]]?, + sortable_columns: ::Array[String], + typename: :DescribeView, + view: String + } + + class DescribeView < WhopSDK::Internal::Type::BaseModel + attr_accessor associations: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeView::Association] + + attr_accessor columns: ::Array[String] + + attr_accessor debug: WhopSDK::Models::StatDescribeResponse::DescribeView::Debug? + + attr_accessor engine: String + + attr_accessor metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeView::Metric] + + attr_accessor model: String + + attr_accessor resource: String + + attr_accessor sample: ::Array[::Hash[Symbol, top]]? + + attr_accessor sortable_columns: ::Array[String] + + attr_accessor typename: :DescribeView + + attr_accessor view: String + + def initialize: ( + associations: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeView::Association], + columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeView::Debug?, + engine: String, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeView::Metric], + model: String, + resource: String, + sample: ::Array[::Hash[Symbol, top]]?, + sortable_columns: ::Array[String], + view: String, + ?typename: :DescribeView + ) -> void + + def to_hash: -> { + associations: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeView::Association], + columns: ::Array[String], + debug: WhopSDK::Models::StatDescribeResponse::DescribeView::Debug?, + engine: String, + metrics: ::Array[WhopSDK::Models::StatDescribeResponse::DescribeView::Metric], + model: String, + resource: String, + sample: ::Array[::Hash[Symbol, top]]?, + sortable_columns: ::Array[String], + typename: :DescribeView, + view: String + } + + type association = + { + event_name: String?, + model: String?, + name: String, + path: String?, + type: String + } + + class Association < WhopSDK::Internal::Type::BaseModel + attr_accessor event_name: String? + + attr_accessor model: String? + + attr_accessor name: String + + attr_accessor path: String? + + attr_accessor type: String + + def initialize: ( + event_name: String?, + model: String?, + name: String, + path: String?, + type: String + ) -> void + + def to_hash: -> { + event_name: String?, + model: String?, + name: String, + path: String?, + type: String + } + end + + type debug = { request_id: String? } + + class Debug < WhopSDK::Internal::Type::BaseModel + attr_accessor request_id: String? + + def initialize: (request_id: String?) -> void + + def to_hash: -> { request_id: String? } + end + + type metric = + { + name: String, + node_path: String, + supported_engines: ::Array[String] + } + + class Metric < WhopSDK::Internal::Type::BaseModel + attr_accessor name: String + + attr_accessor node_path: String + + attr_accessor supported_engines: ::Array[String] + + def initialize: ( + name: String, + node_path: String, + supported_engines: ::Array[String] + ) -> void + + def to_hash: -> { + name: String, + node_path: String, + supported_engines: ::Array[String] + } + end + end + + def self?.variants: -> ::Array[WhopSDK::Models::stat_describe_response] + end + end +end diff --git a/sig/whop_sdk/models/stat_query_metric_params.rbs b/sig/whop_sdk/models/stat_query_metric_params.rbs new file mode 100644 index 00000000..2e19b46e --- /dev/null +++ b/sig/whop_sdk/models/stat_query_metric_params.rbs @@ -0,0 +1,66 @@ +module WhopSDK + module Models + type stat_query_metric_params = + { + resource: String, + breakdowns: ::Array[String]?, + company_id: String?, + filters: ::Hash[Symbol, top]?, + from: Time?, + granularity: String?, + time_zone: String?, + to: Time?, + user_id: String? + } + & WhopSDK::Internal::Type::request_parameters + + class StatQueryMetricParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor resource: String + + attr_accessor breakdowns: ::Array[String]? + + attr_accessor company_id: String? + + attr_accessor filters: ::Hash[Symbol, top]? + + attr_accessor from: Time? + + attr_accessor granularity: String? + + attr_accessor time_zone: String? + + attr_accessor to: Time? + + attr_accessor user_id: String? + + def initialize: ( + resource: String, + ?breakdowns: ::Array[String]?, + ?company_id: String?, + ?filters: ::Hash[Symbol, top]?, + ?from: Time?, + ?granularity: String?, + ?time_zone: String?, + ?to: Time?, + ?user_id: String?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + resource: String, + breakdowns: ::Array[String]?, + company_id: String?, + filters: ::Hash[Symbol, top]?, + from: Time?, + granularity: String?, + time_zone: String?, + to: Time?, + user_id: String?, + request_options: WhopSDK::RequestOptions + } + end + end +end diff --git a/sig/whop_sdk/models/stat_query_metric_response.rbs b/sig/whop_sdk/models/stat_query_metric_response.rbs new file mode 100644 index 00000000..c2d906db --- /dev/null +++ b/sig/whop_sdk/models/stat_query_metric_response.rbs @@ -0,0 +1,73 @@ +module WhopSDK + module Models + type stat_query_metric_response = + { + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatQueryMetricResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatQueryMetricResponse::Pagination?, + typename: :Result + } + + class StatQueryMetricResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor columns: ::Array[String]? + + attr_accessor data: ::Array[::Hash[Symbol, top]]? + + attr_accessor debug: WhopSDK::Models::StatQueryMetricResponse::Debug? + + attr_accessor node: String? + + attr_accessor pagination: WhopSDK::Models::StatQueryMetricResponse::Pagination? + + attr_accessor typename: :Result + + def initialize: ( + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatQueryMetricResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatQueryMetricResponse::Pagination?, + ?typename: :Result + ) -> void + + def to_hash: -> { + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatQueryMetricResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatQueryMetricResponse::Pagination?, + typename: :Result + } + + type debug = { engine: String?, request_id: String?, sql: String? } + + class Debug < WhopSDK::Internal::Type::BaseModel + attr_accessor engine: String? + + attr_accessor request_id: String? + + attr_accessor sql: String? + + def initialize: ( + engine: String?, + request_id: String?, + sql: String? + ) -> void + + def to_hash: -> { engine: String?, request_id: String?, sql: String? } + end + + type pagination = { next_cursor: String? } + + class Pagination < WhopSDK::Internal::Type::BaseModel + attr_accessor next_cursor: String? + + def initialize: (next_cursor: String?) -> void + + def to_hash: -> { next_cursor: String? } + end + end + end +end diff --git a/sig/whop_sdk/models/stat_query_raw_params.rbs b/sig/whop_sdk/models/stat_query_raw_params.rbs new file mode 100644 index 00000000..865286fe --- /dev/null +++ b/sig/whop_sdk/models/stat_query_raw_params.rbs @@ -0,0 +1,66 @@ +module WhopSDK + module Models + type stat_query_raw_params = + { + resource: String, + company_id: String?, + cursor: String?, + from: Time?, + limit: Integer?, + sort: String?, + sort_direction: WhopSDK::Models::direction?, + to: Time?, + user_id: String? + } + & WhopSDK::Internal::Type::request_parameters + + class StatQueryRawParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor resource: String + + attr_accessor company_id: String? + + attr_accessor cursor: String? + + attr_accessor from: Time? + + attr_accessor limit: Integer? + + attr_accessor sort: String? + + attr_accessor sort_direction: WhopSDK::Models::direction? + + attr_accessor to: Time? + + attr_accessor user_id: String? + + def initialize: ( + resource: String, + ?company_id: String?, + ?cursor: String?, + ?from: Time?, + ?limit: Integer?, + ?sort: String?, + ?sort_direction: WhopSDK::Models::direction?, + ?to: Time?, + ?user_id: String?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + resource: String, + company_id: String?, + cursor: String?, + from: Time?, + limit: Integer?, + sort: String?, + sort_direction: WhopSDK::Models::direction?, + to: Time?, + user_id: String?, + request_options: WhopSDK::RequestOptions + } + end + end +end diff --git a/sig/whop_sdk/models/stat_query_raw_response.rbs b/sig/whop_sdk/models/stat_query_raw_response.rbs new file mode 100644 index 00000000..37725d16 --- /dev/null +++ b/sig/whop_sdk/models/stat_query_raw_response.rbs @@ -0,0 +1,68 @@ +module WhopSDK + module Models + type stat_query_raw_response = + { + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatQueryRawResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatQueryRawResponse::Pagination? + } + + class StatQueryRawResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor columns: ::Array[String]? + + attr_accessor data: ::Array[::Hash[Symbol, top]]? + + attr_accessor debug: WhopSDK::Models::StatQueryRawResponse::Debug? + + attr_accessor node: String? + + attr_accessor pagination: WhopSDK::Models::StatQueryRawResponse::Pagination? + + def initialize: ( + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatQueryRawResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatQueryRawResponse::Pagination? + ) -> void + + def to_hash: -> { + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatQueryRawResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatQueryRawResponse::Pagination? + } + + type debug = { engine: String?, request_id: String?, sql: String? } + + class Debug < WhopSDK::Internal::Type::BaseModel + attr_accessor engine: String? + + attr_accessor request_id: String? + + attr_accessor sql: String? + + def initialize: ( + engine: String?, + request_id: String?, + sql: String? + ) -> void + + def to_hash: -> { engine: String?, request_id: String?, sql: String? } + end + + type pagination = { next_cursor: String? } + + class Pagination < WhopSDK::Internal::Type::BaseModel + attr_accessor next_cursor: String? + + def initialize: (next_cursor: String?) -> void + + def to_hash: -> { next_cursor: String? } + end + end + end +end diff --git a/sig/whop_sdk/models/stat_run_sql_params.rbs b/sig/whop_sdk/models/stat_run_sql_params.rbs new file mode 100644 index 00000000..6c5fec69 --- /dev/null +++ b/sig/whop_sdk/models/stat_run_sql_params.rbs @@ -0,0 +1,71 @@ +module WhopSDK + module Models + type stat_run_sql_params = + { + resource: String, + sql: String, + company_id: String?, + cursor: String?, + from: Time?, + limit: Integer?, + sort: String?, + sort_direction: WhopSDK::Models::direction?, + to: Time?, + user_id: String? + } + & WhopSDK::Internal::Type::request_parameters + + class StatRunSqlParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor resource: String + + attr_accessor sql: String + + attr_accessor company_id: String? + + attr_accessor cursor: String? + + attr_accessor from: Time? + + attr_accessor limit: Integer? + + attr_accessor sort: String? + + attr_accessor sort_direction: WhopSDK::Models::direction? + + attr_accessor to: Time? + + attr_accessor user_id: String? + + def initialize: ( + resource: String, + sql: String, + ?company_id: String?, + ?cursor: String?, + ?from: Time?, + ?limit: Integer?, + ?sort: String?, + ?sort_direction: WhopSDK::Models::direction?, + ?to: Time?, + ?user_id: String?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + resource: String, + sql: String, + company_id: String?, + cursor: String?, + from: Time?, + limit: Integer?, + sort: String?, + sort_direction: WhopSDK::Models::direction?, + to: Time?, + user_id: String?, + request_options: WhopSDK::RequestOptions + } + end + end +end diff --git a/sig/whop_sdk/models/stat_run_sql_response.rbs b/sig/whop_sdk/models/stat_run_sql_response.rbs new file mode 100644 index 00000000..94027612 --- /dev/null +++ b/sig/whop_sdk/models/stat_run_sql_response.rbs @@ -0,0 +1,73 @@ +module WhopSDK + module Models + type stat_run_sql_response = + { + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatRunSqlResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatRunSqlResponse::Pagination?, + typename: :Result + } + + class StatRunSqlResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor columns: ::Array[String]? + + attr_accessor data: ::Array[::Hash[Symbol, top]]? + + attr_accessor debug: WhopSDK::Models::StatRunSqlResponse::Debug? + + attr_accessor node: String? + + attr_accessor pagination: WhopSDK::Models::StatRunSqlResponse::Pagination? + + attr_accessor typename: :Result + + def initialize: ( + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatRunSqlResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatRunSqlResponse::Pagination?, + ?typename: :Result + ) -> void + + def to_hash: -> { + columns: ::Array[String]?, + data: ::Array[::Hash[Symbol, top]]?, + debug: WhopSDK::Models::StatRunSqlResponse::Debug?, + node: String?, + pagination: WhopSDK::Models::StatRunSqlResponse::Pagination?, + typename: :Result + } + + type debug = { engine: String?, request_id: String?, sql: String? } + + class Debug < WhopSDK::Internal::Type::BaseModel + attr_accessor engine: String? + + attr_accessor request_id: String? + + attr_accessor sql: String? + + def initialize: ( + engine: String?, + request_id: String?, + sql: String? + ) -> void + + def to_hash: -> { engine: String?, request_id: String?, sql: String? } + end + + type pagination = { next_cursor: String? } + + class Pagination < WhopSDK::Internal::Type::BaseModel + attr_accessor next_cursor: String? + + def initialize: (next_cursor: String?) -> void + + def to_hash: -> { next_cursor: String? } + end + end + end +end diff --git a/sig/whop_sdk/models/support_channel_list_params.rbs b/sig/whop_sdk/models/support_channel_list_params.rbs index e8ac0b8a..9679c4ce 100644 --- a/sig/whop_sdk/models/support_channel_list_params.rbs +++ b/sig/whop_sdk/models/support_channel_list_params.rbs @@ -2,14 +2,15 @@ module WhopSDK module Models type support_channel_list_params = { - company_id: String, after: String?, before: String?, + company_id: String?, direction: WhopSDK::Models::direction?, first: Integer?, last: Integer?, open_: bool?, - order: WhopSDK::Models::SupportChannelListParams::order? + order: WhopSDK::Models::SupportChannelListParams::order?, + view: WhopSDK::Models::SupportChannelListParams::view? } & WhopSDK::Internal::Type::request_parameters @@ -17,12 +18,12 @@ module WhopSDK extend WhopSDK::Internal::Type::RequestParameters::Converter include WhopSDK::Internal::Type::RequestParameters - attr_accessor company_id: String - attr_accessor after: String? attr_accessor before: String? + attr_accessor company_id: String? + attr_accessor direction: WhopSDK::Models::direction? attr_accessor first: Integer? @@ -33,27 +34,31 @@ module WhopSDK attr_accessor order: WhopSDK::Models::SupportChannelListParams::order? + attr_accessor view: WhopSDK::Models::SupportChannelListParams::view? + def initialize: ( - company_id: String, ?after: String?, ?before: String?, + ?company_id: String?, ?direction: WhopSDK::Models::direction?, ?first: Integer?, ?last: Integer?, ?open_: bool?, ?order: WhopSDK::Models::SupportChannelListParams::order?, + ?view: WhopSDK::Models::SupportChannelListParams::view?, ?request_options: WhopSDK::request_opts ) -> void def to_hash: -> { - company_id: String, after: String?, before: String?, + company_id: String?, direction: WhopSDK::Models::direction?, first: Integer?, last: Integer?, open_: bool?, order: WhopSDK::Models::SupportChannelListParams::order?, + view: WhopSDK::Models::SupportChannelListParams::view?, request_options: WhopSDK::RequestOptions } @@ -67,6 +72,18 @@ module WhopSDK def self?.values: -> ::Array[WhopSDK::Models::SupportChannelListParams::order] end + + type view = :all | :admin | :customer + + module View + extend WhopSDK::Internal::Type::Enum + + ALL: :all + ADMIN: :admin + CUSTOMER: :customer + + def self?.values: -> ::Array[WhopSDK::Models::SupportChannelListParams::view] + end end end end diff --git a/sig/whop_sdk/resources/ad_campaigns.rbs b/sig/whop_sdk/resources/ad_campaigns.rbs new file mode 100644 index 00000000..0a93fec3 --- /dev/null +++ b/sig/whop_sdk/resources/ad_campaigns.rbs @@ -0,0 +1,62 @@ +module WhopSDK + module Resources + class AdCampaigns + def create: ( + company_id: String, + config: WhopSDK::AdCampaignCreateParams::Config, + platform: WhopSDK::Models::AdCampaignCreateParams::platform, + title: String, + ?ad_creative_set_ids: ::Array[String]?, + ?budget: Float?, + ?budget_type: WhopSDK::Models::AdCampaignCreateParams::budget_type?, + ?daily_budget: Float?, + ?product_id: String?, + ?target_country_codes: ::Array[String]?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdCampaignCreateResponse + + def retrieve: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdCampaignRetrieveResponse + + def update: ( + String id, + ?ad_creative_set_ids: ::Array[String]?, + ?budget: Float?, + ?budget_type: WhopSDK::Models::AdCampaignUpdateParams::budget_type?, + ?config: WhopSDK::AdCampaignUpdateParams::Config?, + ?daily_budget: Float?, + ?product_id: String?, + ?target_country_codes: ::Array[String]?, + ?title: String?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdCampaignUpdateResponse + + def list: ( + company_id: String, + ?after: String?, + ?before: String?, + ?created_after: Time?, + ?created_before: Time?, + ?first: Integer?, + ?last: Integer?, + ?query: String?, + ?status: WhopSDK::Models::AdCampaignListParams::status?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::AdCampaignListResponse] + + def pause: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdCampaignPauseResponse + + def unpause: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdCampaignUnpauseResponse + + def initialize: (client: WhopSDK::Client) -> void + end + end +end diff --git a/sig/whop_sdk/resources/ad_groups.rbs b/sig/whop_sdk/resources/ad_groups.rbs new file mode 100644 index 00000000..7bc1aea6 --- /dev/null +++ b/sig/whop_sdk/resources/ad_groups.rbs @@ -0,0 +1,52 @@ +module WhopSDK + module Resources + class AdGroups + def create: ( + campaign_id: String, + ?budget: Float?, + ?budget_type: WhopSDK::Models::AdGroupCreateParams::budget_type?, + ?config: WhopSDK::AdGroupCreateParams::Config?, + ?daily_budget: Float?, + ?name: String?, + ?platform_config: WhopSDK::AdGroupCreateParams::PlatformConfig?, + ?status: WhopSDK::Models::AdGroupCreateParams::status?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdGroupCreateResponse + + def retrieve: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdGroupRetrieveResponse + + def update: ( + String id, + ?budget: Float?, + ?budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type?, + ?config: WhopSDK::AdGroupUpdateParams::Config?, + ?daily_budget: Float?, + ?name: String?, + ?platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig?, + ?status: WhopSDK::Models::AdGroupUpdateParams::status?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdGroupUpdateResponse + + def list: ( + ?after: String?, + ?before: String?, + ?campaign_id: String?, + ?company_id: String?, + ?created_after: Time?, + ?created_before: Time?, + ?first: Integer?, + ?last: Integer?, + ?query: String?, + ?status: WhopSDK::Models::AdGroupListParams::status?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::AdGroupListResponse] + + def delete: (String id, ?request_options: WhopSDK::request_opts) -> bool + + def initialize: (client: WhopSDK::Client) -> void + end + end +end diff --git a/sig/whop_sdk/resources/ads.rbs b/sig/whop_sdk/resources/ads.rbs new file mode 100644 index 00000000..780fe643 --- /dev/null +++ b/sig/whop_sdk/resources/ads.rbs @@ -0,0 +1,36 @@ +module WhopSDK + module Resources + class Ads + def create: ( + ad_group_id: String, + ?creative_set_id: String?, + ?existing_instagram_media_id: String?, + ?existing_post_id: String?, + ?platform_config: WhopSDK::AdCreateParams::PlatformConfig?, + ?status: WhopSDK::Models::AdCreateParams::status?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdCreateResponse + + def retrieve: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::AdRetrieveResponse + + def list: ( + ?ad_group_id: String?, + ?after: String?, + ?before: String?, + ?campaign_id: String?, + ?company_id: String?, + ?created_after: Time?, + ?created_before: Time?, + ?first: Integer?, + ?last: Integer?, + ?status: WhopSDK::Models::AdListParams::status?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::AdListResponse] + + def initialize: (client: WhopSDK::Client) -> void + end + end +end diff --git a/sig/whop_sdk/resources/bounties.rbs b/sig/whop_sdk/resources/bounties.rbs new file mode 100644 index 00000000..e7d4c869 --- /dev/null +++ b/sig/whop_sdk/resources/bounties.rbs @@ -0,0 +1,35 @@ +module WhopSDK + module Resources + class Bounties + def create: ( + base_unit_amount: Float, + currency: WhopSDK::Models::currency, + description: String, + title: String, + ?accepted_submissions_limit: Integer?, + ?allowed_country_codes: ::Array[String]?, + ?experience_id: String?, + ?origin_account_id: String?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::BountyCreateResponse + + def retrieve: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::BountyRetrieveResponse + + def list: ( + ?after: String?, + ?before: String?, + ?direction: WhopSDK::Models::direction?, + ?experience_id: String?, + ?first: Integer?, + ?last: Integer?, + ?status: WhopSDK::Models::BountyListParams::status?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::BountyListResponse] + + def initialize: (client: WhopSDK::Client) -> void + end + end +end diff --git a/sig/whop_sdk/resources/companies.rbs b/sig/whop_sdk/resources/companies.rbs index c380483b..62de7f60 100644 --- a/sig/whop_sdk/resources/companies.rbs +++ b/sig/whop_sdk/resources/companies.rbs @@ -45,6 +45,15 @@ module WhopSDK ?request_options: WhopSDK::request_opts ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::CompanyListResponse] + def create_api_key: ( + String parent_company_id, + child_company_id: String, + ?name: String?, + ?permissions: ::Array[WhopSDK::CompanyCreateAPIKeyParams::Permission]?, + ?role: WhopSDK::Models::CompanyCreateAPIKeyParams::role?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::CompanyCreateAPIKeyResponse + def initialize: (client: WhopSDK::Client) -> void end end diff --git a/sig/whop_sdk/resources/conversions.rbs b/sig/whop_sdk/resources/conversions.rbs new file mode 100644 index 00000000..2caaf39f --- /dev/null +++ b/sig/whop_sdk/resources/conversions.rbs @@ -0,0 +1,25 @@ +module WhopSDK + module Resources + class Conversions + def create: ( + company_id: String, + event_name: WhopSDK::Models::ConversionCreateParams::event_name, + ?action_source: WhopSDK::Models::ConversionCreateParams::action_source?, + ?context: WhopSDK::ConversionCreateParams::Context?, + ?currency: WhopSDK::Models::currency?, + ?custom_name: String?, + ?event_id: String?, + ?event_time: Time?, + ?plan_id: String?, + ?product_id: String?, + ?referrer_url: String?, + ?url: String?, + ?user: WhopSDK::ConversionCreateParams::User?, + ?value: Float?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::ConversionCreateResponse + + def initialize: (client: WhopSDK::Client) -> void + end + end +end diff --git a/sig/whop_sdk/resources/files.rbs b/sig/whop_sdk/resources/files.rbs index cf1a0445..c5daef55 100644 --- a/sig/whop_sdk/resources/files.rbs +++ b/sig/whop_sdk/resources/files.rbs @@ -3,6 +3,7 @@ module WhopSDK class Files def create: ( filename: String, + ?visibility: WhopSDK::Models::FileCreateParams::visibility?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Models::FileCreateResponse diff --git a/sig/whop_sdk/resources/forum_posts.rbs b/sig/whop_sdk/resources/forum_posts.rbs index e59ce0ed..aab884ea 100644 --- a/sig/whop_sdk/resources/forum_posts.rbs +++ b/sig/whop_sdk/resources/forum_posts.rbs @@ -38,6 +38,7 @@ module WhopSDK ?after: String?, ?before: String?, ?first: Integer?, + ?include_bounty_anchors: bool?, ?last: Integer?, ?parent_id: String?, ?pinned: bool?, diff --git a/sig/whop_sdk/resources/plans.rbs b/sig/whop_sdk/resources/plans.rbs index 8d57929c..f5019699 100644 --- a/sig/whop_sdk/resources/plans.rbs +++ b/sig/whop_sdk/resources/plans.rbs @@ -4,6 +4,7 @@ module WhopSDK def create: ( company_id: String, product_id: String, + ?adaptive_pricing_enabled: bool?, ?billing_period: Integer?, ?checkout_styling: WhopSDK::PlanCreateParams::CheckoutStyling?, ?currency: WhopSDK::Models::currency?, @@ -35,6 +36,7 @@ module WhopSDK def update: ( String id, + ?adaptive_pricing_enabled: bool?, ?billing_period: Integer?, ?checkout_styling: WhopSDK::PlanUpdateParams::CheckoutStyling?, ?currency: WhopSDK::Models::currency?, diff --git a/sig/whop_sdk/resources/stats.rbs b/sig/whop_sdk/resources/stats.rbs new file mode 100644 index 00000000..bed04397 --- /dev/null +++ b/sig/whop_sdk/resources/stats.rbs @@ -0,0 +1,54 @@ +module WhopSDK + module Resources + class Stats + def describe: ( + ?company_id: String?, + ?resource: String?, + ?user_id: String?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::stat_describe_response? + + def query_metric: ( + resource: String, + ?breakdowns: ::Array[String]?, + ?company_id: String?, + ?filters: ::Hash[Symbol, top]?, + ?from: Time?, + ?granularity: String?, + ?time_zone: String?, + ?to: Time?, + ?user_id: String?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::StatQueryMetricResponse + + def query_raw: ( + resource: String, + ?company_id: String?, + ?cursor: String?, + ?from: Time?, + ?limit: Integer?, + ?sort: String?, + ?sort_direction: WhopSDK::Models::direction?, + ?to: Time?, + ?user_id: String?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::StatQueryRawResponse + + def run_sql: ( + resource: String, + sql: String, + ?company_id: String?, + ?cursor: String?, + ?from: Time?, + ?limit: Integer?, + ?sort: String?, + ?sort_direction: WhopSDK::Models::direction?, + ?to: Time?, + ?user_id: String?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::StatRunSqlResponse + + def initialize: (client: WhopSDK::Client) -> void + end + end +end diff --git a/sig/whop_sdk/resources/support_channels.rbs b/sig/whop_sdk/resources/support_channels.rbs index 193bb93e..e8081699 100644 --- a/sig/whop_sdk/resources/support_channels.rbs +++ b/sig/whop_sdk/resources/support_channels.rbs @@ -14,14 +14,15 @@ module WhopSDK ) -> WhopSDK::SupportChannel def list: ( - company_id: String, ?after: String?, ?before: String?, + ?company_id: String?, ?direction: WhopSDK::Models::direction?, ?first: Integer?, ?last: Integer?, ?open_: bool?, ?order: WhopSDK::Models::SupportChannelListParams::order?, + ?view: WhopSDK::Models::SupportChannelListParams::view?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::SupportChannelListResponse] diff --git a/test/whop_sdk/resources/ad_campaigns_test.rb b/test/whop_sdk/resources/ad_campaigns_test.rb new file mode 100644 index 00000000..b688eb46 --- /dev/null +++ b/test/whop_sdk/resources/ad_campaigns_test.rb @@ -0,0 +1,243 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class WhopSDK::Test::Resources::AdCampaignsTest < WhopSDK::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = + @whop.ad_campaigns.create(company_id: "biz_xxxxxxxxxxxxxx", config: {}, platform: :meta, title: "title") + + assert_pattern do + response => WhopSDK::Models::AdCampaignCreateResponse + end + + assert_pattern do + response => { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignCreateResponse::BillingLedgerAccount | nil, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignCreateResponse::Config | nil, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignCreateResponse::CreatedByUser, + daily_budget: Float | nil, + impressions_count: Integer, + paused_until: Time | nil, + payment_method: WhopSDK::Models::AdCampaignCreateResponse::PaymentMethod, + platform: WhopSDK::Models::AdCampaignCreateResponse::Platform | nil, + product: WhopSDK::Models::AdCampaignCreateResponse::Product | nil, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignCreateResponse::Status, + target_country_codes: ^(WhopSDK::Internal::Type::ArrayOf[String]), + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + end + end + + def test_retrieve + skip("Mock server tests are disabled") + + response = @whop.ad_campaigns.retrieve("adcamp_xxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::AdCampaignRetrieveResponse + end + + assert_pattern do + response => { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignRetrieveResponse::BillingLedgerAccount | nil, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignRetrieveResponse::Config | nil, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, + daily_budget: Float | nil, + impressions_count: Integer, + paused_until: Time | nil, + payment_method: WhopSDK::Models::AdCampaignRetrieveResponse::PaymentMethod, + platform: WhopSDK::Models::AdCampaignRetrieveResponse::Platform | nil, + product: WhopSDK::Models::AdCampaignRetrieveResponse::Product | nil, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignRetrieveResponse::Status, + target_country_codes: ^(WhopSDK::Internal::Type::ArrayOf[String]), + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + end + end + + def test_update + skip("Mock server tests are disabled") + + response = @whop.ad_campaigns.update("adcamp_xxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::AdCampaignUpdateResponse + end + + assert_pattern do + response => { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignUpdateResponse::BillingLedgerAccount | nil, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignUpdateResponse::Config | nil, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, + daily_budget: Float | nil, + impressions_count: Integer, + paused_until: Time | nil, + payment_method: WhopSDK::Models::AdCampaignUpdateResponse::PaymentMethod, + platform: WhopSDK::Models::AdCampaignUpdateResponse::Platform | nil, + product: WhopSDK::Models::AdCampaignUpdateResponse::Product | nil, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUpdateResponse::Status, + target_country_codes: ^(WhopSDK::Internal::Type::ArrayOf[String]), + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + end + end + + def test_list_required_params + skip("Mock server tests are disabled") + + response = @whop.ad_campaigns.list(company_id: "biz_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => WhopSDK::Models::AdCampaignListResponse + end + + assert_pattern do + row => { + id: String, + available_budget: Float, + clicks_count: Integer, + created_at: Time, + daily_budget: Float | nil, + impressions_count: Integer, + paused_until: Time | nil, + platform: WhopSDK::Models::AdCampaignListResponse::Platform | nil, + product: WhopSDK::Models::AdCampaignListResponse::Product | nil, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignListResponse::Status, + target_country_codes: ^(WhopSDK::Internal::Type::ArrayOf[String]), + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + end + end + + def test_pause + skip("Mock server tests are disabled") + + response = @whop.ad_campaigns.pause("adcamp_xxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::AdCampaignPauseResponse + end + + assert_pattern do + response => { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignPauseResponse::BillingLedgerAccount | nil, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignPauseResponse::Config | nil, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, + daily_budget: Float | nil, + impressions_count: Integer, + paused_until: Time | nil, + payment_method: WhopSDK::Models::AdCampaignPauseResponse::PaymentMethod, + platform: WhopSDK::Models::AdCampaignPauseResponse::Platform | nil, + product: WhopSDK::Models::AdCampaignPauseResponse::Product | nil, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignPauseResponse::Status, + target_country_codes: ^(WhopSDK::Internal::Type::ArrayOf[String]), + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + end + end + + def test_unpause + skip("Mock server tests are disabled") + + response = @whop.ad_campaigns.unpause("adcamp_xxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::AdCampaignUnpauseResponse + end + + assert_pattern do + response => { + id: String, + available_budget: Float, + billing_ledger_account: WhopSDK::Models::AdCampaignUnpauseResponse::BillingLedgerAccount | nil, + clicks_count: Integer, + config: WhopSDK::Models::AdCampaignUnpauseResponse::Config | nil, + created_at: Time, + created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, + daily_budget: Float | nil, + impressions_count: Integer, + paused_until: Time | nil, + payment_method: WhopSDK::Models::AdCampaignUnpauseResponse::PaymentMethod, + platform: WhopSDK::Models::AdCampaignUnpauseResponse::Platform | nil, + product: WhopSDK::Models::AdCampaignUnpauseResponse::Product | nil, + purchases_count: Integer, + remaining_balance: Float, + return_on_ad_spend: Float, + revenue: Float, + status: WhopSDK::Models::AdCampaignUnpauseResponse::Status, + target_country_codes: ^(WhopSDK::Internal::Type::ArrayOf[String]), + title: String, + todays_spend: Float, + total_credits: Float, + total_spend: Float, + updated_at: Time + } + end + end +end diff --git a/test/whop_sdk/resources/ad_groups_test.rb b/test/whop_sdk/resources/ad_groups_test.rb new file mode 100644 index 00000000..be7312a8 --- /dev/null +++ b/test/whop_sdk/resources/ad_groups_test.rb @@ -0,0 +1,117 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class WhopSDK::Test::Resources::AdGroupsTest < WhopSDK::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = @whop.ad_groups.create(campaign_id: "campaign_id") + + assert_pattern do + response => WhopSDK::Models::AdGroupCreateResponse + end + + assert_pattern do + response => { + id: String, + ad_campaign: WhopSDK::Models::AdGroupCreateResponse::AdCampaign, + config: WhopSDK::Models::AdGroupCreateResponse::Config | nil, + created_at: Time, + daily_budget: Float | nil, + name: String | nil, + platform_config: WhopSDK::Models::AdGroupCreateResponse::PlatformConfig, + status: WhopSDK::Models::AdGroupCreateResponse::Status, + updated_at: Time + } + end + end + + def test_retrieve + skip("Mock server tests are disabled") + + response = @whop.ad_groups.retrieve("adgrp_xxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::AdGroupRetrieveResponse + end + + assert_pattern do + response => { + id: String, + ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, + config: WhopSDK::Models::AdGroupRetrieveResponse::Config | nil, + created_at: Time, + daily_budget: Float | nil, + name: String | nil, + platform_config: WhopSDK::Models::AdGroupRetrieveResponse::PlatformConfig, + status: WhopSDK::Models::AdGroupRetrieveResponse::Status, + updated_at: Time + } + end + end + + def test_update + skip("Mock server tests are disabled") + + response = @whop.ad_groups.update("adgrp_xxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::AdGroupUpdateResponse + end + + assert_pattern do + response => { + id: String, + ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, + config: WhopSDK::Models::AdGroupUpdateResponse::Config | nil, + created_at: Time, + daily_budget: Float | nil, + name: String | nil, + platform_config: WhopSDK::Models::AdGroupUpdateResponse::PlatformConfig, + status: WhopSDK::Models::AdGroupUpdateResponse::Status, + updated_at: Time + } + end + end + + def test_list + skip("Mock server tests are disabled") + + response = @whop.ad_groups.list + + assert_pattern do + response => WhopSDK::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => WhopSDK::Models::AdGroupListResponse + end + + assert_pattern do + row => { + id: String, + config: WhopSDK::Models::AdGroupListResponse::Config | nil, + created_at: Time, + daily_budget: Float | nil, + name: String | nil, + platform_config: WhopSDK::Models::AdGroupListResponse::PlatformConfig, + status: WhopSDK::Models::AdGroupListResponse::Status, + updated_at: Time + } + end + end + + def test_delete + skip("Mock server tests are disabled") + + response = @whop.ad_groups.delete("adgrp_xxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Internal::Type::Boolean + end + end +end diff --git a/test/whop_sdk/resources/ads_test.rb b/test/whop_sdk/resources/ads_test.rb new file mode 100644 index 00000000..08ad106b --- /dev/null +++ b/test/whop_sdk/resources/ads_test.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class WhopSDK::Test::Resources::AdsTest < WhopSDK::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = @whop.ads.create(ad_group_id: "ad_group_id") + + assert_pattern do + response => WhopSDK::Models::AdCreateResponse + end + + assert_pattern do + response => { + id: String, + created_at: Time, + external_ad_creative_set: WhopSDK::Models::AdCreateResponse::ExternalAdCreativeSet | nil, + external_ad_group: WhopSDK::Models::AdCreateResponse::ExternalAdGroup, + platform_config: WhopSDK::Models::AdCreateResponse::PlatformConfig, + status: WhopSDK::Models::AdCreateResponse::Status, + updated_at: Time + } + end + end + + def test_retrieve + skip("Mock server tests are disabled") + + response = @whop.ads.retrieve("xad_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::AdRetrieveResponse + end + + assert_pattern do + response => { + id: String, + created_at: Time, + external_ad_creative_set: WhopSDK::Models::AdRetrieveResponse::ExternalAdCreativeSet | nil, + external_ad_group: WhopSDK::Models::AdRetrieveResponse::ExternalAdGroup, + platform_config: WhopSDK::Models::AdRetrieveResponse::PlatformConfig, + status: WhopSDK::Models::AdRetrieveResponse::Status, + updated_at: Time + } + end + end + + def test_list + skip("Mock server tests are disabled") + + response = @whop.ads.list + + assert_pattern do + response => WhopSDK::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => WhopSDK::Models::AdListResponse + end + + assert_pattern do + row => { + id: String, + created_at: Time, + platform_config: WhopSDK::Models::AdListResponse::PlatformConfig, + status: WhopSDK::Models::AdListResponse::Status, + updated_at: Time + } + end + end +end diff --git a/test/whop_sdk/resources/bounties_test.rb b/test/whop_sdk/resources/bounties_test.rb new file mode 100644 index 00000000..c5dd878d --- /dev/null +++ b/test/whop_sdk/resources/bounties_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class WhopSDK::Test::Resources::BountiesTest < WhopSDK::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = + @whop.bounties.create(base_unit_amount: 6.9, currency: :usd, description: "description", title: "title") + + assert_pattern do + response => WhopSDK::Models::BountyCreateResponse + end + + assert_pattern do + response => { + id: String, + bounty_type: WhopSDK::Models::BountyCreateResponse::BountyType, + created_at: Time, + currency: WhopSDK::Currency, + description: String, + status: WhopSDK::Models::BountyCreateResponse::Status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + end + end + + def test_retrieve + skip("Mock server tests are disabled") + + response = @whop.bounties.retrieve("bnty_xxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::BountyRetrieveResponse + end + + assert_pattern do + response => { + id: String, + bounty_type: WhopSDK::Models::BountyRetrieveResponse::BountyType, + created_at: Time, + currency: WhopSDK::Currency, + description: String, + status: WhopSDK::Models::BountyRetrieveResponse::Status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + end + end + + def test_list + skip("Mock server tests are disabled") + + response = @whop.bounties.list + + assert_pattern do + response => WhopSDK::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => WhopSDK::Models::BountyListResponse + end + + assert_pattern do + row => { + id: String, + bounty_type: WhopSDK::Models::BountyListResponse::BountyType, + created_at: Time, + currency: WhopSDK::Currency, + description: String, + status: WhopSDK::Models::BountyListResponse::Status, + title: String, + total_available: Float, + total_paid: Float, + updated_at: Time, + vote_threshold: Integer + } + end + end +end diff --git a/test/whop_sdk/resources/companies_test.rb b/test/whop_sdk/resources/companies_test.rb index e988d99a..36c607cd 100644 --- a/test/whop_sdk/resources/companies_test.rb +++ b/test/whop_sdk/resources/companies_test.rb @@ -134,4 +134,22 @@ def test_list } end end + + def test_create_api_key_required_params + skip("Mock server tests are disabled") + + response = @whop.companies.create_api_key("parent_company_id", child_company_id: "child_company_id") + + assert_pattern do + response => WhopSDK::Models::CompanyCreateAPIKeyResponse + end + + assert_pattern do + response => { + id: String, + name: String | nil, + secret_key: String + } + end + end end diff --git a/test/whop_sdk/resources/conversions_test.rb b/test/whop_sdk/resources/conversions_test.rb new file mode 100644 index 00000000..4a44da1d --- /dev/null +++ b/test/whop_sdk/resources/conversions_test.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class WhopSDK::Test::Resources::ConversionsTest < WhopSDK::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = @whop.conversions.create(company_id: "biz_xxxxxxxxxxxxxx", event_name: :lead) + + assert_pattern do + response => WhopSDK::Models::ConversionCreateResponse + end + + assert_pattern do + response => { + id: String + } + end + end +end diff --git a/test/whop_sdk/resources/files_test.rb b/test/whop_sdk/resources/files_test.rb index 5ea8204b..e75839ae 100644 --- a/test/whop_sdk/resources/files_test.rb +++ b/test/whop_sdk/resources/files_test.rb @@ -21,7 +21,8 @@ def test_create_required_params upload_headers: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, upload_status: WhopSDK::UploadStatus, upload_url: String | nil, - url: String | nil + url: String | nil, + visibility: WhopSDK::Models::FileCreateResponse::Visibility } end end @@ -42,7 +43,8 @@ def test_retrieve filename: String | nil, size: String | nil, upload_status: WhopSDK::UploadStatus, - url: String | nil + url: String | nil, + visibility: WhopSDK::Models::FileRetrieveResponse::Visibility } end end diff --git a/test/whop_sdk/resources/memberships_test.rb b/test/whop_sdk/resources/memberships_test.rb index 893c0c15..0a45475d 100644 --- a/test/whop_sdk/resources/memberships_test.rb +++ b/test/whop_sdk/resources/memberships_test.rb @@ -19,6 +19,7 @@ def test_retrieve cancel_option: WhopSDK::CancelOptions | nil, canceled_at: Time | nil, cancellation_reason: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, @@ -57,6 +58,7 @@ def test_update cancel_option: WhopSDK::CancelOptions | nil, canceled_at: Time | nil, cancellation_reason: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, @@ -102,6 +104,7 @@ def test_list cancel_option: WhopSDK::CancelOptions | nil, canceled_at: Time | nil, cancellation_reason: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Models::MembershipListResponse::Company, created_at: Time, currency: WhopSDK::Currency | nil, @@ -139,6 +142,7 @@ def test_add_free_days_required_params cancel_option: WhopSDK::CancelOptions | nil, canceled_at: Time | nil, cancellation_reason: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, @@ -177,6 +181,7 @@ def test_cancel cancel_option: WhopSDK::CancelOptions | nil, canceled_at: Time | nil, cancellation_reason: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, @@ -215,6 +220,7 @@ def test_pause cancel_option: WhopSDK::CancelOptions | nil, canceled_at: Time | nil, cancellation_reason: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, @@ -253,6 +259,7 @@ def test_resume cancel_option: WhopSDK::CancelOptions | nil, canceled_at: Time | nil, cancellation_reason: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, @@ -291,6 +298,7 @@ def test_uncancel cancel_option: WhopSDK::CancelOptions | nil, canceled_at: Time | nil, cancellation_reason: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, diff --git a/test/whop_sdk/resources/payments_test.rb b/test/whop_sdk/resources/payments_test.rb index 8057250e..15a278cb 100644 --- a/test/whop_sdk/resources/payments_test.rb +++ b/test/whop_sdk/resources/payments_test.rb @@ -30,6 +30,7 @@ def test_create_required_params billing_reason: WhopSDK::BillingReasons | nil, card_brand: WhopSDK::CardBrands | nil, card_last4: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, currency: WhopSDK::Currency | nil, @@ -55,6 +56,9 @@ def test_create_required_params refunded_at: Time | nil, resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, subtotal: Float | nil, @@ -89,6 +93,7 @@ def test_retrieve billing_reason: WhopSDK::BillingReasons | nil, card_brand: WhopSDK::CardBrands | nil, card_last4: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, currency: WhopSDK::Currency | nil, @@ -114,6 +119,9 @@ def test_retrieve refunded_at: Time | nil, resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, subtotal: Float | nil, @@ -155,6 +163,7 @@ def test_list billing_reason: WhopSDK::BillingReasons | nil, card_brand: WhopSDK::CardBrands | nil, card_last4: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Models::PaymentListResponse::Company | nil, created_at: Time, currency: WhopSDK::Currency | nil, @@ -176,6 +185,7 @@ def test_list refunded_amount: Float | nil, refunded_at: Time | nil, retryable: WhopSDK::Internal::Type::Boolean, + settlement_currency: String, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, subtotal: Float | nil, @@ -235,6 +245,7 @@ def test_refund billing_reason: WhopSDK::BillingReasons | nil, card_brand: WhopSDK::CardBrands | nil, card_last4: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, currency: WhopSDK::Currency | nil, @@ -260,6 +271,9 @@ def test_refund refunded_at: Time | nil, resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, subtotal: Float | nil, @@ -294,6 +308,7 @@ def test_retry_ billing_reason: WhopSDK::BillingReasons | nil, card_brand: WhopSDK::CardBrands | nil, card_last4: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, currency: WhopSDK::Currency | nil, @@ -319,6 +334,9 @@ def test_retry_ refunded_at: Time | nil, resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, subtotal: Float | nil, @@ -353,6 +371,7 @@ def test_void billing_reason: WhopSDK::BillingReasons | nil, card_brand: WhopSDK::CardBrands | nil, card_last4: String | nil, + checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, currency: WhopSDK::Currency | nil, @@ -378,6 +397,9 @@ def test_void refunded_at: Time | nil, resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, + settlement_amount: Float, + settlement_currency: String, + settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, subtotal: Float | nil, diff --git a/test/whop_sdk/resources/plans_test.rb b/test/whop_sdk/resources/plans_test.rb index dc835459..bc437f7a 100644 --- a/test/whop_sdk/resources/plans_test.rb +++ b/test/whop_sdk/resources/plans_test.rb @@ -15,6 +15,7 @@ def test_create_required_params assert_pattern do response => { id: String, + adaptive_pricing_enabled: WhopSDK::Internal::Type::Boolean, billing_period: Integer | nil, collect_tax: WhopSDK::Internal::Type::Boolean, company: WhopSDK::Plan::Company | nil, @@ -57,6 +58,7 @@ def test_retrieve assert_pattern do response => { id: String, + adaptive_pricing_enabled: WhopSDK::Internal::Type::Boolean, billing_period: Integer | nil, collect_tax: WhopSDK::Internal::Type::Boolean, company: WhopSDK::Plan::Company | nil, @@ -99,6 +101,7 @@ def test_update assert_pattern do response => { id: String, + adaptive_pricing_enabled: WhopSDK::Internal::Type::Boolean, billing_period: Integer | nil, collect_tax: WhopSDK::Internal::Type::Boolean, company: WhopSDK::Plan::Company | nil, @@ -148,6 +151,7 @@ def test_list_required_params assert_pattern do row => { id: String, + adaptive_pricing_enabled: WhopSDK::Internal::Type::Boolean, billing_period: Integer | nil, company: WhopSDK::Models::PlanListResponse::Company | nil, created_at: Time, diff --git a/test/whop_sdk/resources/stats_test.rb b/test/whop_sdk/resources/stats_test.rb new file mode 100644 index 00000000..dc8c18c2 --- /dev/null +++ b/test/whop_sdk/resources/stats_test.rb @@ -0,0 +1,134 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class WhopSDK::Test::Resources::StatsTest < WhopSDK::Test::ResourceTest + def test_describe + skip("Mock server tests are disabled") + + response = @whop.stats.describe + + assert_pattern do + response => WhopSDK::Models::StatDescribeResponse + end + + assert_pattern do + case response + in WhopSDK::Models::StatDescribeResponse::DescribeRoot + in WhopSDK::Models::StatDescribeResponse::DescribeNode + in WhopSDK::Models::StatDescribeResponse::DescribeMetric + in WhopSDK::Models::StatDescribeResponse::DescribeView + end + end + + assert_pattern do + case response + in { + typename: :DescribeRoot, + debug: WhopSDK::Models::StatDescribeResponse::DescribeRoot::Debug | nil, + metrics: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeRoot::Metric]), + nodes: ^(WhopSDK::Internal::Type::ArrayOf[String]), + views: ^(WhopSDK::Internal::Type::ArrayOf[String]) + } + in { + typename: :DescribeNode, + associations: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeNode::Association]), + columns: ^(WhopSDK::Internal::Type::ArrayOf[String]), + debug: WhopSDK::Models::StatDescribeResponse::DescribeNode::Debug | nil, + engine: String, + metrics: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeNode::Metric]), + node: String, + sample: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]]) | nil, + sortable_columns: ^(WhopSDK::Internal::Type::ArrayOf[String]) + } + in { + typename: :DescribeMetric, + breakdownable_columns: ^(WhopSDK::Internal::Type::ArrayOf[String]), + debug: WhopSDK::Models::StatDescribeResponse::DescribeMetric::Debug | nil, + engine: String, + filterable_columns: ^(WhopSDK::Internal::Type::ArrayOf[String]), + metric: String, + node: String, + sql: String | nil, + supported_engines: ^(WhopSDK::Internal::Type::ArrayOf[String]), + timestamp_column: String + } + in { + typename: :DescribeView, + associations: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeView::Association]), + columns: ^(WhopSDK::Internal::Type::ArrayOf[String]), + debug: WhopSDK::Models::StatDescribeResponse::DescribeView::Debug | nil, + engine: String, + metrics: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::StatDescribeResponse::DescribeView::Metric]), + model: String, + resource: String, + sample: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]]) | nil, + sortable_columns: ^(WhopSDK::Internal::Type::ArrayOf[String]), + view: String + } + end + end + end + + def test_query_metric_required_params + skip("Mock server tests are disabled") + + response = @whop.stats.query_metric(resource: "resource") + + assert_pattern do + response => WhopSDK::Models::StatQueryMetricResponse + end + + assert_pattern do + response => { + columns: ^(WhopSDK::Internal::Type::ArrayOf[String]) | nil, + data: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]]) | nil, + debug: WhopSDK::Models::StatQueryMetricResponse::Debug | nil, + node: String | nil, + pagination: WhopSDK::Models::StatQueryMetricResponse::Pagination | nil, + typename: Symbol + } + end + end + + def test_query_raw_required_params + skip("Mock server tests are disabled") + + response = @whop.stats.query_raw(resource: "resource") + + assert_pattern do + response => WhopSDK::Models::StatQueryRawResponse + end + + assert_pattern do + response => { + columns: ^(WhopSDK::Internal::Type::ArrayOf[String]) | nil, + data: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]]) | nil, + debug: WhopSDK::Models::StatQueryRawResponse::Debug | nil, + node: String | nil, + pagination: WhopSDK::Models::StatQueryRawResponse::Pagination | nil + } + end + end + + def test_run_sql_required_params + skip("Mock server tests are disabled") + + response = @whop.stats.run_sql(resource: "resource", sql: "sql") + + assert_pattern do + response => WhopSDK::Models::StatRunSqlResponse + end + + assert_pattern do + response => { + columns: ^(WhopSDK::Internal::Type::ArrayOf[String]) | nil, + data: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]]) | nil, + debug: WhopSDK::Models::StatRunSqlResponse::Debug | nil, + node: String | nil, + pagination: WhopSDK::Models::StatRunSqlResponse::Pagination | nil, + typename: Symbol + } + end + end +end diff --git a/test/whop_sdk/resources/support_channels_test.rb b/test/whop_sdk/resources/support_channels_test.rb index 06e7d07d..dd1a1de2 100644 --- a/test/whop_sdk/resources/support_channels_test.rb +++ b/test/whop_sdk/resources/support_channels_test.rb @@ -45,10 +45,10 @@ def test_retrieve end end - def test_list_required_params + def test_list skip("Mock server tests are disabled") - response = @whop.support_channels.list(company_id: "biz_xxxxxxxxxxxxxx") + response = @whop.support_channels.list assert_pattern do response => WhopSDK::Internal::CursorPage