Skip to content
Merged
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
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: CI
on:
push:
branches-ignore:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
Expand Down
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.34"
".": "0.0.35"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 181
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-b6e1387ac58f903f887eae989de30273824663a9a752e7834b82b1036950c3d2.yml
openapi_spec_hash: 0bea29a304f3d57c44cc186478bef054
config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9
configured_endpoints: 191
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-97e920db587b07c064bef1bf31de5e110a3750ddfddc8fca26642e79e6b827f8.yml
openapi_spec_hash: 97ca16cc55271602443a4329d1e02895
config_hash: 1a836d20bb988f001cc66d1526f71306
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.0.35 (2026-03-18)

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

### Features

* **api:** api update ([2a05f14](https://github.com/whopio/whopsdk-ruby/commit/2a05f143df7f46588438bd0233e3c65985831bf2))
* **api:** api update ([624451c](https://github.com/whopio/whopsdk-ruby/commit/624451ce95b25a90562c30261d7a1801a480260a))
* **api:** api update ([74adc68](https://github.com/whopio/whopsdk-ruby/commit/74adc68f5191b01622fa5f8cdde57c8bc42e27ca))
* **api:** manual updates ([c6920ab](https://github.com/whopio/whopsdk-ruby/commit/c6920ab5da4563867990f3c24af2798a15c9211c))


### Chores

* **internal:** tweak CI branches ([26a8138](https://github.com/whopio/whopsdk-ruby/commit/26a813830154e9704907af52c2c747af6bdf6a11))

## 0.0.34 (2026-03-13)

Full Changelog: [v0.0.33...v0.0.34](https://github.com/whopio/whopsdk-ruby/compare/v0.0.33...v0.0.34)
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.34)
whop_sdk (0.0.35)
cgi
connection_pool
standardwebhooks
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.34"
gem "whop_sdk", "~> 0.0.35"
```

<!-- x-release-please-end -->
Expand Down
28 changes: 28 additions & 0 deletions lib/whop_sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,30 @@
require_relative "whop_sdk/models/access_token_create_response"
require_relative "whop_sdk/models/account_link_create_params"
require_relative "whop_sdk/models/account_link_create_response"
require_relative "whop_sdk/models/affiliate"
require_relative "whop_sdk/models/affiliate_archive_params"
require_relative "whop_sdk/models/affiliate_archive_response"
require_relative "whop_sdk/models/affiliate_create_params"
require_relative "whop_sdk/models/affiliate_list_params"
require_relative "whop_sdk/models/affiliate_list_response"
require_relative "whop_sdk/models/affiliate_retrieve_params"
require_relative "whop_sdk/models/affiliates/affiliate_applies_to_payments"
require_relative "whop_sdk/models/affiliates/affiliate_applies_to_products"
require_relative "whop_sdk/models/affiliates/affiliate_override_roles"
require_relative "whop_sdk/models/affiliates/affiliate_payout_types"
require_relative "whop_sdk/models/affiliates/affiliate_revenue_bases"
require_relative "whop_sdk/models/affiliates/override_create_params"
require_relative "whop_sdk/models/affiliates/override_create_response"
require_relative "whop_sdk/models/affiliates/override_delete_params"
require_relative "whop_sdk/models/affiliates/override_delete_response"
require_relative "whop_sdk/models/affiliates/override_list_params"
require_relative "whop_sdk/models/affiliates/override_list_response"
require_relative "whop_sdk/models/affiliates/override_retrieve_params"
require_relative "whop_sdk/models/affiliates/override_retrieve_response"
require_relative "whop_sdk/models/affiliates/override_update_params"
require_relative "whop_sdk/models/affiliates/override_update_response"
require_relative "whop_sdk/models/affiliate_unarchive_params"
require_relative "whop_sdk/models/affiliate_unarchive_response"
require_relative "whop_sdk/models/ai_chat"
require_relative "whop_sdk/models/ai_chat_create_params"
require_relative "whop_sdk/models/ai_chat_delete_params"
Expand Down Expand Up @@ -302,6 +326,7 @@
require_relative "whop_sdk/models/message_update_params"
require_relative "whop_sdk/models/notification_create_params"
require_relative "whop_sdk/models/notification_create_response"
require_relative "whop_sdk/models/notification_preferences"
require_relative "whop_sdk/models/page_info"
require_relative "whop_sdk/models/payment"
require_relative "whop_sdk/models/payment_created_webhook_event"
Expand Down Expand Up @@ -410,6 +435,7 @@
require_relative "whop_sdk/models/shipment_status"
require_relative "whop_sdk/models/shipment_substatus"
require_relative "whop_sdk/models/social_link_websites"
require_relative "whop_sdk/models/status"
require_relative "whop_sdk/models/support_channel"
require_relative "whop_sdk/models/support_channel_create_params"
require_relative "whop_sdk/models/support_channel_list_params"
Expand Down Expand Up @@ -469,6 +495,8 @@
require_relative "whop_sdk/models"
require_relative "whop_sdk/resources/access_tokens"
require_relative "whop_sdk/resources/account_links"
require_relative "whop_sdk/resources/affiliates"
require_relative "whop_sdk/resources/affiliates/overrides"
require_relative "whop_sdk/resources/ai_chats"
require_relative "whop_sdk/resources/app_builds"
require_relative "whop_sdk/resources/apps"
Expand Down
5 changes: 5 additions & 0 deletions lib/whop_sdk/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ class Client < WhopSDK::Internal::Transport::BaseClient
# @return [WhopSDK::Resources::PayoutAccounts]
attr_reader :payout_accounts

# Affiliates
# @return [WhopSDK::Resources::Affiliates]
attr_reader :affiliates

# @api private
#
# @return [Hash{String=>String}]
Expand Down Expand Up @@ -351,6 +355,7 @@ def initialize(
@dispute_alerts = WhopSDK::Resources::DisputeAlerts.new(client: self)
@resolution_center_cases = WhopSDK::Resources::ResolutionCenterCases.new(client: self)
@payout_accounts = WhopSDK::Resources::PayoutAccounts.new(client: self)
@affiliates = WhopSDK::Resources::Affiliates.new(client: self)
end

# Verifies a Whop user token
Expand Down
18 changes: 18 additions & 0 deletions lib/whop_sdk/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ module WhopSDK

AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams

Affiliate = WhopSDK::Models::Affiliate

AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams

AffiliateCreateParams = WhopSDK::Models::AffiliateCreateParams

AffiliateListParams = WhopSDK::Models::AffiliateListParams

AffiliateRetrieveParams = WhopSDK::Models::AffiliateRetrieveParams

Affiliates = WhopSDK::Models::Affiliates

AffiliateUnarchiveParams = WhopSDK::Models::AffiliateUnarchiveParams

AIChat = WhopSDK::Models::AIChat

AIChatCreateParams = WhopSDK::Models::AIChatCreateParams
Expand Down Expand Up @@ -437,6 +451,8 @@ module WhopSDK

NotificationCreateParams = WhopSDK::Models::NotificationCreateParams

NotificationPreferences = WhopSDK::Models::NotificationPreferences

PageInfo = WhopSDK::Models::PageInfo

Payment = WhopSDK::Models::Payment
Expand Down Expand Up @@ -609,6 +625,8 @@ module WhopSDK

SocialLinkWebsites = WhopSDK::Models::SocialLinkWebsites

Status = WhopSDK::Models::Status

SupportChannel = WhopSDK::Models::SupportChannel

SupportChannelCreateParams = WhopSDK::Models::SupportChannelCreateParams
Expand Down
180 changes: 180 additions & 0 deletions lib/whop_sdk/models/affiliate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# frozen_string_literal: true

module WhopSDK
module Models
# @see WhopSDK::Resources::Affiliates#create
class Affiliate < WhopSDK::Internal::Type::BaseModel
# @!attribute id
# The unique identifier for the affiliate.
#
# @return [String]
required :id, String

# @!attribute active_members_count
# The total active members of the affiliate
#
# @return [Integer]
required :active_members_count, Integer

# @!attribute company
# The company attached to this affiliate
#
# @return [WhopSDK::Models::Affiliate::Company]
required :company, -> { WhopSDK::Affiliate::Company }

# @!attribute created_at
# The datetime the affiliate was created.
#
# @return [Time]
required :created_at, Time

# @!attribute customer_retention_rate
# How many referrals have remained since they joined as members
#
# @return [String]
required :customer_retention_rate, String

# @!attribute customer_retention_rate_ninety_days
# A rolling 90-day retention rate for this affiliate
#
# @return [String]
required :customer_retention_rate_ninety_days, String

# @!attribute monthly_recurring_revenue_usd
# The total MRR of the affiliate
#
# @return [String]
required :monthly_recurring_revenue_usd, String

# @!attribute status
# Statuses for resources
#
# @return [Symbol, WhopSDK::Models::Status, nil]
required :status, enum: -> { WhopSDK::Status }, nil?: true

# @!attribute total_overrides_count
# The total count of all overrides for this affiliate
#
# @return [Integer]
required :total_overrides_count, Integer

# @!attribute total_referral_earnings_usd
# The total earnings of the affiliate from the users they referred
#
# @return [String]
required :total_referral_earnings_usd, String

# @!attribute total_referrals_count
# The total referrals of the affiliate
#
# @return [Integer]
required :total_referrals_count, Integer

# @!attribute total_revenue_usd
# The total revenue of the affiliate from their referrals
#
# @return [String]
required :total_revenue_usd, String

# @!attribute updated_at
# The datetime the affiliate was last updated.
#
# @return [Time]
required :updated_at, Time

# @!attribute user
# The user attached to this affiliate
#
# @return [WhopSDK::Models::Affiliate::User]
required :user, -> { WhopSDK::Affiliate::User }

# @!method initialize(id:, active_members_count:, company:, created_at:, customer_retention_rate:, customer_retention_rate_ninety_days:, monthly_recurring_revenue_usd:, status:, total_overrides_count:, total_referral_earnings_usd:, total_referrals_count:, total_revenue_usd:, updated_at:, user:)
# An affiliate of a company or a global affiliate
#
# @param id [String] The unique identifier for the affiliate.
#
# @param active_members_count [Integer] The total active members of the affiliate
#
# @param company [WhopSDK::Models::Affiliate::Company] The company attached to this affiliate
#
# @param created_at [Time] The datetime the affiliate was created.
#
# @param customer_retention_rate [String] How many referrals have remained since they joined as members
#
# @param customer_retention_rate_ninety_days [String] A rolling 90-day retention rate for this affiliate
#
# @param monthly_recurring_revenue_usd [String] The total MRR of the affiliate
#
# @param status [Symbol, WhopSDK::Models::Status, nil] Statuses for resources
#
# @param total_overrides_count [Integer] The total count of all overrides for this affiliate
#
# @param total_referral_earnings_usd [String] The total earnings of the affiliate from the users they referred
#
# @param total_referrals_count [Integer] The total referrals of the affiliate
#
# @param total_revenue_usd [String] The total revenue of the affiliate from their referrals
#
# @param updated_at [Time] The datetime the affiliate was last updated.
#
# @param user [WhopSDK::Models::Affiliate::User] The user attached to this affiliate

# @see WhopSDK::Models::Affiliate#company
class Company < WhopSDK::Internal::Type::BaseModel
# @!attribute id
# The unique identifier for the company.
#
# @return [String]
required :id, String

# @!attribute title
# The written name of the company.
#
# @return [String]
required :title, String

# @!method initialize(id:, title:)
# The company attached to this affiliate
#
# @param id [String] The unique identifier for the company.
#
# @param title [String] The written name of the company.
end

# @see WhopSDK::Models::Affiliate#user
class User < WhopSDK::Internal::Type::BaseModel
# @!attribute id
# The unique identifier for the user.
#
# @return [String]
required :id, String

# @!attribute name
# The display name set on the user's Whop profile. Null if the user has not set a
# name.
#
# @return [String, nil]
required :name, String, nil?: true

# @!attribute username
# The unique username chosen by the user for their Whop profile. Null if the user
# has not set a username.
#
# @return [String, nil]
required :username, String, nil?: true

# @!method initialize(id:, name:, username:)
# Some parameter documentations has been truncated, see
# {WhopSDK::Models::Affiliate::User} for more details.
#
# The user attached to this affiliate
#
# @param id [String] The unique identifier for the user.
#
# @param name [String, nil] The display name set on the user's Whop profile. Null if the user has not set a
#
# @param username [String, nil] The unique username chosen by the user for their Whop profile. Null if the user
end
end
end
end
20 changes: 20 additions & 0 deletions lib/whop_sdk/models/affiliate_archive_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

module WhopSDK
module Models
# @see WhopSDK::Resources::Affiliates#archive
class AffiliateArchiveParams < WhopSDK::Internal::Type::BaseModel
extend WhopSDK::Internal::Type::RequestParameters::Converter
include WhopSDK::Internal::Type::RequestParameters

# @!attribute id
#
# @return [String]
required :id, String

# @!method initialize(id:, request_options: {})
# @param id [String]
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
end
end
end
Loading