Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.26"
".": "0.1.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 170
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-333c68cc8619caa2ffdfed588a7d2b2c263f8910b7b682698da92c826932e7c7.yml
openapi_spec_hash: 8e2cc20f1e06b43ea220edbdf16eddbe
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-247b88b976ba875cb5f95779d2880a9d3c2939e22d8b7aac57d4fdb763c604f8.yml
openapi_spec_hash: 10f56de09042048ccff87bd2ecda6a75
config_hash: 48e5bec0f5659595abb38814aa0d9cc2
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.1.0 (2026-02-06)

Full Changelog: [v0.0.26...v0.1.0](https://github.com/whopio/whopsdk-ruby/compare/v0.0.26...v0.1.0)

### Features

* **api:** api update ([32441bf](https://github.com/whopio/whopsdk-ruby/commit/32441bff9dd037424c7e93be807c3e73250f5b78))
* **api:** api update ([be694cf](https://github.com/whopio/whopsdk-ruby/commit/be694cff7f498f177f025c75292ce29c800c1658))
* **api:** api update ([3bdf111](https://github.com/whopio/whopsdk-ruby/commit/3bdf1117e8b6b434b77713fcf534dd112c743ff1))
* **api:** api update ([71cfae3](https://github.com/whopio/whopsdk-ruby/commit/71cfae32a386c17a95fd5d82a24ae70ec7f5417d))


### Chores

* **docs:** remove www prefix ([d581cb1](https://github.com/whopio/whopsdk-ruby/commit/d581cb174e297c951ac30d0790d48d6a53c046e4))

## 0.0.26 (2026-02-03)

Full Changelog: [v0.0.25...v0.0.26](https://github.com/whopio/whopsdk-ruby/compare/v0.0.25...v0.0.26)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ If you’d like to use the repository from source, you can either install from g
To install via git in your `Gemfile`:

```ruby
gem "whop_sdk", git: "https://www.github.com/whopio/whopsdk-ruby"
gem "whop_sdk", git: "https://github.com/whopio/whopsdk-ruby"
```

Alternatively, reference local copy of the repo:

```bash
$ git clone -- 'https://www.github.com/whopio/whopsdk-ruby' '<path-to-repo>'
$ git clone -- 'https://github.com/whopio/whopsdk-ruby' '<path-to-repo>'
```

```ruby
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
whop_sdk (0.0.26)
whop_sdk (0.1.0)
cgi
connection_pool
jwt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "whop_sdk", "~> 0.0.26"
gem "whop_sdk", "~> 0.1.0"
```

<!-- x-release-please-end -->
Expand Down
23 changes: 12 additions & 11 deletions lib/whop_sdk/models/access_token_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class AccessTokenCreateParams < WhopSDK::Internal::Type::BaseModel
# permission to access this Company, such as the being the company the API key
# belongs to or a sub-merchant of it
#
# @return [String]
required :company_id, String
# @return [String, nil]
optional :company_id, String, nil?: true

# @!attribute expires_at
# The expiration timestamp for the access token. If not provided, a default
Expand All @@ -25,9 +25,10 @@ class AccessTokenCreateParams < WhopSDK::Internal::Type::BaseModel

# @!attribute scoped_actions
# Array of desired scoped actions for the access token. If sent as an empty array
# or not provided, all permissions from the API key making the request will be
# available on the token. If sending an explicit list, they must be a subset of
# the API keys's existing permissions. Otherwise, an error will be raised.
# or not provided, all permissions from the authenticating credential (API key or
# OAuth token) will be available on the token. If sending an explicit list, they
# must be a subset of the credential's existing permissions. Otherwise, an error
# will be raised.
#
# @return [Array<String>, nil]
optional :scoped_actions, WhopSDK::Internal::Type::ArrayOf[String], nil?: true
Expand All @@ -36,21 +37,21 @@ class AccessTokenCreateParams < WhopSDK::Internal::Type::BaseModel
# The ID of the User to generate the token for. The API key must have permission
# to access this User.
#
# @return [String]
required :user_id, String
# @return [String, nil]
optional :user_id, String, nil?: true

# @!method initialize(company_id:, user_id:, expires_at: nil, scoped_actions: nil, request_options: {})
# @!method initialize(company_id: nil, expires_at: nil, scoped_actions: nil, user_id: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {WhopSDK::Models::AccessTokenCreateParams} for more details.
#
# @param company_id [String] The ID of the Company to generate the token for. The API key must have permissio
#
# @param user_id [String] The ID of the User to generate the token for. The API key must have permission t
# @param company_id [String, nil] The ID of the Company to generate the token for. The API key must have permissio
#
# @param expires_at [Time, nil] The expiration timestamp for the access token. If not provided, a default expira
#
# @param scoped_actions [Array<String>, nil] Array of desired scoped actions for the access token. If sent as an empty array
#
# @param user_id [String, nil] The ID of the User to generate the token for. The API key must have permission t
#
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
45 changes: 44 additions & 1 deletion lib/whop_sdk/models/ai_chat_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,59 @@ class AIChatCreateParams < WhopSDK::Internal::Type::BaseModel
extend WhopSDK::Internal::Type::RequestParameters::Converter
include WhopSDK::Internal::Type::RequestParameters

# @!attribute message_text
# The text content of the first message sent in the chat
#
# @return [String]
required :message_text, String

# @!attribute current_company_id
# The ID of the company to set as the current company in context for the AI chat
#
# @return [String, nil]
optional :current_company_id, String, nil?: true

# @!attribute message_attachments
# The IDs of existing uploaded attachments to include in the first message to the
# agent
#
# @return [Array<WhopSDK::Models::AIChatCreateParams::MessageAttachment>, nil]
optional :message_attachments,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::AIChatCreateParams::MessageAttachment] },
nil?: true

# @!attribute title
# The title of the AI chat
#
# @return [String, nil]
optional :title, String, nil?: true

# @!method initialize(title: nil, request_options: {})
# @!method initialize(message_text:, current_company_id: nil, message_attachments: nil, title: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {WhopSDK::Models::AIChatCreateParams} for more details.
#
# @param message_text [String] The text content of the first message sent in the chat
#
# @param current_company_id [String, nil] The ID of the company to set as the current company in context for the AI chat
#
# @param message_attachments [Array<WhopSDK::Models::AIChatCreateParams::MessageAttachment>, nil] The IDs of existing uploaded attachments to include in the first message to the
#
# @param title [String, nil] The title of the AI chat
#
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]

class MessageAttachment < 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
end
10 changes: 9 additions & 1 deletion lib/whop_sdk/models/ai_chat_update_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ class AIChatUpdateParams < WhopSDK::Internal::Type::BaseModel
extend WhopSDK::Internal::Type::RequestParameters::Converter
include WhopSDK::Internal::Type::RequestParameters

# @!attribute current_company_id
# The ID of the company to set as the current company in context for the AI chat
#
# @return [String, nil]
optional :current_company_id, String, nil?: true

# @!attribute title
# The new title for the AI chat
#
# @return [String, nil]
optional :title, String, nil?: true

# @!method initialize(title: nil, request_options: {})
# @!method initialize(current_company_id: nil, title: nil, request_options: {})
# @param current_company_id [String, nil] The ID of the company to set as the current company in context for the AI chat
#
# @param title [String, nil] The new title for the AI chat
#
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
Expand Down
2 changes: 2 additions & 0 deletions lib/whop_sdk/models/card_brands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ module CardBrands
FUEL_CARD = :fuel_card
DANKORT = :dankort
CARNET = :carnet
ATM_CARD = :atm_card
CHINA_UNION_PAYUZCARD = :china_union_payuzcard
UNKNOWN = :unknown

# @!method self.values
Expand Down
18 changes: 9 additions & 9 deletions lib/whop_sdk/resources/access_tokens.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ class AccessTokens
# Some parameter documentations has been truncated, see
# {WhopSDK::Models::AccessTokenCreateParams} for more details.
#
# Create a short-lived access token to authenticate API requests on behalf of a
# Company or User. This token should be used with Whop's web and mobile embedded
# components. You must provide either a company_id or a user_id argument, but not
# both.
# Create a short-lived access token to authenticate API requests. When using API
# key authentication, provide company_id or user_id. When using OAuth
# authentication, the user is derived from the token. This token should be used
# with Whop's web and mobile embedded components.
#
# @overload create(company_id:, user_id:, expires_at: nil, scoped_actions: nil, request_options: {})
# @overload create(company_id: nil, expires_at: nil, scoped_actions: nil, user_id: nil, request_options: {})
#
# @param company_id [String] The ID of the Company to generate the token for. The API key must have permissio
#
# @param user_id [String] The ID of the User to generate the token for. The API key must have permission t
# @param company_id [String, nil] The ID of the Company to generate the token for. The API key must have permissio
#
# @param expires_at [Time, nil] The expiration timestamp for the access token. If not provided, a default expira
#
# @param scoped_actions [Array<String>, nil] Array of desired scoped actions for the access token. If sent as an empty array
#
# @param user_id [String, nil] The ID of the User to generate the token for. The API key must have permission t
#
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [WhopSDK::Models::AccessTokenCreateResponse]
#
# @see WhopSDK::Models::AccessTokenCreateParams
def create(params)
def create(params = {})
parsed, options = WhopSDK::AccessTokenCreateParams.dump_request(params)
@client.request(
method: :post,
Expand Down
17 changes: 14 additions & 3 deletions lib/whop_sdk/resources/ai_chats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@
module WhopSDK
module Resources
class AIChats
# Some parameter documentations has been truncated, see
# {WhopSDK::Models::AIChatCreateParams} for more details.
#
# Creates a new AI chat
#
# Required permissions:
#
# - `ai_chat:create`
#
# @overload create(title: nil, request_options: {})
# @overload create(message_text:, current_company_id: nil, message_attachments: nil, title: nil, request_options: {})
#
# @param message_text [String] The text content of the first message sent in the chat
#
# @param current_company_id [String, nil] The ID of the company to set as the current company in context for the AI chat
#
# @param message_attachments [Array<WhopSDK::Models::AIChatCreateParams::MessageAttachment>, nil] The IDs of existing uploaded attachments to include in the first message to the
#
# @param title [String, nil] The title of the AI chat
#
Expand All @@ -18,7 +27,7 @@ class AIChats
# @return [WhopSDK::Models::AIChat]
#
# @see WhopSDK::Models::AIChatCreateParams
def create(params = {})
def create(params)
parsed, options = WhopSDK::AIChatCreateParams.dump_request(params)
@client.request(
method: :post,
Expand Down Expand Up @@ -55,10 +64,12 @@ def retrieve(id, params = {})
#
# - `ai_chat:update`
#
# @overload update(id, title: nil, request_options: {})
# @overload update(id, current_company_id: nil, title: nil, request_options: {})
#
# @param id [String] The ID of the AI chat to update
#
# @param current_company_id [String, nil] The ID of the company to set as the current company in context for the AI chat
#
# @param title [String, nil] The new title for the AI chat
#
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
Expand Down
2 changes: 1 addition & 1 deletion lib/whop_sdk/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module WhopSDK
VERSION = "0.0.26"
VERSION = "0.1.0"
end
34 changes: 18 additions & 16 deletions rbi/whop_sdk/models/access_token_create_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module WhopSDK
# The ID of the Company to generate the token for. The API key must have
# permission to access this Company, such as the being the company the API key
# belongs to or a sub-merchant of it
sig { returns(String) }
sig { returns(T.nilable(String)) }
attr_accessor :company_id

# The expiration timestamp for the access token. If not provided, a default
Expand All @@ -24,54 +24,56 @@ module WhopSDK
attr_accessor :expires_at

# Array of desired scoped actions for the access token. If sent as an empty array
# or not provided, all permissions from the API key making the request will be
# available on the token. If sending an explicit list, they must be a subset of
# the API keys's existing permissions. Otherwise, an error will be raised.
# or not provided, all permissions from the authenticating credential (API key or
# OAuth token) will be available on the token. If sending an explicit list, they
# must be a subset of the credential's existing permissions. Otherwise, an error
# will be raised.
sig { returns(T.nilable(T::Array[String])) }
attr_accessor :scoped_actions

# The ID of the User to generate the token for. The API key must have permission
# to access this User.
sig { returns(String) }
sig { returns(T.nilable(String)) }
attr_accessor :user_id

sig do
params(
company_id: String,
user_id: String,
company_id: T.nilable(String),
expires_at: T.nilable(Time),
scoped_actions: T.nilable(T::Array[String]),
user_id: T.nilable(String),
request_options: WhopSDK::RequestOptions::OrHash
).returns(T.attached_class)
end
def self.new(
# The ID of the Company to generate the token for. The API key must have
# permission to access this Company, such as the being the company the API key
# belongs to or a sub-merchant of it
company_id:,
# The ID of the User to generate the token for. The API key must have permission
# to access this User.
user_id:,
company_id: nil,
# The expiration timestamp for the access token. If not provided, a default
# expiration time of 1 hour will be used. The expiration can be set to a maximum
# of 3 hours from the current time.
expires_at: nil,
# Array of desired scoped actions for the access token. If sent as an empty array
# or not provided, all permissions from the API key making the request will be
# available on the token. If sending an explicit list, they must be a subset of
# the API keys's existing permissions. Otherwise, an error will be raised.
# or not provided, all permissions from the authenticating credential (API key or
# OAuth token) will be available on the token. If sending an explicit list, they
# must be a subset of the credential's existing permissions. Otherwise, an error
# will be raised.
scoped_actions: nil,
# The ID of the User to generate the token for. The API key must have permission
# to access this User.
user_id: nil,
request_options: {}
)
end

sig do
override.returns(
{
company_id: String,
company_id: T.nilable(String),
expires_at: T.nilable(Time),
scoped_actions: T.nilable(T::Array[String]),
user_id: String,
user_id: T.nilable(String),
request_options: WhopSDK::RequestOptions
}
)
Expand Down
Loading