Skip to content

Conversation

@stainless-app
Copy link
Contributor

@stainless-app stainless-app bot commented Dec 16, 2025

Automated Release PR

0.1.0 (2026-01-02)

Full Changelog: v0.0.20...v0.1.0

Features

Bug Fixes

  • calling break out of streams should be instantaneous (7503ef5)
  • issue where json.parse errors when receiving HTTP 204 with nobody (919e4e1)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from f37e51e to 3741dd5 Compare December 17, 2025 20:32
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 3741dd5 to 2f3b93d Compare December 17, 2025 21:32
@stainless-app stainless-app bot changed the title release: 0.0.21 release: 0.1.0 Dec 17, 2025
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 2f3b93d to 03408bf Compare December 17, 2025 21:32
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 03408bf to c62aba0 Compare December 18, 2025 18:52
Comment on lines +161 to 171
rsp.read_body do |bytes|
y << bytes.force_encoding(Encoding::BINARY)
::Kernel.throw(:jump) if finished

self.class.calibrate_socket_timeout(conn, deadline)
end
eof = true
end
eof = true
end
end
ensure

This comment was marked as outdated.

@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from c62aba0 to c37e074 Compare December 18, 2025 19:32
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from c37e074 to 776368e Compare December 18, 2025 20:32
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 776368e to 2a5ffb0 Compare December 19, 2025 21:32
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 2a5ffb0 to 81a48a1 Compare December 30, 2025 14:32
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 81a48a1 to 42baa95 Compare December 30, 2025 19:31
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 42baa95 to 4619247 Compare December 31, 2025 10:31
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 4619247 to bad1ea2 Compare January 1, 2026 08:31
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from bad1ea2 to 45c882b Compare January 1, 2026 21:31
@stainless-app stainless-app bot force-pushed the release-please--branches--main--changes--next branch from 45c882b to 7c61cd5 Compare January 2, 2026 16:31
Comment on lines +14 to +20
optional :company_id, String, nil?: true

# @!attribute member_id
# The ID of the Member associated with the PaymentMethod
# The ID of the Member. Provide either this or company_id (not both).
#
# @return [String]
required :member_id, String
# @return [String, nil]
optional :member_id, String, nil?: true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The change from required to optional for company_id and member_id lacks validation to ensure either one (but not both) is provided, allowing invalid API requests.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The PaymentMethodRetrieveParams and PaymentMethodListParams models now define company_id and member_id as optional, with documentation stating they are mutually exclusive. However, no validation logic was added to enforce this constraint. The underlying BaseModel does not support cross-field validation. This allows the SDK to accept parameter objects that are invalid in two ways: 1) with neither company_id nor member_id set, or 2) with both set. In both cases, the SDK will serialize the parameters without error, but the subsequent API call will fail with a validation error from the server. This is a regression from the previous behavior where member_id was required.

💡 Suggested Fix

Implement a custom validation method within the PaymentMethodRetrieveParams and PaymentMethodListParams models. This method should check that exactly one of company_id or member_id is present. Raise an ArgumentError if the condition is not met to provide immediate feedback to the developer.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: lib/whop_sdk/models/payment_method_retrieve_params.rb#L14-L20

Potential issue: The `PaymentMethodRetrieveParams` and `PaymentMethodListParams` models
now define `company_id` and `member_id` as `optional`, with documentation stating they
are mutually exclusive. However, no validation logic was added to enforce this
constraint. The underlying `BaseModel` does not support cross-field validation. This
allows the SDK to accept parameter objects that are invalid in two ways: 1) with neither
`company_id` nor `member_id` set, or 2) with both set. In both cases, the SDK will
serialize the parameters without error, but the subsequent API call will fail with a
validation error from the server. This is a regression from the previous behavior where
`member_id` was required.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8110442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant