diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb69e1a9..34bbcfb5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,9 @@ jobs: github.repository == 'stainless-sdks/whopsdk-ruby' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -39,7 +39,7 @@ jobs: github.repository == 'stainless-sdks/whopsdk-ruby' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -60,9 +60,9 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -76,9 +76,9 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/whopsdk-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 19e24225..b2019079 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 64903345..54364237 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'whopio/whopsdk-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f4cb1d13..3215e6ac 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.39" + ".": "0.0.40" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 88c851eb..a6fb4cab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 212 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc/whopsdk-da82dade0c316b9abd0320bf7b1b5f3472c265106a1c53ffbb78611eacc16617.yml -openapi_spec_hash: 2454acce3b15eaed1c5ad8554c0d4a2e -config_hash: b4bea15093f9a57475d1d98f9b8464ca +configured_endpoints: 216 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc/whopsdk-0a517e45a4fc088cd08c97348a2a4dd104ad6f7e92297505956afc090c7efbfd.yml +openapi_spec_hash: e49941937737b1187930f3c6f15ed019 +config_hash: 64788a41b95ec090d1222da96d7c46d4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d23145d..dae42ca2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.0.40 (2026-05-14) + +Full Changelog: [v0.0.39...v0.0.40](https://github.com/whopio/whopsdk-ruby/compare/v0.0.39...v0.0.40) + +### Features + +* **api:** api update ([01e2807](https://github.com/whopio/whopsdk-ruby/commit/01e280751db982b57caf6f5a2680e8c90794d7e9)) +* **api:** api update ([17f52fd](https://github.com/whopio/whopsdk-ruby/commit/17f52fd0387171da97b95863aab0b4b8d8317582)) +* **api:** api update ([f33cc27](https://github.com/whopio/whopsdk-ruby/commit/f33cc274bcafde974363056d01e173ba1683c148)) +* **api:** api update ([8a9fd84](https://github.com/whopio/whopsdk-ruby/commit/8a9fd847c18e05624163f60ef03859be96fa37dd)) +* **api:** api update ([5fb10c2](https://github.com/whopio/whopsdk-ruby/commit/5fb10c2bbac60a7ef75354b728ff0c6583b7e368)) +* **api:** api update ([10ff857](https://github.com/whopio/whopsdk-ruby/commit/10ff857ddd44449e11db19e0730d6a3528aadb85)) +* **api:** api update ([e100fc6](https://github.com/whopio/whopsdk-ruby/commit/e100fc67294d6df883c15f689f6c58ddb923550f)) +* **api:** api update ([620a58a](https://github.com/whopio/whopsdk-ruby/commit/620a58a463b106b2ab77bab3f72a4c80487c08c9)) +* **api:** manual updates ([a8e3f04](https://github.com/whopio/whopsdk-ruby/commit/a8e3f044db8f1e61a3aaea022f59d1a306625e96)) + + +### Bug Fixes + +* **client:** elide content type header on requests without body ([4c828b8](https://github.com/whopio/whopsdk-ruby/commit/4c828b829520916acc83bc207e99d9e3df2ab7f1)) + ## 0.0.39 (2026-05-12) Full Changelog: [v0.0.38...v0.0.39](https://github.com/whopio/whopsdk-ruby/compare/v0.0.38...v0.0.39) diff --git a/Gemfile.lock b/Gemfile.lock index 23854e88..fc30a211 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - whop_sdk (0.0.39) + whop_sdk (0.0.40) cgi connection_pool standardwebhooks diff --git a/README.md b/README.md index 2ab6e5a9..a8bc85a4 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.39" +gem "whop_sdk", "~> 0.0.40" ``` diff --git a/lib/whop_sdk.rb b/lib/whop_sdk.rb index 71d6b621..31644af6 100644 --- a/lib/whop_sdk.rb +++ b/lib/whop_sdk.rb @@ -60,30 +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" +require_relative "whop_sdk/models/ad_budget_type" +require_relative "whop_sdk/models/ad_campaign" 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_platform" 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_status" 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_group" 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_pause_params" 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_status" +require_relative "whop_sdk/models/ad_group_unpause_params" 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_pause_params" require_relative "whop_sdk/models/ad_report_retrieve_params" require_relative "whop_sdk/models/ad_report_retrieve_response" require_relative "whop_sdk/models/ad_retrieve_params" -require_relative "whop_sdk/models/ad_retrieve_response" +require_relative "whop_sdk/models/ad_unpause_params" require_relative "whop_sdk/models/affiliate" require_relative "whop_sdk/models/affiliate_archive_params" require_relative "whop_sdk/models/affiliate_archive_response" @@ -283,6 +287,7 @@ require_relative "whop_sdk/models/experience_list_response" require_relative "whop_sdk/models/experience_retrieve_params" require_relative "whop_sdk/models/experience_update_params" +require_relative "whop_sdk/models/external_ad_status" require_relative "whop_sdk/models/fee_markup_create_params" require_relative "whop_sdk/models/fee_markup_create_response" require_relative "whop_sdk/models/fee_markup_delete_params" @@ -294,6 +299,7 @@ require_relative "whop_sdk/models/file_create_response" require_relative "whop_sdk/models/file_retrieve_params" require_relative "whop_sdk/models/file_retrieve_response" +require_relative "whop_sdk/models/file_visibility" require_relative "whop_sdk/models/forum" require_relative "whop_sdk/models/forum_list_params" require_relative "whop_sdk/models/forum_list_response" @@ -308,6 +314,7 @@ require_relative "whop_sdk/models/forum_update_params" require_relative "whop_sdk/models/friendly_receipt_status" require_relative "whop_sdk/models/global_affiliate_status" +require_relative "whop_sdk/models/granularities" require_relative "whop_sdk/models/invoice" require_relative "whop_sdk/models/invoice_created_webhook_event" require_relative "whop_sdk/models/invoice_create_params" @@ -460,6 +467,7 @@ require_relative "whop_sdk/models/resolution_center_case_retrieve_response" require_relative "whop_sdk/models/resolution_center_case_status" require_relative "whop_sdk/models/resolution_center_case_updated_webhook_event" +require_relative "whop_sdk/models/result_label_keys" require_relative "whop_sdk/models/review_list_params" require_relative "whop_sdk/models/review_list_response" require_relative "whop_sdk/models/review_retrieve_params" diff --git a/lib/whop_sdk/internal/transport/base_client.rb b/lib/whop_sdk/internal/transport/base_client.rb index f6a31f0d..392a7ebd 100644 --- a/lib/whop_sdk/internal/transport/base_client.rb +++ b/lib/whop_sdk/internal/transport/base_client.rb @@ -306,6 +306,8 @@ def initialize( WhopSDK::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact) end + headers.delete("content-type") if body.nil? + url = WhopSDK::Internal::Util.join_parsed_uri( @base_url_components, {**req, path: path, query: query} diff --git a/lib/whop_sdk/models.rb b/lib/whop_sdk/models.rb index c5b717f9..1d27d251 100644 --- a/lib/whop_sdk/models.rb +++ b/lib/whop_sdk/models.rb @@ -47,30 +47,52 @@ module WhopSDK AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams + Ad = WhopSDK::Models::Ad + + AdBudgetType = WhopSDK::Models::AdBudgetType + + AdCampaign = WhopSDK::Models::AdCampaign + AdCampaignListParams = WhopSDK::Models::AdCampaignListParams AdCampaignPauseParams = WhopSDK::Models::AdCampaignPauseParams + AdCampaignPlatform = WhopSDK::Models::AdCampaignPlatform + AdCampaignRetrieveParams = WhopSDK::Models::AdCampaignRetrieveParams + AdCampaignStatus = WhopSDK::Models::AdCampaignStatus + AdCampaignUnpauseParams = WhopSDK::Models::AdCampaignUnpauseParams AdCampaignUpdateParams = WhopSDK::Models::AdCampaignUpdateParams + AdGroup = WhopSDK::Models::AdGroup + AdGroupDeleteParams = WhopSDK::Models::AdGroupDeleteParams AdGroupListParams = WhopSDK::Models::AdGroupListParams + AdGroupPauseParams = WhopSDK::Models::AdGroupPauseParams + AdGroupRetrieveParams = WhopSDK::Models::AdGroupRetrieveParams + AdGroupStatus = WhopSDK::Models::AdGroupStatus + + AdGroupUnpauseParams = WhopSDK::Models::AdGroupUnpauseParams + AdGroupUpdateParams = WhopSDK::Models::AdGroupUpdateParams AdListParams = WhopSDK::Models::AdListParams + AdPauseParams = WhopSDK::Models::AdPauseParams + AdReportRetrieveParams = WhopSDK::Models::AdReportRetrieveParams AdRetrieveParams = WhopSDK::Models::AdRetrieveParams + AdUnpauseParams = WhopSDK::Models::AdUnpauseParams + Affiliate = WhopSDK::Models::Affiliate AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams @@ -362,6 +384,8 @@ module WhopSDK ExperienceUpdateParams = WhopSDK::Models::ExperienceUpdateParams + ExternalAdStatus = WhopSDK::Models::ExternalAdStatus + FeeMarkupCreateParams = WhopSDK::Models::FeeMarkupCreateParams FeeMarkupDeleteParams = WhopSDK::Models::FeeMarkupDeleteParams @@ -374,6 +398,8 @@ module WhopSDK FileRetrieveParams = WhopSDK::Models::FileRetrieveParams + FileVisibility = WhopSDK::Models::FileVisibility + Forum = WhopSDK::Models::Forum ForumListParams = WhopSDK::Models::ForumListParams @@ -398,6 +424,8 @@ module WhopSDK GlobalAffiliateStatus = WhopSDK::Models::GlobalAffiliateStatus + Granularities = WhopSDK::Models::Granularities + Invoice = WhopSDK::Models::Invoice InvoiceCreatedWebhookEvent = WhopSDK::Models::InvoiceCreatedWebhookEvent @@ -643,6 +671,8 @@ module WhopSDK ResolutionCenterCaseUpdatedWebhookEvent = WhopSDK::Models::ResolutionCenterCaseUpdatedWebhookEvent + ResultLabelKeys = WhopSDK::Models::ResultLabelKeys + ReviewListParams = WhopSDK::Models::ReviewListParams ReviewRetrieveParams = WhopSDK::Models::ReviewRetrieveParams diff --git a/lib/whop_sdk/models/ad_retrieve_response.rb b/lib/whop_sdk/models/ad.rb similarity index 54% rename from lib/whop_sdk/models/ad_retrieve_response.rb rename to lib/whop_sdk/models/ad.rb index b1e23c67..8792f405 100644 --- a/lib/whop_sdk/models/ad_retrieve_response.rb +++ b/lib/whop_sdk/models/ad.rb @@ -3,7 +3,7 @@ module WhopSDK module Models # @see WhopSDK::Resources::Ads#retrieve - class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel + class Ad < WhopSDK::Internal::Type::BaseModel # @!attribute id # The unique identifier for this ad. # @@ -13,14 +13,14 @@ class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @!attribute ad_campaign # The ad campaign this ad belongs to. # - # @return [WhopSDK::Models::AdRetrieveResponse::AdCampaign] - required :ad_campaign, -> { WhopSDK::Models::AdRetrieveResponse::AdCampaign } + # @return [WhopSDK::Models::Ad::AdCampaign] + required :ad_campaign, -> { WhopSDK::Ad::AdCampaign } # @!attribute ad_group # The parent ad group this ad belongs to. # - # @return [WhopSDK::Models::AdRetrieveResponse::AdGroup] - required :ad_group, -> { WhopSDK::Models::AdRetrieveResponse::AdGroup } + # @return [WhopSDK::Models::Ad::AdGroup] + required :ad_group, -> { WhopSDK::Ad::AdGroup } # @!attribute created_at # When the ad was created. @@ -31,14 +31,14 @@ class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @!attribute platform # The external ad platform this ad is running on (e.g., meta, tiktok). # - # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdRetrieveResponse::Platform } + # @return [Symbol, WhopSDK::Models::AdCampaignPlatform] + required :platform, enum: -> { WhopSDK::AdCampaignPlatform } # @!attribute status # Current delivery status of the ad. # - # @return [Symbol, WhopSDK::Models::AdRetrieveResponse::Status] - required :status, enum: -> { WhopSDK::Models::AdRetrieveResponse::Status } + # @return [Symbol, WhopSDK::Models::ExternalAdStatus] + required :status, enum: -> { WhopSDK::ExternalAdStatus } # @!attribute title # The display title of the ad. Falls back to the creative set caption when unset. @@ -57,21 +57,21 @@ class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for this ad. # - # @param ad_campaign [WhopSDK::Models::AdRetrieveResponse::AdCampaign] The ad campaign this ad belongs to. + # @param ad_campaign [WhopSDK::Models::Ad::AdCampaign] The ad campaign this ad belongs to. # - # @param ad_group [WhopSDK::Models::AdRetrieveResponse::AdGroup] The parent ad group this ad belongs to. + # @param ad_group [WhopSDK::Models::Ad::AdGroup] The parent ad group this ad belongs to. # # @param created_at [Time] When the ad was created. # - # @param platform [Symbol, WhopSDK::Models::AdRetrieveResponse::Platform] The external ad platform this ad is running on (e.g., meta, tiktok). + # @param platform [Symbol, WhopSDK::Models::AdCampaignPlatform] The external ad platform this ad is running on (e.g., meta, tiktok). # - # @param status [Symbol, WhopSDK::Models::AdRetrieveResponse::Status] Current delivery status of the ad. + # @param status [Symbol, WhopSDK::Models::ExternalAdStatus] Current delivery status of the ad. # # @param title [String, nil] The display title of the ad. Falls back to the creative set caption when unset. # # @param updated_at [Time] When the ad was last updated. - # @see WhopSDK::Models::AdRetrieveResponse#ad_campaign + # @see WhopSDK::Models::Ad#ad_campaign class AdCampaign < WhopSDK::Internal::Type::BaseModel # @!attribute id # The unique identifier for this ad campaign. @@ -85,7 +85,7 @@ class AdCampaign < WhopSDK::Internal::Type::BaseModel # @param id [String] The unique identifier for this ad campaign. end - # @see WhopSDK::Models::AdRetrieveResponse#ad_group + # @see WhopSDK::Models::Ad#ad_group class AdGroup < WhopSDK::Internal::Type::BaseModel # @!attribute id # The unique identifier for this ad group. @@ -98,36 +98,6 @@ class AdGroup < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for this ad group. end - - # The external ad platform this ad is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdRetrieveResponse#platform - module Platform - extend WhopSDK::Internal::Type::Enum - - META = :meta - TIKTOK = :tiktok - - # @!method self.values - # @return [Array] - end - - # Current delivery 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/ad_budget_type.rb b/lib/whop_sdk/models/ad_budget_type.rb new file mode 100644 index 00000000..2174c20b --- /dev/null +++ b/lib/whop_sdk/models/ad_budget_type.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # The budget type for an ad campaign or ad group. + module AdBudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY = :daily + LIFETIME = :lifetime + + # @!method self.values + # @return [Array] + end + end +end diff --git a/lib/whop_sdk/models/ad_campaign_pause_response.rb b/lib/whop_sdk/models/ad_campaign.rb similarity index 61% rename from lib/whop_sdk/models/ad_campaign_pause_response.rb rename to lib/whop_sdk/models/ad_campaign.rb index 79035a13..69a1158e 100644 --- a/lib/whop_sdk/models/ad_campaign_pause_response.rb +++ b/lib/whop_sdk/models/ad_campaign.rb @@ -2,8 +2,8 @@ module WhopSDK module Models - # @see WhopSDK::Resources::AdCampaigns#pause - class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel + # @see WhopSDK::Resources::AdCampaigns#retrieve + class AdCampaign < WhopSDK::Internal::Type::BaseModel # @!attribute id # The unique identifier for this ad campaign. # @@ -19,8 +19,8 @@ class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel # @!attribute budget_type # The budget type for an ad campaign or ad group. # - # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::BudgetType, nil] - required :budget_type, enum: -> { WhopSDK::Models::AdCampaignPauseResponse::BudgetType }, nil?: true + # @return [Symbol, WhopSDK::Models::AdBudgetType, nil] + required :budget_type, enum: -> { WhopSDK::AdBudgetType }, nil?: true # @!attribute created_at # When the ad campaign was created. @@ -31,27 +31,27 @@ class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel # @!attribute created_by_user # The user who created this ad campaign. # - # @return [WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser] - required :created_by_user, -> { WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser } + # @return [WhopSDK::Models::AdCampaign::CreatedByUser] + required :created_by_user, -> { WhopSDK::AdCampaign::CreatedByUser } # @!attribute meta_config # Meta-specific campaign configuration (objective, budget mode, etc.). Null for # non-Meta campaigns. # - # @return [WhopSDK::Models::AdCampaignPauseResponse::MetaConfig, nil] - required :meta_config, -> { WhopSDK::Models::AdCampaignPauseResponse::MetaConfig }, nil?: true + # @return [WhopSDK::Models::AdCampaign::MetaConfig, nil] + required :meta_config, -> { WhopSDK::AdCampaign::MetaConfig }, nil?: true # @!attribute platform # The external ad platform this campaign is running on (e.g., meta, tiktok). # - # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdCampaignPauseResponse::Platform } + # @return [Symbol, WhopSDK::Models::AdCampaignPlatform] + required :platform, enum: -> { WhopSDK::AdCampaignPlatform } # @!attribute status # Current status of the campaign (active, paused, or inactive). # - # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Status] - required :status, enum: -> { WhopSDK::Models::AdCampaignPauseResponse::Status } + # @return [Symbol, WhopSDK::Models::AdCampaignStatus] + required :status, enum: -> { WhopSDK::AdCampaignStatus } # @!attribute title # The campaign name shown in the Whop dashboard. @@ -73,7 +73,7 @@ class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel # @!method initialize(id:, budget:, budget_type:, created_at:, created_by_user:, meta_config:, platform:, status:, title:, total_spend:, updated_at:) # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AdCampaignPauseResponse} for more details. + # {WhopSDK::Models::AdCampaign} for more details. # # An advertising campaign running on an external platform or within Whop. # @@ -81,17 +81,17 @@ class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel # # @param budget [Float, nil] Total budget in dollars. # - # @param budget_type [Symbol, WhopSDK::Models::AdCampaignPauseResponse::BudgetType, nil] The budget type for an ad campaign or ad group. + # @param budget_type [Symbol, WhopSDK::Models::AdBudgetType, nil] The budget type for an ad campaign or ad group. # # @param created_at [Time] When the ad campaign was created. # - # @param created_by_user [WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser] The user who created this ad campaign. + # @param created_by_user [WhopSDK::Models::AdCampaign::CreatedByUser] The user who created this ad campaign. # - # @param meta_config [WhopSDK::Models::AdCampaignPauseResponse::MetaConfig, nil] Meta-specific campaign configuration (objective, budget mode, etc.). Null for no + # @param meta_config [WhopSDK::Models::AdCampaign::MetaConfig, nil] Meta-specific campaign configuration (objective, budget mode, etc.). Null for no # - # @param platform [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Platform] The external ad platform this campaign is running on (e.g., meta, tiktok). + # @param platform [Symbol, WhopSDK::Models::AdCampaignPlatform] The external ad platform this campaign is running on (e.g., meta, tiktok). # - # @param status [Symbol, WhopSDK::Models::AdCampaignPauseResponse::Status] Current status of the campaign (active, paused, or inactive). + # @param status [Symbol, WhopSDK::Models::AdCampaignStatus] Current status of the campaign (active, paused, or inactive). # # @param title [String] The campaign name shown in the Whop dashboard. # @@ -99,20 +99,7 @@ class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel # # @param updated_at [Time] When the ad campaign was last updated. - # The budget type for an ad campaign or ad group. - # - # @see WhopSDK::Models::AdCampaignPauseResponse#budget_type - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY = :daily - LIFETIME = :lifetime - - # @!method self.values - # @return [Array] - end - - # @see WhopSDK::Models::AdCampaignPauseResponse#created_by_user + # @see WhopSDK::Models::AdCampaign#created_by_user class CreatedByUser < WhopSDK::Internal::Type::BaseModel # @!attribute id # The unique identifier for the user. @@ -142,7 +129,7 @@ class CreatedByUser < WhopSDK::Internal::Type::BaseModel # @param username [String] The user's unique username shown on their public profile. end - # @see WhopSDK::Models::AdCampaignPauseResponse#meta_config + # @see WhopSDK::Models::AdCampaign#meta_config class MetaConfig < WhopSDK::Internal::Type::BaseModel # @!attribute bid_amount # Bid cap amount in cents. Only used when bid_strategy is bid_cap. @@ -153,10 +140,8 @@ class MetaConfig < WhopSDK::Internal::Type::BaseModel # @!attribute bid_strategy # The bidding strategy used to optimize spend for this campaign. # - # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy, nil] - required :bid_strategy, - enum: -> { WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy }, - nil?: true + # @return [Symbol, WhopSDK::Models::AdCampaign::MetaConfig::BidStrategy, nil] + required :bid_strategy, enum: -> { WhopSDK::AdCampaign::MetaConfig::BidStrategy }, nil?: true # @!attribute budget_optimization # Whether campaign budget optimization (CBO) is enabled, allowing the platform to @@ -169,10 +154,8 @@ class MetaConfig < WhopSDK::Internal::Type::BaseModel # The actual delivery status, accounting for platform overrides (e.g., in_review, # rejected). # - # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus, nil] - required :effective_status, - enum: -> { WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus }, - nil?: true + # @return [Symbol, WhopSDK::Models::AdCampaign::MetaConfig::EffectiveStatus, nil] + required :effective_status, enum: -> { WhopSDK::AdCampaign::MetaConfig::EffectiveStatus }, nil?: true # @!attribute end_time # The scheduled end time of the campaign (ISO8601). @@ -183,10 +166,8 @@ class MetaConfig < WhopSDK::Internal::Type::BaseModel # @!attribute objective # The campaign objective that determines how Meta optimizes delivery. # - # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective, nil] - required :objective, - enum: -> { WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective }, - nil?: true + # @return [Symbol, WhopSDK::Models::AdCampaign::MetaConfig::Objective, nil] + required :objective, enum: -> { WhopSDK::AdCampaign::MetaConfig::Objective }, nil?: true # @!attribute special_categories # Special ad categories required by the platform (e.g., housing, employment, @@ -204,37 +185,37 @@ class MetaConfig < WhopSDK::Internal::Type::BaseModel # @!attribute status # The campaign status as set by the advertiser (active or paused). # - # @return [Symbol, WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status, nil] - required :status, enum: -> { WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status }, nil?: true + # @return [Symbol, WhopSDK::Models::AdCampaign::MetaConfig::Status, nil] + required :status, enum: -> { WhopSDK::AdCampaign::MetaConfig::Status }, nil?: true # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, effective_status:, end_time:, objective:, special_categories:, start_time:, status:) # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AdCampaignPauseResponse::MetaConfig} for more details. + # {WhopSDK::Models::AdCampaign::MetaConfig} for more details. # # Meta-specific campaign configuration (objective, budget mode, etc.). Null for # non-Meta campaigns. # # @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::MetaConfig::BidStrategy, nil] The bidding strategy used to optimize spend for this campaign. + # @param bid_strategy [Symbol, WhopSDK::Models::AdCampaign::MetaConfig::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 effective_status [Symbol, WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus, nil] The actual delivery status, accounting for platform overrides (e.g., in_review, + # @param effective_status [Symbol, WhopSDK::Models::AdCampaign::MetaConfig::EffectiveStatus, nil] The actual delivery status, accounting for platform overrides (e.g., in_review, # # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). # - # @param objective [Symbol, WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective, nil] The campaign objective that determines how Meta optimizes delivery. + # @param objective [Symbol, WhopSDK::Models::AdCampaign::MetaConfig::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::MetaConfig::Status, nil] The campaign status as set by the advertiser (active or paused). + # @param status [Symbol, WhopSDK::Models::AdCampaign::MetaConfig::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::MetaConfig#bid_strategy + # @see WhopSDK::Models::AdCampaign::MetaConfig#bid_strategy module BidStrategy extend WhopSDK::Internal::Type::Enum @@ -249,7 +230,7 @@ module BidStrategy # The actual delivery status, accounting for platform overrides (e.g., in_review, # rejected). # - # @see WhopSDK::Models::AdCampaignPauseResponse::MetaConfig#effective_status + # @see WhopSDK::Models::AdCampaign::MetaConfig#effective_status module EffectiveStatus extend WhopSDK::Internal::Type::Enum @@ -266,7 +247,7 @@ module EffectiveStatus # The campaign objective that determines how Meta optimizes delivery. # - # @see WhopSDK::Models::AdCampaignPauseResponse::MetaConfig#objective + # @see WhopSDK::Models::AdCampaign::MetaConfig#objective module Objective extend WhopSDK::Internal::Type::Enum @@ -282,7 +263,7 @@ module Objective # The campaign status as set by the advertiser (active or paused). # - # @see WhopSDK::Models::AdCampaignPauseResponse::MetaConfig#status + # @see WhopSDK::Models::AdCampaign::MetaConfig#status module Status extend WhopSDK::Internal::Type::Enum @@ -293,36 +274,6 @@ module Status # @return [Array] end end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdCampaignPauseResponse#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::AdCampaignPauseResponse#status - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - 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 index 47d6d75f..a695eb3a 100644 --- a/lib/whop_sdk/models/ad_campaign_list_params.rb +++ b/lib/whop_sdk/models/ad_campaign_list_params.rb @@ -58,8 +58,8 @@ class AdCampaignListParams < WhopSDK::Internal::Type::BaseModel # @!attribute status # The status of an ad campaign. # - # @return [Symbol, WhopSDK::Models::AdCampaignListParams::Status, nil] - optional :status, enum: -> { WhopSDK::AdCampaignListParams::Status }, nil?: true + # @return [Symbol, WhopSDK::Models::AdCampaignStatus, nil] + optional :status, enum: -> { WhopSDK::AdCampaignStatus }, 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. @@ -78,24 +78,9 @@ class AdCampaignListParams < WhopSDK::Internal::Type::BaseModel # # @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 status [Symbol, WhopSDK::Models::AdCampaignStatus, 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 - 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 index 352c864f..4a803b06 100644 --- a/lib/whop_sdk/models/ad_campaign_list_response.rb +++ b/lib/whop_sdk/models/ad_campaign_list_response.rb @@ -19,8 +19,8 @@ class AdCampaignListResponse < WhopSDK::Internal::Type::BaseModel # @!attribute budget_type # The budget type for an ad campaign or ad group. # - # @return [Symbol, WhopSDK::Models::AdCampaignListResponse::BudgetType, nil] - required :budget_type, enum: -> { WhopSDK::Models::AdCampaignListResponse::BudgetType }, nil?: true + # @return [Symbol, WhopSDK::Models::AdBudgetType, nil] + required :budget_type, enum: -> { WhopSDK::AdBudgetType }, nil?: true # @!attribute created_at # When the ad campaign was created. @@ -31,14 +31,14 @@ class AdCampaignListResponse < WhopSDK::Internal::Type::BaseModel # @!attribute platform # The external ad platform this campaign is running on (e.g., meta, tiktok). # - # @return [Symbol, WhopSDK::Models::AdCampaignListResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdCampaignListResponse::Platform } + # @return [Symbol, WhopSDK::Models::AdCampaignPlatform] + required :platform, enum: -> { WhopSDK::AdCampaignPlatform } # @!attribute status # Current status of the campaign (active, paused, or inactive). # - # @return [Symbol, WhopSDK::Models::AdCampaignListResponse::Status] - required :status, enum: -> { WhopSDK::Models::AdCampaignListResponse::Status } + # @return [Symbol, WhopSDK::Models::AdCampaignStatus] + required :status, enum: -> { WhopSDK::AdCampaignStatus } # @!attribute title # The campaign name shown in the Whop dashboard. @@ -65,62 +65,19 @@ class AdCampaignListResponse < WhopSDK::Internal::Type::BaseModel # # @param budget [Float, nil] Total budget in dollars. # - # @param budget_type [Symbol, WhopSDK::Models::AdCampaignListResponse::BudgetType, nil] The budget type for an ad campaign or ad group. + # @param budget_type [Symbol, WhopSDK::Models::AdBudgetType, nil] The budget type for an ad campaign or ad group. # # @param created_at [Time] When the ad campaign was created. # - # @param platform [Symbol, WhopSDK::Models::AdCampaignListResponse::Platform] The external ad platform this campaign is running on (e.g., meta, tiktok). + # @param platform [Symbol, WhopSDK::Models::AdCampaignPlatform] The external ad platform this campaign is running on (e.g., meta, tiktok). # - # @param status [Symbol, WhopSDK::Models::AdCampaignListResponse::Status] Current status of the campaign (active, paused, or inactive). + # @param status [Symbol, WhopSDK::Models::AdCampaignStatus] Current status of the campaign (active, paused, or inactive). # # @param title [String] The campaign name shown in the Whop dashboard. # # @param total_spend [Float] Total amount spent in dollars. # # @param updated_at [Time] When the ad campaign was last updated. - - # The budget type for an ad campaign or ad group. - # - # @see WhopSDK::Models::AdCampaignListResponse#budget_type - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY = :daily - LIFETIME = :lifetime - - # @!method self.values - # @return [Array] - end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdCampaignListResponse#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::AdCampaignListResponse#status - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - 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_platform.rb b/lib/whop_sdk/models/ad_campaign_platform.rb new file mode 100644 index 00000000..17874abb --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_platform.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # The platforms where an ad campaign can run. + module AdCampaignPlatform + extend WhopSDK::Internal::Type::Enum + + META = :meta + TIKTOK = :tiktok + + # @!method self.values + # @return [Array] + 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 deleted file mode 100644 index 85cb7839..00000000 --- a/lib/whop_sdk/models/ad_campaign_retrieve_response.rb +++ /dev/null @@ -1,328 +0,0 @@ -# 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 this ad campaign. - # - # @return [String] - required :id, String - - # @!attribute budget - # Total budget in dollars. - # - # @return [Float, nil] - required :budget, Float, nil?: true - - # @!attribute budget_type - # The budget type for an ad campaign or ad group. - # - # @return [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType, nil] - required :budget_type, enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType }, nil?: true - - # @!attribute created_at - # When the ad campaign was created. - # - # @return [Time] - required :created_at, Time - - # @!attribute created_by_user - # The user who created this ad campaign. - # - # @return [WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser] - required :created_by_user, -> { WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser } - - # @!attribute meta_config - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - # - # @return [WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig, nil] - required :meta_config, -> { WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig }, nil?: true - - # @!attribute platform - # The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @return [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::Platform } - - # @!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 title - # The campaign name shown in the Whop dashboard. - # - # @return [String] - required :title, String - - # @!attribute total_spend - # Total amount spent in dollars. - # - # @return [Float] - required :total_spend, Float - - # @!attribute updated_at - # When the ad campaign was last updated. - # - # @return [Time] - required :updated_at, Time - - # @!method initialize(id:, budget:, budget_type:, created_at:, created_by_user:, meta_config:, platform:, status:, title:, 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 this ad campaign. - # - # @param budget [Float, nil] Total budget in dollars. - # - # @param budget_type [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType, nil] The budget type for an ad campaign or ad group. - # - # @param created_at [Time] When the ad campaign was created. - # - # @param created_by_user [WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser] The user who created this ad campaign. - # - # @param meta_config [WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig, nil] Meta-specific campaign configuration (objective, budget mode, etc.). Null for no - # - # @param platform [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Platform] The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @param status [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::Status] Current status of the campaign (active, paused, or inactive). - # - # @param title [String] The campaign name shown in the Whop dashboard. - # - # @param total_spend [Float] Total amount spent in dollars. - # - # @param updated_at [Time] When the ad campaign was last updated. - - # The budget type for an ad campaign or ad group. - # - # @see WhopSDK::Models::AdCampaignRetrieveResponse#budget_type - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY = :daily - LIFETIME = :lifetime - - # @!method self.values - # @return [Array] - 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 this ad 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 - - # @see WhopSDK::Models::AdCampaignRetrieveResponse#meta_config - class MetaConfig < 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::MetaConfig::BidStrategy, nil] - required :bid_strategy, - enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::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 effective_status - # The actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - # - # @return [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus, nil] - required :effective_status, - enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus }, - 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::MetaConfig::Objective, nil] - required :objective, - enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::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::MetaConfig::Status, nil] - required :status, enum: -> { WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Status }, nil?: true - - # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, effective_status:, end_time:, objective:, special_categories:, start_time:, status:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig} for more details. - # - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - # - # @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::MetaConfig::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 effective_status [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus, nil] The actual delivery status, accounting for platform overrides (e.g., in_review, - # - # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). - # - # @param objective [Symbol, WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::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::MetaConfig::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::MetaConfig#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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - # - # @see WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig#effective_status - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - DELETED = :deleted - IN_REVIEW = :in_review - REJECTED = :rejected - WITH_ISSUES = :with_issues - - # @!method self.values - # @return [Array] - end - - # The campaign objective that determines how Meta optimizes delivery. - # - # @see WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig#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::MetaConfig#status - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - - # @!method self.values - # @return [Array] - end - end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdCampaignRetrieveResponse#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::AdCampaignRetrieveResponse#status - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - 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_status.rb b/lib/whop_sdk/models/ad_campaign_status.rb new file mode 100644 index 00000000..75e8629b --- /dev/null +++ b/lib/whop_sdk/models/ad_campaign_status.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # The status of an ad campaign. + module AdCampaignStatus + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + PAUSED = :paused + PAYMENT_FAILED = :payment_failed + DRAFT = :draft + IN_REVIEW = :in_review + FLAGGED = :flagged + + # @!method self.values + # @return [Array] + 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 deleted file mode 100644 index a7e5662c..00000000 --- a/lib/whop_sdk/models/ad_campaign_unpause_response.rb +++ /dev/null @@ -1,328 +0,0 @@ -# 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 this ad campaign. - # - # @return [String] - required :id, String - - # @!attribute budget - # Total budget in dollars. - # - # @return [Float, nil] - required :budget, Float, nil?: true - - # @!attribute budget_type - # The budget type for an ad campaign or ad group. - # - # @return [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType, nil] - required :budget_type, enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType }, nil?: true - - # @!attribute created_at - # When the ad campaign was created. - # - # @return [Time] - required :created_at, Time - - # @!attribute created_by_user - # The user who created this ad campaign. - # - # @return [WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser] - required :created_by_user, -> { WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser } - - # @!attribute meta_config - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - # - # @return [WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig, nil] - required :meta_config, -> { WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig }, nil?: true - - # @!attribute platform - # The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @return [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::Platform } - - # @!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 title - # The campaign name shown in the Whop dashboard. - # - # @return [String] - required :title, String - - # @!attribute total_spend - # Total amount spent in dollars. - # - # @return [Float] - required :total_spend, Float - - # @!attribute updated_at - # When the ad campaign was last updated. - # - # @return [Time] - required :updated_at, Time - - # @!method initialize(id:, budget:, budget_type:, created_at:, created_by_user:, meta_config:, platform:, status:, title:, 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 this ad campaign. - # - # @param budget [Float, nil] Total budget in dollars. - # - # @param budget_type [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType, nil] The budget type for an ad campaign or ad group. - # - # @param created_at [Time] When the ad campaign was created. - # - # @param created_by_user [WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser] The user who created this ad campaign. - # - # @param meta_config [WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig, nil] Meta-specific campaign configuration (objective, budget mode, etc.). Null for no - # - # @param platform [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Platform] The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @param status [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::Status] Current status of the campaign (active, paused, or inactive). - # - # @param title [String] The campaign name shown in the Whop dashboard. - # - # @param total_spend [Float] Total amount spent in dollars. - # - # @param updated_at [Time] When the ad campaign was last updated. - - # The budget type for an ad campaign or ad group. - # - # @see WhopSDK::Models::AdCampaignUnpauseResponse#budget_type - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY = :daily - LIFETIME = :lifetime - - # @!method self.values - # @return [Array] - 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 this ad 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 - - # @see WhopSDK::Models::AdCampaignUnpauseResponse#meta_config - class MetaConfig < 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::MetaConfig::BidStrategy, nil] - required :bid_strategy, - enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::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 effective_status - # The actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - # - # @return [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus, nil] - required :effective_status, - enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus }, - 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::MetaConfig::Objective, nil] - required :objective, - enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::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::MetaConfig::Status, nil] - required :status, enum: -> { WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Status }, nil?: true - - # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, effective_status:, end_time:, objective:, special_categories:, start_time:, status:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig} for more details. - # - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - # - # @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::MetaConfig::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 effective_status [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus, nil] The actual delivery status, accounting for platform overrides (e.g., in_review, - # - # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). - # - # @param objective [Symbol, WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::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::MetaConfig::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::MetaConfig#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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - # - # @see WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig#effective_status - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - DELETED = :deleted - IN_REVIEW = :in_review - REJECTED = :rejected - WITH_ISSUES = :with_issues - - # @!method self.values - # @return [Array] - end - - # The campaign objective that determines how Meta optimizes delivery. - # - # @see WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig#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::MetaConfig#status - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - - # @!method self.values - # @return [Array] - end - end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdCampaignUnpauseResponse#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::AdCampaignUnpauseResponse#status - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - 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_response.rb b/lib/whop_sdk/models/ad_campaign_update_response.rb deleted file mode 100644 index 09483f5a..00000000 --- a/lib/whop_sdk/models/ad_campaign_update_response.rb +++ /dev/null @@ -1,328 +0,0 @@ -# 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 this ad campaign. - # - # @return [String] - required :id, String - - # @!attribute budget - # Total budget in dollars. - # - # @return [Float, nil] - required :budget, Float, nil?: true - - # @!attribute budget_type - # The budget type for an ad campaign or ad group. - # - # @return [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::BudgetType, nil] - required :budget_type, enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::BudgetType }, nil?: true - - # @!attribute created_at - # When the ad campaign was created. - # - # @return [Time] - required :created_at, Time - - # @!attribute created_by_user - # The user who created this ad campaign. - # - # @return [WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser] - required :created_by_user, -> { WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser } - - # @!attribute meta_config - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - # - # @return [WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig, nil] - required :meta_config, -> { WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig }, nil?: true - - # @!attribute platform - # The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @return [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::Platform } - - # @!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 title - # The campaign name shown in the Whop dashboard. - # - # @return [String] - required :title, String - - # @!attribute total_spend - # Total amount spent in dollars. - # - # @return [Float] - required :total_spend, Float - - # @!attribute updated_at - # When the ad campaign was last updated. - # - # @return [Time] - required :updated_at, Time - - # @!method initialize(id:, budget:, budget_type:, created_at:, created_by_user:, meta_config:, platform:, status:, title:, 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 this ad campaign. - # - # @param budget [Float, nil] Total budget in dollars. - # - # @param budget_type [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::BudgetType, nil] The budget type for an ad campaign or ad group. - # - # @param created_at [Time] When the ad campaign was created. - # - # @param created_by_user [WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser] The user who created this ad campaign. - # - # @param meta_config [WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig, nil] Meta-specific campaign configuration (objective, budget mode, etc.). Null for no - # - # @param platform [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Platform] The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @param status [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::Status] Current status of the campaign (active, paused, or inactive). - # - # @param title [String] The campaign name shown in the Whop dashboard. - # - # @param total_spend [Float] Total amount spent in dollars. - # - # @param updated_at [Time] When the ad campaign was last updated. - - # The budget type for an ad campaign or ad group. - # - # @see WhopSDK::Models::AdCampaignUpdateResponse#budget_type - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY = :daily - LIFETIME = :lifetime - - # @!method self.values - # @return [Array] - 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 this ad 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 - - # @see WhopSDK::Models::AdCampaignUpdateResponse#meta_config - class MetaConfig < 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::MetaConfig::BidStrategy, nil] - required :bid_strategy, - enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::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 effective_status - # The actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - # - # @return [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus, nil] - required :effective_status, - enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus }, - 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::MetaConfig::Objective, nil] - required :objective, - enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::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::MetaConfig::Status, nil] - required :status, enum: -> { WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Status }, nil?: true - - # @!method initialize(bid_amount:, bid_strategy:, budget_optimization:, effective_status:, end_time:, objective:, special_categories:, start_time:, status:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig} for more details. - # - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - # - # @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::MetaConfig::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 effective_status [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus, nil] The actual delivery status, accounting for platform overrides (e.g., in_review, - # - # @param end_time [String, nil] The scheduled end time of the campaign (ISO8601). - # - # @param objective [Symbol, WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::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::MetaConfig::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::MetaConfig#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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - # - # @see WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig#effective_status - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - DELETED = :deleted - IN_REVIEW = :in_review - REJECTED = :rejected - WITH_ISSUES = :with_issues - - # @!method self.values - # @return [Array] - end - - # The campaign objective that determines how Meta optimizes delivery. - # - # @see WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig#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::MetaConfig#status - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - - # @!method self.values - # @return [Array] - end - end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdCampaignUpdateResponse#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::AdCampaignUpdateResponse#status - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE = :active - PAUSED = :paused - 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_group.rb b/lib/whop_sdk/models/ad_group.rb new file mode 100644 index 00000000..1f3e92c2 --- /dev/null +++ b/lib/whop_sdk/models/ad_group.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#retrieve + class AdGroup < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for this ad group. + # + # @return [String] + required :id, String + + # @!attribute ad_campaign + # The ad campaign this ad group belongs to. + # + # @return [WhopSDK::Models::AdGroup::AdCampaign] + required :ad_campaign, -> { WhopSDK::AdGroup::AdCampaign } + + # @!attribute budget + # Budget amount in dollars. + # + # @return [Float, nil] + required :budget, Float, nil?: true + + # @!attribute budget_type + # The budget type for an ad campaign or ad group. + # + # @return [Symbol, WhopSDK::Models::AdBudgetType, nil] + required :budget_type, enum: -> { WhopSDK::AdBudgetType }, nil?: true + + # @!attribute created_at + # When the ad group was created. + # + # @return [Time] + required :created_at, Time + + # @!attribute platform + # The external ad platform this ad group is running on (e.g., meta, tiktok). + # + # @return [Symbol, WhopSDK::Models::AdCampaignPlatform] + required :platform, enum: -> { WhopSDK::AdCampaignPlatform } + + # @!attribute status + # Current operational status of the ad group. + # + # @return [Symbol, WhopSDK::Models::AdGroupStatus] + required :status, enum: -> { WhopSDK::AdGroupStatus } + + # @!attribute title + # Human-readable name shown on the external platform. + # + # @return [String, nil] + required :title, String, nil?: true + + # @!attribute updated_at + # When the ad group was last updated. + # + # @return [Time] + required :updated_at, Time + + # @!method initialize(id:, ad_campaign:, budget:, budget_type:, created_at:, platform:, status:, title:, updated_at:) + # An ad group (ad set) belonging to an ad campaign. + # + # @param id [String] The unique identifier for this ad group. + # + # @param ad_campaign [WhopSDK::Models::AdGroup::AdCampaign] The ad campaign this ad group belongs to. + # + # @param budget [Float, nil] Budget amount in dollars. + # + # @param budget_type [Symbol, WhopSDK::Models::AdBudgetType, nil] The budget type for an ad campaign or ad group. + # + # @param created_at [Time] When the ad group was created. + # + # @param platform [Symbol, WhopSDK::Models::AdCampaignPlatform] The external ad platform this ad group is running on (e.g., meta, tiktok). + # + # @param status [Symbol, WhopSDK::Models::AdGroupStatus] Current operational status of the ad group. + # + # @param title [String, nil] Human-readable name shown on the external platform. + # + # @param updated_at [Time] When the ad group was last updated. + + # @see WhopSDK::Models::AdGroup#ad_campaign + class AdCampaign < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for this ad campaign. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The ad campaign this ad group belongs to. + # + # @param id [String] The unique identifier for this ad campaign. + end + end + end +end diff --git a/lib/whop_sdk/models/ad_group_list_params.rb b/lib/whop_sdk/models/ad_group_list_params.rb index 0c864686..affb43f6 100644 --- a/lib/whop_sdk/models/ad_group_list_params.rb +++ b/lib/whop_sdk/models/ad_group_list_params.rb @@ -64,8 +64,8 @@ class AdGroupListParams < WhopSDK::Internal::Type::BaseModel # @!attribute status # The status of an external ad group. # - # @return [Symbol, WhopSDK::Models::AdGroupListParams::Status, nil] - optional :status, enum: -> { WhopSDK::AdGroupListParams::Status }, nil?: true + # @return [Symbol, WhopSDK::Models::AdGroupStatus, nil] + optional :status, enum: -> { WhopSDK::AdGroupStatus }, 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. @@ -86,24 +86,9 @@ class AdGroupListParams < WhopSDK::Internal::Type::BaseModel # # @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 status [Symbol, WhopSDK::Models::AdGroupStatus, 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 index f6846bbf..9c9a8d1f 100644 --- a/lib/whop_sdk/models/ad_group_list_response.rb +++ b/lib/whop_sdk/models/ad_group_list_response.rb @@ -10,6 +10,12 @@ class AdGroupListResponse < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute ad_campaign + # The ad campaign this ad group belongs to. + # + # @return [WhopSDK::Models::AdGroupListResponse::AdCampaign] + required :ad_campaign, -> { WhopSDK::Models::AdGroupListResponse::AdCampaign } + # @!attribute budget # Budget amount in dollars. # @@ -19,8 +25,8 @@ class AdGroupListResponse < WhopSDK::Internal::Type::BaseModel # @!attribute budget_type # The budget type for an ad campaign or ad group. # - # @return [Symbol, WhopSDK::Models::AdGroupListResponse::BudgetType, nil] - required :budget_type, enum: -> { WhopSDK::Models::AdGroupListResponse::BudgetType }, nil?: true + # @return [Symbol, WhopSDK::Models::AdBudgetType, nil] + required :budget_type, enum: -> { WhopSDK::AdBudgetType }, nil?: true # @!attribute created_at # When the ad group was created. @@ -31,14 +37,14 @@ class AdGroupListResponse < WhopSDK::Internal::Type::BaseModel # @!attribute platform # The external ad platform this ad group is running on (e.g., meta, tiktok). # - # @return [Symbol, WhopSDK::Models::AdGroupListResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdGroupListResponse::Platform } + # @return [Symbol, WhopSDK::Models::AdCampaignPlatform] + required :platform, enum: -> { WhopSDK::AdCampaignPlatform } # @!attribute status # Current operational status of the ad group. # - # @return [Symbol, WhopSDK::Models::AdGroupListResponse::Status] - required :status, enum: -> { WhopSDK::Models::AdGroupListResponse::Status } + # @return [Symbol, WhopSDK::Models::AdGroupStatus] + required :status, enum: -> { WhopSDK::AdGroupStatus } # @!attribute title # Human-readable name shown on the external platform. @@ -52,66 +58,39 @@ class AdGroupListResponse < WhopSDK::Internal::Type::BaseModel # @return [Time] required :updated_at, Time - # @!method initialize(id:, budget:, budget_type:, created_at:, platform:, status:, title:, updated_at:) + # @!method initialize(id:, ad_campaign:, budget:, budget_type:, created_at:, platform:, status:, title:, updated_at:) # An ad group (ad set) belonging to an ad campaign. # # @param id [String] The unique identifier for this ad group. # + # @param ad_campaign [WhopSDK::Models::AdGroupListResponse::AdCampaign] The ad campaign this ad group belongs to. + # # @param budget [Float, nil] Budget amount in dollars. # - # @param budget_type [Symbol, WhopSDK::Models::AdGroupListResponse::BudgetType, nil] The budget type for an ad campaign or ad group. + # @param budget_type [Symbol, WhopSDK::Models::AdBudgetType, nil] The budget type for an ad campaign or ad group. # # @param created_at [Time] When the ad group was created. # - # @param platform [Symbol, WhopSDK::Models::AdGroupListResponse::Platform] The external ad platform this ad group is running on (e.g., meta, tiktok). + # @param platform [Symbol, WhopSDK::Models::AdCampaignPlatform] The external ad platform this ad group is running on (e.g., meta, tiktok). # - # @param status [Symbol, WhopSDK::Models::AdGroupListResponse::Status] Current operational status of the ad group. + # @param status [Symbol, WhopSDK::Models::AdGroupStatus] Current operational status of the ad group. # # @param title [String, nil] Human-readable name shown on the external platform. # # @param updated_at [Time] When the ad group was last updated. - # The budget type for an ad campaign or ad group. - # - # @see WhopSDK::Models::AdGroupListResponse#budget_type - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY = :daily - LIFETIME = :lifetime - - # @!method self.values - # @return [Array] - end - - # The external ad platform this ad group is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdGroupListResponse#platform - module Platform - extend WhopSDK::Internal::Type::Enum - - META = :meta - TIKTOK = :tiktok - - # @!method self.values - # @return [Array] - 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] + # @see WhopSDK::Models::AdGroupListResponse#ad_campaign + class AdCampaign < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for this ad campaign. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The ad campaign this ad group belongs to. + # + # @param id [String] The unique identifier for this ad campaign. end end end diff --git a/lib/whop_sdk/models/ad_group_pause_params.rb b/lib/whop_sdk/models/ad_group_pause_params.rb new file mode 100644 index 00000000..0ebfaefe --- /dev/null +++ b/lib/whop_sdk/models/ad_group_pause_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#pause + class AdGroupPauseParams < 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 deleted file mode 100644 index a13f7594..00000000 --- a/lib/whop_sdk/models/ad_group_retrieve_response.rb +++ /dev/null @@ -1,140 +0,0 @@ -# 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 this ad group. - # - # @return [String] - required :id, String - - # @!attribute ad_campaign - # The ad campaign this ad group belongs to. - # - # @return [WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign] - required :ad_campaign, -> { WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign } - - # @!attribute budget - # Budget amount in dollars. - # - # @return [Float, nil] - required :budget, Float, nil?: true - - # @!attribute budget_type - # The budget type for an ad campaign or ad group. - # - # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::BudgetType, nil] - required :budget_type, enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::BudgetType }, nil?: true - - # @!attribute created_at - # When the ad group was created. - # - # @return [Time] - required :created_at, Time - - # @!attribute platform - # The external ad platform this ad group is running on (e.g., meta, tiktok). - # - # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::Platform } - - # @!attribute status - # Current operational status of the ad group. - # - # @return [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Status] - required :status, enum: -> { WhopSDK::Models::AdGroupRetrieveResponse::Status } - - # @!attribute title - # Human-readable name shown on the external platform. - # - # @return [String, nil] - required :title, String, nil?: true - - # @!attribute updated_at - # When the ad group was last updated. - # - # @return [Time] - required :updated_at, Time - - # @!method initialize(id:, ad_campaign:, budget:, budget_type:, created_at:, platform:, status:, title:, updated_at:) - # An ad group (ad set) belonging to an ad campaign. - # - # @param id [String] The unique identifier for this ad group. - # - # @param ad_campaign [WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign] The ad campaign this ad group belongs to. - # - # @param budget [Float, nil] Budget amount in dollars. - # - # @param budget_type [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::BudgetType, nil] The budget type for an ad campaign or ad group. - # - # @param created_at [Time] When the ad group was created. - # - # @param platform [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Platform] The external ad platform this ad group is running on (e.g., meta, tiktok). - # - # @param status [Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Status] Current operational status of the ad group. - # - # @param title [String, nil] Human-readable name shown on the external platform. - # - # @param updated_at [Time] When the ad group was last updated. - - # @see WhopSDK::Models::AdGroupRetrieveResponse#ad_campaign - class AdCampaign < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The unique identifier for this ad campaign. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # The ad campaign this ad group belongs to. - # - # @param id [String] The unique identifier for this ad campaign. - end - - # The budget type for an ad campaign or ad group. - # - # @see WhopSDK::Models::AdGroupRetrieveResponse#budget_type - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY = :daily - LIFETIME = :lifetime - - # @!method self.values - # @return [Array] - end - - # The external ad platform this ad group is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdGroupRetrieveResponse#platform - module Platform - extend WhopSDK::Internal::Type::Enum - - META = :meta - TIKTOK = :tiktok - - # @!method self.values - # @return [Array] - 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_status.rb b/lib/whop_sdk/models/ad_group_status.rb new file mode 100644 index 00000000..5f7e3666 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_status.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # The status of an external ad group. + module AdGroupStatus + 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 diff --git a/lib/whop_sdk/models/ad_group_unpause_params.rb b/lib/whop_sdk/models/ad_group_unpause_params.rb new file mode 100644 index 00000000..2db16536 --- /dev/null +++ b/lib/whop_sdk/models/ad_group_unpause_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::AdGroups#unpause + class AdGroupUnpauseParams < 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_update_params.rb b/lib/whop_sdk/models/ad_group_update_params.rb index 5d3282c4..b028da54 100644 --- a/lib/whop_sdk/models/ad_group_update_params.rb +++ b/lib/whop_sdk/models/ad_group_update_params.rb @@ -21,8 +21,8 @@ class AdGroupUpdateParams < WhopSDK::Internal::Type::BaseModel # @!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 + # @return [Symbol, WhopSDK::Models::AdBudgetType, nil] + optional :budget_type, enum: -> { WhopSDK::AdBudgetType }, nil?: true # @!attribute config # Unified ad group configuration (bidding, optimization, targeting). @@ -51,15 +51,15 @@ class AdGroupUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute status # The status of an external ad group. # - # @return [Symbol, WhopSDK::Models::AdGroupUpdateParams::Status, nil] - optional :status, enum: -> { WhopSDK::AdGroupUpdateParams::Status }, nil?: true + # @return [Symbol, WhopSDK::Models::AdGroupStatus, nil] + optional :status, enum: -> { WhopSDK::AdGroupStatus }, 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 budget_type [Symbol, WhopSDK::Models::AdBudgetType, 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). # @@ -69,21 +69,10 @@ class AdGroupUpdateParams < WhopSDK::Internal::Type::BaseModel # # @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 status [Symbol, WhopSDK::Models::AdGroupStatus, 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. @@ -3187,21 +3176,6 @@ module ViewAttributionWindow 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 deleted file mode 100644 index 463ed0fc..00000000 --- a/lib/whop_sdk/models/ad_group_update_response.rb +++ /dev/null @@ -1,140 +0,0 @@ -# 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 this ad group. - # - # @return [String] - required :id, String - - # @!attribute ad_campaign - # The ad campaign this ad group belongs to. - # - # @return [WhopSDK::Models::AdGroupUpdateResponse::AdCampaign] - required :ad_campaign, -> { WhopSDK::Models::AdGroupUpdateResponse::AdCampaign } - - # @!attribute budget - # Budget amount in dollars. - # - # @return [Float, nil] - required :budget, Float, nil?: true - - # @!attribute budget_type - # The budget type for an ad campaign or ad group. - # - # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::BudgetType, nil] - required :budget_type, enum: -> { WhopSDK::Models::AdGroupUpdateResponse::BudgetType }, nil?: true - - # @!attribute created_at - # When the ad group was created. - # - # @return [Time] - required :created_at, Time - - # @!attribute platform - # The external ad platform this ad group is running on (e.g., meta, tiktok). - # - # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdGroupUpdateResponse::Platform } - - # @!attribute status - # Current operational status of the ad group. - # - # @return [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Status] - required :status, enum: -> { WhopSDK::Models::AdGroupUpdateResponse::Status } - - # @!attribute title - # Human-readable name shown on the external platform. - # - # @return [String, nil] - required :title, String, nil?: true - - # @!attribute updated_at - # When the ad group was last updated. - # - # @return [Time] - required :updated_at, Time - - # @!method initialize(id:, ad_campaign:, budget:, budget_type:, created_at:, platform:, status:, title:, updated_at:) - # An ad group (ad set) belonging to an ad campaign. - # - # @param id [String] The unique identifier for this ad group. - # - # @param ad_campaign [WhopSDK::Models::AdGroupUpdateResponse::AdCampaign] The ad campaign this ad group belongs to. - # - # @param budget [Float, nil] Budget amount in dollars. - # - # @param budget_type [Symbol, WhopSDK::Models::AdGroupUpdateResponse::BudgetType, nil] The budget type for an ad campaign or ad group. - # - # @param created_at [Time] When the ad group was created. - # - # @param platform [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Platform] The external ad platform this ad group is running on (e.g., meta, tiktok). - # - # @param status [Symbol, WhopSDK::Models::AdGroupUpdateResponse::Status] Current operational status of the ad group. - # - # @param title [String, nil] Human-readable name shown on the external platform. - # - # @param updated_at [Time] When the ad group was last updated. - - # @see WhopSDK::Models::AdGroupUpdateResponse#ad_campaign - class AdCampaign < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The unique identifier for this ad campaign. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # The ad campaign this ad group belongs to. - # - # @param id [String] The unique identifier for this ad campaign. - end - - # The budget type for an ad campaign or ad group. - # - # @see WhopSDK::Models::AdGroupUpdateResponse#budget_type - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY = :daily - LIFETIME = :lifetime - - # @!method self.values - # @return [Array] - end - - # The external ad platform this ad group is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdGroupUpdateResponse#platform - module Platform - extend WhopSDK::Internal::Type::Enum - - META = :meta - TIKTOK = :tiktok - - # @!method self.values - # @return [Array] - 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 index d7a59b21..40051039 100644 --- a/lib/whop_sdk/models/ad_list_params.rb +++ b/lib/whop_sdk/models/ad_list_params.rb @@ -67,8 +67,8 @@ class AdListParams < WhopSDK::Internal::Type::BaseModel # @!attribute status # The status of an external ad. # - # @return [Symbol, WhopSDK::Models::AdListParams::Status, nil] - optional :status, enum: -> { WhopSDK::AdListParams::Status }, nil?: true + # @return [Symbol, WhopSDK::Models::ExternalAdStatus, nil] + optional :status, enum: -> { WhopSDK::ExternalAdStatus }, 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 @@ -92,24 +92,9 @@ class AdListParams < WhopSDK::Internal::Type::BaseModel # # @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 status [Symbol, WhopSDK::Models::ExternalAdStatus, 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 index 34405b18..abee5c2b 100644 --- a/lib/whop_sdk/models/ad_list_response.rb +++ b/lib/whop_sdk/models/ad_list_response.rb @@ -10,6 +10,18 @@ class AdListResponse < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute ad_campaign + # The ad campaign this ad belongs to. + # + # @return [WhopSDK::Models::AdListResponse::AdCampaign] + required :ad_campaign, -> { WhopSDK::Models::AdListResponse::AdCampaign } + + # @!attribute ad_group + # The parent ad group this ad belongs to. + # + # @return [WhopSDK::Models::AdListResponse::AdGroup] + required :ad_group, -> { WhopSDK::Models::AdListResponse::AdGroup } + # @!attribute created_at # When the ad was created. # @@ -19,14 +31,14 @@ class AdListResponse < WhopSDK::Internal::Type::BaseModel # @!attribute platform # The external ad platform this ad is running on (e.g., meta, tiktok). # - # @return [Symbol, WhopSDK::Models::AdListResponse::Platform] - required :platform, enum: -> { WhopSDK::Models::AdListResponse::Platform } + # @return [Symbol, WhopSDK::Models::AdCampaignPlatform] + required :platform, enum: -> { WhopSDK::AdCampaignPlatform } # @!attribute status # Current delivery status of the ad. # - # @return [Symbol, WhopSDK::Models::AdListResponse::Status] - required :status, enum: -> { WhopSDK::Models::AdListResponse::Status } + # @return [Symbol, WhopSDK::Models::ExternalAdStatus] + required :status, enum: -> { WhopSDK::ExternalAdStatus } # @!attribute title # The display title of the ad. Falls back to the creative set caption when unset. @@ -40,49 +52,51 @@ class AdListResponse < WhopSDK::Internal::Type::BaseModel # @return [Time] required :updated_at, Time - # @!method initialize(id:, created_at:, platform:, status:, title:, updated_at:) + # @!method initialize(id:, ad_campaign:, ad_group:, created_at:, platform:, status:, title:, updated_at:) # An ad belonging to an ad group. # # @param id [String] The unique identifier for this ad. # + # @param ad_campaign [WhopSDK::Models::AdListResponse::AdCampaign] The ad campaign this ad belongs to. + # + # @param ad_group [WhopSDK::Models::AdListResponse::AdGroup] The parent ad group this ad belongs to. + # # @param created_at [Time] When the ad was created. # - # @param platform [Symbol, WhopSDK::Models::AdListResponse::Platform] The external ad platform this ad is running on (e.g., meta, tiktok). + # @param platform [Symbol, WhopSDK::Models::AdCampaignPlatform] The external ad platform this ad is running on (e.g., meta, tiktok). # - # @param status [Symbol, WhopSDK::Models::AdListResponse::Status] Current delivery status of the ad. + # @param status [Symbol, WhopSDK::Models::ExternalAdStatus] Current delivery status of the ad. # # @param title [String, nil] The display title of the ad. Falls back to the creative set caption when unset. # # @param updated_at [Time] When the ad was last updated. - # The external ad platform this ad is running on (e.g., meta, tiktok). - # - # @see WhopSDK::Models::AdListResponse#platform - module Platform - extend WhopSDK::Internal::Type::Enum - - META = :meta - TIKTOK = :tiktok + # @see WhopSDK::Models::AdListResponse#ad_campaign + class AdCampaign < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for this ad campaign. + # + # @return [String] + required :id, String - # @!method self.values - # @return [Array] + # @!method initialize(id:) + # The ad campaign this ad belongs to. + # + # @param id [String] The unique identifier for this ad campaign. end - # Current delivery 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 + # @see WhopSDK::Models::AdListResponse#ad_group + class AdGroup < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for this ad group. + # + # @return [String] + required :id, String - # @!method self.values - # @return [Array] + # @!method initialize(id:) + # The parent ad group this ad belongs to. + # + # @param id [String] The unique identifier for this ad group. end end end diff --git a/lib/whop_sdk/models/ad_pause_params.rb b/lib/whop_sdk/models/ad_pause_params.rb new file mode 100644 index 00000000..b2984e28 --- /dev/null +++ b/lib/whop_sdk/models/ad_pause_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Ads#pause + class AdPauseParams < 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_report_retrieve_params.rb b/lib/whop_sdk/models/ad_report_retrieve_params.rb index 64635ff1..1f59ec77 100644 --- a/lib/whop_sdk/models/ad_report_retrieve_params.rb +++ b/lib/whop_sdk/models/ad_report_retrieve_params.rb @@ -20,26 +20,40 @@ class AdReportRetrieveParams < WhopSDK::Internal::Type::BaseModel required :to, Time # @!attribute ad_campaign_id - # The unique identifier of an ad campaign. Mutually exclusive with `adGroupId` and - # `adId`. + # The unique identifier of an ad campaign. Mutually exclusive with `companyId`, + # `adGroupId`, and `adId`. # # @return [String, nil] optional :ad_campaign_id, String, nil?: true # @!attribute ad_group_id - # The unique identifier of an ad group. Mutually exclusive with `adCampaignId` and - # `adId`. + # The unique identifier of an ad group. Mutually exclusive with `companyId`, + # `adCampaignId`, and `adId`. # # @return [String, nil] optional :ad_group_id, String, nil?: true # @!attribute ad_id - # The unique identifier of an ad. Mutually exclusive with `adCampaignId` and - # `adGroupId`. + # The unique identifier of an ad. Mutually exclusive with `companyId`, + # `adCampaignId`, and `adGroupId`. # # @return [String, nil] optional :ad_id, String, nil?: true + # @!attribute breakdown + # Entity level to group an ad report by. + # + # @return [Symbol, WhopSDK::Models::AdReportRetrieveParams::Breakdown, nil] + optional :breakdown, enum: -> { WhopSDK::AdReportRetrieveParams::Breakdown }, nil?: true + + # @!attribute company_id + # The unique identifier of a company. Mutually exclusive with `adCampaignId`, + # `adGroupId`, and `adId`. Use with `breakdown` to fan out across every campaign, + # ad group, or ad in the company without paging. + # + # @return [String, nil] + optional :company_id, String, nil?: true + # @!attribute currency # ISO 4217 currency code to report `spend` in. Defaults to the company's ads # reporting currency. @@ -47,13 +61,13 @@ class AdReportRetrieveParams < WhopSDK::Internal::Type::BaseModel # @return [String, nil] optional :currency, String, nil?: true - # @!attribute include_daily - # When true, includes a per-day breakdown alongside the summary. + # @!attribute granularity + # Bucket size for external ad stat rows. # - # @return [Boolean, nil] - optional :include_daily, WhopSDK::Internal::Type::Boolean, nil?: true + # @return [Symbol, WhopSDK::Models::Granularities, nil] + optional :granularity, enum: -> { WhopSDK::Granularities }, nil?: true - # @!method initialize(from:, to:, ad_campaign_id: nil, ad_group_id: nil, ad_id: nil, currency: nil, include_daily: nil, request_options: {}) + # @!method initialize(from:, to:, ad_campaign_id: nil, ad_group_id: nil, ad_id: nil, breakdown: nil, company_id: nil, currency: nil, granularity: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::AdReportRetrieveParams} for more details. # @@ -61,17 +75,33 @@ class AdReportRetrieveParams < WhopSDK::Internal::Type::BaseModel # # @param to [Time] Inclusive end of the reporting window. # - # @param ad_campaign_id [String, nil] The unique identifier of an ad campaign. Mutually exclusive with `adGroupId` and + # @param ad_campaign_id [String, nil] The unique identifier of an ad campaign. Mutually exclusive with `companyId`, `a # - # @param ad_group_id [String, nil] The unique identifier of an ad group. Mutually exclusive with `adCampaignId` and + # @param ad_group_id [String, nil] The unique identifier of an ad group. Mutually exclusive with `companyId`, `adCa # - # @param ad_id [String, nil] The unique identifier of an ad. Mutually exclusive with `adCampaignId` and `adGr + # @param ad_id [String, nil] The unique identifier of an ad. Mutually exclusive with `companyId`, `adCampaign + # + # @param breakdown [Symbol, WhopSDK::Models::AdReportRetrieveParams::Breakdown, nil] Entity level to group an ad report by. + # + # @param company_id [String, nil] The unique identifier of a company. Mutually exclusive with `adCampaignId`, `adG # # @param currency [String, nil] ISO 4217 currency code to report `spend` in. Defaults to the company's ads repor # - # @param include_daily [Boolean, nil] When true, includes a per-day breakdown alongside the summary. + # @param granularity [Symbol, WhopSDK::Models::Granularities, nil] Bucket size for external ad stat rows. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # Entity level to group an ad report by. + module Breakdown + extend WhopSDK::Internal::Type::Enum + + CAMPAIGN = :campaign + AD_GROUP = :ad_group + AD = :ad + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/whop_sdk/models/ad_report_retrieve_response.rb b/lib/whop_sdk/models/ad_report_retrieve_response.rb index 7c1e4d13..bf92756c 100644 --- a/lib/whop_sdk/models/ad_report_retrieve_response.rb +++ b/lib/whop_sdk/models/ad_report_retrieve_response.rb @@ -4,13 +4,24 @@ module WhopSDK module Models # @see WhopSDK::Resources::AdReports#retrieve class AdReportRetrieveResponse < WhopSDK::Internal::Type::BaseModel - # @!attribute daily - # Per-day breakdown over the date range, ordered ascending. Null when - # `includeDaily` is false. + # @!attribute breakdown + # Per-entity rows over the date range. `null` when the `breakdown` arg on + # `adReport` is omitted; otherwise contains one row per ad campaign, ad group, or + # ad inside the requested scope at the requested level. # - # @return [Array, nil] - required :daily, - -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Daily] }, + # @return [Array, nil] + required :breakdown, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Breakdown] }, + nil?: true + + # @!attribute granularity + # Per-bucket time series over the date range, ordered ascending by `bucketStart`. + # `null` when the `granularity` arg on `adReport` is omitted; otherwise contains + # rows at the requested grain (`daily` or `hourly`). + # + # @return [Array, nil] + required :granularity, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Granularity] }, nil?: true # @!attribute summary @@ -19,38 +30,359 @@ class AdReportRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::AdReportRetrieveResponse::Summary] required :summary, -> { WhopSDK::Models::AdReportRetrieveResponse::Summary } - # @!method initialize(daily:, summary:) + # @!method initialize(breakdown:, granularity:, summary:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::AdReportRetrieveResponse} for more details. # - # An ads performance report. Returns a summary; daily breakdown is included when - # `includeDaily` is true. + # An ads performance report. Always returns a summary. The `granularity` field + # contains a per-bucket time series when the `granularity` arg is set; the + # `breakdown` field contains per-entity rows when the `breakdown` arg is set. + # + # @param breakdown [Array, nil] Per-entity rows over the date range. `null` when the `breakdown` arg on `adRepor # - # @param daily [Array, nil] Per-day breakdown over the date range, ordered ascending. Null when `includeDail + # @param granularity [Array, nil] Per-bucket time series over the date range, ordered ascending by `bucketStart`. # # @param summary [WhopSDK::Models::AdReportRetrieveResponse::Summary] Aggregate totals and rates over the date range. - class Daily < WhopSDK::Internal::Type::BaseModel + class Breakdown < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # Tag of the entity (ad campaign, ad group, or ad). + # + # @return [String] + required :id, String + + # @!attribute granularity + # Per-bucket time series for this entity over the date range, ordered ascending by + # `bucketStart`. `null` when the `granularity` arg on `adReport` is omitted; + # otherwise contains rows at the requested grain (`daily` or `hourly`). + # + # @return [Array, nil] + required :granularity, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity] }, + nil?: true + + # @!attribute level + # The entity level of this row — matches the `breakdown` arg. + # + # @return [Symbol, WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level] + required :level, enum: -> { WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level } + + # @!attribute name + # Display name of the entity, when available. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute summary + # Aggregate totals and rates for this entity over the date range. + # + # @return [WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary] + required :summary, -> { WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary } + + # @!method initialize(id:, granularity:, level:, name:, summary:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdReportRetrieveResponse::Breakdown} for more details. + # + # Per-entity ad performance row. Returned when the `breakdown` arg on `adReport` + # is set. + # + # @param id [String] Tag of the entity (ad campaign, ad group, or ad). + # + # @param granularity [Array, nil] Per-bucket time series for this entity over the date range, ordered ascending by + # + # @param level [Symbol, WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level] The entity level of this row — matches the `breakdown` arg. + # + # @param name [String, nil] Display name of the entity, when available. + # + # @param summary [WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary] Aggregate totals and rates for this entity over the date range. + + class Granularity < WhopSDK::Internal::Type::BaseModel + # @!attribute bucket_start + # The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved + # in the ad account's reporting timezone — render this in the viewer's local + # timezone. + # + # @return [Time] + required :bucket_start, Time + + # @!attribute clicks + # Clicks in this bucket. + # + # @return [Integer] + required :clicks, Integer + + # @!attribute granularity + # The bucket size of this row (`daily` or `hourly`). + # + # @return [Symbol, WhopSDK::Models::Granularities] + required :granularity, enum: -> { WhopSDK::Granularities } + + # @!attribute impressions + # Impressions in this bucket. + # + # @return [Integer] + required :impressions, Integer + + # @!attribute reach + # Unique users reached in this bucket. Always `0` for hourly rows (Meta does not + # return reach at hourly grain). + # + # @return [Integer] + required :reach, Integer + + # @!attribute result_count + # Count of the primary optimization result in this bucket. + # + # @return [Integer, nil] + required :result_count, Integer, nil?: true + + # @!attribute result_label_key + # Types of optimization results tracked from external ad platforms + # + # @return [Symbol, WhopSDK::Models::ResultLabelKeys, nil] + required :result_label_key, enum: -> { WhopSDK::ResultLabelKeys }, nil?: true + + # @!attribute result_label_override + # Advertiser-defined label for the result when `resultLabelKey` is `custom`. + # + # @return [String, nil] + required :result_label_override, String, nil?: true + + # @!attribute spend + # Charged spend in this bucket in the requested reporting currency — the amount + # billed including platform fees, not the platform-side net spend. + # + # @return [Float] + required :spend, Float + + # @!attribute spend_currency + # Currency of the `spend` value. + # + # @return [Symbol, WhopSDK::Models::Currency] + required :spend_currency, enum: -> { WhopSDK::Currency } + + # @!attribute stat_date + # The date these stats cover (midnight UTC). For hourly rows, see `statHour` and + # `bucketStart`. + # + # @return [Time] + required :stat_date, Time + + # @!attribute stat_hour + # Hour of the day in the ad account's reporting timezone (0-23). `null` for daily + # rows. + # + # @return [Integer, nil] + required :stat_hour, Integer, nil?: true + + # @!method initialize(bucket_start:, clicks:, granularity:, impressions:, reach:, result_count:, result_label_key:, result_label_override:, spend:, spend_currency:, stat_date:, stat_hour:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity} for more + # details. + # + # Per-bucket ad performance for an ad campaign, ad group, or ad. Bucket grain is + # set by the `ad_report` query's `granularity` argument. + # + # @param bucket_start [Time] The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved i + # + # @param clicks [Integer] Clicks in this bucket. + # + # @param granularity [Symbol, WhopSDK::Models::Granularities] The bucket size of this row (`daily` or `hourly`). + # + # @param impressions [Integer] Impressions in this bucket. + # + # @param reach [Integer] Unique users reached in this bucket. Always `0` for hourly rows (Meta does not r + # + # @param result_count [Integer, nil] Count of the primary optimization result in this bucket. + # + # @param result_label_key [Symbol, WhopSDK::Models::ResultLabelKeys, nil] Types of optimization results tracked from external ad platforms + # + # @param result_label_override [String, nil] Advertiser-defined label for the result when `resultLabelKey` is `custom`. + # + # @param spend [Float] Charged spend in this bucket in the requested reporting currency — the amount bi + # + # @param spend_currency [Symbol, WhopSDK::Models::Currency] Currency of the `spend` value. + # + # @param stat_date [Time] The date these stats cover (midnight UTC). For hourly rows, see `statHour` and ` + # + # @param stat_hour [Integer, nil] Hour of the day in the ad account's reporting timezone (0-23). `null` for daily + end + + # The entity level of this row — matches the `breakdown` arg. + # + # @see WhopSDK::Models::AdReportRetrieveResponse::Breakdown#level + module Level + extend WhopSDK::Internal::Type::Enum + + CAMPAIGN = :campaign + AD_GROUP = :ad_group + AD = :ad + + # @!method self.values + # @return [Array] + end + + # @see WhopSDK::Models::AdReportRetrieveResponse::Breakdown#summary + class Summary < WhopSDK::Internal::Type::BaseModel + # @!attribute clicks + # Total clicks over the date range. + # + # @return [Integer] + required :clicks, Integer + + # @!attribute cost_per_result + # Spend divided by `resultCount`. Null when there are no results. + # + # @return [Float, nil] + required :cost_per_result, Float, nil?: true + + # @!attribute cpc + # Cost per click in the requested reporting currency. + # + # @return [Float] + required :cpc, Float + + # @!attribute cpm + # Cost per thousand impressions in the requested reporting currency. + # + # @return [Float, nil] + required :cpm, Float, nil?: true + + # @!attribute ctr + # Click-through rate (clicks / impressions). + # + # @return [Float] + required :ctr, Float + + # @!attribute frequency + # Average number of times each reached user saw an ad. + # + # @return [Float, nil] + required :frequency, Float, nil?: true + + # @!attribute impressions + # Total impressions over the date range. + # + # @return [Integer] + required :impressions, Integer + + # @!attribute reach + # Unique users reached, deduplicated by the external ad platform. + # + # @return [Integer] + required :reach, Integer + + # @!attribute result_count + # Count of the campaign's primary optimization result (purchases, clicks, etc.) — + # see `resultLabelKey`. + # + # @return [Integer, nil] + required :result_count, Integer, nil?: true + + # @!attribute result_label_key + # Types of optimization results tracked from external ad platforms + # + # @return [Symbol, WhopSDK::Models::ResultLabelKeys, nil] + required :result_label_key, enum: -> { WhopSDK::ResultLabelKeys }, nil?: true + + # @!attribute result_label_override + # Advertiser-defined label for the result when `resultLabelKey` is `custom`. + # + # @return [String, nil] + required :result_label_override, String, nil?: true + + # @!attribute roas + # Alias for `purchaseRoas` — return on ad spend for purchases, as reported by the + # external ad platform. + # + # @return [Float, nil] + required :roas, Float, nil?: true + + # @!attribute spend + # Total spend over the date range in the requested reporting currency. + # + # @return [Float] + required :spend, Float + + # @!attribute spend_currency + # The available currencies on the platform + # + # @return [Symbol, WhopSDK::Models::Currency, nil] + required :spend_currency, enum: -> { WhopSDK::Currency }, nil?: true + + # @!method initialize(clicks:, cost_per_result:, cpc:, cpm:, ctr:, frequency:, impressions:, reach:, result_count:, result_label_key:, result_label_override:, roas:, spend:, spend_currency:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary} for more + # details. + # + # Aggregate totals and rates for this entity over the date range. + # + # @param clicks [Integer] Total clicks over the date range. + # + # @param cost_per_result [Float, nil] Spend divided by `resultCount`. Null when there are no results. + # + # @param cpc [Float] Cost per click in the requested reporting currency. + # + # @param cpm [Float, nil] Cost per thousand impressions in the requested reporting currency. + # + # @param ctr [Float] Click-through rate (clicks / impressions). + # + # @param frequency [Float, nil] Average number of times each reached user saw an ad. + # + # @param impressions [Integer] Total impressions over the date range. + # + # @param reach [Integer] Unique users reached, deduplicated by the external ad platform. + # + # @param result_count [Integer, nil] Count of the campaign's primary optimization result (purchases, clicks, etc.) — + # + # @param result_label_key [Symbol, WhopSDK::Models::ResultLabelKeys, nil] Types of optimization results tracked from external ad platforms + # + # @param result_label_override [String, nil] Advertiser-defined label for the result when `resultLabelKey` is `custom`. + # + # @param roas [Float, nil] Alias for `purchaseRoas` — return on ad spend for purchases, as reported by the + # + # @param spend [Float] Total spend over the date range in the requested reporting currency. + # + # @param spend_currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + end + end + + class Granularity < WhopSDK::Internal::Type::BaseModel + # @!attribute bucket_start + # The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved + # in the ad account's reporting timezone — render this in the viewer's local + # timezone. + # + # @return [Time] + required :bucket_start, Time + # @!attribute clicks - # Clicks on this date. + # Clicks in this bucket. # # @return [Integer] required :clicks, Integer + # @!attribute granularity + # The bucket size of this row (`daily` or `hourly`). + # + # @return [Symbol, WhopSDK::Models::Granularities] + required :granularity, enum: -> { WhopSDK::Granularities } + # @!attribute impressions - # Impressions on this date. + # Impressions in this bucket. # # @return [Integer] required :impressions, Integer # @!attribute reach - # Unique users reached on this date. + # Unique users reached in this bucket. Always `0` for hourly rows (Meta does not + # return reach at hourly grain). # # @return [Integer] required :reach, Integer # @!attribute result_count - # Count of the primary optimization result on this date. + # Count of the primary optimization result in this bucket. # # @return [Integer, nil] required :result_count, Integer, nil?: true @@ -58,10 +390,8 @@ class Daily < WhopSDK::Internal::Type::BaseModel # @!attribute result_label_key # Types of optimization results tracked from external ad platforms # - # @return [Symbol, WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey, nil] - required :result_label_key, - enum: -> { WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey }, - nil?: true + # @return [Symbol, WhopSDK::Models::ResultLabelKeys, nil] + required :result_label_key, enum: -> { WhopSDK::ResultLabelKeys }, nil?: true # @!attribute result_label_override # Advertiser-defined label for the result when `resultLabelKey` is `custom`. @@ -70,7 +400,7 @@ class Daily < WhopSDK::Internal::Type::BaseModel required :result_label_override, String, nil?: true # @!attribute spend - # Charged spend on this date in the requested reporting currency — the amount + # Charged spend in this bucket in the requested reporting currency — the amount # billed including platform fees, not the platform-side net spend. # # @return [Float] @@ -83,69 +413,49 @@ class Daily < WhopSDK::Internal::Type::BaseModel required :spend_currency, enum: -> { WhopSDK::Currency } # @!attribute stat_date - # The date these stats cover (midnight UTC). + # The date these stats cover (midnight UTC). For hourly rows, see `statHour` and + # `bucketStart`. # # @return [Time] required :stat_date, Time - # @!method initialize(clicks:, impressions:, reach:, result_count:, result_label_key:, result_label_override:, spend:, spend_currency:, stat_date:) + # @!attribute stat_hour + # Hour of the day in the ad account's reporting timezone (0-23). `null` for daily + # rows. + # + # @return [Integer, nil] + required :stat_hour, Integer, nil?: true + + # @!method initialize(bucket_start:, clicks:, granularity:, impressions:, reach:, result_count:, result_label_key:, result_label_override:, spend:, spend_currency:, stat_date:, stat_hour:) # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AdReportRetrieveResponse::Daily} for more details. + # {WhopSDK::Models::AdReportRetrieveResponse::Granularity} for more details. + # + # Per-bucket ad performance for an ad campaign, ad group, or ad. Bucket grain is + # set by the `ad_report` query's `granularity` argument. # - # Per-day ad performance for an ad campaign, ad group, or ad. + # @param bucket_start [Time] The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved i # - # @param clicks [Integer] Clicks on this date. + # @param clicks [Integer] Clicks in this bucket. # - # @param impressions [Integer] Impressions on this date. + # @param granularity [Symbol, WhopSDK::Models::Granularities] The bucket size of this row (`daily` or `hourly`). # - # @param reach [Integer] Unique users reached on this date. + # @param impressions [Integer] Impressions in this bucket. # - # @param result_count [Integer, nil] Count of the primary optimization result on this date. + # @param reach [Integer] Unique users reached in this bucket. Always `0` for hourly rows (Meta does not r # - # @param result_label_key [Symbol, WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey, nil] Types of optimization results tracked from external ad platforms + # @param result_count [Integer, nil] Count of the primary optimization result in this bucket. + # + # @param result_label_key [Symbol, WhopSDK::Models::ResultLabelKeys, nil] Types of optimization results tracked from external ad platforms # # @param result_label_override [String, nil] Advertiser-defined label for the result when `resultLabelKey` is `custom`. # - # @param spend [Float] Charged spend on this date in the requested reporting currency — the amount bill + # @param spend [Float] Charged spend in this bucket in the requested reporting currency — the amount bi # # @param spend_currency [Symbol, WhopSDK::Models::Currency] Currency of the `spend` value. # - # @param stat_date [Time] The date these stats cover (midnight UTC). - - # Types of optimization results tracked from external ad platforms + # @param stat_date [Time] The date these stats cover (midnight UTC). For hourly rows, see `statHour` and ` # - # @see WhopSDK::Models::AdReportRetrieveResponse::Daily#result_label_key - module ResultLabelKey - extend WhopSDK::Internal::Type::Enum - - APP_INSTALLS = :app_installs - MESSAGING_CONVERSATIONS_STARTED = :messaging_conversations_started - POST_ENGAGEMENT = :post_engagement - EVENT_RESPONSES = :event_responses - IMPRESSIONS = :impressions - WEBSITE_PURCHASES = :website_purchases - LANDING_PAGE_VIEWS = :landing_page_views - LEADS = :leads - LINK_CLICKS = :link_clicks - QUALITY_CALLS = :quality_calls - APPOINTMENTS_BOOKED = :appointments_booked - MESSAGING_PURCHASES = :messaging_purchases - PAGE_LIKES = :page_likes - INSTAGRAM_PROFILE_VISITS = :instagram_profile_visits - REACH = :reach - REMINDERS_SET = :reminders_set - NEW_SUBSCRIBERS = :new_subscribers - VIDEO_VIEWS = :video_views - REGISTRATIONS = :registrations - CONTENT_VIEWS = :content_views - SEARCHES = :searches - WEBSITE_SCHEDULES = :website_schedules - WEBSITE_SUBMIT_APPLICATIONS = :website_submit_applications - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end + # @param stat_hour [Integer, nil] Hour of the day in the ad account's reporting timezone (0-23). `null` for daily end # @see WhopSDK::Models::AdReportRetrieveResponse#summary @@ -208,10 +518,8 @@ class Summary < WhopSDK::Internal::Type::BaseModel # @!attribute result_label_key # Types of optimization results tracked from external ad platforms # - # @return [Symbol, WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey, nil] - required :result_label_key, - enum: -> { WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey }, - nil?: true + # @return [Symbol, WhopSDK::Models::ResultLabelKeys, nil] + required :result_label_key, enum: -> { WhopSDK::ResultLabelKeys }, nil?: true # @!attribute result_label_override # Advertiser-defined label for the result when `resultLabelKey` is `custom`. @@ -262,7 +570,7 @@ class Summary < WhopSDK::Internal::Type::BaseModel # # @param result_count [Integer, nil] Count of the campaign's primary optimization result (purchases, clicks, etc.) — # - # @param result_label_key [Symbol, WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey, nil] Types of optimization results tracked from external ad platforms + # @param result_label_key [Symbol, WhopSDK::Models::ResultLabelKeys, nil] Types of optimization results tracked from external ad platforms # # @param result_label_override [String, nil] Advertiser-defined label for the result when `resultLabelKey` is `custom`. # @@ -271,41 +579,6 @@ class Summary < WhopSDK::Internal::Type::BaseModel # @param spend [Float] Total spend over the date range in the requested reporting currency. # # @param spend_currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform - - # Types of optimization results tracked from external ad platforms - # - # @see WhopSDK::Models::AdReportRetrieveResponse::Summary#result_label_key - module ResultLabelKey - extend WhopSDK::Internal::Type::Enum - - APP_INSTALLS = :app_installs - MESSAGING_CONVERSATIONS_STARTED = :messaging_conversations_started - POST_ENGAGEMENT = :post_engagement - EVENT_RESPONSES = :event_responses - IMPRESSIONS = :impressions - WEBSITE_PURCHASES = :website_purchases - LANDING_PAGE_VIEWS = :landing_page_views - LEADS = :leads - LINK_CLICKS = :link_clicks - QUALITY_CALLS = :quality_calls - APPOINTMENTS_BOOKED = :appointments_booked - MESSAGING_PURCHASES = :messaging_purchases - PAGE_LIKES = :page_likes - INSTAGRAM_PROFILE_VISITS = :instagram_profile_visits - REACH = :reach - REMINDERS_SET = :reminders_set - NEW_SUBSCRIBERS = :new_subscribers - VIDEO_VIEWS = :video_views - REGISTRATIONS = :registrations - CONTENT_VIEWS = :content_views - SEARCHES = :searches - WEBSITE_SCHEDULES = :website_schedules - WEBSITE_SUBMIT_APPLICATIONS = :website_submit_applications - CUSTOM = :custom - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/whop_sdk/models/ad_unpause_params.rb b/lib/whop_sdk/models/ad_unpause_params.rb new file mode 100644 index 00000000..2089a7d7 --- /dev/null +++ b/lib/whop_sdk/models/ad_unpause_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Ads#unpause + class AdUnpauseParams < 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/dispute.rb b/lib/whop_sdk/models/dispute.rb index d1b86ffb..a5856cc8 100644 --- a/lib/whop_sdk/models/dispute.rb +++ b/lib/whop_sdk/models/dispute.rb @@ -88,8 +88,7 @@ class Dispute < WhopSDK::Internal::Type::BaseModel required :customer_name, String, nil?: true # @!attribute editable - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. # # @return [Boolean, nil] required :editable, WhopSDK::Internal::Type::Boolean, nil?: true @@ -220,7 +219,7 @@ class Dispute < WhopSDK::Internal::Type::BaseModel # # @param customer_name [String, nil] The customer's full name from their payment details, included in the evidence pa # - # @param editable [Boolean, nil] Whether the dispute evidence can still be edited and submitted. Returns true onl + # @param editable [Boolean, nil] Whether the dispute evidence can still be edited and submitted. # # @param needs_response_by [Time, nil] The deadline by which dispute evidence must be submitted. Null if no response de # @@ -400,10 +399,10 @@ class Payment < WhopSDK::Internal::Type::BaseModel required :created_at, Time # @!attribute currency - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [Symbol, WhopSDK::Models::Currency, nil] - required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } # @!attribute dispute_alerted_at # When an alert came in that this transaction will be disputed @@ -476,7 +475,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment was created. # - # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed # diff --git a/lib/whop_sdk/models/dispute_alert_created_webhook_event.rb b/lib/whop_sdk/models/dispute_alert_created_webhook_event.rb index 23d481f7..f2b99b8b 100644 --- a/lib/whop_sdk/models/dispute_alert_created_webhook_event.rb +++ b/lib/whop_sdk/models/dispute_alert_created_webhook_event.rb @@ -227,10 +227,10 @@ class Payment < WhopSDK::Internal::Type::BaseModel required :created_at, Time # @!attribute currency - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [Symbol, WhopSDK::Models::Currency, nil] - required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } # @!attribute dispute_alerted_at # When an alert came in that this transaction will be disputed @@ -306,7 +306,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment was created. # - # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed # diff --git a/lib/whop_sdk/models/dispute_alert_retrieve_response.rb b/lib/whop_sdk/models/dispute_alert_retrieve_response.rb index f155ceaa..dc797e29 100644 --- a/lib/whop_sdk/models/dispute_alert_retrieve_response.rb +++ b/lib/whop_sdk/models/dispute_alert_retrieve_response.rb @@ -172,10 +172,10 @@ class Payment < WhopSDK::Internal::Type::BaseModel required :created_at, Time # @!attribute currency - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [Symbol, WhopSDK::Models::Currency, nil] - required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } # @!attribute dispute_alerted_at # When an alert came in that this transaction will be disputed @@ -250,7 +250,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment was created. # - # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed # diff --git a/lib/whop_sdk/models/dispute_list_response.rb b/lib/whop_sdk/models/dispute_list_response.rb index 3d3b73e2..deabd691 100644 --- a/lib/whop_sdk/models/dispute_list_response.rb +++ b/lib/whop_sdk/models/dispute_list_response.rb @@ -35,8 +35,7 @@ class DisputeListResponse < WhopSDK::Internal::Type::BaseModel required :currency, enum: -> { WhopSDK::Currency } # @!attribute editable - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. # # @return [Boolean, nil] required :editable, WhopSDK::Internal::Type::Boolean, nil?: true @@ -105,7 +104,7 @@ class DisputeListResponse < WhopSDK::Internal::Type::BaseModel # # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for the disputed amount. # - # @param editable [Boolean, nil] Whether the dispute evidence can still be edited and submitted. Returns true onl + # @param editable [Boolean, nil] Whether the dispute evidence can still be edited and submitted. # # @param needs_response_by [Time, nil] The deadline by which dispute evidence must be submitted. Null if no response de # diff --git a/lib/whop_sdk/models/external_ad_status.rb b/lib/whop_sdk/models/external_ad_status.rb new file mode 100644 index 00000000..4aaef4de --- /dev/null +++ b/lib/whop_sdk/models/external_ad_status.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # The status of an external ad. + module ExternalAdStatus + 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 diff --git a/lib/whop_sdk/models/file_create_params.rb b/lib/whop_sdk/models/file_create_params.rb index 14642026..50c71334 100644 --- a/lib/whop_sdk/models/file_create_params.rb +++ b/lib/whop_sdk/models/file_create_params.rb @@ -18,8 +18,8 @@ class FileCreateParams < WhopSDK::Internal::Type::BaseModel # 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 + # @return [Symbol, WhopSDK::Models::FileVisibility, nil] + optional :visibility, enum: -> { WhopSDK::FileVisibility }, nil?: true # @!method initialize(filename:, visibility: nil, request_options: {}) # Some parameter documentations has been truncated, see @@ -27,21 +27,9 @@ class FileCreateParams < WhopSDK::Internal::Type::BaseModel # # @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 visibility [Symbol, WhopSDK::Models::FileVisibility, 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 21dfbc60..72fd7bfd 100644 --- a/lib/whop_sdk/models/file_create_response.rb +++ b/lib/whop_sdk/models/file_create_response.rb @@ -59,8 +59,8 @@ class FileCreateResponse < WhopSDK::Internal::Type::BaseModel # @!attribute visibility # Whether the file is publicly accessible or requires authentication. # - # @return [Symbol, WhopSDK::Models::FileCreateResponse::Visibility] - required :visibility, enum: -> { WhopSDK::Models::FileCreateResponse::Visibility } + # @return [Symbol, WhopSDK::Models::FileVisibility] + required :visibility, enum: -> { WhopSDK::FileVisibility } # @!method initialize(id:, content_type:, filename:, size:, upload_headers:, upload_status:, upload_url:, url:, visibility:) # Some parameter documentations has been truncated, see @@ -84,20 +84,7 @@ class FileCreateResponse < WhopSDK::Internal::Type::BaseModel # # @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 + # @param visibility [Symbol, WhopSDK::Models::FileVisibility] Whether the file is publicly accessible or requires authentication. end end end diff --git a/lib/whop_sdk/models/file_retrieve_response.rb b/lib/whop_sdk/models/file_retrieve_response.rb index 8a0d7614..0c6c333a 100644 --- a/lib/whop_sdk/models/file_retrieve_response.rb +++ b/lib/whop_sdk/models/file_retrieve_response.rb @@ -45,8 +45,8 @@ class FileRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @!attribute visibility # Whether the file is publicly accessible or requires authentication. # - # @return [Symbol, WhopSDK::Models::FileRetrieveResponse::Visibility] - required :visibility, enum: -> { WhopSDK::Models::FileRetrieveResponse::Visibility } + # @return [Symbol, WhopSDK::Models::FileVisibility] + required :visibility, enum: -> { WhopSDK::FileVisibility } # @!method initialize(id:, content_type:, filename:, size:, upload_status:, url:, visibility:) # Some parameter documentations has been truncated, see @@ -66,20 +66,7 @@ class FileRetrieveResponse < WhopSDK::Internal::Type::BaseModel # # @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 + # @param visibility [Symbol, WhopSDK::Models::FileVisibility] Whether the file is publicly accessible or requires authentication. end end end diff --git a/lib/whop_sdk/models/file_visibility.rb b/lib/whop_sdk/models/file_visibility.rb new file mode 100644 index 00000000..00dc9534 --- /dev/null +++ b/lib/whop_sdk/models/file_visibility.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # Controls whether an uploaded file is publicly accessible or requires + # authentication to access. + module FileVisibility + extend WhopSDK::Internal::Type::Enum + + PUBLIC = :public + PRIVATE = :private + + # @!method self.values + # @return [Array] + end + end +end diff --git a/lib/whop_sdk/models/granularities.rb b/lib/whop_sdk/models/granularities.rb new file mode 100644 index 00000000..69b84f10 --- /dev/null +++ b/lib/whop_sdk/models/granularities.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # Bucket size for external ad stat rows. + module Granularities + extend WhopSDK::Internal::Type::Enum + + DAILY = :daily + HOURLY = :hourly + + # @!method self.values + # @return [Array] + end + end +end diff --git a/lib/whop_sdk/models/member_list_response.rb b/lib/whop_sdk/models/member_list_response.rb index 820d4d9b..bdbb62a7 100644 --- a/lib/whop_sdk/models/member_list_response.rb +++ b/lib/whop_sdk/models/member_list_response.rb @@ -20,7 +20,8 @@ class MemberListResponse < WhopSDK::Internal::Type::BaseModel required :access_level, enum: -> { WhopSDK::AccessLevel } # @!attribute company_token_balance - # The member's token balance for this company + # The member's token balance for this company. Computed live from the ledger, not + # from a cache. # # @return [Float] required :company_token_balance, Float @@ -90,7 +91,7 @@ class MemberListResponse < WhopSDK::Internal::Type::BaseModel # # @param access_level [Symbol, WhopSDK::Models::AccessLevel] The access level of the product member. If its admin, the member is an authorize # - # @param company_token_balance [Float] The member's token balance for this company + # @param company_token_balance [Float] The member's token balance for this company. Computed live from the ledger, not # # @param created_at [Time] The datetime the company member was created. # diff --git a/lib/whop_sdk/models/member_retrieve_response.rb b/lib/whop_sdk/models/member_retrieve_response.rb index 6739fced..9a62f717 100644 --- a/lib/whop_sdk/models/member_retrieve_response.rb +++ b/lib/whop_sdk/models/member_retrieve_response.rb @@ -26,7 +26,8 @@ class MemberRetrieveResponse < WhopSDK::Internal::Type::BaseModel required :company, -> { WhopSDK::Models::MemberRetrieveResponse::Company } # @!attribute company_token_balance - # The member's token balance for this company + # The member's token balance for this company. Computed live from the ledger, not + # from a cache. # # @return [Float] required :company_token_balance, Float @@ -98,7 +99,7 @@ class MemberRetrieveResponse < WhopSDK::Internal::Type::BaseModel # # @param company [WhopSDK::Models::MemberRetrieveResponse::Company] The company for the member. # - # @param company_token_balance [Float] The member's token balance for this company + # @param company_token_balance [Float] The member's token balance for this company. Computed live from the ledger, not # # @param created_at [Time] The datetime the company member was created. # diff --git a/lib/whop_sdk/models/membership.rb b/lib/whop_sdk/models/membership.rb index 0ce3dfa0..eb40933d 100644 --- a/lib/whop_sdk/models/membership.rb +++ b/lib/whop_sdk/models/membership.rb @@ -294,10 +294,22 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String - # @!method initialize(id:) + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::Membership::Plan} for more details. + # # The plan the customer purchased to create this membership. # # @param id [String] The unique identifier for the plan. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym end # @see WhopSDK::Models::Membership#product @@ -308,6 +320,13 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute title # The display name of the product shown to customers on the product page and in # search results. @@ -315,7 +334,7 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [String] required :title, String - # @!method initialize(id:, title:) + # @!method initialize(id:, metadata:, title:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::Membership::Product} for more details. # @@ -323,6 +342,8 @@ class Product < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for the product. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + # # @param title [String] The display name of the product shown to customers on the product page and in se end diff --git a/lib/whop_sdk/models/membership_list_response.rb b/lib/whop_sdk/models/membership_list_response.rb index b48dc236..84fa3930 100644 --- a/lib/whop_sdk/models/membership_list_response.rb +++ b/lib/whop_sdk/models/membership_list_response.rb @@ -256,10 +256,22 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String - # @!method initialize(id:) + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::MembershipListResponse::Plan} for more details. + # # The plan the customer purchased to create this membership. # # @param id [String] The unique identifier for the plan. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym end # @see WhopSDK::Models::MembershipListResponse#product @@ -270,6 +282,13 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute title # The display name of the product shown to customers on the product page and in # search results. @@ -277,7 +296,7 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [String] required :title, String - # @!method initialize(id:, title:) + # @!method initialize(id:, metadata:, title:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::MembershipListResponse::Product} for more details. # @@ -285,6 +304,8 @@ class Product < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for the product. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + # # @param title [String] The display name of the product shown to customers on the product page and in se end diff --git a/lib/whop_sdk/models/payment.rb b/lib/whop_sdk/models/payment.rb index af227daa..72e3d405 100644 --- a/lib/whop_sdk/models/payment.rb +++ b/lib/whop_sdk/models/payment.rb @@ -72,10 +72,10 @@ class Payment < WhopSDK::Internal::Type::BaseModel required :created_at, Time # @!attribute currency - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [Symbol, WhopSDK::Models::Currency, nil] - required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } # @!attribute dispute_alerted_at # When an alert came in that this transaction will be disputed @@ -222,23 +222,20 @@ class Payment < WhopSDK::Internal::Type::BaseModel 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. + # The total amount charged to the customer for this payment, including taxes and + # after any discounts. In the currency specified by the currency field. # # @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. + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [String] - required :settlement_currency, String + # @return [Symbol, WhopSDK::Models::Currency] + required :settlement_currency, enum: -> { WhopSDK::Currency } # @!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. + # Deprecated. Always returns null. # # @return [Float, nil] required :settlement_exchange_rate, Float, nil?: true @@ -340,7 +337,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment was created. # - # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed # @@ -386,11 +383,11 @@ 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_amount [Float] The total amount charged to the customer for this payment, including taxes and a # - # @param settlement_currency [String] The currency in which the creator receives payouts and fees are charged (e.g., ' + # @param settlement_currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @param settlement_exchange_rate [Float, nil] The locked exchange rate used to convert from the buyer's payment currency to th + # @param settlement_exchange_rate [Float, nil] Deprecated. Always returns null. # # @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt # @@ -580,8 +577,7 @@ class Dispute < WhopSDK::Internal::Type::BaseModel required :currency, enum: -> { WhopSDK::Currency } # @!attribute editable - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. # # @return [Boolean, nil] required :editable, WhopSDK::Internal::Type::Boolean, nil?: true @@ -626,7 +622,7 @@ class Dispute < WhopSDK::Internal::Type::BaseModel # # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for the disputed amount. # - # @param editable [Boolean, nil] Whether the dispute evidence can still be edited and submitted. Returns true onl + # @param editable [Boolean, nil] Whether the dispute evidence can still be edited and submitted. # # @param needs_response_by [Time, nil] The deadline by which dispute evidence must be submitted. Null if no response de # @@ -869,12 +865,24 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :internal_notes, String, nil?: true - # @!method initialize(id:, internal_notes:) + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, internal_notes:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::Payment::Plan} for more details. + # # The plan attached to this payment. # # @param id [String] The unique identifier for the plan. # # @param internal_notes [String, nil] A personal description or notes section for the business. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym end # @see WhopSDK::Models::Payment#product @@ -885,6 +893,13 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute route # The URL slug used in the product's public link (e.g., 'my-product' in # whop.com/company/my-product). @@ -899,7 +914,7 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [String] required :title, String - # @!method initialize(id:, route:, title:) + # @!method initialize(id:, metadata:, route:, title:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::Payment::Product} for more details. # @@ -907,6 +922,8 @@ class Product < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for the product. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + # # @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 diff --git a/lib/whop_sdk/models/payment_list_response.rb b/lib/whop_sdk/models/payment_list_response.rb index c616b575..327e3501 100644 --- a/lib/whop_sdk/models/payment_list_response.rb +++ b/lib/whop_sdk/models/payment_list_response.rb @@ -73,10 +73,10 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel required :created_at, Time # @!attribute currency - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [Symbol, WhopSDK::Models::Currency, nil] - required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } # @!attribute dispute_alerted_at # When an alert came in that this transaction will be disputed @@ -193,12 +193,10 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel 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. + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [String] - required :settlement_currency, String + # @return [Symbol, WhopSDK::Models::Currency] + required :settlement_currency, enum: -> { WhopSDK::Currency } # @!attribute status # The status of a receipt @@ -291,7 +289,7 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment was created. # - # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed # @@ -329,7 +327,7 @@ 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 settlement_currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt # @@ -639,12 +637,24 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :internal_notes, String, nil?: true - # @!method initialize(id:, internal_notes:) + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, internal_notes:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::PaymentListResponse::Plan} for more details. + # # The plan attached to this payment. # # @param id [String] The unique identifier for the plan. # # @param internal_notes [String, nil] A personal description or notes section for the business. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym end # @see WhopSDK::Models::PaymentListResponse#product @@ -655,6 +665,13 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute route # The URL slug used in the product's public link (e.g., 'my-product' in # whop.com/company/my-product). @@ -669,7 +686,7 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [String] required :title, String - # @!method initialize(id:, route:, title:) + # @!method initialize(id:, metadata:, route:, title:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PaymentListResponse::Product} for more details. # @@ -677,6 +694,8 @@ class Product < WhopSDK::Internal::Type::BaseModel # # @param id [String] The unique identifier for the product. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + # # @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 diff --git a/lib/whop_sdk/models/plan.rb b/lib/whop_sdk/models/plan.rb index ae937a9a..1c45dbd4 100644 --- a/lib/whop_sdk/models/plan.rb +++ b/lib/whop_sdk/models/plan.rb @@ -100,6 +100,13 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Integer, nil] required :member_count, Integer, nil?: true + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute payment_method_configuration # The explicit payment method configuration specifying which payment methods are # enabled or disabled for this plan. Null if the plan uses default settings. @@ -198,7 +205,7 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility] required :visibility, enum: -> { WhopSDK::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:) + # @!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:, metadata:, 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. # @@ -234,6 +241,8 @@ class Plan < WhopSDK::Internal::Type::BaseModel # # @param member_count [Integer, nil] The number of users who currently hold an active membership through this plan. O # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym + # # @param payment_method_configuration [WhopSDK::Models::Plan::PaymentMethodConfiguration, nil] The explicit payment method configuration specifying which payment methods are e # # @param plan_type [Symbol, WhopSDK::Models::PlanType] The billing model for this plan: 'renewal' for recurring subscriptions or 'one_t diff --git a/lib/whop_sdk/models/plan_create_params.rb b/lib/whop_sdk/models/plan_create_params.rb index 9997269f..9ea4bc5a 100644 --- a/lib/whop_sdk/models/plan_create_params.rb +++ b/lib/whop_sdk/models/plan_create_params.rb @@ -92,6 +92,14 @@ class PlanCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Boolean, nil] optional :legacy_payment_method_controls, WhopSDK::Internal::Type::Boolean, nil?: true + # @!attribute metadata + # Custom key-value pairs to store on the plan. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute override_tax_type # Whether or not the tax is included in a plan's price (or if it hasn't been set # up) @@ -165,7 +173,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:, 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: {}) + # @!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, metadata: 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. # @@ -195,6 +203,8 @@ class PlanCreateParams < WhopSDK::Internal::Type::BaseModel # # @param legacy_payment_method_controls [Boolean, nil] Whether this plan uses legacy payment method controls. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs to store on the plan. Included in webhook payloads for pa + # # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u # # @param payment_method_configuration [WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration, nil] Explicit payment method configuration for the plan. When not provided, the compa diff --git a/lib/whop_sdk/models/plan_list_response.rb b/lib/whop_sdk/models/plan_list_response.rb index 97034e64..de6ecac9 100644 --- a/lib/whop_sdk/models/plan_list_response.rb +++ b/lib/whop_sdk/models/plan_list_response.rb @@ -87,6 +87,13 @@ class PlanListResponse < WhopSDK::Internal::Type::BaseModel # @return [Integer, nil] required :member_count, Integer, nil?: true + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute payment_method_configuration # The explicit payment method configuration specifying which payment methods are # enabled or disabled for this plan. Null if the plan uses default settings. @@ -180,7 +187,7 @@ class PlanListResponse < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility] required :visibility, enum: -> { WhopSDK::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:) + # @!method initialize(id:, adaptive_pricing_enabled:, billing_period:, company:, created_at:, currency:, description:, expiration_days:, initial_price:, internal_notes:, invoice:, member_count:, metadata:, 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. # @@ -212,6 +219,8 @@ class PlanListResponse < WhopSDK::Internal::Type::BaseModel # # @param member_count [Integer, nil] The number of users who currently hold an active membership through this plan. O # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym + # # @param payment_method_configuration [WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration, nil] The explicit payment method configuration specifying which payment methods are e # # @param plan_type [Symbol, WhopSDK::Models::PlanType] The billing model for this plan: 'renewal' for recurring subscriptions or 'one_t diff --git a/lib/whop_sdk/models/plan_update_params.rb b/lib/whop_sdk/models/plan_update_params.rb index 7efe493d..f4aed09e 100644 --- a/lib/whop_sdk/models/plan_update_params.rb +++ b/lib/whop_sdk/models/plan_update_params.rb @@ -84,6 +84,14 @@ class PlanUpdateParams < WhopSDK::Internal::Type::BaseModel # @return [Boolean, nil] optional :legacy_payment_method_controls, WhopSDK::Internal::Type::Boolean, nil?: true + # @!attribute metadata + # Custom key-value pairs to store on the plan. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute offer_cancel_discount # Whether to offer a retention discount when a customer attempts to cancel. # @@ -158,7 +166,7 @@ class PlanUpdateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true - # @!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: {}) + # @!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, metadata: 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. # @@ -186,6 +194,8 @@ class PlanUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param legacy_payment_method_controls [Boolean, nil] Whether this plan uses legacy payment method controls. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs to store on the plan. Included in webhook payloads for pa + # # @param offer_cancel_discount [Boolean, nil] Whether to offer a retention discount when a customer attempts to cancel. # # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u diff --git a/lib/whop_sdk/models/product.rb b/lib/whop_sdk/models/product.rb index a4e2f415..c0e4212c 100644 --- a/lib/whop_sdk/models/product.rb +++ b/lib/whop_sdk/models/product.rb @@ -105,6 +105,13 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [Integer] required :member_count, Integer + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute owner_user # The user who owns the company that sells this product. # @@ -157,7 +164,7 @@ class Product < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility] required :visibility, enum: -> { WhopSDK::Visibility } - # @!method initialize(id:, company:, created_at:, custom_cta:, custom_cta_url:, custom_statement_descriptor:, description:, external_identifier:, gallery_images:, global_affiliate_percentage:, global_affiliate_status:, headline:, member_affiliate_percentage:, member_affiliate_status:, member_count:, owner_user:, product_tax_code:, published_reviews_count:, route:, title:, updated_at:, verified:, visibility:) + # @!method initialize(id:, company:, created_at:, custom_cta:, custom_cta_url:, custom_statement_descriptor:, description:, external_identifier:, gallery_images:, global_affiliate_percentage:, global_affiliate_status:, headline:, member_affiliate_percentage:, member_affiliate_status:, member_count:, metadata:, owner_user:, product_tax_code:, published_reviews_count:, route:, title:, updated_at:, verified:, visibility:) # Some parameter documentations has been truncated, see {WhopSDK::Models::Product} # for more details. # @@ -194,6 +201,8 @@ class Product < WhopSDK::Internal::Type::BaseModel # # @param member_count [Integer] The number of users who currently hold an active membership to this product. Ret # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + # # @param owner_user [WhopSDK::Models::Product::OwnerUser] The user who owns the company that sells this product. # # @param product_tax_code [WhopSDK::Models::Product::ProductTaxCode, nil] The tax classification code applied to purchases of this product for sales tax c diff --git a/lib/whop_sdk/models/product_create_params.rb b/lib/whop_sdk/models/product_create_params.rb index 90923448..6c4a22cd 100644 --- a/lib/whop_sdk/models/product_create_params.rb +++ b/lib/whop_sdk/models/product_create_params.rb @@ -90,6 +90,14 @@ class ProductCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] optional :member_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus }, nil?: true + # @!attribute metadata + # Custom key-value pairs to store on the product. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute plan_options # Configuration for an automatically generated plan to attach to this product. # @@ -127,7 +135,7 @@ class ProductCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true - # @!method initialize(company_id:, title:, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, experience_ids: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, plan_options: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, visibility: nil, request_options: {}) + # @!method initialize(company_id:, title:, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, experience_ids: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, metadata: nil, plan_options: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, visibility: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::ProductCreateParams} for more details. # @@ -157,6 +165,8 @@ class ProductCreateParams < WhopSDK::Internal::Type::BaseModel # # @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs to store on the product. Included in webhook payloads for + # # @param plan_options [WhopSDK::Models::ProductCreateParams::PlanOptions, nil] Configuration for an automatically generated plan to attach to this product. # # @param product_tax_code_id [String, nil] The unique identifier of the tax classification code to apply to this product. diff --git a/lib/whop_sdk/models/product_list_item.rb b/lib/whop_sdk/models/product_list_item.rb index 38dd0a8a..1efd69f4 100644 --- a/lib/whop_sdk/models/product_list_item.rb +++ b/lib/whop_sdk/models/product_list_item.rb @@ -36,6 +36,13 @@ class ProductListItem < WhopSDK::Internal::Type::BaseModel # @return [Integer] required :member_count, Integer + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute published_reviews_count # The total number of published customer reviews for this product's company. # @@ -75,7 +82,7 @@ class ProductListItem < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility] required :visibility, enum: -> { WhopSDK::Visibility } - # @!method initialize(id:, created_at:, external_identifier:, headline:, member_count:, published_reviews_count:, route:, title:, updated_at:, verified:, visibility:) + # @!method initialize(id:, created_at:, external_identifier:, headline:, member_count:, metadata:, published_reviews_count:, route:, title:, updated_at:, verified:, visibility:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::ProductListItem} for more details. # @@ -92,6 +99,8 @@ class ProductListItem < WhopSDK::Internal::Type::BaseModel # # @param member_count [Integer] The number of users who currently hold an active membership to this product. Ret # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + # # @param published_reviews_count [Integer] The total number of published customer reviews for this product's company. # # @param route [String] The URL slug used in the product's public link (e.g., 'my-product' in whop.com/c diff --git a/lib/whop_sdk/models/product_update_params.rb b/lib/whop_sdk/models/product_update_params.rb index efde7fc7..3bb5554c 100644 --- a/lib/whop_sdk/models/product_update_params.rb +++ b/lib/whop_sdk/models/product_update_params.rb @@ -85,6 +85,14 @@ class ProductUpdateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] optional :member_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus }, nil?: true + # @!attribute metadata + # Custom key-value pairs to store on the product. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute product_tax_code_id # The unique identifier of the tax classification code to apply to this product. # @@ -128,7 +136,7 @@ class ProductUpdateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true - # @!method initialize(id:, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, gallery_images: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, store_page_config: nil, title: nil, visibility: nil, request_options: {}) + # @!method initialize(id:, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, gallery_images: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, metadata: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, store_page_config: nil, title: nil, visibility: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::ProductUpdateParams} for more details. # @@ -156,6 +164,8 @@ class ProductUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs to store on the product. Included in webhook payloads for + # # @param product_tax_code_id [String, nil] The unique identifier of the tax classification code to apply to this product. # # @param redirect_purchase_url [String, nil] A URL to redirect the customer to after completing a purchase. diff --git a/lib/whop_sdk/models/refund_created_webhook_event.rb b/lib/whop_sdk/models/refund_created_webhook_event.rb index 1c629ac4..0ede905e 100644 --- a/lib/whop_sdk/models/refund_created_webhook_event.rb +++ b/lib/whop_sdk/models/refund_created_webhook_event.rb @@ -192,10 +192,10 @@ class Payment < WhopSDK::Internal::Type::BaseModel required :created_at, Time # @!attribute currency - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [Symbol, WhopSDK::Models::Currency, nil] - required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } # @!attribute dispute_alerted_at # When an alert came in that this transaction will be disputed @@ -219,6 +219,13 @@ class Payment < WhopSDK::Internal::Type::BaseModel }, nil?: true + # @!attribute metadata + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute paid_at # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. @@ -232,6 +239,18 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true + # @!attribute plan + # The plan attached to this payment. + # + # @return [WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment::Plan, nil] + required :plan, -> { WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan }, nil?: true + + # @!attribute product + # The product this payment was made for + # + # @return [WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment::Product, nil] + required :product, -> { WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product }, nil?: true + # @!attribute subtotal # The subtotal to show to the creator (excluding buyer fees). # @@ -275,7 +294,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment::User, nil] required :user, -> { WhopSDK::RefundCreatedWebhookEvent::Data::Payment::User }, nil?: true - # @!method initialize(id:, billing_reason:, card_brand:, card_last4:, created_at:, currency:, dispute_alerted_at:, member:, membership:, paid_at:, payment_method_type:, subtotal:, tax_amount:, tax_behavior:, tax_refunded_amount:, total:, usd_total:, user:) + # @!method initialize(id:, billing_reason:, card_brand:, card_last4:, created_at:, currency:, dispute_alerted_at:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, subtotal:, tax_amount:, tax_behavior:, tax_refunded_amount:, total:, usd_total:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment} for more details. # @@ -292,7 +311,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment was created. # - # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed # @@ -300,10 +319,16 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param membership [WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment::Membership, nil] The membership attached to this payment. # + # @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied over to the chec + # # @param paid_at [Time, nil] The time at which this payment was successfully collected. Null if the payment h # # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used. # + # @param plan [WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment::Plan, nil] The plan attached to this payment. + # + # @param product [WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment::Product, nil] The product this payment was made for + # # @param subtotal [Float, nil] The subtotal to show to the creator (excluding buyer fees). # # @param tax_amount [Float, nil] The calculated amount of the sales/VAT tax (if applicable). @@ -362,6 +387,60 @@ class Membership < WhopSDK::Internal::Type::BaseModel # @param status [Symbol, WhopSDK::Models::MembershipStatus] The state of the membership. end + # @see WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment#plan + class Plan < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the plan. + # + # @return [String] + required :id, String + + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment::Plan} for more + # details. + # + # The plan attached to this payment. + # + # @param id [String] The unique identifier for the plan. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym + end + + # @see WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment::Product} for more + # details. + # + # The product this payment was made for + # + # @param id [String] The unique identifier for the product. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + end + # @see WhopSDK::Models::RefundCreatedWebhookEvent::Data::Payment#user class User < WhopSDK::Internal::Type::BaseModel # @!attribute id diff --git a/lib/whop_sdk/models/refund_retrieve_response.rb b/lib/whop_sdk/models/refund_retrieve_response.rb index e6ce194f..5ce368dc 100644 --- a/lib/whop_sdk/models/refund_retrieve_response.rb +++ b/lib/whop_sdk/models/refund_retrieve_response.rb @@ -138,10 +138,10 @@ class Payment < WhopSDK::Internal::Type::BaseModel required :created_at, Time # @!attribute currency - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [Symbol, WhopSDK::Models::Currency, nil] - required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } # @!attribute dispute_alerted_at # When an alert came in that this transaction will be disputed @@ -161,6 +161,13 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::RefundRetrieveResponse::Payment::Membership, nil] required :membership, -> { WhopSDK::Models::RefundRetrieveResponse::Payment::Membership }, nil?: true + # @!attribute metadata + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute paid_at # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. @@ -174,6 +181,18 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true + # @!attribute plan + # The plan attached to this payment. + # + # @return [WhopSDK::Models::RefundRetrieveResponse::Payment::Plan, nil] + required :plan, -> { WhopSDK::Models::RefundRetrieveResponse::Payment::Plan }, nil?: true + + # @!attribute product + # The product this payment was made for + # + # @return [WhopSDK::Models::RefundRetrieveResponse::Payment::Product, nil] + required :product, -> { WhopSDK::Models::RefundRetrieveResponse::Payment::Product }, nil?: true + # @!attribute subtotal # The subtotal to show to the creator (excluding buyer fees). # @@ -217,7 +236,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::RefundRetrieveResponse::Payment::User, nil] required :user, -> { WhopSDK::Models::RefundRetrieveResponse::Payment::User }, nil?: true - # @!method initialize(id:, billing_reason:, card_brand:, card_last4:, created_at:, currency:, dispute_alerted_at:, member:, membership:, paid_at:, payment_method_type:, subtotal:, tax_amount:, tax_behavior:, tax_refunded_amount:, total:, usd_total:, user:) + # @!method initialize(id:, billing_reason:, card_brand:, card_last4:, created_at:, currency:, dispute_alerted_at:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, subtotal:, tax_amount:, tax_behavior:, tax_refunded_amount:, total:, usd_total:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::RefundRetrieveResponse::Payment} for more details. # @@ -234,7 +253,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment was created. # - # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed # @@ -242,10 +261,16 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param membership [WhopSDK::Models::RefundRetrieveResponse::Payment::Membership, nil] The membership attached to this payment. # + # @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied over to the chec + # # @param paid_at [Time, nil] The time at which this payment was successfully collected. Null if the payment h # # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used. # + # @param plan [WhopSDK::Models::RefundRetrieveResponse::Payment::Plan, nil] The plan attached to this payment. + # + # @param product [WhopSDK::Models::RefundRetrieveResponse::Payment::Product, nil] The product this payment was made for + # # @param subtotal [Float, nil] The subtotal to show to the creator (excluding buyer fees). # # @param tax_amount [Float, nil] The calculated amount of the sales/VAT tax (if applicable). @@ -304,6 +329,58 @@ class Membership < WhopSDK::Internal::Type::BaseModel # @param status [Symbol, WhopSDK::Models::MembershipStatus] The state of the membership. end + # @see WhopSDK::Models::RefundRetrieveResponse::Payment#plan + class Plan < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the plan. + # + # @return [String] + required :id, String + + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::RefundRetrieveResponse::Payment::Plan} for more details. + # + # The plan attached to this payment. + # + # @param id [String] The unique identifier for the plan. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym + end + + # @see WhopSDK::Models::RefundRetrieveResponse::Payment#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::RefundRetrieveResponse::Payment::Product} for more details. + # + # The product this payment was made for + # + # @param id [String] The unique identifier for the product. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + end + # @see WhopSDK::Models::RefundRetrieveResponse::Payment#user class User < WhopSDK::Internal::Type::BaseModel # @!attribute id diff --git a/lib/whop_sdk/models/refund_updated_webhook_event.rb b/lib/whop_sdk/models/refund_updated_webhook_event.rb index 281bf6f3..a94be60e 100644 --- a/lib/whop_sdk/models/refund_updated_webhook_event.rb +++ b/lib/whop_sdk/models/refund_updated_webhook_event.rb @@ -192,10 +192,10 @@ class Payment < WhopSDK::Internal::Type::BaseModel required :created_at, Time # @!attribute currency - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # - # @return [Symbol, WhopSDK::Models::Currency, nil] - required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @return [Symbol, WhopSDK::Models::Currency] + required :currency, enum: -> { WhopSDK::Currency } # @!attribute dispute_alerted_at # When an alert came in that this transaction will be disputed @@ -219,6 +219,13 @@ class Payment < WhopSDK::Internal::Type::BaseModel }, nil?: true + # @!attribute metadata + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute paid_at # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. @@ -232,6 +239,18 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true + # @!attribute plan + # The plan attached to this payment. + # + # @return [WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment::Plan, nil] + required :plan, -> { WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan }, nil?: true + + # @!attribute product + # The product this payment was made for + # + # @return [WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment::Product, nil] + required :product, -> { WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product }, nil?: true + # @!attribute subtotal # The subtotal to show to the creator (excluding buyer fees). # @@ -275,7 +294,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment::User, nil] required :user, -> { WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::User }, nil?: true - # @!method initialize(id:, billing_reason:, card_brand:, card_last4:, created_at:, currency:, dispute_alerted_at:, member:, membership:, paid_at:, payment_method_type:, subtotal:, tax_amount:, tax_behavior:, tax_refunded_amount:, total:, usd_total:, user:) + # @!method initialize(id:, billing_reason:, card_brand:, card_last4:, created_at:, currency:, dispute_alerted_at:, member:, membership:, metadata:, paid_at:, payment_method_type:, plan:, product:, subtotal:, tax_amount:, tax_behavior:, tax_refunded_amount:, total:, usd_total:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment} for more details. # @@ -292,7 +311,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment was created. # - # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform + # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). # # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed # @@ -300,10 +319,16 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param membership [WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment::Membership, nil] The membership attached to this payment. # + # @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied over to the chec + # # @param paid_at [Time, nil] The time at which this payment was successfully collected. Null if the payment h # # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used. # + # @param plan [WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment::Plan, nil] The plan attached to this payment. + # + # @param product [WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment::Product, nil] The product this payment was made for + # # @param subtotal [Float, nil] The subtotal to show to the creator (excluding buyer fees). # # @param tax_amount [Float, nil] The calculated amount of the sales/VAT tax (if applicable). @@ -362,6 +387,60 @@ class Membership < WhopSDK::Internal::Type::BaseModel # @param status [Symbol, WhopSDK::Models::MembershipStatus] The state of the membership. end + # @see WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment#plan + class Plan < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the plan. + # + # @return [String] + required :id, String + + # @!attribute metadata + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment::Plan} for more + # details. + # + # The plan attached to this payment. + # + # @param id [String] The unique identifier for the plan. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the plan. Included in webhook payloads for paym + end + + # @see WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment#product + class Product < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the product. + # + # @return [String] + required :id, String + + # @!attribute metadata + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + # + # @return [Hash{Symbol=>Object}, nil] + required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + + # @!method initialize(id:, metadata:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment::Product} for more + # details. + # + # The product this payment was made for + # + # @param id [String] The unique identifier for the product. + # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs stored on the product. Included in webhook payloads for p + end + # @see WhopSDK::Models::RefundUpdatedWebhookEvent::Data::Payment#user class User < WhopSDK::Internal::Type::BaseModel # @!attribute id diff --git a/lib/whop_sdk/models/resolution_center_case_platform_response.rb b/lib/whop_sdk/models/resolution_center_case_platform_response.rb index bb7062c3..0c17358b 100644 --- a/lib/whop_sdk/models/resolution_center_case_platform_response.rb +++ b/lib/whop_sdk/models/resolution_center_case_platform_response.rb @@ -9,7 +9,6 @@ module ResolutionCenterCasePlatformResponse REQUEST_BUYER_INFO = :request_buyer_info REQUEST_MERCHANT_INFO = :request_merchant_info MERCHANT_WINS = :merchant_wins - PLATFORM_REFUND = :platform_refund MERCHANT_REFUND = :merchant_refund # @!method self.values diff --git a/lib/whop_sdk/models/result_label_keys.rb b/lib/whop_sdk/models/result_label_keys.rb new file mode 100644 index 00000000..c43f5e02 --- /dev/null +++ b/lib/whop_sdk/models/result_label_keys.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # Types of optimization results tracked from external ad platforms + module ResultLabelKeys + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS = :app_installs + MESSAGING_CONVERSATIONS_STARTED = :messaging_conversations_started + POST_ENGAGEMENT = :post_engagement + EVENT_RESPONSES = :event_responses + IMPRESSIONS = :impressions + WEBSITE_PURCHASES = :website_purchases + LANDING_PAGE_VIEWS = :landing_page_views + LEADS = :leads + LINK_CLICKS = :link_clicks + QUALITY_CALLS = :quality_calls + APPOINTMENTS_BOOKED = :appointments_booked + MESSAGING_PURCHASES = :messaging_purchases + PAGE_LIKES = :page_likes + INSTAGRAM_PROFILE_VISITS = :instagram_profile_visits + REACH = :reach + REMINDERS_SET = :reminders_set + NEW_SUBSCRIBERS = :new_subscribers + VIDEO_VIEWS = :video_views + REGISTRATIONS = :registrations + CONTENT_VIEWS = :content_views + SEARCHES = :searches + WEBSITE_SCHEDULES = :website_schedules + WEBSITE_SUBMIT_APPLICATIONS = :website_submit_applications + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + end +end diff --git a/lib/whop_sdk/resources/ad_campaigns.rb b/lib/whop_sdk/resources/ad_campaigns.rb index c92c83b1..96ca7b50 100644 --- a/lib/whop_sdk/resources/ad_campaigns.rb +++ b/lib/whop_sdk/resources/ad_campaigns.rb @@ -16,14 +16,14 @@ class AdCampaigns # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [WhopSDK::Models::AdCampaignRetrieveResponse] + # @return [WhopSDK::Models::AdCampaign] # # @see WhopSDK::Models::AdCampaignRetrieveParams def retrieve(id, params = {}) @client.request( method: :get, path: ["ad_campaigns/%1$s", id], - model: WhopSDK::Models::AdCampaignRetrieveResponse, + model: WhopSDK::AdCampaign, options: params[:request_options] ) end @@ -45,7 +45,7 @@ def retrieve(id, params = {}) # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [WhopSDK::Models::AdCampaignUpdateResponse] + # @return [WhopSDK::Models::AdCampaign] # # @see WhopSDK::Models::AdCampaignUpdateParams def update(id, params = {}) @@ -54,7 +54,7 @@ def update(id, params = {}) method: :patch, path: ["ad_campaigns/%1$s", id], body: parsed, - model: WhopSDK::Models::AdCampaignUpdateResponse, + model: WhopSDK::AdCampaign, options: options ) end @@ -84,7 +84,7 @@ def update(id, params = {}) # # @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 status [Symbol, WhopSDK::Models::AdCampaignStatus, nil] The status of an ad campaign. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -116,14 +116,14 @@ def list(params) # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [WhopSDK::Models::AdCampaignPauseResponse] + # @return [WhopSDK::Models::AdCampaign] # # @see WhopSDK::Models::AdCampaignPauseParams def pause(id, params = {}) @client.request( method: :post, path: ["ad_campaigns/%1$s/pause", id], - model: WhopSDK::Models::AdCampaignPauseResponse, + model: WhopSDK::AdCampaign, options: params[:request_options] ) end @@ -140,14 +140,14 @@ def pause(id, params = {}) # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [WhopSDK::Models::AdCampaignUnpauseResponse] + # @return [WhopSDK::Models::AdCampaign] # # @see WhopSDK::Models::AdCampaignUnpauseParams def unpause(id, params = {}) @client.request( method: :post, path: ["ad_campaigns/%1$s/unpause", id], - model: WhopSDK::Models::AdCampaignUnpauseResponse, + model: WhopSDK::AdCampaign, options: params[:request_options] ) end diff --git a/lib/whop_sdk/resources/ad_groups.rb b/lib/whop_sdk/resources/ad_groups.rb index b514d7bd..88bc86fe 100644 --- a/lib/whop_sdk/resources/ad_groups.rb +++ b/lib/whop_sdk/resources/ad_groups.rb @@ -16,14 +16,14 @@ class AdGroups # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [WhopSDK::Models::AdGroupRetrieveResponse] + # @return [WhopSDK::Models::AdGroup] # # @see WhopSDK::Models::AdGroupRetrieveParams def retrieve(id, params = {}) @client.request( method: :get, path: ["ad_groups/%1$s", id], - model: WhopSDK::Models::AdGroupRetrieveResponse, + model: WhopSDK::AdGroup, options: params[:request_options] ) end @@ -41,7 +41,7 @@ def retrieve(id, params = {}) # # @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 budget_type [Symbol, WhopSDK::Models::AdBudgetType, 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). # @@ -51,11 +51,11 @@ def retrieve(id, params = {}) # # @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 status [Symbol, WhopSDK::Models::AdGroupStatus, nil] The status of an external ad group. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [WhopSDK::Models::AdGroupUpdateResponse] + # @return [WhopSDK::Models::AdGroup] # # @see WhopSDK::Models::AdGroupUpdateParams def update(id, params = {}) @@ -64,7 +64,7 @@ def update(id, params = {}) method: :patch, path: ["ad_groups/%1$s", id], body: parsed, - model: WhopSDK::Models::AdGroupUpdateResponse, + model: WhopSDK::AdGroup, options: options ) end @@ -96,7 +96,7 @@ def update(id, params = {}) # # @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 status [Symbol, WhopSDK::Models::AdGroupStatus, nil] The status of an external ad group. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -140,6 +140,56 @@ def delete(id, params = {}) ) end + # Pauses an ad group. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + # + # @overload pause(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad group to pause. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdGroup] + # + # @see WhopSDK::Models::AdGroupPauseParams + def pause(id, params = {}) + @client.request( + method: :post, + path: ["ad_groups/%1$s/pause", id], + model: WhopSDK::AdGroup, + options: params[:request_options] + ) + end + + # Resumes a paused ad group. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + # + # @overload unpause(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad group to unpause. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::AdGroup] + # + # @see WhopSDK::Models::AdGroupUnpauseParams + def unpause(id, params = {}) + @client.request( + method: :post, + path: ["ad_groups/%1$s/unpause", id], + model: WhopSDK::AdGroup, + options: params[:request_options] + ) + end + # @api private # # @param client [WhopSDK::Client] diff --git a/lib/whop_sdk/resources/ad_reports.rb b/lib/whop_sdk/resources/ad_reports.rb index 819f599b..c5fe497d 100644 --- a/lib/whop_sdk/resources/ad_reports.rb +++ b/lib/whop_sdk/resources/ad_reports.rb @@ -7,29 +7,35 @@ class AdReports # Some parameter documentations has been truncated, see # {WhopSDK::Models::AdReportRetrieveParams} for more details. # - # Performance report for an ad campaign, ad group, or ad. Returns aggregate totals - # and an optional per-day breakdown. Exactly one of `adCampaignId`, `adGroupId`, - # or `adId` must be provided. + # Performance report for a company, ad campaign, ad group, or ad. Always returns + # aggregate `summary` totals. Set `granularity` (`daily`/`hourly`) to additionally + # get a time series, or set `breakdown` (`campaign`/`ad_group`/`ad`) to + # additionally get per-entity rows inside the requested scope. Exactly one of + # `companyId`, `adCampaignId`, `adGroupId`, or `adId` must be provided. # # Required permissions: # # - `ad_campaign:stats:read` # - # @overload retrieve(from:, to:, ad_campaign_id: nil, ad_group_id: nil, ad_id: nil, currency: nil, include_daily: nil, request_options: {}) + # @overload retrieve(from:, to:, ad_campaign_id: nil, ad_group_id: nil, ad_id: nil, breakdown: nil, company_id: nil, currency: nil, granularity: nil, request_options: {}) # # @param from [Time] Inclusive start of the reporting window. # # @param to [Time] Inclusive end of the reporting window. # - # @param ad_campaign_id [String, nil] The unique identifier of an ad campaign. Mutually exclusive with `adGroupId` and + # @param ad_campaign_id [String, nil] The unique identifier of an ad campaign. Mutually exclusive with `companyId`, `a # - # @param ad_group_id [String, nil] The unique identifier of an ad group. Mutually exclusive with `adCampaignId` and + # @param ad_group_id [String, nil] The unique identifier of an ad group. Mutually exclusive with `companyId`, `adCa # - # @param ad_id [String, nil] The unique identifier of an ad. Mutually exclusive with `adCampaignId` and `adGr + # @param ad_id [String, nil] The unique identifier of an ad. Mutually exclusive with `companyId`, `adCampaign + # + # @param breakdown [Symbol, WhopSDK::Models::AdReportRetrieveParams::Breakdown, nil] Entity level to group an ad report by. + # + # @param company_id [String, nil] The unique identifier of a company. Mutually exclusive with `adCampaignId`, `adG # # @param currency [String, nil] ISO 4217 currency code to report `spend` in. Defaults to the company's ads repor # - # @param include_daily [Boolean, nil] When true, includes a per-day breakdown alongside the summary. + # @param granularity [Symbol, WhopSDK::Models::Granularities, nil] Bucket size for external ad stat rows. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/whop_sdk/resources/ads.rb b/lib/whop_sdk/resources/ads.rb index ba37bf4b..36da4a49 100644 --- a/lib/whop_sdk/resources/ads.rb +++ b/lib/whop_sdk/resources/ads.rb @@ -16,14 +16,14 @@ class Ads # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [WhopSDK::Models::AdRetrieveResponse] + # @return [WhopSDK::Models::Ad] # # @see WhopSDK::Models::AdRetrieveParams def retrieve(id, params = {}) @client.request( method: :get, path: ["ads/%1$s", id], - model: WhopSDK::Models::AdRetrieveResponse, + model: WhopSDK::Ad, options: params[:request_options] ) end @@ -57,7 +57,7 @@ def retrieve(id, params = {}) # # @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 status [Symbol, WhopSDK::Models::ExternalAdStatus, nil] The status of an external ad. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -77,6 +77,56 @@ def list(params = {}) ) end + # Pauses an ad. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + # + # @overload pause(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad to pause. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::Ad] + # + # @see WhopSDK::Models::AdPauseParams + def pause(id, params = {}) + @client.request( + method: :post, + path: ["ads/%1$s/pause", id], + model: WhopSDK::Ad, + options: params[:request_options] + ) + end + + # Resumes a paused ad. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + # + # @overload unpause(id, request_options: {}) + # + # @param id [String] The unique identifier of the ad to unpause. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::Ad] + # + # @see WhopSDK::Models::AdUnpauseParams + def unpause(id, params = {}) + @client.request( + method: :post, + path: ["ads/%1$s/unpause", id], + model: WhopSDK::Ad, + options: params[:request_options] + ) + end + # @api private # # @param client [WhopSDK::Client] diff --git a/lib/whop_sdk/resources/files.rb b/lib/whop_sdk/resources/files.rb index 1be513cf..b021f6f0 100644 --- a/lib/whop_sdk/resources/files.rb +++ b/lib/whop_sdk/resources/files.rb @@ -14,7 +14,7 @@ class Files # # @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 visibility [Symbol, WhopSDK::Models::FileVisibility, nil] Controls whether an uploaded file is publicly accessible or requires authenticat # # @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 7d5f397c..13a5eea1 100644 --- a/lib/whop_sdk/resources/plans.rb +++ b/lib/whop_sdk/resources/plans.rb @@ -16,7 +16,7 @@ class Plans # - `access_pass:basic:read` # - `plan:basic:read` # - # @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: {}) + # @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, metadata: 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. # @@ -44,6 +44,8 @@ class Plans # # @param legacy_payment_method_controls [Boolean, nil] Whether this plan uses legacy payment method controls. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs to store on the plan. Included in webhook payloads for pa + # # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u # # @param payment_method_configuration [WhopSDK::Models::PlanCreateParams::PaymentMethodConfiguration, nil] Explicit payment method configuration for the plan. When not provided, the compa @@ -112,7 +114,7 @@ def retrieve(id, params = {}) # - `access_pass:basic:read` # - `plan:basic:read` # - # @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: {}) + # @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, metadata: 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. # @@ -138,6 +140,8 @@ def retrieve(id, params = {}) # # @param legacy_payment_method_controls [Boolean, nil] Whether this plan uses legacy payment method controls. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs to store on the plan. Included in webhook payloads for pa + # # @param offer_cancel_discount [Boolean, nil] Whether to offer a retention discount when a customer attempts to cancel. # # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u diff --git a/lib/whop_sdk/resources/products.rb b/lib/whop_sdk/resources/products.rb index 520f7683..dcdfe65e 100644 --- a/lib/whop_sdk/resources/products.rb +++ b/lib/whop_sdk/resources/products.rb @@ -15,7 +15,7 @@ class Products # - `access_pass:create` # - `access_pass:basic:read` # - # @overload create(company_id:, title:, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, experience_ids: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, plan_options: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, visibility: nil, request_options: {}) + # @overload create(company_id:, title:, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, experience_ids: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, metadata: nil, plan_options: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, visibility: nil, request_options: {}) # # @param company_id [String] The unique identifier of the company to create this product for. # @@ -43,6 +43,8 @@ class Products # # @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs to store on the product. Included in webhook payloads for + # # @param plan_options [WhopSDK::Models::ProductCreateParams::PlanOptions, nil] Configuration for an automatically generated plan to attach to this product. # # @param product_tax_code_id [String, nil] The unique identifier of the tax classification code to apply to this product. @@ -105,7 +107,7 @@ def retrieve(id, params = {}) # - `access_pass:update` # - `access_pass:basic:read` # - # @overload update(id, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, gallery_images: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, store_page_config: nil, title: nil, visibility: nil, request_options: {}) + # @overload update(id, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, gallery_images: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, metadata: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, send_welcome_message: nil, store_page_config: nil, title: nil, visibility: nil, request_options: {}) # # @param id [String] The unique identifier of the product to update. # @@ -131,6 +133,8 @@ def retrieve(id, params = {}) # # @param member_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for a product. # + # @param metadata [Hash{Symbol=>Object}, nil] Custom key-value pairs to store on the product. Included in webhook payloads for + # # @param product_tax_code_id [String, nil] The unique identifier of the tax classification code to apply to this product. # # @param redirect_purchase_url [String, nil] A URL to redirect the customer to after completing a purchase. diff --git a/lib/whop_sdk/resources/refunds.rb b/lib/whop_sdk/resources/refunds.rb index dc9aba10..a0798a01 100644 --- a/lib/whop_sdk/resources/refunds.rb +++ b/lib/whop_sdk/resources/refunds.rb @@ -9,6 +9,8 @@ class Refunds # Required permissions: # # - `payment:basic:read` + # - `plan:basic:read` + # - `access_pass:basic:read` # - `member:email:read` # - `member:basic:read` # - `member:phone:read` diff --git a/lib/whop_sdk/version.rb b/lib/whop_sdk/version.rb index eed1ba80..d29a6ab9 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.39" + VERSION = "0.0.40" end diff --git a/rbi/whop_sdk/models.rbi b/rbi/whop_sdk/models.rbi index 24a95583..54547889 100644 --- a/rbi/whop_sdk/models.rbi +++ b/rbi/whop_sdk/models.rbi @@ -9,30 +9,52 @@ module WhopSDK AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams + Ad = WhopSDK::Models::Ad + + AdBudgetType = WhopSDK::Models::AdBudgetType + + AdCampaign = WhopSDK::Models::AdCampaign + AdCampaignListParams = WhopSDK::Models::AdCampaignListParams AdCampaignPauseParams = WhopSDK::Models::AdCampaignPauseParams + AdCampaignPlatform = WhopSDK::Models::AdCampaignPlatform + AdCampaignRetrieveParams = WhopSDK::Models::AdCampaignRetrieveParams + AdCampaignStatus = WhopSDK::Models::AdCampaignStatus + AdCampaignUnpauseParams = WhopSDK::Models::AdCampaignUnpauseParams AdCampaignUpdateParams = WhopSDK::Models::AdCampaignUpdateParams + AdGroup = WhopSDK::Models::AdGroup + AdGroupDeleteParams = WhopSDK::Models::AdGroupDeleteParams AdGroupListParams = WhopSDK::Models::AdGroupListParams + AdGroupPauseParams = WhopSDK::Models::AdGroupPauseParams + AdGroupRetrieveParams = WhopSDK::Models::AdGroupRetrieveParams + AdGroupStatus = WhopSDK::Models::AdGroupStatus + + AdGroupUnpauseParams = WhopSDK::Models::AdGroupUnpauseParams + AdGroupUpdateParams = WhopSDK::Models::AdGroupUpdateParams AdListParams = WhopSDK::Models::AdListParams + AdPauseParams = WhopSDK::Models::AdPauseParams + AdReportRetrieveParams = WhopSDK::Models::AdReportRetrieveParams AdRetrieveParams = WhopSDK::Models::AdRetrieveParams + AdUnpauseParams = WhopSDK::Models::AdUnpauseParams + Affiliate = WhopSDK::Models::Affiliate AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams @@ -337,6 +359,8 @@ module WhopSDK ExperienceUpdateParams = WhopSDK::Models::ExperienceUpdateParams + ExternalAdStatus = WhopSDK::Models::ExternalAdStatus + FeeMarkupCreateParams = WhopSDK::Models::FeeMarkupCreateParams FeeMarkupDeleteParams = WhopSDK::Models::FeeMarkupDeleteParams @@ -349,6 +373,8 @@ module WhopSDK FileRetrieveParams = WhopSDK::Models::FileRetrieveParams + FileVisibility = WhopSDK::Models::FileVisibility + Forum = WhopSDK::Models::Forum ForumListParams = WhopSDK::Models::ForumListParams @@ -373,6 +399,8 @@ module WhopSDK GlobalAffiliateStatus = WhopSDK::Models::GlobalAffiliateStatus + Granularities = WhopSDK::Models::Granularities + Invoice = WhopSDK::Models::Invoice InvoiceCreatedWebhookEvent = WhopSDK::Models::InvoiceCreatedWebhookEvent @@ -633,6 +661,8 @@ module WhopSDK ResolutionCenterCaseUpdatedWebhookEvent = WhopSDK::Models::ResolutionCenterCaseUpdatedWebhookEvent + ResultLabelKeys = WhopSDK::Models::ResultLabelKeys + ReviewListParams = WhopSDK::Models::ReviewListParams ReviewRetrieveParams = WhopSDK::Models::ReviewRetrieveParams diff --git a/rbi/whop_sdk/models/ad.rbi b/rbi/whop_sdk/models/ad.rbi new file mode 100644 index 00000000..c6359b03 --- /dev/null +++ b/rbi/whop_sdk/models/ad.rbi @@ -0,0 +1,143 @@ +# typed: strong + +module WhopSDK + module Models + class Ad < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias { T.any(WhopSDK::Ad, WhopSDK::Internal::AnyHash) } + + # The unique identifier for this ad. + sig { returns(String) } + attr_accessor :id + + # The ad campaign this ad belongs to. + sig { returns(WhopSDK::Ad::AdCampaign) } + attr_reader :ad_campaign + + sig { params(ad_campaign: WhopSDK::Ad::AdCampaign::OrHash).void } + attr_writer :ad_campaign + + # The parent ad group this ad belongs to. + sig { returns(WhopSDK::Ad::AdGroup) } + attr_reader :ad_group + + sig { params(ad_group: WhopSDK::Ad::AdGroup::OrHash).void } + attr_writer :ad_group + + # When the ad was created. + sig { returns(Time) } + attr_accessor :created_at + + # The external ad platform this ad is running on (e.g., meta, tiktok). + sig { returns(WhopSDK::AdCampaignPlatform::TaggedSymbol) } + attr_accessor :platform + + # Current delivery status of the ad. + sig { returns(WhopSDK::ExternalAdStatus::TaggedSymbol) } + attr_accessor :status + + # The display title of the ad. Falls back to the creative set caption when unset. + sig { returns(T.nilable(String)) } + attr_accessor :title + + # 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, + ad_campaign: WhopSDK::Ad::AdCampaign::OrHash, + ad_group: WhopSDK::Ad::AdGroup::OrHash, + created_at: Time, + platform: WhopSDK::AdCampaignPlatform::OrSymbol, + status: WhopSDK::ExternalAdStatus::OrSymbol, + title: T.nilable(String), + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for this ad. + id:, + # The ad campaign this ad belongs to. + ad_campaign:, + # The parent ad group this ad belongs to. + ad_group:, + # When the ad was created. + created_at:, + # The external ad platform this ad is running on (e.g., meta, tiktok). + platform:, + # Current delivery status of the ad. + status:, + # The display title of the ad. Falls back to the creative set caption when unset. + title:, + # When the ad was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + ad_campaign: WhopSDK::Ad::AdCampaign, + ad_group: WhopSDK::Ad::AdGroup, + created_at: Time, + platform: WhopSDK::AdCampaignPlatform::TaggedSymbol, + status: WhopSDK::ExternalAdStatus::TaggedSymbol, + title: T.nilable(String), + updated_at: Time + } + ) + end + def to_hash + end + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Ad::AdCampaign, WhopSDK::Internal::AnyHash) + end + + # The unique identifier for this ad campaign. + sig { returns(String) } + attr_accessor :id + + # The ad campaign this ad belongs to. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for this ad campaign. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + + class AdGroup < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Ad::AdGroup, WhopSDK::Internal::AnyHash) + end + + # The unique identifier for this ad group. + sig { returns(String) } + attr_accessor :id + + # The parent ad group this ad belongs to. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for this ad group. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_budget_type.rbi b/rbi/whop_sdk/models/ad_budget_type.rbi new file mode 100644 index 00000000..2f17d02f --- /dev/null +++ b/rbi/whop_sdk/models/ad_budget_type.rbi @@ -0,0 +1,20 @@ +# typed: strong + +module WhopSDK + module Models + # The budget type for an ad campaign or ad group. + module AdBudgetType + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::AdBudgetType) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DAILY = T.let(:daily, WhopSDK::AdBudgetType::TaggedSymbol) + LIFETIME = T.let(:lifetime, WhopSDK::AdBudgetType::TaggedSymbol) + + sig { override.returns(T::Array[WhopSDK::AdBudgetType::TaggedSymbol]) } + def self.values + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_campaign_pause_response.rbi b/rbi/whop_sdk/models/ad_campaign.rbi similarity index 54% rename from rbi/whop_sdk/models/ad_campaign_pause_response.rbi rename to rbi/whop_sdk/models/ad_campaign.rbi index 3f8a5489..3ad3f5b4 100644 --- a/rbi/whop_sdk/models/ad_campaign_pause_response.rbi +++ b/rbi/whop_sdk/models/ad_campaign.rbi @@ -2,14 +2,9 @@ module WhopSDK module Models - class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel + class AdCampaign < WhopSDK::Internal::Type::BaseModel OrHash = - T.type_alias do - T.any( - WhopSDK::Models::AdCampaignPauseResponse, - WhopSDK::Internal::AnyHash - ) - end + T.type_alias { T.any(WhopSDK::AdCampaign, WhopSDK::Internal::AnyHash) } # The unique identifier for this ad campaign. sig { returns(String) } @@ -20,13 +15,7 @@ module WhopSDK attr_accessor :budget # The budget type for an ad campaign or ad group. - sig do - returns( - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::BudgetType::TaggedSymbol - ) - ) - end + sig { returns(T.nilable(WhopSDK::AdBudgetType::TaggedSymbol)) } attr_accessor :budget_type # When the ad campaign was created. @@ -34,46 +23,32 @@ module WhopSDK attr_accessor :created_at # The user who created this ad campaign. - sig { returns(WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser) } + sig { returns(WhopSDK::AdCampaign::CreatedByUser) } attr_reader :created_by_user sig do - params( - created_by_user: - WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser::OrHash - ).void + params(created_by_user: WhopSDK::AdCampaign::CreatedByUser::OrHash).void end attr_writer :created_by_user # Meta-specific campaign configuration (objective, budget mode, etc.). Null for # non-Meta campaigns. - sig do - returns(T.nilable(WhopSDK::Models::AdCampaignPauseResponse::MetaConfig)) - end + sig { returns(T.nilable(WhopSDK::AdCampaign::MetaConfig)) } attr_reader :meta_config sig do params( - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::OrHash - ) + meta_config: T.nilable(WhopSDK::AdCampaign::MetaConfig::OrHash) ).void end attr_writer :meta_config # The external ad platform this campaign is running on (e.g., meta, tiktok). - sig do - returns( - WhopSDK::Models::AdCampaignPauseResponse::Platform::TaggedSymbol - ) - end + sig { returns(WhopSDK::AdCampaignPlatform::TaggedSymbol) } attr_accessor :platform # Current status of the campaign (active, paused, or inactive). - sig do - returns(WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol) - end + sig { returns(WhopSDK::AdCampaignStatus::TaggedSymbol) } attr_accessor :status # The campaign name shown in the Whop dashboard. @@ -93,20 +68,12 @@ module WhopSDK params( id: String, budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::BudgetType::OrSymbol - ), + budget_type: T.nilable(WhopSDK::AdBudgetType::OrSymbol), created_at: Time, - created_by_user: - WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser::OrHash, - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::OrHash - ), - platform: - WhopSDK::Models::AdCampaignPauseResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdCampaignPauseResponse::Status::OrSymbol, + created_by_user: WhopSDK::AdCampaign::CreatedByUser::OrHash, + meta_config: T.nilable(WhopSDK::AdCampaign::MetaConfig::OrHash), + platform: WhopSDK::AdCampaignPlatform::OrSymbol, + status: WhopSDK::AdCampaignStatus::OrSymbol, title: String, total_spend: Float, updated_at: Time @@ -144,19 +111,12 @@ module WhopSDK { id: String, budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::BudgetType::TaggedSymbol - ), + budget_type: T.nilable(WhopSDK::AdBudgetType::TaggedSymbol), created_at: Time, - created_by_user: - WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, - meta_config: - T.nilable(WhopSDK::Models::AdCampaignPauseResponse::MetaConfig), - platform: - WhopSDK::Models::AdCampaignPauseResponse::Platform::TaggedSymbol, - status: - WhopSDK::Models::AdCampaignPauseResponse::Status::TaggedSymbol, + created_by_user: WhopSDK::AdCampaign::CreatedByUser, + meta_config: T.nilable(WhopSDK::AdCampaign::MetaConfig), + platform: WhopSDK::AdCampaignPlatform::TaggedSymbol, + status: WhopSDK::AdCampaignStatus::TaggedSymbol, title: String, total_spend: Float, updated_at: Time @@ -166,43 +126,11 @@ module WhopSDK 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::Models::AdCampaignPauseResponse::BudgetType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DAILY = - T.let( - :daily, - WhopSDK::Models::AdCampaignPauseResponse::BudgetType::TaggedSymbol - ) - LIFETIME = - T.let( - :lifetime, - WhopSDK::Models::AdCampaignPauseResponse::BudgetType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignPauseResponse::BudgetType::TaggedSymbol - ] - ) - end - def self.values - end - end - class CreatedByUser < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, + WhopSDK::AdCampaign::CreatedByUser, WhopSDK::Internal::AnyHash ) end @@ -247,10 +175,7 @@ module WhopSDK class MetaConfig < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do - T.any( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig, - WhopSDK::Internal::AnyHash - ) + T.any(WhopSDK::AdCampaign::MetaConfig, WhopSDK::Internal::AnyHash) end # Bid cap amount in cents. Only used when bid_strategy is bid_cap. @@ -261,7 +186,7 @@ module WhopSDK sig do returns( T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::BidStrategy::TaggedSymbol ) ) end @@ -277,7 +202,7 @@ module WhopSDK sig do returns( T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ) ) end @@ -290,9 +215,7 @@ module WhopSDK # The campaign objective that determines how Meta optimizes delivery. sig do returns( - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::TaggedSymbol - ) + T.nilable(WhopSDK::AdCampaign::MetaConfig::Objective::TaggedSymbol) ) end attr_accessor :objective @@ -309,9 +232,7 @@ module WhopSDK # The campaign status as set by the advertiser (active or paused). sig do returns( - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status::TaggedSymbol - ) + T.nilable(WhopSDK::AdCampaign::MetaConfig::Status::TaggedSymbol) ) end attr_accessor :status @@ -322,25 +243,18 @@ module WhopSDK params( bid_amount: T.nilable(Integer), bid_strategy: - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy::OrSymbol - ), + T.nilable(WhopSDK::AdCampaign::MetaConfig::BidStrategy::OrSymbol), budget_optimization: T.nilable(T::Boolean), effective_status: T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::OrSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::OrSymbol ), end_time: T.nilable(String), objective: - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::OrSymbol - ), + T.nilable(WhopSDK::AdCampaign::MetaConfig::Objective::OrSymbol), special_categories: T.nilable(T::Array[String]), start_time: T.nilable(String), - status: - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status::OrSymbol - ) + status: T.nilable(WhopSDK::AdCampaign::MetaConfig::Status::OrSymbol) ).returns(T.attached_class) end def self.new( @@ -374,24 +288,22 @@ module WhopSDK bid_amount: T.nilable(Integer), bid_strategy: T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::BidStrategy::TaggedSymbol ), budget_optimization: T.nilable(T::Boolean), effective_status: T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ), end_time: T.nilable(String), objective: T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::Objective::TaggedSymbol ), special_categories: T.nilable(T::Array[String]), start_time: T.nilable(String), status: - T.nilable( - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status::TaggedSymbol - ) + T.nilable(WhopSDK::AdCampaign::MetaConfig::Status::TaggedSymbol) } ) end @@ -404,33 +316,30 @@ module WhopSDK TaggedSymbol = T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy - ) + T.all(Symbol, WhopSDK::AdCampaign::MetaConfig::BidStrategy) end OrSymbol = T.type_alias { T.any(Symbol, String) } LOWEST_COST = T.let( :lowest_cost, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::BidStrategy::TaggedSymbol ) BID_CAP = T.let( :bid_cap, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::BidStrategy::TaggedSymbol ) COST_CAP = T.let( :cost_cap, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::BidStrategy::TaggedSymbol ) sig do override.returns( T::Array[ - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::BidStrategy::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::BidStrategy::TaggedSymbol ] ) end @@ -445,48 +354,45 @@ module WhopSDK TaggedSymbol = T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus - ) + T.all(Symbol, WhopSDK::AdCampaign::MetaConfig::EffectiveStatus) end OrSymbol = T.type_alias { T.any(Symbol, String) } ACTIVE = T.let( :active, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ) PAUSED = T.let( :paused, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ) DELETED = T.let( :deleted, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ) IN_REVIEW = T.let( :in_review, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ) REJECTED = T.let( :rejected, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ) WITH_ISSUES = T.let( :with_issues, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ) sig do override.returns( T::Array[ - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::EffectiveStatus::TaggedSymbol ] ) end @@ -500,44 +406,39 @@ module WhopSDK TaggedSymbol = T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective - ) + T.all(Symbol, WhopSDK::AdCampaign::MetaConfig::Objective) end OrSymbol = T.type_alias { T.any(Symbol, String) } AWARENESS = T.let( :awareness, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::Objective::TaggedSymbol ) TRAFFIC = T.let( :traffic, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::Objective::TaggedSymbol ) ENGAGEMENT = T.let( :engagement, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::Objective::TaggedSymbol ) LEADS = T.let( :leads, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::Objective::TaggedSymbol ) SALES = T.let( :sales, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::Objective::TaggedSymbol ) sig do override.returns( - T::Array[ - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Objective::TaggedSymbol - ] + T::Array[WhopSDK::AdCampaign::MetaConfig::Objective::TaggedSymbol] ) end def self.values @@ -550,119 +451,30 @@ module WhopSDK TaggedSymbol = T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status - ) + T.all(Symbol, WhopSDK::AdCampaign::MetaConfig::Status) end OrSymbol = T.type_alias { T.any(Symbol, String) } ACTIVE = T.let( :active, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::Status::TaggedSymbol ) PAUSED = T.let( :paused, - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status::TaggedSymbol + WhopSDK::AdCampaign::MetaConfig::Status::TaggedSymbol ) sig do override.returns( - T::Array[ - WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::Status::TaggedSymbol - ] + T::Array[WhopSDK::AdCampaign::MetaConfig::Status::TaggedSymbol] ) end def self.values end end end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - 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 - - # 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 - ) - 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_list_params.rbi b/rbi/whop_sdk/models/ad_campaign_list_params.rbi index 5f29fc72..2113d056 100644 --- a/rbi/whop_sdk/models/ad_campaign_list_params.rbi +++ b/rbi/whop_sdk/models/ad_campaign_list_params.rbi @@ -44,9 +44,7 @@ module WhopSDK attr_accessor :query # The status of an ad campaign. - sig do - returns(T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol)) - end + sig { returns(T.nilable(WhopSDK::AdCampaignStatus::OrSymbol)) } attr_accessor :status sig do @@ -59,7 +57,7 @@ module WhopSDK first: T.nilable(Integer), last: T.nilable(Integer), query: T.nilable(String), - status: T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::AdCampaignStatus::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -97,46 +95,13 @@ module WhopSDK first: T.nilable(Integer), last: T.nilable(Integer), query: T.nilable(String), - status: T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::AdCampaignStatus::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) - 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 index 556f3bf7..0de2ba00 100644 --- a/rbi/whop_sdk/models/ad_campaign_list_response.rbi +++ b/rbi/whop_sdk/models/ad_campaign_list_response.rbi @@ -20,13 +20,7 @@ module WhopSDK attr_accessor :budget # The budget type for an ad campaign or ad group. - sig do - returns( - T.nilable( - WhopSDK::Models::AdCampaignListResponse::BudgetType::TaggedSymbol - ) - ) - end + sig { returns(T.nilable(WhopSDK::AdBudgetType::TaggedSymbol)) } attr_accessor :budget_type # When the ad campaign was created. @@ -34,15 +28,11 @@ module WhopSDK attr_accessor :created_at # The external ad platform this campaign is running on (e.g., meta, tiktok). - sig do - returns(WhopSDK::Models::AdCampaignListResponse::Platform::TaggedSymbol) - end + sig { returns(WhopSDK::AdCampaignPlatform::TaggedSymbol) } attr_accessor :platform # Current status of the campaign (active, paused, or inactive). - sig do - returns(WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol) - end + sig { returns(WhopSDK::AdCampaignStatus::TaggedSymbol) } attr_accessor :status # The campaign name shown in the Whop dashboard. @@ -62,13 +52,10 @@ module WhopSDK params( id: String, budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignListResponse::BudgetType::OrSymbol - ), + budget_type: T.nilable(WhopSDK::AdBudgetType::OrSymbol), created_at: Time, - platform: WhopSDK::Models::AdCampaignListResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdCampaignListResponse::Status::OrSymbol, + platform: WhopSDK::AdCampaignPlatform::OrSymbol, + status: WhopSDK::AdCampaignStatus::OrSymbol, title: String, total_spend: Float, updated_at: Time @@ -101,15 +88,10 @@ module WhopSDK { id: String, budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignListResponse::BudgetType::TaggedSymbol - ), + budget_type: T.nilable(WhopSDK::AdBudgetType::TaggedSymbol), created_at: Time, - platform: - WhopSDK::Models::AdCampaignListResponse::Platform::TaggedSymbol, - status: - WhopSDK::Models::AdCampaignListResponse::Status::TaggedSymbol, + platform: WhopSDK::AdCampaignPlatform::TaggedSymbol, + status: WhopSDK::AdCampaignStatus::TaggedSymbol, title: String, total_spend: Float, updated_at: Time @@ -118,122 +100,6 @@ module WhopSDK 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::Models::AdCampaignListResponse::BudgetType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DAILY = - T.let( - :daily, - WhopSDK::Models::AdCampaignListResponse::BudgetType::TaggedSymbol - ) - LIFETIME = - T.let( - :lifetime, - WhopSDK::Models::AdCampaignListResponse::BudgetType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignListResponse::BudgetType::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - 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 - - # 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 - ) - 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_platform.rbi b/rbi/whop_sdk/models/ad_campaign_platform.rbi new file mode 100644 index 00000000..17c5a732 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_platform.rbi @@ -0,0 +1,22 @@ +# typed: strong + +module WhopSDK + module Models + # The platforms where an ad campaign can run. + module AdCampaignPlatform + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::AdCampaignPlatform) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + META = T.let(:meta, WhopSDK::AdCampaignPlatform::TaggedSymbol) + TIKTOK = T.let(:tiktok, WhopSDK::AdCampaignPlatform::TaggedSymbol) + + sig do + override.returns(T::Array[WhopSDK::AdCampaignPlatform::TaggedSymbol]) + end + def self.values + 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 deleted file mode 100644 index 084d6858..00000000 --- a/rbi/whop_sdk/models/ad_campaign_retrieve_response.rbi +++ /dev/null @@ -1,679 +0,0 @@ -# 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 this ad campaign. - sig { returns(String) } - attr_accessor :id - - # Total budget 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::Models::AdCampaignRetrieveResponse::BudgetType::TaggedSymbol - ) - ) - end - attr_accessor :budget_type - - # When the ad campaign was created. - sig { returns(Time) } - attr_accessor :created_at - - # The user who created this ad 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 - - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - sig do - returns( - T.nilable(WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig) - ) - end - attr_reader :meta_config - - sig do - params( - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::OrHash - ) - ).void - end - attr_writer :meta_config - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - sig do - returns( - WhopSDK::Models::AdCampaignRetrieveResponse::Platform::TaggedSymbol - ) - end - attr_accessor :platform - - # Current status of the campaign (active, paused, or inactive). - sig do - returns( - WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol - ) - end - attr_accessor :status - - # The campaign name shown in the Whop dashboard. - sig { returns(String) } - attr_accessor :title - - # Total amount spent in dollars. - sig { returns(Float) } - attr_accessor :total_spend - - # When 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, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType::OrSymbol - ), - created_at: Time, - created_by_user: - WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser::OrHash, - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::OrHash - ), - platform: - WhopSDK::Models::AdCampaignRetrieveResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdCampaignRetrieveResponse::Status::OrSymbol, - title: String, - total_spend: Float, - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # The unique identifier for this ad campaign. - id:, - # Total budget in dollars. - budget:, - # The budget type for an ad campaign or ad group. - budget_type:, - # When the ad campaign was created. - created_at:, - # The user who created this ad campaign. - created_by_user:, - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - meta_config:, - # The external ad platform this campaign is running on (e.g., meta, tiktok). - platform:, - # Current status of the campaign (active, paused, or inactive). - status:, - # The campaign name shown in the Whop dashboard. - title:, - # Total amount spent in dollars. - total_spend:, - # When the ad campaign was last updated. - updated_at: - ) - end - - sig do - override.returns( - { - id: String, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType::TaggedSymbol - ), - created_at: Time, - created_by_user: - WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig - ), - platform: - WhopSDK::Models::AdCampaignRetrieveResponse::Platform::TaggedSymbol, - status: - WhopSDK::Models::AdCampaignRetrieveResponse::Status::TaggedSymbol, - title: String, - total_spend: Float, - updated_at: Time - } - ) - 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::Models::AdCampaignRetrieveResponse::BudgetType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DAILY = - T.let( - :daily, - WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType::TaggedSymbol - ) - LIFETIME = - T.let( - :lifetime, - WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType::TaggedSymbol - ] - ) - end - def self.values - 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 this ad 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 - - class MetaConfig < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig, - 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::MetaConfig::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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - sig do - returns( - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - ) - end - attr_accessor :effective_status - - # 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::MetaConfig::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::MetaConfig::Status::TaggedSymbol - ) - ) - end - attr_accessor :status - - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - sig do - params( - bid_amount: T.nilable(Integer), - bid_strategy: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::BidStrategy::OrSymbol - ), - budget_optimization: T.nilable(T::Boolean), - effective_status: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::OrSymbol - ), - end_time: T.nilable(String), - objective: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Objective::OrSymbol - ), - special_categories: T.nilable(T::Array[String]), - start_time: T.nilable(String), - status: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - effective_status:, - # 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::MetaConfig::BidStrategy::TaggedSymbol - ), - budget_optimization: T.nilable(T::Boolean), - effective_status: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ), - end_time: T.nilable(String), - objective: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Objective::TaggedSymbol - ), - special_categories: T.nilable(T::Array[String]), - start_time: T.nilable(String), - status: - T.nilable( - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::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::MetaConfig::BidStrategy - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - LOWEST_COST = - T.let( - :lowest_cost, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - BID_CAP = - T.let( - :bid_cap, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - COST_CAP = - T.let( - :cost_cap, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::BidStrategy::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACTIVE = - T.let( - :active, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - PAUSED = - T.let( - :paused, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - DELETED = - T.let( - :deleted, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - IN_REVIEW = - T.let( - :in_review, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - REJECTED = - T.let( - :rejected, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - WITH_ISSUES = - T.let( - :with_issues, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::EffectiveStatus::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::MetaConfig::Objective - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - AWARENESS = - T.let( - :awareness, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Objective::TaggedSymbol - ) - TRAFFIC = - T.let( - :traffic, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Objective::TaggedSymbol - ) - ENGAGEMENT = - T.let( - :engagement, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Objective::TaggedSymbol - ) - LEADS = - T.let( - :leads, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Objective::TaggedSymbol - ) - SALES = - T.let( - :sales, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Objective::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::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::MetaConfig::Status - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACTIVE = - T.let( - :active, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Status::TaggedSymbol - ) - PAUSED = - T.let( - :paused, - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Status::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::Status::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - 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 - - # 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 - ) - 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_status.rbi b/rbi/whop_sdk/models/ad_campaign_status.rbi new file mode 100644 index 00000000..c3ed8798 --- /dev/null +++ b/rbi/whop_sdk/models/ad_campaign_status.rbi @@ -0,0 +1,27 @@ +# typed: strong + +module WhopSDK + module Models + # The status of an ad campaign. + module AdCampaignStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::AdCampaignStatus) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = T.let(:active, WhopSDK::AdCampaignStatus::TaggedSymbol) + PAUSED = T.let(:paused, WhopSDK::AdCampaignStatus::TaggedSymbol) + PAYMENT_FAILED = + T.let(:payment_failed, WhopSDK::AdCampaignStatus::TaggedSymbol) + DRAFT = T.let(:draft, WhopSDK::AdCampaignStatus::TaggedSymbol) + IN_REVIEW = T.let(:in_review, WhopSDK::AdCampaignStatus::TaggedSymbol) + FLAGGED = T.let(:flagged, WhopSDK::AdCampaignStatus::TaggedSymbol) + + sig do + override.returns(T::Array[WhopSDK::AdCampaignStatus::TaggedSymbol]) + end + def self.values + 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 deleted file mode 100644 index 5779b068..00000000 --- a/rbi/whop_sdk/models/ad_campaign_unpause_response.rbi +++ /dev/null @@ -1,675 +0,0 @@ -# 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 this ad campaign. - sig { returns(String) } - attr_accessor :id - - # Total budget 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::Models::AdCampaignUnpauseResponse::BudgetType::TaggedSymbol - ) - ) - end - attr_accessor :budget_type - - # When the ad campaign was created. - sig { returns(Time) } - attr_accessor :created_at - - # The user who created this ad 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 - - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - sig do - returns( - T.nilable(WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig) - ) - end - attr_reader :meta_config - - sig do - params( - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::OrHash - ) - ).void - end - attr_writer :meta_config - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - sig do - returns( - WhopSDK::Models::AdCampaignUnpauseResponse::Platform::TaggedSymbol - ) - end - attr_accessor :platform - - # Current status of the campaign (active, paused, or inactive). - sig do - returns( - WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol - ) - end - attr_accessor :status - - # The campaign name shown in the Whop dashboard. - sig { returns(String) } - attr_accessor :title - - # Total amount spent in dollars. - sig { returns(Float) } - attr_accessor :total_spend - - # When 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, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType::OrSymbol - ), - created_at: Time, - created_by_user: - WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser::OrHash, - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::OrHash - ), - platform: - WhopSDK::Models::AdCampaignUnpauseResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdCampaignUnpauseResponse::Status::OrSymbol, - title: String, - total_spend: Float, - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # The unique identifier for this ad campaign. - id:, - # Total budget in dollars. - budget:, - # The budget type for an ad campaign or ad group. - budget_type:, - # When the ad campaign was created. - created_at:, - # The user who created this ad campaign. - created_by_user:, - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - meta_config:, - # The external ad platform this campaign is running on (e.g., meta, tiktok). - platform:, - # Current status of the campaign (active, paused, or inactive). - status:, - # The campaign name shown in the Whop dashboard. - title:, - # Total amount spent in dollars. - total_spend:, - # When the ad campaign was last updated. - updated_at: - ) - end - - sig do - override.returns( - { - id: String, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType::TaggedSymbol - ), - created_at: Time, - created_by_user: - WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, - meta_config: - T.nilable(WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig), - platform: - WhopSDK::Models::AdCampaignUnpauseResponse::Platform::TaggedSymbol, - status: - WhopSDK::Models::AdCampaignUnpauseResponse::Status::TaggedSymbol, - title: String, - total_spend: Float, - updated_at: Time - } - ) - 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::Models::AdCampaignUnpauseResponse::BudgetType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DAILY = - T.let( - :daily, - WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType::TaggedSymbol - ) - LIFETIME = - T.let( - :lifetime, - WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType::TaggedSymbol - ] - ) - end - def self.values - 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 this ad 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 - - class MetaConfig < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig, - 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::MetaConfig::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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - sig do - returns( - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - ) - end - attr_accessor :effective_status - - # 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::MetaConfig::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::MetaConfig::Status::TaggedSymbol - ) - ) - end - attr_accessor :status - - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - sig do - params( - bid_amount: T.nilable(Integer), - bid_strategy: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::BidStrategy::OrSymbol - ), - budget_optimization: T.nilable(T::Boolean), - effective_status: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::OrSymbol - ), - end_time: T.nilable(String), - objective: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Objective::OrSymbol - ), - special_categories: T.nilable(T::Array[String]), - start_time: T.nilable(String), - status: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - effective_status:, - # 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::MetaConfig::BidStrategy::TaggedSymbol - ), - budget_optimization: T.nilable(T::Boolean), - effective_status: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ), - end_time: T.nilable(String), - objective: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Objective::TaggedSymbol - ), - special_categories: T.nilable(T::Array[String]), - start_time: T.nilable(String), - status: - T.nilable( - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::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::MetaConfig::BidStrategy - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - LOWEST_COST = - T.let( - :lowest_cost, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - BID_CAP = - T.let( - :bid_cap, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - COST_CAP = - T.let( - :cost_cap, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::BidStrategy::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACTIVE = - T.let( - :active, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - PAUSED = - T.let( - :paused, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - DELETED = - T.let( - :deleted, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - IN_REVIEW = - T.let( - :in_review, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - REJECTED = - T.let( - :rejected, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - WITH_ISSUES = - T.let( - :with_issues, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::EffectiveStatus::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::MetaConfig::Objective - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - AWARENESS = - T.let( - :awareness, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Objective::TaggedSymbol - ) - TRAFFIC = - T.let( - :traffic, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Objective::TaggedSymbol - ) - ENGAGEMENT = - T.let( - :engagement, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Objective::TaggedSymbol - ) - LEADS = - T.let( - :leads, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Objective::TaggedSymbol - ) - SALES = - T.let( - :sales, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Objective::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::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::MetaConfig::Status - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACTIVE = - T.let( - :active, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Status::TaggedSymbol - ) - PAUSED = - T.let( - :paused, - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Status::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::Status::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - 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 - - # 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 - ) - 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_response.rbi b/rbi/whop_sdk/models/ad_campaign_update_response.rbi deleted file mode 100644 index bfd2b7c9..00000000 --- a/rbi/whop_sdk/models/ad_campaign_update_response.rbi +++ /dev/null @@ -1,670 +0,0 @@ -# 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 this ad campaign. - sig { returns(String) } - attr_accessor :id - - # Total budget 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::Models::AdCampaignUpdateResponse::BudgetType::TaggedSymbol - ) - ) - end - attr_accessor :budget_type - - # When the ad campaign was created. - sig { returns(Time) } - attr_accessor :created_at - - # The user who created this ad 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 - - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - sig do - returns( - T.nilable(WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig) - ) - end - attr_reader :meta_config - - sig do - params( - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::OrHash - ) - ).void - end - attr_writer :meta_config - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - sig do - returns( - WhopSDK::Models::AdCampaignUpdateResponse::Platform::TaggedSymbol - ) - end - attr_accessor :platform - - # Current status of the campaign (active, paused, or inactive). - sig do - returns(WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol) - end - attr_accessor :status - - # The campaign name shown in the Whop dashboard. - sig { returns(String) } - attr_accessor :title - - # Total amount spent in dollars. - sig { returns(Float) } - attr_accessor :total_spend - - # When 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, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::BudgetType::OrSymbol - ), - created_at: Time, - created_by_user: - WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser::OrHash, - meta_config: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::OrHash - ), - platform: - WhopSDK::Models::AdCampaignUpdateResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdCampaignUpdateResponse::Status::OrSymbol, - title: String, - total_spend: Float, - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # The unique identifier for this ad campaign. - id:, - # Total budget in dollars. - budget:, - # The budget type for an ad campaign or ad group. - budget_type:, - # When the ad campaign was created. - created_at:, - # The user who created this ad campaign. - created_by_user:, - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - meta_config:, - # The external ad platform this campaign is running on (e.g., meta, tiktok). - platform:, - # Current status of the campaign (active, paused, or inactive). - status:, - # The campaign name shown in the Whop dashboard. - title:, - # Total amount spent in dollars. - total_spend:, - # When the ad campaign was last updated. - updated_at: - ) - end - - sig do - override.returns( - { - id: String, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::BudgetType::TaggedSymbol - ), - created_at: Time, - created_by_user: - WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, - meta_config: - T.nilable(WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig), - platform: - WhopSDK::Models::AdCampaignUpdateResponse::Platform::TaggedSymbol, - status: - WhopSDK::Models::AdCampaignUpdateResponse::Status::TaggedSymbol, - title: String, - total_spend: Float, - updated_at: Time - } - ) - 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::Models::AdCampaignUpdateResponse::BudgetType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DAILY = - T.let( - :daily, - WhopSDK::Models::AdCampaignUpdateResponse::BudgetType::TaggedSymbol - ) - LIFETIME = - T.let( - :lifetime, - WhopSDK::Models::AdCampaignUpdateResponse::BudgetType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUpdateResponse::BudgetType::TaggedSymbol - ] - ) - end - def self.values - 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 this ad 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 - - class MetaConfig < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig, - 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::MetaConfig::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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - sig do - returns( - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - ) - end - attr_accessor :effective_status - - # 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::MetaConfig::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::MetaConfig::Status::TaggedSymbol - ) - ) - end - attr_accessor :status - - # Meta-specific campaign configuration (objective, budget mode, etc.). Null for - # non-Meta campaigns. - sig do - params( - bid_amount: T.nilable(Integer), - bid_strategy: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::BidStrategy::OrSymbol - ), - budget_optimization: T.nilable(T::Boolean), - effective_status: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::OrSymbol - ), - end_time: T.nilable(String), - objective: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Objective::OrSymbol - ), - special_categories: T.nilable(T::Array[String]), - start_time: T.nilable(String), - status: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::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 actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - effective_status:, - # 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::MetaConfig::BidStrategy::TaggedSymbol - ), - budget_optimization: T.nilable(T::Boolean), - effective_status: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ), - end_time: T.nilable(String), - objective: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Objective::TaggedSymbol - ), - special_categories: T.nilable(T::Array[String]), - start_time: T.nilable(String), - status: - T.nilable( - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::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::MetaConfig::BidStrategy - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - LOWEST_COST = - T.let( - :lowest_cost, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - BID_CAP = - T.let( - :bid_cap, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - COST_CAP = - T.let( - :cost_cap, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::BidStrategy::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::BidStrategy::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The actual delivery status, accounting for platform overrides (e.g., in_review, - # rejected). - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACTIVE = - T.let( - :active, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - PAUSED = - T.let( - :paused, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - DELETED = - T.let( - :deleted, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - IN_REVIEW = - T.let( - :in_review, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - REJECTED = - T.let( - :rejected, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - WITH_ISSUES = - T.let( - :with_issues, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::EffectiveStatus::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::MetaConfig::Objective - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - AWARENESS = - T.let( - :awareness, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Objective::TaggedSymbol - ) - TRAFFIC = - T.let( - :traffic, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Objective::TaggedSymbol - ) - ENGAGEMENT = - T.let( - :engagement, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Objective::TaggedSymbol - ) - LEADS = - T.let( - :leads, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Objective::TaggedSymbol - ) - SALES = - T.let( - :sales, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Objective::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::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::MetaConfig::Status - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ACTIVE = - T.let( - :active, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Status::TaggedSymbol - ) - PAUSED = - T.let( - :paused, - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Status::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::Status::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The external ad platform this campaign is running on (e.g., meta, tiktok). - 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 - - # 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 - ) - 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_group.rbi b/rbi/whop_sdk/models/ad_group.rbi new file mode 100644 index 00000000..19d43cb2 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group.rbi @@ -0,0 +1,126 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroup < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias { T.any(WhopSDK::AdGroup, WhopSDK::Internal::AnyHash) } + + # The unique identifier for this ad group. + sig { returns(String) } + attr_accessor :id + + # The ad campaign this ad group belongs to. + sig { returns(WhopSDK::AdGroup::AdCampaign) } + attr_reader :ad_campaign + + sig { params(ad_campaign: WhopSDK::AdGroup::AdCampaign::OrHash).void } + attr_writer :ad_campaign + + # Budget amount in dollars. + sig { returns(T.nilable(Float)) } + attr_accessor :budget + + # The budget type for an ad campaign or ad group. + sig { returns(T.nilable(WhopSDK::AdBudgetType::TaggedSymbol)) } + attr_accessor :budget_type + + # When the ad group was created. + sig { returns(Time) } + attr_accessor :created_at + + # The external ad platform this ad group is running on (e.g., meta, tiktok). + sig { returns(WhopSDK::AdCampaignPlatform::TaggedSymbol) } + attr_accessor :platform + + # Current operational status of the ad group. + sig { returns(WhopSDK::AdGroupStatus::TaggedSymbol) } + attr_accessor :status + + # Human-readable name shown on the external platform. + sig { returns(T.nilable(String)) } + attr_accessor :title + + # When the ad group was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # An ad group (ad set) belonging to an ad campaign. + sig do + params( + id: String, + ad_campaign: WhopSDK::AdGroup::AdCampaign::OrHash, + budget: T.nilable(Float), + budget_type: T.nilable(WhopSDK::AdBudgetType::OrSymbol), + created_at: Time, + platform: WhopSDK::AdCampaignPlatform::OrSymbol, + status: WhopSDK::AdGroupStatus::OrSymbol, + title: T.nilable(String), + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for this ad group. + id:, + # The ad campaign this ad group belongs to. + ad_campaign:, + # Budget amount in dollars. + budget:, + # The budget type for an ad campaign or ad group. + budget_type:, + # When the ad group was created. + created_at:, + # The external ad platform this ad group is running on (e.g., meta, tiktok). + platform:, + # Current operational status of the ad group. + status:, + # Human-readable name shown on the external platform. + title:, + # When the ad group was last updated. + updated_at: + ) + end + + sig do + override.returns( + { + id: String, + ad_campaign: WhopSDK::AdGroup::AdCampaign, + budget: T.nilable(Float), + budget_type: T.nilable(WhopSDK::AdBudgetType::TaggedSymbol), + created_at: Time, + platform: WhopSDK::AdCampaignPlatform::TaggedSymbol, + status: WhopSDK::AdGroupStatus::TaggedSymbol, + title: T.nilable(String), + updated_at: Time + } + ) + end + def to_hash + end + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::AdGroup::AdCampaign, WhopSDK::Internal::AnyHash) + end + + # The unique identifier for this ad campaign. + sig { returns(String) } + attr_accessor :id + + # The ad campaign this ad group belongs to. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for this ad campaign. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_list_params.rbi b/rbi/whop_sdk/models/ad_group_list_params.rbi index c972848b..576d14d7 100644 --- a/rbi/whop_sdk/models/ad_group_list_params.rbi +++ b/rbi/whop_sdk/models/ad_group_list_params.rbi @@ -48,7 +48,7 @@ module WhopSDK attr_accessor :query # The status of an external ad group. - sig { returns(T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol)) } + sig { returns(T.nilable(WhopSDK::AdGroupStatus::OrSymbol)) } attr_accessor :status sig do @@ -62,7 +62,7 @@ module WhopSDK first: T.nilable(Integer), last: T.nilable(Integer), query: T.nilable(String), - status: T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::AdGroupStatus::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -103,43 +103,13 @@ module WhopSDK first: T.nilable(Integer), last: T.nilable(Integer), query: T.nilable(String), - status: T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::AdGroupStatus::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 index f6abb754..b19a6566 100644 --- a/rbi/whop_sdk/models/ad_group_list_response.rbi +++ b/rbi/whop_sdk/models/ad_group_list_response.rbi @@ -15,18 +15,23 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # The ad campaign this ad group belongs to. + sig { returns(WhopSDK::Models::AdGroupListResponse::AdCampaign) } + attr_reader :ad_campaign + + sig do + params( + ad_campaign: WhopSDK::Models::AdGroupListResponse::AdCampaign::OrHash + ).void + end + attr_writer :ad_campaign + # 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::Models::AdGroupListResponse::BudgetType::TaggedSymbol - ) - ) - end + sig { returns(T.nilable(WhopSDK::AdBudgetType::TaggedSymbol)) } attr_accessor :budget_type # When the ad group was created. @@ -34,15 +39,11 @@ module WhopSDK attr_accessor :created_at # The external ad platform this ad group is running on (e.g., meta, tiktok). - sig do - returns(WhopSDK::Models::AdGroupListResponse::Platform::TaggedSymbol) - end + sig { returns(WhopSDK::AdCampaignPlatform::TaggedSymbol) } attr_accessor :platform # Current operational status of the ad group. - sig do - returns(WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol) - end + sig { returns(WhopSDK::AdGroupStatus::TaggedSymbol) } attr_accessor :status # Human-readable name shown on the external platform. @@ -57,14 +58,12 @@ module WhopSDK sig do params( id: String, + ad_campaign: WhopSDK::Models::AdGroupListResponse::AdCampaign::OrHash, budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdGroupListResponse::BudgetType::OrSymbol - ), + budget_type: T.nilable(WhopSDK::AdBudgetType::OrSymbol), created_at: Time, - platform: WhopSDK::Models::AdGroupListResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdGroupListResponse::Status::OrSymbol, + platform: WhopSDK::AdCampaignPlatform::OrSymbol, + status: WhopSDK::AdGroupStatus::OrSymbol, title: T.nilable(String), updated_at: Time ).returns(T.attached_class) @@ -72,6 +71,8 @@ module WhopSDK def self.new( # The unique identifier for this ad group. id:, + # The ad campaign this ad group belongs to. + ad_campaign:, # Budget amount in dollars. budget:, # The budget type for an ad campaign or ad group. @@ -93,15 +94,12 @@ module WhopSDK override.returns( { id: String, + ad_campaign: WhopSDK::Models::AdGroupListResponse::AdCampaign, budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdGroupListResponse::BudgetType::TaggedSymbol - ), + budget_type: T.nilable(WhopSDK::AdBudgetType::TaggedSymbol), created_at: Time, - platform: - WhopSDK::Models::AdGroupListResponse::Platform::TaggedSymbol, - status: WhopSDK::Models::AdGroupListResponse::Status::TaggedSymbol, + platform: WhopSDK::AdCampaignPlatform::TaggedSymbol, + status: WhopSDK::AdGroupStatus::TaggedSymbol, title: T.nilable(String), updated_at: Time } @@ -110,117 +108,29 @@ module WhopSDK 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::Models::AdGroupListResponse::BudgetType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DAILY = - T.let( - :daily, - WhopSDK::Models::AdGroupListResponse::BudgetType::TaggedSymbol - ) - LIFETIME = - T.let( - :lifetime, - WhopSDK::Models::AdGroupListResponse::BudgetType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdGroupListResponse::BudgetType::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The external ad platform this ad group is running on (e.g., meta, tiktok). - module Platform - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = + class AdCampaign < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all(Symbol, WhopSDK::Models::AdGroupListResponse::Platform) + T.any( + WhopSDK::Models::AdGroupListResponse::AdCampaign, + WhopSDK::Internal::AnyHash + ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - META = - T.let( - :meta, - WhopSDK::Models::AdGroupListResponse::Platform::TaggedSymbol - ) - TIKTOK = - T.let( - :tiktok, - WhopSDK::Models::AdGroupListResponse::Platform::TaggedSymbol - ) + # The unique identifier for this ad campaign. + sig { returns(String) } + attr_accessor :id - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdGroupListResponse::Platform::TaggedSymbol - ] - ) - end - def self.values + # The ad campaign this ad group belongs to. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for this ad campaign. + id: + ) 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 + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/ad_group_pause_params.rbi b/rbi/whop_sdk/models/ad_group_pause_params.rbi new file mode 100644 index 00000000..53915cc4 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_pause_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupPauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdGroupPauseParams, 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 deleted file mode 100644 index c664d39e..00000000 --- a/rbi/whop_sdk/models/ad_group_retrieve_response.rbi +++ /dev/null @@ -1,277 +0,0 @@ -# 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 this ad group. - sig { returns(String) } - attr_accessor :id - - # The ad campaign this ad group belongs to. - 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 - - # 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::Models::AdGroupRetrieveResponse::BudgetType::TaggedSymbol - ) - ) - end - attr_accessor :budget_type - - # When the ad group was created. - sig { returns(Time) } - attr_accessor :created_at - - # The external ad platform this ad group is running on (e.g., meta, tiktok). - sig do - returns( - WhopSDK::Models::AdGroupRetrieveResponse::Platform::TaggedSymbol - ) - end - attr_accessor :platform - - # Current operational status of the ad group. - sig do - returns(WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol) - end - attr_accessor :status - - # Human-readable name shown on the external platform. - sig { returns(T.nilable(String)) } - attr_accessor :title - - # When the ad group was last updated. - sig { returns(Time) } - attr_accessor :updated_at - - # An ad group (ad set) belonging to an ad campaign. - sig do - params( - id: String, - ad_campaign: - WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign::OrHash, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdGroupRetrieveResponse::BudgetType::OrSymbol - ), - created_at: Time, - platform: - WhopSDK::Models::AdGroupRetrieveResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdGroupRetrieveResponse::Status::OrSymbol, - title: T.nilable(String), - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # The unique identifier for this ad group. - id:, - # The ad campaign this ad group belongs to. - ad_campaign:, - # Budget amount in dollars. - budget:, - # The budget type for an ad campaign or ad group. - budget_type:, - # When the ad group was created. - created_at:, - # The external ad platform this ad group is running on (e.g., meta, tiktok). - platform:, - # Current operational status of the ad group. - status:, - # Human-readable name shown on the external platform. - title:, - # When the ad group was last updated. - updated_at: - ) - end - - sig do - override.returns( - { - id: String, - ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdGroupRetrieveResponse::BudgetType::TaggedSymbol - ), - created_at: Time, - platform: - WhopSDK::Models::AdGroupRetrieveResponse::Platform::TaggedSymbol, - status: - WhopSDK::Models::AdGroupRetrieveResponse::Status::TaggedSymbol, - title: T.nilable(String), - 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 this ad campaign. - sig { returns(String) } - attr_accessor :id - - # The ad campaign this ad group belongs to. - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The unique identifier for this ad campaign. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - 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::Models::AdGroupRetrieveResponse::BudgetType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DAILY = - T.let( - :daily, - WhopSDK::Models::AdGroupRetrieveResponse::BudgetType::TaggedSymbol - ) - LIFETIME = - T.let( - :lifetime, - WhopSDK::Models::AdGroupRetrieveResponse::BudgetType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdGroupRetrieveResponse::BudgetType::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The external ad platform this ad group is running on (e.g., meta, tiktok). - module Platform - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, WhopSDK::Models::AdGroupRetrieveResponse::Platform) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - META = - T.let( - :meta, - WhopSDK::Models::AdGroupRetrieveResponse::Platform::TaggedSymbol - ) - TIKTOK = - T.let( - :tiktok, - WhopSDK::Models::AdGroupRetrieveResponse::Platform::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdGroupRetrieveResponse::Platform::TaggedSymbol - ] - ) - end - def self.values - 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_status.rbi b/rbi/whop_sdk/models/ad_group_status.rbi new file mode 100644 index 00000000..328dc809 --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_status.rbi @@ -0,0 +1,24 @@ +# typed: strong + +module WhopSDK + module Models + # The status of an external ad group. + module AdGroupStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::AdGroupStatus) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = T.let(:active, WhopSDK::AdGroupStatus::TaggedSymbol) + PAUSED = T.let(:paused, WhopSDK::AdGroupStatus::TaggedSymbol) + INACTIVE = T.let(:inactive, WhopSDK::AdGroupStatus::TaggedSymbol) + IN_REVIEW = T.let(:in_review, WhopSDK::AdGroupStatus::TaggedSymbol) + REJECTED = T.let(:rejected, WhopSDK::AdGroupStatus::TaggedSymbol) + FLAGGED = T.let(:flagged, WhopSDK::AdGroupStatus::TaggedSymbol) + + sig { override.returns(T::Array[WhopSDK::AdGroupStatus::TaggedSymbol]) } + def self.values + end + end + end +end diff --git a/rbi/whop_sdk/models/ad_group_unpause_params.rbi b/rbi/whop_sdk/models/ad_group_unpause_params.rbi new file mode 100644 index 00000000..a588c0ce --- /dev/null +++ b/rbi/whop_sdk/models/ad_group_unpause_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdGroupUnpauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdGroupUnpauseParams, 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_update_params.rbi b/rbi/whop_sdk/models/ad_group_update_params.rbi index 02fd2ef3..f0f1dda2 100644 --- a/rbi/whop_sdk/models/ad_group_update_params.rbi +++ b/rbi/whop_sdk/models/ad_group_update_params.rbi @@ -19,9 +19,7 @@ module WhopSDK attr_accessor :budget # The budget type for an ad campaign or ad group. - sig do - returns(T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol)) - end + sig { returns(T.nilable(WhopSDK::AdBudgetType::OrSymbol)) } attr_accessor :budget_type # Unified ad group configuration (bidding, optimization, targeting). @@ -56,21 +54,20 @@ module WhopSDK attr_writer :platform_config # The status of an external ad group. - sig { returns(T.nilable(WhopSDK::AdGroupUpdateParams::Status::OrSymbol)) } + sig { returns(T.nilable(WhopSDK::AdGroupStatus::OrSymbol)) } attr_accessor :status sig do params( id: String, budget: T.nilable(Float), - budget_type: - T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol), + budget_type: T.nilable(WhopSDK::AdBudgetType::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), + status: T.nilable(WhopSDK::AdGroupStatus::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -99,14 +96,13 @@ module WhopSDK { id: String, budget: T.nilable(Float), - budget_type: - T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol), + budget_type: T.nilable(WhopSDK::AdBudgetType::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), + status: T.nilable(WhopSDK::AdGroupStatus::OrSymbol), request_options: WhopSDK::RequestOptions } ) @@ -114,33 +110,6 @@ module WhopSDK 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 @@ -6098,36 +6067,6 @@ module WhopSDK 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 deleted file mode 100644 index e780d6a2..00000000 --- a/rbi/whop_sdk/models/ad_group_update_response.rbi +++ /dev/null @@ -1,274 +0,0 @@ -# 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 this ad group. - sig { returns(String) } - attr_accessor :id - - # The ad campaign this ad group belongs to. - 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 - - # 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::Models::AdGroupUpdateResponse::BudgetType::TaggedSymbol - ) - ) - end - attr_accessor :budget_type - - # When the ad group was created. - sig { returns(Time) } - attr_accessor :created_at - - # The external ad platform this ad group is running on (e.g., meta, tiktok). - sig do - returns(WhopSDK::Models::AdGroupUpdateResponse::Platform::TaggedSymbol) - end - attr_accessor :platform - - # Current operational status of the ad group. - sig do - returns(WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol) - end - attr_accessor :status - - # Human-readable name shown on the external platform. - sig { returns(T.nilable(String)) } - attr_accessor :title - - # When the ad group was last updated. - sig { returns(Time) } - attr_accessor :updated_at - - # An ad group (ad set) belonging to an ad campaign. - sig do - params( - id: String, - ad_campaign: - WhopSDK::Models::AdGroupUpdateResponse::AdCampaign::OrHash, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdGroupUpdateResponse::BudgetType::OrSymbol - ), - created_at: Time, - platform: WhopSDK::Models::AdGroupUpdateResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdGroupUpdateResponse::Status::OrSymbol, - title: T.nilable(String), - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # The unique identifier for this ad group. - id:, - # The ad campaign this ad group belongs to. - ad_campaign:, - # Budget amount in dollars. - budget:, - # The budget type for an ad campaign or ad group. - budget_type:, - # When the ad group was created. - created_at:, - # The external ad platform this ad group is running on (e.g., meta, tiktok). - platform:, - # Current operational status of the ad group. - status:, - # Human-readable name shown on the external platform. - title:, - # When the ad group was last updated. - updated_at: - ) - end - - sig do - override.returns( - { - id: String, - ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, - budget: T.nilable(Float), - budget_type: - T.nilable( - WhopSDK::Models::AdGroupUpdateResponse::BudgetType::TaggedSymbol - ), - created_at: Time, - platform: - WhopSDK::Models::AdGroupUpdateResponse::Platform::TaggedSymbol, - status: - WhopSDK::Models::AdGroupUpdateResponse::Status::TaggedSymbol, - title: T.nilable(String), - 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 this ad campaign. - sig { returns(String) } - attr_accessor :id - - # The ad campaign this ad group belongs to. - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The unique identifier for this ad campaign. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - 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::Models::AdGroupUpdateResponse::BudgetType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DAILY = - T.let( - :daily, - WhopSDK::Models::AdGroupUpdateResponse::BudgetType::TaggedSymbol - ) - LIFETIME = - T.let( - :lifetime, - WhopSDK::Models::AdGroupUpdateResponse::BudgetType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdGroupUpdateResponse::BudgetType::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The external ad platform this ad group is running on (e.g., meta, tiktok). - module Platform - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, WhopSDK::Models::AdGroupUpdateResponse::Platform) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - META = - T.let( - :meta, - WhopSDK::Models::AdGroupUpdateResponse::Platform::TaggedSymbol - ) - TIKTOK = - T.let( - :tiktok, - WhopSDK::Models::AdGroupUpdateResponse::Platform::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdGroupUpdateResponse::Platform::TaggedSymbol - ] - ) - end - def self.values - 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 index b6026583..e4a96da1 100644 --- a/rbi/whop_sdk/models/ad_list_params.rbi +++ b/rbi/whop_sdk/models/ad_list_params.rbi @@ -51,7 +51,7 @@ module WhopSDK attr_accessor :last # The status of an external ad. - sig { returns(T.nilable(WhopSDK::AdListParams::Status::OrSymbol)) } + sig { returns(T.nilable(WhopSDK::ExternalAdStatus::OrSymbol)) } attr_accessor :status sig do @@ -65,7 +65,7 @@ module WhopSDK created_before: T.nilable(Time), first: T.nilable(Integer), last: T.nilable(Integer), - status: T.nilable(WhopSDK::AdListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::ExternalAdStatus::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -109,38 +109,13 @@ module WhopSDK created_before: T.nilable(Time), first: T.nilable(Integer), last: T.nilable(Integer), - status: T.nilable(WhopSDK::AdListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::ExternalAdStatus::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 index 8249ffb0..e217021f 100644 --- a/rbi/whop_sdk/models/ad_list_response.rbi +++ b/rbi/whop_sdk/models/ad_list_response.rbi @@ -12,16 +12,36 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # The ad campaign this ad belongs to. + sig { returns(WhopSDK::Models::AdListResponse::AdCampaign) } + attr_reader :ad_campaign + + sig do + params( + ad_campaign: WhopSDK::Models::AdListResponse::AdCampaign::OrHash + ).void + end + attr_writer :ad_campaign + + # The parent ad group this ad belongs to. + sig { returns(WhopSDK::Models::AdListResponse::AdGroup) } + attr_reader :ad_group + + sig do + params(ad_group: WhopSDK::Models::AdListResponse::AdGroup::OrHash).void + end + attr_writer :ad_group + # When the ad was created. sig { returns(Time) } attr_accessor :created_at # The external ad platform this ad is running on (e.g., meta, tiktok). - sig { returns(WhopSDK::Models::AdListResponse::Platform::TaggedSymbol) } + sig { returns(WhopSDK::AdCampaignPlatform::TaggedSymbol) } attr_accessor :platform # Current delivery status of the ad. - sig { returns(WhopSDK::Models::AdListResponse::Status::TaggedSymbol) } + sig { returns(WhopSDK::ExternalAdStatus::TaggedSymbol) } attr_accessor :status # The display title of the ad. Falls back to the creative set caption when unset. @@ -36,9 +56,11 @@ module WhopSDK sig do params( id: String, + ad_campaign: WhopSDK::Models::AdListResponse::AdCampaign::OrHash, + ad_group: WhopSDK::Models::AdListResponse::AdGroup::OrHash, created_at: Time, - platform: WhopSDK::Models::AdListResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdListResponse::Status::OrSymbol, + platform: WhopSDK::AdCampaignPlatform::OrSymbol, + status: WhopSDK::ExternalAdStatus::OrSymbol, title: T.nilable(String), updated_at: Time ).returns(T.attached_class) @@ -46,6 +68,10 @@ module WhopSDK def self.new( # The unique identifier for this ad. id:, + # The ad campaign this ad belongs to. + ad_campaign:, + # The parent ad group this ad belongs to. + ad_group:, # When the ad was created. created_at:, # The external ad platform this ad is running on (e.g., meta, tiktok). @@ -63,9 +89,11 @@ module WhopSDK override.returns( { id: String, + ad_campaign: WhopSDK::Models::AdListResponse::AdCampaign, + ad_group: WhopSDK::Models::AdListResponse::AdGroup, created_at: Time, - platform: WhopSDK::Models::AdListResponse::Platform::TaggedSymbol, - status: WhopSDK::Models::AdListResponse::Status::TaggedSymbol, + platform: WhopSDK::AdCampaignPlatform::TaggedSymbol, + status: WhopSDK::ExternalAdStatus::TaggedSymbol, title: T.nilable(String), updated_at: Time } @@ -74,71 +102,55 @@ module WhopSDK def to_hash end - # The external ad platform this ad is running on (e.g., meta, tiktok). - module Platform - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = + class AdCampaign < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all(Symbol, WhopSDK::Models::AdListResponse::Platform) + T.any( + WhopSDK::Models::AdListResponse::AdCampaign, + WhopSDK::Internal::AnyHash + ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - META = - T.let(:meta, WhopSDK::Models::AdListResponse::Platform::TaggedSymbol) - TIKTOK = - T.let( - :tiktok, - WhopSDK::Models::AdListResponse::Platform::TaggedSymbol - ) - - sig do - override.returns( - T::Array[WhopSDK::Models::AdListResponse::Platform::TaggedSymbol] - ) + + # The unique identifier for this ad campaign. + sig { returns(String) } + attr_accessor :id + + # The ad campaign this ad belongs to. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for this ad campaign. + id: + ) end - def self.values + + sig { override.returns({ id: String }) } + def to_hash end end - # Current delivery status of the ad. - module Status - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = + class AdGroup < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all(Symbol, WhopSDK::Models::AdListResponse::Status) + T.any( + WhopSDK::Models::AdListResponse::AdGroup, + WhopSDK::Internal::AnyHash + ) 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] - ) + + # The unique identifier for this ad group. + sig { returns(String) } + attr_accessor :id + + # The parent ad group this ad belongs to. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The unique identifier for this ad group. + id: + ) end - def self.values + + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/ad_pause_params.rbi b/rbi/whop_sdk/models/ad_pause_params.rbi new file mode 100644 index 00000000..d5e025be --- /dev/null +++ b/rbi/whop_sdk/models/ad_pause_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdPauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdPauseParams, 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_report_retrieve_params.rbi b/rbi/whop_sdk/models/ad_report_retrieve_params.rbi index aafcdfe4..1455c953 100644 --- a/rbi/whop_sdk/models/ad_report_retrieve_params.rbi +++ b/rbi/whop_sdk/models/ad_report_retrieve_params.rbi @@ -19,29 +19,41 @@ module WhopSDK sig { returns(Time) } attr_accessor :to - # The unique identifier of an ad campaign. Mutually exclusive with `adGroupId` and - # `adId`. + # The unique identifier of an ad campaign. Mutually exclusive with `companyId`, + # `adGroupId`, and `adId`. sig { returns(T.nilable(String)) } attr_accessor :ad_campaign_id - # The unique identifier of an ad group. Mutually exclusive with `adCampaignId` and - # `adId`. + # The unique identifier of an ad group. Mutually exclusive with `companyId`, + # `adCampaignId`, and `adId`. sig { returns(T.nilable(String)) } attr_accessor :ad_group_id - # The unique identifier of an ad. Mutually exclusive with `adCampaignId` and - # `adGroupId`. + # The unique identifier of an ad. Mutually exclusive with `companyId`, + # `adCampaignId`, and `adGroupId`. sig { returns(T.nilable(String)) } attr_accessor :ad_id + # Entity level to group an ad report by. + sig do + returns(T.nilable(WhopSDK::AdReportRetrieveParams::Breakdown::OrSymbol)) + end + attr_accessor :breakdown + + # The unique identifier of a company. Mutually exclusive with `adCampaignId`, + # `adGroupId`, and `adId`. Use with `breakdown` to fan out across every campaign, + # ad group, or ad in the company without paging. + sig { returns(T.nilable(String)) } + attr_accessor :company_id + # ISO 4217 currency code to report `spend` in. Defaults to the company's ads # reporting currency. sig { returns(T.nilable(String)) } attr_accessor :currency - # When true, includes a per-day breakdown alongside the summary. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :include_daily + # Bucket size for external ad stat rows. + sig { returns(T.nilable(WhopSDK::Granularities::OrSymbol)) } + attr_accessor :granularity sig do params( @@ -50,8 +62,11 @@ module WhopSDK ad_campaign_id: T.nilable(String), ad_group_id: T.nilable(String), ad_id: T.nilable(String), + breakdown: + T.nilable(WhopSDK::AdReportRetrieveParams::Breakdown::OrSymbol), + company_id: T.nilable(String), currency: T.nilable(String), - include_daily: T.nilable(T::Boolean), + granularity: T.nilable(WhopSDK::Granularities::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -60,20 +75,26 @@ module WhopSDK from:, # Inclusive end of the reporting window. to:, - # The unique identifier of an ad campaign. Mutually exclusive with `adGroupId` and - # `adId`. + # The unique identifier of an ad campaign. Mutually exclusive with `companyId`, + # `adGroupId`, and `adId`. ad_campaign_id: nil, - # The unique identifier of an ad group. Mutually exclusive with `adCampaignId` and - # `adId`. + # The unique identifier of an ad group. Mutually exclusive with `companyId`, + # `adCampaignId`, and `adId`. ad_group_id: nil, - # The unique identifier of an ad. Mutually exclusive with `adCampaignId` and - # `adGroupId`. + # The unique identifier of an ad. Mutually exclusive with `companyId`, + # `adCampaignId`, and `adGroupId`. ad_id: nil, + # Entity level to group an ad report by. + breakdown: nil, + # The unique identifier of a company. Mutually exclusive with `adCampaignId`, + # `adGroupId`, and `adId`. Use with `breakdown` to fan out across every campaign, + # ad group, or ad in the company without paging. + company_id: nil, # ISO 4217 currency code to report `spend` in. Defaults to the company's ads # reporting currency. currency: nil, - # When true, includes a per-day breakdown alongside the summary. - include_daily: nil, + # Bucket size for external ad stat rows. + granularity: nil, request_options: {} ) end @@ -86,14 +107,49 @@ module WhopSDK ad_campaign_id: T.nilable(String), ad_group_id: T.nilable(String), ad_id: T.nilable(String), + breakdown: + T.nilable(WhopSDK::AdReportRetrieveParams::Breakdown::OrSymbol), + company_id: T.nilable(String), currency: T.nilable(String), - include_daily: T.nilable(T::Boolean), + granularity: T.nilable(WhopSDK::Granularities::OrSymbol), request_options: WhopSDK::RequestOptions } ) end def to_hash end + + # Entity level to group an ad report by. + module Breakdown + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AdReportRetrieveParams::Breakdown) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CAMPAIGN = + T.let( + :campaign, + WhopSDK::AdReportRetrieveParams::Breakdown::TaggedSymbol + ) + AD_GROUP = + T.let( + :ad_group, + WhopSDK::AdReportRetrieveParams::Breakdown::TaggedSymbol + ) + AD = + T.let(:ad, WhopSDK::AdReportRetrieveParams::Breakdown::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::AdReportRetrieveParams::Breakdown::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/whop_sdk/models/ad_report_retrieve_response.rbi b/rbi/whop_sdk/models/ad_report_retrieve_response.rbi index e422f061..30c4ebdd 100644 --- a/rbi/whop_sdk/models/ad_report_retrieve_response.rbi +++ b/rbi/whop_sdk/models/ad_report_retrieve_response.rbi @@ -11,14 +11,29 @@ module WhopSDK ) end - # Per-day breakdown over the date range, ordered ascending. Null when - # `includeDaily` is false. + # Per-entity rows over the date range. `null` when the `breakdown` arg on + # `adReport` is omitted; otherwise contains one row per ad campaign, ad group, or + # ad inside the requested scope at the requested level. sig do returns( - T.nilable(T::Array[WhopSDK::Models::AdReportRetrieveResponse::Daily]) + T.nilable( + T::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown] + ) + ) + end + attr_accessor :breakdown + + # Per-bucket time series over the date range, ordered ascending by `bucketStart`. + # `null` when the `granularity` arg on `adReport` is omitted; otherwise contains + # rows at the requested grain (`daily` or `hourly`). + sig do + returns( + T.nilable( + T::Array[WhopSDK::Models::AdReportRetrieveResponse::Granularity] + ) ) end - attr_accessor :daily + attr_accessor :granularity # Aggregate totals and rates over the date range. sig { returns(WhopSDK::Models::AdReportRetrieveResponse::Summary) } @@ -31,21 +46,35 @@ module WhopSDK end attr_writer :summary - # An ads performance report. Returns a summary; daily breakdown is included when - # `includeDaily` is true. + # An ads performance report. Always returns a summary. The `granularity` field + # contains a per-bucket time series when the `granularity` arg is set; the + # `breakdown` field contains per-entity rows when the `breakdown` arg is set. sig do params( - daily: + breakdown: T.nilable( - T::Array[WhopSDK::Models::AdReportRetrieveResponse::Daily::OrHash] + T::Array[ + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::OrHash + ] + ), + granularity: + T.nilable( + T::Array[ + WhopSDK::Models::AdReportRetrieveResponse::Granularity::OrHash + ] ), summary: WhopSDK::Models::AdReportRetrieveResponse::Summary::OrHash ).returns(T.attached_class) end def self.new( - # Per-day breakdown over the date range, ordered ascending. Null when - # `includeDaily` is false. - daily:, + # Per-entity rows over the date range. `null` when the `breakdown` arg on + # `adReport` is omitted; otherwise contains one row per ad campaign, ad group, or + # ad inside the requested scope at the requested level. + breakdown:, + # Per-bucket time series over the date range, ordered ascending by `bucketStart`. + # `null` when the `granularity` arg on `adReport` is omitted; otherwise contains + # rows at the requested grain (`daily` or `hourly`). + granularity:, # Aggregate totals and rates over the date range. summary: ) @@ -54,9 +83,13 @@ module WhopSDK sig do override.returns( { - daily: + breakdown: + T.nilable( + T::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown] + ), + granularity: T.nilable( - T::Array[WhopSDK::Models::AdReportRetrieveResponse::Daily] + T::Array[WhopSDK::Models::AdReportRetrieveResponse::Granularity] ), summary: WhopSDK::Models::AdReportRetrieveResponse::Summary } @@ -65,46 +98,483 @@ module WhopSDK def to_hash end - class Daily < WhopSDK::Internal::Type::BaseModel + class Breakdown < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdReportRetrieveResponse::Breakdown, + WhopSDK::Internal::AnyHash + ) + end + + # Tag of the entity (ad campaign, ad group, or ad). + sig { returns(String) } + attr_accessor :id + + # Per-bucket time series for this entity over the date range, ordered ascending by + # `bucketStart`. `null` when the `granularity` arg on `adReport` is omitted; + # otherwise contains rows at the requested grain (`daily` or `hourly`). + sig do + returns( + T.nilable( + T::Array[ + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity + ] + ) + ) + end + attr_accessor :granularity + + # The entity level of this row — matches the `breakdown` arg. + sig do + returns( + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level::TaggedSymbol + ) + end + attr_accessor :level + + # Display name of the entity, when available. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Aggregate totals and rates for this entity over the date range. + sig do + returns(WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary) + end + attr_reader :summary + + sig do + params( + summary: + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary::OrHash + ).void + end + attr_writer :summary + + # Per-entity ad performance row. Returned when the `breakdown` arg on `adReport` + # is set. + sig do + params( + id: String, + granularity: + T.nilable( + T::Array[ + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity::OrHash + ] + ), + level: + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level::OrSymbol, + name: T.nilable(String), + summary: + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary::OrHash + ).returns(T.attached_class) + end + def self.new( + # Tag of the entity (ad campaign, ad group, or ad). + id:, + # Per-bucket time series for this entity over the date range, ordered ascending by + # `bucketStart`. `null` when the `granularity` arg on `adReport` is omitted; + # otherwise contains rows at the requested grain (`daily` or `hourly`). + granularity:, + # The entity level of this row — matches the `breakdown` arg. + level:, + # Display name of the entity, when available. + name:, + # Aggregate totals and rates for this entity over the date range. + summary: + ) + end + + sig do + override.returns( + { + id: String, + granularity: + T.nilable( + T::Array[ + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity + ] + ), + level: + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level::TaggedSymbol, + name: T.nilable(String), + summary: + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary + } + ) + end + def to_hash + end + + class Granularity < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity, + WhopSDK::Internal::AnyHash + ) + end + + # The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved + # in the ad account's reporting timezone — render this in the viewer's local + # timezone. + sig { returns(Time) } + attr_accessor :bucket_start + + # Clicks in this bucket. + sig { returns(Integer) } + attr_accessor :clicks + + # The bucket size of this row (`daily` or `hourly`). + sig { returns(WhopSDK::Granularities::TaggedSymbol) } + attr_accessor :granularity + + # Impressions in this bucket. + sig { returns(Integer) } + attr_accessor :impressions + + # Unique users reached in this bucket. Always `0` for hourly rows (Meta does not + # return reach at hourly grain). + sig { returns(Integer) } + attr_accessor :reach + + # Count of the primary optimization result in this bucket. + sig { returns(T.nilable(Integer)) } + attr_accessor :result_count + + # Types of optimization results tracked from external ad platforms + sig { returns(T.nilable(WhopSDK::ResultLabelKeys::TaggedSymbol)) } + attr_accessor :result_label_key + + # Advertiser-defined label for the result when `resultLabelKey` is `custom`. + sig { returns(T.nilable(String)) } + attr_accessor :result_label_override + + # Charged spend in this bucket in the requested reporting currency — the amount + # billed including platform fees, not the platform-side net spend. + sig { returns(Float) } + attr_accessor :spend + + # Currency of the `spend` value. + sig { returns(WhopSDK::Currency::TaggedSymbol) } + attr_accessor :spend_currency + + # The date these stats cover (midnight UTC). For hourly rows, see `statHour` and + # `bucketStart`. + sig { returns(Time) } + attr_accessor :stat_date + + # Hour of the day in the ad account's reporting timezone (0-23). `null` for daily + # rows. + sig { returns(T.nilable(Integer)) } + attr_accessor :stat_hour + + # Per-bucket ad performance for an ad campaign, ad group, or ad. Bucket grain is + # set by the `ad_report` query's `granularity` argument. + sig do + params( + bucket_start: Time, + clicks: Integer, + granularity: WhopSDK::Granularities::OrSymbol, + impressions: Integer, + reach: Integer, + result_count: T.nilable(Integer), + result_label_key: T.nilable(WhopSDK::ResultLabelKeys::OrSymbol), + result_label_override: T.nilable(String), + spend: Float, + spend_currency: WhopSDK::Currency::OrSymbol, + stat_date: Time, + stat_hour: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved + # in the ad account's reporting timezone — render this in the viewer's local + # timezone. + bucket_start:, + # Clicks in this bucket. + clicks:, + # The bucket size of this row (`daily` or `hourly`). + granularity:, + # Impressions in this bucket. + impressions:, + # Unique users reached in this bucket. Always `0` for hourly rows (Meta does not + # return reach at hourly grain). + reach:, + # Count of the primary optimization result in this bucket. + result_count:, + # Types of optimization results tracked from external ad platforms + result_label_key:, + # Advertiser-defined label for the result when `resultLabelKey` is `custom`. + result_label_override:, + # Charged spend in this bucket in the requested reporting currency — the amount + # billed including platform fees, not the platform-side net spend. + spend:, + # Currency of the `spend` value. + spend_currency:, + # The date these stats cover (midnight UTC). For hourly rows, see `statHour` and + # `bucketStart`. + stat_date:, + # Hour of the day in the ad account's reporting timezone (0-23). `null` for daily + # rows. + stat_hour: + ) + end + + sig do + override.returns( + { + bucket_start: Time, + clicks: Integer, + granularity: WhopSDK::Granularities::TaggedSymbol, + impressions: Integer, + reach: Integer, + result_count: T.nilable(Integer), + result_label_key: + T.nilable(WhopSDK::ResultLabelKeys::TaggedSymbol), + result_label_override: T.nilable(String), + spend: Float, + spend_currency: WhopSDK::Currency::TaggedSymbol, + stat_date: Time, + stat_hour: T.nilable(Integer) + } + ) + end + def to_hash + end + end + + # The entity level of this row — matches the `breakdown` arg. + module Level + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CAMPAIGN = + T.let( + :campaign, + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level::TaggedSymbol + ) + AD_GROUP = + T.let( + :ad_group, + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level::TaggedSymbol + ) + AD = + T.let( + :ad, + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Level::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Summary < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary, + WhopSDK::Internal::AnyHash + ) + end + + # Total clicks over the date range. + sig { returns(Integer) } + attr_accessor :clicks + + # Spend divided by `resultCount`. Null when there are no results. + sig { returns(T.nilable(Float)) } + attr_accessor :cost_per_result + + # Cost per click in the requested reporting currency. + sig { returns(Float) } + attr_accessor :cpc + + # Cost per thousand impressions in the requested reporting currency. + sig { returns(T.nilable(Float)) } + attr_accessor :cpm + + # Click-through rate (clicks / impressions). + sig { returns(Float) } + attr_accessor :ctr + + # Average number of times each reached user saw an ad. + sig { returns(T.nilable(Float)) } + attr_accessor :frequency + + # Total impressions over the date range. + sig { returns(Integer) } + attr_accessor :impressions + + # Unique users reached, deduplicated by the external ad platform. + sig { returns(Integer) } + attr_accessor :reach + + # Count of the campaign's primary optimization result (purchases, clicks, etc.) — + # see `resultLabelKey`. + sig { returns(T.nilable(Integer)) } + attr_accessor :result_count + + # Types of optimization results tracked from external ad platforms + sig { returns(T.nilable(WhopSDK::ResultLabelKeys::TaggedSymbol)) } + attr_accessor :result_label_key + + # Advertiser-defined label for the result when `resultLabelKey` is `custom`. + sig { returns(T.nilable(String)) } + attr_accessor :result_label_override + + # Alias for `purchaseRoas` — return on ad spend for purchases, as reported by the + # external ad platform. + sig { returns(T.nilable(Float)) } + attr_accessor :roas + + # Total spend over the date range in the requested reporting currency. + sig { returns(Float) } + attr_accessor :spend + + # The available currencies on the platform + sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + attr_accessor :spend_currency + + # Aggregate totals and rates for this entity over the date range. + sig do + params( + clicks: Integer, + cost_per_result: T.nilable(Float), + cpc: Float, + cpm: T.nilable(Float), + ctr: Float, + frequency: T.nilable(Float), + impressions: Integer, + reach: Integer, + result_count: T.nilable(Integer), + result_label_key: T.nilable(WhopSDK::ResultLabelKeys::OrSymbol), + result_label_override: T.nilable(String), + roas: T.nilable(Float), + spend: Float, + spend_currency: T.nilable(WhopSDK::Currency::OrSymbol) + ).returns(T.attached_class) + end + def self.new( + # Total clicks over the date range. + clicks:, + # Spend divided by `resultCount`. Null when there are no results. + cost_per_result:, + # Cost per click in the requested reporting currency. + cpc:, + # Cost per thousand impressions in the requested reporting currency. + cpm:, + # Click-through rate (clicks / impressions). + ctr:, + # Average number of times each reached user saw an ad. + frequency:, + # Total impressions over the date range. + impressions:, + # Unique users reached, deduplicated by the external ad platform. + reach:, + # Count of the campaign's primary optimization result (purchases, clicks, etc.) — + # see `resultLabelKey`. + result_count:, + # Types of optimization results tracked from external ad platforms + result_label_key:, + # Advertiser-defined label for the result when `resultLabelKey` is `custom`. + result_label_override:, + # Alias for `purchaseRoas` — return on ad spend for purchases, as reported by the + # external ad platform. + roas:, + # Total spend over the date range in the requested reporting currency. + spend:, + # The available currencies on the platform + spend_currency: + ) + end + + sig do + override.returns( + { + clicks: Integer, + cost_per_result: T.nilable(Float), + cpc: Float, + cpm: T.nilable(Float), + ctr: Float, + frequency: T.nilable(Float), + impressions: Integer, + reach: Integer, + result_count: T.nilable(Integer), + result_label_key: + T.nilable(WhopSDK::ResultLabelKeys::TaggedSymbol), + result_label_override: T.nilable(String), + roas: T.nilable(Float), + spend: Float, + spend_currency: T.nilable(WhopSDK::Currency::TaggedSymbol) + } + ) + end + def to_hash + end + end + end + + class Granularity < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - WhopSDK::Models::AdReportRetrieveResponse::Daily, + WhopSDK::Models::AdReportRetrieveResponse::Granularity, WhopSDK::Internal::AnyHash ) end - # Clicks on this date. + # The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved + # in the ad account's reporting timezone — render this in the viewer's local + # timezone. + sig { returns(Time) } + attr_accessor :bucket_start + + # Clicks in this bucket. sig { returns(Integer) } attr_accessor :clicks - # Impressions on this date. + # The bucket size of this row (`daily` or `hourly`). + sig { returns(WhopSDK::Granularities::TaggedSymbol) } + attr_accessor :granularity + + # Impressions in this bucket. sig { returns(Integer) } attr_accessor :impressions - # Unique users reached on this date. + # Unique users reached in this bucket. Always `0` for hourly rows (Meta does not + # return reach at hourly grain). sig { returns(Integer) } attr_accessor :reach - # Count of the primary optimization result on this date. + # Count of the primary optimization result in this bucket. sig { returns(T.nilable(Integer)) } attr_accessor :result_count # Types of optimization results tracked from external ad platforms - sig do - returns( - T.nilable( - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - ) - end + sig { returns(T.nilable(WhopSDK::ResultLabelKeys::TaggedSymbol)) } attr_accessor :result_label_key # Advertiser-defined label for the result when `resultLabelKey` is `custom`. sig { returns(T.nilable(String)) } attr_accessor :result_label_override - # Charged spend on this date in the requested reporting currency — the amount + # Charged spend in this bucket in the requested reporting currency — the amount # billed including platform fees, not the platform-side net spend. sig { returns(Float) } attr_accessor :spend @@ -113,215 +583,89 @@ module WhopSDK sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :spend_currency - # The date these stats cover (midnight UTC). + # The date these stats cover (midnight UTC). For hourly rows, see `statHour` and + # `bucketStart`. sig { returns(Time) } attr_accessor :stat_date - # Per-day ad performance for an ad campaign, ad group, or ad. + # Hour of the day in the ad account's reporting timezone (0-23). `null` for daily + # rows. + sig { returns(T.nilable(Integer)) } + attr_accessor :stat_hour + + # Per-bucket ad performance for an ad campaign, ad group, or ad. Bucket grain is + # set by the `ad_report` query's `granularity` argument. sig do params( + bucket_start: Time, clicks: Integer, + granularity: WhopSDK::Granularities::OrSymbol, impressions: Integer, reach: Integer, result_count: T.nilable(Integer), - result_label_key: - T.nilable( - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::OrSymbol - ), + result_label_key: T.nilable(WhopSDK::ResultLabelKeys::OrSymbol), result_label_override: T.nilable(String), spend: Float, spend_currency: WhopSDK::Currency::OrSymbol, - stat_date: Time + stat_date: Time, + stat_hour: T.nilable(Integer) ).returns(T.attached_class) end def self.new( - # Clicks on this date. + # The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved + # in the ad account's reporting timezone — render this in the viewer's local + # timezone. + bucket_start:, + # Clicks in this bucket. clicks:, - # Impressions on this date. + # The bucket size of this row (`daily` or `hourly`). + granularity:, + # Impressions in this bucket. impressions:, - # Unique users reached on this date. + # Unique users reached in this bucket. Always `0` for hourly rows (Meta does not + # return reach at hourly grain). reach:, - # Count of the primary optimization result on this date. + # Count of the primary optimization result in this bucket. result_count:, # Types of optimization results tracked from external ad platforms result_label_key:, # Advertiser-defined label for the result when `resultLabelKey` is `custom`. result_label_override:, - # Charged spend on this date in the requested reporting currency — the amount + # Charged spend in this bucket in the requested reporting currency — the amount # billed including platform fees, not the platform-side net spend. spend:, # Currency of the `spend` value. spend_currency:, - # The date these stats cover (midnight UTC). - stat_date: + # The date these stats cover (midnight UTC). For hourly rows, see `statHour` and + # `bucketStart`. + stat_date:, + # Hour of the day in the ad account's reporting timezone (0-23). `null` for daily + # rows. + stat_hour: ) end sig do override.returns( { + bucket_start: Time, clicks: Integer, + granularity: WhopSDK::Granularities::TaggedSymbol, impressions: Integer, reach: Integer, result_count: T.nilable(Integer), result_label_key: - T.nilable( - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ), + T.nilable(WhopSDK::ResultLabelKeys::TaggedSymbol), result_label_override: T.nilable(String), spend: Float, spend_currency: WhopSDK::Currency::TaggedSymbol, - stat_date: Time + stat_date: Time, + stat_hour: T.nilable(Integer) } ) end def to_hash end - - # Types of optimization results tracked from external ad platforms - module ResultLabelKey - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - APP_INSTALLS = - T.let( - :app_installs, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - MESSAGING_CONVERSATIONS_STARTED = - T.let( - :messaging_conversations_started, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - POST_ENGAGEMENT = - T.let( - :post_engagement, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - EVENT_RESPONSES = - T.let( - :event_responses, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - IMPRESSIONS = - T.let( - :impressions, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - WEBSITE_PURCHASES = - T.let( - :website_purchases, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - LANDING_PAGE_VIEWS = - T.let( - :landing_page_views, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - LEADS = - T.let( - :leads, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - LINK_CLICKS = - T.let( - :link_clicks, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - QUALITY_CALLS = - T.let( - :quality_calls, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - APPOINTMENTS_BOOKED = - T.let( - :appointments_booked, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - MESSAGING_PURCHASES = - T.let( - :messaging_purchases, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - PAGE_LIKES = - T.let( - :page_likes, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - INSTAGRAM_PROFILE_VISITS = - T.let( - :instagram_profile_visits, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - REACH = - T.let( - :reach, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - REMINDERS_SET = - T.let( - :reminders_set, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - NEW_SUBSCRIBERS = - T.let( - :new_subscribers, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - VIDEO_VIEWS = - T.let( - :video_views, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - REGISTRATIONS = - T.let( - :registrations, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - CONTENT_VIEWS = - T.let( - :content_views, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - SEARCHES = - T.let( - :searches, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - WEBSITE_SCHEDULES = - T.let( - :website_schedules, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - WEBSITE_SUBMIT_APPLICATIONS = - T.let( - :website_submit_applications, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdReportRetrieveResponse::Daily::ResultLabelKey::TaggedSymbol - ] - ) - end - def self.values - end - end end class Summary < WhopSDK::Internal::Type::BaseModel @@ -371,13 +715,7 @@ module WhopSDK attr_accessor :result_count # Types of optimization results tracked from external ad platforms - sig do - returns( - T.nilable( - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - ) - end + sig { returns(T.nilable(WhopSDK::ResultLabelKeys::TaggedSymbol)) } attr_accessor :result_label_key # Advertiser-defined label for the result when `resultLabelKey` is `custom`. @@ -409,10 +747,7 @@ module WhopSDK impressions: Integer, reach: Integer, result_count: T.nilable(Integer), - result_label_key: - T.nilable( - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::OrSymbol - ), + result_label_key: T.nilable(WhopSDK::ResultLabelKeys::OrSymbol), result_label_override: T.nilable(String), roas: T.nilable(Float), spend: Float, @@ -466,9 +801,7 @@ module WhopSDK reach: Integer, result_count: T.nilable(Integer), result_label_key: - T.nilable( - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ), + T.nilable(WhopSDK::ResultLabelKeys::TaggedSymbol), result_label_override: T.nilable(String), roas: T.nilable(Float), spend: Float, @@ -478,151 +811,6 @@ module WhopSDK end def to_hash end - - # Types of optimization results tracked from external ad platforms - module ResultLabelKey - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - APP_INSTALLS = - T.let( - :app_installs, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - MESSAGING_CONVERSATIONS_STARTED = - T.let( - :messaging_conversations_started, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - POST_ENGAGEMENT = - T.let( - :post_engagement, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - EVENT_RESPONSES = - T.let( - :event_responses, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - IMPRESSIONS = - T.let( - :impressions, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - WEBSITE_PURCHASES = - T.let( - :website_purchases, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - LANDING_PAGE_VIEWS = - T.let( - :landing_page_views, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - LEADS = - T.let( - :leads, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - LINK_CLICKS = - T.let( - :link_clicks, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - QUALITY_CALLS = - T.let( - :quality_calls, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - APPOINTMENTS_BOOKED = - T.let( - :appointments_booked, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - MESSAGING_PURCHASES = - T.let( - :messaging_purchases, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - PAGE_LIKES = - T.let( - :page_likes, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - INSTAGRAM_PROFILE_VISITS = - T.let( - :instagram_profile_visits, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - REACH = - T.let( - :reach, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - REMINDERS_SET = - T.let( - :reminders_set, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - NEW_SUBSCRIBERS = - T.let( - :new_subscribers, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - VIDEO_VIEWS = - T.let( - :video_views, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - REGISTRATIONS = - T.let( - :registrations, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - CONTENT_VIEWS = - T.let( - :content_views, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - SEARCHES = - T.let( - :searches, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - WEBSITE_SCHEDULES = - T.let( - :website_schedules, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - WEBSITE_SUBMIT_APPLICATIONS = - T.let( - :website_submit_applications, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdReportRetrieveResponse::Summary::ResultLabelKey::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/whop_sdk/models/ad_retrieve_response.rbi b/rbi/whop_sdk/models/ad_retrieve_response.rbi deleted file mode 100644 index 3b69bc28..00000000 --- a/rbi/whop_sdk/models/ad_retrieve_response.rbi +++ /dev/null @@ -1,245 +0,0 @@ -# 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 - - # The unique identifier for this ad. - sig { returns(String) } - attr_accessor :id - - # The ad campaign this ad belongs to. - sig { returns(WhopSDK::Models::AdRetrieveResponse::AdCampaign) } - attr_reader :ad_campaign - - sig do - params( - ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign::OrHash - ).void - end - attr_writer :ad_campaign - - # The parent ad group this ad belongs to. - sig { returns(WhopSDK::Models::AdRetrieveResponse::AdGroup) } - attr_reader :ad_group - - sig do - params( - ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup::OrHash - ).void - end - attr_writer :ad_group - - # When the ad was created. - sig { returns(Time) } - attr_accessor :created_at - - # The external ad platform this ad is running on (e.g., meta, tiktok). - sig do - returns(WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol) - end - attr_accessor :platform - - # Current delivery status of the ad. - sig { returns(WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol) } - attr_accessor :status - - # The display title of the ad. Falls back to the creative set caption when unset. - sig { returns(T.nilable(String)) } - attr_accessor :title - - # 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, - ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign::OrHash, - ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup::OrHash, - created_at: Time, - platform: WhopSDK::Models::AdRetrieveResponse::Platform::OrSymbol, - status: WhopSDK::Models::AdRetrieveResponse::Status::OrSymbol, - title: T.nilable(String), - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # The unique identifier for this ad. - id:, - # The ad campaign this ad belongs to. - ad_campaign:, - # The parent ad group this ad belongs to. - ad_group:, - # When the ad was created. - created_at:, - # The external ad platform this ad is running on (e.g., meta, tiktok). - platform:, - # Current delivery status of the ad. - status:, - # The display title of the ad. Falls back to the creative set caption when unset. - title:, - # When the ad was last updated. - updated_at: - ) - end - - sig do - override.returns( - { - id: String, - ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign, - ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup, - created_at: Time, - platform: - WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol, - status: WhopSDK::Models::AdRetrieveResponse::Status::TaggedSymbol, - title: T.nilable(String), - updated_at: Time - } - ) - end - def to_hash - end - - class AdCampaign < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::Models::AdRetrieveResponse::AdCampaign, - WhopSDK::Internal::AnyHash - ) - end - - # The unique identifier for this ad campaign. - sig { returns(String) } - attr_accessor :id - - # The ad campaign this ad belongs to. - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The unique identifier for this ad campaign. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end - end - - class AdGroup < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::Models::AdRetrieveResponse::AdGroup, - WhopSDK::Internal::AnyHash - ) - end - - # The unique identifier for this ad group. - sig { returns(String) } - attr_accessor :id - - # The parent ad group this ad belongs to. - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The unique identifier for this ad group. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end - end - - # The external ad platform this ad is running on (e.g., meta, tiktok). - module Platform - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, WhopSDK::Models::AdRetrieveResponse::Platform) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - META = - T.let( - :meta, - WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol - ) - TIKTOK = - T.let( - :tiktok, - WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AdRetrieveResponse::Platform::TaggedSymbol - ] - ) - end - def self.values - end - end - - # Current delivery 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/ad_unpause_params.rbi b/rbi/whop_sdk/models/ad_unpause_params.rbi new file mode 100644 index 00000000..db6f6fee --- /dev/null +++ b/rbi/whop_sdk/models/ad_unpause_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AdUnpauseParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AdUnpauseParams, 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/dispute.rbi b/rbi/whop_sdk/models/dispute.rbi index ff2a1189..d032c193 100644 --- a/rbi/whop_sdk/models/dispute.rbi +++ b/rbi/whop_sdk/models/dispute.rbi @@ -82,8 +82,7 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :customer_name - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. sig { returns(T.nilable(T::Boolean)) } attr_accessor :editable @@ -250,8 +249,7 @@ module WhopSDK # The customer's full name from their payment details, included in the evidence # packet sent to the payment processor. Editable before submission. customer_name:, - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. editable:, # The deadline by which dispute evidence must be submitted. Null if no response # deadline is set. @@ -533,8 +531,8 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at - # The available currencies on the platform - sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency # When an alert came in that this transaction will be disputed @@ -601,7 +599,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::OrSymbol), + currency: WhopSDK::Currency::OrSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable(WhopSDK::Dispute::Payment::Member::OrHash), membership: @@ -627,7 +625,7 @@ module WhopSDK card_last4:, # The datetime the payment was created. created_at:, - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). currency:, # When an alert came in that this transaction will be disputed dispute_alerted_at:, @@ -659,7 +657,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + currency: WhopSDK::Currency::TaggedSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable(WhopSDK::Dispute::Payment::Member), membership: T.nilable(WhopSDK::Dispute::Payment::Membership), diff --git a/rbi/whop_sdk/models/dispute_alert_created_webhook_event.rbi b/rbi/whop_sdk/models/dispute_alert_created_webhook_event.rbi index fdaa29a8..f862985a 100644 --- a/rbi/whop_sdk/models/dispute_alert_created_webhook_event.rbi +++ b/rbi/whop_sdk/models/dispute_alert_created_webhook_event.rbi @@ -333,8 +333,8 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at - # The available currencies on the platform - sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency # When an alert came in that this transaction will be disputed @@ -430,7 +430,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::OrSymbol), + currency: WhopSDK::Currency::OrSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( @@ -464,7 +464,7 @@ module WhopSDK card_last4:, # The datetime the payment was created. created_at:, - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). currency:, # When an alert came in that this transaction will be disputed dispute_alerted_at:, @@ -497,7 +497,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + currency: WhopSDK::Currency::TaggedSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( diff --git a/rbi/whop_sdk/models/dispute_alert_retrieve_response.rbi b/rbi/whop_sdk/models/dispute_alert_retrieve_response.rbi index 9be59b52..6328648f 100644 --- a/rbi/whop_sdk/models/dispute_alert_retrieve_response.rbi +++ b/rbi/whop_sdk/models/dispute_alert_retrieve_response.rbi @@ -246,8 +246,8 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at - # The available currencies on the platform - sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency # When an alert came in that this transaction will be disputed @@ -343,7 +343,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::OrSymbol), + currency: WhopSDK::Currency::OrSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( @@ -377,7 +377,7 @@ module WhopSDK card_last4:, # The datetime the payment was created. created_at:, - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). currency:, # When an alert came in that this transaction will be disputed dispute_alerted_at:, @@ -409,7 +409,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + currency: WhopSDK::Currency::TaggedSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( diff --git a/rbi/whop_sdk/models/dispute_list_response.rbi b/rbi/whop_sdk/models/dispute_list_response.rbi index 82b7d632..63075820 100644 --- a/rbi/whop_sdk/models/dispute_list_response.rbi +++ b/rbi/whop_sdk/models/dispute_list_response.rbi @@ -39,8 +39,7 @@ module WhopSDK sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. sig { returns(T.nilable(T::Boolean)) } attr_accessor :editable @@ -133,8 +132,7 @@ module WhopSDK created_at:, # The three-letter ISO currency code for the disputed amount. currency:, - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. editable:, # The deadline by which dispute evidence must be submitted. Null if no response # deadline is set. diff --git a/rbi/whop_sdk/models/external_ad_status.rbi b/rbi/whop_sdk/models/external_ad_status.rbi new file mode 100644 index 00000000..d45dd5ae --- /dev/null +++ b/rbi/whop_sdk/models/external_ad_status.rbi @@ -0,0 +1,26 @@ +# typed: strong + +module WhopSDK + module Models + # The status of an external ad. + module ExternalAdStatus + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::ExternalAdStatus) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = T.let(:active, WhopSDK::ExternalAdStatus::TaggedSymbol) + PAUSED = T.let(:paused, WhopSDK::ExternalAdStatus::TaggedSymbol) + INACTIVE = T.let(:inactive, WhopSDK::ExternalAdStatus::TaggedSymbol) + IN_REVIEW = T.let(:in_review, WhopSDK::ExternalAdStatus::TaggedSymbol) + REJECTED = T.let(:rejected, WhopSDK::ExternalAdStatus::TaggedSymbol) + FLAGGED = T.let(:flagged, WhopSDK::ExternalAdStatus::TaggedSymbol) + + sig do + override.returns(T::Array[WhopSDK::ExternalAdStatus::TaggedSymbol]) + end + def self.values + end + end + end +end diff --git a/rbi/whop_sdk/models/file_create_params.rbi b/rbi/whop_sdk/models/file_create_params.rbi index 898ddf51..c6d8b2d4 100644 --- a/rbi/whop_sdk/models/file_create_params.rbi +++ b/rbi/whop_sdk/models/file_create_params.rbi @@ -18,16 +18,13 @@ module WhopSDK # Controls whether an uploaded file is publicly accessible or requires # authentication to access. - sig do - returns(T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol)) - end + sig { returns(T.nilable(WhopSDK::FileVisibility::OrSymbol)) } attr_accessor :visibility sig do params( filename: String, - visibility: - T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol), + visibility: T.nilable(WhopSDK::FileVisibility::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -46,37 +43,13 @@ module WhopSDK override.returns( { filename: String, - visibility: - T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol), + visibility: T.nilable(WhopSDK::FileVisibility::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 fe62933b..beb493e6 100644 --- a/rbi/whop_sdk/models/file_create_response.rbi +++ b/rbi/whop_sdk/models/file_create_response.rbi @@ -45,9 +45,7 @@ module WhopSDK attr_accessor :url # Whether the file is publicly accessible or requires authentication. - sig do - returns(WhopSDK::Models::FileCreateResponse::Visibility::TaggedSymbol) - end + sig { returns(WhopSDK::FileVisibility::TaggedSymbol) } attr_accessor :visibility # A file that has been uploaded or is pending upload. @@ -61,7 +59,7 @@ module WhopSDK upload_status: WhopSDK::UploadStatus::OrSymbol, upload_url: T.nilable(String), url: T.nilable(String), - visibility: WhopSDK::Models::FileCreateResponse::Visibility::OrSymbol + visibility: WhopSDK::FileVisibility::OrSymbol ).returns(T.attached_class) end def self.new( @@ -101,45 +99,12 @@ module WhopSDK upload_status: WhopSDK::UploadStatus::TaggedSymbol, upload_url: T.nilable(String), url: T.nilable(String), - visibility: - WhopSDK::Models::FileCreateResponse::Visibility::TaggedSymbol + visibility: WhopSDK::FileVisibility::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 aea58c37..0c3f7f00 100644 --- a/rbi/whop_sdk/models/file_retrieve_response.rbi +++ b/rbi/whop_sdk/models/file_retrieve_response.rbi @@ -38,9 +38,7 @@ module WhopSDK attr_accessor :url # Whether the file is publicly accessible or requires authentication. - sig do - returns(WhopSDK::Models::FileRetrieveResponse::Visibility::TaggedSymbol) - end + sig { returns(WhopSDK::FileVisibility::TaggedSymbol) } attr_accessor :visibility # A file that has been uploaded or is pending upload. @@ -52,8 +50,7 @@ module WhopSDK size: T.nilable(String), upload_status: WhopSDK::UploadStatus::OrSymbol, url: T.nilable(String), - visibility: - WhopSDK::Models::FileRetrieveResponse::Visibility::OrSymbol + visibility: WhopSDK::FileVisibility::OrSymbol ).returns(T.attached_class) end def self.new( @@ -85,45 +82,12 @@ module WhopSDK size: T.nilable(String), upload_status: WhopSDK::UploadStatus::TaggedSymbol, url: T.nilable(String), - visibility: - WhopSDK::Models::FileRetrieveResponse::Visibility::TaggedSymbol + visibility: WhopSDK::FileVisibility::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/file_visibility.rbi b/rbi/whop_sdk/models/file_visibility.rbi new file mode 100644 index 00000000..00c1bb00 --- /dev/null +++ b/rbi/whop_sdk/models/file_visibility.rbi @@ -0,0 +1,21 @@ +# typed: strong + +module WhopSDK + module Models + # Controls whether an uploaded file is publicly accessible or requires + # authentication to access. + module FileVisibility + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::FileVisibility) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PUBLIC = T.let(:public, WhopSDK::FileVisibility::TaggedSymbol) + PRIVATE = T.let(:private, WhopSDK::FileVisibility::TaggedSymbol) + + sig { override.returns(T::Array[WhopSDK::FileVisibility::TaggedSymbol]) } + def self.values + end + end + end +end diff --git a/rbi/whop_sdk/models/granularities.rbi b/rbi/whop_sdk/models/granularities.rbi new file mode 100644 index 00000000..baebf463 --- /dev/null +++ b/rbi/whop_sdk/models/granularities.rbi @@ -0,0 +1,20 @@ +# typed: strong + +module WhopSDK + module Models + # Bucket size for external ad stat rows. + module Granularities + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::Granularities) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + DAILY = T.let(:daily, WhopSDK::Granularities::TaggedSymbol) + HOURLY = T.let(:hourly, WhopSDK::Granularities::TaggedSymbol) + + sig { override.returns(T::Array[WhopSDK::Granularities::TaggedSymbol]) } + def self.values + end + end + end +end diff --git a/rbi/whop_sdk/models/member_list_response.rbi b/rbi/whop_sdk/models/member_list_response.rbi index 9c22add3..c0fd89a1 100644 --- a/rbi/whop_sdk/models/member_list_response.rbi +++ b/rbi/whop_sdk/models/member_list_response.rbi @@ -19,7 +19,8 @@ module WhopSDK sig { returns(WhopSDK::AccessLevel::TaggedSymbol) } attr_accessor :access_level - # The member's token balance for this company + # The member's token balance for this company. Computed live from the ledger, not + # from a cache. sig { returns(Float) } attr_accessor :company_token_balance @@ -93,7 +94,8 @@ module WhopSDK # membership to any product on the company. If its no_access, the member does not # have access to the product. access_level:, - # The member's token balance for this company + # The member's token balance for this company. Computed live from the ledger, not + # from a cache. company_token_balance:, # The datetime the company member was created. created_at:, diff --git a/rbi/whop_sdk/models/member_retrieve_response.rbi b/rbi/whop_sdk/models/member_retrieve_response.rbi index dad3313c..03263cc6 100644 --- a/rbi/whop_sdk/models/member_retrieve_response.rbi +++ b/rbi/whop_sdk/models/member_retrieve_response.rbi @@ -33,7 +33,8 @@ module WhopSDK end attr_writer :company - # The member's token balance for this company + # The member's token balance for this company. Computed live from the ledger, not + # from a cache. sig { returns(Float) } attr_accessor :company_token_balance @@ -110,7 +111,8 @@ module WhopSDK access_level:, # The company for the member. company:, - # The member's token balance for this company + # The member's token balance for this company. Computed live from the ledger, not + # from a cache. company_token_balance:, # The datetime the company member was created. created_at:, diff --git a/rbi/whop_sdk/models/membership.rbi b/rbi/whop_sdk/models/membership.rbi index b2f2c86a..2b7abc52 100644 --- a/rbi/whop_sdk/models/membership.rbi +++ b/rbi/whop_sdk/models/membership.rbi @@ -384,15 +384,32 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The plan the customer purchased to create this membership. - sig { params(id: String).returns(T.attached_class) } + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) + end def self.new( # The unique identifier for the plan. - id: + id:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata: ) end - sig { override.returns({ id: String }) } + sig do + override.returns( + { id: String, metadata: T.nilable(T::Hash[Symbol, T.anything]) } + ) + end def to_hash end end @@ -407,23 +424,45 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The display name of the product shown to customers on the product page and in # search results. sig { returns(String) } attr_accessor :title # The product this membership grants access to. - sig { params(id: String, title: String).returns(T.attached_class) } + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]), + title: String + ).returns(T.attached_class) + end def self.new( # The unique identifier for the product. id:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata:, # The display name of the product shown to customers on the product page and in # search results. title: ) end - sig { override.returns({ id: String, title: String }) } + sig do + override.returns( + { + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]), + title: String + } + ) + end def to_hash end end diff --git a/rbi/whop_sdk/models/membership_list_response.rbi b/rbi/whop_sdk/models/membership_list_response.rbi index d73e63a0..f8bab58b 100644 --- a/rbi/whop_sdk/models/membership_list_response.rbi +++ b/rbi/whop_sdk/models/membership_list_response.rbi @@ -371,15 +371,32 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The plan the customer purchased to create this membership. - sig { params(id: String).returns(T.attached_class) } + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) + end def self.new( # The unique identifier for the plan. - id: + id:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata: ) end - sig { override.returns({ id: String }) } + sig do + override.returns( + { id: String, metadata: T.nilable(T::Hash[Symbol, T.anything]) } + ) + end def to_hash end end @@ -397,23 +414,45 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The display name of the product shown to customers on the product page and in # search results. sig { returns(String) } attr_accessor :title # The product this membership grants access to. - sig { params(id: String, title: String).returns(T.attached_class) } + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]), + title: String + ).returns(T.attached_class) + end def self.new( # The unique identifier for the product. id:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata:, # The display name of the product shown to customers on the product page and in # search results. title: ) end - sig { override.returns({ id: String, title: String }) } + sig do + override.returns( + { + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]), + title: String + } + ) + end def to_hash end end diff --git a/rbi/whop_sdk/models/payment.rbi b/rbi/whop_sdk/models/payment.rbi index 7937920c..f6417f61 100644 --- a/rbi/whop_sdk/models/payment.rbi +++ b/rbi/whop_sdk/models/payment.rbi @@ -69,8 +69,8 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at - # The available currencies on the platform - sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency # When an alert came in that this transaction will be disputed @@ -198,19 +198,16 @@ 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. + # The total amount charged to the customer for this payment, including taxes and + # after any discounts. In the currency specified by the currency field. 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) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } 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. + # Deprecated. Always returns null. sig { returns(T.nilable(Float)) } attr_accessor :settlement_exchange_rate @@ -278,7 +275,7 @@ module WhopSDK checkout_configuration_id: T.nilable(String), company: T.nilable(WhopSDK::Payment::Company::OrHash), created_at: Time, - currency: T.nilable(WhopSDK::Currency::OrSymbol), + currency: WhopSDK::Currency::OrSymbol, dispute_alerted_at: T.nilable(Time), disputes: T.nilable(T::Array[WhopSDK::Payment::Dispute::OrHash]), failure_message: T.nilable(String), @@ -304,7 +301,7 @@ module WhopSDK T.nilable(T::Array[WhopSDK::Payment::Resolution::OrHash]), retryable: T::Boolean, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Currency::OrSymbol, settlement_exchange_rate: T.nilable(Float), status: T.nilable(WhopSDK::ReceiptStatus::OrSymbol), substatus: WhopSDK::FriendlyReceiptStatus::OrSymbol, @@ -344,7 +341,7 @@ module WhopSDK company:, # The datetime the payment was created. created_at:, - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). currency:, # When an alert came in that this transaction will be disputed dispute_alerted_at:, @@ -401,15 +398,12 @@ 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. + # The total amount charged to the customer for this payment, including taxes and + # after any discounts. In the currency specified by the currency field. 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. + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). 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. + # Deprecated. Always returns null. settlement_exchange_rate:, # The status of a receipt status:, @@ -452,7 +446,7 @@ module WhopSDK checkout_configuration_id: T.nilable(String), company: T.nilable(WhopSDK::Payment::Company), created_at: Time, - currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + currency: WhopSDK::Currency::TaggedSymbol, dispute_alerted_at: T.nilable(Time), disputes: T.nilable(T::Array[WhopSDK::Payment::Dispute]), failure_message: T.nilable(String), @@ -478,7 +472,7 @@ module WhopSDK resolutions: T.nilable(T::Array[WhopSDK::Payment::Resolution]), retryable: T::Boolean, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Currency::TaggedSymbol, settlement_exchange_rate: T.nilable(Float), status: T.nilable(WhopSDK::ReceiptStatus::TaggedSymbol), substatus: WhopSDK::FriendlyReceiptStatus::TaggedSymbol, @@ -708,8 +702,7 @@ module WhopSDK sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. sig { returns(T.nilable(T::Boolean)) } attr_accessor :editable @@ -753,8 +746,7 @@ module WhopSDK amount:, # The three-letter ISO currency code for the disputed amount. currency:, - # Whether the dispute evidence can still be edited and submitted. Returns true - # only when the dispute status requires a response. + # Whether the dispute evidence can still be edited and submitted. editable:, # The deadline by which dispute evidence must be submitted. Null if no response # deadline is set. @@ -1237,22 +1229,38 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :internal_notes + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The plan attached to this payment. sig do - params(id: String, internal_notes: T.nilable(String)).returns( - T.attached_class - ) + params( + id: String, + internal_notes: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) end def self.new( # The unique identifier for the plan. id:, # A personal description or notes section for the business. - internal_notes: + internal_notes:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata: ) end sig do - override.returns({ id: String, internal_notes: T.nilable(String) }) + override.returns( + { + id: String, + internal_notes: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.anything]) + } + ) end def to_hash end @@ -1268,6 +1276,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The URL slug used in the product's public link (e.g., 'my-product' in # whop.com/company/my-product). sig { returns(String) } @@ -1280,13 +1293,19 @@ module WhopSDK # The product this payment was made for sig do - params(id: String, route: String, title: String).returns( - T.attached_class - ) + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]), + route: String, + title: String + ).returns(T.attached_class) end def self.new( # The unique identifier for the product. id:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata:, # The URL slug used in the product's public link (e.g., 'my-product' in # whop.com/company/my-product). route:, @@ -1296,7 +1315,16 @@ module WhopSDK ) end - sig { override.returns({ id: String, route: String, title: String }) } + sig do + override.returns( + { + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]), + route: String, + title: String + } + ) + end def to_hash end end diff --git a/rbi/whop_sdk/models/payment_list_response.rbi b/rbi/whop_sdk/models/payment_list_response.rbi index 5647a48f..2bb6048f 100644 --- a/rbi/whop_sdk/models/payment_list_response.rbi +++ b/rbi/whop_sdk/models/payment_list_response.rbi @@ -89,8 +89,8 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at - # The available currencies on the platform - sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency # When an alert came in that this transaction will be disputed @@ -226,10 +226,8 @@ 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) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :settlement_currency # The status of a receipt @@ -303,7 +301,7 @@ module WhopSDK company: T.nilable(WhopSDK::Models::PaymentListResponse::Company::OrHash), created_at: Time, - currency: T.nilable(WhopSDK::Currency::OrSymbol), + currency: WhopSDK::Currency::OrSymbol, dispute_alerted_at: T.nilable(Time), failure_message: T.nilable(String), last_payment_attempt: T.nilable(Time), @@ -329,7 +327,7 @@ module WhopSDK refunded_amount: T.nilable(Float), refunded_at: T.nilable(Time), retryable: T::Boolean, - settlement_currency: String, + settlement_currency: WhopSDK::Currency::OrSymbol, status: T.nilable(WhopSDK::ReceiptStatus::OrSymbol), substatus: WhopSDK::FriendlyReceiptStatus::OrSymbol, subtotal: T.nilable(Float), @@ -367,7 +365,7 @@ module WhopSDK company:, # The datetime the payment was created. created_at:, - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). currency:, # When an alert came in that this transaction will be disputed dispute_alerted_at:, @@ -411,9 +409,7 @@ 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. + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). settlement_currency:, # The status of a receipt status:, @@ -456,7 +452,7 @@ module WhopSDK checkout_configuration_id: T.nilable(String), company: T.nilable(WhopSDK::Models::PaymentListResponse::Company), created_at: Time, - currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + currency: WhopSDK::Currency::TaggedSymbol, dispute_alerted_at: T.nilable(Time), failure_message: T.nilable(String), last_payment_attempt: T.nilable(Time), @@ -479,7 +475,7 @@ module WhopSDK refunded_amount: T.nilable(Float), refunded_at: T.nilable(Time), retryable: T::Boolean, - settlement_currency: String, + settlement_currency: WhopSDK::Currency::TaggedSymbol, status: T.nilable(WhopSDK::ReceiptStatus::TaggedSymbol), substatus: WhopSDK::FriendlyReceiptStatus::TaggedSymbol, subtotal: T.nilable(Float), @@ -933,22 +929,38 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :internal_notes + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The plan attached to this payment. sig do - params(id: String, internal_notes: T.nilable(String)).returns( - T.attached_class - ) + params( + id: String, + internal_notes: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) end def self.new( # The unique identifier for the plan. id:, # A personal description or notes section for the business. - internal_notes: + internal_notes:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata: ) end sig do - override.returns({ id: String, internal_notes: T.nilable(String) }) + override.returns( + { + id: String, + internal_notes: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.anything]) + } + ) end def to_hash end @@ -967,6 +979,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The URL slug used in the product's public link (e.g., 'my-product' in # whop.com/company/my-product). sig { returns(String) } @@ -979,13 +996,19 @@ module WhopSDK # The product this payment was made for sig do - params(id: String, route: String, title: String).returns( - T.attached_class - ) + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]), + route: String, + title: String + ).returns(T.attached_class) end def self.new( # The unique identifier for the product. id:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata:, # The URL slug used in the product's public link (e.g., 'my-product' in # whop.com/company/my-product). route:, @@ -995,7 +1018,16 @@ module WhopSDK ) end - sig { override.returns({ id: String, route: String, title: String }) } + sig do + override.returns( + { + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]), + route: String, + title: String + } + ) + end def to_hash end end diff --git a/rbi/whop_sdk/models/plan.rbi b/rbi/whop_sdk/models/plan.rbi index 241c168e..41eb89d1 100644 --- a/rbi/whop_sdk/models/plan.rbi +++ b/rbi/whop_sdk/models/plan.rbi @@ -80,6 +80,11 @@ module WhopSDK sig { returns(T.nilable(Integer)) } attr_accessor :member_count + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The explicit payment method configuration specifying which payment methods are # enabled or disabled for this plan. Null if the plan uses default settings. sig { returns(T.nilable(WhopSDK::Plan::PaymentMethodConfiguration)) } @@ -180,6 +185,7 @@ module WhopSDK internal_notes: T.nilable(String), invoice: T.nilable(WhopSDK::Plan::Invoice::OrHash), member_count: T.nilable(Integer), + metadata: T.nilable(T::Hash[Symbol, T.anything]), payment_method_configuration: T.nilable(WhopSDK::Plan::PaymentMethodConfiguration::OrHash), plan_type: WhopSDK::PlanType::OrSymbol, @@ -239,6 +245,9 @@ module WhopSDK # The number of users who currently hold an active membership through this plan. # Only visible to authorized team members. member_count:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata:, # The explicit payment method configuration specifying which payment methods are # enabled or disabled for this plan. Null if the plan uses default settings. payment_method_configuration:, @@ -301,6 +310,7 @@ module WhopSDK internal_notes: T.nilable(String), invoice: T.nilable(WhopSDK::Plan::Invoice), member_count: T.nilable(Integer), + metadata: T.nilable(T::Hash[Symbol, T.anything]), payment_method_configuration: T.nilable(WhopSDK::Plan::PaymentMethodConfiguration), plan_type: WhopSDK::PlanType::TaggedSymbol, diff --git a/rbi/whop_sdk/models/plan_create_params.rbi b/rbi/whop_sdk/models/plan_create_params.rbi index a72e301e..ade10887 100644 --- a/rbi/whop_sdk/models/plan_create_params.rbi +++ b/rbi/whop_sdk/models/plan_create_params.rbi @@ -83,6 +83,12 @@ module WhopSDK sig { returns(T.nilable(T::Boolean)) } attr_accessor :legacy_payment_method_controls + # Custom key-value pairs to store on the plan. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # Whether or not the tax is included in a plan's price (or if it hasn't been set # up) sig { returns(T.nilable(WhopSDK::TaxType::OrSymbol)) } @@ -163,6 +169,7 @@ module WhopSDK initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), + metadata: T.nilable(T::Hash[Symbol, T.anything]), override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol), payment_method_configuration: T.nilable( @@ -212,6 +219,10 @@ module WhopSDK internal_notes: nil, # Whether this plan uses legacy payment method controls. legacy_payment_method_controls: nil, + # Custom key-value pairs to store on the plan. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + metadata: nil, # Whether or not the tax is included in a plan's price (or if it hasn't been set # up) override_tax_type: nil, @@ -261,6 +272,7 @@ module WhopSDK initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), + metadata: T.nilable(T::Hash[Symbol, T.anything]), override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol), payment_method_configuration: T.nilable(WhopSDK::PlanCreateParams::PaymentMethodConfiguration), diff --git a/rbi/whop_sdk/models/plan_list_response.rbi b/rbi/whop_sdk/models/plan_list_response.rbi index 65aa756c..da96123e 100644 --- a/rbi/whop_sdk/models/plan_list_response.rbi +++ b/rbi/whop_sdk/models/plan_list_response.rbi @@ -81,6 +81,11 @@ module WhopSDK sig { returns(T.nilable(Integer)) } attr_accessor :member_count + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The explicit payment method configuration specifying which payment methods are # enabled or disabled for this plan. Null if the plan uses default settings. sig do @@ -188,6 +193,7 @@ module WhopSDK invoice: T.nilable(WhopSDK::Models::PlanListResponse::Invoice::OrHash), member_count: T.nilable(Integer), + metadata: T.nilable(T::Hash[Symbol, T.anything]), payment_method_configuration: T.nilable( WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration::OrHash @@ -243,6 +249,9 @@ module WhopSDK # The number of users who currently hold an active membership through this plan. # Only visible to authorized team members. member_count:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata:, # The explicit payment method configuration specifying which payment methods are # enabled or disabled for this plan. Null if the plan uses default settings. payment_method_configuration:, @@ -300,6 +309,7 @@ module WhopSDK internal_notes: T.nilable(String), invoice: T.nilable(WhopSDK::Models::PlanListResponse::Invoice), member_count: T.nilable(Integer), + metadata: T.nilable(T::Hash[Symbol, T.anything]), payment_method_configuration: T.nilable( WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration diff --git a/rbi/whop_sdk/models/plan_update_params.rbi b/rbi/whop_sdk/models/plan_update_params.rbi index 750640e1..24ed3c18 100644 --- a/rbi/whop_sdk/models/plan_update_params.rbi +++ b/rbi/whop_sdk/models/plan_update_params.rbi @@ -77,6 +77,12 @@ module WhopSDK sig { returns(T.nilable(T::Boolean)) } attr_accessor :legacy_payment_method_controls + # Custom key-value pairs to store on the plan. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # Whether to offer a retention discount when a customer attempts to cancel. sig { returns(T.nilable(T::Boolean)) } attr_accessor :offer_cancel_discount @@ -157,6 +163,7 @@ module WhopSDK initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), + metadata: T.nilable(T::Hash[Symbol, T.anything]), offer_cancel_discount: T.nilable(T::Boolean), override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol), payment_method_configuration: @@ -202,6 +209,10 @@ module WhopSDK internal_notes: nil, # Whether this plan uses legacy payment method controls. legacy_payment_method_controls: nil, + # Custom key-value pairs to store on the plan. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + metadata: nil, # Whether to offer a retention discount when a customer attempts to cancel. offer_cancel_discount: nil, # Whether or not the tax is included in a plan's price (or if it hasn't been set @@ -251,6 +262,7 @@ module WhopSDK initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), + metadata: T.nilable(T::Hash[Symbol, T.anything]), offer_cancel_discount: T.nilable(T::Boolean), override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol), payment_method_configuration: diff --git a/rbi/whop_sdk/models/product.rbi b/rbi/whop_sdk/models/product.rbi index 8b9083d3..d6d4759a 100644 --- a/rbi/whop_sdk/models/product.rbi +++ b/rbi/whop_sdk/models/product.rbi @@ -81,6 +81,11 @@ module WhopSDK sig { returns(Integer) } attr_accessor :member_count + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The user who owns the company that sells this product. sig { returns(WhopSDK::Product::OwnerUser) } attr_reader :owner_user @@ -146,6 +151,7 @@ module WhopSDK member_affiliate_percentage: T.nilable(Float), member_affiliate_status: WhopSDK::GlobalAffiliateStatus::OrSymbol, member_count: Integer, + metadata: T.nilable(T::Hash[Symbol, T.anything]), owner_user: WhopSDK::Product::OwnerUser::OrHash, product_tax_code: T.nilable(WhopSDK::Product::ProductTaxCode::OrHash), published_reviews_count: Integer, @@ -199,6 +205,9 @@ module WhopSDK # The number of users who currently hold an active membership to this product. # Returns 0 if the company has disabled public member counts. member_count:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata:, # The user who owns the company that sells this product. owner_user:, # The tax classification code applied to purchases of this product for sales tax @@ -242,6 +251,7 @@ module WhopSDK member_affiliate_status: WhopSDK::GlobalAffiliateStatus::TaggedSymbol, member_count: Integer, + metadata: T.nilable(T::Hash[Symbol, T.anything]), owner_user: WhopSDK::Product::OwnerUser, product_tax_code: T.nilable(WhopSDK::Product::ProductTaxCode), published_reviews_count: Integer, diff --git a/rbi/whop_sdk/models/product_create_params.rbi b/rbi/whop_sdk/models/product_create_params.rbi index c3586d48..5ff1885b 100644 --- a/rbi/whop_sdk/models/product_create_params.rbi +++ b/rbi/whop_sdk/models/product_create_params.rbi @@ -68,6 +68,12 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol)) } attr_accessor :member_affiliate_status + # Custom key-value pairs to store on the product. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # Configuration for an automatically generated plan to attach to this product. sig { returns(T.nilable(WhopSDK::ProductCreateParams::PlanOptions)) } attr_reader :plan_options @@ -118,6 +124,7 @@ module WhopSDK member_affiliate_percentage: T.nilable(Float), member_affiliate_status: T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol), + metadata: T.nilable(T::Hash[Symbol, T.anything]), plan_options: T.nilable(WhopSDK::ProductCreateParams::PlanOptions::OrHash), product_tax_code_id: T.nilable(String), @@ -160,6 +167,10 @@ module WhopSDK member_affiliate_percentage: nil, # The different statuses of the global affiliate program for a product. member_affiliate_status: nil, + # Custom key-value pairs to store on the product. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + metadata: nil, # Configuration for an automatically generated plan to attach to this product. plan_options: nil, # The unique identifier of the tax classification code to apply to this product. @@ -195,6 +206,7 @@ module WhopSDK member_affiliate_percentage: T.nilable(Float), member_affiliate_status: T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol), + metadata: T.nilable(T::Hash[Symbol, T.anything]), plan_options: T.nilable(WhopSDK::ProductCreateParams::PlanOptions), product_tax_code_id: T.nilable(String), redirect_purchase_url: T.nilable(String), diff --git a/rbi/whop_sdk/models/product_list_item.rbi b/rbi/whop_sdk/models/product_list_item.rbi index 9eda1c6c..56823acd 100644 --- a/rbi/whop_sdk/models/product_list_item.rbi +++ b/rbi/whop_sdk/models/product_list_item.rbi @@ -31,6 +31,11 @@ module WhopSDK sig { returns(Integer) } attr_accessor :member_count + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The total number of published customer reviews for this product's company. sig { returns(Integer) } attr_accessor :published_reviews_count @@ -67,6 +72,7 @@ module WhopSDK external_identifier: T.nilable(String), headline: T.nilable(String), member_count: Integer, + metadata: T.nilable(T::Hash[Symbol, T.anything]), published_reviews_count: Integer, route: String, title: String, @@ -89,6 +95,9 @@ module WhopSDK # The number of users who currently hold an active membership to this product. # Returns 0 if the company has disabled public member counts. member_count:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata:, # The total number of published customer reviews for this product's company. published_reviews_count:, # The URL slug used in the product's public link (e.g., 'my-product' in @@ -115,6 +124,7 @@ module WhopSDK external_identifier: T.nilable(String), headline: T.nilable(String), member_count: Integer, + metadata: T.nilable(T::Hash[Symbol, T.anything]), published_reviews_count: Integer, route: String, title: String, diff --git a/rbi/whop_sdk/models/product_update_params.rbi b/rbi/whop_sdk/models/product_update_params.rbi index 4fd64a20..c51bce50 100644 --- a/rbi/whop_sdk/models/product_update_params.rbi +++ b/rbi/whop_sdk/models/product_update_params.rbi @@ -65,6 +65,12 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol)) } attr_accessor :member_affiliate_status + # Custom key-value pairs to store on the product. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The unique identifier of the tax classification code to apply to this product. sig { returns(T.nilable(String)) } attr_accessor :product_tax_code_id @@ -121,6 +127,7 @@ module WhopSDK member_affiliate_percentage: T.nilable(Float), member_affiliate_status: T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol), + metadata: T.nilable(T::Hash[Symbol, T.anything]), product_tax_code_id: T.nilable(String), redirect_purchase_url: T.nilable(String), route: T.nilable(String), @@ -161,6 +168,10 @@ module WhopSDK member_affiliate_percentage: nil, # The different statuses of the global affiliate program for a product. member_affiliate_status: nil, + # Custom key-value pairs to store on the product. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + metadata: nil, # The unique identifier of the tax classification code to apply to this product. product_tax_code_id: nil, # A URL to redirect the customer to after completing a purchase. @@ -198,6 +209,7 @@ module WhopSDK member_affiliate_percentage: T.nilable(Float), member_affiliate_status: T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol), + metadata: T.nilable(T::Hash[Symbol, T.anything]), product_tax_code_id: T.nilable(String), redirect_purchase_url: T.nilable(String), route: T.nilable(String), diff --git a/rbi/whop_sdk/models/refund_created_webhook_event.rbi b/rbi/whop_sdk/models/refund_created_webhook_event.rbi index 95c8b1c1..8ffb4d21 100644 --- a/rbi/whop_sdk/models/refund_created_webhook_event.rbi +++ b/rbi/whop_sdk/models/refund_created_webhook_event.rbi @@ -255,8 +255,8 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at - # The available currencies on the platform - sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency # When an alert came in that this transaction will be disputed @@ -303,6 +303,11 @@ module WhopSDK end attr_writer :membership + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. sig { returns(T.nilable(Time)) } @@ -312,6 +317,44 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) } attr_accessor :payment_method_type + # The plan attached to this payment. + sig do + returns( + T.nilable(WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan) + ) + end + attr_reader :plan + + sig do + params( + plan: + T.nilable( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan::OrHash + ) + ).void + end + attr_writer :plan + + # The product this payment was made for + sig do + returns( + T.nilable( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product + ) + ) + end + attr_reader :product + + sig do + params( + product: + T.nilable( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product::OrHash + ) + ).void + end + attr_writer :product + # The subtotal to show to the creator (excluding buyer fees). sig { returns(T.nilable(Float)) } attr_accessor :subtotal @@ -364,7 +407,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::OrSymbol), + currency: WhopSDK::Currency::OrSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( @@ -374,9 +417,18 @@ module WhopSDK T.nilable( WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Membership::OrHash ), + metadata: T.nilable(T::Hash[Symbol, T.anything]), paid_at: T.nilable(Time), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol), + plan: + T.nilable( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan::OrHash + ), + product: + T.nilable( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product::OrHash + ), subtotal: T.nilable(Float), tax_amount: T.nilable(Float), tax_behavior: T.nilable(WhopSDK::ReceiptTaxBehavior::OrSymbol), @@ -401,7 +453,7 @@ module WhopSDK card_last4:, # The datetime the payment was created. created_at:, - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). currency:, # When an alert came in that this transaction will be disputed dispute_alerted_at:, @@ -409,11 +461,18 @@ module WhopSDK member:, # The membership attached to this payment. membership:, + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + metadata:, # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. paid_at:, # The different types of payment methods that can be used. payment_method_type:, + # The plan attached to this payment. + plan:, + # The product this payment was made for + product:, # The subtotal to show to the creator (excluding buyer fees). subtotal:, # The calculated amount of the sales/VAT tax (if applicable). @@ -441,7 +500,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + currency: WhopSDK::Currency::TaggedSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( @@ -451,9 +510,18 @@ module WhopSDK T.nilable( WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Membership ), + metadata: T.nilable(T::Hash[Symbol, T.anything]), paid_at: T.nilable(Time), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol), + plan: + T.nilable( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan + ), + product: + T.nilable( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product + ), subtotal: T.nilable(Float), tax_amount: T.nilable(Float), tax_behavior: @@ -548,6 +616,92 @@ module WhopSDK end end + class Plan < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the plan. + sig { returns(String) } + attr_accessor :id + + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + + # The plan attached to this payment. + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the plan. + id:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata: + ) + end + + sig do + override.returns( + { id: String, metadata: T.nilable(T::Hash[Symbol, T.anything]) } + ) + end + def to_hash + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + + # The product this payment was made for + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the product. + id:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata: + ) + end + + sig do + override.returns( + { id: String, metadata: T.nilable(T::Hash[Symbol, T.anything]) } + ) + end + def to_hash + end + end + class User < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/whop_sdk/models/refund_retrieve_response.rbi b/rbi/whop_sdk/models/refund_retrieve_response.rbi index 26bb6597..05b87852 100644 --- a/rbi/whop_sdk/models/refund_retrieve_response.rbi +++ b/rbi/whop_sdk/models/refund_retrieve_response.rbi @@ -172,8 +172,8 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at - # The available currencies on the platform - sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency # When an alert came in that this transaction will be disputed @@ -218,6 +218,11 @@ module WhopSDK end attr_writer :membership + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. sig { returns(T.nilable(Time)) } @@ -227,6 +232,42 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) } attr_accessor :payment_method_type + # The plan attached to this payment. + sig do + returns( + T.nilable(WhopSDK::Models::RefundRetrieveResponse::Payment::Plan) + ) + end + attr_reader :plan + + sig do + params( + plan: + T.nilable( + WhopSDK::Models::RefundRetrieveResponse::Payment::Plan::OrHash + ) + ).void + end + attr_writer :plan + + # The product this payment was made for + sig do + returns( + T.nilable(WhopSDK::Models::RefundRetrieveResponse::Payment::Product) + ) + end + attr_reader :product + + sig do + params( + product: + T.nilable( + WhopSDK::Models::RefundRetrieveResponse::Payment::Product::OrHash + ) + ).void + end + attr_writer :product + # The subtotal to show to the creator (excluding buyer fees). sig { returns(T.nilable(Float)) } attr_accessor :subtotal @@ -279,7 +320,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::OrSymbol), + currency: WhopSDK::Currency::OrSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( @@ -289,9 +330,18 @@ module WhopSDK T.nilable( WhopSDK::Models::RefundRetrieveResponse::Payment::Membership::OrHash ), + metadata: T.nilable(T::Hash[Symbol, T.anything]), paid_at: T.nilable(Time), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol), + plan: + T.nilable( + WhopSDK::Models::RefundRetrieveResponse::Payment::Plan::OrHash + ), + product: + T.nilable( + WhopSDK::Models::RefundRetrieveResponse::Payment::Product::OrHash + ), subtotal: T.nilable(Float), tax_amount: T.nilable(Float), tax_behavior: T.nilable(WhopSDK::ReceiptTaxBehavior::OrSymbol), @@ -316,7 +366,7 @@ module WhopSDK card_last4:, # The datetime the payment was created. created_at:, - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). currency:, # When an alert came in that this transaction will be disputed dispute_alerted_at:, @@ -324,11 +374,18 @@ module WhopSDK member:, # The membership attached to this payment. membership:, + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + metadata:, # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. paid_at:, # The different types of payment methods that can be used. payment_method_type:, + # The plan attached to this payment. + plan:, + # The product this payment was made for + product:, # The subtotal to show to the creator (excluding buyer fees). subtotal:, # The calculated amount of the sales/VAT tax (if applicable). @@ -355,7 +412,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + currency: WhopSDK::Currency::TaggedSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( @@ -365,9 +422,18 @@ module WhopSDK T.nilable( WhopSDK::Models::RefundRetrieveResponse::Payment::Membership ), + metadata: T.nilable(T::Hash[Symbol, T.anything]), paid_at: T.nilable(Time), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol), + plan: + T.nilable( + WhopSDK::Models::RefundRetrieveResponse::Payment::Plan + ), + product: + T.nilable( + WhopSDK::Models::RefundRetrieveResponse::Payment::Product + ), subtotal: T.nilable(Float), tax_amount: T.nilable(Float), tax_behavior: @@ -462,6 +528,92 @@ module WhopSDK end end + class Plan < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::RefundRetrieveResponse::Payment::Plan, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the plan. + sig { returns(String) } + attr_accessor :id + + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + + # The plan attached to this payment. + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the plan. + id:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata: + ) + end + + sig do + override.returns( + { id: String, metadata: T.nilable(T::Hash[Symbol, T.anything]) } + ) + end + def to_hash + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::RefundRetrieveResponse::Payment::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + + # The product this payment was made for + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the product. + id:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata: + ) + end + + sig do + override.returns( + { id: String, metadata: T.nilable(T::Hash[Symbol, T.anything]) } + ) + end + def to_hash + end + end + class User < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/whop_sdk/models/refund_updated_webhook_event.rbi b/rbi/whop_sdk/models/refund_updated_webhook_event.rbi index 4264e401..fcdd855f 100644 --- a/rbi/whop_sdk/models/refund_updated_webhook_event.rbi +++ b/rbi/whop_sdk/models/refund_updated_webhook_event.rbi @@ -255,8 +255,8 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at - # The available currencies on the platform - sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). + sig { returns(WhopSDK::Currency::TaggedSymbol) } attr_accessor :currency # When an alert came in that this transaction will be disputed @@ -303,6 +303,11 @@ module WhopSDK end attr_writer :membership + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. sig { returns(T.nilable(Time)) } @@ -312,6 +317,44 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) } attr_accessor :payment_method_type + # The plan attached to this payment. + sig do + returns( + T.nilable(WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan) + ) + end + attr_reader :plan + + sig do + params( + plan: + T.nilable( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan::OrHash + ) + ).void + end + attr_writer :plan + + # The product this payment was made for + sig do + returns( + T.nilable( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product + ) + ) + end + attr_reader :product + + sig do + params( + product: + T.nilable( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product::OrHash + ) + ).void + end + attr_writer :product + # The subtotal to show to the creator (excluding buyer fees). sig { returns(T.nilable(Float)) } attr_accessor :subtotal @@ -364,7 +407,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::OrSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::OrSymbol), + currency: WhopSDK::Currency::OrSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( @@ -374,9 +417,18 @@ module WhopSDK T.nilable( WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Membership::OrHash ), + metadata: T.nilable(T::Hash[Symbol, T.anything]), paid_at: T.nilable(Time), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol), + plan: + T.nilable( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan::OrHash + ), + product: + T.nilable( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product::OrHash + ), subtotal: T.nilable(Float), tax_amount: T.nilable(Float), tax_behavior: T.nilable(WhopSDK::ReceiptTaxBehavior::OrSymbol), @@ -401,7 +453,7 @@ module WhopSDK card_last4:, # The datetime the payment was created. created_at:, - # The available currencies on the platform + # The three-letter ISO currency code for this payment (e.g., 'usd', 'eur'). currency:, # When an alert came in that this transaction will be disputed dispute_alerted_at:, @@ -409,11 +461,18 @@ module WhopSDK member:, # The membership attached to this payment. membership:, + # The custom metadata stored on this payment. This will be copied over to the + # checkout configuration for which this payment was made + metadata:, # The time at which this payment was successfully collected. Null if the payment # has not yet succeeded. As a Unix timestamp. paid_at:, # The different types of payment methods that can be used. payment_method_type:, + # The plan attached to this payment. + plan:, + # The product this payment was made for + product:, # The subtotal to show to the creator (excluding buyer fees). subtotal:, # The calculated amount of the sales/VAT tax (if applicable). @@ -441,7 +500,7 @@ module WhopSDK card_brand: T.nilable(WhopSDK::CardBrands::TaggedSymbol), card_last4: T.nilable(String), created_at: Time, - currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + currency: WhopSDK::Currency::TaggedSymbol, dispute_alerted_at: T.nilable(Time), member: T.nilable( @@ -451,9 +510,18 @@ module WhopSDK T.nilable( WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Membership ), + metadata: T.nilable(T::Hash[Symbol, T.anything]), paid_at: T.nilable(Time), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol), + plan: + T.nilable( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan + ), + product: + T.nilable( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product + ), subtotal: T.nilable(Float), tax_amount: T.nilable(Float), tax_behavior: @@ -548,6 +616,92 @@ module WhopSDK end end + class Plan < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the plan. + sig { returns(String) } + attr_accessor :id + + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + + # The plan attached to this payment. + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the plan. + id:, + # Custom key-value pairs stored on the plan. Included in webhook payloads for + # payment and membership events. + metadata: + ) + end + + sig do + override.returns( + { id: String, metadata: T.nilable(T::Hash[Symbol, T.anything]) } + ) + end + def to_hash + end + end + + class Product < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the product. + sig { returns(String) } + attr_accessor :id + + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metadata + + # The product this payment was made for + sig do + params( + id: String, + metadata: T.nilable(T::Hash[Symbol, T.anything]) + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the product. + id:, + # Custom key-value pairs stored on the product. Included in webhook payloads for + # payment and membership events. + metadata: + ) + end + + sig do + override.returns( + { id: String, metadata: T.nilable(T::Hash[Symbol, T.anything]) } + ) + end + def to_hash + end + end + class User < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/whop_sdk/models/resolution_center_case_platform_response.rbi b/rbi/whop_sdk/models/resolution_center_case_platform_response.rbi index b71f7ef0..0d38c7e2 100644 --- a/rbi/whop_sdk/models/resolution_center_case_platform_response.rbi +++ b/rbi/whop_sdk/models/resolution_center_case_platform_response.rbi @@ -27,11 +27,6 @@ module WhopSDK :merchant_wins, WhopSDK::ResolutionCenterCasePlatformResponse::TaggedSymbol ) - PLATFORM_REFUND = - T.let( - :platform_refund, - WhopSDK::ResolutionCenterCasePlatformResponse::TaggedSymbol - ) MERCHANT_REFUND = T.let( :merchant_refund, diff --git a/rbi/whop_sdk/models/result_label_keys.rbi b/rbi/whop_sdk/models/result_label_keys.rbi new file mode 100644 index 00000000..39dd36a1 --- /dev/null +++ b/rbi/whop_sdk/models/result_label_keys.rbi @@ -0,0 +1,64 @@ +# typed: strong + +module WhopSDK + module Models + # Types of optimization results tracked from external ad platforms + module ResultLabelKeys + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::ResultLabelKeys) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + APP_INSTALLS = + T.let(:app_installs, WhopSDK::ResultLabelKeys::TaggedSymbol) + MESSAGING_CONVERSATIONS_STARTED = + T.let( + :messaging_conversations_started, + WhopSDK::ResultLabelKeys::TaggedSymbol + ) + POST_ENGAGEMENT = + T.let(:post_engagement, WhopSDK::ResultLabelKeys::TaggedSymbol) + EVENT_RESPONSES = + T.let(:event_responses, WhopSDK::ResultLabelKeys::TaggedSymbol) + IMPRESSIONS = T.let(:impressions, WhopSDK::ResultLabelKeys::TaggedSymbol) + WEBSITE_PURCHASES = + T.let(:website_purchases, WhopSDK::ResultLabelKeys::TaggedSymbol) + LANDING_PAGE_VIEWS = + T.let(:landing_page_views, WhopSDK::ResultLabelKeys::TaggedSymbol) + LEADS = T.let(:leads, WhopSDK::ResultLabelKeys::TaggedSymbol) + LINK_CLICKS = T.let(:link_clicks, WhopSDK::ResultLabelKeys::TaggedSymbol) + QUALITY_CALLS = + T.let(:quality_calls, WhopSDK::ResultLabelKeys::TaggedSymbol) + APPOINTMENTS_BOOKED = + T.let(:appointments_booked, WhopSDK::ResultLabelKeys::TaggedSymbol) + MESSAGING_PURCHASES = + T.let(:messaging_purchases, WhopSDK::ResultLabelKeys::TaggedSymbol) + PAGE_LIKES = T.let(:page_likes, WhopSDK::ResultLabelKeys::TaggedSymbol) + INSTAGRAM_PROFILE_VISITS = + T.let(:instagram_profile_visits, WhopSDK::ResultLabelKeys::TaggedSymbol) + REACH = T.let(:reach, WhopSDK::ResultLabelKeys::TaggedSymbol) + REMINDERS_SET = + T.let(:reminders_set, WhopSDK::ResultLabelKeys::TaggedSymbol) + NEW_SUBSCRIBERS = + T.let(:new_subscribers, WhopSDK::ResultLabelKeys::TaggedSymbol) + VIDEO_VIEWS = T.let(:video_views, WhopSDK::ResultLabelKeys::TaggedSymbol) + REGISTRATIONS = + T.let(:registrations, WhopSDK::ResultLabelKeys::TaggedSymbol) + CONTENT_VIEWS = + T.let(:content_views, WhopSDK::ResultLabelKeys::TaggedSymbol) + SEARCHES = T.let(:searches, WhopSDK::ResultLabelKeys::TaggedSymbol) + WEBSITE_SCHEDULES = + T.let(:website_schedules, WhopSDK::ResultLabelKeys::TaggedSymbol) + WEBSITE_SUBMIT_APPLICATIONS = + T.let( + :website_submit_applications, + WhopSDK::ResultLabelKeys::TaggedSymbol + ) + CUSTOM = T.let(:custom, WhopSDK::ResultLabelKeys::TaggedSymbol) + + sig { override.returns(T::Array[WhopSDK::ResultLabelKeys::TaggedSymbol]) } + def self.values + end + end + end +end diff --git a/rbi/whop_sdk/resources/ad_campaigns.rbi b/rbi/whop_sdk/resources/ad_campaigns.rbi index ec02fee4..4c782c0a 100644 --- a/rbi/whop_sdk/resources/ad_campaigns.rbi +++ b/rbi/whop_sdk/resources/ad_campaigns.rbi @@ -13,7 +13,7 @@ module WhopSDK params( id: String, request_options: WhopSDK::RequestOptions::OrHash - ).returns(WhopSDK::Models::AdCampaignRetrieveResponse) + ).returns(WhopSDK::AdCampaign) end def retrieve( # The unique identifier of the ad campaign. @@ -32,7 +32,7 @@ module WhopSDK id: String, budget: T.nilable(Float), request_options: WhopSDK::RequestOptions::OrHash - ).returns(WhopSDK::Models::AdCampaignUpdateResponse) + ).returns(WhopSDK::AdCampaign) end def update( # The unique identifier of the ad campaign to update. @@ -60,7 +60,7 @@ module WhopSDK first: T.nilable(Integer), last: T.nilable(Integer), query: T.nilable(String), - status: T.nilable(WhopSDK::AdCampaignListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::AdCampaignStatus::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns( WhopSDK::Internal::CursorPage[WhopSDK::Models::AdCampaignListResponse] @@ -98,7 +98,7 @@ module WhopSDK params( id: String, request_options: WhopSDK::RequestOptions::OrHash - ).returns(WhopSDK::Models::AdCampaignPauseResponse) + ).returns(WhopSDK::AdCampaign) end def pause( # The unique identifier of the ad campaign to pause. @@ -116,7 +116,7 @@ module WhopSDK params( id: String, request_options: WhopSDK::RequestOptions::OrHash - ).returns(WhopSDK::Models::AdCampaignUnpauseResponse) + ).returns(WhopSDK::AdCampaign) end def unpause( # The unique identifier of the ad campaign to unpause. diff --git a/rbi/whop_sdk/resources/ad_groups.rbi b/rbi/whop_sdk/resources/ad_groups.rbi index ca4ed08f..78e18cba 100644 --- a/rbi/whop_sdk/resources/ad_groups.rbi +++ b/rbi/whop_sdk/resources/ad_groups.rbi @@ -13,7 +13,7 @@ module WhopSDK params( id: String, request_options: WhopSDK::RequestOptions::OrHash - ).returns(WhopSDK::Models::AdGroupRetrieveResponse) + ).returns(WhopSDK::AdGroup) end def retrieve( # The unique identifier of the ad group. @@ -32,16 +32,15 @@ module WhopSDK params( id: String, budget: T.nilable(Float), - budget_type: - T.nilable(WhopSDK::AdGroupUpdateParams::BudgetType::OrSymbol), + budget_type: T.nilable(WhopSDK::AdBudgetType::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), + status: T.nilable(WhopSDK::AdGroupStatus::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash - ).returns(WhopSDK::Models::AdGroupUpdateResponse) + ).returns(WhopSDK::AdGroup) end def update( # The unique identifier of the ad group to update. @@ -81,7 +80,7 @@ module WhopSDK first: T.nilable(Integer), last: T.nilable(Integer), query: T.nilable(String), - status: T.nilable(WhopSDK::AdGroupListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::AdGroupStatus::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns( WhopSDK::Internal::CursorPage[WhopSDK::Models::AdGroupListResponse] @@ -130,6 +129,44 @@ module WhopSDK ) end + # Pauses an ad group. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::AdGroup) + end + def pause( + # The unique identifier of the ad group to pause. + id, + request_options: {} + ) + end + + # Resumes a paused ad group. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::AdGroup) + end + def unpause( + # The unique identifier of the ad group to unpause. + id, + 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/ad_reports.rbi b/rbi/whop_sdk/resources/ad_reports.rbi index 6ae2b63b..4ab25247 100644 --- a/rbi/whop_sdk/resources/ad_reports.rbi +++ b/rbi/whop_sdk/resources/ad_reports.rbi @@ -4,9 +4,11 @@ module WhopSDK module Resources # Ad reports class AdReports - # Performance report for an ad campaign, ad group, or ad. Returns aggregate totals - # and an optional per-day breakdown. Exactly one of `adCampaignId`, `adGroupId`, - # or `adId` must be provided. + # Performance report for a company, ad campaign, ad group, or ad. Always returns + # aggregate `summary` totals. Set `granularity` (`daily`/`hourly`) to additionally + # get a time series, or set `breakdown` (`campaign`/`ad_group`/`ad`) to + # additionally get per-entity rows inside the requested scope. Exactly one of + # `companyId`, `adCampaignId`, `adGroupId`, or `adId` must be provided. # # Required permissions: # @@ -18,8 +20,11 @@ module WhopSDK ad_campaign_id: T.nilable(String), ad_group_id: T.nilable(String), ad_id: T.nilable(String), + breakdown: + T.nilable(WhopSDK::AdReportRetrieveParams::Breakdown::OrSymbol), + company_id: T.nilable(String), currency: T.nilable(String), - include_daily: T.nilable(T::Boolean), + granularity: T.nilable(WhopSDK::Granularities::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::Models::AdReportRetrieveResponse) end @@ -28,20 +33,26 @@ module WhopSDK from:, # Inclusive end of the reporting window. to:, - # The unique identifier of an ad campaign. Mutually exclusive with `adGroupId` and - # `adId`. + # The unique identifier of an ad campaign. Mutually exclusive with `companyId`, + # `adGroupId`, and `adId`. ad_campaign_id: nil, - # The unique identifier of an ad group. Mutually exclusive with `adCampaignId` and - # `adId`. + # The unique identifier of an ad group. Mutually exclusive with `companyId`, + # `adCampaignId`, and `adId`. ad_group_id: nil, - # The unique identifier of an ad. Mutually exclusive with `adCampaignId` and - # `adGroupId`. + # The unique identifier of an ad. Mutually exclusive with `companyId`, + # `adCampaignId`, and `adGroupId`. ad_id: nil, + # Entity level to group an ad report by. + breakdown: nil, + # The unique identifier of a company. Mutually exclusive with `adCampaignId`, + # `adGroupId`, and `adId`. Use with `breakdown` to fan out across every campaign, + # ad group, or ad in the company without paging. + company_id: nil, # ISO 4217 currency code to report `spend` in. Defaults to the company's ads # reporting currency. currency: nil, - # When true, includes a per-day breakdown alongside the summary. - include_daily: nil, + # Bucket size for external ad stat rows. + granularity: nil, request_options: {} ) end diff --git a/rbi/whop_sdk/resources/ads.rbi b/rbi/whop_sdk/resources/ads.rbi index 23e9e0d7..351380b3 100644 --- a/rbi/whop_sdk/resources/ads.rbi +++ b/rbi/whop_sdk/resources/ads.rbi @@ -13,7 +13,7 @@ module WhopSDK params( id: String, request_options: WhopSDK::RequestOptions::OrHash - ).returns(WhopSDK::Models::AdRetrieveResponse) + ).returns(WhopSDK::Ad) end def retrieve( # The unique identifier of the ad. @@ -38,7 +38,7 @@ module WhopSDK created_before: T.nilable(Time), first: T.nilable(Integer), last: T.nilable(Integer), - status: T.nilable(WhopSDK::AdListParams::Status::OrSymbol), + status: T.nilable(WhopSDK::ExternalAdStatus::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns( WhopSDK::Internal::CursorPage[WhopSDK::Models::AdListResponse] @@ -72,6 +72,44 @@ module WhopSDK ) end + # Pauses an ad. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Ad) + end + def pause( + # The unique identifier of the ad to pause. + id, + request_options: {} + ) + end + + # Resumes a paused ad. + # + # Required permissions: + # + # - `ad_campaign:update` + # - `ad_campaign:basic:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Ad) + end + def unpause( + # The unique identifier of the ad to unpause. + id, + 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/files.rbi b/rbi/whop_sdk/resources/files.rbi index 81a0c261..6e10ea0d 100644 --- a/rbi/whop_sdk/resources/files.rbi +++ b/rbi/whop_sdk/resources/files.rbi @@ -9,8 +9,7 @@ module WhopSDK sig do params( filename: String, - visibility: - T.nilable(WhopSDK::FileCreateParams::Visibility::OrSymbol), + visibility: T.nilable(WhopSDK::FileVisibility::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::Models::FileCreateResponse) end diff --git a/rbi/whop_sdk/resources/plans.rbi b/rbi/whop_sdk/resources/plans.rbi index 19b9e69b..4367f2a6 100644 --- a/rbi/whop_sdk/resources/plans.rbi +++ b/rbi/whop_sdk/resources/plans.rbi @@ -29,6 +29,7 @@ module WhopSDK initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), + metadata: T.nilable(T::Hash[Symbol, T.anything]), override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol), payment_method_configuration: T.nilable( @@ -78,6 +79,10 @@ module WhopSDK internal_notes: nil, # Whether this plan uses legacy payment method controls. legacy_payment_method_controls: nil, + # Custom key-value pairs to store on the plan. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + metadata: nil, # Whether or not the tax is included in a plan's price (or if it hasn't been set # up) override_tax_type: nil, @@ -151,6 +156,7 @@ module WhopSDK initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), + metadata: T.nilable(T::Hash[Symbol, T.anything]), offer_cancel_discount: T.nilable(T::Boolean), override_tax_type: T.nilable(WhopSDK::TaxType::OrSymbol), payment_method_configuration: @@ -197,6 +203,10 @@ module WhopSDK internal_notes: nil, # Whether this plan uses legacy payment method controls. legacy_payment_method_controls: nil, + # Custom key-value pairs to store on the plan. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + metadata: nil, # Whether to offer a retention discount when a customer attempts to cancel. offer_cancel_discount: nil, # Whether or not the tax is included in a plan's price (or if it hasn't been set diff --git a/rbi/whop_sdk/resources/products.rbi b/rbi/whop_sdk/resources/products.rbi index 3f61dc38..f50524af 100644 --- a/rbi/whop_sdk/resources/products.rbi +++ b/rbi/whop_sdk/resources/products.rbi @@ -28,6 +28,7 @@ module WhopSDK member_affiliate_percentage: T.nilable(Float), member_affiliate_status: T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol), + metadata: T.nilable(T::Hash[Symbol, T.anything]), plan_options: T.nilable(WhopSDK::ProductCreateParams::PlanOptions::OrHash), product_tax_code_id: T.nilable(String), @@ -70,6 +71,10 @@ module WhopSDK member_affiliate_percentage: nil, # The different statuses of the global affiliate program for a product. member_affiliate_status: nil, + # Custom key-value pairs to store on the product. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + metadata: nil, # Configuration for an automatically generated plan to attach to this product. plan_options: nil, # The unique identifier of the tax classification code to apply to this product. @@ -130,6 +135,7 @@ module WhopSDK member_affiliate_percentage: T.nilable(Float), member_affiliate_status: T.nilable(WhopSDK::GlobalAffiliateStatus::OrSymbol), + metadata: T.nilable(T::Hash[Symbol, T.anything]), product_tax_code_id: T.nilable(String), redirect_purchase_url: T.nilable(String), route: T.nilable(String), @@ -171,6 +177,10 @@ module WhopSDK member_affiliate_percentage: nil, # The different statuses of the global affiliate program for a product. member_affiliate_status: nil, + # Custom key-value pairs to store on the product. Included in webhook payloads for + # payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per + # value. + metadata: nil, # The unique identifier of the tax classification code to apply to this product. product_tax_code_id: nil, # A URL to redirect the customer to after completing a purchase. diff --git a/rbi/whop_sdk/resources/refunds.rbi b/rbi/whop_sdk/resources/refunds.rbi index 08c0b348..fbb92a25 100644 --- a/rbi/whop_sdk/resources/refunds.rbi +++ b/rbi/whop_sdk/resources/refunds.rbi @@ -9,6 +9,8 @@ module WhopSDK # Required permissions: # # - `payment:basic:read` + # - `plan:basic:read` + # - `access_pass:basic:read` # - `member:email:read` # - `member:basic:read` # - `member:phone:read` diff --git a/sig/whop_sdk/models.rbs b/sig/whop_sdk/models.rbs index 4b64652d..2c26ffcb 100644 --- a/sig/whop_sdk/models.rbs +++ b/sig/whop_sdk/models.rbs @@ -7,30 +7,52 @@ module WhopSDK class AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams + class Ad = WhopSDK::Models::Ad + + module AdBudgetType = WhopSDK::Models::AdBudgetType + + class AdCampaign = WhopSDK::Models::AdCampaign + class AdCampaignListParams = WhopSDK::Models::AdCampaignListParams class AdCampaignPauseParams = WhopSDK::Models::AdCampaignPauseParams + module AdCampaignPlatform = WhopSDK::Models::AdCampaignPlatform + class AdCampaignRetrieveParams = WhopSDK::Models::AdCampaignRetrieveParams + module AdCampaignStatus = WhopSDK::Models::AdCampaignStatus + class AdCampaignUnpauseParams = WhopSDK::Models::AdCampaignUnpauseParams class AdCampaignUpdateParams = WhopSDK::Models::AdCampaignUpdateParams + class AdGroup = WhopSDK::Models::AdGroup + class AdGroupDeleteParams = WhopSDK::Models::AdGroupDeleteParams class AdGroupListParams = WhopSDK::Models::AdGroupListParams + class AdGroupPauseParams = WhopSDK::Models::AdGroupPauseParams + class AdGroupRetrieveParams = WhopSDK::Models::AdGroupRetrieveParams + module AdGroupStatus = WhopSDK::Models::AdGroupStatus + + class AdGroupUnpauseParams = WhopSDK::Models::AdGroupUnpauseParams + class AdGroupUpdateParams = WhopSDK::Models::AdGroupUpdateParams class AdListParams = WhopSDK::Models::AdListParams + class AdPauseParams = WhopSDK::Models::AdPauseParams + class AdReportRetrieveParams = WhopSDK::Models::AdReportRetrieveParams class AdRetrieveParams = WhopSDK::Models::AdRetrieveParams + class AdUnpauseParams = WhopSDK::Models::AdUnpauseParams + class Affiliate = WhopSDK::Models::Affiliate class AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams @@ -321,6 +343,8 @@ module WhopSDK class ExperienceUpdateParams = WhopSDK::Models::ExperienceUpdateParams + module ExternalAdStatus = WhopSDK::Models::ExternalAdStatus + class FeeMarkupCreateParams = WhopSDK::Models::FeeMarkupCreateParams class FeeMarkupDeleteParams = WhopSDK::Models::FeeMarkupDeleteParams @@ -333,6 +357,8 @@ module WhopSDK class FileRetrieveParams = WhopSDK::Models::FileRetrieveParams + module FileVisibility = WhopSDK::Models::FileVisibility + class Forum = WhopSDK::Models::Forum class ForumListParams = WhopSDK::Models::ForumListParams @@ -357,6 +383,8 @@ module WhopSDK module GlobalAffiliateStatus = WhopSDK::Models::GlobalAffiliateStatus + module Granularities = WhopSDK::Models::Granularities + class Invoice = WhopSDK::Models::Invoice class InvoiceCreatedWebhookEvent = WhopSDK::Models::InvoiceCreatedWebhookEvent @@ -601,6 +629,8 @@ module WhopSDK class ResolutionCenterCaseUpdatedWebhookEvent = WhopSDK::Models::ResolutionCenterCaseUpdatedWebhookEvent + module ResultLabelKeys = WhopSDK::Models::ResultLabelKeys + class ReviewListParams = WhopSDK::Models::ReviewListParams class ReviewRetrieveParams = WhopSDK::Models::ReviewRetrieveParams diff --git a/sig/whop_sdk/models/ad.rbs b/sig/whop_sdk/models/ad.rbs new file mode 100644 index 00000000..db94687d --- /dev/null +++ b/sig/whop_sdk/models/ad.rbs @@ -0,0 +1,75 @@ +module WhopSDK + module Models + type ad = + { + id: String, + ad_campaign: WhopSDK::Ad::AdCampaign, + ad_group: WhopSDK::Ad::AdGroup, + created_at: Time, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::external_ad_status, + title: String?, + updated_at: Time + } + + class Ad < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor ad_campaign: WhopSDK::Ad::AdCampaign + + attr_accessor ad_group: WhopSDK::Ad::AdGroup + + attr_accessor created_at: Time + + attr_accessor platform: WhopSDK::Models::ad_campaign_platform + + attr_accessor status: WhopSDK::Models::external_ad_status + + attr_accessor title: String? + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + ad_campaign: WhopSDK::Ad::AdCampaign, + ad_group: WhopSDK::Ad::AdGroup, + created_at: Time, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::external_ad_status, + title: String?, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + ad_campaign: WhopSDK::Ad::AdCampaign, + ad_group: WhopSDK::Ad::AdGroup, + created_at: Time, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::external_ad_status, + title: String?, + updated_at: Time + } + + type ad_campaign = { id: String } + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + + type ad_group = { id: String } + + class AdGroup < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + end + end +end diff --git a/sig/whop_sdk/models/ad_budget_type.rbs b/sig/whop_sdk/models/ad_budget_type.rbs new file mode 100644 index 00000000..ea7e9e7b --- /dev/null +++ b/sig/whop_sdk/models/ad_budget_type.rbs @@ -0,0 +1,14 @@ +module WhopSDK + module Models + type ad_budget_type = :daily | :lifetime + + module AdBudgetType + extend WhopSDK::Internal::Type::Enum + + DAILY: :daily + LIFETIME: :lifetime + + def self?.values: -> ::Array[WhopSDK::Models::ad_budget_type] + end + end +end diff --git a/sig/whop_sdk/models/ad_campaign.rbs b/sig/whop_sdk/models/ad_campaign.rbs new file mode 100644 index 00000000..82b90791 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign.rbs @@ -0,0 +1,194 @@ +module WhopSDK + module Models + type ad_campaign = + { + id: String, + budget: Float?, + budget_type: WhopSDK::Models::ad_budget_type?, + created_at: Time, + created_by_user: WhopSDK::AdCampaign::CreatedByUser, + meta_config: WhopSDK::AdCampaign::MetaConfig?, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_campaign_status, + title: String, + total_spend: Float, + updated_at: Time + } + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor budget: Float? + + attr_accessor budget_type: WhopSDK::Models::ad_budget_type? + + attr_accessor created_at: Time + + attr_accessor created_by_user: WhopSDK::AdCampaign::CreatedByUser + + attr_accessor meta_config: WhopSDK::AdCampaign::MetaConfig? + + attr_accessor platform: WhopSDK::Models::ad_campaign_platform + + attr_accessor status: WhopSDK::Models::ad_campaign_status + + attr_accessor title: String + + attr_accessor total_spend: Float + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + budget: Float?, + budget_type: WhopSDK::Models::ad_budget_type?, + created_at: Time, + created_by_user: WhopSDK::AdCampaign::CreatedByUser, + meta_config: WhopSDK::AdCampaign::MetaConfig?, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_campaign_status, + title: String, + total_spend: Float, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + budget: Float?, + budget_type: WhopSDK::Models::ad_budget_type?, + created_at: Time, + created_by_user: WhopSDK::AdCampaign::CreatedByUser, + meta_config: WhopSDK::AdCampaign::MetaConfig?, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_campaign_status, + title: String, + total_spend: Float, + updated_at: Time + } + + 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 meta_config = + { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaign::MetaConfig::bid_strategy?, + budget_optimization: bool?, + effective_status: WhopSDK::Models::AdCampaign::MetaConfig::effective_status?, + end_time: String?, + objective: WhopSDK::Models::AdCampaign::MetaConfig::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaign::MetaConfig::status? + } + + class MetaConfig < WhopSDK::Internal::Type::BaseModel + attr_accessor bid_amount: Integer? + + attr_accessor bid_strategy: WhopSDK::Models::AdCampaign::MetaConfig::bid_strategy? + + attr_accessor budget_optimization: bool? + + attr_accessor effective_status: WhopSDK::Models::AdCampaign::MetaConfig::effective_status? + + attr_accessor end_time: String? + + attr_accessor objective: WhopSDK::Models::AdCampaign::MetaConfig::objective? + + attr_accessor special_categories: ::Array[String]? + + attr_accessor start_time: String? + + attr_accessor status: WhopSDK::Models::AdCampaign::MetaConfig::status? + + def initialize: ( + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaign::MetaConfig::bid_strategy?, + budget_optimization: bool?, + effective_status: WhopSDK::Models::AdCampaign::MetaConfig::effective_status?, + end_time: String?, + objective: WhopSDK::Models::AdCampaign::MetaConfig::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaign::MetaConfig::status? + ) -> void + + def to_hash: -> { + bid_amount: Integer?, + bid_strategy: WhopSDK::Models::AdCampaign::MetaConfig::bid_strategy?, + budget_optimization: bool?, + effective_status: WhopSDK::Models::AdCampaign::MetaConfig::effective_status?, + end_time: String?, + objective: WhopSDK::Models::AdCampaign::MetaConfig::objective?, + special_categories: ::Array[String]?, + start_time: String?, + status: WhopSDK::Models::AdCampaign::MetaConfig::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::AdCampaign::MetaConfig::bid_strategy] + end + + type effective_status = + :active | :paused | :deleted | :in_review | :rejected | :with_issues + + module EffectiveStatus + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + DELETED: :deleted + IN_REVIEW: :in_review + REJECTED: :rejected + WITH_ISSUES: :with_issues + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaign::MetaConfig::effective_status] + 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::AdCampaign::MetaConfig::objective] + end + + type status = :active | :paused + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + + def self?.values: -> ::Array[WhopSDK::Models::AdCampaign::MetaConfig::status] + end + 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 index b6cff52f..b03aeaec 100644 --- a/sig/whop_sdk/models/ad_campaign_list_params.rbs +++ b/sig/whop_sdk/models/ad_campaign_list_params.rbs @@ -10,7 +10,7 @@ module WhopSDK first: Integer?, last: Integer?, query: String?, - status: WhopSDK::Models::AdCampaignListParams::status? + status: WhopSDK::Models::ad_campaign_status? } & WhopSDK::Internal::Type::request_parameters @@ -34,7 +34,7 @@ module WhopSDK attr_accessor query: String? - attr_accessor status: WhopSDK::Models::AdCampaignListParams::status? + attr_accessor status: WhopSDK::Models::ad_campaign_status? def initialize: ( company_id: String, @@ -45,7 +45,7 @@ module WhopSDK ?first: Integer?, ?last: Integer?, ?query: String?, - ?status: WhopSDK::Models::AdCampaignListParams::status?, + ?status: WhopSDK::Models::ad_campaign_status?, ?request_options: WhopSDK::request_opts ) -> void @@ -58,25 +58,9 @@ module WhopSDK first: Integer?, last: Integer?, query: String?, - status: WhopSDK::Models::AdCampaignListParams::status?, + status: WhopSDK::Models::ad_campaign_status?, request_options: WhopSDK::RequestOptions } - - type status = - :active | :paused | :payment_failed | :draft | :in_review | :flagged - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - 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 index 6a40b2e9..f39921d2 100644 --- a/sig/whop_sdk/models/ad_campaign_list_response.rbs +++ b/sig/whop_sdk/models/ad_campaign_list_response.rbs @@ -4,10 +4,10 @@ module WhopSDK { id: String, budget: Float?, - budget_type: WhopSDK::Models::AdCampaignListResponse::budget_type?, + budget_type: WhopSDK::Models::ad_budget_type?, created_at: Time, - platform: WhopSDK::Models::AdCampaignListResponse::platform, - status: WhopSDK::Models::AdCampaignListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_campaign_status, title: String, total_spend: Float, updated_at: Time @@ -18,13 +18,13 @@ module WhopSDK attr_accessor budget: Float? - attr_accessor budget_type: WhopSDK::Models::AdCampaignListResponse::budget_type? + attr_accessor budget_type: WhopSDK::Models::ad_budget_type? attr_accessor created_at: Time - attr_accessor platform: WhopSDK::Models::AdCampaignListResponse::platform + attr_accessor platform: WhopSDK::Models::ad_campaign_platform - attr_accessor status: WhopSDK::Models::AdCampaignListResponse::status + attr_accessor status: WhopSDK::Models::ad_campaign_status attr_accessor title: String @@ -35,10 +35,10 @@ module WhopSDK def initialize: ( id: String, budget: Float?, - budget_type: WhopSDK::Models::AdCampaignListResponse::budget_type?, + budget_type: WhopSDK::Models::ad_budget_type?, created_at: Time, - platform: WhopSDK::Models::AdCampaignListResponse::platform, - status: WhopSDK::Models::AdCampaignListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_campaign_status, title: String, total_spend: Float, updated_at: Time @@ -47,52 +47,14 @@ module WhopSDK def to_hash: -> { id: String, budget: Float?, - budget_type: WhopSDK::Models::AdCampaignListResponse::budget_type?, + budget_type: WhopSDK::Models::ad_budget_type?, created_at: Time, - platform: WhopSDK::Models::AdCampaignListResponse::platform, - status: WhopSDK::Models::AdCampaignListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_campaign_status, title: String, total_spend: Float, updated_at: Time } - - type budget_type = :daily | :lifetime - - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY: :daily - LIFETIME: :lifetime - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignListResponse::budget_type] - end - - 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 status = - :active | :paused | :payment_failed | :draft | :in_review | :flagged - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - 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_response.rbs b/sig/whop_sdk/models/ad_campaign_pause_response.rbs deleted file mode 100644 index 25465f9f..00000000 --- a/sig/whop_sdk/models/ad_campaign_pause_response.rbs +++ /dev/null @@ -1,232 +0,0 @@ -module WhopSDK - module Models - type ad_campaign_pause_response = - { - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignPauseResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignPauseResponse::platform, - status: WhopSDK::Models::AdCampaignPauseResponse::status, - title: String, - total_spend: Float, - updated_at: Time - } - - class AdCampaignPauseResponse < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor budget: Float? - - attr_accessor budget_type: WhopSDK::Models::AdCampaignPauseResponse::budget_type? - - attr_accessor created_at: Time - - attr_accessor created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser - - attr_accessor meta_config: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig? - - attr_accessor platform: WhopSDK::Models::AdCampaignPauseResponse::platform - - attr_accessor status: WhopSDK::Models::AdCampaignPauseResponse::status - - attr_accessor title: String - - attr_accessor total_spend: Float - - attr_accessor updated_at: Time - - def initialize: ( - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignPauseResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignPauseResponse::platform, - status: WhopSDK::Models::AdCampaignPauseResponse::status, - title: String, - total_spend: Float, - updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignPauseResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignPauseResponse::platform, - status: WhopSDK::Models::AdCampaignPauseResponse::status, - title: String, - total_spend: Float, - updated_at: Time - } - - type budget_type = :daily | :lifetime - - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY: :daily - LIFETIME: :lifetime - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::budget_type] - 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 meta_config = - { - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::status? - } - - class MetaConfig < WhopSDK::Internal::Type::BaseModel - attr_accessor bid_amount: Integer? - - attr_accessor bid_strategy: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::bid_strategy? - - attr_accessor budget_optimization: bool? - - attr_accessor effective_status: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::effective_status? - - attr_accessor end_time: String? - - attr_accessor objective: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::objective? - - attr_accessor special_categories: ::Array[String]? - - attr_accessor start_time: String? - - attr_accessor status: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::status? - - def initialize: ( - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::status? - ) -> void - - def to_hash: -> { - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::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::MetaConfig::bid_strategy] - end - - type effective_status = - :active | :paused | :deleted | :in_review | :rejected | :with_issues - - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - DELETED: :deleted - IN_REVIEW: :in_review - REJECTED: :rejected - WITH_ISSUES: :with_issues - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::effective_status] - 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::MetaConfig::objective] - end - - type status = :active | :paused - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignPauseResponse::MetaConfig::status] - end - 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 status = - :active | :paused | :payment_failed | :draft | :in_review | :flagged - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - 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_platform.rbs b/sig/whop_sdk/models/ad_campaign_platform.rbs new file mode 100644 index 00000000..281bcb6e --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_platform.rbs @@ -0,0 +1,14 @@ +module WhopSDK + module Models + type ad_campaign_platform = :meta | :tiktok + + module AdCampaignPlatform + extend WhopSDK::Internal::Type::Enum + + META: :meta + TIKTOK: :tiktok + + def self?.values: -> ::Array[WhopSDK::Models::ad_campaign_platform] + 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 deleted file mode 100644 index d7c2b0f2..00000000 --- a/sig/whop_sdk/models/ad_campaign_retrieve_response.rbs +++ /dev/null @@ -1,232 +0,0 @@ -module WhopSDK - module Models - type ad_campaign_retrieve_response = - { - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignRetrieveResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignRetrieveResponse::platform, - status: WhopSDK::Models::AdCampaignRetrieveResponse::status, - title: String, - total_spend: Float, - updated_at: Time - } - - class AdCampaignRetrieveResponse < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor budget: Float? - - attr_accessor budget_type: WhopSDK::Models::AdCampaignRetrieveResponse::budget_type? - - attr_accessor created_at: Time - - attr_accessor created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser - - attr_accessor meta_config: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig? - - attr_accessor platform: WhopSDK::Models::AdCampaignRetrieveResponse::platform - - attr_accessor status: WhopSDK::Models::AdCampaignRetrieveResponse::status - - attr_accessor title: String - - attr_accessor total_spend: Float - - attr_accessor updated_at: Time - - def initialize: ( - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignRetrieveResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignRetrieveResponse::platform, - status: WhopSDK::Models::AdCampaignRetrieveResponse::status, - title: String, - total_spend: Float, - updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignRetrieveResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignRetrieveResponse::platform, - status: WhopSDK::Models::AdCampaignRetrieveResponse::status, - title: String, - total_spend: Float, - updated_at: Time - } - - type budget_type = :daily | :lifetime - - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY: :daily - LIFETIME: :lifetime - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::budget_type] - 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 meta_config = - { - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::status? - } - - class MetaConfig < WhopSDK::Internal::Type::BaseModel - attr_accessor bid_amount: Integer? - - attr_accessor bid_strategy: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::bid_strategy? - - attr_accessor budget_optimization: bool? - - attr_accessor effective_status: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::effective_status? - - attr_accessor end_time: String? - - attr_accessor objective: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::objective? - - attr_accessor special_categories: ::Array[String]? - - attr_accessor start_time: String? - - attr_accessor status: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::status? - - def initialize: ( - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::status? - ) -> void - - def to_hash: -> { - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::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::MetaConfig::bid_strategy] - end - - type effective_status = - :active | :paused | :deleted | :in_review | :rejected | :with_issues - - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - DELETED: :deleted - IN_REVIEW: :in_review - REJECTED: :rejected - WITH_ISSUES: :with_issues - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::effective_status] - 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::MetaConfig::objective] - end - - type status = :active | :paused - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig::status] - end - 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 status = - :active | :paused | :payment_failed | :draft | :in_review | :flagged - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - 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_status.rbs b/sig/whop_sdk/models/ad_campaign_status.rbs new file mode 100644 index 00000000..65f5a9c5 --- /dev/null +++ b/sig/whop_sdk/models/ad_campaign_status.rbs @@ -0,0 +1,19 @@ +module WhopSDK + module Models + type ad_campaign_status = + :active | :paused | :payment_failed | :draft | :in_review | :flagged + + module AdCampaignStatus + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + PAUSED: :paused + PAYMENT_FAILED: :payment_failed + DRAFT: :draft + IN_REVIEW: :in_review + FLAGGED: :flagged + + def self?.values: -> ::Array[WhopSDK::Models::ad_campaign_status] + 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 deleted file mode 100644 index edb07eb2..00000000 --- a/sig/whop_sdk/models/ad_campaign_unpause_response.rbs +++ /dev/null @@ -1,232 +0,0 @@ -module WhopSDK - module Models - type ad_campaign_unpause_response = - { - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignUnpauseResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignUnpauseResponse::platform, - status: WhopSDK::Models::AdCampaignUnpauseResponse::status, - title: String, - total_spend: Float, - updated_at: Time - } - - class AdCampaignUnpauseResponse < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor budget: Float? - - attr_accessor budget_type: WhopSDK::Models::AdCampaignUnpauseResponse::budget_type? - - attr_accessor created_at: Time - - attr_accessor created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser - - attr_accessor meta_config: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig? - - attr_accessor platform: WhopSDK::Models::AdCampaignUnpauseResponse::platform - - attr_accessor status: WhopSDK::Models::AdCampaignUnpauseResponse::status - - attr_accessor title: String - - attr_accessor total_spend: Float - - attr_accessor updated_at: Time - - def initialize: ( - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignUnpauseResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignUnpauseResponse::platform, - status: WhopSDK::Models::AdCampaignUnpauseResponse::status, - title: String, - total_spend: Float, - updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignUnpauseResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignUnpauseResponse::platform, - status: WhopSDK::Models::AdCampaignUnpauseResponse::status, - title: String, - total_spend: Float, - updated_at: Time - } - - type budget_type = :daily | :lifetime - - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY: :daily - LIFETIME: :lifetime - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::budget_type] - 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 meta_config = - { - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::status? - } - - class MetaConfig < WhopSDK::Internal::Type::BaseModel - attr_accessor bid_amount: Integer? - - attr_accessor bid_strategy: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::bid_strategy? - - attr_accessor budget_optimization: bool? - - attr_accessor effective_status: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::effective_status? - - attr_accessor end_time: String? - - attr_accessor objective: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::objective? - - attr_accessor special_categories: ::Array[String]? - - attr_accessor start_time: String? - - attr_accessor status: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::status? - - def initialize: ( - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::status? - ) -> void - - def to_hash: -> { - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::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::MetaConfig::bid_strategy] - end - - type effective_status = - :active | :paused | :deleted | :in_review | :rejected | :with_issues - - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - DELETED: :deleted - IN_REVIEW: :in_review - REJECTED: :rejected - WITH_ISSUES: :with_issues - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::effective_status] - 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::MetaConfig::objective] - end - - type status = :active | :paused - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig::status] - end - 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 status = - :active | :paused | :payment_failed | :draft | :in_review | :flagged - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - 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_response.rbs b/sig/whop_sdk/models/ad_campaign_update_response.rbs deleted file mode 100644 index acac8a57..00000000 --- a/sig/whop_sdk/models/ad_campaign_update_response.rbs +++ /dev/null @@ -1,232 +0,0 @@ -module WhopSDK - module Models - type ad_campaign_update_response = - { - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignUpdateResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignUpdateResponse::platform, - status: WhopSDK::Models::AdCampaignUpdateResponse::status, - title: String, - total_spend: Float, - updated_at: Time - } - - class AdCampaignUpdateResponse < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor budget: Float? - - attr_accessor budget_type: WhopSDK::Models::AdCampaignUpdateResponse::budget_type? - - attr_accessor created_at: Time - - attr_accessor created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser - - attr_accessor meta_config: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig? - - attr_accessor platform: WhopSDK::Models::AdCampaignUpdateResponse::platform - - attr_accessor status: WhopSDK::Models::AdCampaignUpdateResponse::status - - attr_accessor title: String - - attr_accessor total_spend: Float - - attr_accessor updated_at: Time - - def initialize: ( - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignUpdateResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignUpdateResponse::platform, - status: WhopSDK::Models::AdCampaignUpdateResponse::status, - title: String, - total_spend: Float, - updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - budget: Float?, - budget_type: WhopSDK::Models::AdCampaignUpdateResponse::budget_type?, - created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig?, - platform: WhopSDK::Models::AdCampaignUpdateResponse::platform, - status: WhopSDK::Models::AdCampaignUpdateResponse::status, - title: String, - total_spend: Float, - updated_at: Time - } - - type budget_type = :daily | :lifetime - - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY: :daily - LIFETIME: :lifetime - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::budget_type] - 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 meta_config = - { - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::status? - } - - class MetaConfig < WhopSDK::Internal::Type::BaseModel - attr_accessor bid_amount: Integer? - - attr_accessor bid_strategy: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::bid_strategy? - - attr_accessor budget_optimization: bool? - - attr_accessor effective_status: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::effective_status? - - attr_accessor end_time: String? - - attr_accessor objective: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::objective? - - attr_accessor special_categories: ::Array[String]? - - attr_accessor start_time: String? - - attr_accessor status: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::status? - - def initialize: ( - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::status? - ) -> void - - def to_hash: -> { - bid_amount: Integer?, - bid_strategy: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::bid_strategy?, - budget_optimization: bool?, - effective_status: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::effective_status?, - end_time: String?, - objective: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::objective?, - special_categories: ::Array[String]?, - start_time: String?, - status: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::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::MetaConfig::bid_strategy] - end - - type effective_status = - :active | :paused | :deleted | :in_review | :rejected | :with_issues - - module EffectiveStatus - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - DELETED: :deleted - IN_REVIEW: :in_review - REJECTED: :rejected - WITH_ISSUES: :with_issues - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::effective_status] - 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::MetaConfig::objective] - end - - type status = :active | :paused - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - - def self?.values: -> ::Array[WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig::status] - end - 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 status = - :active | :paused | :payment_failed | :draft | :in_review | :flagged - - module Status - extend WhopSDK::Internal::Type::Enum - - ACTIVE: :active - PAUSED: :paused - 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_group.rbs b/sig/whop_sdk/models/ad_group.rbs new file mode 100644 index 00000000..d8f967b1 --- /dev/null +++ b/sig/whop_sdk/models/ad_group.rbs @@ -0,0 +1,70 @@ +module WhopSDK + module Models + type ad_group = + { + id: String, + ad_campaign: WhopSDK::AdGroup::AdCampaign, + budget: Float?, + budget_type: WhopSDK::Models::ad_budget_type?, + created_at: Time, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_group_status, + title: String?, + updated_at: Time + } + + class AdGroup < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor ad_campaign: WhopSDK::AdGroup::AdCampaign + + attr_accessor budget: Float? + + attr_accessor budget_type: WhopSDK::Models::ad_budget_type? + + attr_accessor created_at: Time + + attr_accessor platform: WhopSDK::Models::ad_campaign_platform + + attr_accessor status: WhopSDK::Models::ad_group_status + + attr_accessor title: String? + + attr_accessor updated_at: Time + + def initialize: ( + id: String, + ad_campaign: WhopSDK::AdGroup::AdCampaign, + budget: Float?, + budget_type: WhopSDK::Models::ad_budget_type?, + created_at: Time, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_group_status, + title: String?, + updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + ad_campaign: WhopSDK::AdGroup::AdCampaign, + budget: Float?, + budget_type: WhopSDK::Models::ad_budget_type?, + created_at: Time, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_group_status, + title: String?, + updated_at: Time + } + + type ad_campaign = { id: String } + + class AdCampaign < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + def initialize: (id: String) -> void + + def to_hash: -> { id: String } + end + end + end +end diff --git a/sig/whop_sdk/models/ad_group_list_params.rbs b/sig/whop_sdk/models/ad_group_list_params.rbs index 56ca5733..032128b9 100644 --- a/sig/whop_sdk/models/ad_group_list_params.rbs +++ b/sig/whop_sdk/models/ad_group_list_params.rbs @@ -11,7 +11,7 @@ module WhopSDK first: Integer?, last: Integer?, query: String?, - status: WhopSDK::Models::AdGroupListParams::status? + status: WhopSDK::Models::ad_group_status? } & WhopSDK::Internal::Type::request_parameters @@ -37,7 +37,7 @@ module WhopSDK attr_accessor query: String? - attr_accessor status: WhopSDK::Models::AdGroupListParams::status? + attr_accessor status: WhopSDK::Models::ad_group_status? def initialize: ( ?after: String?, @@ -49,7 +49,7 @@ module WhopSDK ?first: Integer?, ?last: Integer?, ?query: String?, - ?status: WhopSDK::Models::AdGroupListParams::status?, + ?status: WhopSDK::Models::ad_group_status?, ?request_options: WhopSDK::request_opts ) -> void @@ -63,25 +63,9 @@ module WhopSDK first: Integer?, last: Integer?, query: String?, - status: WhopSDK::Models::AdGroupListParams::status?, + status: WhopSDK::Models::ad_group_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 index bf6e89b2..905a38d0 100644 --- a/sig/whop_sdk/models/ad_group_list_response.rbs +++ b/sig/whop_sdk/models/ad_group_list_response.rbs @@ -3,11 +3,12 @@ module WhopSDK type ad_group_list_response = { id: String, + ad_campaign: WhopSDK::Models::AdGroupListResponse::AdCampaign, budget: Float?, - budget_type: WhopSDK::Models::AdGroupListResponse::budget_type?, + budget_type: WhopSDK::Models::ad_budget_type?, created_at: Time, - platform: WhopSDK::Models::AdGroupListResponse::platform, - status: WhopSDK::Models::AdGroupListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_group_status, title: String?, updated_at: Time } @@ -15,15 +16,17 @@ module WhopSDK class AdGroupListResponse < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor ad_campaign: WhopSDK::Models::AdGroupListResponse::AdCampaign + attr_accessor budget: Float? - attr_accessor budget_type: WhopSDK::Models::AdGroupListResponse::budget_type? + attr_accessor budget_type: WhopSDK::Models::ad_budget_type? attr_accessor created_at: Time - attr_accessor platform: WhopSDK::Models::AdGroupListResponse::platform + attr_accessor platform: WhopSDK::Models::ad_campaign_platform - attr_accessor status: WhopSDK::Models::AdGroupListResponse::status + attr_accessor status: WhopSDK::Models::ad_group_status attr_accessor title: String? @@ -31,62 +34,36 @@ module WhopSDK def initialize: ( id: String, + ad_campaign: WhopSDK::Models::AdGroupListResponse::AdCampaign, budget: Float?, - budget_type: WhopSDK::Models::AdGroupListResponse::budget_type?, + budget_type: WhopSDK::Models::ad_budget_type?, created_at: Time, - platform: WhopSDK::Models::AdGroupListResponse::platform, - status: WhopSDK::Models::AdGroupListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_group_status, title: String?, updated_at: Time ) -> void def to_hash: -> { id: String, + ad_campaign: WhopSDK::Models::AdGroupListResponse::AdCampaign, budget: Float?, - budget_type: WhopSDK::Models::AdGroupListResponse::budget_type?, + budget_type: WhopSDK::Models::ad_budget_type?, created_at: Time, - platform: WhopSDK::Models::AdGroupListResponse::platform, - status: WhopSDK::Models::AdGroupListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::ad_group_status, title: String?, updated_at: Time } - type budget_type = :daily | :lifetime - - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY: :daily - LIFETIME: :lifetime - - def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::budget_type] - end - - type platform = :meta | :tiktok - - module Platform - extend WhopSDK::Internal::Type::Enum - - META: :meta - TIKTOK: :tiktok - - def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::platform] - end - - type status = - :active | :paused | :inactive | :in_review | :rejected | :flagged + type ad_campaign = { id: String } - module Status - extend WhopSDK::Internal::Type::Enum + class AdCampaign < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - ACTIVE: :active - PAUSED: :paused - INACTIVE: :inactive - IN_REVIEW: :in_review - REJECTED: :rejected - FLAGGED: :flagged + def initialize: (id: String) -> void - def self?.values: -> ::Array[WhopSDK::Models::AdGroupListResponse::status] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/ad_group_pause_params.rbs b/sig/whop_sdk/models/ad_group_pause_params.rbs new file mode 100644 index 00000000..4962865c --- /dev/null +++ b/sig/whop_sdk/models/ad_group_pause_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_group_pause_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdGroupPauseParams < 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 deleted file mode 100644 index 98893001..00000000 --- a/sig/whop_sdk/models/ad_group_retrieve_response.rbs +++ /dev/null @@ -1,108 +0,0 @@ -module WhopSDK - module Models - type ad_group_retrieve_response = - { - id: String, - ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, - budget: Float?, - budget_type: WhopSDK::Models::AdGroupRetrieveResponse::budget_type?, - created_at: Time, - platform: WhopSDK::Models::AdGroupRetrieveResponse::platform, - status: WhopSDK::Models::AdGroupRetrieveResponse::status, - title: String?, - updated_at: Time - } - - class AdGroupRetrieveResponse < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign - - attr_accessor budget: Float? - - attr_accessor budget_type: WhopSDK::Models::AdGroupRetrieveResponse::budget_type? - - attr_accessor created_at: Time - - attr_accessor platform: WhopSDK::Models::AdGroupRetrieveResponse::platform - - attr_accessor status: WhopSDK::Models::AdGroupRetrieveResponse::status - - attr_accessor title: String? - - attr_accessor updated_at: Time - - def initialize: ( - id: String, - ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, - budget: Float?, - budget_type: WhopSDK::Models::AdGroupRetrieveResponse::budget_type?, - created_at: Time, - platform: WhopSDK::Models::AdGroupRetrieveResponse::platform, - status: WhopSDK::Models::AdGroupRetrieveResponse::status, - title: String?, - updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, - budget: Float?, - budget_type: WhopSDK::Models::AdGroupRetrieveResponse::budget_type?, - created_at: Time, - platform: WhopSDK::Models::AdGroupRetrieveResponse::platform, - status: WhopSDK::Models::AdGroupRetrieveResponse::status, - title: String?, - updated_at: Time - } - - type ad_campaign = { id: String } - - class AdCampaign < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - type budget_type = :daily | :lifetime - - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY: :daily - LIFETIME: :lifetime - - def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::budget_type] - end - - type platform = :meta | :tiktok - - module Platform - extend WhopSDK::Internal::Type::Enum - - META: :meta - TIKTOK: :tiktok - - def self?.values: -> ::Array[WhopSDK::Models::AdGroupRetrieveResponse::platform] - 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_status.rbs b/sig/whop_sdk/models/ad_group_status.rbs new file mode 100644 index 00000000..d3a90300 --- /dev/null +++ b/sig/whop_sdk/models/ad_group_status.rbs @@ -0,0 +1,19 @@ +module WhopSDK + module Models + type ad_group_status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module AdGroupStatus + 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::ad_group_status] + end + end +end diff --git a/sig/whop_sdk/models/ad_group_unpause_params.rbs b/sig/whop_sdk/models/ad_group_unpause_params.rbs new file mode 100644 index 00000000..ca4ad57d --- /dev/null +++ b/sig/whop_sdk/models/ad_group_unpause_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_group_unpause_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdGroupUnpauseParams < 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_update_params.rbs b/sig/whop_sdk/models/ad_group_update_params.rbs index 79431d8f..a7bef440 100644 --- a/sig/whop_sdk/models/ad_group_update_params.rbs +++ b/sig/whop_sdk/models/ad_group_update_params.rbs @@ -4,12 +4,12 @@ module WhopSDK { id: String, budget: Float?, - budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type?, + budget_type: WhopSDK::Models::ad_budget_type?, config: WhopSDK::AdGroupUpdateParams::Config?, daily_budget: Float?, name: String?, platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig?, - status: WhopSDK::Models::AdGroupUpdateParams::status? + status: WhopSDK::Models::ad_group_status? } & WhopSDK::Internal::Type::request_parameters @@ -21,7 +21,7 @@ module WhopSDK attr_accessor budget: Float? - attr_accessor budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type? + attr_accessor budget_type: WhopSDK::Models::ad_budget_type? attr_accessor config: WhopSDK::AdGroupUpdateParams::Config? @@ -31,43 +31,32 @@ module WhopSDK attr_accessor platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig? - attr_accessor status: WhopSDK::Models::AdGroupUpdateParams::status? + attr_accessor status: WhopSDK::Models::ad_group_status? def initialize: ( id: String, ?budget: Float?, - ?budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type?, + ?budget_type: WhopSDK::Models::ad_budget_type?, ?config: WhopSDK::AdGroupUpdateParams::Config?, ?daily_budget: Float?, ?name: String?, ?platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig?, - ?status: WhopSDK::Models::AdGroupUpdateParams::status?, + ?status: WhopSDK::Models::ad_group_status?, ?request_options: WhopSDK::request_opts ) -> void def to_hash: -> { id: String, budget: Float?, - budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type?, + budget_type: WhopSDK::Models::ad_budget_type?, config: WhopSDK::AdGroupUpdateParams::Config?, daily_budget: Float?, name: String?, platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig?, - status: WhopSDK::Models::AdGroupUpdateParams::status?, + status: WhopSDK::Models::ad_group_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?, @@ -2418,22 +2407,6 @@ module WhopSDK 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 deleted file mode 100644 index 5275de6a..00000000 --- a/sig/whop_sdk/models/ad_group_update_response.rbs +++ /dev/null @@ -1,108 +0,0 @@ -module WhopSDK - module Models - type ad_group_update_response = - { - id: String, - ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, - budget: Float?, - budget_type: WhopSDK::Models::AdGroupUpdateResponse::budget_type?, - created_at: Time, - platform: WhopSDK::Models::AdGroupUpdateResponse::platform, - status: WhopSDK::Models::AdGroupUpdateResponse::status, - title: String?, - updated_at: Time - } - - class AdGroupUpdateResponse < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign - - attr_accessor budget: Float? - - attr_accessor budget_type: WhopSDK::Models::AdGroupUpdateResponse::budget_type? - - attr_accessor created_at: Time - - attr_accessor platform: WhopSDK::Models::AdGroupUpdateResponse::platform - - attr_accessor status: WhopSDK::Models::AdGroupUpdateResponse::status - - attr_accessor title: String? - - attr_accessor updated_at: Time - - def initialize: ( - id: String, - ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, - budget: Float?, - budget_type: WhopSDK::Models::AdGroupUpdateResponse::budget_type?, - created_at: Time, - platform: WhopSDK::Models::AdGroupUpdateResponse::platform, - status: WhopSDK::Models::AdGroupUpdateResponse::status, - title: String?, - updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, - budget: Float?, - budget_type: WhopSDK::Models::AdGroupUpdateResponse::budget_type?, - created_at: Time, - platform: WhopSDK::Models::AdGroupUpdateResponse::platform, - status: WhopSDK::Models::AdGroupUpdateResponse::status, - title: String?, - updated_at: Time - } - - type ad_campaign = { id: String } - - class AdCampaign < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - type budget_type = :daily | :lifetime - - module BudgetType - extend WhopSDK::Internal::Type::Enum - - DAILY: :daily - LIFETIME: :lifetime - - def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::budget_type] - end - - type platform = :meta | :tiktok - - module Platform - extend WhopSDK::Internal::Type::Enum - - META: :meta - TIKTOK: :tiktok - - def self?.values: -> ::Array[WhopSDK::Models::AdGroupUpdateResponse::platform] - 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 index 5031570c..c1aa1005 100644 --- a/sig/whop_sdk/models/ad_list_params.rbs +++ b/sig/whop_sdk/models/ad_list_params.rbs @@ -11,7 +11,7 @@ module WhopSDK created_before: Time?, first: Integer?, last: Integer?, - status: WhopSDK::Models::AdListParams::status? + status: WhopSDK::Models::external_ad_status? } & WhopSDK::Internal::Type::request_parameters @@ -37,7 +37,7 @@ module WhopSDK attr_accessor last: Integer? - attr_accessor status: WhopSDK::Models::AdListParams::status? + attr_accessor status: WhopSDK::Models::external_ad_status? def initialize: ( ?ad_group_id: String?, @@ -49,7 +49,7 @@ module WhopSDK ?created_before: Time?, ?first: Integer?, ?last: Integer?, - ?status: WhopSDK::Models::AdListParams::status?, + ?status: WhopSDK::Models::external_ad_status?, ?request_options: WhopSDK::request_opts ) -> void @@ -63,25 +63,9 @@ module WhopSDK created_before: Time?, first: Integer?, last: Integer?, - status: WhopSDK::Models::AdListParams::status?, + status: WhopSDK::Models::external_ad_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 index 5be1d491..67533307 100644 --- a/sig/whop_sdk/models/ad_list_response.rbs +++ b/sig/whop_sdk/models/ad_list_response.rbs @@ -3,9 +3,11 @@ module WhopSDK type ad_list_response = { id: String, + ad_campaign: WhopSDK::Models::AdListResponse::AdCampaign, + ad_group: WhopSDK::Models::AdListResponse::AdGroup, created_at: Time, - platform: WhopSDK::Models::AdListResponse::platform, - status: WhopSDK::Models::AdListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::external_ad_status, title: String?, updated_at: Time } @@ -13,11 +15,15 @@ module WhopSDK class AdListResponse < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor ad_campaign: WhopSDK::Models::AdListResponse::AdCampaign + + attr_accessor ad_group: WhopSDK::Models::AdListResponse::AdGroup + attr_accessor created_at: Time - attr_accessor platform: WhopSDK::Models::AdListResponse::platform + attr_accessor platform: WhopSDK::Models::ad_campaign_platform - attr_accessor status: WhopSDK::Models::AdListResponse::status + attr_accessor status: WhopSDK::Models::external_ad_status attr_accessor title: String? @@ -25,47 +31,44 @@ module WhopSDK def initialize: ( id: String, + ad_campaign: WhopSDK::Models::AdListResponse::AdCampaign, + ad_group: WhopSDK::Models::AdListResponse::AdGroup, created_at: Time, - platform: WhopSDK::Models::AdListResponse::platform, - status: WhopSDK::Models::AdListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::external_ad_status, title: String?, updated_at: Time ) -> void def to_hash: -> { id: String, + ad_campaign: WhopSDK::Models::AdListResponse::AdCampaign, + ad_group: WhopSDK::Models::AdListResponse::AdGroup, created_at: Time, - platform: WhopSDK::Models::AdListResponse::platform, - status: WhopSDK::Models::AdListResponse::status, + platform: WhopSDK::Models::ad_campaign_platform, + status: WhopSDK::Models::external_ad_status, title: String?, updated_at: Time } - type platform = :meta | :tiktok + type ad_campaign = { id: String } - module Platform - extend WhopSDK::Internal::Type::Enum + class AdCampaign < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - META: :meta - TIKTOK: :tiktok + def initialize: (id: String) -> void - def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::platform] + def to_hash: -> { id: String } end - type status = - :active | :paused | :inactive | :in_review | :rejected | :flagged + type ad_group = { id: String } - module Status - extend WhopSDK::Internal::Type::Enum + class AdGroup < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - ACTIVE: :active - PAUSED: :paused - INACTIVE: :inactive - IN_REVIEW: :in_review - REJECTED: :rejected - FLAGGED: :flagged + def initialize: (id: String) -> void - def self?.values: -> ::Array[WhopSDK::Models::AdListResponse::status] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/ad_pause_params.rbs b/sig/whop_sdk/models/ad_pause_params.rbs new file mode 100644 index 00000000..31b844f0 --- /dev/null +++ b/sig/whop_sdk/models/ad_pause_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_pause_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdPauseParams < 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_report_retrieve_params.rbs b/sig/whop_sdk/models/ad_report_retrieve_params.rbs index 14896c03..b89e17a3 100644 --- a/sig/whop_sdk/models/ad_report_retrieve_params.rbs +++ b/sig/whop_sdk/models/ad_report_retrieve_params.rbs @@ -7,8 +7,10 @@ module WhopSDK ad_campaign_id: String?, ad_group_id: String?, ad_id: String?, + breakdown: WhopSDK::Models::AdReportRetrieveParams::breakdown?, + company_id: String?, currency: String?, - include_daily: bool? + granularity: WhopSDK::Models::granularities? } & WhopSDK::Internal::Type::request_parameters @@ -26,9 +28,13 @@ module WhopSDK attr_accessor ad_id: String? + attr_accessor breakdown: WhopSDK::Models::AdReportRetrieveParams::breakdown? + + attr_accessor company_id: String? + attr_accessor currency: String? - attr_accessor include_daily: bool? + attr_accessor granularity: WhopSDK::Models::granularities? def initialize: ( from: Time, @@ -36,8 +42,10 @@ module WhopSDK ?ad_campaign_id: String?, ?ad_group_id: String?, ?ad_id: String?, + ?breakdown: WhopSDK::Models::AdReportRetrieveParams::breakdown?, + ?company_id: String?, ?currency: String?, - ?include_daily: bool?, + ?granularity: WhopSDK::Models::granularities?, ?request_options: WhopSDK::request_opts ) -> void @@ -47,10 +55,24 @@ module WhopSDK ad_campaign_id: String?, ad_group_id: String?, ad_id: String?, + breakdown: WhopSDK::Models::AdReportRetrieveParams::breakdown?, + company_id: String?, currency: String?, - include_daily: bool?, + granularity: WhopSDK::Models::granularities?, request_options: WhopSDK::RequestOptions } + + type breakdown = :campaign | :ad_group | :ad + + module Breakdown + extend WhopSDK::Internal::Type::Enum + + CAMPAIGN: :campaign + AD_GROUP: :ad_group + AD: :ad + + def self?.values: -> ::Array[WhopSDK::Models::AdReportRetrieveParams::breakdown] + end end end end diff --git a/sig/whop_sdk/models/ad_report_retrieve_response.rbs b/sig/whop_sdk/models/ad_report_retrieve_response.rbs index 4af9fce9..e7917c36 100644 --- a/sig/whop_sdk/models/ad_report_retrieve_response.rbs +++ b/sig/whop_sdk/models/ad_report_retrieve_response.rbs @@ -2,48 +2,263 @@ module WhopSDK module Models type ad_report_retrieve_response = { - daily: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Daily]?, + breakdown: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown]?, + granularity: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Granularity]?, summary: WhopSDK::Models::AdReportRetrieveResponse::Summary } class AdReportRetrieveResponse < WhopSDK::Internal::Type::BaseModel - attr_accessor daily: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Daily]? + attr_accessor breakdown: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown]? + + attr_accessor granularity: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Granularity]? attr_accessor summary: WhopSDK::Models::AdReportRetrieveResponse::Summary def initialize: ( - daily: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Daily]?, + breakdown: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown]?, + granularity: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Granularity]?, summary: WhopSDK::Models::AdReportRetrieveResponse::Summary ) -> void def to_hash: -> { - daily: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Daily]?, + breakdown: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown]?, + granularity: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Granularity]?, summary: WhopSDK::Models::AdReportRetrieveResponse::Summary } - type daily = + type breakdown = { + id: String, + granularity: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity]?, + level: WhopSDK::Models::AdReportRetrieveResponse::Breakdown::level, + name: String?, + summary: WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary + } + + class Breakdown < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor granularity: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity]? + + attr_accessor level: WhopSDK::Models::AdReportRetrieveResponse::Breakdown::level + + attr_accessor name: String? + + attr_accessor summary: WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary + + def initialize: ( + id: String, + granularity: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity]?, + level: WhopSDK::Models::AdReportRetrieveResponse::Breakdown::level, + name: String?, + summary: WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary + ) -> void + + def to_hash: -> { + id: String, + granularity: ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Granularity]?, + level: WhopSDK::Models::AdReportRetrieveResponse::Breakdown::level, + name: String?, + summary: WhopSDK::Models::AdReportRetrieveResponse::Breakdown::Summary + } + + type granularity = + { + bucket_start: Time, + clicks: Integer, + granularity: WhopSDK::Models::granularities, + impressions: Integer, + reach: Integer, + result_count: Integer?, + result_label_key: WhopSDK::Models::result_label_keys?, + result_label_override: String?, + spend: Float, + spend_currency: WhopSDK::Models::currency, + stat_date: Time, + stat_hour: Integer? + } + + class Granularity < WhopSDK::Internal::Type::BaseModel + attr_accessor bucket_start: Time + + attr_accessor clicks: Integer + + attr_accessor granularity: WhopSDK::Models::granularities + + attr_accessor impressions: Integer + + attr_accessor reach: Integer + + attr_accessor result_count: Integer? + + attr_accessor result_label_key: WhopSDK::Models::result_label_keys? + + attr_accessor result_label_override: String? + + attr_accessor spend: Float + + attr_accessor spend_currency: WhopSDK::Models::currency + + attr_accessor stat_date: Time + + attr_accessor stat_hour: Integer? + + def initialize: ( + bucket_start: Time, + clicks: Integer, + granularity: WhopSDK::Models::granularities, + impressions: Integer, + reach: Integer, + result_count: Integer?, + result_label_key: WhopSDK::Models::result_label_keys?, + result_label_override: String?, + spend: Float, + spend_currency: WhopSDK::Models::currency, + stat_date: Time, + stat_hour: Integer? + ) -> void + + def to_hash: -> { + bucket_start: Time, + clicks: Integer, + granularity: WhopSDK::Models::granularities, + impressions: Integer, + reach: Integer, + result_count: Integer?, + result_label_key: WhopSDK::Models::result_label_keys?, + result_label_override: String?, + spend: Float, + spend_currency: WhopSDK::Models::currency, + stat_date: Time, + stat_hour: Integer? + } + end + + type level = :campaign | :ad_group | :ad + + module Level + extend WhopSDK::Internal::Type::Enum + + CAMPAIGN: :campaign + AD_GROUP: :ad_group + AD: :ad + + def self?.values: -> ::Array[WhopSDK::Models::AdReportRetrieveResponse::Breakdown::level] + end + + type summary = + { + clicks: Integer, + cost_per_result: Float?, + cpc: Float, + cpm: Float?, + ctr: Float, + frequency: Float?, + impressions: Integer, + reach: Integer, + result_count: Integer?, + result_label_key: WhopSDK::Models::result_label_keys?, + result_label_override: String?, + roas: Float?, + spend: Float, + spend_currency: WhopSDK::Models::currency? + } + + class Summary < WhopSDK::Internal::Type::BaseModel + attr_accessor clicks: Integer + + attr_accessor cost_per_result: Float? + + attr_accessor cpc: Float + + attr_accessor cpm: Float? + + attr_accessor ctr: Float + + attr_accessor frequency: Float? + + attr_accessor impressions: Integer + + attr_accessor reach: Integer + + attr_accessor result_count: Integer? + + attr_accessor result_label_key: WhopSDK::Models::result_label_keys? + + attr_accessor result_label_override: String? + + attr_accessor roas: Float? + + attr_accessor spend: Float + + attr_accessor spend_currency: WhopSDK::Models::currency? + + def initialize: ( + clicks: Integer, + cost_per_result: Float?, + cpc: Float, + cpm: Float?, + ctr: Float, + frequency: Float?, + impressions: Integer, + reach: Integer, + result_count: Integer?, + result_label_key: WhopSDK::Models::result_label_keys?, + result_label_override: String?, + roas: Float?, + spend: Float, + spend_currency: WhopSDK::Models::currency? + ) -> void + + def to_hash: -> { + clicks: Integer, + cost_per_result: Float?, + cpc: Float, + cpm: Float?, + ctr: Float, + frequency: Float?, + impressions: Integer, + reach: Integer, + result_count: Integer?, + result_label_key: WhopSDK::Models::result_label_keys?, + result_label_override: String?, + roas: Float?, + spend: Float, + spend_currency: WhopSDK::Models::currency? + } + end + end + + type granularity = + { + bucket_start: Time, clicks: Integer, + granularity: WhopSDK::Models::granularities, impressions: Integer, reach: Integer, result_count: Integer?, - result_label_key: WhopSDK::Models::AdReportRetrieveResponse::Daily::result_label_key?, + result_label_key: WhopSDK::Models::result_label_keys?, result_label_override: String?, spend: Float, spend_currency: WhopSDK::Models::currency, - stat_date: Time + stat_date: Time, + stat_hour: Integer? } - class Daily < WhopSDK::Internal::Type::BaseModel + class Granularity < WhopSDK::Internal::Type::BaseModel + attr_accessor bucket_start: Time + attr_accessor clicks: Integer + attr_accessor granularity: WhopSDK::Models::granularities + attr_accessor impressions: Integer attr_accessor reach: Integer attr_accessor result_count: Integer? - attr_accessor result_label_key: WhopSDK::Models::AdReportRetrieveResponse::Daily::result_label_key? + attr_accessor result_label_key: WhopSDK::Models::result_label_keys? attr_accessor result_label_override: String? @@ -53,86 +268,37 @@ module WhopSDK attr_accessor stat_date: Time + attr_accessor stat_hour: Integer? + def initialize: ( + bucket_start: Time, clicks: Integer, + granularity: WhopSDK::Models::granularities, impressions: Integer, reach: Integer, result_count: Integer?, - result_label_key: WhopSDK::Models::AdReportRetrieveResponse::Daily::result_label_key?, + result_label_key: WhopSDK::Models::result_label_keys?, result_label_override: String?, spend: Float, spend_currency: WhopSDK::Models::currency, - stat_date: Time + stat_date: Time, + stat_hour: Integer? ) -> void def to_hash: -> { + bucket_start: Time, clicks: Integer, + granularity: WhopSDK::Models::granularities, impressions: Integer, reach: Integer, result_count: Integer?, - result_label_key: WhopSDK::Models::AdReportRetrieveResponse::Daily::result_label_key?, + result_label_key: WhopSDK::Models::result_label_keys?, result_label_override: String?, spend: Float, spend_currency: WhopSDK::Models::currency, - stat_date: Time + stat_date: Time, + stat_hour: Integer? } - - type result_label_key = - :app_installs - | :messaging_conversations_started - | :post_engagement - | :event_responses - | :impressions - | :website_purchases - | :landing_page_views - | :leads - | :link_clicks - | :quality_calls - | :appointments_booked - | :messaging_purchases - | :page_likes - | :instagram_profile_visits - | :reach - | :reminders_set - | :new_subscribers - | :video_views - | :registrations - | :content_views - | :searches - | :website_schedules - | :website_submit_applications - | :custom - - module ResultLabelKey - extend WhopSDK::Internal::Type::Enum - - APP_INSTALLS: :app_installs - MESSAGING_CONVERSATIONS_STARTED: :messaging_conversations_started - POST_ENGAGEMENT: :post_engagement - EVENT_RESPONSES: :event_responses - IMPRESSIONS: :impressions - WEBSITE_PURCHASES: :website_purchases - LANDING_PAGE_VIEWS: :landing_page_views - LEADS: :leads - LINK_CLICKS: :link_clicks - QUALITY_CALLS: :quality_calls - APPOINTMENTS_BOOKED: :appointments_booked - MESSAGING_PURCHASES: :messaging_purchases - PAGE_LIKES: :page_likes - INSTAGRAM_PROFILE_VISITS: :instagram_profile_visits - REACH: :reach - REMINDERS_SET: :reminders_set - NEW_SUBSCRIBERS: :new_subscribers - VIDEO_VIEWS: :video_views - REGISTRATIONS: :registrations - CONTENT_VIEWS: :content_views - SEARCHES: :searches - WEBSITE_SCHEDULES: :website_schedules - WEBSITE_SUBMIT_APPLICATIONS: :website_submit_applications - CUSTOM: :custom - - def self?.values: -> ::Array[WhopSDK::Models::AdReportRetrieveResponse::Daily::result_label_key] - end end type summary = @@ -146,7 +312,7 @@ module WhopSDK impressions: Integer, reach: Integer, result_count: Integer?, - result_label_key: WhopSDK::Models::AdReportRetrieveResponse::Summary::result_label_key?, + result_label_key: WhopSDK::Models::result_label_keys?, result_label_override: String?, roas: Float?, spend: Float, @@ -172,7 +338,7 @@ module WhopSDK attr_accessor result_count: Integer? - attr_accessor result_label_key: WhopSDK::Models::AdReportRetrieveResponse::Summary::result_label_key? + attr_accessor result_label_key: WhopSDK::Models::result_label_keys? attr_accessor result_label_override: String? @@ -192,7 +358,7 @@ module WhopSDK impressions: Integer, reach: Integer, result_count: Integer?, - result_label_key: WhopSDK::Models::AdReportRetrieveResponse::Summary::result_label_key?, + result_label_key: WhopSDK::Models::result_label_keys?, result_label_override: String?, roas: Float?, spend: Float, @@ -209,69 +375,12 @@ module WhopSDK impressions: Integer, reach: Integer, result_count: Integer?, - result_label_key: WhopSDK::Models::AdReportRetrieveResponse::Summary::result_label_key?, + result_label_key: WhopSDK::Models::result_label_keys?, result_label_override: String?, roas: Float?, spend: Float, spend_currency: WhopSDK::Models::currency? } - - type result_label_key = - :app_installs - | :messaging_conversations_started - | :post_engagement - | :event_responses - | :impressions - | :website_purchases - | :landing_page_views - | :leads - | :link_clicks - | :quality_calls - | :appointments_booked - | :messaging_purchases - | :page_likes - | :instagram_profile_visits - | :reach - | :reminders_set - | :new_subscribers - | :video_views - | :registrations - | :content_views - | :searches - | :website_schedules - | :website_submit_applications - | :custom - - module ResultLabelKey - extend WhopSDK::Internal::Type::Enum - - APP_INSTALLS: :app_installs - MESSAGING_CONVERSATIONS_STARTED: :messaging_conversations_started - POST_ENGAGEMENT: :post_engagement - EVENT_RESPONSES: :event_responses - IMPRESSIONS: :impressions - WEBSITE_PURCHASES: :website_purchases - LANDING_PAGE_VIEWS: :landing_page_views - LEADS: :leads - LINK_CLICKS: :link_clicks - QUALITY_CALLS: :quality_calls - APPOINTMENTS_BOOKED: :appointments_booked - MESSAGING_PURCHASES: :messaging_purchases - PAGE_LIKES: :page_likes - INSTAGRAM_PROFILE_VISITS: :instagram_profile_visits - REACH: :reach - REMINDERS_SET: :reminders_set - NEW_SUBSCRIBERS: :new_subscribers - VIDEO_VIEWS: :video_views - REGISTRATIONS: :registrations - CONTENT_VIEWS: :content_views - SEARCHES: :searches - WEBSITE_SCHEDULES: :website_schedules - WEBSITE_SUBMIT_APPLICATIONS: :website_submit_applications - CUSTOM: :custom - - def self?.values: -> ::Array[WhopSDK::Models::AdReportRetrieveResponse::Summary::result_label_key] - end end end end diff --git a/sig/whop_sdk/models/ad_retrieve_response.rbs b/sig/whop_sdk/models/ad_retrieve_response.rbs deleted file mode 100644 index 335a5579..00000000 --- a/sig/whop_sdk/models/ad_retrieve_response.rbs +++ /dev/null @@ -1,102 +0,0 @@ -module WhopSDK - module Models - type ad_retrieve_response = - { - id: String, - ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign, - ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup, - created_at: Time, - platform: WhopSDK::Models::AdRetrieveResponse::platform, - status: WhopSDK::Models::AdRetrieveResponse::status, - title: String?, - updated_at: Time - } - - class AdRetrieveResponse < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign - - attr_accessor ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup - - attr_accessor created_at: Time - - attr_accessor platform: WhopSDK::Models::AdRetrieveResponse::platform - - attr_accessor status: WhopSDK::Models::AdRetrieveResponse::status - - attr_accessor title: String? - - attr_accessor updated_at: Time - - def initialize: ( - id: String, - ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign, - ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup, - created_at: Time, - platform: WhopSDK::Models::AdRetrieveResponse::platform, - status: WhopSDK::Models::AdRetrieveResponse::status, - title: String?, - updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign, - ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup, - created_at: Time, - platform: WhopSDK::Models::AdRetrieveResponse::platform, - status: WhopSDK::Models::AdRetrieveResponse::status, - title: String?, - updated_at: Time - } - - type ad_campaign = { id: String } - - class AdCampaign < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - type ad_group = { id: String } - - class AdGroup < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - type platform = :meta | :tiktok - - module Platform - extend WhopSDK::Internal::Type::Enum - - META: :meta - TIKTOK: :tiktok - - def self?.values: -> ::Array[WhopSDK::Models::AdRetrieveResponse::platform] - 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/ad_unpause_params.rbs b/sig/whop_sdk/models/ad_unpause_params.rbs new file mode 100644 index 00000000..5eec67ff --- /dev/null +++ b/sig/whop_sdk/models/ad_unpause_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type ad_unpause_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AdUnpauseParams < 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/dispute.rbs b/sig/whop_sdk/models/dispute.rbs index 8a01f930..970a607e 100644 --- a/sig/whop_sdk/models/dispute.rbs +++ b/sig/whop_sdk/models/dispute.rbs @@ -219,7 +219,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Dispute::Payment::Member?, membership: WhopSDK::Dispute::Payment::Membership?, @@ -242,7 +242,7 @@ module WhopSDK attr_accessor created_at: Time - attr_accessor currency: WhopSDK::Models::currency? + attr_accessor currency: WhopSDK::Models::currency attr_accessor dispute_alerted_at: Time? @@ -268,7 +268,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, card_last4: String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Dispute::Payment::Member?, membership: WhopSDK::Dispute::Payment::Membership?, @@ -286,7 +286,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Dispute::Payment::Member?, membership: WhopSDK::Dispute::Payment::Membership?, diff --git a/sig/whop_sdk/models/dispute_alert_created_webhook_event.rbs b/sig/whop_sdk/models/dispute_alert_created_webhook_event.rbs index ca1d90b2..cd76cfe5 100644 --- a/sig/whop_sdk/models/dispute_alert_created_webhook_event.rbs +++ b/sig/whop_sdk/models/dispute_alert_created_webhook_event.rbs @@ -146,7 +146,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::Membership?, @@ -169,7 +169,7 @@ module WhopSDK attr_accessor created_at: Time - attr_accessor currency: WhopSDK::Models::currency? + attr_accessor currency: WhopSDK::Models::currency attr_accessor dispute_alerted_at: Time? @@ -195,7 +195,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, card_last4: String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::Membership?, @@ -213,7 +213,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::Membership?, diff --git a/sig/whop_sdk/models/dispute_alert_retrieve_response.rbs b/sig/whop_sdk/models/dispute_alert_retrieve_response.rbs index b4683729..8047d91d 100644 --- a/sig/whop_sdk/models/dispute_alert_retrieve_response.rbs +++ b/sig/whop_sdk/models/dispute_alert_retrieve_response.rbs @@ -105,7 +105,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Models::DisputeAlertRetrieveResponse::Payment::Member?, membership: WhopSDK::Models::DisputeAlertRetrieveResponse::Payment::Membership?, @@ -128,7 +128,7 @@ module WhopSDK attr_accessor created_at: Time - attr_accessor currency: WhopSDK::Models::currency? + attr_accessor currency: WhopSDK::Models::currency attr_accessor dispute_alerted_at: Time? @@ -154,7 +154,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, card_last4: String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Models::DisputeAlertRetrieveResponse::Payment::Member?, membership: WhopSDK::Models::DisputeAlertRetrieveResponse::Payment::Membership?, @@ -172,7 +172,7 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Models::DisputeAlertRetrieveResponse::Payment::Member?, membership: WhopSDK::Models::DisputeAlertRetrieveResponse::Payment::Membership?, diff --git a/sig/whop_sdk/models/external_ad_status.rbs b/sig/whop_sdk/models/external_ad_status.rbs new file mode 100644 index 00000000..97d1643e --- /dev/null +++ b/sig/whop_sdk/models/external_ad_status.rbs @@ -0,0 +1,19 @@ +module WhopSDK + module Models + type external_ad_status = + :active | :paused | :inactive | :in_review | :rejected | :flagged + + module ExternalAdStatus + 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::external_ad_status] + end + end +end diff --git a/sig/whop_sdk/models/file_create_params.rbs b/sig/whop_sdk/models/file_create_params.rbs index c750f6a6..f8879c57 100644 --- a/sig/whop_sdk/models/file_create_params.rbs +++ b/sig/whop_sdk/models/file_create_params.rbs @@ -1,10 +1,7 @@ module WhopSDK module Models type file_create_params = - { - filename: String, - visibility: WhopSDK::Models::FileCreateParams::visibility? - } + { filename: String, visibility: WhopSDK::Models::file_visibility? } & WhopSDK::Internal::Type::request_parameters class FileCreateParams < WhopSDK::Internal::Type::BaseModel @@ -13,30 +10,19 @@ module WhopSDK attr_accessor filename: String - attr_accessor visibility: WhopSDK::Models::FileCreateParams::visibility? + attr_accessor visibility: WhopSDK::Models::file_visibility? def initialize: ( filename: String, - ?visibility: WhopSDK::Models::FileCreateParams::visibility?, + ?visibility: WhopSDK::Models::file_visibility?, ?request_options: WhopSDK::request_opts ) -> void def to_hash: -> { filename: String, - visibility: WhopSDK::Models::FileCreateParams::visibility?, + visibility: WhopSDK::Models::file_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 20491571..1e98c171 100644 --- a/sig/whop_sdk/models/file_create_response.rbs +++ b/sig/whop_sdk/models/file_create_response.rbs @@ -10,7 +10,7 @@ module WhopSDK upload_status: WhopSDK::Models::upload_status, upload_url: String?, url: String?, - visibility: WhopSDK::Models::FileCreateResponse::visibility + visibility: WhopSDK::Models::file_visibility } class FileCreateResponse < WhopSDK::Internal::Type::BaseModel @@ -30,7 +30,7 @@ module WhopSDK attr_accessor url: String? - attr_accessor visibility: WhopSDK::Models::FileCreateResponse::visibility + attr_accessor visibility: WhopSDK::Models::file_visibility def initialize: ( id: String, @@ -41,7 +41,7 @@ module WhopSDK upload_status: WhopSDK::Models::upload_status, upload_url: String?, url: String?, - visibility: WhopSDK::Models::FileCreateResponse::visibility + visibility: WhopSDK::Models::file_visibility ) -> void def to_hash: -> { @@ -53,19 +53,8 @@ module WhopSDK upload_status: WhopSDK::Models::upload_status, upload_url: String?, url: String?, - visibility: WhopSDK::Models::FileCreateResponse::visibility + visibility: WhopSDK::Models::file_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 d36b0edb..28d096e1 100644 --- a/sig/whop_sdk/models/file_retrieve_response.rbs +++ b/sig/whop_sdk/models/file_retrieve_response.rbs @@ -8,7 +8,7 @@ module WhopSDK size: String?, upload_status: WhopSDK::Models::upload_status, url: String?, - visibility: WhopSDK::Models::FileRetrieveResponse::visibility + visibility: WhopSDK::Models::file_visibility } class FileRetrieveResponse < WhopSDK::Internal::Type::BaseModel @@ -24,7 +24,7 @@ module WhopSDK attr_accessor url: String? - attr_accessor visibility: WhopSDK::Models::FileRetrieveResponse::visibility + attr_accessor visibility: WhopSDK::Models::file_visibility def initialize: ( id: String, @@ -33,7 +33,7 @@ module WhopSDK size: String?, upload_status: WhopSDK::Models::upload_status, url: String?, - visibility: WhopSDK::Models::FileRetrieveResponse::visibility + visibility: WhopSDK::Models::file_visibility ) -> void def to_hash: -> { @@ -43,19 +43,8 @@ module WhopSDK size: String?, upload_status: WhopSDK::Models::upload_status, url: String?, - visibility: WhopSDK::Models::FileRetrieveResponse::visibility + visibility: WhopSDK::Models::file_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/file_visibility.rbs b/sig/whop_sdk/models/file_visibility.rbs new file mode 100644 index 00000000..926bb458 --- /dev/null +++ b/sig/whop_sdk/models/file_visibility.rbs @@ -0,0 +1,14 @@ +module WhopSDK + module Models + type file_visibility = :public | :private + + module FileVisibility + extend WhopSDK::Internal::Type::Enum + + PUBLIC: :public + PRIVATE: :private + + def self?.values: -> ::Array[WhopSDK::Models::file_visibility] + end + end +end diff --git a/sig/whop_sdk/models/granularities.rbs b/sig/whop_sdk/models/granularities.rbs new file mode 100644 index 00000000..fbedee53 --- /dev/null +++ b/sig/whop_sdk/models/granularities.rbs @@ -0,0 +1,14 @@ +module WhopSDK + module Models + type granularities = :daily | :hourly + + module Granularities + extend WhopSDK::Internal::Type::Enum + + DAILY: :daily + HOURLY: :hourly + + def self?.values: -> ::Array[WhopSDK::Models::granularities] + end + end +end diff --git a/sig/whop_sdk/models/membership.rbs b/sig/whop_sdk/models/membership.rbs index 031594b8..134a80f0 100644 --- a/sig/whop_sdk/models/membership.rbs +++ b/sig/whop_sdk/models/membership.rbs @@ -168,26 +168,39 @@ module WhopSDK def to_hash: -> { id: String } end - type plan = { id: String } + type plan = { id: String, metadata: ::Hash[Symbol, top]? } class Plan < WhopSDK::Internal::Type::BaseModel attr_accessor id: String - def initialize: (id: String) -> void + attr_accessor metadata: ::Hash[Symbol, top]? - def to_hash: -> { id: String } + def initialize: (id: String, metadata: ::Hash[Symbol, top]?) -> void + + def to_hash: -> { id: String, metadata: ::Hash[Symbol, top]? } end - type product = { id: String, title: String } + type product = + { id: String, metadata: ::Hash[Symbol, top]?, title: String } class Product < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor title: String - def initialize: (id: String, title: String) -> void + def initialize: ( + id: String, + metadata: ::Hash[Symbol, top]?, + title: String + ) -> void - def to_hash: -> { id: String, title: String } + def to_hash: -> { + id: String, + metadata: ::Hash[Symbol, top]?, + title: String + } end type promo_code = { id: String } diff --git a/sig/whop_sdk/models/membership_list_response.rbs b/sig/whop_sdk/models/membership_list_response.rbs index 611c3d40..cede876c 100644 --- a/sig/whop_sdk/models/membership_list_response.rbs +++ b/sig/whop_sdk/models/membership_list_response.rbs @@ -148,26 +148,39 @@ module WhopSDK def to_hash: -> { id: String } end - type plan = { id: String } + type plan = { id: String, metadata: ::Hash[Symbol, top]? } class Plan < WhopSDK::Internal::Type::BaseModel attr_accessor id: String - def initialize: (id: String) -> void + attr_accessor metadata: ::Hash[Symbol, top]? - def to_hash: -> { id: String } + def initialize: (id: String, metadata: ::Hash[Symbol, top]?) -> void + + def to_hash: -> { id: String, metadata: ::Hash[Symbol, top]? } end - type product = { id: String, title: String } + type product = + { id: String, metadata: ::Hash[Symbol, top]?, title: String } class Product < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor title: String - def initialize: (id: String, title: String) -> void + def initialize: ( + id: String, + metadata: ::Hash[Symbol, top]?, + title: String + ) -> void - def to_hash: -> { id: String, title: String } + def to_hash: -> { + id: String, + metadata: ::Hash[Symbol, top]?, + title: String + } end type promo_code = { id: String } diff --git a/sig/whop_sdk/models/payment.rbs b/sig/whop_sdk/models/payment.rbs index d2943710..88bd2b6c 100644 --- a/sig/whop_sdk/models/payment.rbs +++ b/sig/whop_sdk/models/payment.rbs @@ -13,7 +13,7 @@ module WhopSDK checkout_configuration_id: String?, company: WhopSDK::Payment::Company?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, disputes: ::Array[WhopSDK::Payment::Dispute]?, failure_message: String?, @@ -37,7 +37,7 @@ module WhopSDK resolutions: ::Array[WhopSDK::Payment::Resolution]?, retryable: bool, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Models::currency, settlement_exchange_rate: Float?, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, @@ -75,7 +75,7 @@ module WhopSDK attr_accessor created_at: Time - attr_accessor currency: WhopSDK::Models::currency? + attr_accessor currency: WhopSDK::Models::currency attr_accessor dispute_alerted_at: Time? @@ -123,7 +123,7 @@ module WhopSDK attr_accessor settlement_amount: Float - attr_accessor settlement_currency: String + attr_accessor settlement_currency: WhopSDK::Models::currency attr_accessor settlement_exchange_rate: Float? @@ -161,7 +161,7 @@ module WhopSDK checkout_configuration_id: String?, company: WhopSDK::Payment::Company?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, disputes: ::Array[WhopSDK::Payment::Dispute]?, failure_message: String?, @@ -185,7 +185,7 @@ module WhopSDK resolutions: ::Array[WhopSDK::Payment::Resolution]?, retryable: bool, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Models::currency, settlement_exchange_rate: Float?, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, @@ -212,7 +212,7 @@ module WhopSDK checkout_configuration_id: String?, company: WhopSDK::Payment::Company?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, disputes: ::Array[WhopSDK::Payment::Dispute]?, failure_message: String?, @@ -236,7 +236,7 @@ module WhopSDK resolutions: ::Array[WhopSDK::Payment::Resolution]?, retryable: bool, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Models::currency, settlement_exchange_rate: Float?, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, @@ -602,30 +602,59 @@ module WhopSDK end end - type plan = { id: String, internal_notes: String? } + type plan = + { id: String, internal_notes: String?, metadata: ::Hash[Symbol, top]? } class Plan < WhopSDK::Internal::Type::BaseModel attr_accessor id: String attr_accessor internal_notes: String? - def initialize: (id: String, internal_notes: String?) -> void + attr_accessor metadata: ::Hash[Symbol, top]? - def to_hash: -> { id: String, internal_notes: String? } + def initialize: ( + id: String, + internal_notes: String?, + metadata: ::Hash[Symbol, top]? + ) -> void + + def to_hash: -> { + id: String, + internal_notes: String?, + metadata: ::Hash[Symbol, top]? + } end - type product = { id: String, route: String, title: String } + type product = + { + id: String, + metadata: ::Hash[Symbol, top]?, + route: String, + title: String + } class Product < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor route: String attr_accessor title: String - def initialize: (id: String, route: String, title: String) -> void + def initialize: ( + id: String, + metadata: ::Hash[Symbol, top]?, + route: String, + title: String + ) -> void - def to_hash: -> { id: String, route: String, title: String } + def to_hash: -> { + id: String, + metadata: ::Hash[Symbol, top]?, + route: String, + title: String + } end type promo_code = diff --git a/sig/whop_sdk/models/payment_list_response.rbs b/sig/whop_sdk/models/payment_list_response.rbs index 908fda2c..67ac62a9 100644 --- a/sig/whop_sdk/models/payment_list_response.rbs +++ b/sig/whop_sdk/models/payment_list_response.rbs @@ -13,7 +13,7 @@ module WhopSDK checkout_configuration_id: String?, company: WhopSDK::Models::PaymentListResponse::Company?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, failure_message: String?, last_payment_attempt: Time?, @@ -32,7 +32,7 @@ module WhopSDK refunded_amount: Float?, refunded_at: Time?, retryable: bool, - settlement_currency: String, + settlement_currency: WhopSDK::Models::currency, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, @@ -68,7 +68,7 @@ module WhopSDK attr_accessor created_at: Time - attr_accessor currency: WhopSDK::Models::currency? + attr_accessor currency: WhopSDK::Models::currency attr_accessor dispute_alerted_at: Time? @@ -106,7 +106,7 @@ module WhopSDK attr_accessor retryable: bool - attr_accessor settlement_currency: String + attr_accessor settlement_currency: WhopSDK::Models::currency attr_accessor status: WhopSDK::Models::receipt_status? @@ -140,7 +140,7 @@ module WhopSDK checkout_configuration_id: String?, company: WhopSDK::Models::PaymentListResponse::Company?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, failure_message: String?, last_payment_attempt: Time?, @@ -159,7 +159,7 @@ module WhopSDK refunded_amount: Float?, refunded_at: Time?, retryable: bool, - settlement_currency: String, + settlement_currency: WhopSDK::Models::currency, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, @@ -184,7 +184,7 @@ module WhopSDK checkout_configuration_id: String?, company: WhopSDK::Models::PaymentListResponse::Company?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, failure_message: String?, last_payment_attempt: Time?, @@ -203,7 +203,7 @@ module WhopSDK refunded_amount: Float?, refunded_at: Time?, retryable: bool, - settlement_currency: String, + settlement_currency: WhopSDK::Models::currency, status: WhopSDK::Models::receipt_status?, substatus: WhopSDK::Models::friendly_receipt_status, subtotal: Float?, @@ -414,30 +414,59 @@ module WhopSDK end end - type plan = { id: String, internal_notes: String? } + type plan = + { id: String, internal_notes: String?, metadata: ::Hash[Symbol, top]? } class Plan < WhopSDK::Internal::Type::BaseModel attr_accessor id: String attr_accessor internal_notes: String? - def initialize: (id: String, internal_notes: String?) -> void + attr_accessor metadata: ::Hash[Symbol, top]? - def to_hash: -> { id: String, internal_notes: String? } + def initialize: ( + id: String, + internal_notes: String?, + metadata: ::Hash[Symbol, top]? + ) -> void + + def to_hash: -> { + id: String, + internal_notes: String?, + metadata: ::Hash[Symbol, top]? + } end - type product = { id: String, route: String, title: String } + type product = + { + id: String, + metadata: ::Hash[Symbol, top]?, + route: String, + title: String + } class Product < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor route: String attr_accessor title: String - def initialize: (id: String, route: String, title: String) -> void + def initialize: ( + id: String, + metadata: ::Hash[Symbol, top]?, + route: String, + title: String + ) -> void - def to_hash: -> { id: String, route: String, title: String } + def to_hash: -> { + id: String, + metadata: ::Hash[Symbol, top]?, + route: String, + title: String + } end type promo_code = diff --git a/sig/whop_sdk/models/plan.rbs b/sig/whop_sdk/models/plan.rbs index 21fe55ce..7ee53068 100644 --- a/sig/whop_sdk/models/plan.rbs +++ b/sig/whop_sdk/models/plan.rbs @@ -16,6 +16,7 @@ module WhopSDK internal_notes: String?, invoice: WhopSDK::Plan::Invoice?, member_count: Integer?, + metadata: ::Hash[Symbol, top]?, payment_method_configuration: WhopSDK::Plan::PaymentMethodConfiguration?, plan_type: WhopSDK::Models::plan_type, product: WhopSDK::Plan::Product?, @@ -61,6 +62,8 @@ module WhopSDK attr_accessor member_count: Integer? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor payment_method_configuration: WhopSDK::Plan::PaymentMethodConfiguration? attr_accessor plan_type: WhopSDK::Models::plan_type @@ -104,6 +107,7 @@ module WhopSDK internal_notes: String?, invoice: WhopSDK::Plan::Invoice?, member_count: Integer?, + metadata: ::Hash[Symbol, top]?, payment_method_configuration: WhopSDK::Plan::PaymentMethodConfiguration?, plan_type: WhopSDK::Models::plan_type, product: WhopSDK::Plan::Product?, @@ -135,6 +139,7 @@ module WhopSDK internal_notes: String?, invoice: WhopSDK::Plan::Invoice?, member_count: Integer?, + metadata: ::Hash[Symbol, top]?, payment_method_configuration: WhopSDK::Plan::PaymentMethodConfiguration?, plan_type: WhopSDK::Models::plan_type, product: WhopSDK::Plan::Product?, diff --git a/sig/whop_sdk/models/plan_create_params.rbs b/sig/whop_sdk/models/plan_create_params.rbs index ed524445..9c1e5820 100644 --- a/sig/whop_sdk/models/plan_create_params.rbs +++ b/sig/whop_sdk/models/plan_create_params.rbs @@ -15,6 +15,7 @@ module WhopSDK initial_price: Float?, internal_notes: String?, legacy_payment_method_controls: bool?, + metadata: ::Hash[Symbol, top]?, override_tax_type: WhopSDK::Models::tax_type?, payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration?, plan_type: WhopSDK::Models::plan_type?, @@ -59,6 +60,8 @@ module WhopSDK attr_accessor legacy_payment_method_controls: bool? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor override_tax_type: WhopSDK::Models::tax_type? attr_accessor payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration? @@ -95,6 +98,7 @@ module WhopSDK ?initial_price: Float?, ?internal_notes: String?, ?legacy_payment_method_controls: bool?, + ?metadata: ::Hash[Symbol, top]?, ?override_tax_type: WhopSDK::Models::tax_type?, ?payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration?, ?plan_type: WhopSDK::Models::plan_type?, @@ -123,6 +127,7 @@ module WhopSDK initial_price: Float?, internal_notes: String?, legacy_payment_method_controls: bool?, + metadata: ::Hash[Symbol, top]?, override_tax_type: WhopSDK::Models::tax_type?, payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration?, plan_type: WhopSDK::Models::plan_type?, diff --git a/sig/whop_sdk/models/plan_list_response.rbs b/sig/whop_sdk/models/plan_list_response.rbs index fed2ca01..910009df 100644 --- a/sig/whop_sdk/models/plan_list_response.rbs +++ b/sig/whop_sdk/models/plan_list_response.rbs @@ -14,6 +14,7 @@ module WhopSDK internal_notes: String?, invoice: WhopSDK::Models::PlanListResponse::Invoice?, member_count: Integer?, + metadata: ::Hash[Symbol, top]?, payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration?, plan_type: WhopSDK::Models::plan_type, product: WhopSDK::Models::PlanListResponse::Product?, @@ -54,6 +55,8 @@ module WhopSDK attr_accessor member_count: Integer? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration? attr_accessor plan_type: WhopSDK::Models::plan_type @@ -93,6 +96,7 @@ module WhopSDK internal_notes: String?, invoice: WhopSDK::Models::PlanListResponse::Invoice?, member_count: Integer?, + metadata: ::Hash[Symbol, top]?, payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration?, plan_type: WhopSDK::Models::plan_type, product: WhopSDK::Models::PlanListResponse::Product?, @@ -121,6 +125,7 @@ module WhopSDK internal_notes: String?, invoice: WhopSDK::Models::PlanListResponse::Invoice?, member_count: Integer?, + metadata: ::Hash[Symbol, top]?, payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration?, plan_type: WhopSDK::Models::plan_type, product: WhopSDK::Models::PlanListResponse::Product?, diff --git a/sig/whop_sdk/models/plan_update_params.rbs b/sig/whop_sdk/models/plan_update_params.rbs index a8e1a776..33fdbd62 100644 --- a/sig/whop_sdk/models/plan_update_params.rbs +++ b/sig/whop_sdk/models/plan_update_params.rbs @@ -14,6 +14,7 @@ module WhopSDK initial_price: Float?, internal_notes: String?, legacy_payment_method_controls: bool?, + metadata: ::Hash[Symbol, top]?, offer_cancel_discount: bool?, override_tax_type: WhopSDK::Models::tax_type?, payment_method_configuration: WhopSDK::PlanUpdateParams::PaymentMethodConfiguration?, @@ -56,6 +57,8 @@ module WhopSDK attr_accessor legacy_payment_method_controls: bool? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor offer_cancel_discount: bool? attr_accessor override_tax_type: WhopSDK::Models::tax_type? @@ -91,6 +94,7 @@ module WhopSDK ?initial_price: Float?, ?internal_notes: String?, ?legacy_payment_method_controls: bool?, + ?metadata: ::Hash[Symbol, top]?, ?offer_cancel_discount: bool?, ?override_tax_type: WhopSDK::Models::tax_type?, ?payment_method_configuration: WhopSDK::PlanUpdateParams::PaymentMethodConfiguration?, @@ -118,6 +122,7 @@ module WhopSDK initial_price: Float?, internal_notes: String?, legacy_payment_method_controls: bool?, + metadata: ::Hash[Symbol, top]?, offer_cancel_discount: bool?, override_tax_type: WhopSDK::Models::tax_type?, payment_method_configuration: WhopSDK::PlanUpdateParams::PaymentMethodConfiguration?, diff --git a/sig/whop_sdk/models/product.rbs b/sig/whop_sdk/models/product.rbs index b5e792c0..2adeb5bc 100644 --- a/sig/whop_sdk/models/product.rbs +++ b/sig/whop_sdk/models/product.rbs @@ -17,6 +17,7 @@ module WhopSDK member_affiliate_percentage: Float?, member_affiliate_status: WhopSDK::Models::global_affiliate_status, member_count: Integer, + metadata: ::Hash[Symbol, top]?, owner_user: WhopSDK::Product::OwnerUser, product_tax_code: WhopSDK::Product::ProductTaxCode?, published_reviews_count: Integer, @@ -58,6 +59,8 @@ module WhopSDK attr_accessor member_count: Integer + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor owner_user: WhopSDK::Product::OwnerUser attr_accessor product_tax_code: WhopSDK::Product::ProductTaxCode? @@ -90,6 +93,7 @@ module WhopSDK member_affiliate_percentage: Float?, member_affiliate_status: WhopSDK::Models::global_affiliate_status, member_count: Integer, + metadata: ::Hash[Symbol, top]?, owner_user: WhopSDK::Product::OwnerUser, product_tax_code: WhopSDK::Product::ProductTaxCode?, published_reviews_count: Integer, @@ -116,6 +120,7 @@ module WhopSDK member_affiliate_percentage: Float?, member_affiliate_status: WhopSDK::Models::global_affiliate_status, member_count: Integer, + metadata: ::Hash[Symbol, top]?, owner_user: WhopSDK::Product::OwnerUser, product_tax_code: WhopSDK::Product::ProductTaxCode?, published_reviews_count: Integer, diff --git a/sig/whop_sdk/models/product_create_params.rbs b/sig/whop_sdk/models/product_create_params.rbs index 0cedb54c..6fea9ac4 100644 --- a/sig/whop_sdk/models/product_create_params.rbs +++ b/sig/whop_sdk/models/product_create_params.rbs @@ -15,6 +15,7 @@ module WhopSDK headline: String?, member_affiliate_percentage: Float?, member_affiliate_status: WhopSDK::Models::global_affiliate_status?, + metadata: ::Hash[Symbol, top]?, plan_options: WhopSDK::ProductCreateParams::PlanOptions?, product_tax_code_id: String?, redirect_purchase_url: String?, @@ -54,6 +55,8 @@ module WhopSDK attr_accessor member_affiliate_status: WhopSDK::Models::global_affiliate_status? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor plan_options: WhopSDK::ProductCreateParams::PlanOptions? attr_accessor product_tax_code_id: String? @@ -80,6 +83,7 @@ module WhopSDK ?headline: String?, ?member_affiliate_percentage: Float?, ?member_affiliate_status: WhopSDK::Models::global_affiliate_status?, + ?metadata: ::Hash[Symbol, top]?, ?plan_options: WhopSDK::ProductCreateParams::PlanOptions?, ?product_tax_code_id: String?, ?redirect_purchase_url: String?, @@ -103,6 +107,7 @@ module WhopSDK headline: String?, member_affiliate_percentage: Float?, member_affiliate_status: WhopSDK::Models::global_affiliate_status?, + metadata: ::Hash[Symbol, top]?, plan_options: WhopSDK::ProductCreateParams::PlanOptions?, product_tax_code_id: String?, redirect_purchase_url: String?, diff --git a/sig/whop_sdk/models/product_list_item.rbs b/sig/whop_sdk/models/product_list_item.rbs index 145aaf66..bba61a27 100644 --- a/sig/whop_sdk/models/product_list_item.rbs +++ b/sig/whop_sdk/models/product_list_item.rbs @@ -7,6 +7,7 @@ module WhopSDK external_identifier: String?, headline: String?, member_count: Integer, + metadata: ::Hash[Symbol, top]?, published_reviews_count: Integer, route: String, title: String, @@ -26,6 +27,8 @@ module WhopSDK attr_accessor member_count: Integer + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor published_reviews_count: Integer attr_accessor route: String @@ -44,6 +47,7 @@ module WhopSDK external_identifier: String?, headline: String?, member_count: Integer, + metadata: ::Hash[Symbol, top]?, published_reviews_count: Integer, route: String, title: String, @@ -58,6 +62,7 @@ module WhopSDK external_identifier: String?, headline: String?, member_count: Integer, + metadata: ::Hash[Symbol, top]?, published_reviews_count: Integer, route: String, title: String, diff --git a/sig/whop_sdk/models/product_update_params.rbs b/sig/whop_sdk/models/product_update_params.rbs index beb94e1b..abc40201 100644 --- a/sig/whop_sdk/models/product_update_params.rbs +++ b/sig/whop_sdk/models/product_update_params.rbs @@ -14,6 +14,7 @@ module WhopSDK headline: String?, member_affiliate_percentage: Float?, member_affiliate_status: WhopSDK::Models::global_affiliate_status?, + metadata: ::Hash[Symbol, top]?, product_tax_code_id: String?, redirect_purchase_url: String?, route: String?, @@ -52,6 +53,8 @@ module WhopSDK attr_accessor member_affiliate_status: WhopSDK::Models::global_affiliate_status? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor product_tax_code_id: String? attr_accessor redirect_purchase_url: String? @@ -79,6 +82,7 @@ module WhopSDK ?headline: String?, ?member_affiliate_percentage: Float?, ?member_affiliate_status: WhopSDK::Models::global_affiliate_status?, + ?metadata: ::Hash[Symbol, top]?, ?product_tax_code_id: String?, ?redirect_purchase_url: String?, ?route: String?, @@ -102,6 +106,7 @@ module WhopSDK headline: String?, member_affiliate_percentage: Float?, member_affiliate_status: WhopSDK::Models::global_affiliate_status?, + metadata: ::Hash[Symbol, top]?, product_tax_code_id: String?, redirect_purchase_url: String?, route: String?, diff --git a/sig/whop_sdk/models/refund_created_webhook_event.rbs b/sig/whop_sdk/models/refund_created_webhook_event.rbs index 382baa79..37570331 100644 --- a/sig/whop_sdk/models/refund_created_webhook_event.rbs +++ b/sig/whop_sdk/models/refund_created_webhook_event.rbs @@ -114,12 +114,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan?, + product: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -140,7 +143,7 @@ module WhopSDK attr_accessor created_at: Time - attr_accessor currency: WhopSDK::Models::currency? + attr_accessor currency: WhopSDK::Models::currency attr_accessor dispute_alerted_at: Time? @@ -148,10 +151,16 @@ module WhopSDK attr_accessor membership: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Membership? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor paid_at: Time? attr_accessor payment_method_type: WhopSDK::Models::payment_method_types? + attr_accessor plan: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan? + + attr_accessor product: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product? + attr_accessor subtotal: Float? attr_accessor tax_amount: Float? @@ -172,12 +181,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, card_last4: String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan?, + product: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -193,12 +205,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Plan?, + product: WhopSDK::RefundCreatedWebhookEvent::Data::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -239,6 +254,30 @@ module WhopSDK } end + type plan = { id: String, metadata: ::Hash[Symbol, top]? } + + class Plan < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor metadata: ::Hash[Symbol, top]? + + def initialize: (id: String, metadata: ::Hash[Symbol, top]?) -> void + + def to_hash: -> { id: String, metadata: ::Hash[Symbol, top]? } + end + + type product = { id: String, metadata: ::Hash[Symbol, top]? } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor metadata: ::Hash[Symbol, top]? + + def initialize: (id: String, metadata: ::Hash[Symbol, top]?) -> void + + def to_hash: -> { id: String, metadata: ::Hash[Symbol, top]? } + end + type user = { id: String, email: String?, name: String?, username: String } diff --git a/sig/whop_sdk/models/refund_retrieve_response.rbs b/sig/whop_sdk/models/refund_retrieve_response.rbs index 1ad97cda..6e8651be 100644 --- a/sig/whop_sdk/models/refund_retrieve_response.rbs +++ b/sig/whop_sdk/models/refund_retrieve_response.rbs @@ -73,12 +73,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Models::RefundRetrieveResponse::Payment::Member?, membership: WhopSDK::Models::RefundRetrieveResponse::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::Models::RefundRetrieveResponse::Payment::Plan?, + product: WhopSDK::Models::RefundRetrieveResponse::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -99,7 +102,7 @@ module WhopSDK attr_accessor created_at: Time - attr_accessor currency: WhopSDK::Models::currency? + attr_accessor currency: WhopSDK::Models::currency attr_accessor dispute_alerted_at: Time? @@ -107,10 +110,16 @@ module WhopSDK attr_accessor membership: WhopSDK::Models::RefundRetrieveResponse::Payment::Membership? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor paid_at: Time? attr_accessor payment_method_type: WhopSDK::Models::payment_method_types? + attr_accessor plan: WhopSDK::Models::RefundRetrieveResponse::Payment::Plan? + + attr_accessor product: WhopSDK::Models::RefundRetrieveResponse::Payment::Product? + attr_accessor subtotal: Float? attr_accessor tax_amount: Float? @@ -131,12 +140,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, card_last4: String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Models::RefundRetrieveResponse::Payment::Member?, membership: WhopSDK::Models::RefundRetrieveResponse::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::Models::RefundRetrieveResponse::Payment::Plan?, + product: WhopSDK::Models::RefundRetrieveResponse::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -152,12 +164,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::Models::RefundRetrieveResponse::Payment::Member?, membership: WhopSDK::Models::RefundRetrieveResponse::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::Models::RefundRetrieveResponse::Payment::Plan?, + product: WhopSDK::Models::RefundRetrieveResponse::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -198,6 +213,30 @@ module WhopSDK } end + type plan = { id: String, metadata: ::Hash[Symbol, top]? } + + class Plan < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor metadata: ::Hash[Symbol, top]? + + def initialize: (id: String, metadata: ::Hash[Symbol, top]?) -> void + + def to_hash: -> { id: String, metadata: ::Hash[Symbol, top]? } + end + + type product = { id: String, metadata: ::Hash[Symbol, top]? } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor metadata: ::Hash[Symbol, top]? + + def initialize: (id: String, metadata: ::Hash[Symbol, top]?) -> void + + def to_hash: -> { id: String, metadata: ::Hash[Symbol, top]? } + end + type user = { id: String, email: String?, name: String?, username: String } diff --git a/sig/whop_sdk/models/refund_updated_webhook_event.rbs b/sig/whop_sdk/models/refund_updated_webhook_event.rbs index 5159eb79..c304f6a2 100644 --- a/sig/whop_sdk/models/refund_updated_webhook_event.rbs +++ b/sig/whop_sdk/models/refund_updated_webhook_event.rbs @@ -114,12 +114,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan?, + product: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -140,7 +143,7 @@ module WhopSDK attr_accessor created_at: Time - attr_accessor currency: WhopSDK::Models::currency? + attr_accessor currency: WhopSDK::Models::currency attr_accessor dispute_alerted_at: Time? @@ -148,10 +151,16 @@ module WhopSDK attr_accessor membership: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Membership? + attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor paid_at: Time? attr_accessor payment_method_type: WhopSDK::Models::payment_method_types? + attr_accessor plan: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan? + + attr_accessor product: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product? + attr_accessor subtotal: Float? attr_accessor tax_amount: Float? @@ -172,12 +181,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, card_last4: String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan?, + product: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -193,12 +205,15 @@ module WhopSDK card_brand: WhopSDK::Models::card_brands?, :card_last4 => String?, created_at: Time, - currency: WhopSDK::Models::currency?, + currency: WhopSDK::Models::currency, dispute_alerted_at: Time?, member: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Member?, membership: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Membership?, + metadata: ::Hash[Symbol, top]?, paid_at: Time?, payment_method_type: WhopSDK::Models::payment_method_types?, + plan: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Plan?, + product: WhopSDK::RefundUpdatedWebhookEvent::Data::Payment::Product?, subtotal: Float?, tax_amount: Float?, tax_behavior: WhopSDK::Models::receipt_tax_behavior?, @@ -239,6 +254,30 @@ module WhopSDK } end + type plan = { id: String, metadata: ::Hash[Symbol, top]? } + + class Plan < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor metadata: ::Hash[Symbol, top]? + + def initialize: (id: String, metadata: ::Hash[Symbol, top]?) -> void + + def to_hash: -> { id: String, metadata: ::Hash[Symbol, top]? } + end + + type product = { id: String, metadata: ::Hash[Symbol, top]? } + + class Product < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor metadata: ::Hash[Symbol, top]? + + def initialize: (id: String, metadata: ::Hash[Symbol, top]?) -> void + + def to_hash: -> { id: String, metadata: ::Hash[Symbol, top]? } + end + type user = { id: String, email: String?, name: String?, username: String } diff --git a/sig/whop_sdk/models/resolution_center_case_platform_response.rbs b/sig/whop_sdk/models/resolution_center_case_platform_response.rbs index 05258ec4..0de6a45b 100644 --- a/sig/whop_sdk/models/resolution_center_case_platform_response.rbs +++ b/sig/whop_sdk/models/resolution_center_case_platform_response.rbs @@ -4,7 +4,6 @@ module WhopSDK :request_buyer_info | :request_merchant_info | :merchant_wins - | :platform_refund | :merchant_refund module ResolutionCenterCasePlatformResponse @@ -13,7 +12,6 @@ module WhopSDK REQUEST_BUYER_INFO: :request_buyer_info REQUEST_MERCHANT_INFO: :request_merchant_info MERCHANT_WINS: :merchant_wins - PLATFORM_REFUND: :platform_refund MERCHANT_REFUND: :merchant_refund def self?.values: -> ::Array[WhopSDK::Models::resolution_center_case_platform_response] diff --git a/sig/whop_sdk/models/result_label_keys.rbs b/sig/whop_sdk/models/result_label_keys.rbs new file mode 100644 index 00000000..2e8f00e3 --- /dev/null +++ b/sig/whop_sdk/models/result_label_keys.rbs @@ -0,0 +1,60 @@ +module WhopSDK + module Models + type result_label_keys = + :app_installs + | :messaging_conversations_started + | :post_engagement + | :event_responses + | :impressions + | :website_purchases + | :landing_page_views + | :leads + | :link_clicks + | :quality_calls + | :appointments_booked + | :messaging_purchases + | :page_likes + | :instagram_profile_visits + | :reach + | :reminders_set + | :new_subscribers + | :video_views + | :registrations + | :content_views + | :searches + | :website_schedules + | :website_submit_applications + | :custom + + module ResultLabelKeys + extend WhopSDK::Internal::Type::Enum + + APP_INSTALLS: :app_installs + MESSAGING_CONVERSATIONS_STARTED: :messaging_conversations_started + POST_ENGAGEMENT: :post_engagement + EVENT_RESPONSES: :event_responses + IMPRESSIONS: :impressions + WEBSITE_PURCHASES: :website_purchases + LANDING_PAGE_VIEWS: :landing_page_views + LEADS: :leads + LINK_CLICKS: :link_clicks + QUALITY_CALLS: :quality_calls + APPOINTMENTS_BOOKED: :appointments_booked + MESSAGING_PURCHASES: :messaging_purchases + PAGE_LIKES: :page_likes + INSTAGRAM_PROFILE_VISITS: :instagram_profile_visits + REACH: :reach + REMINDERS_SET: :reminders_set + NEW_SUBSCRIBERS: :new_subscribers + VIDEO_VIEWS: :video_views + REGISTRATIONS: :registrations + CONTENT_VIEWS: :content_views + SEARCHES: :searches + WEBSITE_SCHEDULES: :website_schedules + WEBSITE_SUBMIT_APPLICATIONS: :website_submit_applications + CUSTOM: :custom + + def self?.values: -> ::Array[WhopSDK::Models::result_label_keys] + end + end +end diff --git a/sig/whop_sdk/resources/ad_campaigns.rbs b/sig/whop_sdk/resources/ad_campaigns.rbs index 52dc8f55..37c5e8f3 100644 --- a/sig/whop_sdk/resources/ad_campaigns.rbs +++ b/sig/whop_sdk/resources/ad_campaigns.rbs @@ -4,13 +4,13 @@ module WhopSDK def retrieve: ( String id, ?request_options: WhopSDK::request_opts - ) -> WhopSDK::Models::AdCampaignRetrieveResponse + ) -> WhopSDK::AdCampaign def update: ( String id, ?budget: Float?, ?request_options: WhopSDK::request_opts - ) -> WhopSDK::Models::AdCampaignUpdateResponse + ) -> WhopSDK::AdCampaign def list: ( company_id: String, @@ -21,19 +21,19 @@ module WhopSDK ?first: Integer?, ?last: Integer?, ?query: String?, - ?status: WhopSDK::Models::AdCampaignListParams::status?, + ?status: WhopSDK::Models::ad_campaign_status?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::AdCampaignListResponse] def pause: ( String id, ?request_options: WhopSDK::request_opts - ) -> WhopSDK::Models::AdCampaignPauseResponse + ) -> WhopSDK::AdCampaign def unpause: ( String id, ?request_options: WhopSDK::request_opts - ) -> WhopSDK::Models::AdCampaignUnpauseResponse + ) -> WhopSDK::AdCampaign def initialize: (client: WhopSDK::Client) -> void end diff --git a/sig/whop_sdk/resources/ad_groups.rbs b/sig/whop_sdk/resources/ad_groups.rbs index 96a63efd..369702be 100644 --- a/sig/whop_sdk/resources/ad_groups.rbs +++ b/sig/whop_sdk/resources/ad_groups.rbs @@ -4,19 +4,19 @@ module WhopSDK def retrieve: ( String id, ?request_options: WhopSDK::request_opts - ) -> WhopSDK::Models::AdGroupRetrieveResponse + ) -> WhopSDK::AdGroup def update: ( String id, ?budget: Float?, - ?budget_type: WhopSDK::Models::AdGroupUpdateParams::budget_type?, + ?budget_type: WhopSDK::Models::ad_budget_type?, ?config: WhopSDK::AdGroupUpdateParams::Config?, ?daily_budget: Float?, ?name: String?, ?platform_config: WhopSDK::AdGroupUpdateParams::PlatformConfig?, - ?status: WhopSDK::Models::AdGroupUpdateParams::status?, + ?status: WhopSDK::Models::ad_group_status?, ?request_options: WhopSDK::request_opts - ) -> WhopSDK::Models::AdGroupUpdateResponse + ) -> WhopSDK::AdGroup def list: ( ?after: String?, @@ -28,12 +28,22 @@ module WhopSDK ?first: Integer?, ?last: Integer?, ?query: String?, - ?status: WhopSDK::Models::AdGroupListParams::status?, + ?status: WhopSDK::Models::ad_group_status?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::AdGroupListResponse] def delete: (String id, ?request_options: WhopSDK::request_opts) -> bool + def pause: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::AdGroup + + def unpause: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::AdGroup + def initialize: (client: WhopSDK::Client) -> void end end diff --git a/sig/whop_sdk/resources/ad_reports.rbs b/sig/whop_sdk/resources/ad_reports.rbs index d5c78744..42c0c885 100644 --- a/sig/whop_sdk/resources/ad_reports.rbs +++ b/sig/whop_sdk/resources/ad_reports.rbs @@ -7,8 +7,10 @@ module WhopSDK ?ad_campaign_id: String?, ?ad_group_id: String?, ?ad_id: String?, + ?breakdown: WhopSDK::Models::AdReportRetrieveParams::breakdown?, + ?company_id: String?, ?currency: String?, - ?include_daily: bool?, + ?granularity: WhopSDK::Models::granularities?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Models::AdReportRetrieveResponse diff --git a/sig/whop_sdk/resources/ads.rbs b/sig/whop_sdk/resources/ads.rbs index 0dbc337a..397ee7ae 100644 --- a/sig/whop_sdk/resources/ads.rbs +++ b/sig/whop_sdk/resources/ads.rbs @@ -4,7 +4,7 @@ module WhopSDK def retrieve: ( String id, ?request_options: WhopSDK::request_opts - ) -> WhopSDK::Models::AdRetrieveResponse + ) -> WhopSDK::Ad def list: ( ?ad_group_id: String?, @@ -16,10 +16,20 @@ module WhopSDK ?created_before: Time?, ?first: Integer?, ?last: Integer?, - ?status: WhopSDK::Models::AdListParams::status?, + ?status: WhopSDK::Models::external_ad_status?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::AdListResponse] + def pause: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Ad + + def unpause: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Ad + def initialize: (client: WhopSDK::Client) -> void end end diff --git a/sig/whop_sdk/resources/files.rbs b/sig/whop_sdk/resources/files.rbs index c5daef55..54d1bab0 100644 --- a/sig/whop_sdk/resources/files.rbs +++ b/sig/whop_sdk/resources/files.rbs @@ -3,7 +3,7 @@ module WhopSDK class Files def create: ( filename: String, - ?visibility: WhopSDK::Models::FileCreateParams::visibility?, + ?visibility: WhopSDK::Models::file_visibility?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Models::FileCreateResponse diff --git a/sig/whop_sdk/resources/plans.rbs b/sig/whop_sdk/resources/plans.rbs index f5019699..da56297f 100644 --- a/sig/whop_sdk/resources/plans.rbs +++ b/sig/whop_sdk/resources/plans.rbs @@ -15,6 +15,7 @@ module WhopSDK ?initial_price: Float?, ?internal_notes: String?, ?legacy_payment_method_controls: bool?, + ?metadata: ::Hash[Symbol, top]?, ?override_tax_type: WhopSDK::Models::tax_type?, ?payment_method_configuration: WhopSDK::PlanCreateParams::PaymentMethodConfiguration?, ?plan_type: WhopSDK::Models::plan_type?, @@ -47,6 +48,7 @@ module WhopSDK ?initial_price: Float?, ?internal_notes: String?, ?legacy_payment_method_controls: bool?, + ?metadata: ::Hash[Symbol, top]?, ?offer_cancel_discount: bool?, ?override_tax_type: WhopSDK::Models::tax_type?, ?payment_method_configuration: WhopSDK::PlanUpdateParams::PaymentMethodConfiguration?, diff --git a/sig/whop_sdk/resources/products.rbs b/sig/whop_sdk/resources/products.rbs index dc045969..cac4e0be 100644 --- a/sig/whop_sdk/resources/products.rbs +++ b/sig/whop_sdk/resources/products.rbs @@ -15,6 +15,7 @@ module WhopSDK ?headline: String?, ?member_affiliate_percentage: Float?, ?member_affiliate_status: WhopSDK::Models::global_affiliate_status?, + ?metadata: ::Hash[Symbol, top]?, ?plan_options: WhopSDK::ProductCreateParams::PlanOptions?, ?product_tax_code_id: String?, ?redirect_purchase_url: String?, @@ -42,6 +43,7 @@ module WhopSDK ?headline: String?, ?member_affiliate_percentage: Float?, ?member_affiliate_status: WhopSDK::Models::global_affiliate_status?, + ?metadata: ::Hash[Symbol, top]?, ?product_tax_code_id: String?, ?redirect_purchase_url: String?, ?route: String?, diff --git a/test/whop_sdk/client_test.rb b/test/whop_sdk/client_test.rb index d6721978..71e01a02 100644 --- a/test/whop_sdk/client_test.rb +++ b/test/whop_sdk/client_test.rb @@ -200,8 +200,8 @@ def test_client_redirect_307 assert_equal(recorded.method, _1.method) assert_equal(recorded.body, _1.body) assert_equal( - recorded.headers.transform_keys(&:downcase).fetch("content-type"), - _1.headers.transform_keys(&:downcase).fetch("content-type") + recorded.headers.transform_keys(&:downcase)["content-type"], + _1.headers.transform_keys(&:downcase)["content-type"] ) end end @@ -288,8 +288,9 @@ def test_default_headers whop.payments.list assert_requested(:any, /./) do |req| - headers = req.headers.transform_keys(&:downcase).fetch_values("accept", "content-type") - headers.each { refute_empty(_1) } + headers = req.headers.transform_keys(&:downcase) + expected = req.body.nil? ? ["accept"] : %w[accept content-type] + headers.fetch_values(*expected).each { refute_empty(_1) } end end end diff --git a/test/whop_sdk/resources/ad_campaigns_test.rb b/test/whop_sdk/resources/ad_campaigns_test.rb index 1adb6ae6..cd36bbf9 100644 --- a/test/whop_sdk/resources/ad_campaigns_test.rb +++ b/test/whop_sdk/resources/ad_campaigns_test.rb @@ -9,19 +9,19 @@ def test_retrieve response = @whop.ad_campaigns.retrieve("adcamp_xxxxxxxxxxx") assert_pattern do - response => WhopSDK::Models::AdCampaignRetrieveResponse + response => WhopSDK::AdCampaign end assert_pattern do response => { id: String, budget: Float | nil, - budget_type: WhopSDK::Models::AdCampaignRetrieveResponse::BudgetType | nil, + budget_type: WhopSDK::AdBudgetType | nil, created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignRetrieveResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignRetrieveResponse::MetaConfig | nil, - platform: WhopSDK::Models::AdCampaignRetrieveResponse::Platform, - status: WhopSDK::Models::AdCampaignRetrieveResponse::Status, + created_by_user: WhopSDK::AdCampaign::CreatedByUser, + meta_config: WhopSDK::AdCampaign::MetaConfig | nil, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdCampaignStatus, title: String, total_spend: Float, updated_at: Time @@ -35,19 +35,19 @@ def test_update response = @whop.ad_campaigns.update("adcamp_xxxxxxxxxxx") assert_pattern do - response => WhopSDK::Models::AdCampaignUpdateResponse + response => WhopSDK::AdCampaign end assert_pattern do response => { id: String, budget: Float | nil, - budget_type: WhopSDK::Models::AdCampaignUpdateResponse::BudgetType | nil, + budget_type: WhopSDK::AdBudgetType | nil, created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignUpdateResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignUpdateResponse::MetaConfig | nil, - platform: WhopSDK::Models::AdCampaignUpdateResponse::Platform, - status: WhopSDK::Models::AdCampaignUpdateResponse::Status, + created_by_user: WhopSDK::AdCampaign::CreatedByUser, + meta_config: WhopSDK::AdCampaign::MetaConfig | nil, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdCampaignStatus, title: String, total_spend: Float, updated_at: Time @@ -75,10 +75,10 @@ def test_list_required_params row => { id: String, budget: Float | nil, - budget_type: WhopSDK::Models::AdCampaignListResponse::BudgetType | nil, + budget_type: WhopSDK::AdBudgetType | nil, created_at: Time, - platform: WhopSDK::Models::AdCampaignListResponse::Platform, - status: WhopSDK::Models::AdCampaignListResponse::Status, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdCampaignStatus, title: String, total_spend: Float, updated_at: Time @@ -92,19 +92,19 @@ def test_pause response = @whop.ad_campaigns.pause("adcamp_xxxxxxxxxxx") assert_pattern do - response => WhopSDK::Models::AdCampaignPauseResponse + response => WhopSDK::AdCampaign end assert_pattern do response => { id: String, budget: Float | nil, - budget_type: WhopSDK::Models::AdCampaignPauseResponse::BudgetType | nil, + budget_type: WhopSDK::AdBudgetType | nil, created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignPauseResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignPauseResponse::MetaConfig | nil, - platform: WhopSDK::Models::AdCampaignPauseResponse::Platform, - status: WhopSDK::Models::AdCampaignPauseResponse::Status, + created_by_user: WhopSDK::AdCampaign::CreatedByUser, + meta_config: WhopSDK::AdCampaign::MetaConfig | nil, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdCampaignStatus, title: String, total_spend: Float, updated_at: Time @@ -118,19 +118,19 @@ def test_unpause response = @whop.ad_campaigns.unpause("adcamp_xxxxxxxxxxx") assert_pattern do - response => WhopSDK::Models::AdCampaignUnpauseResponse + response => WhopSDK::AdCampaign end assert_pattern do response => { id: String, budget: Float | nil, - budget_type: WhopSDK::Models::AdCampaignUnpauseResponse::BudgetType | nil, + budget_type: WhopSDK::AdBudgetType | nil, created_at: Time, - created_by_user: WhopSDK::Models::AdCampaignUnpauseResponse::CreatedByUser, - meta_config: WhopSDK::Models::AdCampaignUnpauseResponse::MetaConfig | nil, - platform: WhopSDK::Models::AdCampaignUnpauseResponse::Platform, - status: WhopSDK::Models::AdCampaignUnpauseResponse::Status, + created_by_user: WhopSDK::AdCampaign::CreatedByUser, + meta_config: WhopSDK::AdCampaign::MetaConfig | nil, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdCampaignStatus, title: String, total_spend: Float, updated_at: Time diff --git a/test/whop_sdk/resources/ad_groups_test.rb b/test/whop_sdk/resources/ad_groups_test.rb index d73d1d94..8a8838d3 100644 --- a/test/whop_sdk/resources/ad_groups_test.rb +++ b/test/whop_sdk/resources/ad_groups_test.rb @@ -9,18 +9,18 @@ def test_retrieve response = @whop.ad_groups.retrieve("adgrp_xxxxxxxxxxxx") assert_pattern do - response => WhopSDK::Models::AdGroupRetrieveResponse + response => WhopSDK::AdGroup end assert_pattern do response => { id: String, - ad_campaign: WhopSDK::Models::AdGroupRetrieveResponse::AdCampaign, + ad_campaign: WhopSDK::AdGroup::AdCampaign, budget: Float | nil, - budget_type: WhopSDK::Models::AdGroupRetrieveResponse::BudgetType | nil, + budget_type: WhopSDK::AdBudgetType | nil, created_at: Time, - platform: WhopSDK::Models::AdGroupRetrieveResponse::Platform, - status: WhopSDK::Models::AdGroupRetrieveResponse::Status, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdGroupStatus, title: String | nil, updated_at: Time } @@ -33,18 +33,18 @@ def test_update response = @whop.ad_groups.update("adgrp_xxxxxxxxxxxx") assert_pattern do - response => WhopSDK::Models::AdGroupUpdateResponse + response => WhopSDK::AdGroup end assert_pattern do response => { id: String, - ad_campaign: WhopSDK::Models::AdGroupUpdateResponse::AdCampaign, + ad_campaign: WhopSDK::AdGroup::AdCampaign, budget: Float | nil, - budget_type: WhopSDK::Models::AdGroupUpdateResponse::BudgetType | nil, + budget_type: WhopSDK::AdBudgetType | nil, created_at: Time, - platform: WhopSDK::Models::AdGroupUpdateResponse::Platform, - status: WhopSDK::Models::AdGroupUpdateResponse::Status, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdGroupStatus, title: String | nil, updated_at: Time } @@ -70,11 +70,12 @@ def test_list assert_pattern do row => { id: String, + ad_campaign: WhopSDK::Models::AdGroupListResponse::AdCampaign, budget: Float | nil, - budget_type: WhopSDK::Models::AdGroupListResponse::BudgetType | nil, + budget_type: WhopSDK::AdBudgetType | nil, created_at: Time, - platform: WhopSDK::Models::AdGroupListResponse::Platform, - status: WhopSDK::Models::AdGroupListResponse::Status, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdGroupStatus, title: String | nil, updated_at: Time } @@ -90,4 +91,52 @@ def test_delete response => WhopSDK::Internal::Type::Boolean end end + + def test_pause + skip("Mock server tests are disabled") + + response = @whop.ad_groups.pause("adgrp_xxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::AdGroup + end + + assert_pattern do + response => { + id: String, + ad_campaign: WhopSDK::AdGroup::AdCampaign, + budget: Float | nil, + budget_type: WhopSDK::AdBudgetType | nil, + created_at: Time, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdGroupStatus, + title: String | nil, + updated_at: Time + } + end + end + + def test_unpause + skip("Mock server tests are disabled") + + response = @whop.ad_groups.unpause("adgrp_xxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::AdGroup + end + + assert_pattern do + response => { + id: String, + ad_campaign: WhopSDK::AdGroup::AdCampaign, + budget: Float | nil, + budget_type: WhopSDK::AdBudgetType | nil, + created_at: Time, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::AdGroupStatus, + title: String | nil, + updated_at: Time + } + end + end end diff --git a/test/whop_sdk/resources/ad_reports_test.rb b/test/whop_sdk/resources/ad_reports_test.rb index 8c910d17..7e1f3e48 100644 --- a/test/whop_sdk/resources/ad_reports_test.rb +++ b/test/whop_sdk/resources/ad_reports_test.rb @@ -14,7 +14,8 @@ def test_retrieve_required_params assert_pattern do response => { - daily: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Daily]) | nil, + breakdown: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Breakdown]) | nil, + granularity: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::AdReportRetrieveResponse::Granularity]) | nil, summary: WhopSDK::Models::AdReportRetrieveResponse::Summary } end diff --git a/test/whop_sdk/resources/ads_test.rb b/test/whop_sdk/resources/ads_test.rb index 9573703f..55c04959 100644 --- a/test/whop_sdk/resources/ads_test.rb +++ b/test/whop_sdk/resources/ads_test.rb @@ -9,17 +9,17 @@ def test_retrieve response = @whop.ads.retrieve("ad_xxxxxxxxxxxxxxx") assert_pattern do - response => WhopSDK::Models::AdRetrieveResponse + response => WhopSDK::Ad end assert_pattern do response => { id: String, - ad_campaign: WhopSDK::Models::AdRetrieveResponse::AdCampaign, - ad_group: WhopSDK::Models::AdRetrieveResponse::AdGroup, + ad_campaign: WhopSDK::Ad::AdCampaign, + ad_group: WhopSDK::Ad::AdGroup, created_at: Time, - platform: WhopSDK::Models::AdRetrieveResponse::Platform, - status: WhopSDK::Models::AdRetrieveResponse::Status, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::ExternalAdStatus, title: String | nil, updated_at: Time } @@ -45,9 +45,57 @@ def test_list assert_pattern do row => { id: String, + ad_campaign: WhopSDK::Models::AdListResponse::AdCampaign, + ad_group: WhopSDK::Models::AdListResponse::AdGroup, created_at: Time, - platform: WhopSDK::Models::AdListResponse::Platform, - status: WhopSDK::Models::AdListResponse::Status, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::ExternalAdStatus, + title: String | nil, + updated_at: Time + } + end + end + + def test_pause + skip("Mock server tests are disabled") + + response = @whop.ads.pause("ad_xxxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Ad + end + + assert_pattern do + response => { + id: String, + ad_campaign: WhopSDK::Ad::AdCampaign, + ad_group: WhopSDK::Ad::AdGroup, + created_at: Time, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::ExternalAdStatus, + title: String | nil, + updated_at: Time + } + end + end + + def test_unpause + skip("Mock server tests are disabled") + + response = @whop.ads.unpause("ad_xxxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Ad + end + + assert_pattern do + response => { + id: String, + ad_campaign: WhopSDK::Ad::AdCampaign, + ad_group: WhopSDK::Ad::AdGroup, + created_at: Time, + platform: WhopSDK::AdCampaignPlatform, + status: WhopSDK::ExternalAdStatus, title: String | nil, updated_at: Time } diff --git a/test/whop_sdk/resources/files_test.rb b/test/whop_sdk/resources/files_test.rb index e75839ae..58c6f0be 100644 --- a/test/whop_sdk/resources/files_test.rb +++ b/test/whop_sdk/resources/files_test.rb @@ -22,7 +22,7 @@ def test_create_required_params upload_status: WhopSDK::UploadStatus, upload_url: String | nil, url: String | nil, - visibility: WhopSDK::Models::FileCreateResponse::Visibility + visibility: WhopSDK::FileVisibility } end end @@ -44,7 +44,7 @@ def test_retrieve size: String | nil, upload_status: WhopSDK::UploadStatus, url: String | nil, - visibility: WhopSDK::Models::FileRetrieveResponse::Visibility + visibility: WhopSDK::FileVisibility } end end diff --git a/test/whop_sdk/resources/payments_test.rb b/test/whop_sdk/resources/payments_test.rb index 15a278cb..1c235583 100644 --- a/test/whop_sdk/resources/payments_test.rb +++ b/test/whop_sdk/resources/payments_test.rb @@ -33,7 +33,7 @@ def test_create_required_params checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, - currency: WhopSDK::Currency | nil, + currency: WhopSDK::Currency, dispute_alerted_at: Time | nil, disputes: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Dispute]) | nil, failure_message: String | nil, @@ -57,7 +57,7 @@ def test_create_required_params resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Currency, settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, @@ -96,7 +96,7 @@ def test_retrieve checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, - currency: WhopSDK::Currency | nil, + currency: WhopSDK::Currency, dispute_alerted_at: Time | nil, disputes: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Dispute]) | nil, failure_message: String | nil, @@ -120,7 +120,7 @@ def test_retrieve resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Currency, settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, @@ -166,7 +166,7 @@ def test_list checkout_configuration_id: String | nil, company: WhopSDK::Models::PaymentListResponse::Company | nil, created_at: Time, - currency: WhopSDK::Currency | nil, + currency: WhopSDK::Currency, dispute_alerted_at: Time | nil, failure_message: String | nil, last_payment_attempt: Time | nil, @@ -185,7 +185,7 @@ def test_list refunded_amount: Float | nil, refunded_at: Time | nil, retryable: WhopSDK::Internal::Type::Boolean, - settlement_currency: String, + settlement_currency: WhopSDK::Currency, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, subtotal: Float | nil, @@ -248,7 +248,7 @@ def test_refund checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, - currency: WhopSDK::Currency | nil, + currency: WhopSDK::Currency, dispute_alerted_at: Time | nil, disputes: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Dispute]) | nil, failure_message: String | nil, @@ -272,7 +272,7 @@ def test_refund resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Currency, settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, @@ -311,7 +311,7 @@ def test_retry_ checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, - currency: WhopSDK::Currency | nil, + currency: WhopSDK::Currency, dispute_alerted_at: Time | nil, disputes: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Dispute]) | nil, failure_message: String | nil, @@ -335,7 +335,7 @@ def test_retry_ resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Currency, settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, @@ -374,7 +374,7 @@ def test_void checkout_configuration_id: String | nil, company: WhopSDK::Payment::Company | nil, created_at: Time, - currency: WhopSDK::Currency | nil, + currency: WhopSDK::Currency, dispute_alerted_at: Time | nil, disputes: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Dispute]) | nil, failure_message: String | nil, @@ -398,7 +398,7 @@ def test_void resolutions: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Payment::Resolution]) | nil, retryable: WhopSDK::Internal::Type::Boolean, settlement_amount: Float, - settlement_currency: String, + settlement_currency: WhopSDK::Currency, settlement_exchange_rate: Float | nil, status: WhopSDK::ReceiptStatus | nil, substatus: WhopSDK::FriendlyReceiptStatus, diff --git a/test/whop_sdk/resources/plans_test.rb b/test/whop_sdk/resources/plans_test.rb index bc437f7a..637d2ec3 100644 --- a/test/whop_sdk/resources/plans_test.rb +++ b/test/whop_sdk/resources/plans_test.rb @@ -28,6 +28,7 @@ def test_create_required_params internal_notes: String | nil, invoice: WhopSDK::Plan::Invoice | nil, member_count: Integer | nil, + metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, payment_method_configuration: WhopSDK::Plan::PaymentMethodConfiguration | nil, plan_type: WhopSDK::PlanType, product: WhopSDK::Plan::Product | nil, @@ -71,6 +72,7 @@ def test_retrieve internal_notes: String | nil, invoice: WhopSDK::Plan::Invoice | nil, member_count: Integer | nil, + metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, payment_method_configuration: WhopSDK::Plan::PaymentMethodConfiguration | nil, plan_type: WhopSDK::PlanType, product: WhopSDK::Plan::Product | nil, @@ -114,6 +116,7 @@ def test_update internal_notes: String | nil, invoice: WhopSDK::Plan::Invoice | nil, member_count: Integer | nil, + metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, payment_method_configuration: WhopSDK::Plan::PaymentMethodConfiguration | nil, plan_type: WhopSDK::PlanType, product: WhopSDK::Plan::Product | nil, @@ -162,6 +165,7 @@ def test_list_required_params internal_notes: String | nil, invoice: WhopSDK::Models::PlanListResponse::Invoice | nil, member_count: Integer | nil, + metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, payment_method_configuration: WhopSDK::Models::PlanListResponse::PaymentMethodConfiguration | nil, plan_type: WhopSDK::PlanType, product: WhopSDK::Models::PlanListResponse::Product | nil, diff --git a/test/whop_sdk/resources/products_test.rb b/test/whop_sdk/resources/products_test.rb index c9c7548e..bf30d56a 100644 --- a/test/whop_sdk/resources/products_test.rb +++ b/test/whop_sdk/resources/products_test.rb @@ -29,6 +29,7 @@ def test_create_required_params member_affiliate_percentage: Float | nil, member_affiliate_status: WhopSDK::GlobalAffiliateStatus, member_count: Integer, + metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, owner_user: WhopSDK::Product::OwnerUser, product_tax_code: WhopSDK::Product::ProductTaxCode | nil, published_reviews_count: Integer, @@ -67,6 +68,7 @@ def test_retrieve member_affiliate_percentage: Float | nil, member_affiliate_status: WhopSDK::GlobalAffiliateStatus, member_count: Integer, + metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, owner_user: WhopSDK::Product::OwnerUser, product_tax_code: WhopSDK::Product::ProductTaxCode | nil, published_reviews_count: Integer, @@ -105,6 +107,7 @@ def test_update member_affiliate_percentage: Float | nil, member_affiliate_status: WhopSDK::GlobalAffiliateStatus, member_count: Integer, + metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, owner_user: WhopSDK::Product::OwnerUser, product_tax_code: WhopSDK::Product::ProductTaxCode | nil, published_reviews_count: Integer, @@ -140,6 +143,7 @@ def test_list_required_params external_identifier: String | nil, headline: String | nil, member_count: Integer, + metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, published_reviews_count: Integer, route: String, title: String,