diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8fa14f5..2e49ff54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -36,7 +36,7 @@ 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@v4 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 89b4b8ab..19e24225 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 3896ab82..64903345 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@v4 + - uses: actions/checkout@v6 - name: Check release environment run: | diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5ece83e2..3d2ac0bd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.23" + ".": "0.1.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 2cc29f74..d88af30f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 149 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-54c90c246d009f9f497b45992768d2a85ad7213629fa4910f25acd54fe226559.yml -openapi_spec_hash: 4b8eac0f1a57239c285b065fa2397a51 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-c2ec7a86a71bec3d7b44bd29c8fd46b809794df3e92a39e20e4d43aed65c7725.yml +openapi_spec_hash: c1729209a70aa843c9100053913fe2a0 config_hash: d4f8c855179a930e9297fbd41adfb4f1 diff --git a/CHANGELOG.md b/CHANGELOG.md index c5a8e65f..eb77a431 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## 0.1.0 (2026-01-23) + +Full Changelog: [v0.0.23...v0.1.0](https://github.com/whopio/whopsdk-ruby/compare/v0.0.23...v0.1.0) + +### Features + +* **api:** api update ([3f8895d](https://github.com/whopio/whopsdk-ruby/commit/3f8895d21e7f848239d7d5237dfe03c1c9bb40a5)) +* **api:** api update ([8c45d4d](https://github.com/whopio/whopsdk-ruby/commit/8c45d4dac11f2e932e5eb0f5c1332539256f6f64)) +* **api:** api update ([56c5958](https://github.com/whopio/whopsdk-ruby/commit/56c59586b405691fbb2c2673df015a6c4c6bac77)) +* **api:** api update ([575a5ca](https://github.com/whopio/whopsdk-ruby/commit/575a5ca14f1a3e9feb9203f2a51bc39bc8cfe149)) +* **api:** api update ([903a063](https://github.com/whopio/whopsdk-ruby/commit/903a0634fd7f585eee51454982dc27a08a0f0948)) +* **api:** api update ([72ec1cb](https://github.com/whopio/whopsdk-ruby/commit/72ec1cbe453d7cc8342d2996216780493833e4da)) +* **api:** api update ([2cf1fad](https://github.com/whopio/whopsdk-ruby/commit/2cf1fadbece71a34040e07c4323de0b4884cedc5)) +* **api:** api update ([c26ce69](https://github.com/whopio/whopsdk-ruby/commit/c26ce69644916463ef0a386090ef1e592f2ac07f)) +* **api:** api update ([d249eca](https://github.com/whopio/whopsdk-ruby/commit/d249eca80ddf15dee5653c08e3beef0835d41738)) +* **api:** api update ([dc41323](https://github.com/whopio/whopsdk-ruby/commit/dc4132327cf3e40421bf9f3caeb62323ec0d1ab2)) +* **api:** api update ([89df280](https://github.com/whopio/whopsdk-ruby/commit/89df280a85ad325ba5dd06ffffe7f5810590e92f)) +* **api:** api update ([4cafc17](https://github.com/whopio/whopsdk-ruby/commit/4cafc1725f1047d564d1560ce959b20bf5493aa2)) +* **api:** api update ([c9daa39](https://github.com/whopio/whopsdk-ruby/commit/c9daa39be528817b477fca8a6b460a31a39504e8)) +* **api:** api update ([71ef795](https://github.com/whopio/whopsdk-ruby/commit/71ef7957231d741348eeb7f10e42304a6f4e9ffb)) +* **api:** api update ([652a0be](https://github.com/whopio/whopsdk-ruby/commit/652a0bedb7dd68fd8e765228bbe9d251bf7c9f19)) +* **api:** api update ([cb282a1](https://github.com/whopio/whopsdk-ruby/commit/cb282a111add351df6dfa3fec0fb8a428344f9bf)) +* **api:** api update ([555ee4d](https://github.com/whopio/whopsdk-ruby/commit/555ee4d29583437178d523cead08eefb6690e178)) +* **api:** api update ([7aab597](https://github.com/whopio/whopsdk-ruby/commit/7aab597e000981c1cb8a3048b429fd68b075cc21)) +* **api:** api update ([49ad3d2](https://github.com/whopio/whopsdk-ruby/commit/49ad3d22688f431ccc5b327dd84b583591905300)) +* **api:** api update ([54634cf](https://github.com/whopio/whopsdk-ruby/commit/54634cf5c996c93e3c39ce69dcc646fedbceb473)) +* **api:** api update ([8a9cfc7](https://github.com/whopio/whopsdk-ruby/commit/8a9cfc7e1dc415b22d57e509b9227b0d60c88f9d)) + + +### Chores + +* **internal:** update `actions/checkout` version ([c27b1b0](https://github.com/whopio/whopsdk-ruby/commit/c27b1b08d527e42f390dd61d00716f12095b8026)) +* move `cgi` into dependencies for ruby 4 ([ea9feac](https://github.com/whopio/whopsdk-ruby/commit/ea9feac06b6b5b7e217cc62207993c5132348add)) + ## 0.0.23 (2026-01-09) Full Changelog: [v0.0.22...v0.0.23](https://github.com/whopio/whopsdk-ruby/compare/v0.0.22...v0.0.23) diff --git a/Gemfile.lock b/Gemfile.lock index fa075d98..160a43a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,8 @@ GIT PATH remote: . specs: - whop_sdk (0.0.23) + whop_sdk (0.1.0) + cgi connection_pool jwt openssl @@ -44,6 +45,7 @@ GEM base64 (0.3.0) benchmark (0.5.0) bigdecimal (3.3.1) + cgi (0.5.1) concurrent-ruby (1.3.5) connection_pool (2.5.4) console (1.34.2) diff --git a/README.md b/README.md index 35c53b2d..3981ebe0 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.23" +gem "whop_sdk", "~> 0.1.0" ``` diff --git a/lib/whop_sdk.rb b/lib/whop_sdk.rb index 07d0be8a..0a21acad 100644 --- a/lib/whop_sdk.rb +++ b/lib/whop_sdk.rb @@ -396,7 +396,6 @@ require_relative "whop_sdk/models/withdrawal_retrieve_response" require_relative "whop_sdk/models/withdrawal_speeds" require_relative "whop_sdk/models/withdrawal_status" -require_relative "whop_sdk/models/withdrawal_types" require_relative "whop_sdk/models/withdrawal_updated_webhook_event" require_relative "whop_sdk/models" require_relative "whop_sdk/resources/access_tokens" diff --git a/lib/whop_sdk/models.rb b/lib/whop_sdk/models.rb index e6a98f5a..d6b08059 100644 --- a/lib/whop_sdk/models.rb +++ b/lib/whop_sdk/models.rb @@ -577,7 +577,5 @@ module WhopSDK WithdrawalStatus = WhopSDK::Models::WithdrawalStatus - WithdrawalTypes = WhopSDK::Models::WithdrawalTypes - WithdrawalUpdatedWebhookEvent = WhopSDK::Models::WithdrawalUpdatedWebhookEvent end diff --git a/lib/whop_sdk/models/app_build_create_params.rb b/lib/whop_sdk/models/app_build_create_params.rb index 16229b56..f1ea114f 100644 --- a/lib/whop_sdk/models/app_build_create_params.rb +++ b/lib/whop_sdk/models/app_build_create_params.rb @@ -12,8 +12,8 @@ class AppBuildCreateParams < WhopSDK::Internal::Type::BaseModel # format. The zip should contain at least one main_js_bundle.hbc file and # optionally an assets folder next to it. # - # @return [WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID] - required :attachment, union: -> { WhopSDK::AppBuildCreateParams::Attachment } + # @return [WhopSDK::Models::AppBuildCreateParams::Attachment] + required :attachment, -> { WhopSDK::AppBuildCreateParams::Attachment } # @!attribute checksum # Checksum of the app build file. This is generated by the client and used to @@ -55,7 +55,7 @@ class AppBuildCreateParams < WhopSDK::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {WhopSDK::Models::AppBuildCreateParams} for more details. # - # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID] Attachment input for the app build file. This should be an upload in .zip format + # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment] Attachment input for the app build file. This should be an upload in .zip format # # @param checksum [String] Checksum of the app build file. This is generated by the client and used to veri # @@ -69,58 +69,19 @@ class AppBuildCreateParams < WhopSDK::Internal::Type::BaseModel # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # Attachment input for the app build file. This should be an upload in .zip - # format. The zip should contain at least one main_js_bundle.hbc file and - # optionally an assets folder next to it. - module Attachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID} for - # more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID)] + class Attachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # Attachment input for the app build file. This should be an upload in .zip + # format. The zip should contain at least one main_js_bundle.hbc file and + # optionally an assets folder next to it. + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/app_create_params.rb b/lib/whop_sdk/models/app_create_params.rb index f3218e68..d73070e5 100644 --- a/lib/whop_sdk/models/app_create_params.rb +++ b/lib/whop_sdk/models/app_create_params.rb @@ -25,14 +25,35 @@ class AppCreateParams < WhopSDK::Internal::Type::BaseModel # @return [String, nil] optional :base_url, String, nil?: true - # @!method initialize(company_id:, name:, base_url: nil, request_options: {}) + # @!attribute icon + # The icon for the app in png, jpeg, or gif format + # + # @return [WhopSDK::Models::AppCreateParams::Icon, nil] + optional :icon, -> { WhopSDK::AppCreateParams::Icon }, nil?: true + + # @!method initialize(company_id:, name:, base_url: nil, icon: nil, request_options: {}) # @param company_id [String] The ID of the company to create the app for # # @param name [String] The name of the app to be created # # @param base_url [String, nil] The base URL of the app to be created # + # @param icon [WhopSDK::Models::AppCreateParams::Icon, nil] The icon for the app in png, jpeg, or gif format + # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + class Icon < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The icon for the app in png, jpeg, or gif format + # + # @param id [String] The ID of an existing file object. + end end end end diff --git a/lib/whop_sdk/models/app_list_params.rb b/lib/whop_sdk/models/app_list_params.rb index e0c1a6ef..df778011 100644 --- a/lib/whop_sdk/models/app_list_params.rb +++ b/lib/whop_sdk/models/app_list_params.rb @@ -112,6 +112,11 @@ module Order TIME_SPENT = :time_spent TIME_SPENT_LAST_24_HOURS = :time_spent_last_24_hours DAILY_ACTIVE_USERS = :daily_active_users + AI_PROMPT_COUNT = :ai_prompt_count + TOTAL_AI_COST_USD = :total_ai_cost_usd + TOTAL_AI_TOKENS = :total_ai_tokens + LAST_AI_PROMPT_AT = :last_ai_prompt_at + AI_AVERAGE_RATING = :ai_average_rating # @!method self.values # @return [Array] diff --git a/lib/whop_sdk/models/app_update_params.rb b/lib/whop_sdk/models/app_update_params.rb index 1533b795..253d362c 100644 --- a/lib/whop_sdk/models/app_update_params.rb +++ b/lib/whop_sdk/models/app_update_params.rb @@ -52,8 +52,8 @@ class AppUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute icon # The icon for the app # - # @return [WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID, nil] - optional :icon, union: -> { WhopSDK::AppUpdateParams::Icon }, nil?: true + # @return [WhopSDK::Models::AppUpdateParams::Icon, nil] + optional :icon, -> { WhopSDK::AppUpdateParams::Icon }, nil?: true # @!attribute name # The name of the app @@ -90,7 +90,7 @@ class AppUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param experience_path [String, nil] The path for the hub view of the app # - # @param icon [WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID, nil] The icon for the app + # @param icon [WhopSDK::Models::AppUpdateParams::Icon, nil] The icon for the app # # @param name [String, nil] The name of the app # @@ -100,56 +100,17 @@ class AppUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # The icon for the app - module Icon - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID} for - # more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID} for more - # details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID)] + class Icon < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The icon for the app + # + # @param id [String] The ID of an existing file object. end # These are the scopes an app can request on behalf of a user diff --git a/lib/whop_sdk/models/card_brands.rb b/lib/whop_sdk/models/card_brands.rb index 261c963f..6a0f704d 100644 --- a/lib/whop_sdk/models/card_brands.rb +++ b/lib/whop_sdk/models/card_brands.rb @@ -22,6 +22,22 @@ module CardBrands JCBRUPAY = :jcbrupay ELO = :elo MAESTRO = :maestro + TARJETA_NARANJA = :tarjeta_naranja + CIRRUS = :cirrus + NSPK_MIR = :nspk_mir + VERVE = :verve + EBT = :ebt + PRIVATE_LABEL = :private_label + LOCAL_BRAND = :local_brand + UATP = :uatp + WEXCARD = :wexcard + UZCARD = :uzcard + MEEZA = :meeza + HRG_STORE_CARD = :hrg_store_card + GIROCARD = :girocard + FUEL_CARD = :fuel_card + DANKORT = :dankort + CARNET = :carnet UNKNOWN = :unknown # @!method self.values diff --git a/lib/whop_sdk/models/checkout_configuration_create_params.rb b/lib/whop_sdk/models/checkout_configuration_create_params.rb index afdbd2b5..51be65d4 100644 --- a/lib/whop_sdk/models/checkout_configuration_create_params.rb +++ b/lib/whop_sdk/models/checkout_configuration_create_params.rb @@ -52,6 +52,12 @@ class CheckoutConfigurationCreateParams < WhopSDK::Internal::Type::BaseModel # @return [String, nil] optional :redirect_url, String, nil?: true + # @!attribute source_url + # The URL of the page where the checkout is being initiated from. + # + # @return [String, nil] + optional :source_url, String, nil?: true + # @!attribute plan_id # The ID of the plan to use for the checkout configuration # @@ -65,7 +71,7 @@ class CheckoutConfigurationCreateParams < WhopSDK::Internal::Type::BaseModel # @return [String] required :company_id, String - # @!method initialize(plan:, plan_id:, company_id:, affiliate_code: nil, currency: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, mode: :setup, request_options: {}) + # @!method initialize(plan:, plan_id:, company_id:, affiliate_code: nil, currency: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, source_url: nil, mode: :setup, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams} for more details. # @@ -85,6 +91,8 @@ class CheckoutConfigurationCreateParams < WhopSDK::Internal::Type::BaseModel # # @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created # + # @param source_url [String, nil] The URL of the page where the checkout is being initiated from. + # # @param mode [Symbol, :setup] # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] @@ -148,8 +156,8 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @!attribute image # An image for the plan. This will be visible on the product page to customers. # - # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID, nil] - optional :image, union: -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image }, nil?: true + # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image, nil] + optional :image, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image }, nil?: true # @!attribute initial_price # An additional amount charged upon first purchase. @@ -216,6 +224,12 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Integer, nil] optional :split_pay_required_payments, Integer, nil?: true + # @!attribute stock + # The number of units available for purchase. If not provided, stock is unlimited. + # + # @return [Integer, nil] + optional :stock, Integer, nil?: true + # @!attribute title # The title of the plan. This will be visible on the product page to customers. # @@ -234,7 +248,7 @@ class Plan < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true - # @!method initialize(company_id:, currency:, application_fee_amount: nil, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, title: nil, trial_period_days: nil, visibility: nil) + # @!method initialize(company_id:, currency:, application_fee_amount: nil, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, stock: nil, title: nil, trial_period_days: nil, visibility: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan} for more details. # @@ -256,7 +270,7 @@ class Plan < WhopSDK::Internal::Type::BaseModel # # @param force_create_new_plan [Boolean, nil] Whether to force the creation of a new plan even if one with the same attributes # - # @param image [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers. + # @param image [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image, nil] An image for the plan. This will be visible on the product page to customers. # # @param initial_price [Float, nil] An additional amount charged upon first purchase. # @@ -278,6 +292,8 @@ class Plan < WhopSDK::Internal::Type::BaseModel # # @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription. # + # @param stock [Integer, nil] The number of units available for purchase. If not provided, stock is unlimited. + # # @param title [String, nil] The title of the plan. This will be visible on the product page to customers. # # @param trial_period_days [Integer, nil] The number of free trial days added before a renewal plan. @@ -335,58 +351,18 @@ class CustomField < WhopSDK::Internal::Type::BaseModel # @param field_type [Symbol, :text] The type of the custom field. end - # An image for the plan. This will be visible on the product page to customers. - # # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan#image - module Image - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID)] + class Image < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # An image for the plan. This will be visible on the product page to customers. + # + # @param id [String] The ID of an existing file object. end # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan#payment_method_configuration diff --git a/lib/whop_sdk/models/company_create_params.rb b/lib/whop_sdk/models/company_create_params.rb index 4be600dc..17be40d0 100644 --- a/lib/whop_sdk/models/company_create_params.rb +++ b/lib/whop_sdk/models/company_create_params.rb @@ -37,6 +37,12 @@ class CompanyCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::IndustryTypes, nil] optional :industry_type, enum: -> { WhopSDK::IndustryTypes }, nil?: true + # @!attribute logo + # The logo for the company in png, jpeg, or gif format + # + # @return [WhopSDK::Models::CompanyCreateParams::Logo, nil] + optional :logo, -> { WhopSDK::CompanyCreateParams::Logo }, nil?: true + # @!attribute metadata # Additional metadata for the account # @@ -52,7 +58,7 @@ class CompanyCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Boolean, nil] optional :send_customer_emails, WhopSDK::Internal::Type::Boolean, nil?: true - # @!method initialize(email:, parent_company_id:, title:, business_type: nil, industry_type: nil, metadata: nil, send_customer_emails: nil, request_options: {}) + # @!method initialize(email:, parent_company_id:, title:, business_type: nil, industry_type: nil, logo: nil, metadata: nil, send_customer_emails: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CompanyCreateParams} for more details. # @@ -66,11 +72,26 @@ class CompanyCreateParams < WhopSDK::Internal::Type::BaseModel # # @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in. # + # @param logo [WhopSDK::Models::CompanyCreateParams::Logo, nil] The logo for the company in png, jpeg, or gif format + # # @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account # # @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + class Logo < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The logo for the company in png, jpeg, or gif format + # + # @param id [String] The ID of an existing file object. + end end end end diff --git a/lib/whop_sdk/models/company_update_params.rb b/lib/whop_sdk/models/company_update_params.rb index 4f31a5cf..82d1ea67 100644 --- a/lib/whop_sdk/models/company_update_params.rb +++ b/lib/whop_sdk/models/company_update_params.rb @@ -10,8 +10,8 @@ class CompanyUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute banner_image # The banner image for the company in png or jpeg format # - # @return [WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithID, nil] - optional :banner_image, union: -> { WhopSDK::CompanyUpdateParams::BannerImage }, nil?: true + # @return [WhopSDK::Models::CompanyUpdateParams::BannerImage, nil] + optional :banner_image, -> { WhopSDK::CompanyUpdateParams::BannerImage }, nil?: true # @!attribute business_type # The different business types a company can be. @@ -28,8 +28,8 @@ class CompanyUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute logo # The logo for the company in png, jpeg, or gif format # - # @return [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil] - optional :logo, union: -> { WhopSDK::CompanyUpdateParams::Logo }, nil?: true + # @return [WhopSDK::Models::CompanyUpdateParams::Logo, nil] + optional :logo, -> { WhopSDK::CompanyUpdateParams::Logo }, nil?: true # @!attribute send_customer_emails # Whether Whop sends transactional emails to customers on behalf of this company. @@ -50,13 +50,13 @@ class CompanyUpdateParams < WhopSDK::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {WhopSDK::Models::CompanyUpdateParams} for more details. # - # @param banner_image [WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithID, nil] The banner image for the company in png or jpeg format + # @param banner_image [WhopSDK::Models::CompanyUpdateParams::BannerImage, nil] The banner image for the company in png or jpeg format # # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be. # # @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in. # - # @param logo [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the company in png, jpeg, or gif format + # @param logo [WhopSDK::Models::CompanyUpdateParams::Logo, nil] The logo for the company in png, jpeg, or gif format # # @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company. # @@ -64,108 +64,30 @@ class CompanyUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # The banner image for the company in png or jpeg format - module BannerImage - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithID} for - # more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithID)] + class BannerImage < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The banner image for the company in png or jpeg format + # + # @param id [String] The ID of an existing file object. end - # The logo for the company in png, jpeg, or gif format - module Logo - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID} for more - # details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID)] + class Logo < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The logo for the company in png, jpeg, or gif format + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/course_create_params.rb b/lib/whop_sdk/models/course_create_params.rb index 1604c0bf..6550d54a 100644 --- a/lib/whop_sdk/models/course_create_params.rb +++ b/lib/whop_sdk/models/course_create_params.rb @@ -26,12 +26,6 @@ class CourseCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Boolean, nil] optional :certificate_after_completion_enabled, WhopSDK::Internal::Type::Boolean, nil?: true - # @!attribute cover_image - # The cover image URL of the course - # - # @return [String, nil] - optional :cover_image, String, nil?: true - # @!attribute order # The decimal order position of the course within its experience. If not provided, # it will be set to the next sequential order. Use fractional values (e.g., 1.5) @@ -56,8 +50,8 @@ class CourseCreateParams < WhopSDK::Internal::Type::BaseModel # @!attribute thumbnail # The thumbnail for the course in png, jpeg, or gif format # - # @return [WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithID, nil] - optional :thumbnail, union: -> { WhopSDK::CourseCreateParams::Thumbnail }, nil?: true + # @return [WhopSDK::Models::CourseCreateParams::Thumbnail, nil] + optional :thumbnail, -> { WhopSDK::CourseCreateParams::Thumbnail }, nil?: true # @!attribute visibility # The available visibilities for a course. Determines how / whether a course is @@ -66,7 +60,7 @@ class CourseCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::CourseVisibilities, nil] optional :visibility, enum: -> { WhopSDK::CourseVisibilities }, nil?: true - # @!method initialize(experience_id:, title:, certificate_after_completion_enabled: nil, cover_image: nil, order: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, visibility: nil, request_options: {}) + # @!method initialize(experience_id:, title:, certificate_after_completion_enabled: nil, order: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, visibility: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CourseCreateParams} for more details. # @@ -76,70 +70,29 @@ class CourseCreateParams < WhopSDK::Internal::Type::BaseModel # # @param certificate_after_completion_enabled [Boolean, nil] Whether the course will award its students a PDF certificate after completing al # - # @param cover_image [String, nil] The cover image URL of the course - # # @param order [String, nil] The decimal order position of the course within its experience. If not provided, # # @param require_completing_lessons_in_order [Boolean, nil] Whether the course requires students to complete the previous lesson before movi # # @param tagline [String, nil] The tagline of the course # - # @param thumbnail [WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the course in png, jpeg, or gif format + # @param thumbnail [WhopSDK::Models::CourseCreateParams::Thumbnail, nil] The thumbnail for the course in png, jpeg, or gif format # # @param visibility [Symbol, WhopSDK::Models::CourseVisibilities, nil] The available visibilities for a course. Determines how / whether a course is vi # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # The thumbnail for the course in png, jpeg, or gif format - module Thumbnail - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithID} for more - # details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithID)] + class Thumbnail < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The thumbnail for the course in png, jpeg, or gif format + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/course_lesson_create_params.rb b/lib/whop_sdk/models/course_lesson_create_params.rb index ff06bc3e..881281e7 100644 --- a/lib/whop_sdk/models/course_lesson_create_params.rb +++ b/lib/whop_sdk/models/course_lesson_create_params.rb @@ -46,8 +46,8 @@ class CourseLessonCreateParams < WhopSDK::Internal::Type::BaseModel # @!attribute thumbnail # The thumbnail for the lesson in png, jpeg, or gif format # - # @return [WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID, nil] - optional :thumbnail, union: -> { WhopSDK::CourseLessonCreateParams::Thumbnail }, nil?: true + # @return [WhopSDK::Models::CourseLessonCreateParams::Thumbnail, nil] + optional :thumbnail, -> { WhopSDK::CourseLessonCreateParams::Thumbnail }, nil?: true # @!attribute title # The title of the lesson @@ -68,62 +68,23 @@ class CourseLessonCreateParams < WhopSDK::Internal::Type::BaseModel # # @param embed_type [Symbol, WhopSDK::Models::EmbedType, nil] The type of embed for a lesson # - # @param thumbnail [WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the lesson in png, jpeg, or gif format + # @param thumbnail [WhopSDK::Models::CourseLessonCreateParams::Thumbnail, nil] The thumbnail for the lesson in png, jpeg, or gif format # # @param title [String, nil] The title of the lesson # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # The thumbnail for the lesson in png, jpeg, or gif format - module Thumbnail - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID)] + class Thumbnail < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The thumbnail for the lesson in png, jpeg, or gif format + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/course_lesson_update_params.rb b/lib/whop_sdk/models/course_lesson_update_params.rb index 8fc1d279..8def5d5e 100644 --- a/lib/whop_sdk/models/course_lesson_update_params.rb +++ b/lib/whop_sdk/models/course_lesson_update_params.rb @@ -28,9 +28,9 @@ class CourseLessonUpdateParams < WhopSDK::Internal::Type::BaseModel # General attachments for the lesson (PDFs, files, etc). Replaces all existing # attachments. # - # @return [Array, nil] + # @return [Array, nil] optional :attachments, - -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::CourseLessonUpdateParams::Attachment] }, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseLessonUpdateParams::Attachment] }, nil?: true # @!attribute content @@ -66,8 +66,8 @@ class CourseLessonUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute main_pdf # The main PDF file for this lesson # - # @return [WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, nil] - optional :main_pdf, union: -> { WhopSDK::CourseLessonUpdateParams::MainPdf }, nil?: true + # @return [WhopSDK::Models::CourseLessonUpdateParams::MainPdf, nil] + optional :main_pdf, -> { WhopSDK::CourseLessonUpdateParams::MainPdf }, nil?: true # @!attribute max_attempts # Maximum number of attempts allowed for assessments @@ -84,8 +84,8 @@ class CourseLessonUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute thumbnail # The thumbnail for the lesson in png, jpeg, or gif format # - # @return [WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID, nil] - optional :thumbnail, union: -> { WhopSDK::CourseLessonUpdateParams::Thumbnail }, nil?: true + # @return [WhopSDK::Models::CourseLessonUpdateParams::Thumbnail, nil] + optional :thumbnail, -> { WhopSDK::CourseLessonUpdateParams::Thumbnail }, nil?: true # @!attribute title # The title of the lesson @@ -108,7 +108,7 @@ class CourseLessonUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param assessment_questions [Array, nil] Assessment questions for quiz/knowledge check lessons. Replaces all existing que # - # @param attachments [Array, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att + # @param attachments [Array, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att # # @param content [String, nil] The content of the lesson # @@ -120,13 +120,13 @@ class CourseLessonUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param lesson_type [Symbol, WhopSDK::Models::LessonTypes, nil] The available types for a lesson # - # @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, nil] The main PDF file for this lesson + # @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf, nil] The main PDF file for this lesson # # @param max_attempts [Integer, nil] Maximum number of attempts allowed for assessments # # @param mux_asset_id [String, nil] The ID of the Mux asset to attach to this lesson for video lessons # - # @param thumbnail [WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the lesson in png, jpeg, or gif format + # @param thumbnail [WhopSDK::Models::CourseLessonUpdateParams::Thumbnail, nil] The thumbnail for the lesson in png, jpeg, or gif format # # @param title [String, nil] The title of the lesson # @@ -190,12 +190,8 @@ class AssessmentQuestion < WhopSDK::Internal::Type::BaseModel # @!attribute image # Optional image attachment for the question # - # @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID, nil] - optional :image, - union: -> { - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image - }, - nil?: true + # @return [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image, nil] + optional :image, -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image }, nil?: true # @!attribute options # The answer options for multiple choice/select questions @@ -222,62 +218,22 @@ class AssessmentQuestion < WhopSDK::Internal::Type::BaseModel # # @param id [String, nil] The ID of an existing question. If provided, the question will be updated. If no # - # @param image [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID, nil] Optional image attachment for the question + # @param image [WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image, nil] Optional image attachment for the question # # @param options [Array, nil] The answer options for multiple choice/select questions - # Optional image attachment for the question - # # @see WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion#image - module Image - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID)] + class Image < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # Optional image attachment for the question + # + # @param id [String] The ID of an existing file object. end class Option < WhopSDK::Internal::Type::BaseModel @@ -315,160 +271,43 @@ class Option < WhopSDK::Internal::Type::BaseModel end end - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end + class Attachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String - # @!method self.variants - # @return [Array(WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Attachment::AttachmentInputWithID)] + # @!method initialize(id:) + # Input for an attachment + # + # @param id [String] The ID of an existing file object. end - # The main PDF file for this lesson - module MainPdf - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID} for - # more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end + class MainPdf < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String - # @!method self.variants - # @return [Array(WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID)] + # @!method initialize(id:) + # The main PDF file for this lesson + # + # @param id [String] The ID of an existing file object. end - # The thumbnail for the lesson in png, jpeg, or gif format - module Thumbnail - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end + class Thumbnail < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String - # @!method self.variants - # @return [Array(WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID)] + # @!method initialize(id:) + # The thumbnail for the lesson in png, jpeg, or gif format + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/course_update_params.rb b/lib/whop_sdk/models/course_update_params.rb index 510d0d71..70bf6832 100644 --- a/lib/whop_sdk/models/course_update_params.rb +++ b/lib/whop_sdk/models/course_update_params.rb @@ -22,12 +22,6 @@ class CourseUpdateParams < WhopSDK::Internal::Type::BaseModel -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseUpdateParams::Chapter] }, nil?: true - # @!attribute cover_image - # The cover image URL of the course - # - # @return [String, nil] - optional :cover_image, String, nil?: true - # @!attribute description # A short description of the course # @@ -63,8 +57,8 @@ class CourseUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute thumbnail # The thumbnail for the course in png, jpeg, or gif format # - # @return [WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithID, nil] - optional :thumbnail, union: -> { WhopSDK::CourseUpdateParams::Thumbnail }, nil?: true + # @return [WhopSDK::Models::CourseUpdateParams::Thumbnail, nil] + optional :thumbnail, -> { WhopSDK::CourseUpdateParams::Thumbnail }, nil?: true # @!attribute title # The title of the course @@ -79,7 +73,7 @@ class CourseUpdateParams < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::CourseVisibilities, nil] optional :visibility, enum: -> { WhopSDK::CourseVisibilities }, nil?: true - # @!method initialize(certificate_after_completion_enabled: nil, chapters: nil, cover_image: nil, description: nil, language: nil, order: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, title: nil, visibility: nil, request_options: {}) + # @!method initialize(certificate_after_completion_enabled: nil, chapters: nil, description: nil, language: nil, order: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, title: nil, visibility: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CourseUpdateParams} for more details. # @@ -87,8 +81,6 @@ class CourseUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param chapters [Array, nil] The chapters and lessons to update # - # @param cover_image [String, nil] The cover image URL of the course - # # @param description [String, nil] A short description of the course # # @param language [Symbol, WhopSDK::Models::Languages, nil] The available languages for a course @@ -99,7 +91,7 @@ class CourseUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param tagline [String, nil] A short tagline for the course # - # @param thumbnail [WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the course in png, jpeg, or gif format + # @param thumbnail [WhopSDK::Models::CourseUpdateParams::Thumbnail, nil] The thumbnail for the course in png, jpeg, or gif format # # @param title [String, nil] The title of the course # @@ -183,56 +175,17 @@ class Lesson < WhopSDK::Internal::Type::BaseModel end end - # The thumbnail for the course in png, jpeg, or gif format - module Thumbnail - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithID} for more - # details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end + class Thumbnail < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String - # @!method self.variants - # @return [Array(WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithID)] + # @!method initialize(id:) + # The thumbnail for the course in png, jpeg, or gif format + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/dispute_update_evidence_params.rb b/lib/whop_sdk/models/dispute_update_evidence_params.rb index 103b3e17..c0bc9e90 100644 --- a/lib/whop_sdk/models/dispute_update_evidence_params.rb +++ b/lib/whop_sdk/models/dispute_update_evidence_params.rb @@ -22,9 +22,9 @@ class DisputeUpdateEvidenceParams < WhopSDK::Internal::Type::BaseModel # @!attribute cancellation_policy_attachment # A file containing the cancellation policy from the company. # - # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID, nil] + # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment, nil] optional :cancellation_policy_attachment, - union: -> { WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment }, + -> { WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment }, nil?: true # @!attribute cancellation_policy_disclosure @@ -36,9 +36,9 @@ class DisputeUpdateEvidenceParams < WhopSDK::Internal::Type::BaseModel # @!attribute customer_communication_attachment # A file containing the customer communication from the company (An image). # - # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID, nil] + # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment, nil] optional :customer_communication_attachment, - union: -> { WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment }, + -> { WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment }, nil?: true # @!attribute customer_email_address @@ -68,9 +68,9 @@ class DisputeUpdateEvidenceParams < WhopSDK::Internal::Type::BaseModel # @!attribute refund_policy_attachment # A file containing the refund policy from the company. # - # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID, nil] + # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment, nil] optional :refund_policy_attachment, - union: -> { WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment }, + -> { WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment }, nil?: true # @!attribute refund_policy_disclosure @@ -94,9 +94,9 @@ class DisputeUpdateEvidenceParams < WhopSDK::Internal::Type::BaseModel # @!attribute uncategorized_attachment # A file that does not fit in the other categories. # - # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID, nil] + # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment, nil] optional :uncategorized_attachment, - union: -> { WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment }, + -> { WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment }, nil?: true # @!method initialize(access_activity_log: nil, billing_address: nil, cancellation_policy_attachment: nil, cancellation_policy_disclosure: nil, customer_communication_attachment: nil, customer_email_address: nil, customer_name: nil, notes: nil, product_description: nil, refund_policy_attachment: nil, refund_policy_disclosure: nil, refund_refusal_explanation: nil, service_date: nil, uncategorized_attachment: nil, request_options: {}) @@ -104,11 +104,11 @@ class DisputeUpdateEvidenceParams < WhopSDK::Internal::Type::BaseModel # # @param billing_address [String, nil] The billing address of the user from their payment details. # - # @param cancellation_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID, nil] A file containing the cancellation policy from the company. + # @param cancellation_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment, nil] A file containing the cancellation policy from the company. # # @param cancellation_policy_disclosure [String, nil] A cancellation policy disclosure from the company. # - # @param customer_communication_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID, nil] A file containing the customer communication from the company (An image). + # @param customer_communication_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment, nil] A file containing the customer communication from the company (An image). # # @param customer_email_address [String, nil] The email of the customer from their payment details. # @@ -118,7 +118,7 @@ class DisputeUpdateEvidenceParams < WhopSDK::Internal::Type::BaseModel # # @param product_description [String, nil] The description of the product from the company. # - # @param refund_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID, nil] A file containing the refund policy from the company. + # @param refund_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment, nil] A file containing the refund policy from the company. # # @param refund_policy_disclosure [String, nil] A refund policy disclosure from the company. # @@ -126,216 +126,60 @@ class DisputeUpdateEvidenceParams < WhopSDK::Internal::Type::BaseModel # # @param service_date [String, nil] When the product was delivered by the company. # - # @param uncategorized_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID, nil] A file that does not fit in the other categories. + # @param uncategorized_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment, nil] A file that does not fit in the other categories. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # A file containing the cancellation policy from the company. - module CancellationPolicyAttachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID)] + class CancellationPolicyAttachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # A file containing the cancellation policy from the company. + # + # @param id [String] The ID of an existing file object. end - # A file containing the customer communication from the company (An image). - module CustomerCommunicationAttachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID)] + class CustomerCommunicationAttachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # A file containing the customer communication from the company (An image). + # + # @param id [String] The ID of an existing file object. end - # A file containing the refund policy from the company. - module RefundPolicyAttachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID)] + class RefundPolicyAttachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # A file containing the refund policy from the company. + # + # @param id [String] The ID of an existing file object. end - # A file that does not fit in the other categories. - module UncategorizedAttachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID} - # for more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID)] + class UncategorizedAttachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # A file that does not fit in the other categories. + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/experience_create_params.rb b/lib/whop_sdk/models/experience_create_params.rb index 498a5b1a..5c689547 100644 --- a/lib/whop_sdk/models/experience_create_params.rb +++ b/lib/whop_sdk/models/experience_create_params.rb @@ -25,6 +25,12 @@ class ExperienceCreateParams < WhopSDK::Internal::Type::BaseModel # @return [Boolean, nil] optional :is_public, WhopSDK::Internal::Type::Boolean, nil?: true + # @!attribute logo + # The logo for the experience + # + # @return [WhopSDK::Models::ExperienceCreateParams::Logo, nil] + optional :logo, -> { WhopSDK::ExperienceCreateParams::Logo }, nil?: true + # @!attribute name # The name of the experience # @@ -37,18 +43,33 @@ class ExperienceCreateParams < WhopSDK::Internal::Type::BaseModel # @return [String, nil] optional :section_id, String, nil?: true - # @!method initialize(app_id:, company_id:, is_public: nil, name: nil, section_id: nil, request_options: {}) + # @!method initialize(app_id:, company_id:, is_public: nil, logo: nil, name: nil, section_id: nil, request_options: {}) # @param app_id [String] The ID of the app to create the experience for # # @param company_id [String] The ID of the company to create the experience for # # @param is_public [Boolean, nil] Whether the experience is publicly accessible # + # @param logo [WhopSDK::Models::ExperienceCreateParams::Logo, nil] The logo for the experience + # # @param name [String, nil] The name of the experience # # @param section_id [String, nil] The ID of the section to create the experience in # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + class Logo < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The logo for the experience + # + # @param id [String] The ID of an existing file object. + end end end end diff --git a/lib/whop_sdk/models/experience_update_params.rb b/lib/whop_sdk/models/experience_update_params.rb index 5e183611..8842c8a7 100644 --- a/lib/whop_sdk/models/experience_update_params.rb +++ b/lib/whop_sdk/models/experience_update_params.rb @@ -22,8 +22,8 @@ class ExperienceUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute logo # The logo for the experience # - # @return [WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithID, nil] - optional :logo, union: -> { WhopSDK::ExperienceUpdateParams::Logo }, nil?: true + # @return [WhopSDK::Models::ExperienceUpdateParams::Logo, nil] + optional :logo, -> { WhopSDK::ExperienceUpdateParams::Logo }, nil?: true # @!attribute name # The name of the experience. @@ -48,7 +48,7 @@ class ExperienceUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param is_public [Boolean, nil] Whether the experience is publicly accessible. # - # @param logo [WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the experience + # @param logo [WhopSDK::Models::ExperienceUpdateParams::Logo, nil] The logo for the experience # # @param name [String, nil] The name of the experience. # @@ -69,56 +69,17 @@ module AccessLevel # @return [Array] end - # The logo for the experience - module Logo - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithID} for more - # details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithID)] + class Logo < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # The logo for the experience + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/forum_post_create_params.rb b/lib/whop_sdk/models/forum_post_create_params.rb index 81ce774e..f248c4e4 100644 --- a/lib/whop_sdk/models/forum_post_create_params.rb +++ b/lib/whop_sdk/models/forum_post_create_params.rb @@ -16,9 +16,9 @@ class ForumPostCreateParams < WhopSDK::Internal::Type::BaseModel # @!attribute attachments # The attachments for this post # - # @return [Array, nil] + # @return [Array, nil] optional :attachments, - -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::ForumPostCreateParams::Attachment] }, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::ForumPostCreateParams::Attachment] }, nil?: true # @!attribute content @@ -86,7 +86,7 @@ class ForumPostCreateParams < WhopSDK::Internal::Type::BaseModel # # @param experience_id [String] The experience to create this post in # - # @param attachments [Array, nil] The attachments for this post + # @param attachments [Array, nil] The attachments for this post # # @param content [String, nil] This is the main body of the post in Markdown format. Hidden if paywalled and us # @@ -108,56 +108,17 @@ class ForumPostCreateParams < WhopSDK::Internal::Type::BaseModel # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::ForumPostCreateParams::Attachment::AttachmentInputWithID} for - # more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end + class Attachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String - # @!method self.variants - # @return [Array(WhopSDK::Models::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::ForumPostCreateParams::Attachment::AttachmentInputWithID)] + # @!method initialize(id:) + # Input for an attachment + # + # @param id [String] The ID of an existing file object. end class Poll < WhopSDK::Internal::Type::BaseModel diff --git a/lib/whop_sdk/models/forum_post_update_params.rb b/lib/whop_sdk/models/forum_post_update_params.rb index b3899382..40be00fa 100644 --- a/lib/whop_sdk/models/forum_post_update_params.rb +++ b/lib/whop_sdk/models/forum_post_update_params.rb @@ -10,9 +10,9 @@ class ForumPostUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute attachments # The attachments for this post # - # @return [Array, nil] + # @return [Array, nil] optional :attachments, - -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::ForumPostUpdateParams::Attachment] }, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::ForumPostUpdateParams::Attachment] }, nil?: true # @!attribute content @@ -44,7 +44,7 @@ class ForumPostUpdateParams < WhopSDK::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {WhopSDK::Models::ForumPostUpdateParams} for more details. # - # @param attachments [Array, nil] The attachments for this post + # @param attachments [Array, nil] The attachments for this post # # @param content [String, nil] This is the main body of the post in Markdown format. Hidden if paywalled and us # @@ -56,56 +56,17 @@ class ForumPostUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union + class Attachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String - # Input for an attachment - variant -> { WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithID} for - # more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithID)] + # @!method initialize(id:) + # Input for an attachment + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/friendly_receipt_status.rb b/lib/whop_sdk/models/friendly_receipt_status.rb index af5475c0..c2bf86c4 100644 --- a/lib/whop_sdk/models/friendly_receipt_status.rb +++ b/lib/whop_sdk/models/friendly_receipt_status.rb @@ -6,22 +6,34 @@ module Models module FriendlyReceiptStatus extend WhopSDK::Internal::Type::Enum - AUTO_REFUNDED = :auto_refunded + SUCCEEDED = :succeeded + PENDING = :pending + FAILED = :failed + PAST_DUE = :past_due + CANCELED = :canceled + PRICE_TOO_LOW = :price_too_low + UNCOLLECTIBLE = :uncollectible REFUNDED = :refunded + AUTO_REFUNDED = :auto_refunded PARTIALLY_REFUNDED = :partially_refunded DISPUTE_WARNING = :dispute_warning - OPEN_RESOLUTION = :open_resolution - OPEN_DISPUTE = :open_dispute - FAILED = :failed - PRICE_TOO_LOW = :price_too_low - SUCCEEDED = :succeeded + DISPUTE_NEEDS_RESPONSE = :dispute_needs_response + DISPUTE_WARNING_NEEDS_RESPONSE = :dispute_warning_needs_response + RESOLUTION_NEEDS_RESPONSE = :resolution_needs_response + DISPUTE_UNDER_REVIEW = :dispute_under_review + DISPUTE_WARNING_UNDER_REVIEW = :dispute_warning_under_review + RESOLUTION_UNDER_REVIEW = :resolution_under_review + DISPUTE_WON = :dispute_won + DISPUTE_WARNING_CLOSED = :dispute_warning_closed + RESOLUTION_WON = :resolution_won + DISPUTE_LOST = :dispute_lost + DISPUTE_CLOSED = :dispute_closed + RESOLUTION_LOST = :resolution_lost DRAFTED = :drafted - UNCOLLECTIBLE = :uncollectible - UNRESOLVED = :unresolved - PAST_DUE = :past_due - PENDING = :pending INCOMPLETE = :incomplete - CANCELED = :canceled + UNRESOLVED = :unresolved + OPEN_DISPUTE = :open_dispute + OPEN_RESOLUTION = :open_resolution # @!method self.values # @return [Array] diff --git a/lib/whop_sdk/models/ledger_account_retrieve_response.rb b/lib/whop_sdk/models/ledger_account_retrieve_response.rb index 20985ddd..c5377ef9 100644 --- a/lib/whop_sdk/models/ledger_account_retrieve_response.rb +++ b/lib/whop_sdk/models/ledger_account_retrieve_response.rb @@ -17,14 +17,6 @@ class LedgerAccountRetrieveResponse < WhopSDK::Internal::Type::BaseModel required :balances, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::LedgerAccountRetrieveResponse::Balance] } - # @!attribute ledger_account_audit_status - # The different statuses a LedgerAccountAudit can be - # - # @return [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus, nil] - required :ledger_account_audit_status, - enum: -> { WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus }, - nil?: true - # @!attribute ledger_type # The type of ledger account. # @@ -59,15 +51,13 @@ class LedgerAccountRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @return [Float, nil] required :transfer_fee, Float, nil?: true - # @!method initialize(id:, balances:, ledger_account_audit_status:, ledger_type:, owner:, payments_approval_status:, payout_account_details:, transfer_fee:) + # @!method initialize(id:, balances:, ledger_type:, owner:, payments_approval_status:, payout_account_details:, transfer_fee:) # Represents a LedgerAccount. # # @param id [String] The ID of the LedgerAccount. # # @param balances [Array] The balances associated with the account. # - # @param ledger_account_audit_status [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus, nil] The different statuses a LedgerAccountAudit can be - # # @param ledger_type [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerType] The type of ledger account. # # @param owner [WhopSDK::Models::LedgerAccountRetrieveResponse::Owner::User, WhopSDK::Models::LedgerAccountRetrieveResponse::Owner::Company, nil] The owner of the ledger account. @@ -115,29 +105,6 @@ class Balance < WhopSDK::Internal::Type::BaseModel # @param reserve_balance [Float] The amount of the balance that is reserved. end - # The different statuses a LedgerAccountAudit can be - # - # @see WhopSDK::Models::LedgerAccountRetrieveResponse#ledger_account_audit_status - module LedgerAccountAuditStatus - extend WhopSDK::Internal::Type::Enum - - PENDING = :pending - PENDING_AI_REVIEW = :pending_ai_review - APPROVED = :approved - RESERVES_IMPOSED = :reserves_imposed - SUSPENDED = :suspended - IGNORED = :ignored - REJECTED = :rejected - REQUESTED_MORE_INFORMATION = :requested_more_information - INFORMATION_SUBMITTED = :information_submitted - REQUESTED_TOS_VIOLATION_CORRECTION = :requested_tos_violation_correction - CLAWBACK_ATTEMPTED = :clawback_attempted - AWAITING_SALES_REVIEW = :awaiting_sales_review - - # @!method self.values - # @return [Array] - end - # The type of ledger account. # # @see WhopSDK::Models::LedgerAccountRetrieveResponse#ledger_type diff --git a/lib/whop_sdk/models/member_list_response.rb b/lib/whop_sdk/models/member_list_response.rb index 4443b88d..4172fd3d 100644 --- a/lib/whop_sdk/models/member_list_response.rb +++ b/lib/whop_sdk/models/member_list_response.rb @@ -19,6 +19,12 @@ class MemberListResponse < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::AccessLevel] required :access_level, enum: -> { WhopSDK::AccessLevel } + # @!attribute company_token_balance + # The member's token balance for this company + # + # @return [Float] + required :company_token_balance, Float + # @!attribute created_at # When the member was created # @@ -73,7 +79,7 @@ class MemberListResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::MemberListResponse::User, nil] required :user, -> { WhopSDK::Models::MemberListResponse::User }, nil?: true - # @!method initialize(id:, access_level:, created_at:, joined_at:, most_recent_action:, most_recent_action_at:, phone:, status:, updated_at:, usd_total_spent:, user:) + # @!method initialize(id:, access_level:, company_token_balance:, created_at:, joined_at:, most_recent_action:, most_recent_action_at:, phone:, status:, updated_at:, usd_total_spent:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::MemberListResponse} for more details. # @@ -85,6 +91,8 @@ 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 created_at [Time] When the member was created # # @param joined_at [Time] When the member joined the company diff --git a/lib/whop_sdk/models/member_retrieve_response.rb b/lib/whop_sdk/models/member_retrieve_response.rb index 8be123ab..967bcc23 100644 --- a/lib/whop_sdk/models/member_retrieve_response.rb +++ b/lib/whop_sdk/models/member_retrieve_response.rb @@ -25,6 +25,12 @@ class MemberRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::MemberRetrieveResponse::Company] required :company, -> { WhopSDK::Models::MemberRetrieveResponse::Company } + # @!attribute company_token_balance + # The member's token balance for this company + # + # @return [Float] + required :company_token_balance, Float + # @!attribute created_at # When the member was created # @@ -79,7 +85,7 @@ class MemberRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::MemberRetrieveResponse::User, nil] required :user, -> { WhopSDK::Models::MemberRetrieveResponse::User }, nil?: true - # @!method initialize(id:, access_level:, company:, created_at:, joined_at:, most_recent_action:, most_recent_action_at:, phone:, status:, updated_at:, usd_total_spent:, user:) + # @!method initialize(id:, access_level:, company:, company_token_balance:, created_at:, joined_at:, most_recent_action:, most_recent_action_at:, phone:, status:, updated_at:, usd_total_spent:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::MemberRetrieveResponse} for more details. # @@ -93,6 +99,8 @@ 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 created_at [Time] When the member was created # # @param joined_at [Time] When the member joined the company diff --git a/lib/whop_sdk/models/membership.rb b/lib/whop_sdk/models/membership.rb index 75f363da..67ab8cc0 100644 --- a/lib/whop_sdk/models/membership.rb +++ b/lib/whop_sdk/models/membership.rb @@ -16,6 +16,13 @@ class Membership < WhopSDK::Internal::Type::BaseModel # @return [Boolean] required :cancel_at_period_end, WhopSDK::Internal::Type::Boolean + # @!attribute cancel_option + # The different reasons a user can choose for why they are canceling their + # membership. + # + # @return [Symbol, WhopSDK::Models::Membership::CancelOption, nil] + required :cancel_option, enum: -> { WhopSDK::Membership::CancelOption }, nil?: true + # @!attribute canceled_at # The epoch timestamp of when the customer initiated a cancellation. # @@ -46,6 +53,13 @@ class Membership < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::Currency, nil] required :currency, enum: -> { WhopSDK::Currency }, nil?: true + # @!attribute custom_field_responses + # The responses to custom checkout questions for this membership. + # + # @return [Array] + required :custom_field_responses, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Membership::CustomFieldResponse] } + # @!attribute license_key # The license key for this Membership. This is only present if the membership # grants access to an instance of the Whop Software app. @@ -127,7 +141,7 @@ class Membership < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::Membership::User, nil] required :user, -> { WhopSDK::Membership::User }, nil?: true - # @!method initialize(id:, cancel_at_period_end:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:) + # @!method initialize(id:, cancel_at_period_end:, cancel_option:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, custom_field_responses:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::Membership} for more details. # @@ -138,6 +152,8 @@ class Membership < WhopSDK::Internal::Type::BaseModel # # @param cancel_at_period_end [Boolean] Whether this Membership is set to cancel at the end of the current billing cycle # + # @param cancel_option [Symbol, WhopSDK::Models::Membership::CancelOption, nil] The different reasons a user can choose for why they are canceling their members + # # @param canceled_at [Time, nil] The epoch timestamp of when the customer initiated a cancellation. # # @param cancellation_reason [String, nil] The reason that the member canceled the membership (filled out by the member). @@ -148,6 +164,8 @@ class Membership < WhopSDK::Internal::Type::BaseModel # # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform # + # @param custom_field_responses [Array] The responses to custom checkout questions for this membership. + # # @param license_key [String, nil] The license key for this Membership. This is only present if the membership gran # # @param manage_url [String, nil] The URL for the customer to manage their membership. @@ -174,6 +192,25 @@ class Membership < WhopSDK::Internal::Type::BaseModel # # @param user [WhopSDK::Models::Membership::User, nil] The user this membership belongs to + # The different reasons a user can choose for why they are canceling their + # membership. + # + # @see WhopSDK::Models::Membership#cancel_option + module CancelOption + extend WhopSDK::Internal::Type::Enum + + TOO_EXPENSIVE = :too_expensive + SWITCHING = :switching + MISSING_FEATURES = :missing_features + TECHNICAL_ISSUES = :technical_issues + BAD_EXPERIENCE = :bad_experience + OTHER = :other + TESTING = :testing + + # @!method self.values + # @return [Array] + end + # @see WhopSDK::Models::Membership#company class Company < WhopSDK::Internal::Type::BaseModel # @!attribute id @@ -196,6 +233,35 @@ class Company < WhopSDK::Internal::Type::BaseModel # @param title [String] The title of the company. end + class CustomFieldResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of the custom field item + # + # @return [String] + required :id, String + + # @!attribute answer + # The response a user gave to the specific question or field. + # + # @return [String] + required :answer, String + + # @!attribute question + # The question asked by the custom field + # + # @return [String] + required :question, String + + # @!method initialize(id:, answer:, question:) + # The response from a custom field on checkout + # + # @param id [String] The ID of the custom field item + # + # @param answer [String] The response a user gave to the specific question or field. + # + # @param question [String] The question asked by the custom field + end + # @see WhopSDK::Models::Membership#member class Member < WhopSDK::Internal::Type::BaseModel # @!attribute id @@ -268,6 +334,12 @@ class User < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute email + # The email of the user + # + # @return [String, nil] + required :email, String, nil?: true + # @!attribute name # The name of the user from their Whop account. # @@ -280,11 +352,13 @@ class User < WhopSDK::Internal::Type::BaseModel # @return [String] required :username, String - # @!method initialize(id:, name:, username:) + # @!method initialize(id:, email:, name:, username:) # The user this membership belongs to # # @param id [String] The internal ID of the user. # + # @param email [String, nil] The email of the user + # # @param name [String, nil] The name of the user from their Whop account. # # @param username [String] The username of the user from their Whop account. diff --git a/lib/whop_sdk/models/membership_list_response.rb b/lib/whop_sdk/models/membership_list_response.rb index 4fcc5262..effab758 100644 --- a/lib/whop_sdk/models/membership_list_response.rb +++ b/lib/whop_sdk/models/membership_list_response.rb @@ -17,6 +17,13 @@ class MembershipListResponse < WhopSDK::Internal::Type::BaseModel # @return [Boolean] required :cancel_at_period_end, WhopSDK::Internal::Type::Boolean + # @!attribute cancel_option + # The different reasons a user can choose for why they are canceling their + # membership. + # + # @return [Symbol, WhopSDK::Models::MembershipListResponse::CancelOption, nil] + required :cancel_option, enum: -> { WhopSDK::Models::MembershipListResponse::CancelOption }, nil?: true + # @!attribute canceled_at # The epoch timestamp of when the customer initiated a cancellation. # @@ -128,7 +135,7 @@ class MembershipListResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::MembershipListResponse::User, nil] required :user, -> { WhopSDK::Models::MembershipListResponse::User }, nil?: true - # @!method initialize(id:, cancel_at_period_end:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:) + # @!method initialize(id:, cancel_at_period_end:, cancel_option:, canceled_at:, cancellation_reason:, company:, created_at:, currency:, license_key:, manage_url:, member:, metadata:, payment_collection_paused:, plan:, product:, promo_code:, renewal_period_end:, renewal_period_start:, status:, updated_at:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::MembershipListResponse} for more details. # @@ -139,6 +146,8 @@ class MembershipListResponse < WhopSDK::Internal::Type::BaseModel # # @param cancel_at_period_end [Boolean] Whether this Membership is set to cancel at the end of the current billing cycle # + # @param cancel_option [Symbol, WhopSDK::Models::MembershipListResponse::CancelOption, nil] The different reasons a user can choose for why they are canceling their members + # # @param canceled_at [Time, nil] The epoch timestamp of when the customer initiated a cancellation. # # @param cancellation_reason [String, nil] The reason that the member canceled the membership (filled out by the member). @@ -175,6 +184,25 @@ class MembershipListResponse < WhopSDK::Internal::Type::BaseModel # # @param user [WhopSDK::Models::MembershipListResponse::User, nil] The user this membership belongs to + # The different reasons a user can choose for why they are canceling their + # membership. + # + # @see WhopSDK::Models::MembershipListResponse#cancel_option + module CancelOption + extend WhopSDK::Internal::Type::Enum + + TOO_EXPENSIVE = :too_expensive + SWITCHING = :switching + MISSING_FEATURES = :missing_features + TECHNICAL_ISSUES = :technical_issues + BAD_EXPERIENCE = :bad_experience + OTHER = :other + TESTING = :testing + + # @!method self.values + # @return [Array] + end + # @see WhopSDK::Models::MembershipListResponse#company class Company < WhopSDK::Internal::Type::BaseModel # @!attribute id @@ -269,6 +297,12 @@ class User < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute email + # The email of the user + # + # @return [String, nil] + required :email, String, nil?: true + # @!attribute name # The name of the user from their Whop account. # @@ -281,11 +315,13 @@ class User < WhopSDK::Internal::Type::BaseModel # @return [String] required :username, String - # @!method initialize(id:, name:, username:) + # @!method initialize(id:, email:, name:, username:) # The user this membership belongs to # # @param id [String] The internal ID of the user. # + # @param email [String, nil] The email of the user + # # @param name [String, nil] The name of the user from their Whop account. # # @param username [String] The username of the user from their Whop account. diff --git a/lib/whop_sdk/models/message_create_params.rb b/lib/whop_sdk/models/message_create_params.rb index 37027936..130744eb 100644 --- a/lib/whop_sdk/models/message_create_params.rb +++ b/lib/whop_sdk/models/message_create_params.rb @@ -22,9 +22,9 @@ class MessageCreateParams < WhopSDK::Internal::Type::BaseModel # @!attribute attachments # The attachments for this message, such as videos or images. # - # @return [Array, nil] + # @return [Array, nil] optional :attachments, - -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageCreateParams::Attachment] }, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::MessageCreateParams::Attachment] }, nil?: true # @!attribute poll @@ -38,62 +38,23 @@ class MessageCreateParams < WhopSDK::Internal::Type::BaseModel # # @param content [String] The content of the message in Markdown format. # - # @param attachments [Array, nil] The attachments for this message, such as videos or images. + # @param attachments [Array, nil] The attachments for this message, such as videos or images. # # @param poll [WhopSDK::Models::MessageCreateParams::Poll, nil] The poll for this message # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID} for - # more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end + class Attachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String - # @!method self.variants - # @return [Array(WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageCreateParams::Attachment::AttachmentInputWithID)] + # @!method initialize(id:) + # Input for an attachment + # + # @param id [String] The ID of an existing file object. end class Poll < WhopSDK::Internal::Type::BaseModel diff --git a/lib/whop_sdk/models/message_update_params.rb b/lib/whop_sdk/models/message_update_params.rb index b043689e..33232102 100644 --- a/lib/whop_sdk/models/message_update_params.rb +++ b/lib/whop_sdk/models/message_update_params.rb @@ -10,9 +10,9 @@ class MessageUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute attachments # The attachments for this message # - # @return [Array, nil] + # @return [Array, nil] optional :attachments, - -> { WhopSDK::Internal::Type::ArrayOf[union: WhopSDK::MessageUpdateParams::Attachment] }, + -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::MessageUpdateParams::Attachment] }, nil?: true # @!attribute content @@ -28,7 +28,7 @@ class MessageUpdateParams < WhopSDK::Internal::Type::BaseModel optional :is_pinned, WhopSDK::Internal::Type::Boolean, nil?: true # @!method initialize(attachments: nil, content: nil, is_pinned: nil, request_options: {}) - # @param attachments [Array, nil] The attachments for this message + # @param attachments [Array, nil] The attachments for this message # # @param content [String, nil] The content of the message in Markdown format # @@ -36,56 +36,17 @@ class MessageUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID} for - # more details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::MessageUpdateParams::Attachment::AttachmentInputWithID)] + class Attachment < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # Input for an attachment + # + # @param id [String] The ID of an existing file object. end end end diff --git a/lib/whop_sdk/models/payment.rb b/lib/whop_sdk/models/payment.rb index 1e4b218e..c6f6d0e0 100644 --- a/lib/whop_sdk/models/payment.rb +++ b/lib/whop_sdk/models/payment.rb @@ -100,6 +100,12 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute next_payment_attempt + # The time of the next schedule payment retry. + # + # @return [Time, nil] + required :next_payment_attempt, Time, nil?: true + # @!attribute paid_at # The datetime the payment was paid # @@ -118,6 +124,12 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true + # @!attribute payments_failed + # The number of failed payment attempts for the payment. + # + # @return [Integer, nil] + required :payments_failed, Integer, nil?: true + # @!attribute plan # The plan attached to this payment. # @@ -206,7 +218,7 @@ class Payment < WhopSDK::Internal::Type::BaseModel # @return [Boolean] required :voidable, WhopSDK::Internal::Type::Boolean - # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:) + # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, next_payment_attempt:, paid_at:, payment_method:, payment_method_type:, payments_failed:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:) # Some parameter documentations has been truncated, see {WhopSDK::Models::Payment} # for more details. # @@ -244,12 +256,16 @@ class Payment < WhopSDK::Internal::Type::BaseModel # # @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied over to the chec # + # @param next_payment_attempt [Time, nil] The time of the next schedule payment retry. + # # @param paid_at [Time, nil] The datetime the payment was paid # # @param payment_method [WhopSDK::Models::Payment::PaymentMethod, nil] The payment method used for the payment, if available. # # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used. # + # @param payments_failed [Integer, nil] The number of failed payment attempts for the payment. + # # @param plan [WhopSDK::Models::Payment::Plan, nil] The plan attached to this payment. # # @param product [WhopSDK::Models::Payment::Product, nil] The product this payment was made for diff --git a/lib/whop_sdk/models/payment_list_response.rb b/lib/whop_sdk/models/payment_list_response.rb index 3541ebf4..9ea476b6 100644 --- a/lib/whop_sdk/models/payment_list_response.rb +++ b/lib/whop_sdk/models/payment_list_response.rb @@ -101,6 +101,12 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # @return [Hash{Symbol=>Object}, nil] required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true + # @!attribute next_payment_attempt + # The time of the next schedule payment retry. + # + # @return [Time, nil] + required :next_payment_attempt, Time, nil?: true + # @!attribute paid_at # The datetime the payment was paid # @@ -119,6 +125,12 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true + # @!attribute payments_failed + # The number of failed payment attempts for the payment. + # + # @return [Integer, nil] + required :payments_failed, Integer, nil?: true + # @!attribute plan # The plan attached to this payment. # @@ -207,7 +219,7 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # @return [Boolean] required :voidable, WhopSDK::Internal::Type::Boolean - # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:) + # @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, next_payment_attempt:, paid_at:, payment_method:, payment_method_type:, payments_failed:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PaymentListResponse} for more details. # @@ -245,12 +257,16 @@ class PaymentListResponse < WhopSDK::Internal::Type::BaseModel # # @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied over to the chec # + # @param next_payment_attempt [Time, nil] The time of the next schedule payment retry. + # # @param paid_at [Time, nil] The datetime the payment was paid # # @param payment_method [WhopSDK::Models::PaymentListResponse::PaymentMethod, nil] The payment method used for the payment, if available. # # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used. # + # @param payments_failed [Integer, nil] The number of failed payment attempts for the payment. + # # @param plan [WhopSDK::Models::PaymentListResponse::Plan, nil] The plan attached to this payment. # # @param product [WhopSDK::Models::PaymentListResponse::Product, nil] The product this payment was made for diff --git a/lib/whop_sdk/models/payment_method_types.rb b/lib/whop_sdk/models/payment_method_types.rb index 10dc7045..9c3c8dae 100644 --- a/lib/whop_sdk/models/payment_method_types.rb +++ b/lib/whop_sdk/models/payment_method_types.rb @@ -6,91 +6,92 @@ module Models module PaymentMethodTypes extend WhopSDK::Internal::Type::Enum + ACSS_DEBIT = :acss_debit + AFFIRM = :affirm AFTERPAY_CLEARPAY = :afterpay_clearpay ALIPAY = :alipay + ALMA = :alma AMAZON_PAY = :amazon_pay + APPLE = :apple APPLE_PAY = :apple_pay + AU_BECS_DEBIT = :au_becs_debit + BACS_DEBIT = :bacs_debit BANCONTACT = :bancontact + BILLIE = :billie + BIZUM = :bizum + BLIK = :blik + BOLETO = :boleto + CAPCHASE_PAY = :capchase_pay CARD = :card CASHAPP = :cashapp + COINBASE = :coinbase CRYPTO = :crypto + CUSTOM = :custom + CUSTOMER_BALANCE = :customer_balance + DEMO_PAY = :demo_pay + EPS = :eps + EU_BANK_TRANSFER = :eu_bank_transfer + FPX = :fpx + GIROPAY = :giropay GOOGLE_PAY = :google_pay + GOPAY = :gopay + GRABPAY = :grabpay + ID_BANK_TRANSFER = :id_bank_transfer IDEAL = :ideal + KAKAO_PAY = :kakao_pay KLARNA = :klarna + KONBINI = :konbini + KR_CARD = :kr_card + KR_MARKET = :kr_market + KRIYA = :kriya + LINK = :link + MB_WAY = :mb_way MOBILEPAY = :mobilepay - SEPA_DEBIT = :sepa_debit - SWISH = :swish - TWINT = :twint - US_BANK_ACCOUNT = :us_bank_account - ZIP = :zip - VIPPS = :vipps - PAYPAL = :paypal - SEZZLE = :sezzle - COINBASE = :coinbase - SPLITIT = :splitit - PLATFORM_BALANCE = :platform_balance - APPLE = :apple - VENMO = :venmo - AFFIRM = :affirm + MONDU = :mondu MULTIBANCO = :multibanco - WECHAT_PAY = :wechat_pay NAVER_PAY = :naver_pay + NETBANKING = :netbanking + NG_BANK = :ng_bank + NG_BANK_TRANSFER = :ng_bank_transfer + NG_CARD = :ng_card + NG_MARKET = :ng_market + NG_USSD = :ng_ussd + NG_WALLET = :ng_wallet NZ_BANK_ACCOUNT = :nz_bank_account OXXO = :oxxo P24 = :p24 PAY_BY_BANK = :pay_by_bank PAYCO = :payco PAYNOW = :paynow + PAYPAL = :paypal + PAYPAY = :paypay + PAYTO = :payto PIX = :pix + PLATFORM_BALANCE = :platform_balance PROMPTPAY = :promptpay + QRIS = :qris + RECHNUNG = :rechnung REVOLUT_PAY = :revolut_pay SAMSUNG_PAY = :samsung_pay SATISPAY = :satispay - SOFORT = :sofort - KONBINI = :konbini - KR_CARD = :kr_card - LINK = :link - GRABPAY = :grabpay - KAKAO_PAY = :kakao_pay - BILLIE = :billie - BLIK = :blik - BOLETO = :boleto - EPS = :eps - FPX = :fpx - GIROPAY = :giropay - ACSS_DEBIT = :acss_debit - ALMA = :alma - AU_BECS_DEBIT = :au_becs_debit - BACS_DEBIT = :bacs_debit - BIZUM = :bizum - CAPCHASE_PAY = :capchase_pay - KRIYA = :kriya - MONDU = :mondu - NG_WALLET = :ng_wallet - PAYPAY = :paypay - SEQURA = :sequra SCALAPAY = :scalapay - CUSTOM = :custom - CUSTOMER_BALANCE = :customer_balance - GOPAY = :gopay - MB_WAY = :mb_way - NG_BANK = :ng_bank - NG_BANK_TRANSFER = :ng_bank_transfer - NG_CARD = :ng_card - NG_MARKET = :ng_market - NG_USSD = :ng_ussd - PAYTO = :payto - QRIS = :qris - RECHNUNG = :rechnung - SOUTH_KOREA_MARKET = :south_korea_market - KR_MARKET = :kr_market + SEPA_DEBIT = :sepa_debit + SEQURA = :sequra + SEZZLE = :sezzle + SHOP_PAY = :shop_pay SHOPEEPAY = :shopeepay - UPI = :upi + SOFORT = :sofort + SOUTH_KOREA_MARKET = :south_korea_market + SPLITIT = :splitit SUNBIT = :sunbit - NETBANKING = :netbanking - ID_BANK_TRANSFER = :id_bank_transfer - DEMO_PAY = :demo_pay - SHOP_PAY = :shop_pay + SWISH = :swish + TWINT = :twint + UPI = :upi + US_BANK_ACCOUNT = :us_bank_account + VENMO = :venmo + VIPPS = :vipps + WECHAT_PAY = :wechat_pay + ZIP = :zip UNKNOWN = :unknown # @!method self.values diff --git a/lib/whop_sdk/models/payment_provider.rb b/lib/whop_sdk/models/payment_provider.rb index 21cf29e0..a02c6095 100644 --- a/lib/whop_sdk/models/payment_provider.rb +++ b/lib/whop_sdk/models/payment_provider.rb @@ -14,6 +14,7 @@ module PaymentProvider SPLITIT = :splitit PLATFORM_BALANCE = :platform_balance MULTI_PSP = :multi_psp + ADYEN = :adyen # @!method self.values # @return [Array] diff --git a/lib/whop_sdk/models/payout_method_created_webhook_event.rb b/lib/whop_sdk/models/payout_method_created_webhook_event.rb index 8e52228a..9151386d 100644 --- a/lib/whop_sdk/models/payout_method_created_webhook_event.rb +++ b/lib/whop_sdk/models/payout_method_created_webhook_event.rb @@ -60,12 +60,25 @@ class Data < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute account_reference + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + # + # @return [String, nil] + required :account_reference, String, nil?: true + # @!attribute company # The company associated with the payout token # # @return [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Company, nil] required :company, -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company }, nil?: true + # @!attribute created_at + # The date and time the payout token was created + # + # @return [Time] + required :created_at, Time + # @!attribute currency # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. @@ -79,6 +92,12 @@ class Data < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination, nil] required :destination, -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination }, nil?: true + # @!attribute institution_name + # The name of the bank or financial institution. + # + # @return [String, nil] + required :institution_name, String, nil?: true + # @!attribute is_default # Whether this payout token is the default for the payout account # @@ -92,7 +111,7 @@ class Data < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :nickname, String, nil?: true - # @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:) + # @!method initialize(id:, account_reference:, company:, created_at:, currency:, destination:, institution_name:, is_default:, nickname:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data} for more details. # @@ -100,12 +119,18 @@ class Data < WhopSDK::Internal::Type::BaseModel # # @param id [String] The ID of the payout token # + # @param account_reference [String, nil] A reference to identify the payout destination, such as the last 4 digits of an + # # @param company [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Company, nil] The company associated with the payout token # + # @param created_at [Time] The date and time the payout token was created + # # @param currency [String] The currency code of the payout destination. This is the currency that payouts w # # @param destination [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination, nil] The payout destination associated with the payout token # + # @param institution_name [String, nil] The name of the bank or financial institution. + # # @param is_default [Boolean] Whether this payout token is the default for the payout account # # @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is diff --git a/lib/whop_sdk/models/payout_method_list_response.rb b/lib/whop_sdk/models/payout_method_list_response.rb index 44e6ccb0..706c7ef3 100644 --- a/lib/whop_sdk/models/payout_method_list_response.rb +++ b/lib/whop_sdk/models/payout_method_list_response.rb @@ -10,12 +10,25 @@ class PayoutMethodListResponse < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute account_reference + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + # + # @return [String, nil] + required :account_reference, String, nil?: true + # @!attribute company # The company associated with the payout token # # @return [WhopSDK::Models::PayoutMethodListResponse::Company, nil] required :company, -> { WhopSDK::Models::PayoutMethodListResponse::Company }, nil?: true + # @!attribute created_at + # The date and time the payout token was created + # + # @return [Time] + required :created_at, Time + # @!attribute currency # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. @@ -29,6 +42,12 @@ class PayoutMethodListResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::PayoutMethodListResponse::Destination, nil] required :destination, -> { WhopSDK::Models::PayoutMethodListResponse::Destination }, nil?: true + # @!attribute institution_name + # The name of the bank or financial institution. + # + # @return [String, nil] + required :institution_name, String, nil?: true + # @!attribute is_default # Whether this payout token is the default for the payout account # @@ -42,7 +61,7 @@ class PayoutMethodListResponse < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :nickname, String, nil?: true - # @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:) + # @!method initialize(id:, account_reference:, company:, created_at:, currency:, destination:, institution_name:, is_default:, nickname:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PayoutMethodListResponse} for more details. # @@ -50,12 +69,18 @@ class PayoutMethodListResponse < WhopSDK::Internal::Type::BaseModel # # @param id [String] The ID of the payout token # + # @param account_reference [String, nil] A reference to identify the payout destination, such as the last 4 digits of an + # # @param company [WhopSDK::Models::PayoutMethodListResponse::Company, nil] The company associated with the payout token # + # @param created_at [Time] The date and time the payout token was created + # # @param currency [String] The currency code of the payout destination. This is the currency that payouts w # # @param destination [WhopSDK::Models::PayoutMethodListResponse::Destination, nil] The payout destination associated with the payout token # + # @param institution_name [String, nil] The name of the bank or financial institution. + # # @param is_default [Boolean] Whether this payout token is the default for the payout account # # @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is diff --git a/lib/whop_sdk/models/payout_method_retrieve_response.rb b/lib/whop_sdk/models/payout_method_retrieve_response.rb index 054f2c58..79cc4907 100644 --- a/lib/whop_sdk/models/payout_method_retrieve_response.rb +++ b/lib/whop_sdk/models/payout_method_retrieve_response.rb @@ -10,12 +10,25 @@ class PayoutMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @return [String] required :id, String + # @!attribute account_reference + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + # + # @return [String, nil] + required :account_reference, String, nil?: true + # @!attribute company # The company associated with the payout token # # @return [WhopSDK::Models::PayoutMethodRetrieveResponse::Company, nil] required :company, -> { WhopSDK::Models::PayoutMethodRetrieveResponse::Company }, nil?: true + # @!attribute created_at + # The date and time the payout token was created + # + # @return [Time] + required :created_at, Time + # @!attribute currency # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. @@ -29,6 +42,12 @@ class PayoutMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::PayoutMethodRetrieveResponse::Destination, nil] required :destination, -> { WhopSDK::Models::PayoutMethodRetrieveResponse::Destination }, nil?: true + # @!attribute institution_name + # The name of the bank or financial institution. + # + # @return [String, nil] + required :institution_name, String, nil?: true + # @!attribute is_default # Whether this payout token is the default for the payout account # @@ -42,7 +61,7 @@ class PayoutMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :nickname, String, nil?: true - # @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:) + # @!method initialize(id:, account_reference:, company:, created_at:, currency:, destination:, institution_name:, is_default:, nickname:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PayoutMethodRetrieveResponse} for more details. # @@ -50,12 +69,18 @@ class PayoutMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel # # @param id [String] The ID of the payout token # + # @param account_reference [String, nil] A reference to identify the payout destination, such as the last 4 digits of an + # # @param company [WhopSDK::Models::PayoutMethodRetrieveResponse::Company, nil] The company associated with the payout token # + # @param created_at [Time] The date and time the payout token was created + # # @param currency [String] The currency code of the payout destination. This is the currency that payouts w # # @param destination [WhopSDK::Models::PayoutMethodRetrieveResponse::Destination, nil] The payout destination associated with the payout token # + # @param institution_name [String, nil] The name of the bank or financial institution. + # # @param is_default [Boolean] Whether this payout token is the default for the payout account # # @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is diff --git a/lib/whop_sdk/models/plan_create_params.rb b/lib/whop_sdk/models/plan_create_params.rb index a40bdd7e..34a19932 100644 --- a/lib/whop_sdk/models/plan_create_params.rb +++ b/lib/whop_sdk/models/plan_create_params.rb @@ -54,8 +54,8 @@ class PlanCreateParams < WhopSDK::Internal::Type::BaseModel # @!attribute image # An image for the plan. This will be visible on the product page to customers. # - # @return [WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID, nil] - optional :image, union: -> { WhopSDK::PlanCreateParams::Image }, nil?: true + # @return [WhopSDK::Models::PlanCreateParams::Image, nil] + optional :image, -> { WhopSDK::PlanCreateParams::Image }, nil?: true # @!attribute initial_price # An additional amount charged upon first purchase. Use only if a one time payment @@ -166,7 +166,7 @@ class PlanCreateParams < WhopSDK::Internal::Type::BaseModel # # @param expiration_days [Integer, nil] The interval at which the plan expires and revokes access (expiration plans). # - # @param image [WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers. + # @param image [WhopSDK::Models::PlanCreateParams::Image, nil] An image for the plan. This will be visible on the product page to customers. # # @param initial_price [Float, nil] An additional amount charged upon first purchase. Use only if a one time payment # @@ -249,56 +249,17 @@ class CustomField < WhopSDK::Internal::Type::BaseModel # @param field_type [Symbol, :text] The type of the custom field. end - # An image for the plan. This will be visible on the product page to customers. - module Image - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::PlanCreateParams::Image::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID} for more - # details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID)] + class Image < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # An image for the plan. This will be visible on the product page to customers. + # + # @param id [String] The ID of an existing file object. end class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel diff --git a/lib/whop_sdk/models/plan_update_params.rb b/lib/whop_sdk/models/plan_update_params.rb index 1f1b7310..55060326 100644 --- a/lib/whop_sdk/models/plan_update_params.rb +++ b/lib/whop_sdk/models/plan_update_params.rb @@ -42,8 +42,8 @@ class PlanUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute image # An image for the plan. This will be visible on the product page to customers. # - # @return [WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID, nil] - optional :image, union: -> { WhopSDK::PlanUpdateParams::Image }, nil?: true + # @return [WhopSDK::Models::PlanUpdateParams::Image, nil] + optional :image, -> { WhopSDK::PlanUpdateParams::Image }, nil?: true # @!attribute initial_price # An additional amount charged upon first purchase. @@ -149,7 +149,7 @@ class PlanUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans). # - # @param image [WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers. + # @param image [WhopSDK::Models::PlanUpdateParams::Image, nil] An image for the plan. This will be visible on the product page to customers. # # @param initial_price [Float, nil] An additional amount charged upon first purchase. # @@ -232,56 +232,17 @@ class CustomField < WhopSDK::Internal::Type::BaseModel # @param field_type [Symbol, :text] The type of the custom field. end - # An image for the plan. This will be visible on the product page to customers. - module Image - extend WhopSDK::Internal::Type::Union - - # Input for an attachment - variant -> { WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID } - - # Input for an attachment - variant -> { WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - # @!attribute direct_upload_id - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - # - # @return [String] - required :direct_upload_id, String - - # @!method initialize(direct_upload_id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID} - # for more details. - # - # Input for an attachment - # - # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - # @!attribute id - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - # - # @return [String] - required :id, String - - # @!method initialize(id:) - # Some parameter documentations has been truncated, see - # {WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID} for more - # details. - # - # Input for an attachment - # - # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k - end - - # @!method self.variants - # @return [Array(WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID)] + class Image < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The ID of an existing file object. + # + # @return [String] + required :id, String + + # @!method initialize(id:) + # An image for the plan. This will be visible on the product page to customers. + # + # @param id [String] The ID of an existing file object. end class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel diff --git a/lib/whop_sdk/models/withdrawal_create_params.rb b/lib/whop_sdk/models/withdrawal_create_params.rb index 7cc9deb8..c351e079 100644 --- a/lib/whop_sdk/models/withdrawal_create_params.rb +++ b/lib/whop_sdk/models/withdrawal_create_params.rb @@ -31,7 +31,23 @@ class WithdrawalCreateParams < WhopSDK::Internal::Type::BaseModel # @return [String, nil] optional :payout_method_id, String, nil?: true - # @!method initialize(amount:, company_id:, currency:, payout_method_id: nil, request_options: {}) + # @!attribute platform_covers_fees + # Whether the platform covers the payout fees instead of the connected account. + # + # @return [Boolean, nil] + optional :platform_covers_fees, WhopSDK::Internal::Type::Boolean, nil?: true + + # @!attribute statement_descriptor + # Custom statement descriptor for the withdrawal. Must be between 5 and 22 + # characters and contain only alphanumeric characters. + # + # @return [String, nil] + optional :statement_descriptor, String, nil?: true + + # @!method initialize(amount:, company_id:, currency:, payout_method_id: nil, platform_covers_fees: nil, statement_descriptor: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::WithdrawalCreateParams} for more details. + # # @param amount [Float] The amount to withdraw in the specified currency # # @param company_id [String] The ID of the company to withdraw from. @@ -40,6 +56,10 @@ class WithdrawalCreateParams < WhopSDK::Internal::Type::BaseModel # # @param payout_method_id [String, nil] The ID of the payout method to use for the withdrawal. # + # @param platform_covers_fees [Boolean, nil] Whether the platform covers the payout fees instead of the connected account. + # + # @param statement_descriptor [String, nil] Custom statement descriptor for the withdrawal. Must be between 5 and 22 charact + # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/whop_sdk/models/withdrawal_create_response.rb b/lib/whop_sdk/models/withdrawal_create_response.rb index e63db5d2..7396de90 100644 --- a/lib/whop_sdk/models/withdrawal_create_response.rb +++ b/lib/whop_sdk/models/withdrawal_create_response.rb @@ -98,13 +98,7 @@ class WithdrawalCreateResponse < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :trace_code, String, nil?: true - # @!attribute withdrawal_type - # The type of withdrawal. - # - # @return [Symbol, WhopSDK::Models::WithdrawalTypes] - required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes } - - # @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:) + # @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::WithdrawalCreateResponse} for more details. # @@ -139,8 +133,6 @@ class WithdrawalCreateResponse < WhopSDK::Internal::Type::BaseModel # @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal. # # @param trace_code [String, nil] The trace code for the payout, if applicable. Provided on ACH transactions when - # - # @param withdrawal_type [Symbol, WhopSDK::Models::WithdrawalTypes] The type of withdrawal. # The different error codes a payout can be in. # @@ -173,6 +165,7 @@ module ErrorCode INVALID_ACCOUNT_NUMBER = :invalid_account_number INVALID_BANK_CODE = :invalid_bank_code INVALID_BENEFICIARY = :invalid_beneficiary + INVALID_MAILING_ADDRESS = :invalid_mailing_address INVALID_BRANCH_NUMBER = :invalid_branch_number INVALID_BRANCH_CODE = :invalid_branch_code INVALID_PHONE_NUMBER = :invalid_phone_number diff --git a/lib/whop_sdk/models/withdrawal_created_webhook_event.rb b/lib/whop_sdk/models/withdrawal_created_webhook_event.rb index 2ab38aff..ef8e593b 100644 --- a/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +++ b/lib/whop_sdk/models/withdrawal_created_webhook_event.rb @@ -148,13 +148,7 @@ class Data < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :trace_code, String, nil?: true - # @!attribute withdrawal_type - # The type of withdrawal. - # - # @return [Symbol, WhopSDK::Models::WithdrawalTypes] - required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes } - - # @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:) + # @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data} for more details. # @@ -189,8 +183,6 @@ class Data < WhopSDK::Internal::Type::BaseModel # @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal. # # @param trace_code [String, nil] The trace code for the payout, if applicable. Provided on ACH transactions when - # - # @param withdrawal_type [Symbol, WhopSDK::Models::WithdrawalTypes] The type of withdrawal. # The different error codes a payout can be in. # @@ -223,6 +215,7 @@ module ErrorCode INVALID_ACCOUNT_NUMBER = :invalid_account_number INVALID_BANK_CODE = :invalid_bank_code INVALID_BENEFICIARY = :invalid_beneficiary + INVALID_MAILING_ADDRESS = :invalid_mailing_address INVALID_BRANCH_NUMBER = :invalid_branch_number INVALID_BRANCH_CODE = :invalid_branch_code INVALID_PHONE_NUMBER = :invalid_phone_number diff --git a/lib/whop_sdk/models/withdrawal_list_response.rb b/lib/whop_sdk/models/withdrawal_list_response.rb index 4fec6174..a8c6ec4a 100644 --- a/lib/whop_sdk/models/withdrawal_list_response.rb +++ b/lib/whop_sdk/models/withdrawal_list_response.rb @@ -61,13 +61,7 @@ class WithdrawalListResponse < WhopSDK::Internal::Type::BaseModel # @return [Symbol, WhopSDK::Models::WithdrawalStatus] required :status, enum: -> { WhopSDK::WithdrawalStatus } - # @!attribute withdrawal_type - # The type of withdrawal. - # - # @return [Symbol, WhopSDK::Models::WithdrawalTypes] - required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes } - - # @!method initialize(id:, amount:, created_at:, currency:, fee_amount:, fee_type:, markup_fee:, speed:, status:, withdrawal_type:) + # @!method initialize(id:, amount:, created_at:, currency:, fee_amount:, fee_type:, markup_fee:, speed:, status:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::WithdrawalListResponse} for more details. # @@ -90,8 +84,6 @@ class WithdrawalListResponse < WhopSDK::Internal::Type::BaseModel # @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal. # # @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal. - # - # @param withdrawal_type [Symbol, WhopSDK::Models::WithdrawalTypes] The type of withdrawal. end end end diff --git a/lib/whop_sdk/models/withdrawal_retrieve_response.rb b/lib/whop_sdk/models/withdrawal_retrieve_response.rb index 5065c685..1d5ed844 100644 --- a/lib/whop_sdk/models/withdrawal_retrieve_response.rb +++ b/lib/whop_sdk/models/withdrawal_retrieve_response.rb @@ -98,13 +98,7 @@ class WithdrawalRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :trace_code, String, nil?: true - # @!attribute withdrawal_type - # The type of withdrawal. - # - # @return [Symbol, WhopSDK::Models::WithdrawalTypes] - required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes } - - # @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:) + # @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::WithdrawalRetrieveResponse} for more details. # @@ -139,8 +133,6 @@ class WithdrawalRetrieveResponse < WhopSDK::Internal::Type::BaseModel # @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal. # # @param trace_code [String, nil] The trace code for the payout, if applicable. Provided on ACH transactions when - # - # @param withdrawal_type [Symbol, WhopSDK::Models::WithdrawalTypes] The type of withdrawal. # The different error codes a payout can be in. # @@ -173,6 +165,7 @@ module ErrorCode INVALID_ACCOUNT_NUMBER = :invalid_account_number INVALID_BANK_CODE = :invalid_bank_code INVALID_BENEFICIARY = :invalid_beneficiary + INVALID_MAILING_ADDRESS = :invalid_mailing_address INVALID_BRANCH_NUMBER = :invalid_branch_number INVALID_BRANCH_CODE = :invalid_branch_code INVALID_PHONE_NUMBER = :invalid_phone_number diff --git a/lib/whop_sdk/models/withdrawal_types.rb b/lib/whop_sdk/models/withdrawal_types.rb deleted file mode 100644 index 4781ce3a..00000000 --- a/lib/whop_sdk/models/withdrawal_types.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -module WhopSDK - module Models - # The types of withdrawals - module WithdrawalTypes - extend WhopSDK::Internal::Type::Enum - - REGULAR = :regular - CLAWBACK = :clawback - - # @!method self.values - # @return [Array] - end - end -end diff --git a/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb b/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb index 3133c4c1..30bc1e24 100644 --- a/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +++ b/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb @@ -148,13 +148,7 @@ class Data < WhopSDK::Internal::Type::BaseModel # @return [String, nil] required :trace_code, String, nil?: true - # @!attribute withdrawal_type - # The type of withdrawal. - # - # @return [Symbol, WhopSDK::Models::WithdrawalTypes] - required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes } - - # @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:) + # @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data} for more details. # @@ -189,8 +183,6 @@ class Data < WhopSDK::Internal::Type::BaseModel # @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal. # # @param trace_code [String, nil] The trace code for the payout, if applicable. Provided on ACH transactions when - # - # @param withdrawal_type [Symbol, WhopSDK::Models::WithdrawalTypes] The type of withdrawal. # The different error codes a payout can be in. # @@ -223,6 +215,7 @@ module ErrorCode INVALID_ACCOUNT_NUMBER = :invalid_account_number INVALID_BANK_CODE = :invalid_bank_code INVALID_BENEFICIARY = :invalid_beneficiary + INVALID_MAILING_ADDRESS = :invalid_mailing_address INVALID_BRANCH_NUMBER = :invalid_branch_number INVALID_BRANCH_CODE = :invalid_branch_code INVALID_PHONE_NUMBER = :invalid_phone_number diff --git a/lib/whop_sdk/resources/app_builds.rb b/lib/whop_sdk/resources/app_builds.rb index 27e150ea..bd4a5358 100644 --- a/lib/whop_sdk/resources/app_builds.rb +++ b/lib/whop_sdk/resources/app_builds.rb @@ -14,7 +14,7 @@ class AppBuilds # # @overload create(attachment:, checksum:, platform:, ai_prompt_id: nil, app_id: nil, supported_app_view_types: nil, request_options: {}) # - # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID] Attachment input for the app build file. This should be an upload in .zip format + # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment] Attachment input for the app build file. This should be an upload in .zip format # # @param checksum [String] Checksum of the app build file. This is generated by the client and used to veri # diff --git a/lib/whop_sdk/resources/apps.rb b/lib/whop_sdk/resources/apps.rb index 85c551c5..da02227a 100644 --- a/lib/whop_sdk/resources/apps.rb +++ b/lib/whop_sdk/resources/apps.rb @@ -10,7 +10,7 @@ class Apps # - `developer:create_app` # - `developer:manage_api_key` # - # @overload create(company_id:, name:, base_url: nil, request_options: {}) + # @overload create(company_id:, name:, base_url: nil, icon: nil, request_options: {}) # # @param company_id [String] The ID of the company to create the app for # @@ -18,6 +18,8 @@ class Apps # # @param base_url [String, nil] The base URL of the app to be created # + # @param icon [WhopSDK::Models::AppCreateParams::Icon, nil] The icon for the app in png, jpeg, or gif format + # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [WhopSDK::Models::App] @@ -77,7 +79,7 @@ def retrieve(id, params = {}) # # @param experience_path [String, nil] The path for the hub view of the app # - # @param icon [WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppUpdateParams::Icon::AttachmentInputWithID, nil] The icon for the app + # @param icon [WhopSDK::Models::AppUpdateParams::Icon, nil] The icon for the app # # @param name [String, nil] The name of the app # diff --git a/lib/whop_sdk/resources/checkout_configurations.rb b/lib/whop_sdk/resources/checkout_configurations.rb index b17ef7d0..500776bc 100644 --- a/lib/whop_sdk/resources/checkout_configurations.rb +++ b/lib/whop_sdk/resources/checkout_configurations.rb @@ -16,7 +16,7 @@ class CheckoutConfigurations # - `access_pass:update` # - `checkout_configuration:basic:read` # - # @overload create(plan:, plan_id:, company_id:, affiliate_code: nil, currency: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, mode: :setup, request_options: {}) + # @overload create(plan:, plan_id:, company_id:, affiliate_code: nil, currency: nil, metadata: nil, payment_method_configuration: nil, redirect_url: nil, source_url: nil, mode: :setup, request_options: {}) # # @param plan [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan] Pass this object to create a new plan for this checkout configuration # @@ -34,6 +34,8 @@ class CheckoutConfigurations # # @param redirect_url [String, nil] The URL to redirect the user to after the checkout configuration is created # + # @param source_url [String, nil] The URL of the page where the checkout is being initiated from. + # # @param mode [Symbol, :setup] # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] diff --git a/lib/whop_sdk/resources/companies.rb b/lib/whop_sdk/resources/companies.rb index 7491ac95..3c2ae750 100644 --- a/lib/whop_sdk/resources/companies.rb +++ b/lib/whop_sdk/resources/companies.rb @@ -13,7 +13,7 @@ class Companies # - `company:create_child` # - `company:basic:read` # - # @overload create(email:, parent_company_id:, title:, business_type: nil, industry_type: nil, metadata: nil, send_customer_emails: nil, request_options: {}) + # @overload create(email:, parent_company_id:, title:, business_type: nil, industry_type: nil, logo: nil, metadata: nil, send_customer_emails: nil, request_options: {}) # # @param email [String] The email of the user who the company will belong to. # @@ -25,6 +25,8 @@ class Companies # # @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in. # + # @param logo [WhopSDK::Models::CompanyCreateParams::Logo, nil] The logo for the company in png, jpeg, or gif format + # # @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account # # @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company. @@ -84,13 +86,13 @@ def retrieve(id, params = {}) # # @param id [String] The ID of the company to update # - # @param banner_image [WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithID, nil] The banner image for the company in png or jpeg format + # @param banner_image [WhopSDK::Models::CompanyUpdateParams::BannerImage, nil] The banner image for the company in png or jpeg format # # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be. # # @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in. # - # @param logo [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the company in png, jpeg, or gif format + # @param logo [WhopSDK::Models::CompanyUpdateParams::Logo, nil] The logo for the company in png, jpeg, or gif format # # @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company. # diff --git a/lib/whop_sdk/resources/course_lessons.rb b/lib/whop_sdk/resources/course_lessons.rb index dc0e0305..fbd67940 100644 --- a/lib/whop_sdk/resources/course_lessons.rb +++ b/lib/whop_sdk/resources/course_lessons.rb @@ -23,7 +23,7 @@ class CourseLessons # # @param embed_type [Symbol, WhopSDK::Models::EmbedType, nil] The type of embed for a lesson # - # @param thumbnail [WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the lesson in png, jpeg, or gif format + # @param thumbnail [WhopSDK::Models::CourseLessonCreateParams::Thumbnail, nil] The thumbnail for the lesson in png, jpeg, or gif format # # @param title [String, nil] The title of the lesson # @@ -84,7 +84,7 @@ def retrieve(id, params = {}) # # @param assessment_questions [Array, nil] Assessment questions for quiz/knowledge check lessons. Replaces all existing que # - # @param attachments [Array, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att + # @param attachments [Array, nil] General attachments for the lesson (PDFs, files, etc). Replaces all existing att # # @param content [String, nil] The content of the lesson # @@ -96,13 +96,13 @@ def retrieve(id, params = {}) # # @param lesson_type [Symbol, WhopSDK::Models::LessonTypes, nil] The available types for a lesson # - # @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, nil] The main PDF file for this lesson + # @param main_pdf [WhopSDK::Models::CourseLessonUpdateParams::MainPdf, nil] The main PDF file for this lesson # # @param max_attempts [Integer, nil] Maximum number of attempts allowed for assessments # # @param mux_asset_id [String, nil] The ID of the Mux asset to attach to this lesson for video lessons # - # @param thumbnail [WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the lesson in png, jpeg, or gif format + # @param thumbnail [WhopSDK::Models::CourseLessonUpdateParams::Thumbnail, nil] The thumbnail for the lesson in png, jpeg, or gif format # # @param title [String, nil] The title of the lesson # diff --git a/lib/whop_sdk/resources/courses.rb b/lib/whop_sdk/resources/courses.rb index 50c36781..577fe728 100644 --- a/lib/whop_sdk/resources/courses.rb +++ b/lib/whop_sdk/resources/courses.rb @@ -12,7 +12,7 @@ class Courses # # - `courses:update` # - # @overload create(experience_id:, title:, certificate_after_completion_enabled: nil, cover_image: nil, order: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, visibility: nil, request_options: {}) + # @overload create(experience_id:, title:, certificate_after_completion_enabled: nil, order: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, visibility: nil, request_options: {}) # # @param experience_id [String] The ID of the experience to create the course in # @@ -20,15 +20,13 @@ class Courses # # @param certificate_after_completion_enabled [Boolean, nil] Whether the course will award its students a PDF certificate after completing al # - # @param cover_image [String, nil] The cover image URL of the course - # # @param order [String, nil] The decimal order position of the course within its experience. If not provided, # # @param require_completing_lessons_in_order [Boolean, nil] Whether the course requires students to complete the previous lesson before movi # # @param tagline [String, nil] The tagline of the course # - # @param thumbnail [WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseCreateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the course in png, jpeg, or gif format + # @param thumbnail [WhopSDK::Models::CourseCreateParams::Thumbnail, nil] The thumbnail for the course in png, jpeg, or gif format # # @param visibility [Symbol, WhopSDK::Models::CourseVisibilities, nil] The available visibilities for a course. Determines how / whether a course is vi # @@ -81,7 +79,7 @@ def retrieve(id, params = {}) # # - `courses:update` # - # @overload update(id, certificate_after_completion_enabled: nil, chapters: nil, cover_image: nil, description: nil, language: nil, order: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, title: nil, visibility: nil, request_options: {}) + # @overload update(id, certificate_after_completion_enabled: nil, chapters: nil, description: nil, language: nil, order: nil, require_completing_lessons_in_order: nil, tagline: nil, thumbnail: nil, title: nil, visibility: nil, request_options: {}) # # @param id [String] The ID of the course to update # @@ -89,8 +87,6 @@ def retrieve(id, params = {}) # # @param chapters [Array, nil] The chapters and lessons to update # - # @param cover_image [String, nil] The cover image URL of the course - # # @param description [String, nil] A short description of the course # # @param language [Symbol, WhopSDK::Models::Languages, nil] The available languages for a course @@ -101,7 +97,7 @@ def retrieve(id, params = {}) # # @param tagline [String, nil] A short tagline for the course # - # @param thumbnail [WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, WhopSDK::Models::CourseUpdateParams::Thumbnail::AttachmentInputWithID, nil] The thumbnail for the course in png, jpeg, or gif format + # @param thumbnail [WhopSDK::Models::CourseUpdateParams::Thumbnail, nil] The thumbnail for the course in png, jpeg, or gif format # # @param title [String, nil] The title of the course # diff --git a/lib/whop_sdk/resources/disputes.rb b/lib/whop_sdk/resources/disputes.rb index ec929ca1..8e8dbef3 100644 --- a/lib/whop_sdk/resources/disputes.rb +++ b/lib/whop_sdk/resources/disputes.rb @@ -135,11 +135,11 @@ def submit_evidence(id, params = {}) # # @param billing_address [String, nil] The billing address of the user from their payment details. # - # @param cancellation_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID, nil] A file containing the cancellation policy from the company. + # @param cancellation_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment, nil] A file containing the cancellation policy from the company. # # @param cancellation_policy_disclosure [String, nil] A cancellation policy disclosure from the company. # - # @param customer_communication_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID, nil] A file containing the customer communication from the company (An image). + # @param customer_communication_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment, nil] A file containing the customer communication from the company (An image). # # @param customer_email_address [String, nil] The email of the customer from their payment details. # @@ -149,7 +149,7 @@ def submit_evidence(id, params = {}) # # @param product_description [String, nil] The description of the product from the company. # - # @param refund_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID, nil] A file containing the refund policy from the company. + # @param refund_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment, nil] A file containing the refund policy from the company. # # @param refund_policy_disclosure [String, nil] A refund policy disclosure from the company. # @@ -157,7 +157,7 @@ def submit_evidence(id, params = {}) # # @param service_date [String, nil] When the product was delivered by the company. # - # @param uncategorized_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID, nil] A file that does not fit in the other categories. + # @param uncategorized_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment, nil] A file that does not fit in the other categories. # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/lib/whop_sdk/resources/experiences.rb b/lib/whop_sdk/resources/experiences.rb index 8e908afb..c3e9b959 100644 --- a/lib/whop_sdk/resources/experiences.rb +++ b/lib/whop_sdk/resources/experiences.rb @@ -7,7 +7,7 @@ class Experiences # # - `experience:create` # - # @overload create(app_id:, company_id:, is_public: nil, name: nil, section_id: nil, request_options: {}) + # @overload create(app_id:, company_id:, is_public: nil, logo: nil, name: nil, section_id: nil, request_options: {}) # # @param app_id [String] The ID of the app to create the experience for # @@ -15,6 +15,8 @@ class Experiences # # @param is_public [Boolean, nil] Whether the experience is publicly accessible # + # @param logo [WhopSDK::Models::ExperienceCreateParams::Logo, nil] The logo for the experience + # # @param name [String, nil] The name of the experience # # @param section_id [String, nil] The ID of the section to create the experience in @@ -67,7 +69,7 @@ def retrieve(id, params = {}) # # @param is_public [Boolean, nil] Whether the experience is publicly accessible. # - # @param logo [WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::ExperienceUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the experience + # @param logo [WhopSDK::Models::ExperienceUpdateParams::Logo, nil] The logo for the experience # # @param name [String, nil] The name of the experience. # diff --git a/lib/whop_sdk/resources/forum_posts.rb b/lib/whop_sdk/resources/forum_posts.rb index dfbe00cc..4a955f25 100644 --- a/lib/whop_sdk/resources/forum_posts.rb +++ b/lib/whop_sdk/resources/forum_posts.rb @@ -16,7 +16,7 @@ class ForumPosts # # @param experience_id [String] The experience to create this post in # - # @param attachments [Array, nil] The attachments for this post + # @param attachments [Array, nil] The attachments for this post # # @param content [String, nil] This is the main body of the post in Markdown format. Hidden if paywalled and us # @@ -85,7 +85,7 @@ def retrieve(id, params = {}) # # @param id [String] The ID of the forum post to update # - # @param attachments [Array, nil] The attachments for this post + # @param attachments [Array, nil] The attachments for this post # # @param content [String, nil] This is the main body of the post in Markdown format. Hidden if paywalled and us # diff --git a/lib/whop_sdk/resources/memberships.rb b/lib/whop_sdk/resources/memberships.rb index 59360947..28f7948c 100644 --- a/lib/whop_sdk/resources/memberships.rb +++ b/lib/whop_sdk/resources/memberships.rb @@ -8,6 +8,7 @@ class Memberships # Required permissions: # # - `member:basic:read` + # - `member:email:read` # # @overload retrieve(id, request_options: {}) # @@ -32,6 +33,7 @@ def retrieve(id, params = {}) # Required permissions: # # - `member:manage` + # - `member:email:read` # - `member:basic:read` # # @overload update(id, metadata: nil, request_options: {}) @@ -61,6 +63,7 @@ def update(id, params = {}) # Required permissions: # # - `member:basic:read` + # - `member:email:read` # # @overload list(after: nil, before: nil, cancel_options: nil, company_id: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, plan_ids: nil, product_ids: nil, promo_code_ids: nil, statuses: nil, user_ids: nil, request_options: {}) # @@ -117,6 +120,7 @@ def list(params = {}) # Required permissions: # # - `member:manage` + # - `member:email:read` # - `member:basic:read` # # @overload cancel(id, cancellation_mode: nil, request_options: {}) @@ -149,6 +153,7 @@ def cancel(id, params = {}) # Required permissions: # # - `member:manage` + # - `member:email:read` # - `member:basic:read` # # @overload pause(id, void_payments: nil, request_options: {}) @@ -178,6 +183,7 @@ def pause(id, params = {}) # Required permissions: # # - `member:manage` + # - `member:email:read` # - `member:basic:read` # # @overload resume(id, request_options: {}) diff --git a/lib/whop_sdk/resources/messages.rb b/lib/whop_sdk/resources/messages.rb index 34a2e3d6..adcbdb3d 100644 --- a/lib/whop_sdk/resources/messages.rb +++ b/lib/whop_sdk/resources/messages.rb @@ -15,7 +15,7 @@ class Messages # # @param content [String] The content of the message in Markdown format. # - # @param attachments [Array, nil] The attachments for this message, such as videos or images. + # @param attachments [Array, nil] The attachments for this message, such as videos or images. # # @param poll [WhopSDK::Models::MessageCreateParams::Poll, nil] The poll for this message # @@ -65,7 +65,7 @@ def retrieve(id, params = {}) # # @param id [String] The ID of the message to update # - # @param attachments [Array, nil] The attachments for this message + # @param attachments [Array, nil] The attachments for this message # # @param content [String, nil] The content of the message in Markdown format # diff --git a/lib/whop_sdk/resources/notifications.rb b/lib/whop_sdk/resources/notifications.rb index 84e08bd5..02bbbcb6 100644 --- a/lib/whop_sdk/resources/notifications.rb +++ b/lib/whop_sdk/resources/notifications.rb @@ -8,6 +8,10 @@ class Notifications # # Queues a notification to be sent to users in an experience or company team # + # Required permissions: + # + # - `notification:create` + # # @overload create(company_id:, content:, title:, experience_id:, icon_user_id: nil, rest_path: nil, subtitle: nil, user_ids: nil, request_options: {}) # # @param company_id [String] The id of the company to target. Only team members of this company will receive diff --git a/lib/whop_sdk/resources/plans.rb b/lib/whop_sdk/resources/plans.rb index 0ab15e84..3fce3921 100644 --- a/lib/whop_sdk/resources/plans.rb +++ b/lib/whop_sdk/resources/plans.rb @@ -30,7 +30,7 @@ class Plans # # @param expiration_days [Integer, nil] The interval at which the plan expires and revokes access (expiration plans). # - # @param image [WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanCreateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers. + # @param image [WhopSDK::Models::PlanCreateParams::Image, nil] An image for the plan. This will be visible on the product page to customers. # # @param initial_price [Float, nil] An additional amount charged upon first purchase. Use only if a one time payment # @@ -119,7 +119,7 @@ def retrieve(id, params = {}) # # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans). # - # @param image [WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, WhopSDK::Models::PlanUpdateParams::Image::AttachmentInputWithID, nil] An image for the plan. This will be visible on the product page to customers. + # @param image [WhopSDK::Models::PlanUpdateParams::Image, nil] An image for the plan. This will be visible on the product page to customers. # # @param initial_price [Float, nil] An additional amount charged upon first purchase. # diff --git a/lib/whop_sdk/resources/withdrawals.rb b/lib/whop_sdk/resources/withdrawals.rb index 420c283f..9f30a971 100644 --- a/lib/whop_sdk/resources/withdrawals.rb +++ b/lib/whop_sdk/resources/withdrawals.rb @@ -3,6 +3,9 @@ module WhopSDK module Resources class Withdrawals + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::WithdrawalCreateParams} for more details. + # # Creates a withdrawal request for a ledger account # # Required permissions: @@ -10,7 +13,7 @@ class Withdrawals # - `payout:withdraw_funds` # - `payout:destination:read` # - # @overload create(amount:, company_id:, currency:, payout_method_id: nil, request_options: {}) + # @overload create(amount:, company_id:, currency:, payout_method_id: nil, platform_covers_fees: nil, statement_descriptor: nil, request_options: {}) # # @param amount [Float] The amount to withdraw in the specified currency # @@ -20,6 +23,10 @@ class Withdrawals # # @param payout_method_id [String, nil] The ID of the payout method to use for the withdrawal. # + # @param platform_covers_fees [Boolean, nil] Whether the platform covers the payout fees instead of the connected account. + # + # @param statement_descriptor [String, nil] Custom statement descriptor for the withdrawal. Must be between 5 and 22 charact + # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [WhopSDK::Models::WithdrawalCreateResponse] diff --git a/lib/whop_sdk/version.rb b/lib/whop_sdk/version.rb index 7d63d1f7..dbfd1797 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.23" + VERSION = "0.1.0" end diff --git a/rbi/whop_sdk/models.rbi b/rbi/whop_sdk/models.rbi index dd64a082..c4fee025 100644 --- a/rbi/whop_sdk/models.rbi +++ b/rbi/whop_sdk/models.rbi @@ -554,7 +554,5 @@ module WhopSDK WithdrawalStatus = WhopSDK::Models::WithdrawalStatus - WithdrawalTypes = WhopSDK::Models::WithdrawalTypes - WithdrawalUpdatedWebhookEvent = WhopSDK::Models::WithdrawalUpdatedWebhookEvent end diff --git a/rbi/whop_sdk/models/app_build_create_params.rbi b/rbi/whop_sdk/models/app_build_create_params.rbi index 5a9e9e8d..a1958751 100644 --- a/rbi/whop_sdk/models/app_build_create_params.rbi +++ b/rbi/whop_sdk/models/app_build_create_params.rbi @@ -14,15 +14,15 @@ module WhopSDK # Attachment input for the app build file. This should be an upload in .zip # format. The zip should contain at least one main_js_bundle.hbc file and # optionally an assets folder next to it. + sig { returns(WhopSDK::AppBuildCreateParams::Attachment) } + attr_reader :attachment + sig do - returns( - T.any( - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID - ) - ) + params( + attachment: WhopSDK::AppBuildCreateParams::Attachment::OrHash + ).void end - attr_accessor :attachment + attr_writer :attachment # Checksum of the app build file. This is generated by the client and used to # verify the integrity of the file that is submitted when un-packaged later on a @@ -50,11 +50,7 @@ module WhopSDK sig do params( - attachment: - T.any( - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID::OrHash - ), + attachment: WhopSDK::AppBuildCreateParams::Attachment::OrHash, checksum: String, platform: WhopSDK::AppBuildPlatforms::OrSymbol, ai_prompt_id: T.nilable(String), @@ -90,11 +86,7 @@ module WhopSDK sig do override.returns( { - attachment: - T.any( - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID - ), + attachment: WhopSDK::AppBuildCreateParams::Attachment, checksum: String, platform: WhopSDK::AppBuildPlatforms::OrSymbol, ai_prompt_id: T.nilable(String), @@ -108,86 +100,31 @@ module WhopSDK def to_hash end - # Attachment input for the app build file. This should be an upload in .zip - # format. The zip should contain at least one main_js_bundle.hbc file and - # optionally an assets folder next to it. - module Attachment - extend WhopSDK::Internal::Type::Union - - Variants = + class Attachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID + WhopSDK::AppBuildCreateParams::Attachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # Attachment input for the app build file. This should be an upload in .zip + # format. The zip should contain at least one main_js_bundle.hbc file and + # optionally an assets folder next to it. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::AppBuildCreateParams::Attachment::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/app_create_params.rbi b/rbi/whop_sdk/models/app_create_params.rbi index 884a656a..c7055c88 100644 --- a/rbi/whop_sdk/models/app_create_params.rbi +++ b/rbi/whop_sdk/models/app_create_params.rbi @@ -23,11 +23,21 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :base_url + # The icon for the app in png, jpeg, or gif format + sig { returns(T.nilable(WhopSDK::AppCreateParams::Icon)) } + attr_reader :icon + + sig do + params(icon: T.nilable(WhopSDK::AppCreateParams::Icon::OrHash)).void + end + attr_writer :icon + sig do params( company_id: String, name: String, base_url: T.nilable(String), + icon: T.nilable(WhopSDK::AppCreateParams::Icon::OrHash), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -38,6 +48,8 @@ module WhopSDK name:, # The base URL of the app to be created base_url: nil, + # The icon for the app in png, jpeg, or gif format + icon: nil, request_options: {} ) end @@ -48,12 +60,36 @@ module WhopSDK company_id: String, name: String, base_url: T.nilable(String), + icon: T.nilable(WhopSDK::AppCreateParams::Icon), request_options: WhopSDK::RequestOptions } ) end def to_hash end + + class Icon < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::AppCreateParams::Icon, WhopSDK::Internal::AnyHash) + end + + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id + + # The icon for the app in png, jpeg, or gif format + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end end end end diff --git a/rbi/whop_sdk/models/app_list_params.rbi b/rbi/whop_sdk/models/app_list_params.rbi index 398e7832..35de4705 100644 --- a/rbi/whop_sdk/models/app_list_params.rbi +++ b/rbi/whop_sdk/models/app_list_params.rbi @@ -153,6 +153,16 @@ module WhopSDK :daily_active_users, WhopSDK::AppListParams::Order::TaggedSymbol ) + AI_PROMPT_COUNT = + T.let(:ai_prompt_count, WhopSDK::AppListParams::Order::TaggedSymbol) + TOTAL_AI_COST_USD = + T.let(:total_ai_cost_usd, WhopSDK::AppListParams::Order::TaggedSymbol) + TOTAL_AI_TOKENS = + T.let(:total_ai_tokens, WhopSDK::AppListParams::Order::TaggedSymbol) + LAST_AI_PROMPT_AT = + T.let(:last_ai_prompt_at, WhopSDK::AppListParams::Order::TaggedSymbol) + AI_AVERAGE_RATING = + T.let(:ai_average_rating, WhopSDK::AppListParams::Order::TaggedSymbol) sig do override.returns( diff --git a/rbi/whop_sdk/models/app_update_params.rbi b/rbi/whop_sdk/models/app_update_params.rbi index 2f95732e..4b1cbdfc 100644 --- a/rbi/whop_sdk/models/app_update_params.rbi +++ b/rbi/whop_sdk/models/app_update_params.rbi @@ -40,17 +40,13 @@ module WhopSDK attr_accessor :experience_path # The icon for the app + sig { returns(T.nilable(WhopSDK::AppUpdateParams::Icon)) } + attr_reader :icon + sig do - returns( - T.nilable( - T.any( - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID - ) - ) - ) + params(icon: T.nilable(WhopSDK::AppUpdateParams::Icon::OrHash)).void end - attr_accessor :icon + attr_writer :icon # The name of the app sig { returns(T.nilable(String)) } @@ -77,13 +73,7 @@ module WhopSDK description: T.nilable(String), discover_path: T.nilable(String), experience_path: T.nilable(String), - icon: - T.nilable( - T.any( - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID::OrHash - ) - ), + icon: T.nilable(WhopSDK::AppUpdateParams::Icon::OrHash), name: T.nilable(String), required_scopes: T.nilable( @@ -130,13 +120,7 @@ module WhopSDK description: T.nilable(String), discover_path: T.nilable(String), experience_path: T.nilable(String), - icon: - T.nilable( - T.any( - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID - ) - ), + icon: T.nilable(WhopSDK::AppUpdateParams::Icon), name: T.nilable(String), required_scopes: T.nilable( @@ -150,82 +134,26 @@ module WhopSDK def to_hash end - # The icon for the app - module Icon - extend WhopSDK::Internal::Type::Union - - Variants = + class Icon < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do - T.any( - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID - ) + T.any(WhopSDK::AppUpdateParams::Icon, WhopSDK::Internal::AnyHash) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end + # The icon for the app + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns(T::Array[WhopSDK::AppUpdateParams::Icon::Variants]) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end diff --git a/rbi/whop_sdk/models/card_brands.rbi b/rbi/whop_sdk/models/card_brands.rbi index cec40b9f..c0fec0c4 100644 --- a/rbi/whop_sdk/models/card_brands.rbi +++ b/rbi/whop_sdk/models/card_brands.rbi @@ -26,6 +26,23 @@ module WhopSDK JCBRUPAY = T.let(:jcbrupay, WhopSDK::CardBrands::TaggedSymbol) ELO = T.let(:elo, WhopSDK::CardBrands::TaggedSymbol) MAESTRO = T.let(:maestro, WhopSDK::CardBrands::TaggedSymbol) + TARJETA_NARANJA = + T.let(:tarjeta_naranja, WhopSDK::CardBrands::TaggedSymbol) + CIRRUS = T.let(:cirrus, WhopSDK::CardBrands::TaggedSymbol) + NSPK_MIR = T.let(:nspk_mir, WhopSDK::CardBrands::TaggedSymbol) + VERVE = T.let(:verve, WhopSDK::CardBrands::TaggedSymbol) + EBT = T.let(:ebt, WhopSDK::CardBrands::TaggedSymbol) + PRIVATE_LABEL = T.let(:private_label, WhopSDK::CardBrands::TaggedSymbol) + LOCAL_BRAND = T.let(:local_brand, WhopSDK::CardBrands::TaggedSymbol) + UATP = T.let(:uatp, WhopSDK::CardBrands::TaggedSymbol) + WEXCARD = T.let(:wexcard, WhopSDK::CardBrands::TaggedSymbol) + UZCARD = T.let(:uzcard, WhopSDK::CardBrands::TaggedSymbol) + MEEZA = T.let(:meeza, WhopSDK::CardBrands::TaggedSymbol) + HRG_STORE_CARD = T.let(:hrg_store_card, WhopSDK::CardBrands::TaggedSymbol) + GIROCARD = T.let(:girocard, WhopSDK::CardBrands::TaggedSymbol) + FUEL_CARD = T.let(:fuel_card, WhopSDK::CardBrands::TaggedSymbol) + DANKORT = T.let(:dankort, WhopSDK::CardBrands::TaggedSymbol) + CARNET = T.let(:carnet, WhopSDK::CardBrands::TaggedSymbol) UNKNOWN = T.let(:unknown, WhopSDK::CardBrands::TaggedSymbol) sig { override.returns(T::Array[WhopSDK::CardBrands::TaggedSymbol]) } diff --git a/rbi/whop_sdk/models/checkout_configuration_create_params.rbi b/rbi/whop_sdk/models/checkout_configuration_create_params.rbi index 8984bf8c..bc1281cd 100644 --- a/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +++ b/rbi/whop_sdk/models/checkout_configuration_create_params.rbi @@ -66,6 +66,10 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :redirect_url + # The URL of the page where the checkout is being initiated from. + sig { returns(T.nilable(String)) } + attr_accessor :source_url + # The ID of the plan to use for the checkout configuration sig { returns(String) } attr_accessor :plan_id @@ -88,6 +92,7 @@ module WhopSDK WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration::OrHash ), redirect_url: T.nilable(String), + source_url: T.nilable(String), mode: Symbol, request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) @@ -112,6 +117,8 @@ module WhopSDK payment_method_configuration: nil, # The URL to redirect the user to after the checkout configuration is created redirect_url: nil, + # The URL of the page where the checkout is being initiated from. + source_url: nil, mode: :setup, request_options: {} ) @@ -130,6 +137,7 @@ module WhopSDK WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration ), redirect_url: T.nilable(String), + source_url: T.nilable(String), plan_id: String, company_id: String, request_options: WhopSDK::RequestOptions @@ -194,15 +202,20 @@ module WhopSDK # An image for the plan. This will be visible on the product page to customers. sig do returns( - T.nilable( - T.any( - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID - ) - ) + T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::Image) ) end - attr_accessor :image + attr_reader :image + + sig do + params( + image: + T.nilable( + WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::OrHash + ) + ).void + end + attr_writer :image # An additional amount charged upon first purchase. sig { returns(T.nilable(Float)) } @@ -277,6 +290,10 @@ module WhopSDK sig { returns(T.nilable(Integer)) } attr_accessor :split_pay_required_payments + # The number of units available for purchase. If not provided, stock is unlimited. + sig { returns(T.nilable(Integer)) } + attr_accessor :stock + # The title of the plan. This will be visible on the product page to customers. sig { returns(T.nilable(String)) } attr_accessor :title @@ -307,10 +324,7 @@ module WhopSDK force_create_new_plan: T.nilable(T::Boolean), image: T.nilable( - T.any( - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID::OrHash - ) + WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::OrHash ), initial_price: T.nilable(Float), internal_notes: T.nilable(String), @@ -328,6 +342,7 @@ module WhopSDK release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol), renewal_price: T.nilable(Float), split_pay_required_payments: T.nilable(Integer), + stock: T.nilable(Integer), title: T.nilable(String), trial_period_days: T.nilable(Integer), visibility: T.nilable(WhopSDK::Visibility::OrSymbol) @@ -378,6 +393,8 @@ module WhopSDK renewal_price: nil, # The number of payments required before pausing the subscription. split_pay_required_payments: nil, + # The number of units available for purchase. If not provided, stock is unlimited. + stock: nil, # The title of the plan. This will be visible on the product page to customers. title: nil, # The number of free trial days added before a renewal plan. @@ -405,10 +422,7 @@ module WhopSDK force_create_new_plan: T.nilable(T::Boolean), image: T.nilable( - T.any( - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID - ) + WhopSDK::CheckoutConfigurationCreateParams::Plan::Image ), initial_price: T.nilable(Float), internal_notes: T.nilable(String), @@ -426,6 +440,7 @@ module WhopSDK release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol), renewal_price: T.nilable(Float), split_pay_required_payments: T.nilable(Integer), + stock: T.nilable(Integer), title: T.nilable(String), trial_period_days: T.nilable(Integer), visibility: T.nilable(WhopSDK::Visibility::OrSymbol) @@ -510,86 +525,29 @@ module WhopSDK end end - # An image for the plan. This will be visible on the product page to customers. - module Image - extend WhopSDK::Internal::Type::Union - - Variants = + class Image < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID + WhopSDK::CheckoutConfigurationCreateParams::Plan::Image, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # An image for the plan. This will be visible on the product page to customers. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[ - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::Variants - ] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end diff --git a/rbi/whop_sdk/models/company_create_params.rbi b/rbi/whop_sdk/models/company_create_params.rbi index f0429973..6ab135c2 100644 --- a/rbi/whop_sdk/models/company_create_params.rbi +++ b/rbi/whop_sdk/models/company_create_params.rbi @@ -31,6 +31,15 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::IndustryTypes::OrSymbol)) } attr_accessor :industry_type + # The logo for the company in png, jpeg, or gif format + sig { returns(T.nilable(WhopSDK::CompanyCreateParams::Logo)) } + attr_reader :logo + + sig do + params(logo: T.nilable(WhopSDK::CompanyCreateParams::Logo::OrHash)).void + end + attr_writer :logo + # Additional metadata for the account sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } attr_accessor :metadata @@ -49,6 +58,7 @@ module WhopSDK title: String, business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol), industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol), + logo: T.nilable(WhopSDK::CompanyCreateParams::Logo::OrHash), metadata: T.nilable(T::Hash[Symbol, T.anything]), send_customer_emails: T.nilable(T::Boolean), request_options: WhopSDK::RequestOptions::OrHash @@ -65,6 +75,8 @@ module WhopSDK business_type: nil, # The different industry types a company can be in. industry_type: nil, + # The logo for the company in png, jpeg, or gif format + logo: nil, # Additional metadata for the account metadata: nil, # Whether Whop sends transactional emails to customers on behalf of this company. @@ -84,6 +96,7 @@ module WhopSDK title: String, business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol), industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol), + logo: T.nilable(WhopSDK::CompanyCreateParams::Logo), metadata: T.nilable(T::Hash[Symbol, T.anything]), send_customer_emails: T.nilable(T::Boolean), request_options: WhopSDK::RequestOptions @@ -92,6 +105,32 @@ module WhopSDK end def to_hash end + + class Logo < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::CompanyCreateParams::Logo, + WhopSDK::Internal::AnyHash + ) + end + + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id + + # The logo for the company in png, jpeg, or gif format + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end end end end diff --git a/rbi/whop_sdk/models/company_update_params.rbi b/rbi/whop_sdk/models/company_update_params.rbi index 185599c3..7950b3ca 100644 --- a/rbi/whop_sdk/models/company_update_params.rbi +++ b/rbi/whop_sdk/models/company_update_params.rbi @@ -12,17 +12,16 @@ module WhopSDK end # The banner image for the company in png or jpeg format + sig { returns(T.nilable(WhopSDK::CompanyUpdateParams::BannerImage)) } + attr_reader :banner_image + sig do - returns( - T.nilable( - T.any( - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID - ) - ) - ) + params( + banner_image: + T.nilable(WhopSDK::CompanyUpdateParams::BannerImage::OrHash) + ).void end - attr_accessor :banner_image + attr_writer :banner_image # The different business types a company can be. sig { returns(T.nilable(WhopSDK::BusinessTypes::OrSymbol)) } @@ -33,17 +32,13 @@ module WhopSDK attr_accessor :industry_type # The logo for the company in png, jpeg, or gif format + sig { returns(T.nilable(WhopSDK::CompanyUpdateParams::Logo)) } + attr_reader :logo + sig do - returns( - T.nilable( - T.any( - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID - ) - ) - ) + params(logo: T.nilable(WhopSDK::CompanyUpdateParams::Logo::OrHash)).void end - attr_accessor :logo + attr_writer :logo # Whether Whop sends transactional emails to customers on behalf of this company. # Includes: order confirmations, payment failures, refund notifications, upcoming @@ -59,21 +54,10 @@ module WhopSDK sig do params( banner_image: - T.nilable( - T.any( - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID::OrHash - ) - ), + T.nilable(WhopSDK::CompanyUpdateParams::BannerImage::OrHash), business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol), industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol), - logo: - T.nilable( - T.any( - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID::OrHash - ) - ), + logo: T.nilable(WhopSDK::CompanyUpdateParams::Logo::OrHash), send_customer_emails: T.nilable(T::Boolean), title: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash @@ -102,22 +86,10 @@ module WhopSDK sig do override.returns( { - banner_image: - T.nilable( - T.any( - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID - ) - ), + banner_image: T.nilable(WhopSDK::CompanyUpdateParams::BannerImage), business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol), industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol), - logo: - T.nilable( - T.any( - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID - ) - ), + logo: T.nilable(WhopSDK::CompanyUpdateParams::Logo), send_customer_emails: T.nilable(T::Boolean), title: T.nilable(String), request_options: WhopSDK::RequestOptions @@ -127,165 +99,55 @@ module WhopSDK def to_hash end - # The banner image for the company in png or jpeg format - module BannerImage - extend WhopSDK::Internal::Type::Union - - Variants = + class BannerImage < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID + WhopSDK::CompanyUpdateParams::BannerImage, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # The banner image for the company in png or jpeg format + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::CompanyUpdateParams::BannerImage::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end - # The logo for the company in png, jpeg, or gif format - module Logo - extend WhopSDK::Internal::Type::Union - - Variants = + class Logo < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID + WhopSDK::CompanyUpdateParams::Logo, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end + # The logo for the company in png, jpeg, or gif format + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::CompanyUpdateParams::Logo::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/course_create_params.rbi b/rbi/whop_sdk/models/course_create_params.rbi index aed8e396..24e67d84 100644 --- a/rbi/whop_sdk/models/course_create_params.rbi +++ b/rbi/whop_sdk/models/course_create_params.rbi @@ -24,10 +24,6 @@ module WhopSDK sig { returns(T.nilable(T::Boolean)) } attr_accessor :certificate_after_completion_enabled - # The cover image URL of the course - sig { returns(T.nilable(String)) } - attr_accessor :cover_image - # The decimal order position of the course within its experience. If not provided, # it will be set to the next sequential order. Use fractional values (e.g., 1.5) # to place between existing courses. @@ -44,17 +40,15 @@ module WhopSDK attr_accessor :tagline # The thumbnail for the course in png, jpeg, or gif format + sig { returns(T.nilable(WhopSDK::CourseCreateParams::Thumbnail)) } + attr_reader :thumbnail + sig do - returns( - T.nilable( - T.any( - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID - ) - ) - ) + params( + thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash) + ).void end - attr_accessor :thumbnail + attr_writer :thumbnail # The available visibilities for a course. Determines how / whether a course is # visible to users. @@ -66,17 +60,10 @@ module WhopSDK experience_id: String, title: String, certificate_after_completion_enabled: T.nilable(T::Boolean), - cover_image: T.nilable(String), order: T.nilable(String), require_completing_lessons_in_order: T.nilable(T::Boolean), tagline: T.nilable(String), - thumbnail: - T.nilable( - T.any( - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID::OrHash - ) - ), + thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash), visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) @@ -89,8 +76,6 @@ module WhopSDK # Whether the course will award its students a PDF certificate after completing # all lessons certificate_after_completion_enabled: nil, - # The cover image URL of the course - cover_image: nil, # The decimal order position of the course within its experience. If not provided, # it will be set to the next sequential order. Use fractional values (e.g., 1.5) # to place between existing courses. @@ -115,17 +100,10 @@ module WhopSDK experience_id: String, title: String, certificate_after_completion_enabled: T.nilable(T::Boolean), - cover_image: T.nilable(String), order: T.nilable(String), require_completing_lessons_in_order: T.nilable(T::Boolean), tagline: T.nilable(String), - thumbnail: - T.nilable( - T.any( - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID - ) - ), + thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail), visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions } @@ -134,84 +112,29 @@ module WhopSDK def to_hash end - # The thumbnail for the course in png, jpeg, or gif format - module Thumbnail - extend WhopSDK::Internal::Type::Union - - Variants = + class Thumbnail < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID + WhopSDK::CourseCreateParams::Thumbnail, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end + # The thumbnail for the course in png, jpeg, or gif format + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::CourseCreateParams::Thumbnail::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/course_lesson_create_params.rbi b/rbi/whop_sdk/models/course_lesson_create_params.rbi index a8fa0f0d..8bb7ce90 100644 --- a/rbi/whop_sdk/models/course_lesson_create_params.rbi +++ b/rbi/whop_sdk/models/course_lesson_create_params.rbi @@ -36,17 +36,16 @@ module WhopSDK attr_accessor :embed_type # The thumbnail for the lesson in png, jpeg, or gif format + sig { returns(T.nilable(WhopSDK::CourseLessonCreateParams::Thumbnail)) } + attr_reader :thumbnail + sig do - returns( - T.nilable( - T.any( - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID - ) - ) - ) + params( + thumbnail: + T.nilable(WhopSDK::CourseLessonCreateParams::Thumbnail::OrHash) + ).void end - attr_accessor :thumbnail + attr_writer :thumbnail # The title of the lesson sig { returns(T.nilable(String)) } @@ -61,12 +60,7 @@ module WhopSDK embed_id: T.nilable(String), embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol), thumbnail: - T.nilable( - T.any( - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID::OrHash - ) - ), + T.nilable(WhopSDK::CourseLessonCreateParams::Thumbnail::OrHash), title: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) @@ -101,13 +95,7 @@ module WhopSDK days_from_course_start_until_unlock: T.nilable(Integer), embed_id: T.nilable(String), embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol), - thumbnail: - T.nilable( - T.any( - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID - ) - ), + thumbnail: T.nilable(WhopSDK::CourseLessonCreateParams::Thumbnail), title: T.nilable(String), request_options: WhopSDK::RequestOptions } @@ -116,84 +104,29 @@ module WhopSDK def to_hash end - # The thumbnail for the lesson in png, jpeg, or gif format - module Thumbnail - extend WhopSDK::Internal::Type::Union - - Variants = + class Thumbnail < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID + WhopSDK::CourseLessonCreateParams::Thumbnail, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # The thumbnail for the lesson in png, jpeg, or gif format + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::CourseLessonCreateParams::Thumbnail::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/course_lesson_update_params.rbi b/rbi/whop_sdk/models/course_lesson_update_params.rbi index 14d58953..90674920 100644 --- a/rbi/whop_sdk/models/course_lesson_update_params.rbi +++ b/rbi/whop_sdk/models/course_lesson_update_params.rbi @@ -46,14 +46,7 @@ module WhopSDK # attachments. sig do returns( - T.nilable( - T::Array[ - T.any( - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID - ) - ] - ) + T.nilable(T::Array[WhopSDK::CourseLessonUpdateParams::Attachment]) ) end attr_accessor :attachments @@ -79,17 +72,16 @@ module WhopSDK attr_accessor :lesson_type # The main PDF file for this lesson + sig { returns(T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf)) } + attr_reader :main_pdf + sig do - returns( - T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID - ) - ) - ) + params( + main_pdf: + T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf::OrHash) + ).void end - attr_accessor :main_pdf + attr_writer :main_pdf # Maximum number of attempts allowed for assessments sig { returns(T.nilable(Integer)) } @@ -100,17 +92,16 @@ module WhopSDK attr_accessor :mux_asset_id # The thumbnail for the lesson in png, jpeg, or gif format + sig { returns(T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail)) } + attr_reader :thumbnail + sig do - returns( - T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID - ) - ) - ) + params( + thumbnail: + T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail::OrHash) + ).void end - attr_accessor :thumbnail + attr_writer :thumbnail # The title of the lesson sig { returns(T.nilable(String)) } @@ -135,12 +126,7 @@ module WhopSDK ), attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::CourseLessonUpdateParams::Attachment::OrHash] ), content: T.nilable(String), days_from_course_start_until_unlock: T.nilable(Integer), @@ -148,21 +134,11 @@ module WhopSDK embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol), lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol), main_pdf: - T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID::OrHash - ) - ), + T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf::OrHash), max_attempts: T.nilable(Integer), mux_asset_id: T.nilable(String), thumbnail: - T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID::OrHash - ) - ), + T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail::OrHash), title: T.nilable(String), visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash @@ -217,34 +193,17 @@ module WhopSDK ), attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID - ) - ] + T::Array[WhopSDK::CourseLessonUpdateParams::Attachment] ), content: T.nilable(String), days_from_course_start_until_unlock: T.nilable(Integer), embed_id: T.nilable(String), embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol), lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol), - main_pdf: - T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID - ) - ), + main_pdf: T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf), max_attempts: T.nilable(Integer), mux_asset_id: T.nilable(String), - thumbnail: - T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID - ) - ), + thumbnail: T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail), title: T.nilable(String), visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions @@ -332,14 +291,21 @@ module WhopSDK sig do returns( T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID - ) + WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image ) ) end - attr_accessor :image + attr_reader :image + + sig do + params( + image: + T.nilable( + WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::OrHash + ) + ).void + end + attr_writer :image # The answer options for multiple choice/select questions sig do @@ -362,10 +328,7 @@ module WhopSDK id: T.nilable(String), image: T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID::OrHash - ) + WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::OrHash ), options: T.nilable( @@ -401,10 +364,7 @@ module WhopSDK id: T.nilable(String), image: T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID - ) + WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image ), options: T.nilable( @@ -418,86 +378,29 @@ module WhopSDK def to_hash end - # Optional image attachment for the question - module Image - extend WhopSDK::Internal::Type::Union - - Variants = + class Image < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID + WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # Optional image attachment for the question + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[ - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::Variants - ] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end @@ -556,246 +459,81 @@ module WhopSDK end end - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - Variants = + class Attachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID + WhopSDK::CourseLessonUpdateParams::Attachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # Input for an attachment + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::CourseLessonUpdateParams::Attachment::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end - # The main PDF file for this lesson - module MainPdf - extend WhopSDK::Internal::Type::Union - - Variants = + class MainPdf < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID + WhopSDK::CourseLessonUpdateParams::MainPdf, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # The main PDF file for this lesson + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::CourseLessonUpdateParams::MainPdf::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end - # The thumbnail for the lesson in png, jpeg, or gif format - module Thumbnail - extend WhopSDK::Internal::Type::Union - - Variants = + class Thumbnail < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID + WhopSDK::CourseLessonUpdateParams::Thumbnail, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # The thumbnail for the lesson in png, jpeg, or gif format + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::CourseLessonUpdateParams::Thumbnail::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/course_update_params.rbi b/rbi/whop_sdk/models/course_update_params.rbi index 4197f0e9..c364e94f 100644 --- a/rbi/whop_sdk/models/course_update_params.rbi +++ b/rbi/whop_sdk/models/course_update_params.rbi @@ -20,10 +20,6 @@ module WhopSDK sig { returns(T.nilable(T::Array[WhopSDK::CourseUpdateParams::Chapter])) } attr_accessor :chapters - # The cover image URL of the course - sig { returns(T.nilable(String)) } - attr_accessor :cover_image - # A short description of the course sig { returns(T.nilable(String)) } attr_accessor :description @@ -47,17 +43,15 @@ module WhopSDK attr_accessor :tagline # The thumbnail for the course in png, jpeg, or gif format + sig { returns(T.nilable(WhopSDK::CourseUpdateParams::Thumbnail)) } + attr_reader :thumbnail + sig do - returns( - T.nilable( - T.any( - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID - ) - ) - ) + params( + thumbnail: T.nilable(WhopSDK::CourseUpdateParams::Thumbnail::OrHash) + ).void end - attr_accessor :thumbnail + attr_writer :thumbnail # The title of the course sig { returns(T.nilable(String)) } @@ -73,19 +67,12 @@ module WhopSDK certificate_after_completion_enabled: T.nilable(T::Boolean), chapters: T.nilable(T::Array[WhopSDK::CourseUpdateParams::Chapter::OrHash]), - cover_image: T.nilable(String), description: T.nilable(String), language: T.nilable(WhopSDK::Languages::OrSymbol), order: T.nilable(String), require_completing_lessons_in_order: T.nilable(T::Boolean), tagline: T.nilable(String), - thumbnail: - T.nilable( - T.any( - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID::OrHash - ) - ), + thumbnail: T.nilable(WhopSDK::CourseUpdateParams::Thumbnail::OrHash), title: T.nilable(String), visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash @@ -97,8 +84,6 @@ module WhopSDK certificate_after_completion_enabled: nil, # The chapters and lessons to update chapters: nil, - # The cover image URL of the course - cover_image: nil, # A short description of the course description: nil, # The available languages for a course @@ -127,19 +112,12 @@ module WhopSDK { certificate_after_completion_enabled: T.nilable(T::Boolean), chapters: T.nilable(T::Array[WhopSDK::CourseUpdateParams::Chapter]), - cover_image: T.nilable(String), description: T.nilable(String), language: T.nilable(WhopSDK::Languages::OrSymbol), order: T.nilable(String), require_completing_lessons_in_order: T.nilable(T::Boolean), tagline: T.nilable(String), - thumbnail: - T.nilable( - T.any( - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID - ) - ), + thumbnail: T.nilable(WhopSDK::CourseUpdateParams::Thumbnail), title: T.nilable(String), visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions @@ -274,84 +252,29 @@ module WhopSDK end end - # The thumbnail for the course in png, jpeg, or gif format - module Thumbnail - extend WhopSDK::Internal::Type::Union - - Variants = + class Thumbnail < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID + WhopSDK::CourseUpdateParams::Thumbnail, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # The thumbnail for the course in png, jpeg, or gif format + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::CourseUpdateParams::Thumbnail::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/dispute_update_evidence_params.rbi b/rbi/whop_sdk/models/dispute_update_evidence_params.rbi index fdd0faf8..5ea378fb 100644 --- a/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +++ b/rbi/whop_sdk/models/dispute_update_evidence_params.rbi @@ -26,14 +26,21 @@ module WhopSDK sig do returns( T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID - ) + WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment ) ) end - attr_accessor :cancellation_policy_attachment + attr_reader :cancellation_policy_attachment + + sig do + params( + cancellation_policy_attachment: + T.nilable( + WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::OrHash + ) + ).void + end + attr_writer :cancellation_policy_attachment # A cancellation policy disclosure from the company. sig { returns(T.nilable(String)) } @@ -43,14 +50,21 @@ module WhopSDK sig do returns( T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID - ) + WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment ) ) end - attr_accessor :customer_communication_attachment + attr_reader :customer_communication_attachment + + sig do + params( + customer_communication_attachment: + T.nilable( + WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::OrHash + ) + ).void + end + attr_writer :customer_communication_attachment # The email of the customer from their payment details. sig { returns(T.nilable(String)) } @@ -72,14 +86,21 @@ module WhopSDK sig do returns( T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID - ) + WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment ) ) end - attr_accessor :refund_policy_attachment + attr_reader :refund_policy_attachment + + sig do + params( + refund_policy_attachment: + T.nilable( + WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::OrHash + ) + ).void + end + attr_writer :refund_policy_attachment # A refund policy disclosure from the company. sig { returns(T.nilable(String)) } @@ -97,14 +118,21 @@ module WhopSDK sig do returns( T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID - ) + WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment ) ) end - attr_accessor :uncategorized_attachment + attr_reader :uncategorized_attachment + + sig do + params( + uncategorized_attachment: + T.nilable( + WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::OrHash + ) + ).void + end + attr_writer :uncategorized_attachment sig do params( @@ -112,18 +140,12 @@ module WhopSDK billing_address: T.nilable(String), cancellation_policy_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID::OrHash - ) + WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::OrHash ), cancellation_policy_disclosure: T.nilable(String), customer_communication_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID::OrHash - ) + WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::OrHash ), customer_email_address: T.nilable(String), customer_name: T.nilable(String), @@ -131,20 +153,14 @@ module WhopSDK product_description: T.nilable(String), refund_policy_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID::OrHash - ) + WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::OrHash ), refund_policy_disclosure: T.nilable(String), refund_refusal_explanation: T.nilable(String), service_date: T.nilable(String), uncategorized_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID::OrHash - ) + WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::OrHash ), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) @@ -189,18 +205,12 @@ module WhopSDK billing_address: T.nilable(String), cancellation_policy_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID - ) + WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment ), cancellation_policy_disclosure: T.nilable(String), customer_communication_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID - ) + WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment ), customer_email_address: T.nilable(String), customer_name: T.nilable(String), @@ -208,20 +218,14 @@ module WhopSDK product_description: T.nilable(String), refund_policy_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID - ) + WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment ), refund_policy_disclosure: T.nilable(String), refund_refusal_explanation: T.nilable(String), service_date: T.nilable(String), uncategorized_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID - ) + WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment ), request_options: WhopSDK::RequestOptions } @@ -230,335 +234,107 @@ module WhopSDK def to_hash end - # A file containing the cancellation policy from the company. - module CancellationPolicyAttachment - extend WhopSDK::Internal::Type::Union - - Variants = + class CancellationPolicyAttachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID + WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # A file containing the cancellation policy from the company. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[ - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::Variants - ] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end - # A file containing the customer communication from the company (An image). - module CustomerCommunicationAttachment - extend WhopSDK::Internal::Type::Union - - Variants = + class CustomerCommunicationAttachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID + WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # A file containing the customer communication from the company (An image). + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[ - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::Variants - ] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end - # A file containing the refund policy from the company. - module RefundPolicyAttachment - extend WhopSDK::Internal::Type::Union - - Variants = + class RefundPolicyAttachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID + WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # A file containing the refund policy from the company. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[ - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::Variants - ] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end - # A file that does not fit in the other categories. - module UncategorizedAttachment - extend WhopSDK::Internal::Type::Union - - Variants = + class UncategorizedAttachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID + WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # A file that does not fit in the other categories. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[ - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::Variants - ] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/experience_create_params.rbi b/rbi/whop_sdk/models/experience_create_params.rbi index f58959b5..bc73926f 100644 --- a/rbi/whop_sdk/models/experience_create_params.rbi +++ b/rbi/whop_sdk/models/experience_create_params.rbi @@ -23,6 +23,17 @@ module WhopSDK sig { returns(T.nilable(T::Boolean)) } attr_accessor :is_public + # The logo for the experience + sig { returns(T.nilable(WhopSDK::ExperienceCreateParams::Logo)) } + attr_reader :logo + + sig do + params( + logo: T.nilable(WhopSDK::ExperienceCreateParams::Logo::OrHash) + ).void + end + attr_writer :logo + # The name of the experience sig { returns(T.nilable(String)) } attr_accessor :name @@ -36,6 +47,7 @@ module WhopSDK app_id: String, company_id: String, is_public: T.nilable(T::Boolean), + logo: T.nilable(WhopSDK::ExperienceCreateParams::Logo::OrHash), name: T.nilable(String), section_id: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash @@ -48,6 +60,8 @@ module WhopSDK company_id:, # Whether the experience is publicly accessible is_public: nil, + # The logo for the experience + logo: nil, # The name of the experience name: nil, # The ID of the section to create the experience in @@ -62,6 +76,7 @@ module WhopSDK app_id: String, company_id: String, is_public: T.nilable(T::Boolean), + logo: T.nilable(WhopSDK::ExperienceCreateParams::Logo), name: T.nilable(String), section_id: T.nilable(String), request_options: WhopSDK::RequestOptions @@ -70,6 +85,32 @@ module WhopSDK end def to_hash end + + class Logo < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::ExperienceCreateParams::Logo, + WhopSDK::Internal::AnyHash + ) + end + + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id + + # The logo for the experience + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) + end + + sig { override.returns({ id: String }) } + def to_hash + end + end end end end diff --git a/rbi/whop_sdk/models/experience_update_params.rbi b/rbi/whop_sdk/models/experience_update_params.rbi index d6c1ce2c..45c2e7cb 100644 --- a/rbi/whop_sdk/models/experience_update_params.rbi +++ b/rbi/whop_sdk/models/experience_update_params.rbi @@ -24,17 +24,15 @@ module WhopSDK attr_accessor :is_public # The logo for the experience + sig { returns(T.nilable(WhopSDK::ExperienceUpdateParams::Logo)) } + attr_reader :logo + sig do - returns( - T.nilable( - T.any( - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID - ) - ) - ) + params( + logo: T.nilable(WhopSDK::ExperienceUpdateParams::Logo::OrHash) + ).void end - attr_accessor :logo + attr_writer :logo # The name of the experience. sig { returns(T.nilable(String)) } @@ -53,13 +51,7 @@ module WhopSDK access_level: T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol), is_public: T.nilable(T::Boolean), - logo: - T.nilable( - T.any( - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID::OrHash - ) - ), + logo: T.nilable(WhopSDK::ExperienceUpdateParams::Logo::OrHash), name: T.nilable(String), order: T.nilable(String), section_id: T.nilable(String), @@ -89,13 +81,7 @@ module WhopSDK access_level: T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol), is_public: T.nilable(T::Boolean), - logo: - T.nilable( - T.any( - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID - ) - ), + logo: T.nilable(WhopSDK::ExperienceUpdateParams::Logo), name: T.nilable(String), order: T.nilable(String), section_id: T.nilable(String), @@ -136,84 +122,29 @@ module WhopSDK end end - # The logo for the experience - module Logo - extend WhopSDK::Internal::Type::Union - - Variants = + class Logo < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID + WhopSDK::ExperienceUpdateParams::Logo, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # The logo for the experience + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::ExperienceUpdateParams::Logo::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/forum_post_create_params.rbi b/rbi/whop_sdk/models/forum_post_create_params.rbi index a5394d9c..ab28a873 100644 --- a/rbi/whop_sdk/models/forum_post_create_params.rbi +++ b/rbi/whop_sdk/models/forum_post_create_params.rbi @@ -17,16 +17,7 @@ module WhopSDK # The attachments for this post sig do - returns( - T.nilable( - T::Array[ - T.any( - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID - ) - ] - ) - ) + returns(T.nilable(T::Array[WhopSDK::ForumPostCreateParams::Attachment])) end attr_accessor :attachments @@ -83,12 +74,7 @@ module WhopSDK experience_id: String, attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::ForumPostCreateParams::Attachment::OrHash] ), content: T.nilable(String), is_mention: T.nilable(T::Boolean), @@ -139,14 +125,7 @@ module WhopSDK { experience_id: String, attachments: - T.nilable( - T::Array[ - T.any( - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID - ) - ] - ), + T.nilable(T::Array[WhopSDK::ForumPostCreateParams::Attachment]), content: T.nilable(String), is_mention: T.nilable(T::Boolean), parent_id: T.nilable(String), @@ -163,84 +142,29 @@ module WhopSDK def to_hash end - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - Variants = + class Attachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID + WhopSDK::ForumPostCreateParams::Attachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end + # Input for an attachment + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::ForumPostCreateParams::Attachment::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end diff --git a/rbi/whop_sdk/models/forum_post_update_params.rbi b/rbi/whop_sdk/models/forum_post_update_params.rbi index eb2ce45e..80cbc0ac 100644 --- a/rbi/whop_sdk/models/forum_post_update_params.rbi +++ b/rbi/whop_sdk/models/forum_post_update_params.rbi @@ -13,16 +13,7 @@ module WhopSDK # The attachments for this post sig do - returns( - T.nilable( - T::Array[ - T.any( - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID - ) - ] - ) - ) + returns(T.nilable(T::Array[WhopSDK::ForumPostUpdateParams::Attachment])) end attr_accessor :attachments @@ -47,12 +38,7 @@ module WhopSDK params( attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::ForumPostUpdateParams::Attachment::OrHash] ), content: T.nilable(String), is_pinned: T.nilable(T::Boolean), @@ -81,14 +67,7 @@ module WhopSDK override.returns( { attachments: - T.nilable( - T::Array[ - T.any( - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID - ) - ] - ), + T.nilable(T::Array[WhopSDK::ForumPostUpdateParams::Attachment]), content: T.nilable(String), is_pinned: T.nilable(T::Boolean), title: T.nilable(String), @@ -100,84 +79,29 @@ module WhopSDK def to_hash end - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - Variants = + class Attachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID + WhopSDK::ForumPostUpdateParams::Attachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end + # Input for an attachment + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::ForumPostUpdateParams::Attachment::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/friendly_receipt_status.rbi b/rbi/whop_sdk/models/friendly_receipt_status.rbi index 93fd738e..737b7381 100644 --- a/rbi/whop_sdk/models/friendly_receipt_status.rbi +++ b/rbi/whop_sdk/models/friendly_receipt_status.rbi @@ -10,32 +10,77 @@ module WhopSDK T.type_alias { T.all(Symbol, WhopSDK::FriendlyReceiptStatus) } OrSymbol = T.type_alias { T.any(Symbol, String) } + SUCCEEDED = + T.let(:succeeded, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + PENDING = T.let(:pending, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + FAILED = T.let(:failed, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + PAST_DUE = T.let(:past_due, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + CANCELED = T.let(:canceled, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + PRICE_TOO_LOW = + T.let(:price_too_low, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + UNCOLLECTIBLE = + T.let(:uncollectible, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + REFUNDED = T.let(:refunded, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) AUTO_REFUNDED = T.let(:auto_refunded, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - REFUNDED = T.let(:refunded, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) PARTIALLY_REFUNDED = T.let(:partially_refunded, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) DISPUTE_WARNING = T.let(:dispute_warning, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - OPEN_RESOLUTION = - T.let(:open_resolution, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - OPEN_DISPUTE = - T.let(:open_dispute, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - FAILED = T.let(:failed, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - PRICE_TOO_LOW = - T.let(:price_too_low, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - SUCCEEDED = - T.let(:succeeded, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + DISPUTE_NEEDS_RESPONSE = + T.let( + :dispute_needs_response, + WhopSDK::FriendlyReceiptStatus::TaggedSymbol + ) + DISPUTE_WARNING_NEEDS_RESPONSE = + T.let( + :dispute_warning_needs_response, + WhopSDK::FriendlyReceiptStatus::TaggedSymbol + ) + RESOLUTION_NEEDS_RESPONSE = + T.let( + :resolution_needs_response, + WhopSDK::FriendlyReceiptStatus::TaggedSymbol + ) + DISPUTE_UNDER_REVIEW = + T.let( + :dispute_under_review, + WhopSDK::FriendlyReceiptStatus::TaggedSymbol + ) + DISPUTE_WARNING_UNDER_REVIEW = + T.let( + :dispute_warning_under_review, + WhopSDK::FriendlyReceiptStatus::TaggedSymbol + ) + RESOLUTION_UNDER_REVIEW = + T.let( + :resolution_under_review, + WhopSDK::FriendlyReceiptStatus::TaggedSymbol + ) + DISPUTE_WON = + T.let(:dispute_won, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + DISPUTE_WARNING_CLOSED = + T.let( + :dispute_warning_closed, + WhopSDK::FriendlyReceiptStatus::TaggedSymbol + ) + RESOLUTION_WON = + T.let(:resolution_won, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + DISPUTE_LOST = + T.let(:dispute_lost, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + DISPUTE_CLOSED = + T.let(:dispute_closed, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + RESOLUTION_LOST = + T.let(:resolution_lost, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) DRAFTED = T.let(:drafted, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - UNCOLLECTIBLE = - T.let(:uncollectible, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - UNRESOLVED = - T.let(:unresolved, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - PAST_DUE = T.let(:past_due, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - PENDING = T.let(:pending, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) INCOMPLETE = T.let(:incomplete, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) - CANCELED = T.let(:canceled, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + UNRESOLVED = + T.let(:unresolved, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + OPEN_DISPUTE = + T.let(:open_dispute, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) + OPEN_RESOLUTION = + T.let(:open_resolution, WhopSDK::FriendlyReceiptStatus::TaggedSymbol) sig do override.returns(T::Array[WhopSDK::FriendlyReceiptStatus::TaggedSymbol]) diff --git a/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi b/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi index 60a6d02f..fc9f5d72 100644 --- a/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +++ b/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi @@ -23,16 +23,6 @@ module WhopSDK end attr_accessor :balances - # The different statuses a LedgerAccountAudit can be - sig do - returns( - T.nilable( - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - ) - end - attr_accessor :ledger_account_audit_status - # The type of ledger account. sig do returns( @@ -93,10 +83,6 @@ module WhopSDK T::Array[ WhopSDK::Models::LedgerAccountRetrieveResponse::Balance::OrHash ], - ledger_account_audit_status: - T.nilable( - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::OrSymbol - ), ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerType::OrSymbol, owner: @@ -122,8 +108,6 @@ module WhopSDK id:, # The balances associated with the account. balances:, - # The different statuses a LedgerAccountAudit can be - ledger_account_audit_status:, # The type of ledger account. ledger_type:, # The owner of the ledger account. @@ -143,10 +127,6 @@ module WhopSDK id: String, balances: T::Array[WhopSDK::Models::LedgerAccountRetrieveResponse::Balance], - ledger_account_audit_status: - T.nilable( - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ), ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerType::TaggedSymbol, owner: @@ -228,91 +208,6 @@ module WhopSDK end end - # The different statuses a LedgerAccountAudit can be - module LedgerAccountAuditStatus - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - PENDING = - T.let( - :pending, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - PENDING_AI_REVIEW = - T.let( - :pending_ai_review, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - APPROVED = - T.let( - :approved, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - RESERVES_IMPOSED = - T.let( - :reserves_imposed, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - SUSPENDED = - T.let( - :suspended, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - IGNORED = - T.let( - :ignored, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - REJECTED = - T.let( - :rejected, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - REQUESTED_MORE_INFORMATION = - T.let( - :requested_more_information, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - INFORMATION_SUBMITTED = - T.let( - :information_submitted, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - REQUESTED_TOS_VIOLATION_CORRECTION = - T.let( - :requested_tos_violation_correction, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - CLAWBACK_ATTEMPTED = - T.let( - :clawback_attempted, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - AWAITING_SALES_REVIEW = - T.let( - :awaiting_sales_review, - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus::TaggedSymbol - ] - ) - end - def self.values - end - end - # The type of ledger account. module LedgerType extend WhopSDK::Internal::Type::Enum diff --git a/rbi/whop_sdk/models/member_list_response.rbi b/rbi/whop_sdk/models/member_list_response.rbi index 520aa345..02a1e16b 100644 --- a/rbi/whop_sdk/models/member_list_response.rbi +++ b/rbi/whop_sdk/models/member_list_response.rbi @@ -19,6 +19,10 @@ module WhopSDK sig { returns(WhopSDK::AccessLevel::TaggedSymbol) } attr_accessor :access_level + # The member's token balance for this company + sig { returns(Float) } + attr_accessor :company_token_balance + # When the member was created sig { returns(Time) } attr_accessor :created_at @@ -69,6 +73,7 @@ module WhopSDK params( id: String, access_level: WhopSDK::AccessLevel::OrSymbol, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: @@ -89,6 +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 + company_token_balance:, # When the member was created created_at:, # When the member joined the company @@ -115,6 +122,7 @@ module WhopSDK { id: String, access_level: WhopSDK::AccessLevel::TaggedSymbol, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: diff --git a/rbi/whop_sdk/models/member_retrieve_response.rbi b/rbi/whop_sdk/models/member_retrieve_response.rbi index 26ff89d0..498077ea 100644 --- a/rbi/whop_sdk/models/member_retrieve_response.rbi +++ b/rbi/whop_sdk/models/member_retrieve_response.rbi @@ -33,6 +33,10 @@ module WhopSDK end attr_writer :company + # The member's token balance for this company + sig { returns(Float) } + attr_accessor :company_token_balance + # When the member was created sig { returns(Time) } attr_accessor :created_at @@ -84,6 +88,7 @@ module WhopSDK id: String, access_level: WhopSDK::AccessLevel::OrSymbol, company: WhopSDK::Models::MemberRetrieveResponse::Company::OrHash, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: @@ -106,6 +111,8 @@ module WhopSDK access_level:, # The company for the member. company:, + # The member's token balance for this company + company_token_balance:, # When the member was created created_at:, # When the member joined the company @@ -133,6 +140,7 @@ module WhopSDK id: String, access_level: WhopSDK::AccessLevel::TaggedSymbol, company: WhopSDK::Models::MemberRetrieveResponse::Company, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: diff --git a/rbi/whop_sdk/models/membership.rbi b/rbi/whop_sdk/models/membership.rbi index d2555df5..a21803e8 100644 --- a/rbi/whop_sdk/models/membership.rbi +++ b/rbi/whop_sdk/models/membership.rbi @@ -15,6 +15,13 @@ module WhopSDK sig { returns(T::Boolean) } attr_accessor :cancel_at_period_end + # The different reasons a user can choose for why they are canceling their + # membership. + sig do + returns(T.nilable(WhopSDK::Membership::CancelOption::TaggedSymbol)) + end + attr_accessor :cancel_option + # The epoch timestamp of when the customer initiated a cancellation. sig { returns(T.nilable(Time)) } attr_accessor :canceled_at @@ -38,6 +45,10 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::Currency::TaggedSymbol)) } attr_accessor :currency + # The responses to custom checkout questions for this membership. + sig { returns(T::Array[WhopSDK::Membership::CustomFieldResponse]) } + attr_accessor :custom_field_responses + # The license key for this Membership. This is only present if the membership # grants access to an instance of the Whop Software app. sig { returns(T.nilable(String)) } @@ -120,11 +131,14 @@ module WhopSDK params( id: String, cancel_at_period_end: T::Boolean, + cancel_option: T.nilable(WhopSDK::Membership::CancelOption::OrSymbol), canceled_at: T.nilable(Time), cancellation_reason: T.nilable(String), company: WhopSDK::Membership::Company::OrHash, created_at: Time, currency: T.nilable(WhopSDK::Currency::OrSymbol), + custom_field_responses: + T::Array[WhopSDK::Membership::CustomFieldResponse::OrHash], license_key: T.nilable(String), manage_url: T.nilable(String), member: T.nilable(WhopSDK::Membership::Member::OrHash), @@ -146,6 +160,9 @@ module WhopSDK # Whether this Membership is set to cancel at the end of the current billing # cycle. Only applies for memberships that have a renewal plan. cancel_at_period_end:, + # The different reasons a user can choose for why they are canceling their + # membership. + cancel_option:, # The epoch timestamp of when the customer initiated a cancellation. canceled_at:, # The reason that the member canceled the membership (filled out by the member). @@ -156,6 +173,8 @@ module WhopSDK created_at:, # The available currencies on the platform currency:, + # The responses to custom checkout questions for this membership. + custom_field_responses:, # The license key for this Membership. This is only present if the membership # grants access to an instance of the Whop Software app. license_key:, @@ -193,11 +212,15 @@ module WhopSDK { id: String, cancel_at_period_end: T::Boolean, + cancel_option: + T.nilable(WhopSDK::Membership::CancelOption::TaggedSymbol), canceled_at: T.nilable(Time), cancellation_reason: T.nilable(String), company: WhopSDK::Membership::Company, created_at: Time, currency: T.nilable(WhopSDK::Currency::TaggedSymbol), + custom_field_responses: + T::Array[WhopSDK::Membership::CustomFieldResponse], license_key: T.nilable(String), manage_url: T.nilable(String), member: T.nilable(WhopSDK::Membership::Member), @@ -217,6 +240,47 @@ module WhopSDK def to_hash end + # The different reasons a user can choose for why they are canceling their + # membership. + module CancelOption + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::Membership::CancelOption) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TOO_EXPENSIVE = + T.let(:too_expensive, WhopSDK::Membership::CancelOption::TaggedSymbol) + SWITCHING = + T.let(:switching, WhopSDK::Membership::CancelOption::TaggedSymbol) + MISSING_FEATURES = + T.let( + :missing_features, + WhopSDK::Membership::CancelOption::TaggedSymbol + ) + TECHNICAL_ISSUES = + T.let( + :technical_issues, + WhopSDK::Membership::CancelOption::TaggedSymbol + ) + BAD_EXPERIENCE = + T.let( + :bad_experience, + WhopSDK::Membership::CancelOption::TaggedSymbol + ) + OTHER = T.let(:other, WhopSDK::Membership::CancelOption::TaggedSymbol) + TESTING = + T.let(:testing, WhopSDK::Membership::CancelOption::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::Membership::CancelOption::TaggedSymbol] + ) + end + def self.values + end + end + class Company < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do @@ -246,6 +310,50 @@ module WhopSDK end end + class CustomFieldResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Membership::CustomFieldResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The ID of the custom field item + sig { returns(String) } + attr_accessor :id + + # The response a user gave to the specific question or field. + sig { returns(String) } + attr_accessor :answer + + # The question asked by the custom field + sig { returns(String) } + attr_accessor :question + + # The response from a custom field on checkout + sig do + params(id: String, answer: String, question: String).returns( + T.attached_class + ) + end + def self.new( + # The ID of the custom field item + id:, + # The response a user gave to the specific question or field. + answer:, + # The question asked by the custom field + question: + ) + end + + sig do + override.returns({ id: String, answer: String, question: String }) + end + def to_hash + end + end + class Member < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do @@ -354,6 +462,10 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # The email of the user + sig { returns(T.nilable(String)) } + attr_accessor :email + # The name of the user from their Whop account. sig { returns(T.nilable(String)) } attr_accessor :name @@ -364,13 +476,18 @@ module WhopSDK # The user this membership belongs to sig do - params(id: String, name: T.nilable(String), username: String).returns( - T.attached_class - ) + params( + id: String, + email: T.nilable(String), + name: T.nilable(String), + username: String + ).returns(T.attached_class) end def self.new( # The internal ID of the user. id:, + # The email of the user + email:, # The name of the user from their Whop account. name:, # The username of the user from their Whop account. @@ -380,7 +497,12 @@ module WhopSDK sig do override.returns( - { id: String, name: T.nilable(String), username: String } + { + id: String, + email: T.nilable(String), + name: T.nilable(String), + username: String + } ) end def to_hash diff --git a/rbi/whop_sdk/models/membership_list_response.rbi b/rbi/whop_sdk/models/membership_list_response.rbi index d11aa999..6e8a19cb 100644 --- a/rbi/whop_sdk/models/membership_list_response.rbi +++ b/rbi/whop_sdk/models/membership_list_response.rbi @@ -20,6 +20,17 @@ module WhopSDK sig { returns(T::Boolean) } attr_accessor :cancel_at_period_end + # The different reasons a user can choose for why they are canceling their + # membership. + sig do + returns( + T.nilable( + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ) + ) + end + attr_accessor :cancel_option + # The epoch timestamp of when the customer initiated a cancellation. sig { returns(T.nilable(Time)) } attr_accessor :canceled_at @@ -149,6 +160,10 @@ module WhopSDK params( id: String, cancel_at_period_end: T::Boolean, + cancel_option: + T.nilable( + WhopSDK::Models::MembershipListResponse::CancelOption::OrSymbol + ), canceled_at: T.nilable(Time), cancellation_reason: T.nilable(String), company: WhopSDK::Models::MembershipListResponse::Company::OrHash, @@ -179,6 +194,9 @@ module WhopSDK # Whether this Membership is set to cancel at the end of the current billing # cycle. Only applies for memberships that have a renewal plan. cancel_at_period_end:, + # The different reasons a user can choose for why they are canceling their + # membership. + cancel_option:, # The epoch timestamp of when the customer initiated a cancellation. canceled_at:, # The reason that the member canceled the membership (filled out by the member). @@ -226,6 +244,10 @@ module WhopSDK { id: String, cancel_at_period_end: T::Boolean, + cancel_option: + T.nilable( + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ), canceled_at: T.nilable(Time), cancellation_reason: T.nilable(String), company: WhopSDK::Models::MembershipListResponse::Company, @@ -251,6 +273,64 @@ module WhopSDK def to_hash end + # The different reasons a user can choose for why they are canceling their + # membership. + module CancelOption + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Models::MembershipListResponse::CancelOption) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TOO_EXPENSIVE = + T.let( + :too_expensive, + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ) + SWITCHING = + T.let( + :switching, + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ) + MISSING_FEATURES = + T.let( + :missing_features, + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ) + TECHNICAL_ISSUES = + T.let( + :technical_issues, + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ) + BAD_EXPERIENCE = + T.let( + :bad_experience, + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ) + OTHER = + T.let( + :other, + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ) + TESTING = + T.let( + :testing, + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::MembershipListResponse::CancelOption::TaggedSymbol + ] + ) + end + def self.values + end + end + class Company < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do @@ -406,6 +486,10 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # The email of the user + sig { returns(T.nilable(String)) } + attr_accessor :email + # The name of the user from their Whop account. sig { returns(T.nilable(String)) } attr_accessor :name @@ -416,13 +500,18 @@ module WhopSDK # The user this membership belongs to sig do - params(id: String, name: T.nilable(String), username: String).returns( - T.attached_class - ) + params( + id: String, + email: T.nilable(String), + name: T.nilable(String), + username: String + ).returns(T.attached_class) end def self.new( # The internal ID of the user. id:, + # The email of the user + email:, # The name of the user from their Whop account. name:, # The username of the user from their Whop account. @@ -432,7 +521,12 @@ module WhopSDK sig do override.returns( - { id: String, name: T.nilable(String), username: String } + { + id: String, + email: T.nilable(String), + name: T.nilable(String), + username: String + } ) end def to_hash diff --git a/rbi/whop_sdk/models/message_create_params.rbi b/rbi/whop_sdk/models/message_create_params.rbi index 6789edc5..2403b490 100644 --- a/rbi/whop_sdk/models/message_create_params.rbi +++ b/rbi/whop_sdk/models/message_create_params.rbi @@ -21,16 +21,7 @@ module WhopSDK # The attachments for this message, such as videos or images. sig do - returns( - T.nilable( - T::Array[ - T.any( - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID - ) - ] - ) - ) + returns(T.nilable(T::Array[WhopSDK::MessageCreateParams::Attachment])) end attr_accessor :attachments @@ -49,12 +40,7 @@ module WhopSDK content: String, attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::MessageCreateParams::Attachment::OrHash] ), poll: T.nilable(WhopSDK::MessageCreateParams::Poll::OrHash), request_options: WhopSDK::RequestOptions::OrHash @@ -79,14 +65,7 @@ module WhopSDK channel_id: String, content: String, attachments: - T.nilable( - T::Array[ - T.any( - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID - ) - ] - ), + T.nilable(T::Array[WhopSDK::MessageCreateParams::Attachment]), poll: T.nilable(WhopSDK::MessageCreateParams::Poll), request_options: WhopSDK::RequestOptions } @@ -95,84 +74,29 @@ module WhopSDK def to_hash end - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - Variants = + class Attachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID + WhopSDK::MessageCreateParams::Attachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end + # Input for an attachment + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::MessageCreateParams::Attachment::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end diff --git a/rbi/whop_sdk/models/message_update_params.rbi b/rbi/whop_sdk/models/message_update_params.rbi index af80b861..e4f4affe 100644 --- a/rbi/whop_sdk/models/message_update_params.rbi +++ b/rbi/whop_sdk/models/message_update_params.rbi @@ -13,16 +13,7 @@ module WhopSDK # The attachments for this message sig do - returns( - T.nilable( - T::Array[ - T.any( - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID - ) - ] - ) - ) + returns(T.nilable(T::Array[WhopSDK::MessageUpdateParams::Attachment])) end attr_accessor :attachments @@ -38,12 +29,7 @@ module WhopSDK params( attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::MessageUpdateParams::Attachment::OrHash] ), content: T.nilable(String), is_pinned: T.nilable(T::Boolean), @@ -65,14 +51,7 @@ module WhopSDK override.returns( { attachments: - T.nilable( - T::Array[ - T.any( - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID - ) - ] - ), + T.nilable(T::Array[WhopSDK::MessageUpdateParams::Attachment]), content: T.nilable(String), is_pinned: T.nilable(T::Boolean), request_options: WhopSDK::RequestOptions @@ -82,84 +61,29 @@ module WhopSDK def to_hash end - # Input for an attachment - module Attachment - extend WhopSDK::Internal::Type::Union - - Variants = + class Attachment < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID + WhopSDK::MessageUpdateParams::Attachment, + WhopSDK::Internal::AnyHash ) end - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash - end - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end - - sig { override.returns({ id: String }) } - def to_hash - end + # Input for an attachment + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns( - T::Array[WhopSDK::MessageUpdateParams::Attachment::Variants] - ) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end end diff --git a/rbi/whop_sdk/models/payment.rbi b/rbi/whop_sdk/models/payment.rbi index 1f570255..b0e193ae 100644 --- a/rbi/whop_sdk/models/payment.rbi +++ b/rbi/whop_sdk/models/payment.rbi @@ -89,6 +89,10 @@ module WhopSDK sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } attr_accessor :metadata + # The time of the next schedule payment retry. + sig { returns(T.nilable(Time)) } + attr_accessor :next_payment_attempt + # The datetime the payment was paid sig { returns(T.nilable(Time)) } attr_accessor :paid_at @@ -108,6 +112,10 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) } attr_accessor :payment_method_type + # The number of failed payment attempts for the payment. + sig { returns(T.nilable(Integer)) } + attr_accessor :payments_failed + # The plan attached to this payment. sig { returns(T.nilable(WhopSDK::Payment::Plan)) } attr_reader :plan @@ -201,9 +209,11 @@ module WhopSDK member: T.nilable(WhopSDK::Payment::Member::OrHash), membership: T.nilable(WhopSDK::Payment::Membership::OrHash), metadata: T.nilable(T::Hash[Symbol, T.anything]), + next_payment_attempt: T.nilable(Time), paid_at: T.nilable(Time), payment_method: T.nilable(WhopSDK::Payment::PaymentMethod::OrHash), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol), + payments_failed: T.nilable(Integer), plan: T.nilable(WhopSDK::Payment::Plan::OrHash), product: T.nilable(WhopSDK::Payment::Product::OrHash), promo_code: T.nilable(WhopSDK::Payment::PromoCode::OrHash), @@ -254,12 +264,16 @@ module WhopSDK # 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 of the next schedule payment retry. + next_payment_attempt:, # The datetime the payment was paid paid_at:, # The payment method used for the payment, if available. payment_method:, # The different types of payment methods that can be used. payment_method_type:, + # The number of failed payment attempts for the payment. + payments_failed:, # The plan attached to this payment. plan:, # The product this payment was made for @@ -314,10 +328,12 @@ module WhopSDK member: T.nilable(WhopSDK::Payment::Member), membership: T.nilable(WhopSDK::Payment::Membership), metadata: T.nilable(T::Hash[Symbol, T.anything]), + next_payment_attempt: T.nilable(Time), paid_at: T.nilable(Time), payment_method: T.nilable(WhopSDK::Payment::PaymentMethod), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol), + payments_failed: T.nilable(Integer), plan: T.nilable(WhopSDK::Payment::Plan), product: T.nilable(WhopSDK::Payment::Product), promo_code: T.nilable(WhopSDK::Payment::PromoCode), diff --git a/rbi/whop_sdk/models/payment_list_response.rbi b/rbi/whop_sdk/models/payment_list_response.rbi index 4ef154c4..782ac64d 100644 --- a/rbi/whop_sdk/models/payment_list_response.rbi +++ b/rbi/whop_sdk/models/payment_list_response.rbi @@ -114,6 +114,10 @@ module WhopSDK sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } attr_accessor :metadata + # The time of the next schedule payment retry. + sig { returns(T.nilable(Time)) } + attr_accessor :next_payment_attempt + # The datetime the payment was paid sig { returns(T.nilable(Time)) } attr_accessor :paid_at @@ -138,6 +142,10 @@ module WhopSDK sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) } attr_accessor :payment_method_type + # The number of failed payment attempts for the payment. + sig { returns(T.nilable(Integer)) } + attr_accessor :payments_failed + # The plan attached to this payment. sig { returns(T.nilable(WhopSDK::Models::PaymentListResponse::Plan)) } attr_reader :plan @@ -255,12 +263,14 @@ module WhopSDK membership: T.nilable(WhopSDK::Models::PaymentListResponse::Membership::OrHash), metadata: T.nilable(T::Hash[Symbol, T.anything]), + next_payment_attempt: T.nilable(Time), paid_at: T.nilable(Time), payment_method: T.nilable( WhopSDK::Models::PaymentListResponse::PaymentMethod::OrHash ), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol), + payments_failed: T.nilable(Integer), plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan::OrHash), product: T.nilable(WhopSDK::Models::PaymentListResponse::Product::OrHash), @@ -313,12 +323,16 @@ module WhopSDK # 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 of the next schedule payment retry. + next_payment_attempt:, # The datetime the payment was paid paid_at:, # The payment method used for the payment, if available. payment_method:, # The different types of payment methods that can be used. payment_method_type:, + # The number of failed payment attempts for the payment. + payments_failed:, # The plan attached to this payment. plan:, # The product this payment was made for @@ -375,11 +389,13 @@ module WhopSDK membership: T.nilable(WhopSDK::Models::PaymentListResponse::Membership), metadata: T.nilable(T::Hash[Symbol, T.anything]), + next_payment_attempt: T.nilable(Time), paid_at: T.nilable(Time), payment_method: T.nilable(WhopSDK::Models::PaymentListResponse::PaymentMethod), payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol), + payments_failed: T.nilable(Integer), plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan), product: T.nilable(WhopSDK::Models::PaymentListResponse::Product), promo_code: diff --git a/rbi/whop_sdk/models/payment_method_types.rbi b/rbi/whop_sdk/models/payment_method_types.rbi index df07354b..5ce446db 100644 --- a/rbi/whop_sdk/models/payment_method_types.rbi +++ b/rbi/whop_sdk/models/payment_method_types.rbi @@ -9,38 +9,64 @@ module WhopSDK TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::PaymentMethodTypes) } OrSymbol = T.type_alias { T.any(Symbol, String) } + ACSS_DEBIT = T.let(:acss_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol) + AFFIRM = T.let(:affirm, WhopSDK::PaymentMethodTypes::TaggedSymbol) AFTERPAY_CLEARPAY = T.let(:afterpay_clearpay, WhopSDK::PaymentMethodTypes::TaggedSymbol) ALIPAY = T.let(:alipay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + ALMA = T.let(:alma, WhopSDK::PaymentMethodTypes::TaggedSymbol) AMAZON_PAY = T.let(:amazon_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + APPLE = T.let(:apple, WhopSDK::PaymentMethodTypes::TaggedSymbol) APPLE_PAY = T.let(:apple_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + AU_BECS_DEBIT = + T.let(:au_becs_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol) + BACS_DEBIT = T.let(:bacs_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol) BANCONTACT = T.let(:bancontact, WhopSDK::PaymentMethodTypes::TaggedSymbol) + BILLIE = T.let(:billie, WhopSDK::PaymentMethodTypes::TaggedSymbol) + BIZUM = T.let(:bizum, WhopSDK::PaymentMethodTypes::TaggedSymbol) + BLIK = T.let(:blik, WhopSDK::PaymentMethodTypes::TaggedSymbol) + BOLETO = T.let(:boleto, WhopSDK::PaymentMethodTypes::TaggedSymbol) + CAPCHASE_PAY = + T.let(:capchase_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) CARD = T.let(:card, WhopSDK::PaymentMethodTypes::TaggedSymbol) CASHAPP = T.let(:cashapp, WhopSDK::PaymentMethodTypes::TaggedSymbol) + COINBASE = T.let(:coinbase, WhopSDK::PaymentMethodTypes::TaggedSymbol) CRYPTO = T.let(:crypto, WhopSDK::PaymentMethodTypes::TaggedSymbol) + CUSTOM = T.let(:custom, WhopSDK::PaymentMethodTypes::TaggedSymbol) + CUSTOMER_BALANCE = + T.let(:customer_balance, WhopSDK::PaymentMethodTypes::TaggedSymbol) + DEMO_PAY = T.let(:demo_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + EPS = T.let(:eps, WhopSDK::PaymentMethodTypes::TaggedSymbol) + EU_BANK_TRANSFER = + T.let(:eu_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol) + FPX = T.let(:fpx, WhopSDK::PaymentMethodTypes::TaggedSymbol) + GIROPAY = T.let(:giropay, WhopSDK::PaymentMethodTypes::TaggedSymbol) GOOGLE_PAY = T.let(:google_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + GOPAY = T.let(:gopay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + GRABPAY = T.let(:grabpay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + ID_BANK_TRANSFER = + T.let(:id_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol) IDEAL = T.let(:ideal, WhopSDK::PaymentMethodTypes::TaggedSymbol) + KAKAO_PAY = T.let(:kakao_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) KLARNA = T.let(:klarna, WhopSDK::PaymentMethodTypes::TaggedSymbol) + KONBINI = T.let(:konbini, WhopSDK::PaymentMethodTypes::TaggedSymbol) + KR_CARD = T.let(:kr_card, WhopSDK::PaymentMethodTypes::TaggedSymbol) + KR_MARKET = T.let(:kr_market, WhopSDK::PaymentMethodTypes::TaggedSymbol) + KRIYA = T.let(:kriya, WhopSDK::PaymentMethodTypes::TaggedSymbol) + LINK = T.let(:link, WhopSDK::PaymentMethodTypes::TaggedSymbol) + MB_WAY = T.let(:mb_way, WhopSDK::PaymentMethodTypes::TaggedSymbol) MOBILEPAY = T.let(:mobilepay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - SEPA_DEBIT = T.let(:sepa_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol) - SWISH = T.let(:swish, WhopSDK::PaymentMethodTypes::TaggedSymbol) - TWINT = T.let(:twint, WhopSDK::PaymentMethodTypes::TaggedSymbol) - US_BANK_ACCOUNT = - T.let(:us_bank_account, WhopSDK::PaymentMethodTypes::TaggedSymbol) - ZIP = T.let(:zip, WhopSDK::PaymentMethodTypes::TaggedSymbol) - VIPPS = T.let(:vipps, WhopSDK::PaymentMethodTypes::TaggedSymbol) - PAYPAL = T.let(:paypal, WhopSDK::PaymentMethodTypes::TaggedSymbol) - SEZZLE = T.let(:sezzle, WhopSDK::PaymentMethodTypes::TaggedSymbol) - COINBASE = T.let(:coinbase, WhopSDK::PaymentMethodTypes::TaggedSymbol) - SPLITIT = T.let(:splitit, WhopSDK::PaymentMethodTypes::TaggedSymbol) - PLATFORM_BALANCE = - T.let(:platform_balance, WhopSDK::PaymentMethodTypes::TaggedSymbol) - APPLE = T.let(:apple, WhopSDK::PaymentMethodTypes::TaggedSymbol) - VENMO = T.let(:venmo, WhopSDK::PaymentMethodTypes::TaggedSymbol) - AFFIRM = T.let(:affirm, WhopSDK::PaymentMethodTypes::TaggedSymbol) + MONDU = T.let(:mondu, WhopSDK::PaymentMethodTypes::TaggedSymbol) MULTIBANCO = T.let(:multibanco, WhopSDK::PaymentMethodTypes::TaggedSymbol) - WECHAT_PAY = T.let(:wechat_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) NAVER_PAY = T.let(:naver_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + NETBANKING = T.let(:netbanking, WhopSDK::PaymentMethodTypes::TaggedSymbol) + NG_BANK = T.let(:ng_bank, WhopSDK::PaymentMethodTypes::TaggedSymbol) + NG_BANK_TRANSFER = + T.let(:ng_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol) + NG_CARD = T.let(:ng_card, WhopSDK::PaymentMethodTypes::TaggedSymbol) + NG_MARKET = T.let(:ng_market, WhopSDK::PaymentMethodTypes::TaggedSymbol) + NG_USSD = T.let(:ng_ussd, WhopSDK::PaymentMethodTypes::TaggedSymbol) + NG_WALLET = T.let(:ng_wallet, WhopSDK::PaymentMethodTypes::TaggedSymbol) NZ_BANK_ACCOUNT = T.let(:nz_bank_account, WhopSDK::PaymentMethodTypes::TaggedSymbol) OXXO = T.let(:oxxo, WhopSDK::PaymentMethodTypes::TaggedSymbol) @@ -49,64 +75,40 @@ module WhopSDK T.let(:pay_by_bank, WhopSDK::PaymentMethodTypes::TaggedSymbol) PAYCO = T.let(:payco, WhopSDK::PaymentMethodTypes::TaggedSymbol) PAYNOW = T.let(:paynow, WhopSDK::PaymentMethodTypes::TaggedSymbol) + PAYPAL = T.let(:paypal, WhopSDK::PaymentMethodTypes::TaggedSymbol) + PAYPAY = T.let(:paypay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + PAYTO = T.let(:payto, WhopSDK::PaymentMethodTypes::TaggedSymbol) PIX = T.let(:pix, WhopSDK::PaymentMethodTypes::TaggedSymbol) + PLATFORM_BALANCE = + T.let(:platform_balance, WhopSDK::PaymentMethodTypes::TaggedSymbol) PROMPTPAY = T.let(:promptpay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + QRIS = T.let(:qris, WhopSDK::PaymentMethodTypes::TaggedSymbol) + RECHNUNG = T.let(:rechnung, WhopSDK::PaymentMethodTypes::TaggedSymbol) REVOLUT_PAY = T.let(:revolut_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) SAMSUNG_PAY = T.let(:samsung_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) SATISPAY = T.let(:satispay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - SOFORT = T.let(:sofort, WhopSDK::PaymentMethodTypes::TaggedSymbol) - KONBINI = T.let(:konbini, WhopSDK::PaymentMethodTypes::TaggedSymbol) - KR_CARD = T.let(:kr_card, WhopSDK::PaymentMethodTypes::TaggedSymbol) - LINK = T.let(:link, WhopSDK::PaymentMethodTypes::TaggedSymbol) - GRABPAY = T.let(:grabpay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - KAKAO_PAY = T.let(:kakao_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - BILLIE = T.let(:billie, WhopSDK::PaymentMethodTypes::TaggedSymbol) - BLIK = T.let(:blik, WhopSDK::PaymentMethodTypes::TaggedSymbol) - BOLETO = T.let(:boleto, WhopSDK::PaymentMethodTypes::TaggedSymbol) - EPS = T.let(:eps, WhopSDK::PaymentMethodTypes::TaggedSymbol) - FPX = T.let(:fpx, WhopSDK::PaymentMethodTypes::TaggedSymbol) - GIROPAY = T.let(:giropay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - ACSS_DEBIT = T.let(:acss_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol) - ALMA = T.let(:alma, WhopSDK::PaymentMethodTypes::TaggedSymbol) - AU_BECS_DEBIT = - T.let(:au_becs_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol) - BACS_DEBIT = T.let(:bacs_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol) - BIZUM = T.let(:bizum, WhopSDK::PaymentMethodTypes::TaggedSymbol) - CAPCHASE_PAY = - T.let(:capchase_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - KRIYA = T.let(:kriya, WhopSDK::PaymentMethodTypes::TaggedSymbol) - MONDU = T.let(:mondu, WhopSDK::PaymentMethodTypes::TaggedSymbol) - NG_WALLET = T.let(:ng_wallet, WhopSDK::PaymentMethodTypes::TaggedSymbol) - PAYPAY = T.let(:paypay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - SEQURA = T.let(:sequra, WhopSDK::PaymentMethodTypes::TaggedSymbol) SCALAPAY = T.let(:scalapay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - CUSTOM = T.let(:custom, WhopSDK::PaymentMethodTypes::TaggedSymbol) - CUSTOMER_BALANCE = - T.let(:customer_balance, WhopSDK::PaymentMethodTypes::TaggedSymbol) - GOPAY = T.let(:gopay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - MB_WAY = T.let(:mb_way, WhopSDK::PaymentMethodTypes::TaggedSymbol) - NG_BANK = T.let(:ng_bank, WhopSDK::PaymentMethodTypes::TaggedSymbol) - NG_BANK_TRANSFER = - T.let(:ng_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol) - NG_CARD = T.let(:ng_card, WhopSDK::PaymentMethodTypes::TaggedSymbol) - NG_MARKET = T.let(:ng_market, WhopSDK::PaymentMethodTypes::TaggedSymbol) - NG_USSD = T.let(:ng_ussd, WhopSDK::PaymentMethodTypes::TaggedSymbol) - PAYTO = T.let(:payto, WhopSDK::PaymentMethodTypes::TaggedSymbol) - QRIS = T.let(:qris, WhopSDK::PaymentMethodTypes::TaggedSymbol) - RECHNUNG = T.let(:rechnung, WhopSDK::PaymentMethodTypes::TaggedSymbol) + SEPA_DEBIT = T.let(:sepa_debit, WhopSDK::PaymentMethodTypes::TaggedSymbol) + SEQURA = T.let(:sequra, WhopSDK::PaymentMethodTypes::TaggedSymbol) + SEZZLE = T.let(:sezzle, WhopSDK::PaymentMethodTypes::TaggedSymbol) + SHOP_PAY = T.let(:shop_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + SHOPEEPAY = T.let(:shopeepay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + SOFORT = T.let(:sofort, WhopSDK::PaymentMethodTypes::TaggedSymbol) SOUTH_KOREA_MARKET = T.let(:south_korea_market, WhopSDK::PaymentMethodTypes::TaggedSymbol) - KR_MARKET = T.let(:kr_market, WhopSDK::PaymentMethodTypes::TaggedSymbol) - SHOPEEPAY = T.let(:shopeepay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - UPI = T.let(:upi, WhopSDK::PaymentMethodTypes::TaggedSymbol) + SPLITIT = T.let(:splitit, WhopSDK::PaymentMethodTypes::TaggedSymbol) SUNBIT = T.let(:sunbit, WhopSDK::PaymentMethodTypes::TaggedSymbol) - NETBANKING = T.let(:netbanking, WhopSDK::PaymentMethodTypes::TaggedSymbol) - ID_BANK_TRANSFER = - T.let(:id_bank_transfer, WhopSDK::PaymentMethodTypes::TaggedSymbol) - DEMO_PAY = T.let(:demo_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) - SHOP_PAY = T.let(:shop_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + SWISH = T.let(:swish, WhopSDK::PaymentMethodTypes::TaggedSymbol) + TWINT = T.let(:twint, WhopSDK::PaymentMethodTypes::TaggedSymbol) + UPI = T.let(:upi, WhopSDK::PaymentMethodTypes::TaggedSymbol) + US_BANK_ACCOUNT = + T.let(:us_bank_account, WhopSDK::PaymentMethodTypes::TaggedSymbol) + VENMO = T.let(:venmo, WhopSDK::PaymentMethodTypes::TaggedSymbol) + VIPPS = T.let(:vipps, WhopSDK::PaymentMethodTypes::TaggedSymbol) + WECHAT_PAY = T.let(:wechat_pay, WhopSDK::PaymentMethodTypes::TaggedSymbol) + ZIP = T.let(:zip, WhopSDK::PaymentMethodTypes::TaggedSymbol) UNKNOWN = T.let(:unknown, WhopSDK::PaymentMethodTypes::TaggedSymbol) sig do diff --git a/rbi/whop_sdk/models/payment_provider.rbi b/rbi/whop_sdk/models/payment_provider.rbi index fc546588..20d0403e 100644 --- a/rbi/whop_sdk/models/payment_provider.rbi +++ b/rbi/whop_sdk/models/payment_provider.rbi @@ -18,6 +18,7 @@ module WhopSDK PLATFORM_BALANCE = T.let(:platform_balance, WhopSDK::PaymentProvider::TaggedSymbol) MULTI_PSP = T.let(:multi_psp, WhopSDK::PaymentProvider::TaggedSymbol) + ADYEN = T.let(:adyen, WhopSDK::PaymentProvider::TaggedSymbol) sig { override.returns(T::Array[WhopSDK::PaymentProvider::TaggedSymbol]) } def self.values diff --git a/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi b/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi index 344b5f3a..993949ff 100644 --- a/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +++ b/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi @@ -96,6 +96,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + sig { returns(T.nilable(String)) } + attr_accessor :account_reference + # The company associated with the payout token sig do returns( @@ -114,6 +119,10 @@ module WhopSDK end attr_writer :company + # The date and time the payout token was created + sig { returns(Time) } + attr_accessor :created_at + # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. sig { returns(String) } @@ -139,6 +148,10 @@ module WhopSDK end attr_writer :destination + # The name of the bank or financial institution. + sig { returns(T.nilable(String)) } + attr_accessor :institution_name + # Whether this payout token is the default for the payout account sig { returns(T::Boolean) } attr_accessor :is_default @@ -152,15 +165,18 @@ module WhopSDK sig do params( id: String, + account_reference: T.nilable(String), company: T.nilable( WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company::OrHash ), + created_at: Time, currency: String, destination: T.nilable( WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination::OrHash ), + institution_name: T.nilable(String), is_default: T::Boolean, nickname: T.nilable(String) ).returns(T.attached_class) @@ -168,13 +184,20 @@ module WhopSDK def self.new( # The ID of the payout token id:, + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + account_reference:, # The company associated with the payout token company:, + # The date and time the payout token was created + created_at:, # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. currency:, # The payout destination associated with the payout token destination:, + # The name of the bank or financial institution. + institution_name:, # Whether this payout token is the default for the payout account is_default:, # An optional nickname for the payout token to help the user identify it. This is @@ -187,15 +210,18 @@ module WhopSDK override.returns( { id: String, + account_reference: T.nilable(String), company: T.nilable( WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company ), + created_at: Time, currency: String, destination: T.nilable( WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination ), + institution_name: T.nilable(String), is_default: T::Boolean, nickname: T.nilable(String) } diff --git a/rbi/whop_sdk/models/payout_method_list_response.rbi b/rbi/whop_sdk/models/payout_method_list_response.rbi index 9d4448f3..72cc6279 100644 --- a/rbi/whop_sdk/models/payout_method_list_response.rbi +++ b/rbi/whop_sdk/models/payout_method_list_response.rbi @@ -15,6 +15,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + sig { returns(T.nilable(String)) } + attr_accessor :account_reference + # The company associated with the payout token sig do returns(T.nilable(WhopSDK::Models::PayoutMethodListResponse::Company)) @@ -31,6 +36,10 @@ module WhopSDK end attr_writer :company + # The date and time the payout token was created + sig { returns(Time) } + attr_accessor :created_at + # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. sig { returns(String) } @@ -54,6 +63,10 @@ module WhopSDK end attr_writer :destination + # The name of the bank or financial institution. + sig { returns(T.nilable(String)) } + attr_accessor :institution_name + # Whether this payout token is the default for the payout account sig { returns(T::Boolean) } attr_accessor :is_default @@ -67,15 +80,18 @@ module WhopSDK sig do params( id: String, + account_reference: T.nilable(String), company: T.nilable( WhopSDK::Models::PayoutMethodListResponse::Company::OrHash ), + created_at: Time, currency: String, destination: T.nilable( WhopSDK::Models::PayoutMethodListResponse::Destination::OrHash ), + institution_name: T.nilable(String), is_default: T::Boolean, nickname: T.nilable(String) ).returns(T.attached_class) @@ -83,13 +99,20 @@ module WhopSDK def self.new( # The ID of the payout token id:, + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + account_reference:, # The company associated with the payout token company:, + # The date and time the payout token was created + created_at:, # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. currency:, # The payout destination associated with the payout token destination:, + # The name of the bank or financial institution. + institution_name:, # Whether this payout token is the default for the payout account is_default:, # An optional nickname for the payout token to help the user identify it. This is @@ -102,11 +125,14 @@ module WhopSDK override.returns( { id: String, + account_reference: T.nilable(String), company: T.nilable(WhopSDK::Models::PayoutMethodListResponse::Company), + created_at: Time, currency: String, destination: T.nilable(WhopSDK::Models::PayoutMethodListResponse::Destination), + institution_name: T.nilable(String), is_default: T::Boolean, nickname: T.nilable(String) } diff --git a/rbi/whop_sdk/models/payout_method_retrieve_response.rbi b/rbi/whop_sdk/models/payout_method_retrieve_response.rbi index 9966e67d..192f228e 100644 --- a/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +++ b/rbi/whop_sdk/models/payout_method_retrieve_response.rbi @@ -15,6 +15,11 @@ module WhopSDK sig { returns(String) } attr_accessor :id + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + sig { returns(T.nilable(String)) } + attr_accessor :account_reference + # The company associated with the payout token sig do returns( @@ -33,6 +38,10 @@ module WhopSDK end attr_writer :company + # The date and time the payout token was created + sig { returns(Time) } + attr_accessor :created_at + # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. sig { returns(String) } @@ -56,6 +65,10 @@ module WhopSDK end attr_writer :destination + # The name of the bank or financial institution. + sig { returns(T.nilable(String)) } + attr_accessor :institution_name + # Whether this payout token is the default for the payout account sig { returns(T::Boolean) } attr_accessor :is_default @@ -69,15 +82,18 @@ module WhopSDK sig do params( id: String, + account_reference: T.nilable(String), company: T.nilable( WhopSDK::Models::PayoutMethodRetrieveResponse::Company::OrHash ), + created_at: Time, currency: String, destination: T.nilable( WhopSDK::Models::PayoutMethodRetrieveResponse::Destination::OrHash ), + institution_name: T.nilable(String), is_default: T::Boolean, nickname: T.nilable(String) ).returns(T.attached_class) @@ -85,13 +101,20 @@ module WhopSDK def self.new( # The ID of the payout token id:, + # A reference to identify the payout destination, such as the last 4 digits of an + # account number or an email address. + account_reference:, # The company associated with the payout token company:, + # The date and time the payout token was created + created_at:, # The currency code of the payout destination. This is the currency that payouts # will be made in for this token. currency:, # The payout destination associated with the payout token destination:, + # The name of the bank or financial institution. + institution_name:, # Whether this payout token is the default for the payout account is_default:, # An optional nickname for the payout token to help the user identify it. This is @@ -104,13 +127,16 @@ module WhopSDK override.returns( { id: String, + account_reference: T.nilable(String), company: T.nilable(WhopSDK::Models::PayoutMethodRetrieveResponse::Company), + created_at: Time, currency: String, destination: T.nilable( WhopSDK::Models::PayoutMethodRetrieveResponse::Destination ), + institution_name: T.nilable(String), is_default: T::Boolean, nickname: T.nilable(String) } diff --git a/rbi/whop_sdk/models/plan_create_params.rbi b/rbi/whop_sdk/models/plan_create_params.rbi index 88586b6d..fa075aac 100644 --- a/rbi/whop_sdk/models/plan_create_params.rbi +++ b/rbi/whop_sdk/models/plan_create_params.rbi @@ -42,17 +42,13 @@ module WhopSDK attr_accessor :expiration_days # An image for the plan. This will be visible on the product page to customers. + sig { returns(T.nilable(WhopSDK::PlanCreateParams::Image)) } + attr_reader :image + sig do - returns( - T.nilable( - T.any( - WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, - WhopSDK::PlanCreateParams::Image::AttachmentInputWithID - ) - ) - ) + params(image: T.nilable(WhopSDK::PlanCreateParams::Image::OrHash)).void end - attr_accessor :image + attr_writer :image # An additional amount charged upon first purchase. Use only if a one time payment # OR you want to charge an additional amount on top of the renewal price. Provided @@ -139,13 +135,7 @@ module WhopSDK T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField::OrHash]), description: T.nilable(String), expiration_days: T.nilable(Integer), - image: - T.nilable( - T.any( - WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::PlanCreateParams::Image::AttachmentInputWithID::OrHash - ) - ), + image: T.nilable(WhopSDK::PlanCreateParams::Image::OrHash), initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), @@ -231,13 +221,7 @@ module WhopSDK T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField]), description: T.nilable(String), expiration_days: T.nilable(Integer), - image: - T.nilable( - T.any( - WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, - WhopSDK::PlanCreateParams::Image::AttachmentInputWithID - ) - ), + image: T.nilable(WhopSDK::PlanCreateParams::Image), initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), @@ -335,82 +319,26 @@ module WhopSDK end end - # An image for the plan. This will be visible on the product page to customers. - module Image - extend WhopSDK::Internal::Type::Union - - Variants = + class Image < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do - T.any( - WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, - WhopSDK::PlanCreateParams::Image::AttachmentInputWithID - ) - end - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash + T.any(WhopSDK::PlanCreateParams::Image, WhopSDK::Internal::AnyHash) end - end - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::PlanCreateParams::Image::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # An image for the plan. This will be visible on the product page to customers. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns(T::Array[WhopSDK::PlanCreateParams::Image::Variants]) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end diff --git a/rbi/whop_sdk/models/plan_update_params.rbi b/rbi/whop_sdk/models/plan_update_params.rbi index a947c83f..548dfae6 100644 --- a/rbi/whop_sdk/models/plan_update_params.rbi +++ b/rbi/whop_sdk/models/plan_update_params.rbi @@ -34,17 +34,13 @@ module WhopSDK attr_accessor :expiration_days # An image for the plan. This will be visible on the product page to customers. + sig { returns(T.nilable(WhopSDK::PlanUpdateParams::Image)) } + attr_reader :image + sig do - returns( - T.nilable( - T.any( - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID - ) - ) - ) + params(image: T.nilable(WhopSDK::PlanUpdateParams::Image::OrHash)).void end - attr_accessor :image + attr_writer :image # An additional amount charged upon first purchase. sig { returns(T.nilable(Float)) } @@ -128,13 +124,7 @@ module WhopSDK T.nilable(T::Array[WhopSDK::PlanUpdateParams::CustomField::OrHash]), description: T.nilable(String), expiration_days: T.nilable(Integer), - image: - T.nilable( - T.any( - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID::OrHash - ) - ), + image: T.nilable(WhopSDK::PlanUpdateParams::Image::OrHash), initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), @@ -213,13 +203,7 @@ module WhopSDK T.nilable(T::Array[WhopSDK::PlanUpdateParams::CustomField]), description: T.nilable(String), expiration_days: T.nilable(Integer), - image: - T.nilable( - T.any( - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID - ) - ), + image: T.nilable(WhopSDK::PlanUpdateParams::Image), initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), @@ -317,82 +301,26 @@ module WhopSDK end end - # An image for the plan. This will be visible on the product page to customers. - module Image - extend WhopSDK::Internal::Type::Union - - Variants = + class Image < WhopSDK::Internal::Type::BaseModel + OrHash = T.type_alias do - T.any( - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID - ) - end - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID, - WhopSDK::Internal::AnyHash - ) - end - - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - sig { returns(String) } - attr_accessor :direct_upload_id - - # Input for an attachment - sig { params(direct_upload_id: String).returns(T.attached_class) } - def self.new( - # This ID should be used the first time you upload an attachment. It is the ID of - # the direct upload that was created when uploading the file to S3 via the - # mediaDirectUpload mutation. - direct_upload_id: - ) - end - - sig { override.returns({ direct_upload_id: String }) } - def to_hash + T.any(WhopSDK::PlanUpdateParams::Image, WhopSDK::Internal::AnyHash) end - end - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID, - WhopSDK::Internal::AnyHash - ) - end - - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - sig { returns(String) } - attr_accessor :id - - # Input for an attachment - sig { params(id: String).returns(T.attached_class) } - def self.new( - # The ID of an existing attachment object. Use this when updating a resource and - # keeping a subset of the attachments. Don't use this unless you know what you're - # doing. - id: - ) - end + # The ID of an existing file object. + sig { returns(String) } + attr_accessor :id - sig { override.returns({ id: String }) } - def to_hash - end + # An image for the plan. This will be visible on the product page to customers. + sig { params(id: String).returns(T.attached_class) } + def self.new( + # The ID of an existing file object. + id: + ) end - sig do - override.returns(T::Array[WhopSDK::PlanUpdateParams::Image::Variants]) - end - def self.variants + sig { override.returns({ id: String }) } + def to_hash end end diff --git a/rbi/whop_sdk/models/withdrawal_create_params.rbi b/rbi/whop_sdk/models/withdrawal_create_params.rbi index 90bdf2f6..2cbd9407 100644 --- a/rbi/whop_sdk/models/withdrawal_create_params.rbi +++ b/rbi/whop_sdk/models/withdrawal_create_params.rbi @@ -27,12 +27,23 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :payout_method_id + # Whether the platform covers the payout fees instead of the connected account. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :platform_covers_fees + + # Custom statement descriptor for the withdrawal. Must be between 5 and 22 + # characters and contain only alphanumeric characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor + sig do params( amount: Float, company_id: String, currency: WhopSDK::Currency::OrSymbol, payout_method_id: T.nilable(String), + platform_covers_fees: T.nilable(T::Boolean), + statement_descriptor: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) end @@ -45,6 +56,11 @@ module WhopSDK currency:, # The ID of the payout method to use for the withdrawal. payout_method_id: nil, + # Whether the platform covers the payout fees instead of the connected account. + platform_covers_fees: nil, + # Custom statement descriptor for the withdrawal. Must be between 5 and 22 + # characters and contain only alphanumeric characters. + statement_descriptor: nil, request_options: {} ) end @@ -56,6 +72,8 @@ module WhopSDK company_id: String, currency: WhopSDK::Currency::OrSymbol, payout_method_id: T.nilable(String), + platform_covers_fees: T.nilable(T::Boolean), + statement_descriptor: T.nilable(String), request_options: WhopSDK::RequestOptions } ) diff --git a/rbi/whop_sdk/models/withdrawal_create_response.rbi b/rbi/whop_sdk/models/withdrawal_create_response.rbi index 2d75b361..5f9c0aa4 100644 --- a/rbi/whop_sdk/models/withdrawal_create_response.rbi +++ b/rbi/whop_sdk/models/withdrawal_create_response.rbi @@ -103,10 +103,6 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :trace_code - # The type of withdrawal. - sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) } - attr_accessor :withdrawal_type - # A withdrawal request. sig do params( @@ -131,8 +127,7 @@ module WhopSDK ), speed: WhopSDK::WithdrawalSpeeds::OrSymbol, status: WhopSDK::WithdrawalStatus::OrSymbol, - trace_code: T.nilable(String), - withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol + trace_code: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -169,9 +164,7 @@ module WhopSDK status:, # The trace code for the payout, if applicable. Provided on ACH transactions when # available. - trace_code:, - # The type of withdrawal. - withdrawal_type: + trace_code: ) end @@ -197,8 +190,7 @@ module WhopSDK T.nilable(WhopSDK::Models::WithdrawalCreateResponse::PayoutToken), speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol, status: WhopSDK::WithdrawalStatus::TaggedSymbol, - trace_code: T.nilable(String), - withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol + trace_code: T.nilable(String) } ) end @@ -340,6 +332,11 @@ module WhopSDK :invalid_beneficiary, WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol ) + INVALID_MAILING_ADDRESS = + T.let( + :invalid_mailing_address, + WhopSDK::Models::WithdrawalCreateResponse::ErrorCode::TaggedSymbol + ) INVALID_BRANCH_NUMBER = T.let( :invalid_branch_number, diff --git a/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi b/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi index a565c8a9..51c6bbf7 100644 --- a/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +++ b/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi @@ -184,10 +184,6 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :trace_code - # The type of withdrawal. - sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) } - attr_accessor :withdrawal_type - # A withdrawal request. sig do params( @@ -212,8 +208,7 @@ module WhopSDK ), speed: WhopSDK::WithdrawalSpeeds::OrSymbol, status: WhopSDK::WithdrawalStatus::OrSymbol, - trace_code: T.nilable(String), - withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol + trace_code: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -250,9 +245,7 @@ module WhopSDK status:, # The trace code for the payout, if applicable. Provided on ACH transactions when # available. - trace_code:, - # The type of withdrawal. - withdrawal_type: + trace_code: ) end @@ -280,8 +273,7 @@ module WhopSDK ), speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol, status: WhopSDK::WithdrawalStatus::TaggedSymbol, - trace_code: T.nilable(String), - withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol + trace_code: T.nilable(String) } ) end @@ -426,6 +418,11 @@ module WhopSDK :invalid_beneficiary, WhopSDK::WithdrawalCreatedWebhookEvent::Data::ErrorCode::TaggedSymbol ) + INVALID_MAILING_ADDRESS = + T.let( + :invalid_mailing_address, + WhopSDK::WithdrawalCreatedWebhookEvent::Data::ErrorCode::TaggedSymbol + ) INVALID_BRANCH_NUMBER = T.let( :invalid_branch_number, diff --git a/rbi/whop_sdk/models/withdrawal_list_response.rbi b/rbi/whop_sdk/models/withdrawal_list_response.rbi index 60bb600e..fc4bb4ad 100644 --- a/rbi/whop_sdk/models/withdrawal_list_response.rbi +++ b/rbi/whop_sdk/models/withdrawal_list_response.rbi @@ -50,10 +50,6 @@ module WhopSDK sig { returns(WhopSDK::WithdrawalStatus::TaggedSymbol) } attr_accessor :status - # The type of withdrawal. - sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) } - attr_accessor :withdrawal_type - # A withdrawal request. sig do params( @@ -65,8 +61,7 @@ module WhopSDK fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::OrSymbol), markup_fee: Float, speed: WhopSDK::WithdrawalSpeeds::OrSymbol, - status: WhopSDK::WithdrawalStatus::OrSymbol, - withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol + status: WhopSDK::WithdrawalStatus::OrSymbol ).returns(T.attached_class) end def self.new( @@ -90,9 +85,7 @@ module WhopSDK # The speed of the withdrawal. speed:, # Status of the withdrawal. - status:, - # The type of withdrawal. - withdrawal_type: + status: ) end @@ -107,8 +100,7 @@ module WhopSDK fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::TaggedSymbol), markup_fee: Float, speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol, - status: WhopSDK::WithdrawalStatus::TaggedSymbol, - withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol + status: WhopSDK::WithdrawalStatus::TaggedSymbol } ) end diff --git a/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi b/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi index d20e3863..2db9feba 100644 --- a/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +++ b/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi @@ -105,10 +105,6 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :trace_code - # The type of withdrawal. - sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) } - attr_accessor :withdrawal_type - # A withdrawal request. sig do params( @@ -133,8 +129,7 @@ module WhopSDK ), speed: WhopSDK::WithdrawalSpeeds::OrSymbol, status: WhopSDK::WithdrawalStatus::OrSymbol, - trace_code: T.nilable(String), - withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol + trace_code: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -171,9 +166,7 @@ module WhopSDK status:, # The trace code for the payout, if applicable. Provided on ACH transactions when # available. - trace_code:, - # The type of withdrawal. - withdrawal_type: + trace_code: ) end @@ -201,8 +194,7 @@ module WhopSDK ), speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol, status: WhopSDK::WithdrawalStatus::TaggedSymbol, - trace_code: T.nilable(String), - withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol + trace_code: T.nilable(String) } ) end @@ -347,6 +339,11 @@ module WhopSDK :invalid_beneficiary, WhopSDK::Models::WithdrawalRetrieveResponse::ErrorCode::TaggedSymbol ) + INVALID_MAILING_ADDRESS = + T.let( + :invalid_mailing_address, + WhopSDK::Models::WithdrawalRetrieveResponse::ErrorCode::TaggedSymbol + ) INVALID_BRANCH_NUMBER = T.let( :invalid_branch_number, diff --git a/rbi/whop_sdk/models/withdrawal_types.rbi b/rbi/whop_sdk/models/withdrawal_types.rbi deleted file mode 100644 index dbc347e1..00000000 --- a/rbi/whop_sdk/models/withdrawal_types.rbi +++ /dev/null @@ -1,20 +0,0 @@ -# typed: strong - -module WhopSDK - module Models - # The types of withdrawals - module WithdrawalTypes - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::WithdrawalTypes) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - REGULAR = T.let(:regular, WhopSDK::WithdrawalTypes::TaggedSymbol) - CLAWBACK = T.let(:clawback, WhopSDK::WithdrawalTypes::TaggedSymbol) - - sig { override.returns(T::Array[WhopSDK::WithdrawalTypes::TaggedSymbol]) } - def self.values - end - end - end -end diff --git a/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi b/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi index b8b2ad8d..43707ba9 100644 --- a/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +++ b/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi @@ -184,10 +184,6 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :trace_code - # The type of withdrawal. - sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) } - attr_accessor :withdrawal_type - # A withdrawal request. sig do params( @@ -212,8 +208,7 @@ module WhopSDK ), speed: WhopSDK::WithdrawalSpeeds::OrSymbol, status: WhopSDK::WithdrawalStatus::OrSymbol, - trace_code: T.nilable(String), - withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol + trace_code: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -250,9 +245,7 @@ module WhopSDK status:, # The trace code for the payout, if applicable. Provided on ACH transactions when # available. - trace_code:, - # The type of withdrawal. - withdrawal_type: + trace_code: ) end @@ -280,8 +273,7 @@ module WhopSDK ), speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol, status: WhopSDK::WithdrawalStatus::TaggedSymbol, - trace_code: T.nilable(String), - withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol + trace_code: T.nilable(String) } ) end @@ -426,6 +418,11 @@ module WhopSDK :invalid_beneficiary, WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol ) + INVALID_MAILING_ADDRESS = + T.let( + :invalid_mailing_address, + WhopSDK::WithdrawalUpdatedWebhookEvent::Data::ErrorCode::TaggedSymbol + ) INVALID_BRANCH_NUMBER = T.let( :invalid_branch_number, diff --git a/rbi/whop_sdk/resources/app_builds.rbi b/rbi/whop_sdk/resources/app_builds.rbi index 55327657..3aad73dc 100644 --- a/rbi/whop_sdk/resources/app_builds.rbi +++ b/rbi/whop_sdk/resources/app_builds.rbi @@ -10,11 +10,7 @@ module WhopSDK # - `developer:manage_builds` sig do params( - attachment: - T.any( - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID::OrHash - ), + attachment: WhopSDK::AppBuildCreateParams::Attachment::OrHash, checksum: String, platform: WhopSDK::AppBuildPlatforms::OrSymbol, ai_prompt_id: T.nilable(String), diff --git a/rbi/whop_sdk/resources/apps.rbi b/rbi/whop_sdk/resources/apps.rbi index 0d18fcd1..3cc5af3c 100644 --- a/rbi/whop_sdk/resources/apps.rbi +++ b/rbi/whop_sdk/resources/apps.rbi @@ -14,6 +14,7 @@ module WhopSDK company_id: String, name: String, base_url: T.nilable(String), + icon: T.nilable(WhopSDK::AppCreateParams::Icon::OrHash), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::App) end @@ -24,6 +25,8 @@ module WhopSDK name:, # The base URL of the app to be created base_url: nil, + # The icon for the app in png, jpeg, or gif format + icon: nil, request_options: {} ) end @@ -62,13 +65,7 @@ module WhopSDK description: T.nilable(String), discover_path: T.nilable(String), experience_path: T.nilable(String), - icon: - T.nilable( - T.any( - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID::OrHash - ) - ), + icon: T.nilable(WhopSDK::AppUpdateParams::Icon::OrHash), name: T.nilable(String), required_scopes: T.nilable( diff --git a/rbi/whop_sdk/resources/checkout_configurations.rbi b/rbi/whop_sdk/resources/checkout_configurations.rbi index 1cbe8fcb..e16497ad 100644 --- a/rbi/whop_sdk/resources/checkout_configurations.rbi +++ b/rbi/whop_sdk/resources/checkout_configurations.rbi @@ -25,6 +25,7 @@ module WhopSDK WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration::OrHash ), redirect_url: T.nilable(String), + source_url: T.nilable(String), mode: Symbol, request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::CheckoutConfiguration) @@ -49,6 +50,8 @@ module WhopSDK payment_method_configuration: nil, # The URL to redirect the user to after the checkout configuration is created redirect_url: nil, + # The URL of the page where the checkout is being initiated from. + source_url: nil, mode: :setup, request_options: {} ) diff --git a/rbi/whop_sdk/resources/companies.rbi b/rbi/whop_sdk/resources/companies.rbi index 010591bc..219f0efd 100644 --- a/rbi/whop_sdk/resources/companies.rbi +++ b/rbi/whop_sdk/resources/companies.rbi @@ -16,6 +16,7 @@ module WhopSDK title: String, business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol), industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol), + logo: T.nilable(WhopSDK::CompanyCreateParams::Logo::OrHash), metadata: T.nilable(T::Hash[Symbol, T.anything]), send_customer_emails: T.nilable(T::Boolean), request_options: WhopSDK::RequestOptions::OrHash @@ -32,6 +33,8 @@ module WhopSDK business_type: nil, # The different industry types a company can be in. industry_type: nil, + # The logo for the company in png, jpeg, or gif format + logo: nil, # Additional metadata for the account metadata: nil, # Whether Whop sends transactional emails to customers on behalf of this company. @@ -72,21 +75,10 @@ module WhopSDK params( id: String, banner_image: - T.nilable( - T.any( - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID::OrHash - ) - ), + T.nilable(WhopSDK::CompanyUpdateParams::BannerImage::OrHash), business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol), industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol), - logo: - T.nilable( - T.any( - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID::OrHash - ) - ), + logo: T.nilable(WhopSDK::CompanyUpdateParams::Logo::OrHash), send_customer_emails: T.nilable(T::Boolean), title: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash diff --git a/rbi/whop_sdk/resources/course_lessons.rbi b/rbi/whop_sdk/resources/course_lessons.rbi index 9939d225..872ec97a 100644 --- a/rbi/whop_sdk/resources/course_lessons.rbi +++ b/rbi/whop_sdk/resources/course_lessons.rbi @@ -17,12 +17,7 @@ module WhopSDK embed_id: T.nilable(String), embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol), thumbnail: - T.nilable( - T.any( - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID::OrHash - ) - ), + T.nilable(WhopSDK::CourseLessonCreateParams::Thumbnail::OrHash), title: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::Lesson) @@ -86,12 +81,7 @@ module WhopSDK ), attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::CourseLessonUpdateParams::Attachment::OrHash] ), content: T.nilable(String), days_from_course_start_until_unlock: T.nilable(Integer), @@ -99,21 +89,11 @@ module WhopSDK embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol), lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol), main_pdf: - T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID::OrHash - ) - ), + T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf::OrHash), max_attempts: T.nilable(Integer), mux_asset_id: T.nilable(String), thumbnail: - T.nilable( - T.any( - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID::OrHash - ) - ), + T.nilable(WhopSDK::CourseLessonUpdateParams::Thumbnail::OrHash), title: T.nilable(String), visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash diff --git a/rbi/whop_sdk/resources/courses.rbi b/rbi/whop_sdk/resources/courses.rbi index 2e70ddae..f5b289df 100644 --- a/rbi/whop_sdk/resources/courses.rbi +++ b/rbi/whop_sdk/resources/courses.rbi @@ -13,17 +13,10 @@ module WhopSDK experience_id: String, title: String, certificate_after_completion_enabled: T.nilable(T::Boolean), - cover_image: T.nilable(String), order: T.nilable(String), require_completing_lessons_in_order: T.nilable(T::Boolean), tagline: T.nilable(String), - thumbnail: - T.nilable( - T.any( - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID::OrHash - ) - ), + thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash), visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::Course) @@ -36,8 +29,6 @@ module WhopSDK # Whether the course will award its students a PDF certificate after completing # all lessons certificate_after_completion_enabled: nil, - # The cover image URL of the course - cover_image: nil, # The decimal order position of the course within its experience. If not provided, # it will be set to the next sequential order. Use fractional values (e.g., 1.5) # to place between existing courses. @@ -85,19 +76,12 @@ module WhopSDK certificate_after_completion_enabled: T.nilable(T::Boolean), chapters: T.nilable(T::Array[WhopSDK::CourseUpdateParams::Chapter::OrHash]), - cover_image: T.nilable(String), description: T.nilable(String), language: T.nilable(WhopSDK::Languages::OrSymbol), order: T.nilable(String), require_completing_lessons_in_order: T.nilable(T::Boolean), tagline: T.nilable(String), - thumbnail: - T.nilable( - T.any( - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID::OrHash - ) - ), + thumbnail: T.nilable(WhopSDK::CourseUpdateParams::Thumbnail::OrHash), title: T.nilable(String), visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol), request_options: WhopSDK::RequestOptions::OrHash @@ -111,8 +95,6 @@ module WhopSDK certificate_after_completion_enabled: nil, # The chapters and lessons to update chapters: nil, - # The cover image URL of the course - cover_image: nil, # A short description of the course description: nil, # The available languages for a course diff --git a/rbi/whop_sdk/resources/disputes.rbi b/rbi/whop_sdk/resources/disputes.rbi index 8efe7224..2f346dcc 100644 --- a/rbi/whop_sdk/resources/disputes.rbi +++ b/rbi/whop_sdk/resources/disputes.rbi @@ -119,18 +119,12 @@ module WhopSDK billing_address: T.nilable(String), cancellation_policy_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID::OrHash - ) + WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::OrHash ), cancellation_policy_disclosure: T.nilable(String), customer_communication_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID::OrHash - ) + WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::OrHash ), customer_email_address: T.nilable(String), customer_name: T.nilable(String), @@ -138,20 +132,14 @@ module WhopSDK product_description: T.nilable(String), refund_policy_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID::OrHash - ) + WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::OrHash ), refund_policy_disclosure: T.nilable(String), refund_refusal_explanation: T.nilable(String), service_date: T.nilable(String), uncategorized_attachment: T.nilable( - T.any( - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID::OrHash - ) + WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::OrHash ), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::Dispute) diff --git a/rbi/whop_sdk/resources/experiences.rbi b/rbi/whop_sdk/resources/experiences.rbi index 1b977f2e..46d45cf5 100644 --- a/rbi/whop_sdk/resources/experiences.rbi +++ b/rbi/whop_sdk/resources/experiences.rbi @@ -11,6 +11,7 @@ module WhopSDK app_id: String, company_id: String, is_public: T.nilable(T::Boolean), + logo: T.nilable(WhopSDK::ExperienceCreateParams::Logo::OrHash), name: T.nilable(String), section_id: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash @@ -23,6 +24,8 @@ module WhopSDK company_id:, # Whether the experience is publicly accessible is_public: nil, + # The logo for the experience + logo: nil, # The name of the experience name: nil, # The ID of the section to create the experience in @@ -54,13 +57,7 @@ module WhopSDK access_level: T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol), is_public: T.nilable(T::Boolean), - logo: - T.nilable( - T.any( - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID::OrHash - ) - ), + logo: T.nilable(WhopSDK::ExperienceUpdateParams::Logo::OrHash), name: T.nilable(String), order: T.nilable(String), section_id: T.nilable(String), diff --git a/rbi/whop_sdk/resources/forum_posts.rbi b/rbi/whop_sdk/resources/forum_posts.rbi index 014a5e14..97c38bb9 100644 --- a/rbi/whop_sdk/resources/forum_posts.rbi +++ b/rbi/whop_sdk/resources/forum_posts.rbi @@ -13,12 +13,7 @@ module WhopSDK experience_id: String, attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::ForumPostCreateParams::Attachment::OrHash] ), content: T.nilable(String), is_mention: T.nilable(T::Boolean), @@ -88,12 +83,7 @@ module WhopSDK id: String, attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::ForumPostUpdateParams::Attachment::OrHash] ), content: T.nilable(String), is_pinned: T.nilable(T::Boolean), diff --git a/rbi/whop_sdk/resources/memberships.rbi b/rbi/whop_sdk/resources/memberships.rbi index fa24327d..0d3edd2d 100644 --- a/rbi/whop_sdk/resources/memberships.rbi +++ b/rbi/whop_sdk/resources/memberships.rbi @@ -8,6 +8,7 @@ module WhopSDK # Required permissions: # # - `member:basic:read` + # - `member:email:read` sig do params( id: String, @@ -26,6 +27,7 @@ module WhopSDK # Required permissions: # # - `member:manage` + # - `member:email:read` # - `member:basic:read` sig do params( @@ -48,6 +50,7 @@ module WhopSDK # Required permissions: # # - `member:basic:read` + # - `member:email:read` sig do params( after: T.nilable(String), @@ -114,6 +117,7 @@ module WhopSDK # Required permissions: # # - `member:manage` + # - `member:email:read` # - `member:basic:read` sig do params( @@ -139,6 +143,7 @@ module WhopSDK # Required permissions: # # - `member:manage` + # - `member:email:read` # - `member:basic:read` sig do params( @@ -162,6 +167,7 @@ module WhopSDK # Required permissions: # # - `member:manage` + # - `member:email:read` # - `member:basic:read` sig do params( diff --git a/rbi/whop_sdk/resources/messages.rbi b/rbi/whop_sdk/resources/messages.rbi index dba342b6..d0a51396 100644 --- a/rbi/whop_sdk/resources/messages.rbi +++ b/rbi/whop_sdk/resources/messages.rbi @@ -14,12 +14,7 @@ module WhopSDK content: String, attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::MessageCreateParams::Attachment::OrHash] ), poll: T.nilable(WhopSDK::MessageCreateParams::Poll::OrHash), request_options: WhopSDK::RequestOptions::OrHash @@ -62,12 +57,7 @@ module WhopSDK id: String, attachments: T.nilable( - T::Array[ - T.any( - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID::OrHash - ) - ] + T::Array[WhopSDK::MessageUpdateParams::Attachment::OrHash] ), content: T.nilable(String), is_pinned: T.nilable(T::Boolean), diff --git a/rbi/whop_sdk/resources/notifications.rbi b/rbi/whop_sdk/resources/notifications.rbi index 584275f5..e7922599 100644 --- a/rbi/whop_sdk/resources/notifications.rbi +++ b/rbi/whop_sdk/resources/notifications.rbi @@ -4,6 +4,10 @@ module WhopSDK module Resources class Notifications # Queues a notification to be sent to users in an experience or company team + # + # Required permissions: + # + # - `notification:create` sig do params( company_id: String, diff --git a/rbi/whop_sdk/resources/plans.rbi b/rbi/whop_sdk/resources/plans.rbi index e9cc7258..b8529e8f 100644 --- a/rbi/whop_sdk/resources/plans.rbi +++ b/rbi/whop_sdk/resources/plans.rbi @@ -20,13 +20,7 @@ module WhopSDK T.nilable(T::Array[WhopSDK::PlanCreateParams::CustomField::OrHash]), description: T.nilable(String), expiration_days: T.nilable(Integer), - image: - T.nilable( - T.any( - WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::PlanCreateParams::Image::AttachmentInputWithID::OrHash - ) - ), + image: T.nilable(WhopSDK::PlanCreateParams::Image::OrHash), initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), @@ -135,13 +129,7 @@ module WhopSDK T.nilable(T::Array[WhopSDK::PlanUpdateParams::CustomField::OrHash]), description: T.nilable(String), expiration_days: T.nilable(Integer), - image: - T.nilable( - T.any( - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID::OrHash, - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID::OrHash - ) - ), + image: T.nilable(WhopSDK::PlanUpdateParams::Image::OrHash), initial_price: T.nilable(Float), internal_notes: T.nilable(String), legacy_payment_method_controls: T.nilable(T::Boolean), diff --git a/rbi/whop_sdk/resources/withdrawals.rbi b/rbi/whop_sdk/resources/withdrawals.rbi index 80c31ff1..57bbfa1a 100644 --- a/rbi/whop_sdk/resources/withdrawals.rbi +++ b/rbi/whop_sdk/resources/withdrawals.rbi @@ -15,6 +15,8 @@ module WhopSDK company_id: String, currency: WhopSDK::Currency::OrSymbol, payout_method_id: T.nilable(String), + platform_covers_fees: T.nilable(T::Boolean), + statement_descriptor: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::Models::WithdrawalCreateResponse) end @@ -27,6 +29,11 @@ module WhopSDK currency:, # The ID of the payout method to use for the withdrawal. payout_method_id: nil, + # Whether the platform covers the payout fees instead of the connected account. + platform_covers_fees: nil, + # Custom statement descriptor for the withdrawal. Must be between 5 and 22 + # characters and contain only alphanumeric characters. + statement_descriptor: nil, request_options: {} ) end diff --git a/sig/whop_sdk/models.rbs b/sig/whop_sdk/models.rbs index faa32bf0..7d267e53 100644 --- a/sig/whop_sdk/models.rbs +++ b/sig/whop_sdk/models.rbs @@ -535,7 +535,5 @@ module WhopSDK module WithdrawalStatus = WhopSDK::Models::WithdrawalStatus - module WithdrawalTypes = WhopSDK::Models::WithdrawalTypes - class WithdrawalUpdatedWebhookEvent = WhopSDK::Models::WithdrawalUpdatedWebhookEvent end diff --git a/sig/whop_sdk/models/app_build_create_params.rbs b/sig/whop_sdk/models/app_build_create_params.rbs index ca60ff6b..50ec92b5 100644 --- a/sig/whop_sdk/models/app_build_create_params.rbs +++ b/sig/whop_sdk/models/app_build_create_params.rbs @@ -2,7 +2,7 @@ module WhopSDK module Models type app_build_create_params = { - attachment: WhopSDK::Models::AppBuildCreateParams::attachment, + attachment: WhopSDK::AppBuildCreateParams::Attachment, checksum: String, platform: WhopSDK::Models::app_build_platforms, ai_prompt_id: String?, @@ -15,7 +15,7 @@ module WhopSDK extend WhopSDK::Internal::Type::RequestParameters::Converter include WhopSDK::Internal::Type::RequestParameters - attr_accessor attachment: WhopSDK::Models::AppBuildCreateParams::attachment + attr_accessor attachment: WhopSDK::AppBuildCreateParams::Attachment attr_accessor checksum: String @@ -28,7 +28,7 @@ module WhopSDK attr_accessor supported_app_view_types: ::Array[WhopSDK::Models::app_view_type]? def initialize: ( - attachment: WhopSDK::Models::AppBuildCreateParams::attachment, + attachment: WhopSDK::AppBuildCreateParams::Attachment, checksum: String, platform: WhopSDK::Models::app_build_platforms, ?ai_prompt_id: String?, @@ -38,7 +38,7 @@ module WhopSDK ) -> void def to_hash: -> { - attachment: WhopSDK::Models::AppBuildCreateParams::attachment, + attachment: WhopSDK::AppBuildCreateParams::Attachment, checksum: String, platform: WhopSDK::Models::app_build_platforms, ai_prompt_id: String?, @@ -47,35 +47,14 @@ module WhopSDK request_options: WhopSDK::RequestOptions } - type attachment = - WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID - | WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID + type attachment = { id: String } - module Attachment - extend WhopSDK::Internal::Type::Union + class Attachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::AppBuildCreateParams::attachment] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/app_create_params.rbs b/sig/whop_sdk/models/app_create_params.rbs index 49264d3f..dc31d7db 100644 --- a/sig/whop_sdk/models/app_create_params.rbs +++ b/sig/whop_sdk/models/app_create_params.rbs @@ -1,7 +1,12 @@ module WhopSDK module Models type app_create_params = - { company_id: String, name: String, base_url: String? } + { + company_id: String, + name: String, + base_url: String?, + icon: WhopSDK::AppCreateParams::Icon? + } & WhopSDK::Internal::Type::request_parameters class AppCreateParams < WhopSDK::Internal::Type::BaseModel @@ -14,10 +19,13 @@ module WhopSDK attr_accessor base_url: String? + attr_accessor icon: WhopSDK::AppCreateParams::Icon? + def initialize: ( company_id: String, name: String, ?base_url: String?, + ?icon: WhopSDK::AppCreateParams::Icon?, ?request_options: WhopSDK::request_opts ) -> void @@ -25,8 +33,19 @@ module WhopSDK company_id: String, name: String, base_url: String?, + icon: WhopSDK::AppCreateParams::Icon?, request_options: WhopSDK::RequestOptions } + + type icon = { id: String } + + class Icon < 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/app_list_params.rbs b/sig/whop_sdk/models/app_list_params.rbs index cb29ca2d..9c98c144 100644 --- a/sig/whop_sdk/models/app_list_params.rbs +++ b/sig/whop_sdk/models/app_list_params.rbs @@ -79,6 +79,11 @@ module WhopSDK | :time_spent | :time_spent_last_24_hours | :daily_active_users + | :ai_prompt_count + | :total_ai_cost_usd + | :total_ai_tokens + | :last_ai_prompt_at + | :ai_average_rating module Order extend WhopSDK::Internal::Type::Enum @@ -89,6 +94,11 @@ module WhopSDK TIME_SPENT: :time_spent TIME_SPENT_LAST_24_HOURS: :time_spent_last_24_hours DAILY_ACTIVE_USERS: :daily_active_users + AI_PROMPT_COUNT: :ai_prompt_count + TOTAL_AI_COST_USD: :total_ai_cost_usd + TOTAL_AI_TOKENS: :total_ai_tokens + LAST_AI_PROMPT_AT: :last_ai_prompt_at + AI_AVERAGE_RATING: :ai_average_rating def self?.values: -> ::Array[WhopSDK::Models::AppListParams::order] end diff --git a/sig/whop_sdk/models/app_update_params.rbs b/sig/whop_sdk/models/app_update_params.rbs index e0c9d62b..e47a47d0 100644 --- a/sig/whop_sdk/models/app_update_params.rbs +++ b/sig/whop_sdk/models/app_update_params.rbs @@ -9,7 +9,7 @@ module WhopSDK description: String?, discover_path: String?, experience_path: String?, - icon: WhopSDK::Models::AppUpdateParams::icon?, + icon: WhopSDK::AppUpdateParams::Icon?, name: String?, required_scopes: ::Array[WhopSDK::Models::AppUpdateParams::required_scope]?, status: WhopSDK::Models::app_statuses? @@ -34,7 +34,7 @@ module WhopSDK attr_accessor experience_path: String? - attr_accessor icon: WhopSDK::Models::AppUpdateParams::icon? + attr_accessor icon: WhopSDK::AppUpdateParams::Icon? attr_accessor name: String? @@ -50,7 +50,7 @@ module WhopSDK ?description: String?, ?discover_path: String?, ?experience_path: String?, - ?icon: WhopSDK::Models::AppUpdateParams::icon?, + ?icon: WhopSDK::AppUpdateParams::Icon?, ?name: String?, ?required_scopes: ::Array[WhopSDK::Models::AppUpdateParams::required_scope]?, ?status: WhopSDK::Models::app_statuses?, @@ -65,42 +65,21 @@ module WhopSDK description: String?, discover_path: String?, experience_path: String?, - icon: WhopSDK::Models::AppUpdateParams::icon?, + icon: WhopSDK::AppUpdateParams::Icon?, name: String?, required_scopes: ::Array[WhopSDK::Models::AppUpdateParams::required_scope]?, status: WhopSDK::Models::app_statuses?, request_options: WhopSDK::RequestOptions } - type icon = - WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID - | WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID + type icon = { id: String } - module Icon - extend WhopSDK::Internal::Type::Union + class Icon < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::AppUpdateParams::icon] + def to_hash: -> { id: String } end type required_scope = :read_user diff --git a/sig/whop_sdk/models/card_brands.rbs b/sig/whop_sdk/models/card_brands.rbs index 63222562..9d91563a 100644 --- a/sig/whop_sdk/models/card_brands.rbs +++ b/sig/whop_sdk/models/card_brands.rbs @@ -17,6 +17,22 @@ module WhopSDK | :jcbrupay | :elo | :maestro + | :tarjeta_naranja + | :cirrus + | :nspk_mir + | :verve + | :ebt + | :private_label + | :local_brand + | :uatp + | :wexcard + | :uzcard + | :meeza + | :hrg_store_card + | :girocard + | :fuel_card + | :dankort + | :carnet | :unknown module CardBrands @@ -38,6 +54,22 @@ module WhopSDK JCBRUPAY: :jcbrupay ELO: :elo MAESTRO: :maestro + TARJETA_NARANJA: :tarjeta_naranja + CIRRUS: :cirrus + NSPK_MIR: :nspk_mir + VERVE: :verve + EBT: :ebt + PRIVATE_LABEL: :private_label + LOCAL_BRAND: :local_brand + UATP: :uatp + WEXCARD: :wexcard + UZCARD: :uzcard + MEEZA: :meeza + HRG_STORE_CARD: :hrg_store_card + GIROCARD: :girocard + FUEL_CARD: :fuel_card + DANKORT: :dankort + CARNET: :carnet UNKNOWN: :unknown def self?.values: -> ::Array[WhopSDK::Models::card_brands] diff --git a/sig/whop_sdk/models/checkout_configuration_create_params.rbs b/sig/whop_sdk/models/checkout_configuration_create_params.rbs index 3e8c52c7..3310544b 100644 --- a/sig/whop_sdk/models/checkout_configuration_create_params.rbs +++ b/sig/whop_sdk/models/checkout_configuration_create_params.rbs @@ -9,6 +9,7 @@ module WhopSDK mode: :setup, payment_method_configuration: WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?, redirect_url: String?, + source_url: String?, plan_id: String, company_id: String } @@ -32,6 +33,8 @@ module WhopSDK attr_accessor redirect_url: String? + attr_accessor source_url: String? + attr_accessor plan_id: String attr_accessor company_id: String @@ -45,6 +48,7 @@ module WhopSDK ?metadata: ::Hash[Symbol, top]?, ?payment_method_configuration: WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?, ?redirect_url: String?, + ?source_url: String?, ?mode: :setup, ?request_options: WhopSDK::request_opts ) -> void @@ -57,6 +61,7 @@ module WhopSDK mode: :setup, payment_method_configuration: WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?, redirect_url: String?, + source_url: String?, plan_id: String, company_id: String, request_options: WhopSDK::RequestOptions @@ -72,7 +77,7 @@ module WhopSDK description: String?, expiration_days: Integer?, force_create_new_plan: bool?, - image: WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::image?, + image: WhopSDK::CheckoutConfigurationCreateParams::Plan::Image?, initial_price: Float?, internal_notes: String?, override_tax_type: WhopSDK::Models::tax_type?, @@ -83,6 +88,7 @@ module WhopSDK release_method: WhopSDK::Models::release_method?, renewal_price: Float?, split_pay_required_payments: Integer?, + stock: Integer?, title: String?, trial_period_days: Integer?, visibility: WhopSDK::Models::visibility? @@ -105,7 +111,7 @@ module WhopSDK attr_accessor force_create_new_plan: bool? - attr_accessor image: WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::image? + attr_accessor image: WhopSDK::CheckoutConfigurationCreateParams::Plan::Image? attr_accessor initial_price: Float? @@ -127,6 +133,8 @@ module WhopSDK attr_accessor split_pay_required_payments: Integer? + attr_accessor stock: Integer? + attr_accessor title: String? attr_accessor trial_period_days: Integer? @@ -142,7 +150,7 @@ module WhopSDK ?description: String?, ?expiration_days: Integer?, ?force_create_new_plan: bool?, - ?image: WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::image?, + ?image: WhopSDK::CheckoutConfigurationCreateParams::Plan::Image?, ?initial_price: Float?, ?internal_notes: String?, ?override_tax_type: WhopSDK::Models::tax_type?, @@ -153,6 +161,7 @@ module WhopSDK ?release_method: WhopSDK::Models::release_method?, ?renewal_price: Float?, ?split_pay_required_payments: Integer?, + ?stock: Integer?, ?title: String?, ?trial_period_days: Integer?, ?visibility: WhopSDK::Models::visibility? @@ -167,7 +176,7 @@ module WhopSDK description: String?, expiration_days: Integer?, force_create_new_plan: bool?, - image: WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::image?, + image: WhopSDK::CheckoutConfigurationCreateParams::Plan::Image?, initial_price: Float?, internal_notes: String?, override_tax_type: WhopSDK::Models::tax_type?, @@ -178,6 +187,7 @@ module WhopSDK release_method: WhopSDK::Models::release_method?, renewal_price: Float?, split_pay_required_payments: Integer?, + stock: Integer?, title: String?, trial_period_days: Integer?, visibility: WhopSDK::Models::visibility? @@ -225,35 +235,14 @@ module WhopSDK } end - type image = - WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithDirectUploadID - | WhopSDK::CheckoutConfigurationCreateParams::Plan::Image::AttachmentInputWithID - - module Image - extend WhopSDK::Internal::Type::Union - - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String + type image = { id: String } - def initialize: (id: String) -> void + class Image < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - def to_hash: -> { id: String } - end + def initialize: (id: String) -> void - def self?.variants: -> ::Array[WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::image] + def to_hash: -> { id: String } end type payment_method_configuration = diff --git a/sig/whop_sdk/models/company_create_params.rbs b/sig/whop_sdk/models/company_create_params.rbs index a98200b0..c57862a0 100644 --- a/sig/whop_sdk/models/company_create_params.rbs +++ b/sig/whop_sdk/models/company_create_params.rbs @@ -7,6 +7,7 @@ module WhopSDK title: String, business_type: WhopSDK::Models::business_types?, industry_type: WhopSDK::Models::industry_types?, + logo: WhopSDK::CompanyCreateParams::Logo?, metadata: ::Hash[Symbol, top]?, send_customer_emails: bool? } @@ -26,6 +27,8 @@ module WhopSDK attr_accessor industry_type: WhopSDK::Models::industry_types? + attr_accessor logo: WhopSDK::CompanyCreateParams::Logo? + attr_accessor metadata: ::Hash[Symbol, top]? attr_accessor send_customer_emails: bool? @@ -36,6 +39,7 @@ module WhopSDK title: String, ?business_type: WhopSDK::Models::business_types?, ?industry_type: WhopSDK::Models::industry_types?, + ?logo: WhopSDK::CompanyCreateParams::Logo?, ?metadata: ::Hash[Symbol, top]?, ?send_customer_emails: bool?, ?request_options: WhopSDK::request_opts @@ -47,10 +51,21 @@ module WhopSDK title: String, business_type: WhopSDK::Models::business_types?, industry_type: WhopSDK::Models::industry_types?, + logo: WhopSDK::CompanyCreateParams::Logo?, metadata: ::Hash[Symbol, top]?, send_customer_emails: bool?, request_options: WhopSDK::RequestOptions } + + type logo = { id: String } + + class Logo < 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/company_update_params.rbs b/sig/whop_sdk/models/company_update_params.rbs index 9247485c..3963c5b5 100644 --- a/sig/whop_sdk/models/company_update_params.rbs +++ b/sig/whop_sdk/models/company_update_params.rbs @@ -2,10 +2,10 @@ module WhopSDK module Models type company_update_params = { - banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?, + banner_image: WhopSDK::CompanyUpdateParams::BannerImage?, business_type: WhopSDK::Models::business_types?, industry_type: WhopSDK::Models::industry_types?, - logo: WhopSDK::Models::CompanyUpdateParams::logo?, + logo: WhopSDK::CompanyUpdateParams::Logo?, send_customer_emails: bool?, title: String? } @@ -15,98 +15,56 @@ module WhopSDK extend WhopSDK::Internal::Type::RequestParameters::Converter include WhopSDK::Internal::Type::RequestParameters - attr_accessor banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image? + attr_accessor banner_image: WhopSDK::CompanyUpdateParams::BannerImage? attr_accessor business_type: WhopSDK::Models::business_types? attr_accessor industry_type: WhopSDK::Models::industry_types? - attr_accessor logo: WhopSDK::Models::CompanyUpdateParams::logo? + attr_accessor logo: WhopSDK::CompanyUpdateParams::Logo? attr_accessor send_customer_emails: bool? attr_accessor title: String? def initialize: ( - ?banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?, + ?banner_image: WhopSDK::CompanyUpdateParams::BannerImage?, ?business_type: WhopSDK::Models::business_types?, ?industry_type: WhopSDK::Models::industry_types?, - ?logo: WhopSDK::Models::CompanyUpdateParams::logo?, + ?logo: WhopSDK::CompanyUpdateParams::Logo?, ?send_customer_emails: bool?, ?title: String?, ?request_options: WhopSDK::request_opts ) -> void def to_hash: -> { - banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?, + banner_image: WhopSDK::CompanyUpdateParams::BannerImage?, business_type: WhopSDK::Models::business_types?, industry_type: WhopSDK::Models::industry_types?, - logo: WhopSDK::Models::CompanyUpdateParams::logo?, + logo: WhopSDK::CompanyUpdateParams::Logo?, send_customer_emails: bool?, title: String?, request_options: WhopSDK::RequestOptions } - type banner_image = - WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID - | WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID + type banner_image = { id: String } - module BannerImage - extend WhopSDK::Internal::Type::Union + class BannerImage < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::CompanyUpdateParams::banner_image] + def to_hash: -> { id: String } end - type logo = - WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID - | WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID - - module Logo - extend WhopSDK::Internal::Type::Union - - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String + type logo = { id: String } - def initialize: (id: String) -> void + class Logo < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - def to_hash: -> { id: String } - end + def initialize: (id: String) -> void - def self?.variants: -> ::Array[WhopSDK::Models::CompanyUpdateParams::logo] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/course_create_params.rbs b/sig/whop_sdk/models/course_create_params.rbs index faddc3ac..95bc0add 100644 --- a/sig/whop_sdk/models/course_create_params.rbs +++ b/sig/whop_sdk/models/course_create_params.rbs @@ -5,11 +5,10 @@ module WhopSDK experience_id: String, title: String, certificate_after_completion_enabled: bool?, - cover_image: String?, order: String?, require_completing_lessons_in_order: bool?, tagline: String?, - thumbnail: WhopSDK::Models::CourseCreateParams::thumbnail?, + thumbnail: WhopSDK::CourseCreateParams::Thumbnail?, visibility: WhopSDK::Models::course_visibilities? } & WhopSDK::Internal::Type::request_parameters @@ -24,15 +23,13 @@ module WhopSDK attr_accessor certificate_after_completion_enabled: bool? - attr_accessor cover_image: String? - attr_accessor order: String? attr_accessor require_completing_lessons_in_order: bool? attr_accessor tagline: String? - attr_accessor thumbnail: WhopSDK::Models::CourseCreateParams::thumbnail? + attr_accessor thumbnail: WhopSDK::CourseCreateParams::Thumbnail? attr_accessor visibility: WhopSDK::Models::course_visibilities? @@ -40,11 +37,10 @@ module WhopSDK experience_id: String, title: String, ?certificate_after_completion_enabled: bool?, - ?cover_image: String?, ?order: String?, ?require_completing_lessons_in_order: bool?, ?tagline: String?, - ?thumbnail: WhopSDK::Models::CourseCreateParams::thumbnail?, + ?thumbnail: WhopSDK::CourseCreateParams::Thumbnail?, ?visibility: WhopSDK::Models::course_visibilities?, ?request_options: WhopSDK::request_opts ) -> void @@ -53,44 +49,22 @@ module WhopSDK experience_id: String, title: String, certificate_after_completion_enabled: bool?, - cover_image: String?, order: String?, require_completing_lessons_in_order: bool?, tagline: String?, - thumbnail: WhopSDK::Models::CourseCreateParams::thumbnail?, + thumbnail: WhopSDK::CourseCreateParams::Thumbnail?, visibility: WhopSDK::Models::course_visibilities?, request_options: WhopSDK::RequestOptions } - type thumbnail = - WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID - | WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID - - module Thumbnail - extend WhopSDK::Internal::Type::Union - - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String + type thumbnail = { id: String } - def initialize: (id: String) -> void + class Thumbnail < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - def to_hash: -> { id: String } - end + def initialize: (id: String) -> void - def self?.variants: -> ::Array[WhopSDK::Models::CourseCreateParams::thumbnail] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/course_lesson_create_params.rbs b/sig/whop_sdk/models/course_lesson_create_params.rbs index 02879c39..dc7cd591 100644 --- a/sig/whop_sdk/models/course_lesson_create_params.rbs +++ b/sig/whop_sdk/models/course_lesson_create_params.rbs @@ -8,7 +8,7 @@ module WhopSDK days_from_course_start_until_unlock: Integer?, embed_id: String?, embed_type: WhopSDK::Models::embed_type?, - thumbnail: WhopSDK::Models::CourseLessonCreateParams::thumbnail?, + thumbnail: WhopSDK::CourseLessonCreateParams::Thumbnail?, title: String? } & WhopSDK::Internal::Type::request_parameters @@ -29,7 +29,7 @@ module WhopSDK attr_accessor embed_type: WhopSDK::Models::embed_type? - attr_accessor thumbnail: WhopSDK::Models::CourseLessonCreateParams::thumbnail? + attr_accessor thumbnail: WhopSDK::CourseLessonCreateParams::Thumbnail? attr_accessor title: String? @@ -40,7 +40,7 @@ module WhopSDK ?days_from_course_start_until_unlock: Integer?, ?embed_id: String?, ?embed_type: WhopSDK::Models::embed_type?, - ?thumbnail: WhopSDK::Models::CourseLessonCreateParams::thumbnail?, + ?thumbnail: WhopSDK::CourseLessonCreateParams::Thumbnail?, ?title: String?, ?request_options: WhopSDK::request_opts ) -> void @@ -52,40 +52,19 @@ module WhopSDK days_from_course_start_until_unlock: Integer?, embed_id: String?, embed_type: WhopSDK::Models::embed_type?, - thumbnail: WhopSDK::Models::CourseLessonCreateParams::thumbnail?, + thumbnail: WhopSDK::CourseLessonCreateParams::Thumbnail?, title: String?, request_options: WhopSDK::RequestOptions } - type thumbnail = - WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID - | WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID + type thumbnail = { id: String } - module Thumbnail - extend WhopSDK::Internal::Type::Union + class Thumbnail < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::CourseLessonCreateParams::thumbnail] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/course_lesson_update_params.rbs b/sig/whop_sdk/models/course_lesson_update_params.rbs index 7b24277c..f211f8f1 100644 --- a/sig/whop_sdk/models/course_lesson_update_params.rbs +++ b/sig/whop_sdk/models/course_lesson_update_params.rbs @@ -4,16 +4,16 @@ module WhopSDK { assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?, assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?, - attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?, + attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?, content: String?, days_from_course_start_until_unlock: Integer?, embed_id: String?, embed_type: WhopSDK::Models::embed_type?, lesson_type: WhopSDK::Models::lesson_types?, - main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?, + main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?, max_attempts: Integer?, mux_asset_id: String?, - thumbnail: WhopSDK::Models::CourseLessonUpdateParams::thumbnail?, + thumbnail: WhopSDK::CourseLessonUpdateParams::Thumbnail?, title: String?, visibility: WhopSDK::Models::lesson_visibilities? } @@ -27,7 +27,7 @@ module WhopSDK attr_accessor assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]? - attr_accessor attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]? + attr_accessor attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]? attr_accessor content: String? @@ -39,13 +39,13 @@ module WhopSDK attr_accessor lesson_type: WhopSDK::Models::lesson_types? - attr_accessor main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf? + attr_accessor main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf? attr_accessor max_attempts: Integer? attr_accessor mux_asset_id: String? - attr_accessor thumbnail: WhopSDK::Models::CourseLessonUpdateParams::thumbnail? + attr_accessor thumbnail: WhopSDK::CourseLessonUpdateParams::Thumbnail? attr_accessor title: String? @@ -54,16 +54,16 @@ module WhopSDK def initialize: ( ?assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?, ?assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?, - ?attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?, + ?attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?, ?content: String?, ?days_from_course_start_until_unlock: Integer?, ?embed_id: String?, ?embed_type: WhopSDK::Models::embed_type?, ?lesson_type: WhopSDK::Models::lesson_types?, - ?main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?, + ?main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?, ?max_attempts: Integer?, ?mux_asset_id: String?, - ?thumbnail: WhopSDK::Models::CourseLessonUpdateParams::thumbnail?, + ?thumbnail: WhopSDK::CourseLessonUpdateParams::Thumbnail?, ?title: String?, ?visibility: WhopSDK::Models::lesson_visibilities?, ?request_options: WhopSDK::request_opts @@ -72,16 +72,16 @@ module WhopSDK def to_hash: -> { assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?, assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?, - attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?, + attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?, content: String?, days_from_course_start_until_unlock: Integer?, embed_id: String?, embed_type: WhopSDK::Models::embed_type?, lesson_type: WhopSDK::Models::lesson_types?, - main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?, + main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?, max_attempts: Integer?, mux_asset_id: String?, - thumbnail: WhopSDK::Models::CourseLessonUpdateParams::thumbnail?, + thumbnail: WhopSDK::CourseLessonUpdateParams::Thumbnail?, title: String?, visibility: WhopSDK::Models::lesson_visibilities?, request_options: WhopSDK::RequestOptions @@ -112,7 +112,7 @@ module WhopSDK question_text: String, question_type: WhopSDK::Models::assessment_question_types, id: String?, - image: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image?, + image: WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image?, options: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]? } @@ -125,7 +125,7 @@ module WhopSDK attr_accessor id: String? - attr_accessor image: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image? + attr_accessor image: WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image? attr_accessor options: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]? @@ -134,7 +134,7 @@ module WhopSDK question_text: String, question_type: WhopSDK::Models::assessment_question_types, ?id: String?, - ?image: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image?, + ?image: WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image?, ?options: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]? ) -> void @@ -143,39 +143,18 @@ module WhopSDK question_text: String, question_type: WhopSDK::Models::assessment_question_types, id: String?, - image: WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image?, + image: WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image?, options: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Option]? } - type image = - WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithDirectUploadID - | WhopSDK::CourseLessonUpdateParams::AssessmentQuestion::Image::AttachmentInputWithID + type image = { id: String } - module Image - extend WhopSDK::Internal::Type::Union - - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void + class Image < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - def to_hash: -> { id: String } - end + def initialize: (id: String) -> void - def self?.variants: -> ::Array[WhopSDK::Models::CourseLessonUpdateParams::AssessmentQuestion::image] + def to_hash: -> { id: String } end type option = { is_correct: bool, option_text: String, id: String? } @@ -197,97 +176,34 @@ module WhopSDK end end - type attachment = - WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID - | WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID - - module Attachment - extend WhopSDK::Internal::Type::Union - - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + type attachment = { id: String } - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String + class Attachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - def initialize: (direct_upload_id: String) -> void + def initialize: (id: String) -> void - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment] + def to_hash: -> { id: String } end - type main_pdf = - WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID - | WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID - - module MainPdf - extend WhopSDK::Internal::Type::Union + type main_pdf = { id: String } - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + class MainPdf < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String + def initialize: (id: String) -> void - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::CourseLessonUpdateParams::main_pdf] + def to_hash: -> { id: String } end - type thumbnail = - WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID - | WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID - - module Thumbnail - extend WhopSDK::Internal::Type::Union + type thumbnail = { id: String } - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + class Thumbnail < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end + def initialize: (id: String) -> void - def self?.variants: -> ::Array[WhopSDK::Models::CourseLessonUpdateParams::thumbnail] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/course_update_params.rbs b/sig/whop_sdk/models/course_update_params.rbs index b50f18c3..1d70ad9a 100644 --- a/sig/whop_sdk/models/course_update_params.rbs +++ b/sig/whop_sdk/models/course_update_params.rbs @@ -4,13 +4,12 @@ module WhopSDK { certificate_after_completion_enabled: bool?, chapters: ::Array[WhopSDK::CourseUpdateParams::Chapter]?, - cover_image: String?, description: String?, language: WhopSDK::Models::languages?, order: String?, require_completing_lessons_in_order: bool?, tagline: String?, - thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?, + thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?, title: String?, visibility: WhopSDK::Models::course_visibilities? } @@ -24,8 +23,6 @@ module WhopSDK attr_accessor chapters: ::Array[WhopSDK::CourseUpdateParams::Chapter]? - attr_accessor cover_image: String? - attr_accessor description: String? attr_accessor language: WhopSDK::Models::languages? @@ -36,7 +33,7 @@ module WhopSDK attr_accessor tagline: String? - attr_accessor thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail? + attr_accessor thumbnail: WhopSDK::CourseUpdateParams::Thumbnail? attr_accessor title: String? @@ -45,13 +42,12 @@ module WhopSDK def initialize: ( ?certificate_after_completion_enabled: bool?, ?chapters: ::Array[WhopSDK::CourseUpdateParams::Chapter]?, - ?cover_image: String?, ?description: String?, ?language: WhopSDK::Models::languages?, ?order: String?, ?require_completing_lessons_in_order: bool?, ?tagline: String?, - ?thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?, + ?thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?, ?title: String?, ?visibility: WhopSDK::Models::course_visibilities?, ?request_options: WhopSDK::request_opts @@ -60,13 +56,12 @@ module WhopSDK def to_hash: -> { certificate_after_completion_enabled: bool?, chapters: ::Array[WhopSDK::CourseUpdateParams::Chapter]?, - cover_image: String?, description: String?, language: WhopSDK::Models::languages?, order: String?, require_completing_lessons_in_order: bool?, tagline: String?, - thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?, + thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?, title: String?, visibility: WhopSDK::Models::course_visibilities?, request_options: WhopSDK::RequestOptions @@ -131,35 +126,14 @@ module WhopSDK end end - type thumbnail = - WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID - | WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID - - module Thumbnail - extend WhopSDK::Internal::Type::Union - - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String + type thumbnail = { id: String } - def initialize: (id: String) -> void + class Thumbnail < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - def to_hash: -> { id: String } - end + def initialize: (id: String) -> void - def self?.variants: -> ::Array[WhopSDK::Models::CourseUpdateParams::thumbnail] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/dispute_update_evidence_params.rbs b/sig/whop_sdk/models/dispute_update_evidence_params.rbs index 52042089..3695bd4a 100644 --- a/sig/whop_sdk/models/dispute_update_evidence_params.rbs +++ b/sig/whop_sdk/models/dispute_update_evidence_params.rbs @@ -4,18 +4,18 @@ module WhopSDK { access_activity_log: String?, billing_address: String?, - cancellation_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::cancellation_policy_attachment?, + cancellation_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment?, cancellation_policy_disclosure: String?, - customer_communication_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::customer_communication_attachment?, + customer_communication_attachment: WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment?, customer_email_address: String?, customer_name: String?, notes: String?, product_description: String?, - refund_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::refund_policy_attachment?, + refund_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment?, refund_policy_disclosure: String?, refund_refusal_explanation: String?, service_date: String?, - uncategorized_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::uncategorized_attachment? + uncategorized_attachment: WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment? } & WhopSDK::Internal::Type::request_parameters @@ -27,11 +27,11 @@ module WhopSDK attr_accessor billing_address: String? - attr_accessor cancellation_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::cancellation_policy_attachment? + attr_accessor cancellation_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment? attr_accessor cancellation_policy_disclosure: String? - attr_accessor customer_communication_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::customer_communication_attachment? + attr_accessor customer_communication_attachment: WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment? attr_accessor customer_email_address: String? @@ -41,7 +41,7 @@ module WhopSDK attr_accessor product_description: String? - attr_accessor refund_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::refund_policy_attachment? + attr_accessor refund_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment? attr_accessor refund_policy_disclosure: String? @@ -49,166 +49,82 @@ module WhopSDK attr_accessor service_date: String? - attr_accessor uncategorized_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::uncategorized_attachment? + attr_accessor uncategorized_attachment: WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment? def initialize: ( ?access_activity_log: String?, ?billing_address: String?, - ?cancellation_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::cancellation_policy_attachment?, + ?cancellation_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment?, ?cancellation_policy_disclosure: String?, - ?customer_communication_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::customer_communication_attachment?, + ?customer_communication_attachment: WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment?, ?customer_email_address: String?, ?customer_name: String?, ?notes: String?, ?product_description: String?, - ?refund_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::refund_policy_attachment?, + ?refund_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment?, ?refund_policy_disclosure: String?, ?refund_refusal_explanation: String?, ?service_date: String?, - ?uncategorized_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::uncategorized_attachment?, + ?uncategorized_attachment: WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment?, ?request_options: WhopSDK::request_opts ) -> void def to_hash: -> { access_activity_log: String?, billing_address: String?, - cancellation_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::cancellation_policy_attachment?, + cancellation_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment?, cancellation_policy_disclosure: String?, - customer_communication_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::customer_communication_attachment?, + customer_communication_attachment: WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment?, customer_email_address: String?, customer_name: String?, notes: String?, product_description: String?, - refund_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::refund_policy_attachment?, + refund_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment?, refund_policy_disclosure: String?, refund_refusal_explanation: String?, service_date: String?, - uncategorized_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::uncategorized_attachment?, + uncategorized_attachment: WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment?, request_options: WhopSDK::RequestOptions } - type cancellation_policy_attachment = - WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID - | WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID + type cancellation_policy_attachment = { id: String } - module CancellationPolicyAttachment - extend WhopSDK::Internal::Type::Union + class CancellationPolicyAttachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::DisputeUpdateEvidenceParams::cancellation_policy_attachment] + def to_hash: -> { id: String } end - type customer_communication_attachment = - WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID - | WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID - - module CustomerCommunicationAttachment - extend WhopSDK::Internal::Type::Union - - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String + type customer_communication_attachment = { id: String } - def initialize: (id: String) -> void + class CustomerCommunicationAttachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - def to_hash: -> { id: String } - end + def initialize: (id: String) -> void - def self?.variants: -> ::Array[WhopSDK::Models::DisputeUpdateEvidenceParams::customer_communication_attachment] + def to_hash: -> { id: String } end - type refund_policy_attachment = - WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID - | WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID + type refund_policy_attachment = { id: String } - module RefundPolicyAttachment - extend WhopSDK::Internal::Type::Union + class RefundPolicyAttachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::DisputeUpdateEvidenceParams::refund_policy_attachment] + def to_hash: -> { id: String } end - type uncategorized_attachment = - WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID - | WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID - - module UncategorizedAttachment - extend WhopSDK::Internal::Type::Union - - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } - - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String + type uncategorized_attachment = { id: String } - def initialize: (id: String) -> void + class UncategorizedAttachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - def to_hash: -> { id: String } - end + def initialize: (id: String) -> void - def self?.variants: -> ::Array[WhopSDK::Models::DisputeUpdateEvidenceParams::uncategorized_attachment] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/experience_create_params.rbs b/sig/whop_sdk/models/experience_create_params.rbs index 40f8ea15..d3a88d71 100644 --- a/sig/whop_sdk/models/experience_create_params.rbs +++ b/sig/whop_sdk/models/experience_create_params.rbs @@ -5,6 +5,7 @@ module WhopSDK app_id: String, company_id: String, is_public: bool?, + logo: WhopSDK::ExperienceCreateParams::Logo?, name: String?, section_id: String? } @@ -20,6 +21,8 @@ module WhopSDK attr_accessor is_public: bool? + attr_accessor logo: WhopSDK::ExperienceCreateParams::Logo? + attr_accessor name: String? attr_accessor section_id: String? @@ -28,6 +31,7 @@ module WhopSDK app_id: String, company_id: String, ?is_public: bool?, + ?logo: WhopSDK::ExperienceCreateParams::Logo?, ?name: String?, ?section_id: String?, ?request_options: WhopSDK::request_opts @@ -37,10 +41,21 @@ module WhopSDK app_id: String, company_id: String, is_public: bool?, + logo: WhopSDK::ExperienceCreateParams::Logo?, name: String?, section_id: String?, request_options: WhopSDK::RequestOptions } + + type logo = { id: String } + + class Logo < 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/experience_update_params.rbs b/sig/whop_sdk/models/experience_update_params.rbs index 96a3e506..8f8ae882 100644 --- a/sig/whop_sdk/models/experience_update_params.rbs +++ b/sig/whop_sdk/models/experience_update_params.rbs @@ -4,7 +4,7 @@ module WhopSDK { access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?, is_public: bool?, - logo: WhopSDK::Models::ExperienceUpdateParams::logo?, + logo: WhopSDK::ExperienceUpdateParams::Logo?, name: String?, order: String?, section_id: String? @@ -19,7 +19,7 @@ module WhopSDK attr_accessor is_public: bool? - attr_accessor logo: WhopSDK::Models::ExperienceUpdateParams::logo? + attr_accessor logo: WhopSDK::ExperienceUpdateParams::Logo? attr_accessor name: String? @@ -30,7 +30,7 @@ module WhopSDK def initialize: ( ?access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?, ?is_public: bool?, - ?logo: WhopSDK::Models::ExperienceUpdateParams::logo?, + ?logo: WhopSDK::ExperienceUpdateParams::Logo?, ?name: String?, ?order: String?, ?section_id: String?, @@ -40,7 +40,7 @@ module WhopSDK def to_hash: -> { access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?, is_public: bool?, - logo: WhopSDK::Models::ExperienceUpdateParams::logo?, + logo: WhopSDK::ExperienceUpdateParams::Logo?, name: String?, order: String?, section_id: String?, @@ -58,35 +58,14 @@ module WhopSDK def self?.values: -> ::Array[WhopSDK::Models::ExperienceUpdateParams::access_level] end - type logo = - WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID - | WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID + type logo = { id: String } - module Logo - extend WhopSDK::Internal::Type::Union + class Logo < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::ExperienceUpdateParams::logo] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/forum_post_create_params.rbs b/sig/whop_sdk/models/forum_post_create_params.rbs index e1226ef5..f9ddeedf 100644 --- a/sig/whop_sdk/models/forum_post_create_params.rbs +++ b/sig/whop_sdk/models/forum_post_create_params.rbs @@ -3,7 +3,7 @@ module WhopSDK type forum_post_create_params = { experience_id: String, - attachments: ::Array[WhopSDK::Models::ForumPostCreateParams::attachment]?, + attachments: ::Array[WhopSDK::ForumPostCreateParams::Attachment]?, content: String?, is_mention: bool?, parent_id: String?, @@ -22,7 +22,7 @@ module WhopSDK attr_accessor experience_id: String - attr_accessor attachments: ::Array[WhopSDK::Models::ForumPostCreateParams::attachment]? + attr_accessor attachments: ::Array[WhopSDK::ForumPostCreateParams::Attachment]? attr_accessor content: String? @@ -44,7 +44,7 @@ module WhopSDK def initialize: ( experience_id: String, - ?attachments: ::Array[WhopSDK::Models::ForumPostCreateParams::attachment]?, + ?attachments: ::Array[WhopSDK::ForumPostCreateParams::Attachment]?, ?content: String?, ?is_mention: bool?, ?parent_id: String?, @@ -59,7 +59,7 @@ module WhopSDK def to_hash: -> { experience_id: String, - attachments: ::Array[WhopSDK::Models::ForumPostCreateParams::attachment]?, + attachments: ::Array[WhopSDK::ForumPostCreateParams::Attachment]?, content: String?, is_mention: bool?, parent_id: String?, @@ -72,35 +72,14 @@ module WhopSDK request_options: WhopSDK::RequestOptions } - type attachment = - WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID - | WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID + type attachment = { id: String } - module Attachment - extend WhopSDK::Internal::Type::Union + class Attachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::ForumPostCreateParams::attachment] + def to_hash: -> { id: String } end type poll = diff --git a/sig/whop_sdk/models/forum_post_update_params.rbs b/sig/whop_sdk/models/forum_post_update_params.rbs index dc2b2e90..f74947dd 100644 --- a/sig/whop_sdk/models/forum_post_update_params.rbs +++ b/sig/whop_sdk/models/forum_post_update_params.rbs @@ -2,7 +2,7 @@ module WhopSDK module Models type forum_post_update_params = { - attachments: ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment]?, + attachments: ::Array[WhopSDK::ForumPostUpdateParams::Attachment]?, content: String?, is_pinned: bool?, title: String?, @@ -14,7 +14,7 @@ module WhopSDK extend WhopSDK::Internal::Type::RequestParameters::Converter include WhopSDK::Internal::Type::RequestParameters - attr_accessor attachments: ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment]? + attr_accessor attachments: ::Array[WhopSDK::ForumPostUpdateParams::Attachment]? attr_accessor content: String? @@ -25,7 +25,7 @@ module WhopSDK attr_accessor visibility: WhopSDK::Models::forum_post_visibility_type? def initialize: ( - ?attachments: ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment]?, + ?attachments: ::Array[WhopSDK::ForumPostUpdateParams::Attachment]?, ?content: String?, ?is_pinned: bool?, ?title: String?, @@ -34,7 +34,7 @@ module WhopSDK ) -> void def to_hash: -> { - attachments: ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment]?, + attachments: ::Array[WhopSDK::ForumPostUpdateParams::Attachment]?, content: String?, is_pinned: bool?, title: String?, @@ -42,35 +42,14 @@ module WhopSDK request_options: WhopSDK::RequestOptions } - type attachment = - WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID - | WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID + type attachment = { id: String } - module Attachment - extend WhopSDK::Internal::Type::Union + class Attachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/friendly_receipt_status.rbs b/sig/whop_sdk/models/friendly_receipt_status.rbs index 6e3e87a6..06c9203d 100644 --- a/sig/whop_sdk/models/friendly_receipt_status.rbs +++ b/sig/whop_sdk/models/friendly_receipt_status.rbs @@ -1,42 +1,66 @@ module WhopSDK module Models type friendly_receipt_status = - :auto_refunded + :succeeded + | :pending + | :failed + | :past_due + | :canceled + | :price_too_low + | :uncollectible | :refunded + | :auto_refunded | :partially_refunded | :dispute_warning - | :open_resolution - | :open_dispute - | :failed - | :price_too_low - | :succeeded + | :dispute_needs_response + | :dispute_warning_needs_response + | :resolution_needs_response + | :dispute_under_review + | :dispute_warning_under_review + | :resolution_under_review + | :dispute_won + | :dispute_warning_closed + | :resolution_won + | :dispute_lost + | :dispute_closed + | :resolution_lost | :drafted - | :uncollectible - | :unresolved - | :past_due - | :pending | :incomplete - | :canceled + | :unresolved + | :open_dispute + | :open_resolution module FriendlyReceiptStatus extend WhopSDK::Internal::Type::Enum - AUTO_REFUNDED: :auto_refunded + SUCCEEDED: :succeeded + PENDING: :pending + FAILED: :failed + PAST_DUE: :past_due + CANCELED: :canceled + PRICE_TOO_LOW: :price_too_low + UNCOLLECTIBLE: :uncollectible REFUNDED: :refunded + AUTO_REFUNDED: :auto_refunded PARTIALLY_REFUNDED: :partially_refunded DISPUTE_WARNING: :dispute_warning - OPEN_RESOLUTION: :open_resolution - OPEN_DISPUTE: :open_dispute - FAILED: :failed - PRICE_TOO_LOW: :price_too_low - SUCCEEDED: :succeeded + DISPUTE_NEEDS_RESPONSE: :dispute_needs_response + DISPUTE_WARNING_NEEDS_RESPONSE: :dispute_warning_needs_response + RESOLUTION_NEEDS_RESPONSE: :resolution_needs_response + DISPUTE_UNDER_REVIEW: :dispute_under_review + DISPUTE_WARNING_UNDER_REVIEW: :dispute_warning_under_review + RESOLUTION_UNDER_REVIEW: :resolution_under_review + DISPUTE_WON: :dispute_won + DISPUTE_WARNING_CLOSED: :dispute_warning_closed + RESOLUTION_WON: :resolution_won + DISPUTE_LOST: :dispute_lost + DISPUTE_CLOSED: :dispute_closed + RESOLUTION_LOST: :resolution_lost DRAFTED: :drafted - UNCOLLECTIBLE: :uncollectible - UNRESOLVED: :unresolved - PAST_DUE: :past_due - PENDING: :pending INCOMPLETE: :incomplete - CANCELED: :canceled + UNRESOLVED: :unresolved + OPEN_DISPUTE: :open_dispute + OPEN_RESOLUTION: :open_resolution def self?.values: -> ::Array[WhopSDK::Models::friendly_receipt_status] end diff --git a/sig/whop_sdk/models/ledger_account_retrieve_response.rbs b/sig/whop_sdk/models/ledger_account_retrieve_response.rbs index 7518325e..9484f342 100644 --- a/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +++ b/sig/whop_sdk/models/ledger_account_retrieve_response.rbs @@ -4,7 +4,6 @@ module WhopSDK { id: String, balances: ::Array[WhopSDK::Models::LedgerAccountRetrieveResponse::Balance], - ledger_account_audit_status: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_account_audit_status?, ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_type, owner: WhopSDK::Models::LedgerAccountRetrieveResponse::owner?, payments_approval_status: WhopSDK::Models::LedgerAccountRetrieveResponse::payments_approval_status?, @@ -17,8 +16,6 @@ module WhopSDK attr_accessor balances: ::Array[WhopSDK::Models::LedgerAccountRetrieveResponse::Balance] - attr_accessor ledger_account_audit_status: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_account_audit_status? - attr_accessor ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_type attr_accessor owner: WhopSDK::Models::LedgerAccountRetrieveResponse::owner? @@ -32,7 +29,6 @@ module WhopSDK def initialize: ( id: String, balances: ::Array[WhopSDK::Models::LedgerAccountRetrieveResponse::Balance], - ledger_account_audit_status: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_account_audit_status?, ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_type, owner: WhopSDK::Models::LedgerAccountRetrieveResponse::owner?, payments_approval_status: WhopSDK::Models::LedgerAccountRetrieveResponse::payments_approval_status?, @@ -43,7 +39,6 @@ module WhopSDK def to_hash: -> { id: String, balances: ::Array[WhopSDK::Models::LedgerAccountRetrieveResponse::Balance], - ledger_account_audit_status: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_account_audit_status?, ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_type, owner: WhopSDK::Models::LedgerAccountRetrieveResponse::owner?, payments_approval_status: WhopSDK::Models::LedgerAccountRetrieveResponse::payments_approval_status?, @@ -83,39 +78,6 @@ module WhopSDK } end - type ledger_account_audit_status = - :pending - | :pending_ai_review - | :approved - | :reserves_imposed - | :suspended - | :ignored - | :rejected - | :requested_more_information - | :information_submitted - | :requested_tos_violation_correction - | :clawback_attempted - | :awaiting_sales_review - - module LedgerAccountAuditStatus - extend WhopSDK::Internal::Type::Enum - - PENDING: :pending - PENDING_AI_REVIEW: :pending_ai_review - APPROVED: :approved - RESERVES_IMPOSED: :reserves_imposed - SUSPENDED: :suspended - IGNORED: :ignored - REJECTED: :rejected - REQUESTED_MORE_INFORMATION: :requested_more_information - INFORMATION_SUBMITTED: :information_submitted - REQUESTED_TOS_VIOLATION_CORRECTION: :requested_tos_violation_correction - CLAWBACK_ATTEMPTED: :clawback_attempted - AWAITING_SALES_REVIEW: :awaiting_sales_review - - def self?.values: -> ::Array[WhopSDK::Models::LedgerAccountRetrieveResponse::ledger_account_audit_status] - end - type ledger_type = :primary | :pool module LedgerType diff --git a/sig/whop_sdk/models/member_list_response.rbs b/sig/whop_sdk/models/member_list_response.rbs index 5e4325d0..981c4c81 100644 --- a/sig/whop_sdk/models/member_list_response.rbs +++ b/sig/whop_sdk/models/member_list_response.rbs @@ -4,6 +4,7 @@ module WhopSDK { id: String, access_level: WhopSDK::Models::access_level, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: WhopSDK::Models::member_most_recent_actions?, @@ -20,6 +21,8 @@ module WhopSDK attr_accessor access_level: WhopSDK::Models::access_level + attr_accessor company_token_balance: Float + attr_accessor created_at: Time attr_accessor joined_at: Time @@ -41,6 +44,7 @@ module WhopSDK def initialize: ( id: String, access_level: WhopSDK::Models::access_level, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: WhopSDK::Models::member_most_recent_actions?, @@ -55,6 +59,7 @@ module WhopSDK def to_hash: -> { id: String, access_level: WhopSDK::Models::access_level, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: WhopSDK::Models::member_most_recent_actions?, diff --git a/sig/whop_sdk/models/member_retrieve_response.rbs b/sig/whop_sdk/models/member_retrieve_response.rbs index f460b6fd..d65af9db 100644 --- a/sig/whop_sdk/models/member_retrieve_response.rbs +++ b/sig/whop_sdk/models/member_retrieve_response.rbs @@ -5,6 +5,7 @@ module WhopSDK id: String, access_level: WhopSDK::Models::access_level, company: WhopSDK::Models::MemberRetrieveResponse::Company, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: WhopSDK::Models::member_most_recent_actions?, @@ -23,6 +24,8 @@ module WhopSDK attr_accessor company: WhopSDK::Models::MemberRetrieveResponse::Company + attr_accessor company_token_balance: Float + attr_accessor created_at: Time attr_accessor joined_at: Time @@ -45,6 +48,7 @@ module WhopSDK id: String, access_level: WhopSDK::Models::access_level, company: WhopSDK::Models::MemberRetrieveResponse::Company, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: WhopSDK::Models::member_most_recent_actions?, @@ -60,6 +64,7 @@ module WhopSDK id: String, access_level: WhopSDK::Models::access_level, company: WhopSDK::Models::MemberRetrieveResponse::Company, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: WhopSDK::Models::member_most_recent_actions?, diff --git a/sig/whop_sdk/models/membership.rbs b/sig/whop_sdk/models/membership.rbs index 377faaff..31eac3f7 100644 --- a/sig/whop_sdk/models/membership.rbs +++ b/sig/whop_sdk/models/membership.rbs @@ -4,11 +4,13 @@ module WhopSDK { id: String, cancel_at_period_end: bool, + cancel_option: WhopSDK::Models::Membership::cancel_option?, canceled_at: Time?, cancellation_reason: String?, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Models::currency?, + custom_field_responses: ::Array[WhopSDK::Membership::CustomFieldResponse], license_key: String?, manage_url: String?, member: WhopSDK::Membership::Member?, @@ -29,6 +31,8 @@ module WhopSDK attr_accessor cancel_at_period_end: bool + attr_accessor cancel_option: WhopSDK::Models::Membership::cancel_option? + attr_accessor canceled_at: Time? attr_accessor cancellation_reason: String? @@ -39,6 +43,8 @@ module WhopSDK attr_accessor currency: WhopSDK::Models::currency? + attr_accessor custom_field_responses: ::Array[WhopSDK::Membership::CustomFieldResponse] + attr_accessor license_key: String? attr_accessor manage_url: String? @@ -68,11 +74,13 @@ module WhopSDK def initialize: ( id: String, cancel_at_period_end: bool, + cancel_option: WhopSDK::Models::Membership::cancel_option?, canceled_at: Time?, cancellation_reason: String?, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Models::currency?, + custom_field_responses: ::Array[WhopSDK::Membership::CustomFieldResponse], license_key: String?, manage_url: String?, member: WhopSDK::Membership::Member?, @@ -91,11 +99,13 @@ module WhopSDK def to_hash: -> { id: String, cancel_at_period_end: bool, + cancel_option: WhopSDK::Models::Membership::cancel_option?, canceled_at: Time?, cancellation_reason: String?, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Models::currency?, + custom_field_responses: ::Array[WhopSDK::Membership::CustomFieldResponse], license_key: String?, manage_url: String?, member: WhopSDK::Membership::Member?, @@ -111,6 +121,29 @@ module WhopSDK user: WhopSDK::Membership::User? } + type cancel_option = + :too_expensive + | :switching + | :missing_features + | :technical_issues + | :bad_experience + | :other + | :testing + + module CancelOption + extend WhopSDK::Internal::Type::Enum + + TOO_EXPENSIVE: :too_expensive + SWITCHING: :switching + MISSING_FEATURES: :missing_features + TECHNICAL_ISSUES: :technical_issues + BAD_EXPERIENCE: :bad_experience + OTHER: :other + TESTING: :testing + + def self?.values: -> ::Array[WhopSDK::Models::Membership::cancel_option] + end + type company = { id: String, title: String } class Company < WhopSDK::Internal::Type::BaseModel @@ -123,6 +156,21 @@ module WhopSDK def to_hash: -> { id: String, title: String } end + type custom_field_response = + { id: String, answer: String, question: String } + + class CustomFieldResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor answer: String + + attr_accessor question: String + + def initialize: (id: String, answer: String, question: String) -> void + + def to_hash: -> { id: String, answer: String, question: String } + end + type member = { id: String } class Member < WhopSDK::Internal::Type::BaseModel @@ -165,18 +213,31 @@ module WhopSDK def to_hash: -> { id: String } end - type user = { id: String, name: String?, username: String } + type user = + { id: String, email: String?, name: String?, username: String } class User < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor email: 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 } + def initialize: ( + id: String, + email: String?, + name: String?, + username: String + ) -> void + + def to_hash: -> { + id: String, + email: String?, + name: String?, + username: String + } end end end diff --git a/sig/whop_sdk/models/membership_list_response.rbs b/sig/whop_sdk/models/membership_list_response.rbs index e71f330e..e18290df 100644 --- a/sig/whop_sdk/models/membership_list_response.rbs +++ b/sig/whop_sdk/models/membership_list_response.rbs @@ -4,6 +4,7 @@ module WhopSDK { id: String, cancel_at_period_end: bool, + cancel_option: WhopSDK::Models::MembershipListResponse::cancel_option?, canceled_at: Time?, cancellation_reason: String?, company: WhopSDK::Models::MembershipListResponse::Company, @@ -29,6 +30,8 @@ module WhopSDK attr_accessor cancel_at_period_end: bool + attr_accessor cancel_option: WhopSDK::Models::MembershipListResponse::cancel_option? + attr_accessor canceled_at: Time? attr_accessor cancellation_reason: String? @@ -68,6 +71,7 @@ module WhopSDK def initialize: ( id: String, cancel_at_period_end: bool, + cancel_option: WhopSDK::Models::MembershipListResponse::cancel_option?, canceled_at: Time?, cancellation_reason: String?, company: WhopSDK::Models::MembershipListResponse::Company, @@ -91,6 +95,7 @@ module WhopSDK def to_hash: -> { id: String, cancel_at_period_end: bool, + cancel_option: WhopSDK::Models::MembershipListResponse::cancel_option?, canceled_at: Time?, cancellation_reason: String?, company: WhopSDK::Models::MembershipListResponse::Company, @@ -111,6 +116,29 @@ module WhopSDK user: WhopSDK::Models::MembershipListResponse::User? } + type cancel_option = + :too_expensive + | :switching + | :missing_features + | :technical_issues + | :bad_experience + | :other + | :testing + + module CancelOption + extend WhopSDK::Internal::Type::Enum + + TOO_EXPENSIVE: :too_expensive + SWITCHING: :switching + MISSING_FEATURES: :missing_features + TECHNICAL_ISSUES: :technical_issues + BAD_EXPERIENCE: :bad_experience + OTHER: :other + TESTING: :testing + + def self?.values: -> ::Array[WhopSDK::Models::MembershipListResponse::cancel_option] + end + type company = { id: String, title: String } class Company < WhopSDK::Internal::Type::BaseModel @@ -165,18 +193,31 @@ module WhopSDK def to_hash: -> { id: String } end - type user = { id: String, name: String?, username: String } + type user = + { id: String, email: String?, name: String?, username: String } class User < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor email: 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 } + def initialize: ( + id: String, + email: String?, + name: String?, + username: String + ) -> void + + def to_hash: -> { + id: String, + email: String?, + name: String?, + username: String + } end end end diff --git a/sig/whop_sdk/models/message_create_params.rbs b/sig/whop_sdk/models/message_create_params.rbs index b6642407..11e7f464 100644 --- a/sig/whop_sdk/models/message_create_params.rbs +++ b/sig/whop_sdk/models/message_create_params.rbs @@ -4,7 +4,7 @@ module WhopSDK { channel_id: String, content: String, - attachments: ::Array[WhopSDK::Models::MessageCreateParams::attachment]?, + attachments: ::Array[WhopSDK::MessageCreateParams::Attachment]?, poll: WhopSDK::MessageCreateParams::Poll? } & WhopSDK::Internal::Type::request_parameters @@ -17,14 +17,14 @@ module WhopSDK attr_accessor content: String - attr_accessor attachments: ::Array[WhopSDK::Models::MessageCreateParams::attachment]? + attr_accessor attachments: ::Array[WhopSDK::MessageCreateParams::Attachment]? attr_accessor poll: WhopSDK::MessageCreateParams::Poll? def initialize: ( channel_id: String, content: String, - ?attachments: ::Array[WhopSDK::Models::MessageCreateParams::attachment]?, + ?attachments: ::Array[WhopSDK::MessageCreateParams::Attachment]?, ?poll: WhopSDK::MessageCreateParams::Poll?, ?request_options: WhopSDK::request_opts ) -> void @@ -32,40 +32,19 @@ module WhopSDK def to_hash: -> { channel_id: String, content: String, - attachments: ::Array[WhopSDK::Models::MessageCreateParams::attachment]?, + attachments: ::Array[WhopSDK::MessageCreateParams::Attachment]?, poll: WhopSDK::MessageCreateParams::Poll?, request_options: WhopSDK::RequestOptions } - type attachment = - WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithDirectUploadID - | WhopSDK::MessageCreateParams::Attachment::AttachmentInputWithID + type attachment = { id: String } - module Attachment - extend WhopSDK::Internal::Type::Union + class Attachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::MessageCreateParams::attachment] + def to_hash: -> { id: String } end type poll = diff --git a/sig/whop_sdk/models/message_update_params.rbs b/sig/whop_sdk/models/message_update_params.rbs index f6f0c1ad..b730a5be 100644 --- a/sig/whop_sdk/models/message_update_params.rbs +++ b/sig/whop_sdk/models/message_update_params.rbs @@ -2,7 +2,7 @@ module WhopSDK module Models type message_update_params = { - attachments: ::Array[WhopSDK::Models::MessageUpdateParams::attachment]?, + attachments: ::Array[WhopSDK::MessageUpdateParams::Attachment]?, content: String?, is_pinned: bool? } @@ -12,55 +12,34 @@ module WhopSDK extend WhopSDK::Internal::Type::RequestParameters::Converter include WhopSDK::Internal::Type::RequestParameters - attr_accessor attachments: ::Array[WhopSDK::Models::MessageUpdateParams::attachment]? + attr_accessor attachments: ::Array[WhopSDK::MessageUpdateParams::Attachment]? attr_accessor content: String? attr_accessor is_pinned: bool? def initialize: ( - ?attachments: ::Array[WhopSDK::Models::MessageUpdateParams::attachment]?, + ?attachments: ::Array[WhopSDK::MessageUpdateParams::Attachment]?, ?content: String?, ?is_pinned: bool?, ?request_options: WhopSDK::request_opts ) -> void def to_hash: -> { - attachments: ::Array[WhopSDK::Models::MessageUpdateParams::attachment]?, + attachments: ::Array[WhopSDK::MessageUpdateParams::Attachment]?, content: String?, is_pinned: bool?, request_options: WhopSDK::RequestOptions } - type attachment = - WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithDirectUploadID - | WhopSDK::MessageUpdateParams::Attachment::AttachmentInputWithID + type attachment = { id: String } - module Attachment - extend WhopSDK::Internal::Type::Union + class Attachment < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::MessageUpdateParams::attachment] + def to_hash: -> { id: String } end end end diff --git a/sig/whop_sdk/models/payment.rbs b/sig/whop_sdk/models/payment.rbs index dd29de61..d99ef752 100644 --- a/sig/whop_sdk/models/payment.rbs +++ b/sig/whop_sdk/models/payment.rbs @@ -18,9 +18,11 @@ module WhopSDK member: WhopSDK::Payment::Member?, membership: WhopSDK::Payment::Membership?, metadata: ::Hash[Symbol, top]?, + next_payment_attempt: Time?, paid_at: Time?, payment_method: WhopSDK::Payment::PaymentMethod?, payment_method_type: WhopSDK::Models::payment_method_types?, + payments_failed: Integer?, plan: WhopSDK::Payment::Plan?, product: WhopSDK::Payment::Product?, promo_code: WhopSDK::Payment::PromoCode?, @@ -70,12 +72,16 @@ module WhopSDK attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor next_payment_attempt: Time? + attr_accessor paid_at: Time? attr_accessor payment_method: WhopSDK::Payment::PaymentMethod? attr_accessor payment_method_type: WhopSDK::Models::payment_method_types? + attr_accessor payments_failed: Integer? + attr_accessor plan: WhopSDK::Payment::Plan? attr_accessor product: WhopSDK::Payment::Product? @@ -121,9 +127,11 @@ module WhopSDK member: WhopSDK::Payment::Member?, membership: WhopSDK::Payment::Membership?, metadata: ::Hash[Symbol, top]?, + next_payment_attempt: Time?, paid_at: Time?, payment_method: WhopSDK::Payment::PaymentMethod?, payment_method_type: WhopSDK::Models::payment_method_types?, + payments_failed: Integer?, plan: WhopSDK::Payment::Plan?, product: WhopSDK::Payment::Product?, promo_code: WhopSDK::Payment::PromoCode?, @@ -157,9 +165,11 @@ module WhopSDK member: WhopSDK::Payment::Member?, membership: WhopSDK::Payment::Membership?, metadata: ::Hash[Symbol, top]?, + next_payment_attempt: Time?, paid_at: Time?, payment_method: WhopSDK::Payment::PaymentMethod?, payment_method_type: WhopSDK::Models::payment_method_types?, + payments_failed: Integer?, plan: WhopSDK::Payment::Plan?, product: WhopSDK::Payment::Product?, promo_code: WhopSDK::Payment::PromoCode?, diff --git a/sig/whop_sdk/models/payment_list_response.rbs b/sig/whop_sdk/models/payment_list_response.rbs index f91ff35d..3e139ffe 100644 --- a/sig/whop_sdk/models/payment_list_response.rbs +++ b/sig/whop_sdk/models/payment_list_response.rbs @@ -18,9 +18,11 @@ module WhopSDK member: WhopSDK::Models::PaymentListResponse::Member?, membership: WhopSDK::Models::PaymentListResponse::Membership?, metadata: ::Hash[Symbol, top]?, + next_payment_attempt: Time?, paid_at: Time?, payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod?, payment_method_type: WhopSDK::Models::payment_method_types?, + payments_failed: Integer?, plan: WhopSDK::Models::PaymentListResponse::Plan?, product: WhopSDK::Models::PaymentListResponse::Product?, promo_code: WhopSDK::Models::PaymentListResponse::PromoCode?, @@ -70,12 +72,16 @@ module WhopSDK attr_accessor metadata: ::Hash[Symbol, top]? + attr_accessor next_payment_attempt: Time? + attr_accessor paid_at: Time? attr_accessor payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod? attr_accessor payment_method_type: WhopSDK::Models::payment_method_types? + attr_accessor payments_failed: Integer? + attr_accessor plan: WhopSDK::Models::PaymentListResponse::Plan? attr_accessor product: WhopSDK::Models::PaymentListResponse::Product? @@ -121,9 +127,11 @@ module WhopSDK member: WhopSDK::Models::PaymentListResponse::Member?, membership: WhopSDK::Models::PaymentListResponse::Membership?, metadata: ::Hash[Symbol, top]?, + next_payment_attempt: Time?, paid_at: Time?, payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod?, payment_method_type: WhopSDK::Models::payment_method_types?, + payments_failed: Integer?, plan: WhopSDK::Models::PaymentListResponse::Plan?, product: WhopSDK::Models::PaymentListResponse::Product?, promo_code: WhopSDK::Models::PaymentListResponse::PromoCode?, @@ -157,9 +165,11 @@ module WhopSDK member: WhopSDK::Models::PaymentListResponse::Member?, membership: WhopSDK::Models::PaymentListResponse::Membership?, metadata: ::Hash[Symbol, top]?, + next_payment_attempt: Time?, paid_at: Time?, payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod?, payment_method_type: WhopSDK::Models::payment_method_types?, + payments_failed: Integer?, plan: WhopSDK::Models::PaymentListResponse::Plan?, product: WhopSDK::Models::PaymentListResponse::Product?, promo_code: WhopSDK::Models::PaymentListResponse::PromoCode?, diff --git a/sig/whop_sdk/models/payment_method_types.rbs b/sig/whop_sdk/models/payment_method_types.rbs index 8e2ef342..cfe20481 100644 --- a/sig/whop_sdk/models/payment_method_types.rbs +++ b/sig/whop_sdk/models/payment_method_types.rbs @@ -1,181 +1,183 @@ module WhopSDK module Models type payment_method_types = - :afterpay_clearpay + :acss_debit + | :affirm + | :afterpay_clearpay | :alipay + | :alma | :amazon_pay + | :apple | :apple_pay + | :au_becs_debit + | :bacs_debit | :bancontact + | :billie + | :bizum + | :blik + | :boleto + | :capchase_pay | :card | :cashapp + | :coinbase | :crypto + | :custom + | :customer_balance + | :demo_pay + | :eps + | :eu_bank_transfer + | :fpx + | :giropay | :google_pay + | :gopay + | :grabpay + | :id_bank_transfer | :ideal + | :kakao_pay | :klarna + | :konbini + | :kr_card + | :kr_market + | :kriya + | :link + | :mb_way | :mobilepay - | :sepa_debit - | :swish - | :twint - | :us_bank_account - | :zip - | :vipps - | :paypal - | :sezzle - | :coinbase - | :splitit - | :platform_balance - | :apple - | :venmo - | :affirm + | :mondu | :multibanco - | :wechat_pay | :naver_pay + | :netbanking + | :ng_bank + | :ng_bank_transfer + | :ng_card + | :ng_market + | :ng_ussd + | :ng_wallet | :nz_bank_account | :oxxo | :p24 | :pay_by_bank | :payco | :paynow + | :paypal + | :paypay + | :payto | :pix + | :platform_balance | :promptpay + | :qris + | :rechnung | :revolut_pay | :samsung_pay | :satispay - | :sofort - | :konbini - | :kr_card - | :link - | :grabpay - | :kakao_pay - | :billie - | :blik - | :boleto - | :eps - | :fpx - | :giropay - | :acss_debit - | :alma - | :au_becs_debit - | :bacs_debit - | :bizum - | :capchase_pay - | :kriya - | :mondu - | :ng_wallet - | :paypay - | :sequra | :scalapay - | :custom - | :customer_balance - | :gopay - | :mb_way - | :ng_bank - | :ng_bank_transfer - | :ng_card - | :ng_market - | :ng_ussd - | :payto - | :qris - | :rechnung - | :south_korea_market - | :kr_market + | :sepa_debit + | :sequra + | :sezzle + | :shop_pay | :shopeepay - | :upi + | :sofort + | :south_korea_market + | :splitit | :sunbit - | :netbanking - | :id_bank_transfer - | :demo_pay - | :shop_pay + | :swish + | :twint + | :upi + | :us_bank_account + | :venmo + | :vipps + | :wechat_pay + | :zip | :unknown module PaymentMethodTypes extend WhopSDK::Internal::Type::Enum + ACSS_DEBIT: :acss_debit + AFFIRM: :affirm AFTERPAY_CLEARPAY: :afterpay_clearpay ALIPAY: :alipay + ALMA: :alma AMAZON_PAY: :amazon_pay + APPLE: :apple APPLE_PAY: :apple_pay + AU_BECS_DEBIT: :au_becs_debit + BACS_DEBIT: :bacs_debit BANCONTACT: :bancontact + BILLIE: :billie + BIZUM: :bizum + BLIK: :blik + BOLETO: :boleto + CAPCHASE_PAY: :capchase_pay CARD: :card CASHAPP: :cashapp + COINBASE: :coinbase CRYPTO: :crypto + CUSTOM: :custom + CUSTOMER_BALANCE: :customer_balance + DEMO_PAY: :demo_pay + EPS: :eps + EU_BANK_TRANSFER: :eu_bank_transfer + FPX: :fpx + GIROPAY: :giropay GOOGLE_PAY: :google_pay + GOPAY: :gopay + GRABPAY: :grabpay + ID_BANK_TRANSFER: :id_bank_transfer IDEAL: :ideal + KAKAO_PAY: :kakao_pay KLARNA: :klarna + KONBINI: :konbini + KR_CARD: :kr_card + KR_MARKET: :kr_market + KRIYA: :kriya + LINK: :link + MB_WAY: :mb_way MOBILEPAY: :mobilepay - SEPA_DEBIT: :sepa_debit - SWISH: :swish - TWINT: :twint - US_BANK_ACCOUNT: :us_bank_account - ZIP: :zip - VIPPS: :vipps - PAYPAL: :paypal - SEZZLE: :sezzle - COINBASE: :coinbase - SPLITIT: :splitit - PLATFORM_BALANCE: :platform_balance - APPLE: :apple - VENMO: :venmo - AFFIRM: :affirm + MONDU: :mondu MULTIBANCO: :multibanco - WECHAT_PAY: :wechat_pay NAVER_PAY: :naver_pay + NETBANKING: :netbanking + NG_BANK: :ng_bank + NG_BANK_TRANSFER: :ng_bank_transfer + NG_CARD: :ng_card + NG_MARKET: :ng_market + NG_USSD: :ng_ussd + NG_WALLET: :ng_wallet NZ_BANK_ACCOUNT: :nz_bank_account OXXO: :oxxo P24: :p24 PAY_BY_BANK: :pay_by_bank PAYCO: :payco PAYNOW: :paynow + PAYPAL: :paypal + PAYPAY: :paypay + PAYTO: :payto PIX: :pix + PLATFORM_BALANCE: :platform_balance PROMPTPAY: :promptpay + QRIS: :qris + RECHNUNG: :rechnung REVOLUT_PAY: :revolut_pay SAMSUNG_PAY: :samsung_pay SATISPAY: :satispay - SOFORT: :sofort - KONBINI: :konbini - KR_CARD: :kr_card - LINK: :link - GRABPAY: :grabpay - KAKAO_PAY: :kakao_pay - BILLIE: :billie - BLIK: :blik - BOLETO: :boleto - EPS: :eps - FPX: :fpx - GIROPAY: :giropay - ACSS_DEBIT: :acss_debit - ALMA: :alma - AU_BECS_DEBIT: :au_becs_debit - BACS_DEBIT: :bacs_debit - BIZUM: :bizum - CAPCHASE_PAY: :capchase_pay - KRIYA: :kriya - MONDU: :mondu - NG_WALLET: :ng_wallet - PAYPAY: :paypay - SEQURA: :sequra SCALAPAY: :scalapay - CUSTOM: :custom - CUSTOMER_BALANCE: :customer_balance - GOPAY: :gopay - MB_WAY: :mb_way - NG_BANK: :ng_bank - NG_BANK_TRANSFER: :ng_bank_transfer - NG_CARD: :ng_card - NG_MARKET: :ng_market - NG_USSD: :ng_ussd - PAYTO: :payto - QRIS: :qris - RECHNUNG: :rechnung - SOUTH_KOREA_MARKET: :south_korea_market - KR_MARKET: :kr_market + SEPA_DEBIT: :sepa_debit + SEQURA: :sequra + SEZZLE: :sezzle + SHOP_PAY: :shop_pay SHOPEEPAY: :shopeepay - UPI: :upi + SOFORT: :sofort + SOUTH_KOREA_MARKET: :south_korea_market + SPLITIT: :splitit SUNBIT: :sunbit - NETBANKING: :netbanking - ID_BANK_TRANSFER: :id_bank_transfer - DEMO_PAY: :demo_pay - SHOP_PAY: :shop_pay + SWISH: :swish + TWINT: :twint + UPI: :upi + US_BANK_ACCOUNT: :us_bank_account + VENMO: :venmo + VIPPS: :vipps + WECHAT_PAY: :wechat_pay + ZIP: :zip UNKNOWN: :unknown def self?.values: -> ::Array[WhopSDK::Models::payment_method_types] diff --git a/sig/whop_sdk/models/payment_provider.rbs b/sig/whop_sdk/models/payment_provider.rbs index b64bbd84..fbf091ad 100644 --- a/sig/whop_sdk/models/payment_provider.rbs +++ b/sig/whop_sdk/models/payment_provider.rbs @@ -9,6 +9,7 @@ module WhopSDK | :splitit | :platform_balance | :multi_psp + | :adyen module PaymentProvider extend WhopSDK::Internal::Type::Enum @@ -21,6 +22,7 @@ module WhopSDK SPLITIT: :splitit PLATFORM_BALANCE: :platform_balance MULTI_PSP: :multi_psp + ADYEN: :adyen def self?.values: -> ::Array[WhopSDK::Models::payment_provider] end diff --git a/sig/whop_sdk/models/payout_method_created_webhook_event.rbs b/sig/whop_sdk/models/payout_method_created_webhook_event.rbs index afddce65..7425a7ae 100644 --- a/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +++ b/sig/whop_sdk/models/payout_method_created_webhook_event.rbs @@ -44,9 +44,12 @@ module WhopSDK type data = { id: String, + account_reference: String?, company: WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company?, + created_at: Time, currency: String, destination: WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination?, + institution_name: String?, is_default: bool, nickname: String? } @@ -54,30 +57,42 @@ module WhopSDK class Data < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor account_reference: String? + attr_accessor company: WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company? + attr_accessor created_at: Time + attr_accessor currency: String attr_accessor destination: WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination? + attr_accessor institution_name: String? + attr_accessor is_default: bool attr_accessor nickname: String? def initialize: ( id: String, + account_reference: String?, company: WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company?, + created_at: Time, currency: String, destination: WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination?, + institution_name: String?, is_default: bool, nickname: String? ) -> void def to_hash: -> { id: String, + account_reference: String?, company: WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company?, + created_at: Time, currency: String, destination: WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination?, + institution_name: String?, is_default: bool, nickname: String? } diff --git a/sig/whop_sdk/models/payout_method_list_response.rbs b/sig/whop_sdk/models/payout_method_list_response.rbs index f78b6263..4315c398 100644 --- a/sig/whop_sdk/models/payout_method_list_response.rbs +++ b/sig/whop_sdk/models/payout_method_list_response.rbs @@ -3,9 +3,12 @@ module WhopSDK type payout_method_list_response = { id: String, + account_reference: String?, company: WhopSDK::Models::PayoutMethodListResponse::Company?, + created_at: Time, currency: String, destination: WhopSDK::Models::PayoutMethodListResponse::Destination?, + institution_name: String?, is_default: bool, nickname: String? } @@ -13,30 +16,42 @@ module WhopSDK class PayoutMethodListResponse < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor account_reference: String? + attr_accessor company: WhopSDK::Models::PayoutMethodListResponse::Company? + attr_accessor created_at: Time + attr_accessor currency: String attr_accessor destination: WhopSDK::Models::PayoutMethodListResponse::Destination? + attr_accessor institution_name: String? + attr_accessor is_default: bool attr_accessor nickname: String? def initialize: ( id: String, + account_reference: String?, company: WhopSDK::Models::PayoutMethodListResponse::Company?, + created_at: Time, currency: String, destination: WhopSDK::Models::PayoutMethodListResponse::Destination?, + institution_name: String?, is_default: bool, nickname: String? ) -> void def to_hash: -> { id: String, + account_reference: String?, company: WhopSDK::Models::PayoutMethodListResponse::Company?, + created_at: Time, currency: String, destination: WhopSDK::Models::PayoutMethodListResponse::Destination?, + institution_name: String?, is_default: bool, nickname: String? } diff --git a/sig/whop_sdk/models/payout_method_retrieve_response.rbs b/sig/whop_sdk/models/payout_method_retrieve_response.rbs index 71b3a8b5..bcf604d8 100644 --- a/sig/whop_sdk/models/payout_method_retrieve_response.rbs +++ b/sig/whop_sdk/models/payout_method_retrieve_response.rbs @@ -3,9 +3,12 @@ module WhopSDK type payout_method_retrieve_response = { id: String, + account_reference: String?, company: WhopSDK::Models::PayoutMethodRetrieveResponse::Company?, + created_at: Time, currency: String, destination: WhopSDK::Models::PayoutMethodRetrieveResponse::Destination?, + institution_name: String?, is_default: bool, nickname: String? } @@ -13,30 +16,42 @@ module WhopSDK class PayoutMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel attr_accessor id: String + attr_accessor account_reference: String? + attr_accessor company: WhopSDK::Models::PayoutMethodRetrieveResponse::Company? + attr_accessor created_at: Time + attr_accessor currency: String attr_accessor destination: WhopSDK::Models::PayoutMethodRetrieveResponse::Destination? + attr_accessor institution_name: String? + attr_accessor is_default: bool attr_accessor nickname: String? def initialize: ( id: String, + account_reference: String?, company: WhopSDK::Models::PayoutMethodRetrieveResponse::Company?, + created_at: Time, currency: String, destination: WhopSDK::Models::PayoutMethodRetrieveResponse::Destination?, + institution_name: String?, is_default: bool, nickname: String? ) -> void def to_hash: -> { id: String, + account_reference: String?, company: WhopSDK::Models::PayoutMethodRetrieveResponse::Company?, + created_at: Time, currency: String, destination: WhopSDK::Models::PayoutMethodRetrieveResponse::Destination?, + institution_name: String?, is_default: bool, nickname: String? } diff --git a/sig/whop_sdk/models/plan_create_params.rbs b/sig/whop_sdk/models/plan_create_params.rbs index 5316f372..28697f8c 100644 --- a/sig/whop_sdk/models/plan_create_params.rbs +++ b/sig/whop_sdk/models/plan_create_params.rbs @@ -9,7 +9,7 @@ module WhopSDK custom_fields: ::Array[WhopSDK::PlanCreateParams::CustomField]?, description: String?, expiration_days: Integer?, - image: WhopSDK::Models::PlanCreateParams::image?, + image: WhopSDK::PlanCreateParams::Image?, initial_price: Float?, internal_notes: String?, legacy_payment_method_controls: bool?, @@ -45,7 +45,7 @@ module WhopSDK attr_accessor expiration_days: Integer? - attr_accessor image: WhopSDK::Models::PlanCreateParams::image? + attr_accessor image: WhopSDK::PlanCreateParams::Image? attr_accessor initial_price: Float? @@ -83,7 +83,7 @@ module WhopSDK ?custom_fields: ::Array[WhopSDK::PlanCreateParams::CustomField]?, ?description: String?, ?expiration_days: Integer?, - ?image: WhopSDK::Models::PlanCreateParams::image?, + ?image: WhopSDK::PlanCreateParams::Image?, ?initial_price: Float?, ?internal_notes: String?, ?legacy_payment_method_controls: bool?, @@ -109,7 +109,7 @@ module WhopSDK custom_fields: ::Array[WhopSDK::PlanCreateParams::CustomField]?, description: String?, expiration_days: Integer?, - image: WhopSDK::Models::PlanCreateParams::image?, + image: WhopSDK::PlanCreateParams::Image?, initial_price: Float?, internal_notes: String?, legacy_payment_method_controls: bool?, @@ -169,35 +169,14 @@ module WhopSDK } end - type image = - WhopSDK::PlanCreateParams::Image::AttachmentInputWithDirectUploadID - | WhopSDK::PlanCreateParams::Image::AttachmentInputWithID + type image = { id: String } - module Image - extend WhopSDK::Internal::Type::Union + class Image < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::PlanCreateParams::image] + def to_hash: -> { id: String } end type payment_method_configuration = diff --git a/sig/whop_sdk/models/plan_update_params.rbs b/sig/whop_sdk/models/plan_update_params.rbs index 29edc38c..167b32af 100644 --- a/sig/whop_sdk/models/plan_update_params.rbs +++ b/sig/whop_sdk/models/plan_update_params.rbs @@ -7,7 +7,7 @@ module WhopSDK custom_fields: ::Array[WhopSDK::PlanUpdateParams::CustomField]?, description: String?, expiration_days: Integer?, - image: WhopSDK::Models::PlanUpdateParams::image?, + image: WhopSDK::PlanUpdateParams::Image?, initial_price: Float?, internal_notes: String?, legacy_payment_method_controls: bool?, @@ -39,7 +39,7 @@ module WhopSDK attr_accessor expiration_days: Integer? - attr_accessor image: WhopSDK::Models::PlanUpdateParams::image? + attr_accessor image: WhopSDK::PlanUpdateParams::Image? attr_accessor initial_price: Float? @@ -75,7 +75,7 @@ module WhopSDK ?custom_fields: ::Array[WhopSDK::PlanUpdateParams::CustomField]?, ?description: String?, ?expiration_days: Integer?, - ?image: WhopSDK::Models::PlanUpdateParams::image?, + ?image: WhopSDK::PlanUpdateParams::Image?, ?initial_price: Float?, ?internal_notes: String?, ?legacy_payment_method_controls: bool?, @@ -99,7 +99,7 @@ module WhopSDK custom_fields: ::Array[WhopSDK::PlanUpdateParams::CustomField]?, description: String?, expiration_days: Integer?, - image: WhopSDK::Models::PlanUpdateParams::image?, + image: WhopSDK::PlanUpdateParams::Image?, initial_price: Float?, internal_notes: String?, legacy_payment_method_controls: bool?, @@ -159,35 +159,14 @@ module WhopSDK } end - type image = - WhopSDK::PlanUpdateParams::Image::AttachmentInputWithDirectUploadID - | WhopSDK::PlanUpdateParams::Image::AttachmentInputWithID + type image = { id: String } - module Image - extend WhopSDK::Internal::Type::Union + class Image < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String - type attachment_input_with_direct_upload_id = - { direct_upload_id: String } + def initialize: (id: String) -> void - class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel - attr_accessor direct_upload_id: String - - def initialize: (direct_upload_id: String) -> void - - def to_hash: -> { direct_upload_id: String } - end - - type attachment_input_with_id = { id: String } - - class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel - attr_accessor id: String - - def initialize: (id: String) -> void - - def to_hash: -> { id: String } - end - - def self?.variants: -> ::Array[WhopSDK::Models::PlanUpdateParams::image] + def to_hash: -> { id: String } end type payment_method_configuration = diff --git a/sig/whop_sdk/models/withdrawal_create_params.rbs b/sig/whop_sdk/models/withdrawal_create_params.rbs index 6ec9d992..f6c109c1 100644 --- a/sig/whop_sdk/models/withdrawal_create_params.rbs +++ b/sig/whop_sdk/models/withdrawal_create_params.rbs @@ -5,7 +5,9 @@ module WhopSDK amount: Float, company_id: String, currency: WhopSDK::Models::currency, - payout_method_id: String? + payout_method_id: String?, + platform_covers_fees: bool?, + statement_descriptor: String? } & WhopSDK::Internal::Type::request_parameters @@ -21,11 +23,17 @@ module WhopSDK attr_accessor payout_method_id: String? + attr_accessor platform_covers_fees: bool? + + attr_accessor statement_descriptor: String? + def initialize: ( amount: Float, company_id: String, currency: WhopSDK::Models::currency, ?payout_method_id: String?, + ?platform_covers_fees: bool?, + ?statement_descriptor: String?, ?request_options: WhopSDK::request_opts ) -> void @@ -34,6 +42,8 @@ module WhopSDK company_id: String, currency: WhopSDK::Models::currency, payout_method_id: String?, + platform_covers_fees: bool?, + statement_descriptor: String?, request_options: WhopSDK::RequestOptions } end diff --git a/sig/whop_sdk/models/withdrawal_create_response.rbs b/sig/whop_sdk/models/withdrawal_create_response.rbs index 16650be4..1d0c8862 100644 --- a/sig/whop_sdk/models/withdrawal_create_response.rbs +++ b/sig/whop_sdk/models/withdrawal_create_response.rbs @@ -16,8 +16,7 @@ module WhopSDK payout_token: WhopSDK::Models::WithdrawalCreateResponse::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? } class WithdrawalCreateResponse < WhopSDK::Internal::Type::BaseModel @@ -51,8 +50,6 @@ module WhopSDK attr_accessor trace_code: String? - attr_accessor withdrawal_type: WhopSDK::Models::withdrawal_types - def initialize: ( id: String, amount: Float, @@ -68,8 +65,7 @@ module WhopSDK payout_token: WhopSDK::Models::WithdrawalCreateResponse::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? ) -> void def to_hash: -> { @@ -87,8 +83,7 @@ module WhopSDK payout_token: WhopSDK::Models::WithdrawalCreateResponse::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? } type error_code = @@ -117,6 +112,7 @@ module WhopSDK | :invalid_account_number | :invalid_bank_code | :invalid_beneficiary + | :invalid_mailing_address | :invalid_branch_number | :invalid_branch_code | :invalid_phone_number @@ -166,6 +162,7 @@ module WhopSDK INVALID_ACCOUNT_NUMBER: :invalid_account_number INVALID_BANK_CODE: :invalid_bank_code INVALID_BENEFICIARY: :invalid_beneficiary + INVALID_MAILING_ADDRESS: :invalid_mailing_address INVALID_BRANCH_NUMBER: :invalid_branch_number INVALID_BRANCH_CODE: :invalid_branch_code INVALID_PHONE_NUMBER: :invalid_phone_number diff --git a/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs b/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs index 5727304f..0ebc9b66 100644 --- a/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +++ b/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs @@ -57,8 +57,7 @@ module WhopSDK payout_token: WhopSDK::WithdrawalCreatedWebhookEvent::Data::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? } class Data < WhopSDK::Internal::Type::BaseModel @@ -92,8 +91,6 @@ module WhopSDK attr_accessor trace_code: String? - attr_accessor withdrawal_type: WhopSDK::Models::withdrawal_types - def initialize: ( id: String, amount: Float, @@ -109,8 +106,7 @@ module WhopSDK payout_token: WhopSDK::WithdrawalCreatedWebhookEvent::Data::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? ) -> void def to_hash: -> { @@ -128,8 +124,7 @@ module WhopSDK payout_token: WhopSDK::WithdrawalCreatedWebhookEvent::Data::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? } type error_code = @@ -158,6 +153,7 @@ module WhopSDK | :invalid_account_number | :invalid_bank_code | :invalid_beneficiary + | :invalid_mailing_address | :invalid_branch_number | :invalid_branch_code | :invalid_phone_number @@ -207,6 +203,7 @@ module WhopSDK INVALID_ACCOUNT_NUMBER: :invalid_account_number INVALID_BANK_CODE: :invalid_bank_code INVALID_BENEFICIARY: :invalid_beneficiary + INVALID_MAILING_ADDRESS: :invalid_mailing_address INVALID_BRANCH_NUMBER: :invalid_branch_number INVALID_BRANCH_CODE: :invalid_branch_code INVALID_PHONE_NUMBER: :invalid_phone_number diff --git a/sig/whop_sdk/models/withdrawal_list_response.rbs b/sig/whop_sdk/models/withdrawal_list_response.rbs index 4dde13a8..16187320 100644 --- a/sig/whop_sdk/models/withdrawal_list_response.rbs +++ b/sig/whop_sdk/models/withdrawal_list_response.rbs @@ -10,8 +10,7 @@ module WhopSDK fee_type: WhopSDK::Models::withdrawal_fee_types?, markup_fee: Float, speed: WhopSDK::Models::withdrawal_speeds, - status: WhopSDK::Models::withdrawal_status, - withdrawal_type: WhopSDK::Models::withdrawal_types + status: WhopSDK::Models::withdrawal_status } class WithdrawalListResponse < WhopSDK::Internal::Type::BaseModel @@ -33,8 +32,6 @@ module WhopSDK attr_accessor status: WhopSDK::Models::withdrawal_status - attr_accessor withdrawal_type: WhopSDK::Models::withdrawal_types - def initialize: ( id: String, amount: Float, @@ -44,8 +41,7 @@ module WhopSDK fee_type: WhopSDK::Models::withdrawal_fee_types?, markup_fee: Float, speed: WhopSDK::Models::withdrawal_speeds, - status: WhopSDK::Models::withdrawal_status, - withdrawal_type: WhopSDK::Models::withdrawal_types + status: WhopSDK::Models::withdrawal_status ) -> void def to_hash: -> { @@ -57,8 +53,7 @@ module WhopSDK fee_type: WhopSDK::Models::withdrawal_fee_types?, markup_fee: Float, speed: WhopSDK::Models::withdrawal_speeds, - status: WhopSDK::Models::withdrawal_status, - withdrawal_type: WhopSDK::Models::withdrawal_types + status: WhopSDK::Models::withdrawal_status } end end diff --git a/sig/whop_sdk/models/withdrawal_retrieve_response.rbs b/sig/whop_sdk/models/withdrawal_retrieve_response.rbs index 1950c136..5e352e5f 100644 --- a/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +++ b/sig/whop_sdk/models/withdrawal_retrieve_response.rbs @@ -16,8 +16,7 @@ module WhopSDK payout_token: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? } class WithdrawalRetrieveResponse < WhopSDK::Internal::Type::BaseModel @@ -51,8 +50,6 @@ module WhopSDK attr_accessor trace_code: String? - attr_accessor withdrawal_type: WhopSDK::Models::withdrawal_types - def initialize: ( id: String, amount: Float, @@ -68,8 +65,7 @@ module WhopSDK payout_token: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? ) -> void def to_hash: -> { @@ -87,8 +83,7 @@ module WhopSDK payout_token: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? } type error_code = @@ -117,6 +112,7 @@ module WhopSDK | :invalid_account_number | :invalid_bank_code | :invalid_beneficiary + | :invalid_mailing_address | :invalid_branch_number | :invalid_branch_code | :invalid_phone_number @@ -166,6 +162,7 @@ module WhopSDK INVALID_ACCOUNT_NUMBER: :invalid_account_number INVALID_BANK_CODE: :invalid_bank_code INVALID_BENEFICIARY: :invalid_beneficiary + INVALID_MAILING_ADDRESS: :invalid_mailing_address INVALID_BRANCH_NUMBER: :invalid_branch_number INVALID_BRANCH_CODE: :invalid_branch_code INVALID_PHONE_NUMBER: :invalid_phone_number diff --git a/sig/whop_sdk/models/withdrawal_types.rbs b/sig/whop_sdk/models/withdrawal_types.rbs deleted file mode 100644 index b82af151..00000000 --- a/sig/whop_sdk/models/withdrawal_types.rbs +++ /dev/null @@ -1,14 +0,0 @@ -module WhopSDK - module Models - type withdrawal_types = :regular | :clawback - - module WithdrawalTypes - extend WhopSDK::Internal::Type::Enum - - REGULAR: :regular - CLAWBACK: :clawback - - def self?.values: -> ::Array[WhopSDK::Models::withdrawal_types] - end - end -end diff --git a/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs b/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs index a3353bbe..4e2f138d 100644 --- a/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +++ b/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs @@ -57,8 +57,7 @@ module WhopSDK payout_token: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? } class Data < WhopSDK::Internal::Type::BaseModel @@ -92,8 +91,6 @@ module WhopSDK attr_accessor trace_code: String? - attr_accessor withdrawal_type: WhopSDK::Models::withdrawal_types - def initialize: ( id: String, amount: Float, @@ -109,8 +106,7 @@ module WhopSDK payout_token: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? ) -> void def to_hash: -> { @@ -128,8 +124,7 @@ module WhopSDK payout_token: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken?, speed: WhopSDK::Models::withdrawal_speeds, status: WhopSDK::Models::withdrawal_status, - trace_code: String?, - withdrawal_type: WhopSDK::Models::withdrawal_types + trace_code: String? } type error_code = @@ -158,6 +153,7 @@ module WhopSDK | :invalid_account_number | :invalid_bank_code | :invalid_beneficiary + | :invalid_mailing_address | :invalid_branch_number | :invalid_branch_code | :invalid_phone_number @@ -207,6 +203,7 @@ module WhopSDK INVALID_ACCOUNT_NUMBER: :invalid_account_number INVALID_BANK_CODE: :invalid_bank_code INVALID_BENEFICIARY: :invalid_beneficiary + INVALID_MAILING_ADDRESS: :invalid_mailing_address INVALID_BRANCH_NUMBER: :invalid_branch_number INVALID_BRANCH_CODE: :invalid_branch_code INVALID_PHONE_NUMBER: :invalid_phone_number diff --git a/sig/whop_sdk/resources/app_builds.rbs b/sig/whop_sdk/resources/app_builds.rbs index 7cb05c71..8f5db60f 100644 --- a/sig/whop_sdk/resources/app_builds.rbs +++ b/sig/whop_sdk/resources/app_builds.rbs @@ -2,7 +2,7 @@ module WhopSDK module Resources class AppBuilds def create: ( - attachment: WhopSDK::Models::AppBuildCreateParams::attachment, + attachment: WhopSDK::AppBuildCreateParams::Attachment, checksum: String, platform: WhopSDK::Models::app_build_platforms, ?ai_prompt_id: String?, diff --git a/sig/whop_sdk/resources/apps.rbs b/sig/whop_sdk/resources/apps.rbs index de109e47..da1fa2d4 100644 --- a/sig/whop_sdk/resources/apps.rbs +++ b/sig/whop_sdk/resources/apps.rbs @@ -5,6 +5,7 @@ module WhopSDK company_id: String, name: String, ?base_url: String?, + ?icon: WhopSDK::AppCreateParams::Icon?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::App @@ -22,7 +23,7 @@ module WhopSDK ?description: String?, ?discover_path: String?, ?experience_path: String?, - ?icon: WhopSDK::Models::AppUpdateParams::icon?, + ?icon: WhopSDK::AppUpdateParams::Icon?, ?name: String?, ?required_scopes: ::Array[WhopSDK::Models::AppUpdateParams::required_scope]?, ?status: WhopSDK::Models::app_statuses?, diff --git a/sig/whop_sdk/resources/checkout_configurations.rbs b/sig/whop_sdk/resources/checkout_configurations.rbs index cc715eb3..3613f424 100644 --- a/sig/whop_sdk/resources/checkout_configurations.rbs +++ b/sig/whop_sdk/resources/checkout_configurations.rbs @@ -10,6 +10,7 @@ module WhopSDK ?metadata: ::Hash[Symbol, top]?, ?payment_method_configuration: WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?, ?redirect_url: String?, + ?source_url: String?, ?mode: :setup, ?request_options: WhopSDK::request_opts ) -> WhopSDK::CheckoutConfiguration diff --git a/sig/whop_sdk/resources/companies.rbs b/sig/whop_sdk/resources/companies.rbs index b1cdf21a..1a16d4fa 100644 --- a/sig/whop_sdk/resources/companies.rbs +++ b/sig/whop_sdk/resources/companies.rbs @@ -7,6 +7,7 @@ module WhopSDK title: String, ?business_type: WhopSDK::Models::business_types?, ?industry_type: WhopSDK::Models::industry_types?, + ?logo: WhopSDK::CompanyCreateParams::Logo?, ?metadata: ::Hash[Symbol, top]?, ?send_customer_emails: bool?, ?request_options: WhopSDK::request_opts @@ -19,10 +20,10 @@ module WhopSDK def update: ( String id, - ?banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?, + ?banner_image: WhopSDK::CompanyUpdateParams::BannerImage?, ?business_type: WhopSDK::Models::business_types?, ?industry_type: WhopSDK::Models::industry_types?, - ?logo: WhopSDK::Models::CompanyUpdateParams::logo?, + ?logo: WhopSDK::CompanyUpdateParams::Logo?, ?send_customer_emails: bool?, ?title: String?, ?request_options: WhopSDK::request_opts diff --git a/sig/whop_sdk/resources/course_lessons.rbs b/sig/whop_sdk/resources/course_lessons.rbs index 492d9119..2aae11dc 100644 --- a/sig/whop_sdk/resources/course_lessons.rbs +++ b/sig/whop_sdk/resources/course_lessons.rbs @@ -8,7 +8,7 @@ module WhopSDK ?days_from_course_start_until_unlock: Integer?, ?embed_id: String?, ?embed_type: WhopSDK::Models::embed_type?, - ?thumbnail: WhopSDK::Models::CourseLessonCreateParams::thumbnail?, + ?thumbnail: WhopSDK::CourseLessonCreateParams::Thumbnail?, ?title: String?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Lesson @@ -22,16 +22,16 @@ module WhopSDK String id, ?assessment_completion_requirement: WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement?, ?assessment_questions: ::Array[WhopSDK::CourseLessonUpdateParams::AssessmentQuestion]?, - ?attachments: ::Array[WhopSDK::Models::CourseLessonUpdateParams::attachment]?, + ?attachments: ::Array[WhopSDK::CourseLessonUpdateParams::Attachment]?, ?content: String?, ?days_from_course_start_until_unlock: Integer?, ?embed_id: String?, ?embed_type: WhopSDK::Models::embed_type?, ?lesson_type: WhopSDK::Models::lesson_types?, - ?main_pdf: WhopSDK::Models::CourseLessonUpdateParams::main_pdf?, + ?main_pdf: WhopSDK::CourseLessonUpdateParams::MainPdf?, ?max_attempts: Integer?, ?mux_asset_id: String?, - ?thumbnail: WhopSDK::Models::CourseLessonUpdateParams::thumbnail?, + ?thumbnail: WhopSDK::CourseLessonUpdateParams::Thumbnail?, ?title: String?, ?visibility: WhopSDK::Models::lesson_visibilities?, ?request_options: WhopSDK::request_opts diff --git a/sig/whop_sdk/resources/courses.rbs b/sig/whop_sdk/resources/courses.rbs index 18452e15..7871c908 100644 --- a/sig/whop_sdk/resources/courses.rbs +++ b/sig/whop_sdk/resources/courses.rbs @@ -5,11 +5,10 @@ module WhopSDK experience_id: String, title: String, ?certificate_after_completion_enabled: bool?, - ?cover_image: String?, ?order: String?, ?require_completing_lessons_in_order: bool?, ?tagline: String?, - ?thumbnail: WhopSDK::Models::CourseCreateParams::thumbnail?, + ?thumbnail: WhopSDK::CourseCreateParams::Thumbnail?, ?visibility: WhopSDK::Models::course_visibilities?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Course @@ -23,13 +22,12 @@ module WhopSDK String id, ?certificate_after_completion_enabled: bool?, ?chapters: ::Array[WhopSDK::CourseUpdateParams::Chapter]?, - ?cover_image: String?, ?description: String?, ?language: WhopSDK::Models::languages?, ?order: String?, ?require_completing_lessons_in_order: bool?, ?tagline: String?, - ?thumbnail: WhopSDK::Models::CourseUpdateParams::thumbnail?, + ?thumbnail: WhopSDK::CourseUpdateParams::Thumbnail?, ?title: String?, ?visibility: WhopSDK::Models::course_visibilities?, ?request_options: WhopSDK::request_opts diff --git a/sig/whop_sdk/resources/disputes.rbs b/sig/whop_sdk/resources/disputes.rbs index 718ab995..f7c33a4e 100644 --- a/sig/whop_sdk/resources/disputes.rbs +++ b/sig/whop_sdk/resources/disputes.rbs @@ -27,18 +27,18 @@ module WhopSDK String id, ?access_activity_log: String?, ?billing_address: String?, - ?cancellation_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::cancellation_policy_attachment?, + ?cancellation_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment?, ?cancellation_policy_disclosure: String?, - ?customer_communication_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::customer_communication_attachment?, + ?customer_communication_attachment: WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment?, ?customer_email_address: String?, ?customer_name: String?, ?notes: String?, ?product_description: String?, - ?refund_policy_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::refund_policy_attachment?, + ?refund_policy_attachment: WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment?, ?refund_policy_disclosure: String?, ?refund_refusal_explanation: String?, ?service_date: String?, - ?uncategorized_attachment: WhopSDK::Models::DisputeUpdateEvidenceParams::uncategorized_attachment?, + ?uncategorized_attachment: WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Dispute diff --git a/sig/whop_sdk/resources/experiences.rbs b/sig/whop_sdk/resources/experiences.rbs index 1cbdfe2a..20317d52 100644 --- a/sig/whop_sdk/resources/experiences.rbs +++ b/sig/whop_sdk/resources/experiences.rbs @@ -5,6 +5,7 @@ module WhopSDK app_id: String, company_id: String, ?is_public: bool?, + ?logo: WhopSDK::ExperienceCreateParams::Logo?, ?name: String?, ?section_id: String?, ?request_options: WhopSDK::request_opts @@ -19,7 +20,7 @@ module WhopSDK String id, ?access_level: WhopSDK::Models::ExperienceUpdateParams::access_level?, ?is_public: bool?, - ?logo: WhopSDK::Models::ExperienceUpdateParams::logo?, + ?logo: WhopSDK::ExperienceUpdateParams::Logo?, ?name: String?, ?order: String?, ?section_id: String?, diff --git a/sig/whop_sdk/resources/forum_posts.rbs b/sig/whop_sdk/resources/forum_posts.rbs index 07b059a5..de835ed5 100644 --- a/sig/whop_sdk/resources/forum_posts.rbs +++ b/sig/whop_sdk/resources/forum_posts.rbs @@ -3,7 +3,7 @@ module WhopSDK class ForumPosts def create: ( experience_id: String, - ?attachments: ::Array[WhopSDK::Models::ForumPostCreateParams::attachment]?, + ?attachments: ::Array[WhopSDK::ForumPostCreateParams::Attachment]?, ?content: String?, ?is_mention: bool?, ?parent_id: String?, @@ -23,7 +23,7 @@ module WhopSDK def update: ( String id, - ?attachments: ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment]?, + ?attachments: ::Array[WhopSDK::ForumPostUpdateParams::Attachment]?, ?content: String?, ?is_pinned: bool?, ?title: String?, diff --git a/sig/whop_sdk/resources/messages.rbs b/sig/whop_sdk/resources/messages.rbs index 051f8be5..572b0627 100644 --- a/sig/whop_sdk/resources/messages.rbs +++ b/sig/whop_sdk/resources/messages.rbs @@ -4,7 +4,7 @@ module WhopSDK def create: ( channel_id: String, content: String, - ?attachments: ::Array[WhopSDK::Models::MessageCreateParams::attachment]?, + ?attachments: ::Array[WhopSDK::MessageCreateParams::Attachment]?, ?poll: WhopSDK::MessageCreateParams::Poll?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Message @@ -16,7 +16,7 @@ module WhopSDK def update: ( String id, - ?attachments: ::Array[WhopSDK::Models::MessageUpdateParams::attachment]?, + ?attachments: ::Array[WhopSDK::MessageUpdateParams::Attachment]?, ?content: String?, ?is_pinned: bool?, ?request_options: WhopSDK::request_opts diff --git a/sig/whop_sdk/resources/plans.rbs b/sig/whop_sdk/resources/plans.rbs index c6e51533..4990e1c6 100644 --- a/sig/whop_sdk/resources/plans.rbs +++ b/sig/whop_sdk/resources/plans.rbs @@ -9,7 +9,7 @@ module WhopSDK ?custom_fields: ::Array[WhopSDK::PlanCreateParams::CustomField]?, ?description: String?, ?expiration_days: Integer?, - ?image: WhopSDK::Models::PlanCreateParams::image?, + ?image: WhopSDK::PlanCreateParams::Image?, ?initial_price: Float?, ?internal_notes: String?, ?legacy_payment_method_controls: bool?, @@ -39,7 +39,7 @@ module WhopSDK ?custom_fields: ::Array[WhopSDK::PlanUpdateParams::CustomField]?, ?description: String?, ?expiration_days: Integer?, - ?image: WhopSDK::Models::PlanUpdateParams::image?, + ?image: WhopSDK::PlanUpdateParams::Image?, ?initial_price: Float?, ?internal_notes: String?, ?legacy_payment_method_controls: bool?, diff --git a/sig/whop_sdk/resources/withdrawals.rbs b/sig/whop_sdk/resources/withdrawals.rbs index 2521ce18..ffac725f 100644 --- a/sig/whop_sdk/resources/withdrawals.rbs +++ b/sig/whop_sdk/resources/withdrawals.rbs @@ -6,6 +6,8 @@ module WhopSDK company_id: String, currency: WhopSDK::Models::currency, ?payout_method_id: String?, + ?platform_covers_fees: bool?, + ?statement_descriptor: String?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::Models::WithdrawalCreateResponse diff --git a/test/whop_sdk/resources/app_builds_test.rb b/test/whop_sdk/resources/app_builds_test.rb index de0855fc..e307360f 100644 --- a/test/whop_sdk/resources/app_builds_test.rb +++ b/test/whop_sdk/resources/app_builds_test.rb @@ -6,12 +6,7 @@ class WhopSDK::Test::Resources::AppBuildsTest < WhopSDK::Test::ResourceTest def test_create_required_params skip("Prism tests are disabled") - response = - @whop.app_builds.create( - attachment: {direct_upload_id: "direct_upload_id"}, - checksum: "checksum", - platform: :ios - ) + response = @whop.app_builds.create(attachment: {id: "id"}, checksum: "checksum", platform: :ios) assert_pattern do response => WhopSDK::AppBuild diff --git a/test/whop_sdk/resources/ledger_accounts_test.rb b/test/whop_sdk/resources/ledger_accounts_test.rb index 86702073..0b2ad069 100644 --- a/test/whop_sdk/resources/ledger_accounts_test.rb +++ b/test/whop_sdk/resources/ledger_accounts_test.rb @@ -16,7 +16,6 @@ def test_retrieve response => { id: String, balances: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Models::LedgerAccountRetrieveResponse::Balance]), - ledger_account_audit_status: WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerAccountAuditStatus | nil, ledger_type: WhopSDK::Models::LedgerAccountRetrieveResponse::LedgerType, owner: WhopSDK::Models::LedgerAccountRetrieveResponse::Owner, payments_approval_status: WhopSDK::Models::LedgerAccountRetrieveResponse::PaymentsApprovalStatus | nil, diff --git a/test/whop_sdk/resources/members_test.rb b/test/whop_sdk/resources/members_test.rb index b28a597b..84a7178d 100644 --- a/test/whop_sdk/resources/members_test.rb +++ b/test/whop_sdk/resources/members_test.rb @@ -17,6 +17,7 @@ def test_retrieve id: String, access_level: WhopSDK::AccessLevel, company: WhopSDK::Models::MemberRetrieveResponse::Company, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: WhopSDK::MemberMostRecentActions | nil, @@ -50,6 +51,7 @@ def test_list_required_params row => { id: String, access_level: WhopSDK::AccessLevel, + company_token_balance: Float, created_at: Time, joined_at: Time, most_recent_action: WhopSDK::MemberMostRecentActions | nil, diff --git a/test/whop_sdk/resources/memberships_test.rb b/test/whop_sdk/resources/memberships_test.rb index b87db031..87955f98 100644 --- a/test/whop_sdk/resources/memberships_test.rb +++ b/test/whop_sdk/resources/memberships_test.rb @@ -16,11 +16,13 @@ def test_retrieve response => { id: String, cancel_at_period_end: WhopSDK::Internal::Type::Boolean, + cancel_option: WhopSDK::Membership::CancelOption | nil, canceled_at: Time | nil, cancellation_reason: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, + custom_field_responses: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Membership::CustomFieldResponse]), license_key: String | nil, manage_url: String | nil, member: WhopSDK::Membership::Member | nil, @@ -51,11 +53,13 @@ def test_update response => { id: String, cancel_at_period_end: WhopSDK::Internal::Type::Boolean, + cancel_option: WhopSDK::Membership::CancelOption | nil, canceled_at: Time | nil, cancellation_reason: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, + custom_field_responses: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Membership::CustomFieldResponse]), license_key: String | nil, manage_url: String | nil, member: WhopSDK::Membership::Member | nil, @@ -93,6 +97,7 @@ def test_list row => { id: String, cancel_at_period_end: WhopSDK::Internal::Type::Boolean, + cancel_option: WhopSDK::Models::MembershipListResponse::CancelOption | nil, canceled_at: Time | nil, cancellation_reason: String | nil, company: WhopSDK::Models::MembershipListResponse::Company, @@ -128,11 +133,13 @@ def test_cancel response => { id: String, cancel_at_period_end: WhopSDK::Internal::Type::Boolean, + cancel_option: WhopSDK::Membership::CancelOption | nil, canceled_at: Time | nil, cancellation_reason: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, + custom_field_responses: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Membership::CustomFieldResponse]), license_key: String | nil, manage_url: String | nil, member: WhopSDK::Membership::Member | nil, @@ -163,11 +170,13 @@ def test_pause response => { id: String, cancel_at_period_end: WhopSDK::Internal::Type::Boolean, + cancel_option: WhopSDK::Membership::CancelOption | nil, canceled_at: Time | nil, cancellation_reason: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, + custom_field_responses: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Membership::CustomFieldResponse]), license_key: String | nil, manage_url: String | nil, member: WhopSDK::Membership::Member | nil, @@ -198,11 +207,13 @@ def test_resume response => { id: String, cancel_at_period_end: WhopSDK::Internal::Type::Boolean, + cancel_option: WhopSDK::Membership::CancelOption | nil, canceled_at: Time | nil, cancellation_reason: String | nil, company: WhopSDK::Membership::Company, created_at: Time, currency: WhopSDK::Currency | nil, + custom_field_responses: ^(WhopSDK::Internal::Type::ArrayOf[WhopSDK::Membership::CustomFieldResponse]), license_key: String | nil, manage_url: String | nil, member: WhopSDK::Membership::Member | nil, diff --git a/test/whop_sdk/resources/payments_test.rb b/test/whop_sdk/resources/payments_test.rb index bc1a9a00..210673af 100644 --- a/test/whop_sdk/resources/payments_test.rb +++ b/test/whop_sdk/resources/payments_test.rb @@ -36,9 +36,11 @@ def test_create_required_params member: WhopSDK::Payment::Member | nil, membership: WhopSDK::Payment::Membership | nil, metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, + next_payment_attempt: Time | nil, paid_at: Time | nil, payment_method: WhopSDK::Payment::PaymentMethod | nil, payment_method_type: WhopSDK::PaymentMethodTypes | nil, + payments_failed: Integer | nil, plan: WhopSDK::Payment::Plan | nil, product: WhopSDK::Payment::Product | nil, promo_code: WhopSDK::Payment::PromoCode | nil, @@ -84,9 +86,11 @@ def test_retrieve member: WhopSDK::Payment::Member | nil, membership: WhopSDK::Payment::Membership | nil, metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, + next_payment_attempt: Time | nil, paid_at: Time | nil, payment_method: WhopSDK::Payment::PaymentMethod | nil, payment_method_type: WhopSDK::PaymentMethodTypes | nil, + payments_failed: Integer | nil, plan: WhopSDK::Payment::Plan | nil, product: WhopSDK::Payment::Product | nil, promo_code: WhopSDK::Payment::PromoCode | nil, @@ -139,9 +143,11 @@ def test_list_required_params member: WhopSDK::Models::PaymentListResponse::Member | nil, membership: WhopSDK::Models::PaymentListResponse::Membership | nil, metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, + next_payment_attempt: Time | nil, paid_at: Time | nil, payment_method: WhopSDK::Models::PaymentListResponse::PaymentMethod | nil, payment_method_type: WhopSDK::PaymentMethodTypes | nil, + payments_failed: Integer | nil, plan: WhopSDK::Models::PaymentListResponse::Plan | nil, product: WhopSDK::Models::PaymentListResponse::Product | nil, promo_code: WhopSDK::Models::PaymentListResponse::PromoCode | nil, @@ -213,9 +219,11 @@ def test_refund member: WhopSDK::Payment::Member | nil, membership: WhopSDK::Payment::Membership | nil, metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, + next_payment_attempt: Time | nil, paid_at: Time | nil, payment_method: WhopSDK::Payment::PaymentMethod | nil, payment_method_type: WhopSDK::PaymentMethodTypes | nil, + payments_failed: Integer | nil, plan: WhopSDK::Payment::Plan | nil, product: WhopSDK::Payment::Product | nil, promo_code: WhopSDK::Payment::PromoCode | nil, @@ -261,9 +269,11 @@ def test_retry_ member: WhopSDK::Payment::Member | nil, membership: WhopSDK::Payment::Membership | nil, metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, + next_payment_attempt: Time | nil, paid_at: Time | nil, payment_method: WhopSDK::Payment::PaymentMethod | nil, payment_method_type: WhopSDK::PaymentMethodTypes | nil, + payments_failed: Integer | nil, plan: WhopSDK::Payment::Plan | nil, product: WhopSDK::Payment::Product | nil, promo_code: WhopSDK::Payment::PromoCode | nil, @@ -309,9 +319,11 @@ def test_void member: WhopSDK::Payment::Member | nil, membership: WhopSDK::Payment::Membership | nil, metadata: ^(WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]) | nil, + next_payment_attempt: Time | nil, paid_at: Time | nil, payment_method: WhopSDK::Payment::PaymentMethod | nil, payment_method_type: WhopSDK::PaymentMethodTypes | nil, + payments_failed: Integer | nil, plan: WhopSDK::Payment::Plan | nil, product: WhopSDK::Payment::Product | nil, promo_code: WhopSDK::Payment::PromoCode | nil, diff --git a/test/whop_sdk/resources/payout_methods_test.rb b/test/whop_sdk/resources/payout_methods_test.rb index 2e5794c7..4f4d9b7b 100644 --- a/test/whop_sdk/resources/payout_methods_test.rb +++ b/test/whop_sdk/resources/payout_methods_test.rb @@ -15,9 +15,12 @@ def test_retrieve assert_pattern do response => { id: String, + account_reference: String | nil, company: WhopSDK::Models::PayoutMethodRetrieveResponse::Company | nil, + created_at: Time, currency: String, destination: WhopSDK::Models::PayoutMethodRetrieveResponse::Destination | nil, + institution_name: String | nil, is_default: WhopSDK::Internal::Type::Boolean, nickname: String | nil } @@ -43,9 +46,12 @@ def test_list_required_params assert_pattern do row => { id: String, + account_reference: String | nil, company: WhopSDK::Models::PayoutMethodListResponse::Company | nil, + created_at: Time, currency: String, destination: WhopSDK::Models::PayoutMethodListResponse::Destination | nil, + institution_name: String | nil, is_default: WhopSDK::Internal::Type::Boolean, nickname: String | nil } diff --git a/test/whop_sdk/resources/withdrawals_test.rb b/test/whop_sdk/resources/withdrawals_test.rb index 73f23400..32b3fe2d 100644 --- a/test/whop_sdk/resources/withdrawals_test.rb +++ b/test/whop_sdk/resources/withdrawals_test.rb @@ -28,8 +28,7 @@ def test_create_required_params payout_token: WhopSDK::Models::WithdrawalCreateResponse::PayoutToken | nil, speed: WhopSDK::WithdrawalSpeeds, status: WhopSDK::WithdrawalStatus, - trace_code: String | nil, - withdrawal_type: WhopSDK::WithdrawalTypes + trace_code: String | nil } end end @@ -59,8 +58,7 @@ def test_retrieve payout_token: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken | nil, speed: WhopSDK::WithdrawalSpeeds, status: WhopSDK::WithdrawalStatus, - trace_code: String | nil, - withdrawal_type: WhopSDK::WithdrawalTypes + trace_code: String | nil } end end @@ -91,8 +89,7 @@ def test_list_required_params fee_type: WhopSDK::WithdrawalFeeTypes | nil, markup_fee: Float, speed: WhopSDK::WithdrawalSpeeds, - status: WhopSDK::WithdrawalStatus, - withdrawal_type: WhopSDK::WithdrawalTypes + status: WhopSDK::WithdrawalStatus } end end diff --git a/whop_sdk.gemspec b/whop_sdk.gemspec index 43b846aa..b4007437 100644 --- a/whop_sdk.gemspec +++ b/whop_sdk.gemspec @@ -24,6 +24,7 @@ Gem::Specification.new do |s| ".ignore" ] s.extra_rdoc_files = ["README.md"] + s.add_dependency "cgi" s.add_dependency "connection_pool" s.add_dependency "jwt" s.add_dependency "openssl"