From 74adc68f5191b01622fa5f8cdde57c8bc42e27ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2026 00:14:07 +0000 Subject: [PATCH 1/7] feat(api): api update --- .stats.yml | 4 +- lib/whop_sdk/models/ai_chat.rb | 25 ++++++++- lib/whop_sdk/models/ai_chat_list_response.rb | 26 +++++++++- lib/whop_sdk/models/ai_chat_update_params.rb | 23 +++++++- lib/whop_sdk/resources/ai_chats.rb | 7 ++- rbi/whop_sdk/models/ai_chat.rbi | 36 +++++++++++++ rbi/whop_sdk/models/ai_chat_list_response.rbi | 52 +++++++++++++++++++ rbi/whop_sdk/models/ai_chat_update_params.rbi | 52 +++++++++++++++++++ rbi/whop_sdk/resources/ai_chats.rbi | 9 +++- sig/whop_sdk/models/ai_chat.rbs | 16 ++++++ sig/whop_sdk/models/ai_chat_list_response.rbs | 16 ++++++ sig/whop_sdk/models/ai_chat_update_params.rbs | 22 +++++++- sig/whop_sdk/resources/ai_chats.rbs | 1 + test/whop_sdk/resources/ai_chats_test.rb | 4 ++ 14 files changed, 284 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index d46615ab..de832b9d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-68099e376d518fbf1facf7d4af9b98a95bb1f812537b6723ddbe3fd47108a1ef.yml +openapi_spec_hash: a819ffd8f003b6f8b556936a9172e4fe config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9 diff --git a/lib/whop_sdk/models/ai_chat.rb b/lib/whop_sdk/models/ai_chat.rb index f0ff15b3..529d66d8 100644 --- a/lib/whop_sdk/models/ai_chat.rb +++ b/lib/whop_sdk/models/ai_chat.rb @@ -35,6 +35,13 @@ class AIChat < WhopSDK::Internal::Type::BaseModel # @return [Integer] required :message_count, Integer + # @!attribute notification_preference + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + # + # @return [Symbol, WhopSDK::Models::AIChat::NotificationPreference] + required :notification_preference, enum: -> { WhopSDK::AIChat::NotificationPreference } + # @!attribute title # A short descriptive title for this AI chat conversation. Null if no title has # been set. @@ -54,7 +61,7 @@ class AIChat < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::AIChat::User] required :user, -> { WhopSDK::AIChat::User } - # @!method initialize(id:, blended_token_usage:, created_at:, last_message_at:, message_count:, title:, updated_at:, user:) + # @!method initialize(id:, blended_token_usage:, created_at:, last_message_at:, message_count:, notification_preference:, title:, updated_at:, user:) # Some parameter documentations has been truncated, see {WhopSDK::Models::AIChat} # for more details. # @@ -71,12 +78,28 @@ class AIChat < WhopSDK::Internal::Type::BaseModel # # @param message_count [Integer] The total number of messages exchanged in this conversation. # + # @param notification_preference [Symbol, WhopSDK::Models::AIChat::NotificationPreference] The notification preference for this AI chat. `all` delivers AI chat notificatio + # # @param title [String, nil] A short descriptive title for this AI chat conversation. Null if no title has be # # @param updated_at [Time] The datetime the ai chat was last updated. # # @param user [WhopSDK::Models::AIChat::User] The user who owns this AI chat conversation. + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + # + # @see WhopSDK::Models::AIChat#notification_preference + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + ALL = :all + NONE = :none + + # @!method self.values + # @return [Array] + end + # @see WhopSDK::Models::AIChat#user class User < WhopSDK::Internal::Type::BaseModel # @!attribute id diff --git a/lib/whop_sdk/models/ai_chat_list_response.rb b/lib/whop_sdk/models/ai_chat_list_response.rb index 459a6188..61c2dcbe 100644 --- a/lib/whop_sdk/models/ai_chat_list_response.rb +++ b/lib/whop_sdk/models/ai_chat_list_response.rb @@ -35,6 +35,14 @@ class AIChatListResponse < WhopSDK::Internal::Type::BaseModel # @return [Integer] required :message_count, Integer + # @!attribute notification_preference + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + # + # @return [Symbol, WhopSDK::Models::AIChatListResponse::NotificationPreference] + required :notification_preference, + enum: -> { WhopSDK::Models::AIChatListResponse::NotificationPreference } + # @!attribute title # A short descriptive title for this AI chat conversation. Null if no title has # been set. @@ -54,7 +62,7 @@ class AIChatListResponse < WhopSDK::Internal::Type::BaseModel # @return [WhopSDK::Models::AIChatListResponse::User] required :user, -> { WhopSDK::Models::AIChatListResponse::User } - # @!method initialize(id:, blended_token_usage:, created_at:, last_message_at:, message_count:, title:, updated_at:, user:) + # @!method initialize(id:, blended_token_usage:, created_at:, last_message_at:, message_count:, notification_preference:, title:, updated_at:, user:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::AIChatListResponse} for more details. # @@ -71,12 +79,28 @@ class AIChatListResponse < WhopSDK::Internal::Type::BaseModel # # @param message_count [Integer] The total number of messages exchanged in this conversation. # + # @param notification_preference [Symbol, WhopSDK::Models::AIChatListResponse::NotificationPreference] The notification preference for this AI chat. `all` delivers AI chat notificatio + # # @param title [String, nil] A short descriptive title for this AI chat conversation. Null if no title has be # # @param updated_at [Time] The datetime the ai chat was last updated. # # @param user [WhopSDK::Models::AIChatListResponse::User] The user who owns this AI chat conversation. + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + # + # @see WhopSDK::Models::AIChatListResponse#notification_preference + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + ALL = :all + NONE = :none + + # @!method self.values + # @return [Array] + end + # @see WhopSDK::Models::AIChatListResponse#user class User < WhopSDK::Internal::Type::BaseModel # @!attribute id diff --git a/lib/whop_sdk/models/ai_chat_update_params.rb b/lib/whop_sdk/models/ai_chat_update_params.rb index 070b05a3..3c0f344f 100644 --- a/lib/whop_sdk/models/ai_chat_update_params.rb +++ b/lib/whop_sdk/models/ai_chat_update_params.rb @@ -19,13 +19,21 @@ class AIChatUpdateParams < WhopSDK::Internal::Type::BaseModel # @return [String, nil] optional :current_company_id, String, nil?: true + # @!attribute notification_preference + # The notification preference for an AI chat + # + # @return [Symbol, WhopSDK::Models::AIChatUpdateParams::NotificationPreference, nil] + optional :notification_preference, + enum: -> { WhopSDK::AIChatUpdateParams::NotificationPreference }, + nil?: true + # @!attribute title # The new display title for the AI chat thread (e.g., "Help with billing"). # # @return [String, nil] optional :title, String, nil?: true - # @!method initialize(id:, current_company_id: nil, title: nil, request_options: {}) + # @!method initialize(id:, current_company_id: nil, notification_preference: nil, title: nil, request_options: {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::AIChatUpdateParams} for more details. # @@ -33,9 +41,22 @@ class AIChatUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param current_company_id [String, nil] The unique identifier of the company to set as context for the AI chat (e.g., "b # + # @param notification_preference [Symbol, WhopSDK::Models::AIChatUpdateParams::NotificationPreference, nil] The notification preference for an AI chat + # # @param title [String, nil] The new display title for the AI chat thread (e.g., "Help with billing"). # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # The notification preference for an AI chat + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + ALL = :all + NONE = :none + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/whop_sdk/resources/ai_chats.rb b/lib/whop_sdk/resources/ai_chats.rb index d22cb22a..4fa9fe56 100644 --- a/lib/whop_sdk/resources/ai_chats.rb +++ b/lib/whop_sdk/resources/ai_chats.rb @@ -66,18 +66,21 @@ def retrieve(id, params = {}) # Some parameter documentations has been truncated, see # {WhopSDK::Models::AIChatUpdateParams} for more details. # - # Update an AI chat's title or associated company context. + # Update an AI chat's title, notification preferences, or associated company + # context. # # Required permissions: # # - `ai_chat:update` # - # @overload update(id, current_company_id: nil, title: nil, request_options: {}) + # @overload update(id, current_company_id: nil, notification_preference: nil, title: nil, request_options: {}) # # @param id [String] The unique identifier of the AI chat to update (e.g., "ai_chat_XXXXX"). # # @param current_company_id [String, nil] The unique identifier of the company to set as context for the AI chat (e.g., "b # + # @param notification_preference [Symbol, WhopSDK::Models::AIChatUpdateParams::NotificationPreference, nil] The notification preference for an AI chat + # # @param title [String, nil] The new display title for the AI chat thread (e.g., "Help with billing"). # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] diff --git a/rbi/whop_sdk/models/ai_chat.rbi b/rbi/whop_sdk/models/ai_chat.rbi index df02679b..728c6339 100644 --- a/rbi/whop_sdk/models/ai_chat.rbi +++ b/rbi/whop_sdk/models/ai_chat.rbi @@ -27,6 +27,11 @@ module WhopSDK sig { returns(Integer) } attr_accessor :message_count + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + sig { returns(WhopSDK::AIChat::NotificationPreference::TaggedSymbol) } + attr_accessor :notification_preference + # A short descriptive title for this AI chat conversation. Null if no title has # been set. sig { returns(T.nilable(String)) } @@ -52,6 +57,8 @@ module WhopSDK created_at: Time, last_message_at: T.nilable(Time), message_count: Integer, + notification_preference: + WhopSDK::AIChat::NotificationPreference::OrSymbol, title: T.nilable(String), updated_at: Time, user: WhopSDK::AIChat::User::OrHash @@ -69,6 +76,9 @@ module WhopSDK last_message_at:, # The total number of messages exchanged in this conversation. message_count:, + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + notification_preference:, # A short descriptive title for this AI chat conversation. Null if no title has # been set. title:, @@ -87,6 +97,8 @@ module WhopSDK created_at: Time, last_message_at: T.nilable(Time), message_count: Integer, + notification_preference: + WhopSDK::AIChat::NotificationPreference::TaggedSymbol, title: T.nilable(String), updated_at: Time, user: WhopSDK::AIChat::User @@ -96,6 +108,30 @@ module WhopSDK def to_hash end + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AIChat::NotificationPreference) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ALL = T.let(:all, WhopSDK::AIChat::NotificationPreference::TaggedSymbol) + NONE = + T.let(:none, WhopSDK::AIChat::NotificationPreference::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::AIChat::NotificationPreference::TaggedSymbol] + ) + end + def self.values + end + end + class User < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/whop_sdk/models/ai_chat_list_response.rbi b/rbi/whop_sdk/models/ai_chat_list_response.rbi index a750c05a..62562b60 100644 --- a/rbi/whop_sdk/models/ai_chat_list_response.rbi +++ b/rbi/whop_sdk/models/ai_chat_list_response.rbi @@ -29,6 +29,15 @@ module WhopSDK sig { returns(Integer) } attr_accessor :message_count + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + sig do + returns( + WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol + ) + end + attr_accessor :notification_preference + # A short descriptive title for this AI chat conversation. Null if no title has # been set. sig { returns(T.nilable(String)) } @@ -56,6 +65,8 @@ module WhopSDK created_at: Time, last_message_at: T.nilable(Time), message_count: Integer, + notification_preference: + WhopSDK::Models::AIChatListResponse::NotificationPreference::OrSymbol, title: T.nilable(String), updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User::OrHash @@ -73,6 +84,9 @@ module WhopSDK last_message_at:, # The total number of messages exchanged in this conversation. message_count:, + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + notification_preference:, # A short descriptive title for this AI chat conversation. Null if no title has # been set. title:, @@ -91,6 +105,8 @@ module WhopSDK created_at: Time, last_message_at: T.nilable(Time), message_count: Integer, + notification_preference: + WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol, title: T.nilable(String), updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User @@ -100,6 +116,42 @@ module WhopSDK def to_hash end + # The notification preference for this AI chat. `all` delivers AI chat + # notifications and badges, while `none` mutes them. + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + WhopSDK::Models::AIChatListResponse::NotificationPreference + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ALL = + T.let( + :all, + WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol + ) + NONE = + T.let( + :none, + WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol + ] + ) + end + def self.values + end + end + class User < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/whop_sdk/models/ai_chat_update_params.rbi b/rbi/whop_sdk/models/ai_chat_update_params.rbi index 1cb20e2c..f7dd76fc 100644 --- a/rbi/whop_sdk/models/ai_chat_update_params.rbi +++ b/rbi/whop_sdk/models/ai_chat_update_params.rbi @@ -19,6 +19,16 @@ module WhopSDK sig { returns(T.nilable(String)) } attr_accessor :current_company_id + # The notification preference for an AI chat + sig do + returns( + T.nilable( + WhopSDK::AIChatUpdateParams::NotificationPreference::OrSymbol + ) + ) + end + attr_accessor :notification_preference + # The new display title for the AI chat thread (e.g., "Help with billing"). sig { returns(T.nilable(String)) } attr_accessor :title @@ -27,6 +37,10 @@ module WhopSDK params( id: String, current_company_id: T.nilable(String), + notification_preference: + T.nilable( + WhopSDK::AIChatUpdateParams::NotificationPreference::OrSymbol + ), title: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) @@ -36,6 +50,8 @@ module WhopSDK # The unique identifier of the company to set as context for the AI chat (e.g., # "biz_XXXXX"). current_company_id: nil, + # The notification preference for an AI chat + notification_preference: nil, # The new display title for the AI chat thread (e.g., "Help with billing"). title: nil, request_options: {} @@ -47,6 +63,10 @@ module WhopSDK { id: String, current_company_id: T.nilable(String), + notification_preference: + T.nilable( + WhopSDK::AIChatUpdateParams::NotificationPreference::OrSymbol + ), title: T.nilable(String), request_options: WhopSDK::RequestOptions } @@ -54,6 +74,38 @@ module WhopSDK end def to_hash end + + # The notification preference for an AI chat + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::AIChatUpdateParams::NotificationPreference) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ALL = + T.let( + :all, + WhopSDK::AIChatUpdateParams::NotificationPreference::TaggedSymbol + ) + NONE = + T.let( + :none, + WhopSDK::AIChatUpdateParams::NotificationPreference::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::AIChatUpdateParams::NotificationPreference::TaggedSymbol + ] + ) + end + def self.values + end + end end end end diff --git a/rbi/whop_sdk/resources/ai_chats.rbi b/rbi/whop_sdk/resources/ai_chats.rbi index fa0b15a7..99340e61 100644 --- a/rbi/whop_sdk/resources/ai_chats.rbi +++ b/rbi/whop_sdk/resources/ai_chats.rbi @@ -58,7 +58,8 @@ module WhopSDK ) end - # Update an AI chat's title or associated company context. + # Update an AI chat's title, notification preferences, or associated company + # context. # # Required permissions: # @@ -67,6 +68,10 @@ module WhopSDK params( id: String, current_company_id: T.nilable(String), + notification_preference: + T.nilable( + WhopSDK::AIChatUpdateParams::NotificationPreference::OrSymbol + ), title: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::AIChat) @@ -77,6 +82,8 @@ module WhopSDK # The unique identifier of the company to set as context for the AI chat (e.g., # "biz_XXXXX"). current_company_id: nil, + # The notification preference for an AI chat + notification_preference: nil, # The new display title for the AI chat thread (e.g., "Help with billing"). title: nil, request_options: {} diff --git a/sig/whop_sdk/models/ai_chat.rbs b/sig/whop_sdk/models/ai_chat.rbs index 38021cbf..e8f59f06 100644 --- a/sig/whop_sdk/models/ai_chat.rbs +++ b/sig/whop_sdk/models/ai_chat.rbs @@ -7,6 +7,7 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, + notification_preference: WhopSDK::Models::AIChat::notification_preference, title: String?, updated_at: Time, user: WhopSDK::AIChat::User @@ -23,6 +24,8 @@ module WhopSDK attr_accessor message_count: Integer + attr_accessor notification_preference: WhopSDK::Models::AIChat::notification_preference + attr_accessor title: String? attr_accessor updated_at: Time @@ -35,6 +38,7 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, + notification_preference: WhopSDK::Models::AIChat::notification_preference, title: String?, updated_at: Time, user: WhopSDK::AIChat::User @@ -46,11 +50,23 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, + notification_preference: WhopSDK::Models::AIChat::notification_preference, title: String?, updated_at: Time, user: WhopSDK::AIChat::User } + type notification_preference = :all | :none + + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + ALL: :all + NONE: :none + + def self?.values: -> ::Array[WhopSDK::Models::AIChat::notification_preference] + end + type user = { id: String } class User < WhopSDK::Internal::Type::BaseModel diff --git a/sig/whop_sdk/models/ai_chat_list_response.rbs b/sig/whop_sdk/models/ai_chat_list_response.rbs index bc14f0df..f2ccf93a 100644 --- a/sig/whop_sdk/models/ai_chat_list_response.rbs +++ b/sig/whop_sdk/models/ai_chat_list_response.rbs @@ -7,6 +7,7 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, + notification_preference: WhopSDK::Models::AIChatListResponse::notification_preference, title: String?, updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User @@ -23,6 +24,8 @@ module WhopSDK attr_accessor message_count: Integer + attr_accessor notification_preference: WhopSDK::Models::AIChatListResponse::notification_preference + attr_accessor title: String? attr_accessor updated_at: Time @@ -35,6 +38,7 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, + notification_preference: WhopSDK::Models::AIChatListResponse::notification_preference, title: String?, updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User @@ -46,11 +50,23 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, + notification_preference: WhopSDK::Models::AIChatListResponse::notification_preference, title: String?, updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User } + type notification_preference = :all | :none + + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + ALL: :all + NONE: :none + + def self?.values: -> ::Array[WhopSDK::Models::AIChatListResponse::notification_preference] + end + type user = { id: String } class User < WhopSDK::Internal::Type::BaseModel diff --git a/sig/whop_sdk/models/ai_chat_update_params.rbs b/sig/whop_sdk/models/ai_chat_update_params.rbs index 566a43a4..c29b74a7 100644 --- a/sig/whop_sdk/models/ai_chat_update_params.rbs +++ b/sig/whop_sdk/models/ai_chat_update_params.rbs @@ -1,7 +1,12 @@ module WhopSDK module Models type ai_chat_update_params = - { id: String, current_company_id: String?, title: String? } + { + id: String, + current_company_id: String?, + notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference?, + title: String? + } & WhopSDK::Internal::Type::request_parameters class AIChatUpdateParams < WhopSDK::Internal::Type::BaseModel @@ -12,11 +17,14 @@ module WhopSDK attr_accessor current_company_id: String? + attr_accessor notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference? + attr_accessor title: String? def initialize: ( id: String, ?current_company_id: String?, + ?notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference?, ?title: String?, ?request_options: WhopSDK::request_opts ) -> void @@ -24,9 +32,21 @@ module WhopSDK def to_hash: -> { id: String, current_company_id: String?, + notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference?, title: String?, request_options: WhopSDK::RequestOptions } + + type notification_preference = :all | :none + + module NotificationPreference + extend WhopSDK::Internal::Type::Enum + + ALL: :all + NONE: :none + + def self?.values: -> ::Array[WhopSDK::Models::AIChatUpdateParams::notification_preference] + end end end end diff --git a/sig/whop_sdk/resources/ai_chats.rbs b/sig/whop_sdk/resources/ai_chats.rbs index 81ccb028..30b859cf 100644 --- a/sig/whop_sdk/resources/ai_chats.rbs +++ b/sig/whop_sdk/resources/ai_chats.rbs @@ -19,6 +19,7 @@ module WhopSDK def update: ( String id, ?current_company_id: String?, + ?notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference?, ?title: String?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::AIChat diff --git a/test/whop_sdk/resources/ai_chats_test.rb b/test/whop_sdk/resources/ai_chats_test.rb index a65318d0..c3a206a0 100644 --- a/test/whop_sdk/resources/ai_chats_test.rb +++ b/test/whop_sdk/resources/ai_chats_test.rb @@ -19,6 +19,7 @@ def test_create_required_params created_at: Time, last_message_at: Time | nil, message_count: Integer, + notification_preference: WhopSDK::AIChat::NotificationPreference, title: String | nil, updated_at: Time, user: WhopSDK::AIChat::User @@ -42,6 +43,7 @@ def test_retrieve created_at: Time, last_message_at: Time | nil, message_count: Integer, + notification_preference: WhopSDK::AIChat::NotificationPreference, title: String | nil, updated_at: Time, user: WhopSDK::AIChat::User @@ -65,6 +67,7 @@ def test_update created_at: Time, last_message_at: Time | nil, message_count: Integer, + notification_preference: WhopSDK::AIChat::NotificationPreference, title: String | nil, updated_at: Time, user: WhopSDK::AIChat::User @@ -95,6 +98,7 @@ def test_list created_at: Time, last_message_at: Time | nil, message_count: Integer, + notification_preference: WhopSDK::Models::AIChatListResponse::NotificationPreference, title: String | nil, updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User From 624451ce95b25a90562c30261d7a1801a480260a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2026 03:14:01 +0000 Subject: [PATCH 2/7] feat(api): api update --- .stats.yml | 4 ++-- lib/whop_sdk/models/card_brands.rb | 1 + lib/whop_sdk/models/payment.rb | 1 + rbi/whop_sdk/models/card_brands.rbi | 1 + rbi/whop_sdk/models/payment.rbi | 5 +++++ sig/whop_sdk/models/card_brands.rbs | 2 ++ sig/whop_sdk/models/payment.rbs | 2 ++ 7 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index de832b9d..c72b4550 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 181 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-68099e376d518fbf1facf7d4af9b98a95bb1f812537b6723ddbe3fd47108a1ef.yml -openapi_spec_hash: a819ffd8f003b6f8b556936a9172e4fe +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-51fe2d63d75f83c0f00def45471fad9e54bc2a7fd96c30174e5b6e8ae9c1d276.yml +openapi_spec_hash: 3193908a280c7d880b22dd21f774c89d config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9 diff --git a/lib/whop_sdk/models/card_brands.rb b/lib/whop_sdk/models/card_brands.rb index 91577d4b..396ea9c6 100644 --- a/lib/whop_sdk/models/card_brands.rb +++ b/lib/whop_sdk/models/card_brands.rb @@ -43,6 +43,7 @@ module CardBrands CODENSA = :codensa CABAL = :cabal HIPERCARD = :hipercard + JCBLANKAPAY = :jcblankapay UNKNOWN = :unknown # @!method self.values diff --git a/lib/whop_sdk/models/payment.rb b/lib/whop_sdk/models/payment.rb index db660df1..cd357196 100644 --- a/lib/whop_sdk/models/payment.rb +++ b/lib/whop_sdk/models/payment.rb @@ -670,6 +670,7 @@ module TransactionType CANCEL = :cancel VERIFY = :verify CHARGEBACK = :chargeback + PRE_CHARGEBACK = :pre_chargeback THREE_D_SECURE = :three_d_secure FRAUD_SCREENING = :fraud_screening AUTHORIZATION = :authorization diff --git a/rbi/whop_sdk/models/card_brands.rbi b/rbi/whop_sdk/models/card_brands.rbi index bb8b1d7a..e9b9950c 100644 --- a/rbi/whop_sdk/models/card_brands.rbi +++ b/rbi/whop_sdk/models/card_brands.rbi @@ -49,6 +49,7 @@ module WhopSDK CODENSA = T.let(:codensa, WhopSDK::CardBrands::TaggedSymbol) CABAL = T.let(:cabal, WhopSDK::CardBrands::TaggedSymbol) HIPERCARD = T.let(:hipercard, WhopSDK::CardBrands::TaggedSymbol) + JCBLANKAPAY = T.let(:jcblankapay, 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/payment.rbi b/rbi/whop_sdk/models/payment.rbi index 558f9f7f..7b4a77d6 100644 --- a/rbi/whop_sdk/models/payment.rbi +++ b/rbi/whop_sdk/models/payment.rbi @@ -934,6 +934,11 @@ module WhopSDK :chargeback, WhopSDK::Payment::FinancingTransaction::TransactionType::TaggedSymbol ) + PRE_CHARGEBACK = + T.let( + :pre_chargeback, + WhopSDK::Payment::FinancingTransaction::TransactionType::TaggedSymbol + ) THREE_D_SECURE = T.let( :three_d_secure, diff --git a/sig/whop_sdk/models/card_brands.rbs b/sig/whop_sdk/models/card_brands.rbs index abcdba26..99baa173 100644 --- a/sig/whop_sdk/models/card_brands.rbs +++ b/sig/whop_sdk/models/card_brands.rbs @@ -38,6 +38,7 @@ module WhopSDK | :codensa | :cabal | :hipercard + | :jcblankapay | :unknown module CardBrands @@ -80,6 +81,7 @@ module WhopSDK CODENSA: :codensa CABAL: :cabal HIPERCARD: :hipercard + JCBLANKAPAY: :jcblankapay UNKNOWN: :unknown def self?.values: -> ::Array[WhopSDK::Models::card_brands] diff --git a/sig/whop_sdk/models/payment.rbs b/sig/whop_sdk/models/payment.rbs index 5b06118f..6050cd58 100644 --- a/sig/whop_sdk/models/payment.rbs +++ b/sig/whop_sdk/models/payment.rbs @@ -454,6 +454,7 @@ module WhopSDK | :cancel | :verify | :chargeback + | :pre_chargeback | :three_d_secure | :fraud_screening | :authorization @@ -469,6 +470,7 @@ module WhopSDK CANCEL: :cancel VERIFY: :verify CHARGEBACK: :chargeback + PRE_CHARGEBACK: :pre_chargeback THREE_D_SECURE: :three_d_secure FRAUD_SCREENING: :fraud_screening AUTHORIZATION: :authorization From 2a05f143df7f46588438bd0233e3c65985831bf2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 15 Mar 2026 19:13:47 +0000 Subject: [PATCH 3/7] feat(api): api update --- .stats.yml | 4 +- lib/whop_sdk/models/setup_intent.rb | 72 ++++++++++- .../models/setup_intent_list_response.rb | 74 +++++++++++- rbi/whop_sdk/models/setup_intent.rbi | 110 +++++++++++++++++ .../models/setup_intent_list_response.rbi | 114 ++++++++++++++++++ sig/whop_sdk/models/setup_intent.rbs | 52 ++++++++ .../models/setup_intent_list_response.rbs | 52 ++++++++ 7 files changed, 474 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index c72b4550..aaf77feb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 181 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-51fe2d63d75f83c0f00def45471fad9e54bc2a7fd96c30174e5b6e8ae9c1d276.yml -openapi_spec_hash: 3193908a280c7d880b22dd21f774c89d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-7f93e43332a2af6e92fec487446e4f8afef27be239763689838b85e0f2d64b5e.yml +openapi_spec_hash: 0240dc8a4d84e0941c2fa7f3e23a2038 config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9 diff --git a/lib/whop_sdk/models/setup_intent.rb b/lib/whop_sdk/models/setup_intent.rb index 38a492ae..b84170a9 100644 --- a/lib/whop_sdk/models/setup_intent.rb +++ b/lib/whop_sdk/models/setup_intent.rb @@ -200,13 +200,19 @@ class PaymentMethod < WhopSDK::Internal::Type::BaseModel # @return [Time] required :created_at, Time + # @!attribute mailing_address + # The mailing address associated with the payment method's user + # + # @return [WhopSDK::Models::SetupIntent::PaymentMethod::MailingAddress, nil] + required :mailing_address, -> { WhopSDK::SetupIntent::PaymentMethod::MailingAddress }, nil?: true + # @!attribute payment_method_type # The payment method type of the payment method # # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } - # @!method initialize(id:, card:, created_at:, payment_method_type:) + # @!method initialize(id:, card:, created_at:, mailing_address:, payment_method_type:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::SetupIntent::PaymentMethod} for more details. # @@ -219,6 +225,8 @@ class PaymentMethod < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment token was created. # + # @param mailing_address [WhopSDK::Models::SetupIntent::PaymentMethod::MailingAddress, nil] The mailing address associated with the payment method's user + # # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method # @see WhopSDK::Models::SetupIntent::PaymentMethod#card @@ -262,6 +270,68 @@ class Card < WhopSDK::Internal::Type::BaseModel # # @param last4 [String, nil] The last four digits of the card number. Null if not available. end + + # @see WhopSDK::Models::SetupIntent::PaymentMethod#mailing_address + class MailingAddress < WhopSDK::Internal::Type::BaseModel + # @!attribute city + # The city of the address. + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # The country of the address. + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute line1 + # The line 1 of the address. + # + # @return [String, nil] + required :line1, String, nil?: true + + # @!attribute line2 + # The line 2 of the address. + # + # @return [String, nil] + required :line2, String, nil?: true + + # @!attribute name + # The name of the customer. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute postal_code + # The postal code of the address. + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # The state of the address. + # + # @return [String, nil] + required :state, String, nil?: true + + # @!method initialize(city:, country:, line1:, line2:, name:, postal_code:, state:) + # The mailing address associated with the payment method's user + # + # @param city [String, nil] The city of the address. + # + # @param country [String, nil] The country of the address. + # + # @param line1 [String, nil] The line 1 of the address. + # + # @param line2 [String, nil] The line 2 of the address. + # + # @param name [String, nil] The name of the customer. + # + # @param postal_code [String, nil] The postal code of the address. + # + # @param state [String, nil] The state of the address. + end end end end diff --git a/lib/whop_sdk/models/setup_intent_list_response.rb b/lib/whop_sdk/models/setup_intent_list_response.rb index 8a1c6f13..d694c1c2 100644 --- a/lib/whop_sdk/models/setup_intent_list_response.rb +++ b/lib/whop_sdk/models/setup_intent_list_response.rb @@ -202,13 +202,21 @@ class PaymentMethod < WhopSDK::Internal::Type::BaseModel # @return [Time] required :created_at, Time + # @!attribute mailing_address + # The mailing address associated with the payment method's user + # + # @return [WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress, nil] + required :mailing_address, + -> { WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress }, + nil?: true + # @!attribute payment_method_type # The payment method type of the payment method # # @return [Symbol, WhopSDK::Models::PaymentMethodTypes] required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes } - # @!method initialize(id:, card:, created_at:, payment_method_type:) + # @!method initialize(id:, card:, created_at:, mailing_address:, payment_method_type:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::SetupIntentListResponse::PaymentMethod} for more details. # @@ -221,6 +229,8 @@ class PaymentMethod < WhopSDK::Internal::Type::BaseModel # # @param created_at [Time] The datetime the payment token was created. # + # @param mailing_address [WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress, nil] The mailing address associated with the payment method's user + # # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method # @see WhopSDK::Models::SetupIntentListResponse::PaymentMethod#card @@ -265,6 +275,68 @@ class Card < WhopSDK::Internal::Type::BaseModel # # @param last4 [String, nil] The last four digits of the card number. Null if not available. end + + # @see WhopSDK::Models::SetupIntentListResponse::PaymentMethod#mailing_address + class MailingAddress < WhopSDK::Internal::Type::BaseModel + # @!attribute city + # The city of the address. + # + # @return [String, nil] + required :city, String, nil?: true + + # @!attribute country + # The country of the address. + # + # @return [String, nil] + required :country, String, nil?: true + + # @!attribute line1 + # The line 1 of the address. + # + # @return [String, nil] + required :line1, String, nil?: true + + # @!attribute line2 + # The line 2 of the address. + # + # @return [String, nil] + required :line2, String, nil?: true + + # @!attribute name + # The name of the customer. + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute postal_code + # The postal code of the address. + # + # @return [String, nil] + required :postal_code, String, nil?: true + + # @!attribute state + # The state of the address. + # + # @return [String, nil] + required :state, String, nil?: true + + # @!method initialize(city:, country:, line1:, line2:, name:, postal_code:, state:) + # The mailing address associated with the payment method's user + # + # @param city [String, nil] The city of the address. + # + # @param country [String, nil] The country of the address. + # + # @param line1 [String, nil] The line 1 of the address. + # + # @param line2 [String, nil] The line 2 of the address. + # + # @param name [String, nil] The name of the customer. + # + # @param postal_code [String, nil] The postal code of the address. + # + # @param state [String, nil] The state of the address. + end end end end diff --git a/rbi/whop_sdk/models/setup_intent.rbi b/rbi/whop_sdk/models/setup_intent.rbi index e95c7a55..95c78073 100644 --- a/rbi/whop_sdk/models/setup_intent.rbi +++ b/rbi/whop_sdk/models/setup_intent.rbi @@ -322,6 +322,24 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at + # The mailing address associated with the payment method's user + sig do + returns( + T.nilable(WhopSDK::SetupIntent::PaymentMethod::MailingAddress) + ) + end + attr_reader :mailing_address + + sig do + params( + mailing_address: + T.nilable( + WhopSDK::SetupIntent::PaymentMethod::MailingAddress::OrHash + ) + ).void + end + attr_writer :mailing_address + # The payment method type of the payment method sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } attr_accessor :payment_method_type @@ -333,6 +351,10 @@ module WhopSDK id: String, card: T.nilable(WhopSDK::SetupIntent::PaymentMethod::Card::OrHash), created_at: Time, + mailing_address: + T.nilable( + WhopSDK::SetupIntent::PaymentMethod::MailingAddress::OrHash + ), payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol ).returns(T.attached_class) end @@ -343,6 +365,8 @@ module WhopSDK card:, # The datetime the payment token was created. created_at:, + # The mailing address associated with the payment method's user + mailing_address:, # The payment method type of the payment method payment_method_type: ) @@ -354,6 +378,8 @@ module WhopSDK id: String, card: T.nilable(WhopSDK::SetupIntent::PaymentMethod::Card), created_at: Time, + mailing_address: + T.nilable(WhopSDK::SetupIntent::PaymentMethod::MailingAddress), payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol } ) @@ -422,6 +448,90 @@ module WhopSDK def to_hash end end + + class MailingAddress < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::SetupIntent::PaymentMethod::MailingAddress, + WhopSDK::Internal::AnyHash + ) + end + + # The city of the address. + sig { returns(T.nilable(String)) } + attr_accessor :city + + # The country of the address. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # The line 1 of the address. + sig { returns(T.nilable(String)) } + attr_accessor :line1 + + # The line 2 of the address. + sig { returns(T.nilable(String)) } + attr_accessor :line2 + + # The name of the customer. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The postal code of the address. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + + # The state of the address. + sig { returns(T.nilable(String)) } + attr_accessor :state + + # The mailing address associated with the payment method's user + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + name: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The city of the address. + city:, + # The country of the address. + country:, + # The line 1 of the address. + line1:, + # The line 2 of the address. + line2:, + # The name of the customer. + name:, + # The postal code of the address. + postal_code:, + # The state of the address. + state: + ) + end + + sig do + override.returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + name: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end end end end diff --git a/rbi/whop_sdk/models/setup_intent_list_response.rbi b/rbi/whop_sdk/models/setup_intent_list_response.rbi index fa6f0b10..2faa5c22 100644 --- a/rbi/whop_sdk/models/setup_intent_list_response.rbi +++ b/rbi/whop_sdk/models/setup_intent_list_response.rbi @@ -397,6 +397,26 @@ module WhopSDK sig { returns(Time) } attr_accessor :created_at + # The mailing address associated with the payment method's user + sig do + returns( + T.nilable( + WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress + ) + ) + end + attr_reader :mailing_address + + sig do + params( + mailing_address: + T.nilable( + WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress::OrHash + ) + ).void + end + attr_writer :mailing_address + # The payment method type of the payment method sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) } attr_accessor :payment_method_type @@ -411,6 +431,10 @@ module WhopSDK WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card::OrHash ), created_at: Time, + mailing_address: + T.nilable( + WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress::OrHash + ), payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol ).returns(T.attached_class) end @@ -421,6 +445,8 @@ module WhopSDK card:, # The datetime the payment token was created. created_at:, + # The mailing address associated with the payment method's user + mailing_address:, # The payment method type of the payment method payment_method_type: ) @@ -435,6 +461,10 @@ module WhopSDK WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card ), created_at: Time, + mailing_address: + T.nilable( + WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress + ), payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol } ) @@ -503,6 +533,90 @@ module WhopSDK def to_hash end end + + class MailingAddress < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress, + WhopSDK::Internal::AnyHash + ) + end + + # The city of the address. + sig { returns(T.nilable(String)) } + attr_accessor :city + + # The country of the address. + sig { returns(T.nilable(String)) } + attr_accessor :country + + # The line 1 of the address. + sig { returns(T.nilable(String)) } + attr_accessor :line1 + + # The line 2 of the address. + sig { returns(T.nilable(String)) } + attr_accessor :line2 + + # The name of the customer. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The postal code of the address. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + + # The state of the address. + sig { returns(T.nilable(String)) } + attr_accessor :state + + # The mailing address associated with the payment method's user + sig do + params( + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + name: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The city of the address. + city:, + # The country of the address. + country:, + # The line 1 of the address. + line1:, + # The line 2 of the address. + line2:, + # The name of the customer. + name:, + # The postal code of the address. + postal_code:, + # The state of the address. + state: + ) + end + + sig do + override.returns( + { + city: T.nilable(String), + country: T.nilable(String), + line1: T.nilable(String), + line2: T.nilable(String), + name: T.nilable(String), + postal_code: T.nilable(String), + state: T.nilable(String) + } + ) + end + def to_hash + end + end end end end diff --git a/sig/whop_sdk/models/setup_intent.rbs b/sig/whop_sdk/models/setup_intent.rbs index c1fe6a97..2eb2fdc6 100644 --- a/sig/whop_sdk/models/setup_intent.rbs +++ b/sig/whop_sdk/models/setup_intent.rbs @@ -126,6 +126,7 @@ module WhopSDK id: String, card: WhopSDK::SetupIntent::PaymentMethod::Card?, created_at: Time, + mailing_address: WhopSDK::SetupIntent::PaymentMethod::MailingAddress?, payment_method_type: WhopSDK::Models::payment_method_types } @@ -136,12 +137,15 @@ module WhopSDK attr_accessor created_at: Time + attr_accessor mailing_address: WhopSDK::SetupIntent::PaymentMethod::MailingAddress? + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types def initialize: ( id: String, card: WhopSDK::SetupIntent::PaymentMethod::Card?, created_at: Time, + mailing_address: WhopSDK::SetupIntent::PaymentMethod::MailingAddress?, payment_method_type: WhopSDK::Models::payment_method_types ) -> void @@ -149,6 +153,7 @@ module WhopSDK id: String, card: WhopSDK::SetupIntent::PaymentMethod::Card?, created_at: Time, + mailing_address: WhopSDK::SetupIntent::PaymentMethod::MailingAddress?, payment_method_type: WhopSDK::Models::payment_method_types } @@ -183,6 +188,53 @@ module WhopSDK :last4 => String? } end + + type mailing_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + name: String?, + postal_code: String?, + state: String? + } + + class MailingAddress < WhopSDK::Internal::Type::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor name: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: ( + city: String?, + country: String?, + line1: String?, + line2: String?, + name: String?, + postal_code: String?, + state: String? + ) -> void + + def to_hash: -> { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + name: String?, + postal_code: String?, + state: String? + } + end end end end diff --git a/sig/whop_sdk/models/setup_intent_list_response.rbs b/sig/whop_sdk/models/setup_intent_list_response.rbs index 3a62fd1d..9d04e451 100644 --- a/sig/whop_sdk/models/setup_intent_list_response.rbs +++ b/sig/whop_sdk/models/setup_intent_list_response.rbs @@ -130,6 +130,7 @@ module WhopSDK id: String, card: WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card?, created_at: Time, + mailing_address: WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress?, payment_method_type: WhopSDK::Models::payment_method_types } @@ -140,12 +141,15 @@ module WhopSDK attr_accessor created_at: Time + attr_accessor mailing_address: WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress? + attr_accessor payment_method_type: WhopSDK::Models::payment_method_types def initialize: ( id: String, card: WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card?, created_at: Time, + mailing_address: WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress?, payment_method_type: WhopSDK::Models::payment_method_types ) -> void @@ -153,6 +157,7 @@ module WhopSDK id: String, card: WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card?, created_at: Time, + mailing_address: WhopSDK::Models::SetupIntentListResponse::PaymentMethod::MailingAddress?, payment_method_type: WhopSDK::Models::payment_method_types } @@ -187,6 +192,53 @@ module WhopSDK :last4 => String? } end + + type mailing_address = + { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + name: String?, + postal_code: String?, + state: String? + } + + class MailingAddress < WhopSDK::Internal::Type::BaseModel + attr_accessor city: String? + + attr_accessor country: String? + + attr_accessor line1: String? + + attr_accessor line2: String? + + attr_accessor name: String? + + attr_accessor postal_code: String? + + attr_accessor state: String? + + def initialize: ( + city: String?, + country: String?, + line1: String?, + line2: String?, + name: String?, + postal_code: String?, + state: String? + ) -> void + + def to_hash: -> { + city: String?, + country: String?, + :line1 => String?, + :line2 => String?, + name: String?, + postal_code: String?, + state: String? + } + end end end end From 26a813830154e9704907af52c2c747af6bdf6a11 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:50:29 +0000 Subject: [PATCH 4/7] chore(internal): tweak CI branches --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c40c69fd..8511dcb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/**' From 4bc5a2e640a72252c9ad871f3ab97cb15bc715fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 03:14:06 +0000 Subject: [PATCH 5/7] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index aaf77feb..d70394c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 181 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-7f93e43332a2af6e92fec487446e4f8afef27be239763689838b85e0f2d64b5e.yml -openapi_spec_hash: 0240dc8a4d84e0941c2fa7f3e23a2038 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-97e920db587b07c064bef1bf31de5e110a3750ddfddc8fca26642e79e6b827f8.yml +openapi_spec_hash: 97ca16cc55271602443a4329d1e02895 config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9 From c6920ab5da4563867990f3c24af2798a15c9211c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 03:20:08 +0000 Subject: [PATCH 6/7] feat(api): manual updates --- .stats.yml | 4 +- lib/whop_sdk.rb | 28 ++ lib/whop_sdk/client.rb | 5 + lib/whop_sdk/models.rb | 18 ++ lib/whop_sdk/models/affiliate.rb | 180 +++++++++++ .../models/affiliate_archive_params.rb | 20 ++ .../models/affiliate_archive_response.rb | 8 + .../models/affiliate_create_params.rb | 30 ++ lib/whop_sdk/models/affiliate_list_params.rb | 99 ++++++ .../models/affiliate_list_response.rb | 180 +++++++++++ .../models/affiliate_retrieve_params.rb | 20 ++ .../models/affiliate_unarchive_params.rb | 20 ++ .../models/affiliate_unarchive_response.rb | 8 + .../affiliate_applies_to_payments.rb | 20 ++ .../affiliate_applies_to_products.rb | 20 ++ .../affiliates/affiliate_override_roles.rb | 20 ++ .../affiliates/affiliate_payout_types.rb | 20 ++ .../affiliates/affiliate_revenue_bases.rb | 20 ++ .../affiliates/override_create_params.rb | 153 ++++++++++ .../affiliates/override_create_response.rb | 121 ++++++++ .../affiliates/override_delete_params.rb | 28 ++ .../affiliates/override_delete_response.rb | 10 + .../models/affiliates/override_list_params.rb | 63 ++++ .../affiliates/override_list_response.rb | 121 ++++++++ .../affiliates/override_retrieve_params.rb | 28 ++ .../affiliates/override_retrieve_response.rb | 121 ++++++++ .../affiliates/override_update_params.rb | 66 ++++ .../affiliates/override_update_response.rb | 121 ++++++++ lib/whop_sdk/models/ai_chat.rb | 20 +- lib/whop_sdk/models/ai_chat_list_response.rb | 21 +- lib/whop_sdk/models/ai_chat_update_params.rb | 19 +- .../models/notification_preferences.rb | 16 + lib/whop_sdk/models/status.rb | 17 ++ lib/whop_sdk/resources/affiliates.rb | 165 ++++++++++ .../resources/affiliates/overrides.rb | 188 ++++++++++++ lib/whop_sdk/resources/ai_chats.rb | 2 +- rbi/whop_sdk/client.rbi | 4 + rbi/whop_sdk/models.rbi | 18 ++ rbi/whop_sdk/models/affiliate.rbi | 224 ++++++++++++++ .../models/affiliate_archive_params.rbi | 35 +++ .../models/affiliate_archive_response.rbi | 8 + .../models/affiliate_create_params.rbi | 51 ++++ rbi/whop_sdk/models/affiliate_list_params.rbi | 138 +++++++++ .../models/affiliate_list_response.rbi | 241 +++++++++++++++ .../models/affiliate_retrieve_params.rbi | 35 +++ .../models/affiliate_unarchive_params.rbi | 35 +++ .../models/affiliate_unarchive_response.rbi | 8 + .../affiliate_applies_to_payments.rbi | 41 +++ .../affiliate_applies_to_products.rbi | 41 +++ .../affiliates/affiliate_override_roles.rbi | 39 +++ .../affiliates/affiliate_payout_types.rbi | 39 +++ .../affiliates/affiliate_revenue_bases.rbi | 39 +++ .../affiliates/override_create_params.rbi | 282 ++++++++++++++++++ .../affiliates/override_create_response.rbi | 171 +++++++++++ .../affiliates/override_delete_params.rbi | 48 +++ .../affiliates/override_delete_response.rbi | 10 + .../affiliates/override_list_params.rbi | 94 ++++++ .../affiliates/override_list_response.rbi | 171 +++++++++++ .../affiliates/override_retrieve_params.rbi | 48 +++ .../affiliates/override_retrieve_response.rbi | 171 +++++++++++ .../affiliates/override_update_params.rbi | 106 +++++++ .../affiliates/override_update_response.rbi | 171 +++++++++++ rbi/whop_sdk/models/ai_chat.rbi | 31 +- rbi/whop_sdk/models/ai_chat_list_response.rbi | 47 +-- rbi/whop_sdk/models/ai_chat_update_params.rbi | 48 +-- .../models/notification_preferences.rbi | 25 ++ rbi/whop_sdk/models/status.rbi | 21 ++ rbi/whop_sdk/resources/affiliates.rbi | 137 +++++++++ .../resources/affiliates/overrides.rbi | 159 ++++++++++ rbi/whop_sdk/resources/ai_chats.rbi | 4 +- sig/whop_sdk/client.rbs | 2 + sig/whop_sdk/models.rbs | 18 ++ sig/whop_sdk/models/affiliate.rbs | 111 +++++++ .../models/affiliate_archive_params.rbs | 20 ++ .../models/affiliate_archive_response.rbs | 5 + .../models/affiliate_create_params.rbs | 28 ++ sig/whop_sdk/models/affiliate_list_params.rbs | 80 +++++ .../models/affiliate_list_response.rbs | 111 +++++++ .../models/affiliate_retrieve_params.rbs | 20 ++ .../models/affiliate_unarchive_params.rbs | 20 ++ .../models/affiliate_unarchive_response.rbs | 5 + .../affiliate_applies_to_payments.rbs | 18 ++ .../affiliate_applies_to_products.rbs | 18 ++ .../affiliates/affiliate_override_roles.rbs | 18 ++ .../affiliates/affiliate_payout_types.rbs | 18 ++ .../affiliates/affiliate_revenue_bases.rbs | 18 ++ .../affiliates/override_create_params.rbs | 127 ++++++++ .../affiliates/override_create_response.rbs | 77 +++++ .../affiliates/override_delete_params.rbs | 30 ++ .../affiliates/override_delete_response.rbs | 7 + .../affiliates/override_list_params.rbs | 53 ++++ .../affiliates/override_list_response.rbs | 77 +++++ .../affiliates/override_retrieve_params.rbs | 30 ++ .../affiliates/override_retrieve_response.rbs | 77 +++++ .../affiliates/override_update_params.rbs | 53 ++++ .../affiliates/override_update_response.rbs | 77 +++++ sig/whop_sdk/models/ai_chat.rbs | 19 +- sig/whop_sdk/models/ai_chat_list_response.rbs | 19 +- sig/whop_sdk/models/ai_chat_update_params.rbs | 19 +- .../models/notification_preferences.rbs | 14 + sig/whop_sdk/models/status.rbs | 15 + sig/whop_sdk/resources/affiliates.rbs | 40 +++ .../resources/affiliates/overrides.rbs | 47 +++ sig/whop_sdk/resources/ai_chats.rbs | 2 +- test/whop_sdk/resource_namespaces.rb | 2 + .../resources/affiliates/overrides_test.rb | 134 +++++++++ test/whop_sdk/resources/affiliates_test.rb | 119 ++++++++ test/whop_sdk/resources/ai_chats_test.rb | 8 +- 108 files changed, 6072 insertions(+), 224 deletions(-) create mode 100644 lib/whop_sdk/models/affiliate.rb create mode 100644 lib/whop_sdk/models/affiliate_archive_params.rb create mode 100644 lib/whop_sdk/models/affiliate_archive_response.rb create mode 100644 lib/whop_sdk/models/affiliate_create_params.rb create mode 100644 lib/whop_sdk/models/affiliate_list_params.rb create mode 100644 lib/whop_sdk/models/affiliate_list_response.rb create mode 100644 lib/whop_sdk/models/affiliate_retrieve_params.rb create mode 100644 lib/whop_sdk/models/affiliate_unarchive_params.rb create mode 100644 lib/whop_sdk/models/affiliate_unarchive_response.rb create mode 100644 lib/whop_sdk/models/affiliates/affiliate_applies_to_payments.rb create mode 100644 lib/whop_sdk/models/affiliates/affiliate_applies_to_products.rb create mode 100644 lib/whop_sdk/models/affiliates/affiliate_override_roles.rb create mode 100644 lib/whop_sdk/models/affiliates/affiliate_payout_types.rb create mode 100644 lib/whop_sdk/models/affiliates/affiliate_revenue_bases.rb create mode 100644 lib/whop_sdk/models/affiliates/override_create_params.rb create mode 100644 lib/whop_sdk/models/affiliates/override_create_response.rb create mode 100644 lib/whop_sdk/models/affiliates/override_delete_params.rb create mode 100644 lib/whop_sdk/models/affiliates/override_delete_response.rb create mode 100644 lib/whop_sdk/models/affiliates/override_list_params.rb create mode 100644 lib/whop_sdk/models/affiliates/override_list_response.rb create mode 100644 lib/whop_sdk/models/affiliates/override_retrieve_params.rb create mode 100644 lib/whop_sdk/models/affiliates/override_retrieve_response.rb create mode 100644 lib/whop_sdk/models/affiliates/override_update_params.rb create mode 100644 lib/whop_sdk/models/affiliates/override_update_response.rb create mode 100644 lib/whop_sdk/models/notification_preferences.rb create mode 100644 lib/whop_sdk/models/status.rb create mode 100644 lib/whop_sdk/resources/affiliates.rb create mode 100644 lib/whop_sdk/resources/affiliates/overrides.rb create mode 100644 rbi/whop_sdk/models/affiliate.rbi create mode 100644 rbi/whop_sdk/models/affiliate_archive_params.rbi create mode 100644 rbi/whop_sdk/models/affiliate_archive_response.rbi create mode 100644 rbi/whop_sdk/models/affiliate_create_params.rbi create mode 100644 rbi/whop_sdk/models/affiliate_list_params.rbi create mode 100644 rbi/whop_sdk/models/affiliate_list_response.rbi create mode 100644 rbi/whop_sdk/models/affiliate_retrieve_params.rbi create mode 100644 rbi/whop_sdk/models/affiliate_unarchive_params.rbi create mode 100644 rbi/whop_sdk/models/affiliate_unarchive_response.rbi create mode 100644 rbi/whop_sdk/models/affiliates/affiliate_applies_to_payments.rbi create mode 100644 rbi/whop_sdk/models/affiliates/affiliate_applies_to_products.rbi create mode 100644 rbi/whop_sdk/models/affiliates/affiliate_override_roles.rbi create mode 100644 rbi/whop_sdk/models/affiliates/affiliate_payout_types.rbi create mode 100644 rbi/whop_sdk/models/affiliates/affiliate_revenue_bases.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_create_params.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_create_response.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_delete_params.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_delete_response.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_list_params.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_list_response.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_retrieve_params.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_retrieve_response.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_update_params.rbi create mode 100644 rbi/whop_sdk/models/affiliates/override_update_response.rbi create mode 100644 rbi/whop_sdk/models/notification_preferences.rbi create mode 100644 rbi/whop_sdk/models/status.rbi create mode 100644 rbi/whop_sdk/resources/affiliates.rbi create mode 100644 rbi/whop_sdk/resources/affiliates/overrides.rbi create mode 100644 sig/whop_sdk/models/affiliate.rbs create mode 100644 sig/whop_sdk/models/affiliate_archive_params.rbs create mode 100644 sig/whop_sdk/models/affiliate_archive_response.rbs create mode 100644 sig/whop_sdk/models/affiliate_create_params.rbs create mode 100644 sig/whop_sdk/models/affiliate_list_params.rbs create mode 100644 sig/whop_sdk/models/affiliate_list_response.rbs create mode 100644 sig/whop_sdk/models/affiliate_retrieve_params.rbs create mode 100644 sig/whop_sdk/models/affiliate_unarchive_params.rbs create mode 100644 sig/whop_sdk/models/affiliate_unarchive_response.rbs create mode 100644 sig/whop_sdk/models/affiliates/affiliate_applies_to_payments.rbs create mode 100644 sig/whop_sdk/models/affiliates/affiliate_applies_to_products.rbs create mode 100644 sig/whop_sdk/models/affiliates/affiliate_override_roles.rbs create mode 100644 sig/whop_sdk/models/affiliates/affiliate_payout_types.rbs create mode 100644 sig/whop_sdk/models/affiliates/affiliate_revenue_bases.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_create_params.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_create_response.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_delete_params.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_delete_response.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_list_params.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_list_response.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_retrieve_params.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_retrieve_response.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_update_params.rbs create mode 100644 sig/whop_sdk/models/affiliates/override_update_response.rbs create mode 100644 sig/whop_sdk/models/notification_preferences.rbs create mode 100644 sig/whop_sdk/models/status.rbs create mode 100644 sig/whop_sdk/resources/affiliates.rbs create mode 100644 sig/whop_sdk/resources/affiliates/overrides.rbs create mode 100644 test/whop_sdk/resources/affiliates/overrides_test.rb create mode 100644 test/whop_sdk/resources/affiliates_test.rb diff --git a/.stats.yml b/.stats.yml index d70394c7..c2e464bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 181 +configured_endpoints: 191 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-97e920db587b07c064bef1bf31de5e110a3750ddfddc8fca26642e79e6b827f8.yml openapi_spec_hash: 97ca16cc55271602443a4329d1e02895 -config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9 +config_hash: 1a836d20bb988f001cc66d1526f71306 diff --git a/lib/whop_sdk.rb b/lib/whop_sdk.rb index 7855786b..229fe7a0 100644 --- a/lib/whop_sdk.rb +++ b/lib/whop_sdk.rb @@ -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" @@ -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" @@ -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" @@ -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" diff --git a/lib/whop_sdk/client.rb b/lib/whop_sdk/client.rb index 7f2898f4..a97e2b00 100644 --- a/lib/whop_sdk/client.rb +++ b/lib/whop_sdk/client.rb @@ -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}] @@ -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 diff --git a/lib/whop_sdk/models.rb b/lib/whop_sdk/models.rb index c3bb9137..f3506179 100644 --- a/lib/whop_sdk/models.rb +++ b/lib/whop_sdk/models.rb @@ -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 @@ -437,6 +451,8 @@ module WhopSDK NotificationCreateParams = WhopSDK::Models::NotificationCreateParams + NotificationPreferences = WhopSDK::Models::NotificationPreferences + PageInfo = WhopSDK::Models::PageInfo Payment = WhopSDK::Models::Payment @@ -609,6 +625,8 @@ module WhopSDK SocialLinkWebsites = WhopSDK::Models::SocialLinkWebsites + Status = WhopSDK::Models::Status + SupportChannel = WhopSDK::Models::SupportChannel SupportChannelCreateParams = WhopSDK::Models::SupportChannelCreateParams diff --git a/lib/whop_sdk/models/affiliate.rb b/lib/whop_sdk/models/affiliate.rb new file mode 100644 index 00000000..4a965873 --- /dev/null +++ b/lib/whop_sdk/models/affiliate.rb @@ -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 diff --git a/lib/whop_sdk/models/affiliate_archive_params.rb b/lib/whop_sdk/models/affiliate_archive_params.rb new file mode 100644 index 00000000..cd43b75d --- /dev/null +++ b/lib/whop_sdk/models/affiliate_archive_params.rb @@ -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 diff --git a/lib/whop_sdk/models/affiliate_archive_response.rb b/lib/whop_sdk/models/affiliate_archive_response.rb new file mode 100644 index 00000000..3dadaeb2 --- /dev/null +++ b/lib/whop_sdk/models/affiliate_archive_response.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @type [WhopSDK::Internal::Type::Converter] + AffiliateArchiveResponse = WhopSDK::Internal::Type::Boolean + end +end diff --git a/lib/whop_sdk/models/affiliate_create_params.rb b/lib/whop_sdk/models/affiliate_create_params.rb new file mode 100644 index 00000000..2c5dc2d5 --- /dev/null +++ b/lib/whop_sdk/models/affiliate_create_params.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Affiliates#create + class AffiliateCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute company_id + # The ID of the company to create the affiliate for. + # + # @return [String] + required :company_id, String + + # @!attribute user_identifier + # The user identifier (username, email, user ID, or Discord ID). + # + # @return [String] + required :user_identifier, String + + # @!method initialize(company_id:, user_identifier:, request_options: {}) + # @param company_id [String] The ID of the company to create the affiliate for. + # + # @param user_identifier [String] The user identifier (username, email, user ID, or Discord ID). + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/affiliate_list_params.rb b/lib/whop_sdk/models/affiliate_list_params.rb new file mode 100644 index 00000000..3a658c6d --- /dev/null +++ b/lib/whop_sdk/models/affiliate_list_params.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Affiliates#list + class AffiliateListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute company_id + # The unique identifier of the company to list affiliates for. + # + # @return [String] + required :company_id, String + + # @!attribute after + # Returns the elements in the list that come after the specified cursor. + # + # @return [String, nil] + optional :after, String, nil?: true + + # @!attribute before + # Returns the elements in the list that come before the specified cursor. + # + # @return [String, nil] + optional :before, String, nil?: true + + # @!attribute direction + # The direction of the sort. + # + # @return [Symbol, WhopSDK::Models::Direction, nil] + optional :direction, enum: -> { WhopSDK::Direction }, nil?: true + + # @!attribute first + # Returns the first _n_ elements from the list. + # + # @return [Integer, nil] + optional :first, Integer, nil?: true + + # @!attribute last + # Returns the last _n_ elements from the list. + # + # @return [Integer, nil] + optional :last, Integer, nil?: true + + # @!attribute order + # Which columns can be used to sort. + # + # @return [Symbol, WhopSDK::Models::AffiliateListParams::Order, nil] + optional :order, enum: -> { WhopSDK::AffiliateListParams::Order }, nil?: true + + # @!attribute query + # Search affiliates by username. + # + # @return [String, nil] + optional :query, String, nil?: true + + # @!attribute status + # Statuses for resources + # + # @return [Symbol, WhopSDK::Models::Status, nil] + optional :status, enum: -> { WhopSDK::Status }, nil?: true + + # @!method initialize(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, order: nil, query: nil, status: nil, request_options: {}) + # @param company_id [String] The unique identifier of the company to list affiliates for. + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param order [Symbol, WhopSDK::Models::AffiliateListParams::Order, nil] Which columns can be used to sort. + # + # @param query [String, nil] Search affiliates by username. + # + # @param status [Symbol, WhopSDK::Models::Status, nil] Statuses for resources + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # Which columns can be used to sort. + module Order + extend WhopSDK::Internal::Type::Enum + + ID = :id + CREATED_AT = :created_at + CACHED_TOTAL_REFERRALS = :cached_total_referrals + CACHED_TOTAL_REWARDS = :cached_total_rewards + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/whop_sdk/models/affiliate_list_response.rb b/lib/whop_sdk/models/affiliate_list_response.rb new file mode 100644 index 00000000..1968ec5a --- /dev/null +++ b/lib/whop_sdk/models/affiliate_list_response.rb @@ -0,0 +1,180 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Affiliates#list + class AffiliateListResponse < 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::AffiliateListResponse::Company] + required :company, -> { WhopSDK::Models::AffiliateListResponse::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::AffiliateListResponse::User] + required :user, -> { WhopSDK::Models::AffiliateListResponse::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::AffiliateListResponse::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::AffiliateListResponse::User] The user attached to this affiliate + + # @see WhopSDK::Models::AffiliateListResponse#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::AffiliateListResponse#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::AffiliateListResponse::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 diff --git a/lib/whop_sdk/models/affiliate_retrieve_params.rb b/lib/whop_sdk/models/affiliate_retrieve_params.rb new file mode 100644 index 00000000..b8845dc1 --- /dev/null +++ b/lib/whop_sdk/models/affiliate_retrieve_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Affiliates#retrieve + class AffiliateRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/affiliate_unarchive_params.rb b/lib/whop_sdk/models/affiliate_unarchive_params.rb new file mode 100644 index 00000000..78be1f06 --- /dev/null +++ b/lib/whop_sdk/models/affiliate_unarchive_params.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @see WhopSDK::Resources::Affiliates#unarchive + class AffiliateUnarchiveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!method initialize(id:, request_options: {}) + # @param id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/whop_sdk/models/affiliate_unarchive_response.rb b/lib/whop_sdk/models/affiliate_unarchive_response.rb new file mode 100644 index 00000000..28703c86 --- /dev/null +++ b/lib/whop_sdk/models/affiliate_unarchive_response.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # @type [WhopSDK::Internal::Type::Converter] + AffiliateUnarchiveResponse = WhopSDK::Internal::Type::Boolean + end +end diff --git a/lib/whop_sdk/models/affiliates/affiliate_applies_to_payments.rb b/lib/whop_sdk/models/affiliates/affiliate_applies_to_payments.rb new file mode 100644 index 00000000..cea4fabf --- /dev/null +++ b/lib/whop_sdk/models/affiliates/affiliate_applies_to_payments.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # Whether the affiliate commission applies to the first payment or all payments + module AffiliateAppliesToPayments + extend WhopSDK::Internal::Type::Enum + + FIRST_PAYMENT = :first_payment + ALL_PAYMENTS = :all_payments + + # @!method self.values + # @return [Array] + end + end + + AffiliateAppliesToPayments = Affiliates::AffiliateAppliesToPayments + end +end diff --git a/lib/whop_sdk/models/affiliates/affiliate_applies_to_products.rb b/lib/whop_sdk/models/affiliates/affiliate_applies_to_products.rb new file mode 100644 index 00000000..5dc0710e --- /dev/null +++ b/lib/whop_sdk/models/affiliates/affiliate_applies_to_products.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # Whether a rev-share override applies to a single product or all products + module AffiliateAppliesToProducts + extend WhopSDK::Internal::Type::Enum + + SINGLE_PRODUCT = :single_product + ALL_PRODUCTS = :all_products + + # @!method self.values + # @return [Array] + end + end + + AffiliateAppliesToProducts = Affiliates::AffiliateAppliesToProducts + end +end diff --git a/lib/whop_sdk/models/affiliates/affiliate_override_roles.rb b/lib/whop_sdk/models/affiliates/affiliate_override_roles.rb new file mode 100644 index 00000000..5a9d4888 --- /dev/null +++ b/lib/whop_sdk/models/affiliates/affiliate_override_roles.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # The role of an affiliate override (standard or rev_share) + module AffiliateOverrideRoles + extend WhopSDK::Internal::Type::Enum + + STANDARD = :standard + REV_SHARE = :rev_share + + # @!method self.values + # @return [Array] + end + end + + AffiliateOverrideRoles = Affiliates::AffiliateOverrideRoles + end +end diff --git a/lib/whop_sdk/models/affiliates/affiliate_payout_types.rb b/lib/whop_sdk/models/affiliates/affiliate_payout_types.rb new file mode 100644 index 00000000..69fc4d73 --- /dev/null +++ b/lib/whop_sdk/models/affiliates/affiliate_payout_types.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # The types of payouts an affiliate can have + module AffiliatePayoutTypes + extend WhopSDK::Internal::Type::Enum + + PERCENTAGE = :percentage + FLAT_FEE = :flat_fee + + # @!method self.values + # @return [Array] + end + end + + AffiliatePayoutTypes = Affiliates::AffiliatePayoutTypes + end +end diff --git a/lib/whop_sdk/models/affiliates/affiliate_revenue_bases.rb b/lib/whop_sdk/models/affiliates/affiliate_revenue_bases.rb new file mode 100644 index 00000000..f1776dcd --- /dev/null +++ b/lib/whop_sdk/models/affiliates/affiliate_revenue_bases.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # The calculation method for affiliate rev-share percentages + module AffiliateRevenueBases + extend WhopSDK::Internal::Type::Enum + + PRE_FEES = :pre_fees + POST_FEES = :post_fees + + # @!method self.values + # @return [Array] + end + end + + AffiliateRevenueBases = Affiliates::AffiliateRevenueBases + end +end diff --git a/lib/whop_sdk/models/affiliates/override_create_params.rb b/lib/whop_sdk/models/affiliates/override_create_params.rb new file mode 100644 index 00000000..fcd2b08e --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_create_params.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#create + class OverrideCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute body + # Parameters for CreateAffiliateOverride + # + # @return [WhopSDK::Models::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard, WhopSDK::Models::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare] + required :body, union: -> { WhopSDK::Affiliates::OverrideCreateParams::Body } + + # @!method initialize(id:, body:, request_options: {}) + # @param id [String] + # + # @param body [WhopSDK::Models::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard, WhopSDK::Models::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare] Parameters for CreateAffiliateOverride + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + + # Parameters for CreateAffiliateOverride + module Body + extend WhopSDK::Internal::Type::Union + + # Autogenerated input type of CreateAffiliateOverride + variant -> { WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard } + + # Autogenerated input type of CreateAffiliateOverride + variant -> { WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare } + + class CreateAffiliateOverrideInputOverrideTypeStandard < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The affiliate ID. + # + # @return [String] + required :id, String + + # @!attribute commission_value + # The commission value (percentage 1-100 or flat fee). + # + # @return [Float] + required :commission_value, Float + + # @!attribute override_type + # + # @return [Symbol, :standard] + required :override_type, const: :standard + + # @!attribute plan_id + # The plan ID (required for standard overrides). + # + # @return [String] + required :plan_id, String + + # @!attribute applies_to_payments + # Whether the affiliate commission applies to the first payment or all payments + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] + optional :applies_to_payments, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToPayments + }, + nil?: true + + # @!attribute commission_type + # The types of payouts an affiliate can have + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes, nil] + optional :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes }, nil?: true + + # @!method initialize(id:, commission_value:, plan_id:, applies_to_payments: nil, commission_type: nil, override_type: :standard) + # Autogenerated input type of CreateAffiliateOverride + # + # @param id [String] The affiliate ID. + # + # @param commission_value [Float] The commission value (percentage 1-100 or flat fee). + # + # @param plan_id [String] The plan ID (required for standard overrides). + # + # @param applies_to_payments [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] Whether the affiliate commission applies to the first payment or all payments + # + # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes, nil] The types of payouts an affiliate can have + # + # @param override_type [Symbol, :standard] + end + + class CreateAffiliateOverrideInputOverrideTypeRevShare < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The affiliate ID. + # + # @return [String] + required :id, String + + # @!attribute commission_value + # The commission value (percentage 1-100 or flat fee). + # + # @return [Float] + required :commission_value, Float + + # @!attribute override_type + # + # @return [Symbol, :rev_share] + required :override_type, const: :rev_share + + # @!attribute commission_type + # The types of payouts an affiliate can have + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes, nil] + optional :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes }, nil?: true + + # @!attribute product_id + # The product ID (for rev-share overrides, omit for company-wide). + # + # @return [String, nil] + optional :product_id, String, nil?: true + + # @!attribute revenue_basis + # The calculation method for affiliate rev-share percentages + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] + optional :revenue_basis, enum: -> { WhopSDK::Affiliates::AffiliateRevenueBases }, nil?: true + + # @!method initialize(id:, commission_value:, commission_type: nil, product_id: nil, revenue_basis: nil, override_type: :rev_share) + # Autogenerated input type of CreateAffiliateOverride + # + # @param id [String] The affiliate ID. + # + # @param commission_value [Float] The commission value (percentage 1-100 or flat fee). + # + # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes, nil] The types of payouts an affiliate can have + # + # @param product_id [String, nil] The product ID (for rev-share overrides, omit for company-wide). + # + # @param revenue_basis [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] The calculation method for affiliate rev-share percentages + # + # @param override_type [Symbol, :rev_share] + end + + # @!method self.variants + # @return [Array(WhopSDK::Models::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard, WhopSDK::Models::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare)] + end + end + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_create_response.rb b/lib/whop_sdk/models/affiliates/override_create_response.rb new file mode 100644 index 00000000..b64ac8ce --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_create_response.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#create + class OverrideCreateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the affiliate override. + # + # @return [String] + required :id, String + + # @!attribute applies_to_payments + # Whether the affiliate commission applies to the first payment or all payments + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] + required :applies_to_payments, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToPayments + }, + nil?: true + + # @!attribute applies_to_products + # Whether a rev-share override applies to a single product or all products + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToProducts, nil] + required :applies_to_products, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToProducts + }, + nil?: true + + # @!attribute checkout_direct_link + # The checkout direct link for referrals (standard overrides only). + # + # @return [String, nil] + required :checkout_direct_link, String, nil?: true + + # @!attribute commission_type + # The type of commission (percentage or flat_fee). + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] + required :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes } + + # @!attribute commission_value + # The commission value (percentage 1-100 or flat fee in dollars). + # + # @return [Float] + required :commission_value, Float + + # @!attribute override_type + # The type of override (standard or rev_share). + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] + required :override_type, enum: -> { WhopSDK::Affiliates::AffiliateOverrideRoles } + + # @!attribute plan_id + # The plan ID (for standard overrides). + # + # @return [String, nil] + required :plan_id, String, nil?: true + + # @!attribute product_direct_link + # The product page direct link for referrals (standard overrides only). + # + # @return [String, nil] + required :product_direct_link, String, nil?: true + + # @!attribute product_id + # The product ID (for rev-share overrides). + # + # @return [String, nil] + required :product_id, String, nil?: true + + # @!attribute revenue_basis + # The calculation method for affiliate rev-share percentages + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] + required :revenue_basis, enum: -> { WhopSDK::Affiliates::AffiliateRevenueBases }, nil?: true + + # @!attribute total_referral_earnings_usd + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + # + # @return [Float] + required :total_referral_earnings_usd, Float + + # @!method initialize(id:, applies_to_payments:, applies_to_products:, checkout_direct_link:, commission_type:, commission_value:, override_type:, plan_id:, product_direct_link:, product_id:, revenue_basis:, total_referral_earnings_usd:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::Affiliates::OverrideCreateResponse} for more details. + # + # An object storing information about the affiliate + # + # @param id [String] The unique identifier for the affiliate override. + # + # @param applies_to_payments [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] Whether the affiliate commission applies to the first payment or all payments + # + # @param applies_to_products [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToProducts, nil] Whether a rev-share override applies to a single product or all products + # + # @param checkout_direct_link [String, nil] The checkout direct link for referrals (standard overrides only). + # + # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] The type of commission (percentage or flat_fee). + # + # @param commission_value [Float] The commission value (percentage 1-100 or flat fee in dollars). + # + # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] The type of override (standard or rev_share). + # + # @param plan_id [String, nil] The plan ID (for standard overrides). + # + # @param product_direct_link [String, nil] The product page direct link for referrals (standard overrides only). + # + # @param product_id [String, nil] The product ID (for rev-share overrides). + # + # @param revenue_basis [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] The calculation method for affiliate rev-share percentages + # + # @param total_referral_earnings_usd [Float] The total earnings paid to this affiliate for referrals to this specific plan, i + end + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_delete_params.rb b/lib/whop_sdk/models/affiliates/override_delete_params.rb new file mode 100644 index 00000000..082e6993 --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_delete_params.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#delete + class OverrideDeleteParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute override_id + # + # @return [String] + required :override_id, String + + # @!method initialize(id:, override_id:, request_options: {}) + # @param id [String] + # @param override_id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_delete_response.rb b/lib/whop_sdk/models/affiliates/override_delete_response.rb new file mode 100644 index 00000000..e2996165 --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_delete_response.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @type [WhopSDK::Internal::Type::Converter] + OverrideDeleteResponse = WhopSDK::Internal::Type::Boolean + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_list_params.rb b/lib/whop_sdk/models/affiliates/override_list_params.rb new file mode 100644 index 00000000..90093bde --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_list_params.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#list + class OverrideListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute after + # Returns the elements in the list that come after the specified cursor. + # + # @return [String, nil] + optional :after, String, nil?: true + + # @!attribute before + # Returns the elements in the list that come before the specified cursor. + # + # @return [String, nil] + optional :before, String, nil?: true + + # @!attribute first + # Returns the first _n_ elements from the list. + # + # @return [Integer, nil] + optional :first, Integer, nil?: true + + # @!attribute last + # Returns the last _n_ elements from the list. + # + # @return [Integer, nil] + optional :last, Integer, nil?: true + + # @!attribute override_type + # The role of an affiliate override (standard or rev_share) + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles, nil] + optional :override_type, enum: -> { WhopSDK::Affiliates::AffiliateOverrideRoles }, nil?: true + + # @!method initialize(id:, after: nil, before: nil, first: nil, last: nil, override_type: nil, request_options: {}) + # @param id [String] + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles, nil] The role of an affiliate override (standard or rev_share) + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_list_response.rb b/lib/whop_sdk/models/affiliates/override_list_response.rb new file mode 100644 index 00000000..17be44e4 --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_list_response.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#list + class OverrideListResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the affiliate override. + # + # @return [String] + required :id, String + + # @!attribute applies_to_payments + # Whether the affiliate commission applies to the first payment or all payments + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] + required :applies_to_payments, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToPayments + }, + nil?: true + + # @!attribute applies_to_products + # Whether a rev-share override applies to a single product or all products + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToProducts, nil] + required :applies_to_products, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToProducts + }, + nil?: true + + # @!attribute checkout_direct_link + # The checkout direct link for referrals (standard overrides only). + # + # @return [String, nil] + required :checkout_direct_link, String, nil?: true + + # @!attribute commission_type + # The type of commission (percentage or flat_fee). + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] + required :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes } + + # @!attribute commission_value + # The commission value (percentage 1-100 or flat fee in dollars). + # + # @return [Float] + required :commission_value, Float + + # @!attribute override_type + # The type of override (standard or rev_share). + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] + required :override_type, enum: -> { WhopSDK::Affiliates::AffiliateOverrideRoles } + + # @!attribute plan_id + # The plan ID (for standard overrides). + # + # @return [String, nil] + required :plan_id, String, nil?: true + + # @!attribute product_direct_link + # The product page direct link for referrals (standard overrides only). + # + # @return [String, nil] + required :product_direct_link, String, nil?: true + + # @!attribute product_id + # The product ID (for rev-share overrides). + # + # @return [String, nil] + required :product_id, String, nil?: true + + # @!attribute revenue_basis + # The calculation method for affiliate rev-share percentages + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] + required :revenue_basis, enum: -> { WhopSDK::Affiliates::AffiliateRevenueBases }, nil?: true + + # @!attribute total_referral_earnings_usd + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + # + # @return [Float] + required :total_referral_earnings_usd, Float + + # @!method initialize(id:, applies_to_payments:, applies_to_products:, checkout_direct_link:, commission_type:, commission_value:, override_type:, plan_id:, product_direct_link:, product_id:, revenue_basis:, total_referral_earnings_usd:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::Affiliates::OverrideListResponse} for more details. + # + # An object storing information about the affiliate + # + # @param id [String] The unique identifier for the affiliate override. + # + # @param applies_to_payments [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] Whether the affiliate commission applies to the first payment or all payments + # + # @param applies_to_products [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToProducts, nil] Whether a rev-share override applies to a single product or all products + # + # @param checkout_direct_link [String, nil] The checkout direct link for referrals (standard overrides only). + # + # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] The type of commission (percentage or flat_fee). + # + # @param commission_value [Float] The commission value (percentage 1-100 or flat fee in dollars). + # + # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] The type of override (standard or rev_share). + # + # @param plan_id [String, nil] The plan ID (for standard overrides). + # + # @param product_direct_link [String, nil] The product page direct link for referrals (standard overrides only). + # + # @param product_id [String, nil] The product ID (for rev-share overrides). + # + # @param revenue_basis [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] The calculation method for affiliate rev-share percentages + # + # @param total_referral_earnings_usd [Float] The total earnings paid to this affiliate for referrals to this specific plan, i + end + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_retrieve_params.rb b/lib/whop_sdk/models/affiliates/override_retrieve_params.rb new file mode 100644 index 00000000..e39bfb86 --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_retrieve_params.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#retrieve + class OverrideRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute override_id + # + # @return [String] + required :override_id, String + + # @!method initialize(id:, override_id:, request_options: {}) + # @param id [String] + # @param override_id [String] + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_retrieve_response.rb b/lib/whop_sdk/models/affiliates/override_retrieve_response.rb new file mode 100644 index 00000000..d74593cd --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_retrieve_response.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#retrieve + class OverrideRetrieveResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the affiliate override. + # + # @return [String] + required :id, String + + # @!attribute applies_to_payments + # Whether the affiliate commission applies to the first payment or all payments + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] + required :applies_to_payments, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToPayments + }, + nil?: true + + # @!attribute applies_to_products + # Whether a rev-share override applies to a single product or all products + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToProducts, nil] + required :applies_to_products, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToProducts + }, + nil?: true + + # @!attribute checkout_direct_link + # The checkout direct link for referrals (standard overrides only). + # + # @return [String, nil] + required :checkout_direct_link, String, nil?: true + + # @!attribute commission_type + # The type of commission (percentage or flat_fee). + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] + required :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes } + + # @!attribute commission_value + # The commission value (percentage 1-100 or flat fee in dollars). + # + # @return [Float] + required :commission_value, Float + + # @!attribute override_type + # The type of override (standard or rev_share). + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] + required :override_type, enum: -> { WhopSDK::Affiliates::AffiliateOverrideRoles } + + # @!attribute plan_id + # The plan ID (for standard overrides). + # + # @return [String, nil] + required :plan_id, String, nil?: true + + # @!attribute product_direct_link + # The product page direct link for referrals (standard overrides only). + # + # @return [String, nil] + required :product_direct_link, String, nil?: true + + # @!attribute product_id + # The product ID (for rev-share overrides). + # + # @return [String, nil] + required :product_id, String, nil?: true + + # @!attribute revenue_basis + # The calculation method for affiliate rev-share percentages + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] + required :revenue_basis, enum: -> { WhopSDK::Affiliates::AffiliateRevenueBases }, nil?: true + + # @!attribute total_referral_earnings_usd + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + # + # @return [Float] + required :total_referral_earnings_usd, Float + + # @!method initialize(id:, applies_to_payments:, applies_to_products:, checkout_direct_link:, commission_type:, commission_value:, override_type:, plan_id:, product_direct_link:, product_id:, revenue_basis:, total_referral_earnings_usd:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::Affiliates::OverrideRetrieveResponse} for more details. + # + # An object storing information about the affiliate + # + # @param id [String] The unique identifier for the affiliate override. + # + # @param applies_to_payments [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] Whether the affiliate commission applies to the first payment or all payments + # + # @param applies_to_products [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToProducts, nil] Whether a rev-share override applies to a single product or all products + # + # @param checkout_direct_link [String, nil] The checkout direct link for referrals (standard overrides only). + # + # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] The type of commission (percentage or flat_fee). + # + # @param commission_value [Float] The commission value (percentage 1-100 or flat fee in dollars). + # + # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] The type of override (standard or rev_share). + # + # @param plan_id [String, nil] The plan ID (for standard overrides). + # + # @param product_direct_link [String, nil] The product page direct link for referrals (standard overrides only). + # + # @param product_id [String, nil] The product ID (for rev-share overrides). + # + # @param revenue_basis [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] The calculation method for affiliate rev-share percentages + # + # @param total_referral_earnings_usd [Float] The total earnings paid to this affiliate for referrals to this specific plan, i + end + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_update_params.rb b/lib/whop_sdk/models/affiliates/override_update_params.rb new file mode 100644 index 00000000..26ce7e2d --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_update_params.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#update + class OverrideUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute override_id + # + # @return [String] + required :override_id, String + + # @!attribute applies_to_payments + # Whether the affiliate commission applies to the first payment or all payments + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] + optional :applies_to_payments, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToPayments + }, + nil?: true + + # @!attribute commission_type + # The types of payouts an affiliate can have + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes, nil] + optional :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes }, nil?: true + + # @!attribute commission_value + # The commission value (percentage 1-100 or flat fee in dollars). + # + # @return [Float, nil] + optional :commission_value, Float, nil?: true + + # @!attribute revenue_basis + # The calculation method for affiliate rev-share percentages + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] + optional :revenue_basis, enum: -> { WhopSDK::Affiliates::AffiliateRevenueBases }, nil?: true + + # @!method initialize(id:, override_id:, applies_to_payments: nil, commission_type: nil, commission_value: nil, revenue_basis: nil, request_options: {}) + # @param id [String] + # + # @param override_id [String] + # + # @param applies_to_payments [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] Whether the affiliate commission applies to the first payment or all payments + # + # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes, nil] The types of payouts an affiliate can have + # + # @param commission_value [Float, nil] The commission value (percentage 1-100 or flat fee in dollars). + # + # @param revenue_basis [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] The calculation method for affiliate rev-share percentages + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] + end + end + end +end diff --git a/lib/whop_sdk/models/affiliates/override_update_response.rb b/lib/whop_sdk/models/affiliates/override_update_response.rb new file mode 100644 index 00000000..a2ba6b74 --- /dev/null +++ b/lib/whop_sdk/models/affiliates/override_update_response.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + module Affiliates + # @see WhopSDK::Resources::Affiliates::Overrides#update + class OverrideUpdateResponse < WhopSDK::Internal::Type::BaseModel + # @!attribute id + # The unique identifier for the affiliate override. + # + # @return [String] + required :id, String + + # @!attribute applies_to_payments + # Whether the affiliate commission applies to the first payment or all payments + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] + required :applies_to_payments, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToPayments + }, + nil?: true + + # @!attribute applies_to_products + # Whether a rev-share override applies to a single product or all products + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToProducts, nil] + required :applies_to_products, + enum: -> { + WhopSDK::Affiliates::AffiliateAppliesToProducts + }, + nil?: true + + # @!attribute checkout_direct_link + # The checkout direct link for referrals (standard overrides only). + # + # @return [String, nil] + required :checkout_direct_link, String, nil?: true + + # @!attribute commission_type + # The type of commission (percentage or flat_fee). + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] + required :commission_type, enum: -> { WhopSDK::Affiliates::AffiliatePayoutTypes } + + # @!attribute commission_value + # The commission value (percentage 1-100 or flat fee in dollars). + # + # @return [Float] + required :commission_value, Float + + # @!attribute override_type + # The type of override (standard or rev_share). + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] + required :override_type, enum: -> { WhopSDK::Affiliates::AffiliateOverrideRoles } + + # @!attribute plan_id + # The plan ID (for standard overrides). + # + # @return [String, nil] + required :plan_id, String, nil?: true + + # @!attribute product_direct_link + # The product page direct link for referrals (standard overrides only). + # + # @return [String, nil] + required :product_direct_link, String, nil?: true + + # @!attribute product_id + # The product ID (for rev-share overrides). + # + # @return [String, nil] + required :product_id, String, nil?: true + + # @!attribute revenue_basis + # The calculation method for affiliate rev-share percentages + # + # @return [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] + required :revenue_basis, enum: -> { WhopSDK::Affiliates::AffiliateRevenueBases }, nil?: true + + # @!attribute total_referral_earnings_usd + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + # + # @return [Float] + required :total_referral_earnings_usd, Float + + # @!method initialize(id:, applies_to_payments:, applies_to_products:, checkout_direct_link:, commission_type:, commission_value:, override_type:, plan_id:, product_direct_link:, product_id:, revenue_basis:, total_referral_earnings_usd:) + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::Affiliates::OverrideUpdateResponse} for more details. + # + # An object storing information about the affiliate + # + # @param id [String] The unique identifier for the affiliate override. + # + # @param applies_to_payments [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] Whether the affiliate commission applies to the first payment or all payments + # + # @param applies_to_products [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToProducts, nil] Whether a rev-share override applies to a single product or all products + # + # @param checkout_direct_link [String, nil] The checkout direct link for referrals (standard overrides only). + # + # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes] The type of commission (percentage or flat_fee). + # + # @param commission_value [Float] The commission value (percentage 1-100 or flat fee in dollars). + # + # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles] The type of override (standard or rev_share). + # + # @param plan_id [String, nil] The plan ID (for standard overrides). + # + # @param product_direct_link [String, nil] The product page direct link for referrals (standard overrides only). + # + # @param product_id [String, nil] The product ID (for rev-share overrides). + # + # @param revenue_basis [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] The calculation method for affiliate rev-share percentages + # + # @param total_referral_earnings_usd [Float] The total earnings paid to this affiliate for referrals to this specific plan, i + end + end + end +end diff --git a/lib/whop_sdk/models/ai_chat.rb b/lib/whop_sdk/models/ai_chat.rb index 529d66d8..ce7e8a80 100644 --- a/lib/whop_sdk/models/ai_chat.rb +++ b/lib/whop_sdk/models/ai_chat.rb @@ -39,8 +39,8 @@ class AIChat < WhopSDK::Internal::Type::BaseModel # The notification preference for this AI chat. `all` delivers AI chat # notifications and badges, while `none` mutes them. # - # @return [Symbol, WhopSDK::Models::AIChat::NotificationPreference] - required :notification_preference, enum: -> { WhopSDK::AIChat::NotificationPreference } + # @return [Symbol, WhopSDK::Models::NotificationPreferences] + required :notification_preference, enum: -> { WhopSDK::NotificationPreferences } # @!attribute title # A short descriptive title for this AI chat conversation. Null if no title has @@ -78,7 +78,7 @@ class AIChat < WhopSDK::Internal::Type::BaseModel # # @param message_count [Integer] The total number of messages exchanged in this conversation. # - # @param notification_preference [Symbol, WhopSDK::Models::AIChat::NotificationPreference] The notification preference for this AI chat. `all` delivers AI chat notificatio + # @param notification_preference [Symbol, WhopSDK::Models::NotificationPreferences] The notification preference for this AI chat. `all` delivers AI chat notificatio # # @param title [String, nil] A short descriptive title for this AI chat conversation. Null if no title has be # @@ -86,20 +86,6 @@ class AIChat < WhopSDK::Internal::Type::BaseModel # # @param user [WhopSDK::Models::AIChat::User] The user who owns this AI chat conversation. - # The notification preference for this AI chat. `all` delivers AI chat - # notifications and badges, while `none` mutes them. - # - # @see WhopSDK::Models::AIChat#notification_preference - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - ALL = :all - NONE = :none - - # @!method self.values - # @return [Array] - end - # @see WhopSDK::Models::AIChat#user class User < WhopSDK::Internal::Type::BaseModel # @!attribute id diff --git a/lib/whop_sdk/models/ai_chat_list_response.rb b/lib/whop_sdk/models/ai_chat_list_response.rb index 61c2dcbe..e78b6e24 100644 --- a/lib/whop_sdk/models/ai_chat_list_response.rb +++ b/lib/whop_sdk/models/ai_chat_list_response.rb @@ -39,9 +39,8 @@ class AIChatListResponse < WhopSDK::Internal::Type::BaseModel # The notification preference for this AI chat. `all` delivers AI chat # notifications and badges, while `none` mutes them. # - # @return [Symbol, WhopSDK::Models::AIChatListResponse::NotificationPreference] - required :notification_preference, - enum: -> { WhopSDK::Models::AIChatListResponse::NotificationPreference } + # @return [Symbol, WhopSDK::Models::NotificationPreferences] + required :notification_preference, enum: -> { WhopSDK::NotificationPreferences } # @!attribute title # A short descriptive title for this AI chat conversation. Null if no title has @@ -79,7 +78,7 @@ class AIChatListResponse < WhopSDK::Internal::Type::BaseModel # # @param message_count [Integer] The total number of messages exchanged in this conversation. # - # @param notification_preference [Symbol, WhopSDK::Models::AIChatListResponse::NotificationPreference] The notification preference for this AI chat. `all` delivers AI chat notificatio + # @param notification_preference [Symbol, WhopSDK::Models::NotificationPreferences] The notification preference for this AI chat. `all` delivers AI chat notificatio # # @param title [String, nil] A short descriptive title for this AI chat conversation. Null if no title has be # @@ -87,20 +86,6 @@ class AIChatListResponse < WhopSDK::Internal::Type::BaseModel # # @param user [WhopSDK::Models::AIChatListResponse::User] The user who owns this AI chat conversation. - # The notification preference for this AI chat. `all` delivers AI chat - # notifications and badges, while `none` mutes them. - # - # @see WhopSDK::Models::AIChatListResponse#notification_preference - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - ALL = :all - NONE = :none - - # @!method self.values - # @return [Array] - end - # @see WhopSDK::Models::AIChatListResponse#user class User < WhopSDK::Internal::Type::BaseModel # @!attribute id diff --git a/lib/whop_sdk/models/ai_chat_update_params.rb b/lib/whop_sdk/models/ai_chat_update_params.rb index 3c0f344f..7588ceac 100644 --- a/lib/whop_sdk/models/ai_chat_update_params.rb +++ b/lib/whop_sdk/models/ai_chat_update_params.rb @@ -22,10 +22,8 @@ class AIChatUpdateParams < WhopSDK::Internal::Type::BaseModel # @!attribute notification_preference # The notification preference for an AI chat # - # @return [Symbol, WhopSDK::Models::AIChatUpdateParams::NotificationPreference, nil] - optional :notification_preference, - enum: -> { WhopSDK::AIChatUpdateParams::NotificationPreference }, - nil?: true + # @return [Symbol, WhopSDK::Models::NotificationPreferences, nil] + optional :notification_preference, enum: -> { WhopSDK::NotificationPreferences }, nil?: true # @!attribute title # The new display title for the AI chat thread (e.g., "Help with billing"). @@ -41,22 +39,11 @@ class AIChatUpdateParams < WhopSDK::Internal::Type::BaseModel # # @param current_company_id [String, nil] The unique identifier of the company to set as context for the AI chat (e.g., "b # - # @param notification_preference [Symbol, WhopSDK::Models::AIChatUpdateParams::NotificationPreference, nil] The notification preference for an AI chat + # @param notification_preference [Symbol, WhopSDK::Models::NotificationPreferences, nil] The notification preference for an AI chat # # @param title [String, nil] The new display title for the AI chat thread (e.g., "Help with billing"). # # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}] - - # The notification preference for an AI chat - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - ALL = :all - NONE = :none - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/whop_sdk/models/notification_preferences.rb b/lib/whop_sdk/models/notification_preferences.rb new file mode 100644 index 00000000..f4b8c885 --- /dev/null +++ b/lib/whop_sdk/models/notification_preferences.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # The notification preference for an AI chat + module NotificationPreferences + extend WhopSDK::Internal::Type::Enum + + ALL = :all + NONE = :none + + # @!method self.values + # @return [Array] + end + end +end diff --git a/lib/whop_sdk/models/status.rb b/lib/whop_sdk/models/status.rb new file mode 100644 index 00000000..32a9fd84 --- /dev/null +++ b/lib/whop_sdk/models/status.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module WhopSDK + module Models + # Statuses for resources + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE = :active + ARCHIVED = :archived + DELETED = :deleted + + # @!method self.values + # @return [Array] + end + end +end diff --git a/lib/whop_sdk/resources/affiliates.rb b/lib/whop_sdk/resources/affiliates.rb new file mode 100644 index 00000000..db71ae78 --- /dev/null +++ b/lib/whop_sdk/resources/affiliates.rb @@ -0,0 +1,165 @@ +# frozen_string_literal: true + +module WhopSDK + module Resources + # Affiliates + class Affiliates + # Affiliates + # @return [WhopSDK::Resources::Affiliates::Overrides] + attr_reader :overrides + + # Creates or finds an affiliate for a company and user. + # + # Required permissions: + # + # - `affiliate:create` + # + # @overload create(company_id:, user_identifier:, request_options: {}) + # + # @param company_id [String] The ID of the company to create the affiliate for. + # + # @param user_identifier [String] The user identifier (username, email, user ID, or Discord ID). + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::Affiliate] + # + # @see WhopSDK::Models::AffiliateCreateParams + def create(params) + parsed, options = WhopSDK::AffiliateCreateParams.dump_request(params) + @client.request( + method: :post, + path: "affiliates", + body: parsed, + model: WhopSDK::Affiliate, + options: options + ) + end + + # Retrieves the details of an existing affiliate. + # + # Required permissions: + # + # - `affiliate:basic:read` + # + # @overload retrieve(id, request_options: {}) + # + # @param id [String] The unique identifier of the affiliate. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::Affiliate] + # + # @see WhopSDK::Models::AffiliateRetrieveParams + def retrieve(id, params = {}) + @client.request( + method: :get, + path: ["affiliates/%1$s", id], + model: WhopSDK::Affiliate, + options: params[:request_options] + ) + end + + # Returns a paginated list of affiliates for the actor in context, with optional + # filtering by status, search, and sorting. + # + # Required permissions: + # + # - `affiliate:basic:read` + # + # @overload list(company_id:, after: nil, before: nil, direction: nil, first: nil, last: nil, order: nil, query: nil, status: nil, request_options: {}) + # + # @param company_id [String] The unique identifier of the company to list affiliates for. + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param order [Symbol, WhopSDK::Models::AffiliateListParams::Order, nil] Which columns can be used to sort. + # + # @param query [String, nil] Search affiliates by username. + # + # @param status [Symbol, WhopSDK::Models::Status, nil] Statuses for resources + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Internal::CursorPage] + # + # @see WhopSDK::Models::AffiliateListParams + def list(params) + parsed, options = WhopSDK::AffiliateListParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "affiliates", + query: query, + page: WhopSDK::Internal::CursorPage, + model: WhopSDK::Models::AffiliateListResponse, + options: options + ) + end + + # Archives an existing Affiliate + # + # Required permissions: + # + # - `affiliate:update` + # + # @overload archive(id, request_options: {}) + # + # @param id [String] The internal ID of the affiliate to archive. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Boolean] + # + # @see WhopSDK::Models::AffiliateArchiveParams + def archive(id, params = {}) + @client.request( + method: :post, + path: ["affiliates/%1$s/archive", id], + model: WhopSDK::Internal::Type::Boolean, + options: params[:request_options] + ) + end + + # Unarchives an existing Affiliate + # + # Required permissions: + # + # - `affiliate:update` + # + # @overload unarchive(id, request_options: {}) + # + # @param id [String] The internal ID of the affiliate to archive. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Boolean] + # + # @see WhopSDK::Models::AffiliateUnarchiveParams + def unarchive(id, params = {}) + @client.request( + method: :post, + path: ["affiliates/%1$s/unarchive", id], + model: WhopSDK::Internal::Type::Boolean, + options: params[:request_options] + ) + end + + # @api private + # + # @param client [WhopSDK::Client] + def initialize(client:) + @client = client + @overrides = WhopSDK::Resources::Affiliates::Overrides.new(client: client) + end + end + end +end diff --git a/lib/whop_sdk/resources/affiliates/overrides.rb b/lib/whop_sdk/resources/affiliates/overrides.rb new file mode 100644 index 00000000..a7ebac52 --- /dev/null +++ b/lib/whop_sdk/resources/affiliates/overrides.rb @@ -0,0 +1,188 @@ +# frozen_string_literal: true + +module WhopSDK + module Resources + class Affiliates + # Affiliates + class Overrides + # Creates a commission override for an affiliate. + # + # Required permissions: + # + # - `affiliate:create` + # + # @overload create(id, body:, request_options: {}) + # + # @param id [String] The affiliate ID. + # + # @param body [WhopSDK::Models::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard, WhopSDK::Models::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare] Parameters for CreateAffiliateOverride + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::Affiliates::OverrideCreateResponse] + # + # @see WhopSDK::Models::Affiliates::OverrideCreateParams + def create(id, params) + parsed, options = WhopSDK::Affiliates::OverrideCreateParams.dump_request(params) + @client.request( + method: :post, + path: ["affiliates/%1$s/overrides", id], + body: parsed[:body], + model: WhopSDK::Models::Affiliates::OverrideCreateResponse, + options: options + ) + end + + # Retrieves the details of a specific affiliate override. + # + # Required permissions: + # + # - `affiliate:basic:read` + # + # @overload retrieve(override_id, id:, request_options: {}) + # + # @param override_id [String] The override ID. + # + # @param id [String] The affiliate ID. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::Affiliates::OverrideRetrieveResponse] + # + # @see WhopSDK::Models::Affiliates::OverrideRetrieveParams + def retrieve(override_id, params) + parsed, options = WhopSDK::Affiliates::OverrideRetrieveParams.dump_request(params) + id = + parsed.delete(:id) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :get, + path: ["affiliates/%1$s/overrides/%2$s", id, override_id], + model: WhopSDK::Models::Affiliates::OverrideRetrieveResponse, + options: options + ) + end + + # Some parameter documentations has been truncated, see + # {WhopSDK::Models::Affiliates::OverrideUpdateParams} for more details. + # + # Updates an existing affiliate override. + # + # Required permissions: + # + # - `affiliate:update` + # + # @overload update(override_id, id:, applies_to_payments: nil, commission_type: nil, commission_value: nil, revenue_basis: nil, request_options: {}) + # + # @param override_id [String] Path param: The override ID. + # + # @param id [String] Path param: The affiliate ID. + # + # @param applies_to_payments [Symbol, WhopSDK::Models::Affiliates::AffiliateAppliesToPayments, nil] Body param: Whether the affiliate commission applies to the first payment or all + # + # @param commission_type [Symbol, WhopSDK::Models::Affiliates::AffiliatePayoutTypes, nil] Body param: The types of payouts an affiliate can have + # + # @param commission_value [Float, nil] Body param: The commission value (percentage 1-100 or flat fee in dollars). + # + # @param revenue_basis [Symbol, WhopSDK::Models::Affiliates::AffiliateRevenueBases, nil] Body param: The calculation method for affiliate rev-share percentages + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Models::Affiliates::OverrideUpdateResponse] + # + # @see WhopSDK::Models::Affiliates::OverrideUpdateParams + def update(override_id, params) + parsed, options = WhopSDK::Affiliates::OverrideUpdateParams.dump_request(params) + id = + parsed.delete(:id) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :patch, + path: ["affiliates/%1$s/overrides/%2$s", id, override_id], + body: parsed, + model: WhopSDK::Models::Affiliates::OverrideUpdateResponse, + options: options + ) + end + + # Returns a paginated list of overrides for an affiliate. + # + # Required permissions: + # + # - `affiliate:basic:read` + # + # @overload list(id, after: nil, before: nil, first: nil, last: nil, override_type: nil, request_options: {}) + # + # @param id [String] The affiliate ID. + # + # @param after [String, nil] Returns the elements in the list that come after the specified cursor. + # + # @param before [String, nil] Returns the elements in the list that come before the specified cursor. + # + # @param first [Integer, nil] Returns the first _n_ elements from the list. + # + # @param last [Integer, nil] Returns the last _n_ elements from the list. + # + # @param override_type [Symbol, WhopSDK::Models::Affiliates::AffiliateOverrideRoles, nil] The role of an affiliate override (standard or rev_share) + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [WhopSDK::Internal::CursorPage] + # + # @see WhopSDK::Models::Affiliates::OverrideListParams + def list(id, params = {}) + parsed, options = WhopSDK::Affiliates::OverrideListParams.dump_request(params) + query = WhopSDK::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: ["affiliates/%1$s/overrides", id], + query: query, + page: WhopSDK::Internal::CursorPage, + model: WhopSDK::Models::Affiliates::OverrideListResponse, + options: options + ) + end + + # Deletes an affiliate override. + # + # Required permissions: + # + # - `affiliate:update` + # + # @overload delete(override_id, id:, request_options: {}) + # + # @param override_id [String] The override ID. + # + # @param id [String] The affiliate ID. + # + # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Boolean] + # + # @see WhopSDK::Models::Affiliates::OverrideDeleteParams + def delete(override_id, params) + parsed, options = WhopSDK::Affiliates::OverrideDeleteParams.dump_request(params) + id = + parsed.delete(:id) do + raise ArgumentError.new("missing required path argument #{_1}") + end + @client.request( + method: :delete, + path: ["affiliates/%1$s/overrides/%2$s", id, override_id], + model: WhopSDK::Internal::Type::Boolean, + options: options + ) + end + + # @api private + # + # @param client [WhopSDK::Client] + def initialize(client:) + @client = client + end + end + end + end +end diff --git a/lib/whop_sdk/resources/ai_chats.rb b/lib/whop_sdk/resources/ai_chats.rb index 4fa9fe56..847d48fd 100644 --- a/lib/whop_sdk/resources/ai_chats.rb +++ b/lib/whop_sdk/resources/ai_chats.rb @@ -79,7 +79,7 @@ def retrieve(id, params = {}) # # @param current_company_id [String, nil] The unique identifier of the company to set as context for the AI chat (e.g., "b # - # @param notification_preference [Symbol, WhopSDK::Models::AIChatUpdateParams::NotificationPreference, nil] The notification preference for an AI chat + # @param notification_preference [Symbol, WhopSDK::Models::NotificationPreferences, nil] The notification preference for an AI chat # # @param title [String, nil] The new display title for the AI chat thread (e.g., "Help with billing"). # diff --git a/rbi/whop_sdk/client.rbi b/rbi/whop_sdk/client.rbi index eae08caa..793a3837 100644 --- a/rbi/whop_sdk/client.rbi +++ b/rbi/whop_sdk/client.rbi @@ -232,6 +232,10 @@ module WhopSDK sig { returns(WhopSDK::Resources::PayoutAccounts) } attr_reader :payout_accounts + # Affiliates + sig { returns(WhopSDK::Resources::Affiliates) } + attr_reader :affiliates + # @api private sig { override.returns(T::Hash[String, String]) } private def auth_headers diff --git a/rbi/whop_sdk/models.rbi b/rbi/whop_sdk/models.rbi index 3d53bd46..f7d7c1d7 100644 --- a/rbi/whop_sdk/models.rbi +++ b/rbi/whop_sdk/models.rbi @@ -9,6 +9,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 @@ -414,6 +428,8 @@ module WhopSDK NotificationCreateParams = WhopSDK::Models::NotificationCreateParams + NotificationPreferences = WhopSDK::Models::NotificationPreferences + PageInfo = WhopSDK::Models::PageInfo Payment = WhopSDK::Models::Payment @@ -597,6 +613,8 @@ module WhopSDK SocialLinkWebsites = WhopSDK::Models::SocialLinkWebsites + Status = WhopSDK::Models::Status + SupportChannel = WhopSDK::Models::SupportChannel SupportChannelCreateParams = WhopSDK::Models::SupportChannelCreateParams diff --git a/rbi/whop_sdk/models/affiliate.rbi b/rbi/whop_sdk/models/affiliate.rbi new file mode 100644 index 00000000..67c2f131 --- /dev/null +++ b/rbi/whop_sdk/models/affiliate.rbi @@ -0,0 +1,224 @@ +# typed: strong + +module WhopSDK + module Models + class Affiliate < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias { T.any(WhopSDK::Affiliate, WhopSDK::Internal::AnyHash) } + + # The unique identifier for the affiliate. + sig { returns(String) } + attr_accessor :id + + # The total active members of the affiliate + sig { returns(Integer) } + attr_accessor :active_members_count + + # The company attached to this affiliate + sig { returns(WhopSDK::Affiliate::Company) } + attr_reader :company + + sig { params(company: WhopSDK::Affiliate::Company::OrHash).void } + attr_writer :company + + # The datetime the affiliate was created. + sig { returns(Time) } + attr_accessor :created_at + + # How many referrals have remained since they joined as members + sig { returns(String) } + attr_accessor :customer_retention_rate + + # A rolling 90-day retention rate for this affiliate + sig { returns(String) } + attr_accessor :customer_retention_rate_ninety_days + + # The total MRR of the affiliate + sig { returns(String) } + attr_accessor :monthly_recurring_revenue_usd + + # Statuses for resources + sig { returns(T.nilable(WhopSDK::Status::TaggedSymbol)) } + attr_accessor :status + + # The total count of all overrides for this affiliate + sig { returns(Integer) } + attr_accessor :total_overrides_count + + # The total earnings of the affiliate from the users they referred + sig { returns(String) } + attr_accessor :total_referral_earnings_usd + + # The total referrals of the affiliate + sig { returns(Integer) } + attr_accessor :total_referrals_count + + # The total revenue of the affiliate from their referrals + sig { returns(String) } + attr_accessor :total_revenue_usd + + # The datetime the affiliate was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # The user attached to this affiliate + sig { returns(WhopSDK::Affiliate::User) } + attr_reader :user + + sig { params(user: WhopSDK::Affiliate::User::OrHash).void } + attr_writer :user + + # An affiliate of a company or a global affiliate + sig do + params( + id: String, + active_members_count: Integer, + company: WhopSDK::Affiliate::Company::OrHash, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: T.nilable(WhopSDK::Status::OrSymbol), + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Affiliate::User::OrHash + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the affiliate. + id:, + # The total active members of the affiliate + active_members_count:, + # The company attached to this affiliate + company:, + # The datetime the affiliate was created. + created_at:, + # How many referrals have remained since they joined as members + customer_retention_rate:, + # A rolling 90-day retention rate for this affiliate + customer_retention_rate_ninety_days:, + # The total MRR of the affiliate + monthly_recurring_revenue_usd:, + # Statuses for resources + status:, + # The total count of all overrides for this affiliate + total_overrides_count:, + # The total earnings of the affiliate from the users they referred + total_referral_earnings_usd:, + # The total referrals of the affiliate + total_referrals_count:, + # The total revenue of the affiliate from their referrals + total_revenue_usd:, + # The datetime the affiliate was last updated. + updated_at:, + # The user attached to this affiliate + user: + ) + end + + sig do + override.returns( + { + id: String, + active_members_count: Integer, + company: WhopSDK::Affiliate::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: T.nilable(WhopSDK::Status::TaggedSymbol), + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Affiliate::User + } + ) + end + def to_hash + end + + class Company < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Affiliate::Company, WhopSDK::Internal::AnyHash) + end + + # The unique identifier for the company. + sig { returns(String) } + attr_accessor :id + + # The written name of the company. + sig { returns(String) } + attr_accessor :title + + # The company attached to this affiliate + sig { params(id: String, title: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the company. + id:, + # The written name of the company. + title: + ) + end + + sig { override.returns({ id: String, title: String }) } + def to_hash + end + end + + class User < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(WhopSDK::Affiliate::User, WhopSDK::Internal::AnyHash) + end + + # The unique identifier for the user. + sig { returns(String) } + attr_accessor :id + + # The display name set on the user's Whop profile. Null if the user has not set a + # name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The unique username chosen by the user for their Whop profile. Null if the user + # has not set a username. + sig { returns(T.nilable(String)) } + attr_accessor :username + + # The user attached to this affiliate + sig do + params( + id: String, + name: T.nilable(String), + username: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the user. + id:, + # The display name set on the user's Whop profile. Null if the user has not set a + # name. + name:, + # The unique username chosen by the user for their Whop profile. Null if the user + # has not set a username. + username: + ) + end + + sig do + override.returns( + { id: String, name: T.nilable(String), username: T.nilable(String) } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliate_archive_params.rbi b/rbi/whop_sdk/models/affiliate_archive_params.rbi new file mode 100644 index 00000000..c7fb5bd1 --- /dev/null +++ b/rbi/whop_sdk/models/affiliate_archive_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AffiliateArchiveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AffiliateArchiveParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliate_archive_response.rbi b/rbi/whop_sdk/models/affiliate_archive_response.rbi new file mode 100644 index 00000000..ce9e759c --- /dev/null +++ b/rbi/whop_sdk/models/affiliate_archive_response.rbi @@ -0,0 +1,8 @@ +# typed: strong + +module WhopSDK + module Models + AffiliateArchiveResponse = + T.let(T::Boolean, WhopSDK::Internal::Type::Converter) + end +end diff --git a/rbi/whop_sdk/models/affiliate_create_params.rbi b/rbi/whop_sdk/models/affiliate_create_params.rbi new file mode 100644 index 00000000..49eb7d79 --- /dev/null +++ b/rbi/whop_sdk/models/affiliate_create_params.rbi @@ -0,0 +1,51 @@ +# typed: strong + +module WhopSDK + module Models + class AffiliateCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AffiliateCreateParams, WhopSDK::Internal::AnyHash) + end + + # The ID of the company to create the affiliate for. + sig { returns(String) } + attr_accessor :company_id + + # The user identifier (username, email, user ID, or Discord ID). + sig { returns(String) } + attr_accessor :user_identifier + + sig do + params( + company_id: String, + user_identifier: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The ID of the company to create the affiliate for. + company_id:, + # The user identifier (username, email, user ID, or Discord ID). + user_identifier:, + request_options: {} + ) + end + + sig do + override.returns( + { + company_id: String, + user_identifier: String, + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliate_list_params.rbi b/rbi/whop_sdk/models/affiliate_list_params.rbi new file mode 100644 index 00000000..3e4c7130 --- /dev/null +++ b/rbi/whop_sdk/models/affiliate_list_params.rbi @@ -0,0 +1,138 @@ +# typed: strong + +module WhopSDK + module Models + class AffiliateListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AffiliateListParams, WhopSDK::Internal::AnyHash) + end + + # The unique identifier of the company to list affiliates for. + sig { returns(String) } + attr_accessor :company_id + + # Returns the elements in the list that come after the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :after + + # Returns the elements in the list that come before the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :before + + # The direction of the sort. + sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) } + attr_accessor :direction + + # Returns the first _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :first + + # Returns the last _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :last + + # Which columns can be used to sort. + sig { returns(T.nilable(WhopSDK::AffiliateListParams::Order::OrSymbol)) } + attr_accessor :order + + # Search affiliates by username. + sig { returns(T.nilable(String)) } + attr_accessor :query + + # Statuses for resources + sig { returns(T.nilable(WhopSDK::Status::OrSymbol)) } + attr_accessor :status + + sig do + params( + company_id: String, + after: T.nilable(String), + before: T.nilable(String), + direction: T.nilable(WhopSDK::Direction::OrSymbol), + first: T.nilable(Integer), + last: T.nilable(Integer), + order: T.nilable(WhopSDK::AffiliateListParams::Order::OrSymbol), + query: T.nilable(String), + status: T.nilable(WhopSDK::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The unique identifier of the company to list affiliates for. + company_id:, + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # The direction of the sort. + direction: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # Which columns can be used to sort. + order: nil, + # Search affiliates by username. + query: nil, + # Statuses for resources + status: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + company_id: String, + after: T.nilable(String), + before: T.nilable(String), + direction: T.nilable(WhopSDK::Direction::OrSymbol), + first: T.nilable(Integer), + last: T.nilable(Integer), + order: T.nilable(WhopSDK::AffiliateListParams::Order::OrSymbol), + query: T.nilable(String), + status: T.nilable(WhopSDK::Status::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # Which columns can be used to sort. + module Order + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::AffiliateListParams::Order) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ID = T.let(:id, WhopSDK::AffiliateListParams::Order::TaggedSymbol) + CREATED_AT = + T.let(:created_at, WhopSDK::AffiliateListParams::Order::TaggedSymbol) + CACHED_TOTAL_REFERRALS = + T.let( + :cached_total_referrals, + WhopSDK::AffiliateListParams::Order::TaggedSymbol + ) + CACHED_TOTAL_REWARDS = + T.let( + :cached_total_rewards, + WhopSDK::AffiliateListParams::Order::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::AffiliateListParams::Order::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliate_list_response.rbi b/rbi/whop_sdk/models/affiliate_list_response.rbi new file mode 100644 index 00000000..f5e3e67b --- /dev/null +++ b/rbi/whop_sdk/models/affiliate_list_response.rbi @@ -0,0 +1,241 @@ +# typed: strong + +module WhopSDK + module Models + class AffiliateListResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AffiliateListResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the affiliate. + sig { returns(String) } + attr_accessor :id + + # The total active members of the affiliate + sig { returns(Integer) } + attr_accessor :active_members_count + + # The company attached to this affiliate + sig { returns(WhopSDK::Models::AffiliateListResponse::Company) } + attr_reader :company + + sig do + params( + company: WhopSDK::Models::AffiliateListResponse::Company::OrHash + ).void + end + attr_writer :company + + # The datetime the affiliate was created. + sig { returns(Time) } + attr_accessor :created_at + + # How many referrals have remained since they joined as members + sig { returns(String) } + attr_accessor :customer_retention_rate + + # A rolling 90-day retention rate for this affiliate + sig { returns(String) } + attr_accessor :customer_retention_rate_ninety_days + + # The total MRR of the affiliate + sig { returns(String) } + attr_accessor :monthly_recurring_revenue_usd + + # Statuses for resources + sig { returns(T.nilable(WhopSDK::Status::TaggedSymbol)) } + attr_accessor :status + + # The total count of all overrides for this affiliate + sig { returns(Integer) } + attr_accessor :total_overrides_count + + # The total earnings of the affiliate from the users they referred + sig { returns(String) } + attr_accessor :total_referral_earnings_usd + + # The total referrals of the affiliate + sig { returns(Integer) } + attr_accessor :total_referrals_count + + # The total revenue of the affiliate from their referrals + sig { returns(String) } + attr_accessor :total_revenue_usd + + # The datetime the affiliate was last updated. + sig { returns(Time) } + attr_accessor :updated_at + + # The user attached to this affiliate + sig { returns(WhopSDK::Models::AffiliateListResponse::User) } + attr_reader :user + + sig do + params(user: WhopSDK::Models::AffiliateListResponse::User::OrHash).void + end + attr_writer :user + + # An affiliate of a company or a global affiliate + sig do + params( + id: String, + active_members_count: Integer, + company: WhopSDK::Models::AffiliateListResponse::Company::OrHash, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: T.nilable(WhopSDK::Status::OrSymbol), + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Models::AffiliateListResponse::User::OrHash + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the affiliate. + id:, + # The total active members of the affiliate + active_members_count:, + # The company attached to this affiliate + company:, + # The datetime the affiliate was created. + created_at:, + # How many referrals have remained since they joined as members + customer_retention_rate:, + # A rolling 90-day retention rate for this affiliate + customer_retention_rate_ninety_days:, + # The total MRR of the affiliate + monthly_recurring_revenue_usd:, + # Statuses for resources + status:, + # The total count of all overrides for this affiliate + total_overrides_count:, + # The total earnings of the affiliate from the users they referred + total_referral_earnings_usd:, + # The total referrals of the affiliate + total_referrals_count:, + # The total revenue of the affiliate from their referrals + total_revenue_usd:, + # The datetime the affiliate was last updated. + updated_at:, + # The user attached to this affiliate + user: + ) + end + + sig do + override.returns( + { + id: String, + active_members_count: Integer, + company: WhopSDK::Models::AffiliateListResponse::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: T.nilable(WhopSDK::Status::TaggedSymbol), + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Models::AffiliateListResponse::User + } + ) + end + def to_hash + end + + class Company < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AffiliateListResponse::Company, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the company. + sig { returns(String) } + attr_accessor :id + + # The written name of the company. + sig { returns(String) } + attr_accessor :title + + # The company attached to this affiliate + sig { params(id: String, title: String).returns(T.attached_class) } + def self.new( + # The unique identifier for the company. + id:, + # The written name of the company. + title: + ) + end + + sig { override.returns({ id: String, title: String }) } + def to_hash + end + end + + class User < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::AffiliateListResponse::User, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the user. + sig { returns(String) } + attr_accessor :id + + # The display name set on the user's Whop profile. Null if the user has not set a + # name. + sig { returns(T.nilable(String)) } + attr_accessor :name + + # The unique username chosen by the user for their Whop profile. Null if the user + # has not set a username. + sig { returns(T.nilable(String)) } + attr_accessor :username + + # The user attached to this affiliate + sig do + params( + id: String, + name: T.nilable(String), + username: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the user. + id:, + # The display name set on the user's Whop profile. Null if the user has not set a + # name. + name:, + # The unique username chosen by the user for their Whop profile. Null if the user + # has not set a username. + username: + ) + end + + sig do + override.returns( + { id: String, name: T.nilable(String), username: T.nilable(String) } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliate_retrieve_params.rbi b/rbi/whop_sdk/models/affiliate_retrieve_params.rbi new file mode 100644 index 00000000..e3eafbc6 --- /dev/null +++ b/rbi/whop_sdk/models/affiliate_retrieve_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AffiliateRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AffiliateRetrieveParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliate_unarchive_params.rbi b/rbi/whop_sdk/models/affiliate_unarchive_params.rbi new file mode 100644 index 00000000..8b7709b5 --- /dev/null +++ b/rbi/whop_sdk/models/affiliate_unarchive_params.rbi @@ -0,0 +1,35 @@ +# typed: strong + +module WhopSDK + module Models + class AffiliateUnarchiveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any(WhopSDK::AffiliateUnarchiveParams, WhopSDK::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, request_options: {}) + end + + sig do + override.returns( + { id: String, request_options: WhopSDK::RequestOptions } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliate_unarchive_response.rbi b/rbi/whop_sdk/models/affiliate_unarchive_response.rbi new file mode 100644 index 00000000..146dd75f --- /dev/null +++ b/rbi/whop_sdk/models/affiliate_unarchive_response.rbi @@ -0,0 +1,8 @@ +# typed: strong + +module WhopSDK + module Models + AffiliateUnarchiveResponse = + T.let(T::Boolean, WhopSDK::Internal::Type::Converter) + end +end diff --git a/rbi/whop_sdk/models/affiliates/affiliate_applies_to_payments.rbi b/rbi/whop_sdk/models/affiliates/affiliate_applies_to_payments.rbi new file mode 100644 index 00000000..7edbe5f8 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/affiliate_applies_to_payments.rbi @@ -0,0 +1,41 @@ +# typed: strong + +module WhopSDK + module Models + AffiliateAppliesToPayments = Affiliates::AffiliateAppliesToPayments + + module Affiliates + # Whether the affiliate commission applies to the first payment or all payments + module AffiliateAppliesToPayments + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Affiliates::AffiliateAppliesToPayments) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + FIRST_PAYMENT = + T.let( + :first_payment, + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ) + ALL_PAYMENTS = + T.let( + :all_payments, + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/affiliate_applies_to_products.rbi b/rbi/whop_sdk/models/affiliates/affiliate_applies_to_products.rbi new file mode 100644 index 00000000..11e6561e --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/affiliate_applies_to_products.rbi @@ -0,0 +1,41 @@ +# typed: strong + +module WhopSDK + module Models + AffiliateAppliesToProducts = Affiliates::AffiliateAppliesToProducts + + module Affiliates + # Whether a rev-share override applies to a single product or all products + module AffiliateAppliesToProducts + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Affiliates::AffiliateAppliesToProducts) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + SINGLE_PRODUCT = + T.let( + :single_product, + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ) + ALL_PRODUCTS = + T.let( + :all_products, + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/affiliate_override_roles.rbi b/rbi/whop_sdk/models/affiliates/affiliate_override_roles.rbi new file mode 100644 index 00000000..0b27f655 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/affiliate_override_roles.rbi @@ -0,0 +1,39 @@ +# typed: strong + +module WhopSDK + module Models + AffiliateOverrideRoles = Affiliates::AffiliateOverrideRoles + + module Affiliates + # The role of an affiliate override (standard or rev_share) + module AffiliateOverrideRoles + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Affiliates::AffiliateOverrideRoles) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + STANDARD = + T.let( + :standard, + WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol + ) + REV_SHARE = + T.let( + :rev_share, + WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/affiliate_payout_types.rbi b/rbi/whop_sdk/models/affiliates/affiliate_payout_types.rbi new file mode 100644 index 00000000..84f31015 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/affiliate_payout_types.rbi @@ -0,0 +1,39 @@ +# typed: strong + +module WhopSDK + module Models + AffiliatePayoutTypes = Affiliates::AffiliatePayoutTypes + + module Affiliates + # The types of payouts an affiliate can have + module AffiliatePayoutTypes + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Affiliates::AffiliatePayoutTypes) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PERCENTAGE = + T.let( + :percentage, + WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol + ) + FLAT_FEE = + T.let( + :flat_fee, + WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/affiliate_revenue_bases.rbi b/rbi/whop_sdk/models/affiliates/affiliate_revenue_bases.rbi new file mode 100644 index 00000000..bea02652 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/affiliate_revenue_bases.rbi @@ -0,0 +1,39 @@ +# typed: strong + +module WhopSDK + module Models + AffiliateRevenueBases = Affiliates::AffiliateRevenueBases + + module Affiliates + # The calculation method for affiliate rev-share percentages + module AffiliateRevenueBases + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, WhopSDK::Affiliates::AffiliateRevenueBases) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRE_FEES = + T.let( + :pre_fees, + WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol + ) + POST_FEES = + T.let( + :post_fees, + WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol + ) + + sig do + override.returns( + T::Array[WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_create_params.rbi b/rbi/whop_sdk/models/affiliates/override_create_params.rbi new file mode 100644 index 00000000..0c331737 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_create_params.rbi @@ -0,0 +1,282 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + WhopSDK::Affiliates::OverrideCreateParams, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # Parameters for CreateAffiliateOverride + sig do + returns( + T.any( + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard, + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare + ) + ) + end + attr_accessor :body + + sig do + params( + id: String, + body: + T.any( + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard::OrHash, + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare::OrHash + ), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # Parameters for CreateAffiliateOverride + body:, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + body: + T.any( + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard, + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare + ), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + + # Parameters for CreateAffiliateOverride + module Body + extend WhopSDK::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard, + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare + ) + end + + class CreateAffiliateOverrideInputOverrideTypeStandard < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard, + WhopSDK::Internal::AnyHash + ) + end + + # The affiliate ID. + sig { returns(String) } + attr_accessor :id + + # The commission value (percentage 1-100 or flat fee). + sig { returns(Float) } + attr_accessor :commission_value + + sig { returns(Symbol) } + attr_accessor :override_type + + # The plan ID (required for standard overrides). + sig { returns(String) } + attr_accessor :plan_id + + # Whether the affiliate commission applies to the first payment or all payments + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ) + ) + end + attr_accessor :applies_to_payments + + # The types of payouts an affiliate can have + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol) + ) + end + attr_accessor :commission_type + + # Autogenerated input type of CreateAffiliateOverride + sig do + params( + id: String, + commission_value: Float, + plan_id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + commission_type: + T.nilable( + WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol + ), + override_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The affiliate ID. + id:, + # The commission value (percentage 1-100 or flat fee). + commission_value:, + # The plan ID (required for standard overrides). + plan_id:, + # Whether the affiliate commission applies to the first payment or all payments + applies_to_payments: nil, + # The types of payouts an affiliate can have + commission_type: nil, + override_type: :standard + ) + end + + sig do + override.returns( + { + id: String, + commission_value: Float, + override_type: Symbol, + plan_id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + commission_type: + T.nilable( + WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol + ) + } + ) + end + def to_hash + end + end + + class CreateAffiliateOverrideInputOverrideTypeRevShare < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare, + WhopSDK::Internal::AnyHash + ) + end + + # The affiliate ID. + sig { returns(String) } + attr_accessor :id + + # The commission value (percentage 1-100 or flat fee). + sig { returns(Float) } + attr_accessor :commission_value + + sig { returns(Symbol) } + attr_accessor :override_type + + # The types of payouts an affiliate can have + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol) + ) + end + attr_accessor :commission_type + + # The product ID (for rev-share overrides, omit for company-wide). + sig { returns(T.nilable(String)) } + attr_accessor :product_id + + # The calculation method for affiliate rev-share percentages + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol) + ) + end + attr_accessor :revenue_basis + + # Autogenerated input type of CreateAffiliateOverride + sig do + params( + id: String, + commission_value: Float, + commission_type: + T.nilable( + WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol + ), + product_id: T.nilable(String), + revenue_basis: + T.nilable( + WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol + ), + override_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The affiliate ID. + id:, + # The commission value (percentage 1-100 or flat fee). + commission_value:, + # The types of payouts an affiliate can have + commission_type: nil, + # The product ID (for rev-share overrides, omit for company-wide). + product_id: nil, + # The calculation method for affiliate rev-share percentages + revenue_basis: nil, + override_type: :rev_share + ) + end + + sig do + override.returns( + { + id: String, + commission_value: Float, + override_type: Symbol, + commission_type: + T.nilable( + WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol + ), + product_id: T.nilable(String), + revenue_basis: + T.nilable( + WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol + ) + } + ) + end + def to_hash + end + end + + sig do + override.returns( + T::Array[ + WhopSDK::Affiliates::OverrideCreateParams::Body::Variants + ] + ) + end + def self.variants + end + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_create_response.rbi b/rbi/whop_sdk/models/affiliates/override_create_response.rbi new file mode 100644 index 00000000..4ea3a841 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_create_response.rbi @@ -0,0 +1,171 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideCreateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::Affiliates::OverrideCreateResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the affiliate override. + sig { returns(String) } + attr_accessor :id + + # Whether the affiliate commission applies to the first payment or all payments + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ) + ) + end + attr_accessor :applies_to_payments + + # Whether a rev-share override applies to a single product or all products + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ) + ) + end + attr_accessor :applies_to_products + + # The checkout direct link for referrals (standard overrides only). + sig { returns(T.nilable(String)) } + attr_accessor :checkout_direct_link + + # The type of commission (percentage or flat_fee). + sig { returns(WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol) } + attr_accessor :commission_type + + # The commission value (percentage 1-100 or flat fee in dollars). + sig { returns(Float) } + attr_accessor :commission_value + + # The type of override (standard or rev_share). + sig do + returns(WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol) + end + attr_accessor :override_type + + # The plan ID (for standard overrides). + sig { returns(T.nilable(String)) } + attr_accessor :plan_id + + # The product page direct link for referrals (standard overrides only). + sig { returns(T.nilable(String)) } + attr_accessor :product_direct_link + + # The product ID (for rev-share overrides). + sig { returns(T.nilable(String)) } + attr_accessor :product_id + + # The calculation method for affiliate rev-share percentages + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol) + ) + end + attr_accessor :revenue_basis + + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + sig { returns(Float) } + attr_accessor :total_referral_earnings_usd + + # An object storing information about the affiliate + sig do + params( + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + applies_to_products: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::OrSymbol + ), + checkout_direct_link: T.nilable(String), + commission_type: + WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol, + commission_value: Float, + override_type: + WhopSDK::Affiliates::AffiliateOverrideRoles::OrSymbol, + plan_id: T.nilable(String), + product_direct_link: T.nilable(String), + product_id: T.nilable(String), + revenue_basis: + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol), + total_referral_earnings_usd: Float + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the affiliate override. + id:, + # Whether the affiliate commission applies to the first payment or all payments + applies_to_payments:, + # Whether a rev-share override applies to a single product or all products + applies_to_products:, + # The checkout direct link for referrals (standard overrides only). + checkout_direct_link:, + # The type of commission (percentage or flat_fee). + commission_type:, + # The commission value (percentage 1-100 or flat fee in dollars). + commission_value:, + # The type of override (standard or rev_share). + override_type:, + # The plan ID (for standard overrides). + plan_id:, + # The product page direct link for referrals (standard overrides only). + product_direct_link:, + # The product ID (for rev-share overrides). + product_id:, + # The calculation method for affiliate rev-share percentages + revenue_basis:, + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + total_referral_earnings_usd: + ) + end + + sig do + override.returns( + { + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ), + applies_to_products: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ), + checkout_direct_link: T.nilable(String), + commission_type: + WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol, + commission_value: Float, + override_type: + WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol, + plan_id: T.nilable(String), + product_direct_link: T.nilable(String), + product_id: T.nilable(String), + revenue_basis: + T.nilable( + WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol + ), + total_referral_earnings_usd: Float + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_delete_params.rbi b/rbi/whop_sdk/models/affiliates/override_delete_params.rbi new file mode 100644 index 00000000..614a9a4a --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_delete_params.rbi @@ -0,0 +1,48 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideDeleteParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + WhopSDK::Affiliates::OverrideDeleteParams, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :override_id + + sig do + params( + id: String, + override_id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, override_id:, request_options: {}) + end + + sig do + override.returns( + { + id: String, + override_id: String, + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_delete_response.rbi b/rbi/whop_sdk/models/affiliates/override_delete_response.rbi new file mode 100644 index 00000000..0a92a878 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_delete_response.rbi @@ -0,0 +1,10 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + OverrideDeleteResponse = + T.let(T::Boolean, WhopSDK::Internal::Type::Converter) + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_list_params.rbi b/rbi/whop_sdk/models/affiliates/override_list_params.rbi new file mode 100644 index 00000000..013ad523 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_list_params.rbi @@ -0,0 +1,94 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + WhopSDK::Affiliates::OverrideListParams, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + # Returns the elements in the list that come after the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :after + + # Returns the elements in the list that come before the specified cursor. + sig { returns(T.nilable(String)) } + attr_accessor :before + + # Returns the first _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :first + + # Returns the last _n_ elements from the list. + sig { returns(T.nilable(Integer)) } + attr_accessor :last + + # The role of an affiliate override (standard or rev_share) + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliateOverrideRoles::OrSymbol) + ) + end + attr_accessor :override_type + + sig do + params( + id: String, + after: T.nilable(String), + before: T.nilable(String), + first: T.nilable(Integer), + last: T.nilable(Integer), + override_type: + T.nilable(WhopSDK::Affiliates::AffiliateOverrideRoles::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # The role of an affiliate override (standard or rev_share) + override_type: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + after: T.nilable(String), + before: T.nilable(String), + first: T.nilable(Integer), + last: T.nilable(Integer), + override_type: + T.nilable( + WhopSDK::Affiliates::AffiliateOverrideRoles::OrSymbol + ), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_list_response.rbi b/rbi/whop_sdk/models/affiliates/override_list_response.rbi new file mode 100644 index 00000000..179cd883 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_list_response.rbi @@ -0,0 +1,171 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideListResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::Affiliates::OverrideListResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the affiliate override. + sig { returns(String) } + attr_accessor :id + + # Whether the affiliate commission applies to the first payment or all payments + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ) + ) + end + attr_accessor :applies_to_payments + + # Whether a rev-share override applies to a single product or all products + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ) + ) + end + attr_accessor :applies_to_products + + # The checkout direct link for referrals (standard overrides only). + sig { returns(T.nilable(String)) } + attr_accessor :checkout_direct_link + + # The type of commission (percentage or flat_fee). + sig { returns(WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol) } + attr_accessor :commission_type + + # The commission value (percentage 1-100 or flat fee in dollars). + sig { returns(Float) } + attr_accessor :commission_value + + # The type of override (standard or rev_share). + sig do + returns(WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol) + end + attr_accessor :override_type + + # The plan ID (for standard overrides). + sig { returns(T.nilable(String)) } + attr_accessor :plan_id + + # The product page direct link for referrals (standard overrides only). + sig { returns(T.nilable(String)) } + attr_accessor :product_direct_link + + # The product ID (for rev-share overrides). + sig { returns(T.nilable(String)) } + attr_accessor :product_id + + # The calculation method for affiliate rev-share percentages + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol) + ) + end + attr_accessor :revenue_basis + + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + sig { returns(Float) } + attr_accessor :total_referral_earnings_usd + + # An object storing information about the affiliate + sig do + params( + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + applies_to_products: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::OrSymbol + ), + checkout_direct_link: T.nilable(String), + commission_type: + WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol, + commission_value: Float, + override_type: + WhopSDK::Affiliates::AffiliateOverrideRoles::OrSymbol, + plan_id: T.nilable(String), + product_direct_link: T.nilable(String), + product_id: T.nilable(String), + revenue_basis: + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol), + total_referral_earnings_usd: Float + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the affiliate override. + id:, + # Whether the affiliate commission applies to the first payment or all payments + applies_to_payments:, + # Whether a rev-share override applies to a single product or all products + applies_to_products:, + # The checkout direct link for referrals (standard overrides only). + checkout_direct_link:, + # The type of commission (percentage or flat_fee). + commission_type:, + # The commission value (percentage 1-100 or flat fee in dollars). + commission_value:, + # The type of override (standard or rev_share). + override_type:, + # The plan ID (for standard overrides). + plan_id:, + # The product page direct link for referrals (standard overrides only). + product_direct_link:, + # The product ID (for rev-share overrides). + product_id:, + # The calculation method for affiliate rev-share percentages + revenue_basis:, + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + total_referral_earnings_usd: + ) + end + + sig do + override.returns( + { + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ), + applies_to_products: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ), + checkout_direct_link: T.nilable(String), + commission_type: + WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol, + commission_value: Float, + override_type: + WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol, + plan_id: T.nilable(String), + product_direct_link: T.nilable(String), + product_id: T.nilable(String), + revenue_basis: + T.nilable( + WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol + ), + total_referral_earnings_usd: Float + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_retrieve_params.rbi b/rbi/whop_sdk/models/affiliates/override_retrieve_params.rbi new file mode 100644 index 00000000..5c106993 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_retrieve_params.rbi @@ -0,0 +1,48 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + WhopSDK::Affiliates::OverrideRetrieveParams, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :override_id + + sig do + params( + id: String, + override_id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new(id:, override_id:, request_options: {}) + end + + sig do + override.returns( + { + id: String, + override_id: String, + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_retrieve_response.rbi b/rbi/whop_sdk/models/affiliates/override_retrieve_response.rbi new file mode 100644 index 00000000..1e904eb2 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_retrieve_response.rbi @@ -0,0 +1,171 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideRetrieveResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::Affiliates::OverrideRetrieveResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the affiliate override. + sig { returns(String) } + attr_accessor :id + + # Whether the affiliate commission applies to the first payment or all payments + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ) + ) + end + attr_accessor :applies_to_payments + + # Whether a rev-share override applies to a single product or all products + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ) + ) + end + attr_accessor :applies_to_products + + # The checkout direct link for referrals (standard overrides only). + sig { returns(T.nilable(String)) } + attr_accessor :checkout_direct_link + + # The type of commission (percentage or flat_fee). + sig { returns(WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol) } + attr_accessor :commission_type + + # The commission value (percentage 1-100 or flat fee in dollars). + sig { returns(Float) } + attr_accessor :commission_value + + # The type of override (standard or rev_share). + sig do + returns(WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol) + end + attr_accessor :override_type + + # The plan ID (for standard overrides). + sig { returns(T.nilable(String)) } + attr_accessor :plan_id + + # The product page direct link for referrals (standard overrides only). + sig { returns(T.nilable(String)) } + attr_accessor :product_direct_link + + # The product ID (for rev-share overrides). + sig { returns(T.nilable(String)) } + attr_accessor :product_id + + # The calculation method for affiliate rev-share percentages + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol) + ) + end + attr_accessor :revenue_basis + + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + sig { returns(Float) } + attr_accessor :total_referral_earnings_usd + + # An object storing information about the affiliate + sig do + params( + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + applies_to_products: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::OrSymbol + ), + checkout_direct_link: T.nilable(String), + commission_type: + WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol, + commission_value: Float, + override_type: + WhopSDK::Affiliates::AffiliateOverrideRoles::OrSymbol, + plan_id: T.nilable(String), + product_direct_link: T.nilable(String), + product_id: T.nilable(String), + revenue_basis: + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol), + total_referral_earnings_usd: Float + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the affiliate override. + id:, + # Whether the affiliate commission applies to the first payment or all payments + applies_to_payments:, + # Whether a rev-share override applies to a single product or all products + applies_to_products:, + # The checkout direct link for referrals (standard overrides only). + checkout_direct_link:, + # The type of commission (percentage or flat_fee). + commission_type:, + # The commission value (percentage 1-100 or flat fee in dollars). + commission_value:, + # The type of override (standard or rev_share). + override_type:, + # The plan ID (for standard overrides). + plan_id:, + # The product page direct link for referrals (standard overrides only). + product_direct_link:, + # The product ID (for rev-share overrides). + product_id:, + # The calculation method for affiliate rev-share percentages + revenue_basis:, + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + total_referral_earnings_usd: + ) + end + + sig do + override.returns( + { + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ), + applies_to_products: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ), + checkout_direct_link: T.nilable(String), + commission_type: + WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol, + commission_value: Float, + override_type: + WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol, + plan_id: T.nilable(String), + product_direct_link: T.nilable(String), + product_id: T.nilable(String), + revenue_basis: + T.nilable( + WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol + ), + total_referral_earnings_usd: Float + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_update_params.rbi b/rbi/whop_sdk/models/affiliates/override_update_params.rbi new file mode 100644 index 00000000..67522066 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_update_params.rbi @@ -0,0 +1,106 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + WhopSDK::Affiliates::OverrideUpdateParams, + WhopSDK::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(String) } + attr_accessor :override_id + + # Whether the affiliate commission applies to the first payment or all payments + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol) + ) + end + attr_accessor :applies_to_payments + + # The types of payouts an affiliate can have + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol) + ) + end + attr_accessor :commission_type + + # The commission value (percentage 1-100 or flat fee in dollars). + sig { returns(T.nilable(Float)) } + attr_accessor :commission_value + + # The calculation method for affiliate rev-share percentages + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol) + ) + end + attr_accessor :revenue_basis + + sig do + params( + id: String, + override_id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + commission_type: + T.nilable(WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol), + commission_value: T.nilable(Float), + revenue_basis: + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + id:, + override_id:, + # Whether the affiliate commission applies to the first payment or all payments + applies_to_payments: nil, + # The types of payouts an affiliate can have + commission_type: nil, + # The commission value (percentage 1-100 or flat fee in dollars). + commission_value: nil, + # The calculation method for affiliate rev-share percentages + revenue_basis: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + id: String, + override_id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + commission_type: + T.nilable(WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol), + commission_value: T.nilable(Float), + revenue_basis: + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol), + request_options: WhopSDK::RequestOptions + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/affiliates/override_update_response.rbi b/rbi/whop_sdk/models/affiliates/override_update_response.rbi new file mode 100644 index 00000000..5cc2caf9 --- /dev/null +++ b/rbi/whop_sdk/models/affiliates/override_update_response.rbi @@ -0,0 +1,171 @@ +# typed: strong + +module WhopSDK + module Models + module Affiliates + class OverrideUpdateResponse < WhopSDK::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + WhopSDK::Models::Affiliates::OverrideUpdateResponse, + WhopSDK::Internal::AnyHash + ) + end + + # The unique identifier for the affiliate override. + sig { returns(String) } + attr_accessor :id + + # Whether the affiliate commission applies to the first payment or all payments + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ) + ) + end + attr_accessor :applies_to_payments + + # Whether a rev-share override applies to a single product or all products + sig do + returns( + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ) + ) + end + attr_accessor :applies_to_products + + # The checkout direct link for referrals (standard overrides only). + sig { returns(T.nilable(String)) } + attr_accessor :checkout_direct_link + + # The type of commission (percentage or flat_fee). + sig { returns(WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol) } + attr_accessor :commission_type + + # The commission value (percentage 1-100 or flat fee in dollars). + sig { returns(Float) } + attr_accessor :commission_value + + # The type of override (standard or rev_share). + sig do + returns(WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol) + end + attr_accessor :override_type + + # The plan ID (for standard overrides). + sig { returns(T.nilable(String)) } + attr_accessor :plan_id + + # The product page direct link for referrals (standard overrides only). + sig { returns(T.nilable(String)) } + attr_accessor :product_direct_link + + # The product ID (for rev-share overrides). + sig { returns(T.nilable(String)) } + attr_accessor :product_id + + # The calculation method for affiliate rev-share percentages + sig do + returns( + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol) + ) + end + attr_accessor :revenue_basis + + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + sig { returns(Float) } + attr_accessor :total_referral_earnings_usd + + # An object storing information about the affiliate + sig do + params( + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + applies_to_products: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::OrSymbol + ), + checkout_direct_link: T.nilable(String), + commission_type: + WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol, + commission_value: Float, + override_type: + WhopSDK::Affiliates::AffiliateOverrideRoles::OrSymbol, + plan_id: T.nilable(String), + product_direct_link: T.nilable(String), + product_id: T.nilable(String), + revenue_basis: + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol), + total_referral_earnings_usd: Float + ).returns(T.attached_class) + end + def self.new( + # The unique identifier for the affiliate override. + id:, + # Whether the affiliate commission applies to the first payment or all payments + applies_to_payments:, + # Whether a rev-share override applies to a single product or all products + applies_to_products:, + # The checkout direct link for referrals (standard overrides only). + checkout_direct_link:, + # The type of commission (percentage or flat_fee). + commission_type:, + # The commission value (percentage 1-100 or flat fee in dollars). + commission_value:, + # The type of override (standard or rev_share). + override_type:, + # The plan ID (for standard overrides). + plan_id:, + # The product page direct link for referrals (standard overrides only). + product_direct_link:, + # The product ID (for rev-share overrides). + product_id:, + # The calculation method for affiliate rev-share percentages + revenue_basis:, + # The total earnings paid to this affiliate for referrals to this specific plan, + # in USD. + total_referral_earnings_usd: + ) + end + + sig do + override.returns( + { + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::TaggedSymbol + ), + applies_to_products: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToProducts::TaggedSymbol + ), + checkout_direct_link: T.nilable(String), + commission_type: + WhopSDK::Affiliates::AffiliatePayoutTypes::TaggedSymbol, + commission_value: Float, + override_type: + WhopSDK::Affiliates::AffiliateOverrideRoles::TaggedSymbol, + plan_id: T.nilable(String), + product_direct_link: T.nilable(String), + product_id: T.nilable(String), + revenue_basis: + T.nilable( + WhopSDK::Affiliates::AffiliateRevenueBases::TaggedSymbol + ), + total_referral_earnings_usd: Float + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/whop_sdk/models/ai_chat.rbi b/rbi/whop_sdk/models/ai_chat.rbi index 728c6339..4e947a9c 100644 --- a/rbi/whop_sdk/models/ai_chat.rbi +++ b/rbi/whop_sdk/models/ai_chat.rbi @@ -29,7 +29,7 @@ module WhopSDK # The notification preference for this AI chat. `all` delivers AI chat # notifications and badges, while `none` mutes them. - sig { returns(WhopSDK::AIChat::NotificationPreference::TaggedSymbol) } + sig { returns(WhopSDK::NotificationPreferences::TaggedSymbol) } attr_accessor :notification_preference # A short descriptive title for this AI chat conversation. Null if no title has @@ -57,8 +57,7 @@ module WhopSDK created_at: Time, last_message_at: T.nilable(Time), message_count: Integer, - notification_preference: - WhopSDK::AIChat::NotificationPreference::OrSymbol, + notification_preference: WhopSDK::NotificationPreferences::OrSymbol, title: T.nilable(String), updated_at: Time, user: WhopSDK::AIChat::User::OrHash @@ -98,7 +97,7 @@ module WhopSDK last_message_at: T.nilable(Time), message_count: Integer, notification_preference: - WhopSDK::AIChat::NotificationPreference::TaggedSymbol, + WhopSDK::NotificationPreferences::TaggedSymbol, title: T.nilable(String), updated_at: Time, user: WhopSDK::AIChat::User @@ -108,30 +107,6 @@ module WhopSDK def to_hash end - # The notification preference for this AI chat. `all` delivers AI chat - # notifications and badges, while `none` mutes them. - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, WhopSDK::AIChat::NotificationPreference) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ALL = T.let(:all, WhopSDK::AIChat::NotificationPreference::TaggedSymbol) - NONE = - T.let(:none, WhopSDK::AIChat::NotificationPreference::TaggedSymbol) - - sig do - override.returns( - T::Array[WhopSDK::AIChat::NotificationPreference::TaggedSymbol] - ) - end - def self.values - end - end - class User < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/whop_sdk/models/ai_chat_list_response.rbi b/rbi/whop_sdk/models/ai_chat_list_response.rbi index 62562b60..32e2f1bc 100644 --- a/rbi/whop_sdk/models/ai_chat_list_response.rbi +++ b/rbi/whop_sdk/models/ai_chat_list_response.rbi @@ -31,11 +31,7 @@ module WhopSDK # The notification preference for this AI chat. `all` delivers AI chat # notifications and badges, while `none` mutes them. - sig do - returns( - WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol - ) - end + sig { returns(WhopSDK::NotificationPreferences::TaggedSymbol) } attr_accessor :notification_preference # A short descriptive title for this AI chat conversation. Null if no title has @@ -65,8 +61,7 @@ module WhopSDK created_at: Time, last_message_at: T.nilable(Time), message_count: Integer, - notification_preference: - WhopSDK::Models::AIChatListResponse::NotificationPreference::OrSymbol, + notification_preference: WhopSDK::NotificationPreferences::OrSymbol, title: T.nilable(String), updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User::OrHash @@ -106,7 +101,7 @@ module WhopSDK last_message_at: T.nilable(Time), message_count: Integer, notification_preference: - WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol, + WhopSDK::NotificationPreferences::TaggedSymbol, title: T.nilable(String), updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User @@ -116,42 +111,6 @@ module WhopSDK def to_hash end - # The notification preference for this AI chat. `all` delivers AI chat - # notifications and badges, while `none` mutes them. - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - WhopSDK::Models::AIChatListResponse::NotificationPreference - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ALL = - T.let( - :all, - WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol - ) - NONE = - T.let( - :none, - WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::Models::AIChatListResponse::NotificationPreference::TaggedSymbol - ] - ) - end - def self.values - end - end - class User < WhopSDK::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/whop_sdk/models/ai_chat_update_params.rbi b/rbi/whop_sdk/models/ai_chat_update_params.rbi index f7dd76fc..112baa52 100644 --- a/rbi/whop_sdk/models/ai_chat_update_params.rbi +++ b/rbi/whop_sdk/models/ai_chat_update_params.rbi @@ -20,13 +20,7 @@ module WhopSDK attr_accessor :current_company_id # The notification preference for an AI chat - sig do - returns( - T.nilable( - WhopSDK::AIChatUpdateParams::NotificationPreference::OrSymbol - ) - ) - end + sig { returns(T.nilable(WhopSDK::NotificationPreferences::OrSymbol)) } attr_accessor :notification_preference # The new display title for the AI chat thread (e.g., "Help with billing"). @@ -38,9 +32,7 @@ module WhopSDK id: String, current_company_id: T.nilable(String), notification_preference: - T.nilable( - WhopSDK::AIChatUpdateParams::NotificationPreference::OrSymbol - ), + T.nilable(WhopSDK::NotificationPreferences::OrSymbol), title: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash ).returns(T.attached_class) @@ -64,9 +56,7 @@ module WhopSDK id: String, current_company_id: T.nilable(String), notification_preference: - T.nilable( - WhopSDK::AIChatUpdateParams::NotificationPreference::OrSymbol - ), + T.nilable(WhopSDK::NotificationPreferences::OrSymbol), title: T.nilable(String), request_options: WhopSDK::RequestOptions } @@ -74,38 +64,6 @@ module WhopSDK end def to_hash end - - # The notification preference for an AI chat - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, WhopSDK::AIChatUpdateParams::NotificationPreference) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ALL = - T.let( - :all, - WhopSDK::AIChatUpdateParams::NotificationPreference::TaggedSymbol - ) - NONE = - T.let( - :none, - WhopSDK::AIChatUpdateParams::NotificationPreference::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - WhopSDK::AIChatUpdateParams::NotificationPreference::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/whop_sdk/models/notification_preferences.rbi b/rbi/whop_sdk/models/notification_preferences.rbi new file mode 100644 index 00000000..835b5790 --- /dev/null +++ b/rbi/whop_sdk/models/notification_preferences.rbi @@ -0,0 +1,25 @@ +# typed: strong + +module WhopSDK + module Models + # The notification preference for an AI chat + module NotificationPreferences + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, WhopSDK::NotificationPreferences) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ALL = T.let(:all, WhopSDK::NotificationPreferences::TaggedSymbol) + NONE = T.let(:none, WhopSDK::NotificationPreferences::TaggedSymbol) + + sig do + override.returns( + T::Array[WhopSDK::NotificationPreferences::TaggedSymbol] + ) + end + def self.values + end + end + end +end diff --git a/rbi/whop_sdk/models/status.rbi b/rbi/whop_sdk/models/status.rbi new file mode 100644 index 00000000..d236e9b1 --- /dev/null +++ b/rbi/whop_sdk/models/status.rbi @@ -0,0 +1,21 @@ +# typed: strong + +module WhopSDK + module Models + # Statuses for resources + module Status + extend WhopSDK::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::Status) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ACTIVE = T.let(:active, WhopSDK::Status::TaggedSymbol) + ARCHIVED = T.let(:archived, WhopSDK::Status::TaggedSymbol) + DELETED = T.let(:deleted, WhopSDK::Status::TaggedSymbol) + + sig { override.returns(T::Array[WhopSDK::Status::TaggedSymbol]) } + def self.values + end + end + end +end diff --git a/rbi/whop_sdk/resources/affiliates.rbi b/rbi/whop_sdk/resources/affiliates.rbi new file mode 100644 index 00000000..37674e7e --- /dev/null +++ b/rbi/whop_sdk/resources/affiliates.rbi @@ -0,0 +1,137 @@ +# typed: strong + +module WhopSDK + module Resources + # Affiliates + class Affiliates + # Affiliates + sig { returns(WhopSDK::Resources::Affiliates::Overrides) } + attr_reader :overrides + + # Creates or finds an affiliate for a company and user. + # + # Required permissions: + # + # - `affiliate:create` + sig do + params( + company_id: String, + user_identifier: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Affiliate) + end + def create( + # The ID of the company to create the affiliate for. + company_id:, + # The user identifier (username, email, user ID, or Discord ID). + user_identifier:, + request_options: {} + ) + end + + # Retrieves the details of an existing affiliate. + # + # Required permissions: + # + # - `affiliate:basic:read` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Affiliate) + end + def retrieve( + # The unique identifier of the affiliate. + id, + request_options: {} + ) + end + + # Returns a paginated list of affiliates for the actor in context, with optional + # filtering by status, search, and sorting. + # + # Required permissions: + # + # - `affiliate:basic:read` + sig do + params( + company_id: String, + after: T.nilable(String), + before: T.nilable(String), + direction: T.nilable(WhopSDK::Direction::OrSymbol), + first: T.nilable(Integer), + last: T.nilable(Integer), + order: T.nilable(WhopSDK::AffiliateListParams::Order::OrSymbol), + query: T.nilable(String), + status: T.nilable(WhopSDK::Status::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns( + WhopSDK::Internal::CursorPage[WhopSDK::Models::AffiliateListResponse] + ) + end + def list( + # The unique identifier of the company to list affiliates for. + company_id:, + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # The direction of the sort. + direction: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # Which columns can be used to sort. + order: nil, + # Search affiliates by username. + query: nil, + # Statuses for resources + status: nil, + request_options: {} + ) + end + + # Archives an existing Affiliate + # + # Required permissions: + # + # - `affiliate:update` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T::Boolean) + end + def archive( + # The internal ID of the affiliate to archive. + id, + request_options: {} + ) + end + + # Unarchives an existing Affiliate + # + # Required permissions: + # + # - `affiliate:update` + sig do + params( + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T::Boolean) + end + def unarchive( + # The internal ID of the affiliate to archive. + id, + request_options: {} + ) + end + + # @api private + sig { params(client: WhopSDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/whop_sdk/resources/affiliates/overrides.rbi b/rbi/whop_sdk/resources/affiliates/overrides.rbi new file mode 100644 index 00000000..2875e789 --- /dev/null +++ b/rbi/whop_sdk/resources/affiliates/overrides.rbi @@ -0,0 +1,159 @@ +# typed: strong + +module WhopSDK + module Resources + class Affiliates + # Affiliates + class Overrides + # Creates a commission override for an affiliate. + # + # Required permissions: + # + # - `affiliate:create` + sig do + params( + id: String, + body: + T.any( + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard::OrHash, + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare::OrHash + ), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::Affiliates::OverrideCreateResponse) + end + def create( + # The affiliate ID. + id, + # Parameters for CreateAffiliateOverride + body:, + request_options: {} + ) + end + + # Retrieves the details of a specific affiliate override. + # + # Required permissions: + # + # - `affiliate:basic:read` + sig do + params( + override_id: String, + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::Affiliates::OverrideRetrieveResponse) + end + def retrieve( + # The override ID. + override_id, + # The affiliate ID. + id:, + request_options: {} + ) + end + + # Updates an existing affiliate override. + # + # Required permissions: + # + # - `affiliate:update` + sig do + params( + override_id: String, + id: String, + applies_to_payments: + T.nilable( + WhopSDK::Affiliates::AffiliateAppliesToPayments::OrSymbol + ), + commission_type: + T.nilable(WhopSDK::Affiliates::AffiliatePayoutTypes::OrSymbol), + commission_value: T.nilable(Float), + revenue_basis: + T.nilable(WhopSDK::Affiliates::AffiliateRevenueBases::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns(WhopSDK::Models::Affiliates::OverrideUpdateResponse) + end + def update( + # Path param: The override ID. + override_id, + # Path param: The affiliate ID. + id:, + # Body param: Whether the affiliate commission applies to the first payment or all + # payments + applies_to_payments: nil, + # Body param: The types of payouts an affiliate can have + commission_type: nil, + # Body param: The commission value (percentage 1-100 or flat fee in dollars). + commission_value: nil, + # Body param: The calculation method for affiliate rev-share percentages + revenue_basis: nil, + request_options: {} + ) + end + + # Returns a paginated list of overrides for an affiliate. + # + # Required permissions: + # + # - `affiliate:basic:read` + sig do + params( + id: String, + after: T.nilable(String), + before: T.nilable(String), + first: T.nilable(Integer), + last: T.nilable(Integer), + override_type: + T.nilable(WhopSDK::Affiliates::AffiliateOverrideRoles::OrSymbol), + request_options: WhopSDK::RequestOptions::OrHash + ).returns( + WhopSDK::Internal::CursorPage[ + WhopSDK::Models::Affiliates::OverrideListResponse + ] + ) + end + def list( + # The affiliate ID. + id, + # Returns the elements in the list that come after the specified cursor. + after: nil, + # Returns the elements in the list that come before the specified cursor. + before: nil, + # Returns the first _n_ elements from the list. + first: nil, + # Returns the last _n_ elements from the list. + last: nil, + # The role of an affiliate override (standard or rev_share) + override_type: nil, + request_options: {} + ) + end + + # Deletes an affiliate override. + # + # Required permissions: + # + # - `affiliate:update` + sig do + params( + override_id: String, + id: String, + request_options: WhopSDK::RequestOptions::OrHash + ).returns(T::Boolean) + end + def delete( + # The override ID. + override_id, + # The affiliate ID. + id:, + request_options: {} + ) + end + + # @api private + sig { params(client: WhopSDK::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end +end diff --git a/rbi/whop_sdk/resources/ai_chats.rbi b/rbi/whop_sdk/resources/ai_chats.rbi index 99340e61..db257e4f 100644 --- a/rbi/whop_sdk/resources/ai_chats.rbi +++ b/rbi/whop_sdk/resources/ai_chats.rbi @@ -69,9 +69,7 @@ module WhopSDK id: String, current_company_id: T.nilable(String), notification_preference: - T.nilable( - WhopSDK::AIChatUpdateParams::NotificationPreference::OrSymbol - ), + T.nilable(WhopSDK::NotificationPreferences::OrSymbol), title: T.nilable(String), request_options: WhopSDK::RequestOptions::OrHash ).returns(WhopSDK::AIChat) diff --git a/sig/whop_sdk/client.rbs b/sig/whop_sdk/client.rbs index 65846278..20535135 100644 --- a/sig/whop_sdk/client.rbs +++ b/sig/whop_sdk/client.rbs @@ -118,6 +118,8 @@ module WhopSDK attr_reader payout_accounts: WhopSDK::Resources::PayoutAccounts + attr_reader affiliates: WhopSDK::Resources::Affiliates + private def auth_headers: -> ::Hash[String, String] def initialize: ( diff --git a/sig/whop_sdk/models.rbs b/sig/whop_sdk/models.rbs index 28f37a14..1a80f090 100644 --- a/sig/whop_sdk/models.rbs +++ b/sig/whop_sdk/models.rbs @@ -7,6 +7,20 @@ module WhopSDK class AccountLinkCreateParams = WhopSDK::Models::AccountLinkCreateParams + class Affiliate = WhopSDK::Models::Affiliate + + class AffiliateArchiveParams = WhopSDK::Models::AffiliateArchiveParams + + class AffiliateCreateParams = WhopSDK::Models::AffiliateCreateParams + + class AffiliateListParams = WhopSDK::Models::AffiliateListParams + + class AffiliateRetrieveParams = WhopSDK::Models::AffiliateRetrieveParams + + module Affiliates = WhopSDK::Models::Affiliates + + class AffiliateUnarchiveParams = WhopSDK::Models::AffiliateUnarchiveParams + class AIChat = WhopSDK::Models::AIChat class AIChatCreateParams = WhopSDK::Models::AIChatCreateParams @@ -395,6 +409,8 @@ module WhopSDK class NotificationCreateParams = WhopSDK::Models::NotificationCreateParams + module NotificationPreferences = WhopSDK::Models::NotificationPreferences + class PageInfo = WhopSDK::Models::PageInfo class Payment = WhopSDK::Models::Payment @@ -567,6 +583,8 @@ module WhopSDK module SocialLinkWebsites = WhopSDK::Models::SocialLinkWebsites + module Status = WhopSDK::Models::Status + class SupportChannel = WhopSDK::Models::SupportChannel class SupportChannelCreateParams = WhopSDK::Models::SupportChannelCreateParams diff --git a/sig/whop_sdk/models/affiliate.rbs b/sig/whop_sdk/models/affiliate.rbs new file mode 100644 index 00000000..476cfa64 --- /dev/null +++ b/sig/whop_sdk/models/affiliate.rbs @@ -0,0 +1,111 @@ +module WhopSDK + module Models + type affiliate = + { + id: String, + active_members_count: Integer, + company: WhopSDK::Affiliate::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Models::status?, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Affiliate::User + } + + class Affiliate < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor active_members_count: Integer + + attr_accessor company: WhopSDK::Affiliate::Company + + attr_accessor created_at: Time + + attr_accessor customer_retention_rate: String + + attr_accessor customer_retention_rate_ninety_days: String + + attr_accessor monthly_recurring_revenue_usd: String + + attr_accessor status: WhopSDK::Models::status? + + attr_accessor total_overrides_count: Integer + + attr_accessor total_referral_earnings_usd: String + + attr_accessor total_referrals_count: Integer + + attr_accessor total_revenue_usd: String + + attr_accessor updated_at: Time + + attr_accessor user: WhopSDK::Affiliate::User + + def initialize: ( + id: String, + active_members_count: Integer, + company: WhopSDK::Affiliate::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Models::status?, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Affiliate::User + ) -> void + + def to_hash: -> { + id: String, + active_members_count: Integer, + company: WhopSDK::Affiliate::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Models::status?, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Affiliate::User + } + + type company = { id: String, title: String } + + class Company < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor title: String + + def initialize: (id: String, title: String) -> void + + def to_hash: -> { id: String, title: String } + end + + type user = { id: String, name: String?, username: String? } + + class User < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor username: String? + + def initialize: (id: String, name: String?, username: String?) -> void + + def to_hash: -> { id: String, name: String?, username: String? } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliate_archive_params.rbs b/sig/whop_sdk/models/affiliate_archive_params.rbs new file mode 100644 index 00000000..1e3f853b --- /dev/null +++ b/sig/whop_sdk/models/affiliate_archive_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type affiliate_archive_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AffiliateArchiveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/affiliate_archive_response.rbs b/sig/whop_sdk/models/affiliate_archive_response.rbs new file mode 100644 index 00000000..97034126 --- /dev/null +++ b/sig/whop_sdk/models/affiliate_archive_response.rbs @@ -0,0 +1,5 @@ +module WhopSDK + module Models + AffiliateArchiveResponse: WhopSDK::Internal::Type::Converter + end +end diff --git a/sig/whop_sdk/models/affiliate_create_params.rbs b/sig/whop_sdk/models/affiliate_create_params.rbs new file mode 100644 index 00000000..979a3e96 --- /dev/null +++ b/sig/whop_sdk/models/affiliate_create_params.rbs @@ -0,0 +1,28 @@ +module WhopSDK + module Models + type affiliate_create_params = + { company_id: String, user_identifier: String } + & WhopSDK::Internal::Type::request_parameters + + class AffiliateCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor company_id: String + + attr_accessor user_identifier: String + + def initialize: ( + company_id: String, + user_identifier: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + company_id: String, + user_identifier: String, + request_options: WhopSDK::RequestOptions + } + end + end +end diff --git a/sig/whop_sdk/models/affiliate_list_params.rbs b/sig/whop_sdk/models/affiliate_list_params.rbs new file mode 100644 index 00000000..52eabb27 --- /dev/null +++ b/sig/whop_sdk/models/affiliate_list_params.rbs @@ -0,0 +1,80 @@ +module WhopSDK + module Models + type affiliate_list_params = + { + company_id: String, + after: String?, + before: String?, + direction: WhopSDK::Models::direction?, + first: Integer?, + last: Integer?, + order: WhopSDK::Models::AffiliateListParams::order?, + query: String?, + status: WhopSDK::Models::status? + } + & WhopSDK::Internal::Type::request_parameters + + class AffiliateListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor company_id: String + + attr_accessor after: String? + + attr_accessor before: String? + + attr_accessor direction: WhopSDK::Models::direction? + + attr_accessor first: Integer? + + attr_accessor last: Integer? + + attr_accessor order: WhopSDK::Models::AffiliateListParams::order? + + attr_accessor query: String? + + attr_accessor status: WhopSDK::Models::status? + + def initialize: ( + company_id: String, + ?after: String?, + ?before: String?, + ?direction: WhopSDK::Models::direction?, + ?first: Integer?, + ?last: Integer?, + ?order: WhopSDK::Models::AffiliateListParams::order?, + ?query: String?, + ?status: WhopSDK::Models::status?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + company_id: String, + after: String?, + before: String?, + direction: WhopSDK::Models::direction?, + first: Integer?, + last: Integer?, + order: WhopSDK::Models::AffiliateListParams::order?, + query: String?, + status: WhopSDK::Models::status?, + request_options: WhopSDK::RequestOptions + } + + type order = + :id | :created_at | :cached_total_referrals | :cached_total_rewards + + module Order + extend WhopSDK::Internal::Type::Enum + + ID: :id + CREATED_AT: :created_at + CACHED_TOTAL_REFERRALS: :cached_total_referrals + CACHED_TOTAL_REWARDS: :cached_total_rewards + + def self?.values: -> ::Array[WhopSDK::Models::AffiliateListParams::order] + end + end + end +end diff --git a/sig/whop_sdk/models/affiliate_list_response.rbs b/sig/whop_sdk/models/affiliate_list_response.rbs new file mode 100644 index 00000000..8d826d6c --- /dev/null +++ b/sig/whop_sdk/models/affiliate_list_response.rbs @@ -0,0 +1,111 @@ +module WhopSDK + module Models + type affiliate_list_response = + { + id: String, + active_members_count: Integer, + company: WhopSDK::Models::AffiliateListResponse::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Models::status?, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Models::AffiliateListResponse::User + } + + class AffiliateListResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor active_members_count: Integer + + attr_accessor company: WhopSDK::Models::AffiliateListResponse::Company + + attr_accessor created_at: Time + + attr_accessor customer_retention_rate: String + + attr_accessor customer_retention_rate_ninety_days: String + + attr_accessor monthly_recurring_revenue_usd: String + + attr_accessor status: WhopSDK::Models::status? + + attr_accessor total_overrides_count: Integer + + attr_accessor total_referral_earnings_usd: String + + attr_accessor total_referrals_count: Integer + + attr_accessor total_revenue_usd: String + + attr_accessor updated_at: Time + + attr_accessor user: WhopSDK::Models::AffiliateListResponse::User + + def initialize: ( + id: String, + active_members_count: Integer, + company: WhopSDK::Models::AffiliateListResponse::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Models::status?, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Models::AffiliateListResponse::User + ) -> void + + def to_hash: -> { + id: String, + active_members_count: Integer, + company: WhopSDK::Models::AffiliateListResponse::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Models::status?, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Models::AffiliateListResponse::User + } + + type company = { id: String, title: String } + + class Company < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor title: String + + def initialize: (id: String, title: String) -> void + + def to_hash: -> { id: String, title: String } + end + + type user = { id: String, name: String?, username: String? } + + class User < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor name: String? + + attr_accessor username: String? + + def initialize: (id: String, name: String?, username: String?) -> void + + def to_hash: -> { id: String, name: String?, username: String? } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliate_retrieve_params.rbs b/sig/whop_sdk/models/affiliate_retrieve_params.rbs new file mode 100644 index 00000000..8f34b73d --- /dev/null +++ b/sig/whop_sdk/models/affiliate_retrieve_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type affiliate_retrieve_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AffiliateRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/affiliate_unarchive_params.rbs b/sig/whop_sdk/models/affiliate_unarchive_params.rbs new file mode 100644 index 00000000..41be42fe --- /dev/null +++ b/sig/whop_sdk/models/affiliate_unarchive_params.rbs @@ -0,0 +1,20 @@ +module WhopSDK + module Models + type affiliate_unarchive_params = + { id: String } & WhopSDK::Internal::Type::request_parameters + + class AffiliateUnarchiveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + def initialize: ( + id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { id: String, request_options: WhopSDK::RequestOptions } + end + end +end diff --git a/sig/whop_sdk/models/affiliate_unarchive_response.rbs b/sig/whop_sdk/models/affiliate_unarchive_response.rbs new file mode 100644 index 00000000..1aaaebff --- /dev/null +++ b/sig/whop_sdk/models/affiliate_unarchive_response.rbs @@ -0,0 +1,5 @@ +module WhopSDK + module Models + AffiliateUnarchiveResponse: WhopSDK::Internal::Type::Converter + end +end diff --git a/sig/whop_sdk/models/affiliates/affiliate_applies_to_payments.rbs b/sig/whop_sdk/models/affiliates/affiliate_applies_to_payments.rbs new file mode 100644 index 00000000..873a5802 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/affiliate_applies_to_payments.rbs @@ -0,0 +1,18 @@ +module WhopSDK + module Models + module AffiliateAppliesToPayments = Affiliates::AffiliateAppliesToPayments + + module Affiliates + type affiliate_applies_to_payments = :first_payment | :all_payments + + module AffiliateAppliesToPayments + extend WhopSDK::Internal::Type::Enum + + FIRST_PAYMENT: :first_payment + ALL_PAYMENTS: :all_payments + + def self?.values: -> ::Array[WhopSDK::Models::Affiliates::affiliate_applies_to_payments] + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/affiliate_applies_to_products.rbs b/sig/whop_sdk/models/affiliates/affiliate_applies_to_products.rbs new file mode 100644 index 00000000..7da3be94 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/affiliate_applies_to_products.rbs @@ -0,0 +1,18 @@ +module WhopSDK + module Models + module AffiliateAppliesToProducts = Affiliates::AffiliateAppliesToProducts + + module Affiliates + type affiliate_applies_to_products = :single_product | :all_products + + module AffiliateAppliesToProducts + extend WhopSDK::Internal::Type::Enum + + SINGLE_PRODUCT: :single_product + ALL_PRODUCTS: :all_products + + def self?.values: -> ::Array[WhopSDK::Models::Affiliates::affiliate_applies_to_products] + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/affiliate_override_roles.rbs b/sig/whop_sdk/models/affiliates/affiliate_override_roles.rbs new file mode 100644 index 00000000..7a594e07 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/affiliate_override_roles.rbs @@ -0,0 +1,18 @@ +module WhopSDK + module Models + module AffiliateOverrideRoles = Affiliates::AffiliateOverrideRoles + + module Affiliates + type affiliate_override_roles = :standard | :rev_share + + module AffiliateOverrideRoles + extend WhopSDK::Internal::Type::Enum + + STANDARD: :standard + REV_SHARE: :rev_share + + def self?.values: -> ::Array[WhopSDK::Models::Affiliates::affiliate_override_roles] + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/affiliate_payout_types.rbs b/sig/whop_sdk/models/affiliates/affiliate_payout_types.rbs new file mode 100644 index 00000000..def2000e --- /dev/null +++ b/sig/whop_sdk/models/affiliates/affiliate_payout_types.rbs @@ -0,0 +1,18 @@ +module WhopSDK + module Models + module AffiliatePayoutTypes = Affiliates::AffiliatePayoutTypes + + module Affiliates + type affiliate_payout_types = :percentage | :flat_fee + + module AffiliatePayoutTypes + extend WhopSDK::Internal::Type::Enum + + PERCENTAGE: :percentage + FLAT_FEE: :flat_fee + + def self?.values: -> ::Array[WhopSDK::Models::Affiliates::affiliate_payout_types] + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/affiliate_revenue_bases.rbs b/sig/whop_sdk/models/affiliates/affiliate_revenue_bases.rbs new file mode 100644 index 00000000..cd655737 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/affiliate_revenue_bases.rbs @@ -0,0 +1,18 @@ +module WhopSDK + module Models + module AffiliateRevenueBases = Affiliates::AffiliateRevenueBases + + module Affiliates + type affiliate_revenue_bases = :pre_fees | :post_fees + + module AffiliateRevenueBases + extend WhopSDK::Internal::Type::Enum + + PRE_FEES: :pre_fees + POST_FEES: :post_fees + + def self?.values: -> ::Array[WhopSDK::Models::Affiliates::affiliate_revenue_bases] + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_create_params.rbs b/sig/whop_sdk/models/affiliates/override_create_params.rbs new file mode 100644 index 00000000..087d2fdc --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_create_params.rbs @@ -0,0 +1,127 @@ +module WhopSDK + module Models + module Affiliates + type override_create_params = + { + id: String, + body: WhopSDK::Models::Affiliates::OverrideCreateParams::body + } + & WhopSDK::Internal::Type::request_parameters + + class OverrideCreateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor body: WhopSDK::Models::Affiliates::OverrideCreateParams::body + + def initialize: ( + id: String, + body: WhopSDK::Models::Affiliates::OverrideCreateParams::body, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + id: String, + body: WhopSDK::Models::Affiliates::OverrideCreateParams::body, + request_options: WhopSDK::RequestOptions + } + + type body = + WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeStandard + | WhopSDK::Affiliates::OverrideCreateParams::Body::CreateAffiliateOverrideInputOverrideTypeRevShare + + module Body + extend WhopSDK::Internal::Type::Union + + type create_affiliate_override_input_override_type_standard = + { + id: String, + commission_value: Float, + override_type: :standard, + plan_id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types? + } + + class CreateAffiliateOverrideInputOverrideTypeStandard < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor commission_value: Float + + attr_accessor override_type: :standard + + attr_accessor plan_id: String + + attr_accessor applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments? + + attr_accessor commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types? + + def initialize: ( + id: String, + commission_value: Float, + plan_id: String, + ?applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + ?commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types?, + ?override_type: :standard + ) -> void + + def to_hash: -> { + id: String, + commission_value: Float, + override_type: :standard, + plan_id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types? + } + end + + type create_affiliate_override_input_override_type_rev_share = + { + id: String, + commission_value: Float, + override_type: :rev_share, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + } + + class CreateAffiliateOverrideInputOverrideTypeRevShare < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor commission_value: Float + + attr_accessor override_type: :rev_share + + attr_accessor commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types? + + attr_accessor product_id: String? + + attr_accessor revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + + def initialize: ( + id: String, + commission_value: Float, + ?commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types?, + ?product_id: String?, + ?revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + ?override_type: :rev_share + ) -> void + + def to_hash: -> { + id: String, + commission_value: Float, + override_type: :rev_share, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + } + end + + def self?.variants: -> ::Array[WhopSDK::Models::Affiliates::OverrideCreateParams::body] + end + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_create_response.rbs b/sig/whop_sdk/models/affiliates/override_create_response.rbs new file mode 100644 index 00000000..51becc88 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_create_response.rbs @@ -0,0 +1,77 @@ +module WhopSDK + module Models + module Affiliates + type override_create_response = + { + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + } + + class OverrideCreateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments? + + attr_accessor applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products? + + attr_accessor checkout_direct_link: String? + + attr_accessor commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types + + attr_accessor commission_value: Float + + attr_accessor override_type: WhopSDK::Models::Affiliates::affiliate_override_roles + + attr_accessor plan_id: String? + + attr_accessor product_direct_link: String? + + attr_accessor product_id: String? + + attr_accessor revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + + attr_accessor total_referral_earnings_usd: Float + + def initialize: ( + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + ) -> void + + def to_hash: -> { + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_delete_params.rbs b/sig/whop_sdk/models/affiliates/override_delete_params.rbs new file mode 100644 index 00000000..fc8833bc --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_delete_params.rbs @@ -0,0 +1,30 @@ +module WhopSDK + module Models + module Affiliates + type override_delete_params = + { id: String, override_id: String } + & WhopSDK::Internal::Type::request_parameters + + class OverrideDeleteParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor override_id: String + + def initialize: ( + id: String, + override_id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + id: String, + override_id: String, + request_options: WhopSDK::RequestOptions + } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_delete_response.rbs b/sig/whop_sdk/models/affiliates/override_delete_response.rbs new file mode 100644 index 00000000..5182863d --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_delete_response.rbs @@ -0,0 +1,7 @@ +module WhopSDK + module Models + module Affiliates + OverrideDeleteResponse: WhopSDK::Internal::Type::Converter + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_list_params.rbs b/sig/whop_sdk/models/affiliates/override_list_params.rbs new file mode 100644 index 00000000..258f7576 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_list_params.rbs @@ -0,0 +1,53 @@ +module WhopSDK + module Models + module Affiliates + type override_list_params = + { + id: String, + after: String?, + before: String?, + first: Integer?, + last: Integer?, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles? + } + & WhopSDK::Internal::Type::request_parameters + + class OverrideListParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor after: String? + + attr_accessor before: String? + + attr_accessor first: Integer? + + attr_accessor last: Integer? + + attr_accessor override_type: WhopSDK::Models::Affiliates::affiliate_override_roles? + + def initialize: ( + id: String, + ?after: String?, + ?before: String?, + ?first: Integer?, + ?last: Integer?, + ?override_type: WhopSDK::Models::Affiliates::affiliate_override_roles?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + id: String, + after: String?, + before: String?, + first: Integer?, + last: Integer?, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles?, + request_options: WhopSDK::RequestOptions + } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_list_response.rbs b/sig/whop_sdk/models/affiliates/override_list_response.rbs new file mode 100644 index 00000000..36ed22a2 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_list_response.rbs @@ -0,0 +1,77 @@ +module WhopSDK + module Models + module Affiliates + type override_list_response = + { + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + } + + class OverrideListResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments? + + attr_accessor applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products? + + attr_accessor checkout_direct_link: String? + + attr_accessor commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types + + attr_accessor commission_value: Float + + attr_accessor override_type: WhopSDK::Models::Affiliates::affiliate_override_roles + + attr_accessor plan_id: String? + + attr_accessor product_direct_link: String? + + attr_accessor product_id: String? + + attr_accessor revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + + attr_accessor total_referral_earnings_usd: Float + + def initialize: ( + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + ) -> void + + def to_hash: -> { + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_retrieve_params.rbs b/sig/whop_sdk/models/affiliates/override_retrieve_params.rbs new file mode 100644 index 00000000..8918fbd1 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_retrieve_params.rbs @@ -0,0 +1,30 @@ +module WhopSDK + module Models + module Affiliates + type override_retrieve_params = + { id: String, override_id: String } + & WhopSDK::Internal::Type::request_parameters + + class OverrideRetrieveParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor override_id: String + + def initialize: ( + id: String, + override_id: String, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + id: String, + override_id: String, + request_options: WhopSDK::RequestOptions + } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_retrieve_response.rbs b/sig/whop_sdk/models/affiliates/override_retrieve_response.rbs new file mode 100644 index 00000000..047bb1cf --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_retrieve_response.rbs @@ -0,0 +1,77 @@ +module WhopSDK + module Models + module Affiliates + type override_retrieve_response = + { + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + } + + class OverrideRetrieveResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments? + + attr_accessor applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products? + + attr_accessor checkout_direct_link: String? + + attr_accessor commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types + + attr_accessor commission_value: Float + + attr_accessor override_type: WhopSDK::Models::Affiliates::affiliate_override_roles + + attr_accessor plan_id: String? + + attr_accessor product_direct_link: String? + + attr_accessor product_id: String? + + attr_accessor revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + + attr_accessor total_referral_earnings_usd: Float + + def initialize: ( + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + ) -> void + + def to_hash: -> { + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_update_params.rbs b/sig/whop_sdk/models/affiliates/override_update_params.rbs new file mode 100644 index 00000000..44854d4d --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_update_params.rbs @@ -0,0 +1,53 @@ +module WhopSDK + module Models + module Affiliates + type override_update_params = + { + id: String, + override_id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types?, + commission_value: Float?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + } + & WhopSDK::Internal::Type::request_parameters + + class OverrideUpdateParams < WhopSDK::Internal::Type::BaseModel + extend WhopSDK::Internal::Type::RequestParameters::Converter + include WhopSDK::Internal::Type::RequestParameters + + attr_accessor id: String + + attr_accessor override_id: String + + attr_accessor applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments? + + attr_accessor commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types? + + attr_accessor commission_value: Float? + + attr_accessor revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + + def initialize: ( + id: String, + override_id: String, + ?applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + ?commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types?, + ?commission_value: Float?, + ?revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + ?request_options: WhopSDK::request_opts + ) -> void + + def to_hash: -> { + id: String, + override_id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types?, + commission_value: Float?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + request_options: WhopSDK::RequestOptions + } + end + end + end +end diff --git a/sig/whop_sdk/models/affiliates/override_update_response.rbs b/sig/whop_sdk/models/affiliates/override_update_response.rbs new file mode 100644 index 00000000..7ff3eba4 --- /dev/null +++ b/sig/whop_sdk/models/affiliates/override_update_response.rbs @@ -0,0 +1,77 @@ +module WhopSDK + module Models + module Affiliates + type override_update_response = + { + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + } + + class OverrideUpdateResponse < WhopSDK::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments? + + attr_accessor applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products? + + attr_accessor checkout_direct_link: String? + + attr_accessor commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types + + attr_accessor commission_value: Float + + attr_accessor override_type: WhopSDK::Models::Affiliates::affiliate_override_roles + + attr_accessor plan_id: String? + + attr_accessor product_direct_link: String? + + attr_accessor product_id: String? + + attr_accessor revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases? + + attr_accessor total_referral_earnings_usd: Float + + def initialize: ( + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + ) -> void + + def to_hash: -> { + id: String, + applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + applies_to_products: WhopSDK::Models::Affiliates::affiliate_applies_to_products?, + checkout_direct_link: String?, + commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types, + commission_value: Float, + override_type: WhopSDK::Models::Affiliates::affiliate_override_roles, + plan_id: String?, + product_direct_link: String?, + product_id: String?, + revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + total_referral_earnings_usd: Float + } + end + end + end +end diff --git a/sig/whop_sdk/models/ai_chat.rbs b/sig/whop_sdk/models/ai_chat.rbs index e8f59f06..bb8d9c6e 100644 --- a/sig/whop_sdk/models/ai_chat.rbs +++ b/sig/whop_sdk/models/ai_chat.rbs @@ -7,7 +7,7 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, - notification_preference: WhopSDK::Models::AIChat::notification_preference, + notification_preference: WhopSDK::Models::notification_preferences, title: String?, updated_at: Time, user: WhopSDK::AIChat::User @@ -24,7 +24,7 @@ module WhopSDK attr_accessor message_count: Integer - attr_accessor notification_preference: WhopSDK::Models::AIChat::notification_preference + attr_accessor notification_preference: WhopSDK::Models::notification_preferences attr_accessor title: String? @@ -38,7 +38,7 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, - notification_preference: WhopSDK::Models::AIChat::notification_preference, + notification_preference: WhopSDK::Models::notification_preferences, title: String?, updated_at: Time, user: WhopSDK::AIChat::User @@ -50,23 +50,12 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, - notification_preference: WhopSDK::Models::AIChat::notification_preference, + notification_preference: WhopSDK::Models::notification_preferences, title: String?, updated_at: Time, user: WhopSDK::AIChat::User } - type notification_preference = :all | :none - - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - ALL: :all - NONE: :none - - def self?.values: -> ::Array[WhopSDK::Models::AIChat::notification_preference] - end - type user = { id: String } class User < WhopSDK::Internal::Type::BaseModel diff --git a/sig/whop_sdk/models/ai_chat_list_response.rbs b/sig/whop_sdk/models/ai_chat_list_response.rbs index f2ccf93a..5f17544e 100644 --- a/sig/whop_sdk/models/ai_chat_list_response.rbs +++ b/sig/whop_sdk/models/ai_chat_list_response.rbs @@ -7,7 +7,7 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, - notification_preference: WhopSDK::Models::AIChatListResponse::notification_preference, + notification_preference: WhopSDK::Models::notification_preferences, title: String?, updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User @@ -24,7 +24,7 @@ module WhopSDK attr_accessor message_count: Integer - attr_accessor notification_preference: WhopSDK::Models::AIChatListResponse::notification_preference + attr_accessor notification_preference: WhopSDK::Models::notification_preferences attr_accessor title: String? @@ -38,7 +38,7 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, - notification_preference: WhopSDK::Models::AIChatListResponse::notification_preference, + notification_preference: WhopSDK::Models::notification_preferences, title: String?, updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User @@ -50,23 +50,12 @@ module WhopSDK created_at: Time, last_message_at: Time?, message_count: Integer, - notification_preference: WhopSDK::Models::AIChatListResponse::notification_preference, + notification_preference: WhopSDK::Models::notification_preferences, title: String?, updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User } - type notification_preference = :all | :none - - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - ALL: :all - NONE: :none - - def self?.values: -> ::Array[WhopSDK::Models::AIChatListResponse::notification_preference] - end - type user = { id: String } class User < WhopSDK::Internal::Type::BaseModel diff --git a/sig/whop_sdk/models/ai_chat_update_params.rbs b/sig/whop_sdk/models/ai_chat_update_params.rbs index c29b74a7..8c74d8a6 100644 --- a/sig/whop_sdk/models/ai_chat_update_params.rbs +++ b/sig/whop_sdk/models/ai_chat_update_params.rbs @@ -4,7 +4,7 @@ module WhopSDK { id: String, current_company_id: String?, - notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference?, + notification_preference: WhopSDK::Models::notification_preferences?, title: String? } & WhopSDK::Internal::Type::request_parameters @@ -17,14 +17,14 @@ module WhopSDK attr_accessor current_company_id: String? - attr_accessor notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference? + attr_accessor notification_preference: WhopSDK::Models::notification_preferences? attr_accessor title: String? def initialize: ( id: String, ?current_company_id: String?, - ?notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference?, + ?notification_preference: WhopSDK::Models::notification_preferences?, ?title: String?, ?request_options: WhopSDK::request_opts ) -> void @@ -32,21 +32,10 @@ module WhopSDK def to_hash: -> { id: String, current_company_id: String?, - notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference?, + notification_preference: WhopSDK::Models::notification_preferences?, title: String?, request_options: WhopSDK::RequestOptions } - - type notification_preference = :all | :none - - module NotificationPreference - extend WhopSDK::Internal::Type::Enum - - ALL: :all - NONE: :none - - def self?.values: -> ::Array[WhopSDK::Models::AIChatUpdateParams::notification_preference] - end end end end diff --git a/sig/whop_sdk/models/notification_preferences.rbs b/sig/whop_sdk/models/notification_preferences.rbs new file mode 100644 index 00000000..b5b6837a --- /dev/null +++ b/sig/whop_sdk/models/notification_preferences.rbs @@ -0,0 +1,14 @@ +module WhopSDK + module Models + type notification_preferences = :all | :none + + module NotificationPreferences + extend WhopSDK::Internal::Type::Enum + + ALL: :all + NONE: :none + + def self?.values: -> ::Array[WhopSDK::Models::notification_preferences] + end + end +end diff --git a/sig/whop_sdk/models/status.rbs b/sig/whop_sdk/models/status.rbs new file mode 100644 index 00000000..a3047008 --- /dev/null +++ b/sig/whop_sdk/models/status.rbs @@ -0,0 +1,15 @@ +module WhopSDK + module Models + type status = :active | :archived | :deleted + + module Status + extend WhopSDK::Internal::Type::Enum + + ACTIVE: :active + ARCHIVED: :archived + DELETED: :deleted + + def self?.values: -> ::Array[WhopSDK::Models::status] + end + end +end diff --git a/sig/whop_sdk/resources/affiliates.rbs b/sig/whop_sdk/resources/affiliates.rbs new file mode 100644 index 00000000..ed551506 --- /dev/null +++ b/sig/whop_sdk/resources/affiliates.rbs @@ -0,0 +1,40 @@ +module WhopSDK + module Resources + class Affiliates + attr_reader overrides: WhopSDK::Resources::Affiliates::Overrides + + def create: ( + company_id: String, + user_identifier: String, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Affiliate + + def retrieve: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Affiliate + + def list: ( + company_id: String, + ?after: String?, + ?before: String?, + ?direction: WhopSDK::Models::direction?, + ?first: Integer?, + ?last: Integer?, + ?order: WhopSDK::Models::AffiliateListParams::order?, + ?query: String?, + ?status: WhopSDK::Models::status?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::AffiliateListResponse] + + def archive: (String id, ?request_options: WhopSDK::request_opts) -> bool + + def unarchive: ( + String id, + ?request_options: WhopSDK::request_opts + ) -> bool + + def initialize: (client: WhopSDK::Client) -> void + end + end +end diff --git a/sig/whop_sdk/resources/affiliates/overrides.rbs b/sig/whop_sdk/resources/affiliates/overrides.rbs new file mode 100644 index 00000000..1df3e9d0 --- /dev/null +++ b/sig/whop_sdk/resources/affiliates/overrides.rbs @@ -0,0 +1,47 @@ +module WhopSDK + module Resources + class Affiliates + class Overrides + def create: ( + String id, + body: WhopSDK::Models::Affiliates::OverrideCreateParams::body, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::Affiliates::OverrideCreateResponse + + def retrieve: ( + String override_id, + id: String, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::Affiliates::OverrideRetrieveResponse + + def update: ( + String override_id, + id: String, + ?applies_to_payments: WhopSDK::Models::Affiliates::affiliate_applies_to_payments?, + ?commission_type: WhopSDK::Models::Affiliates::affiliate_payout_types?, + ?commission_value: Float?, + ?revenue_basis: WhopSDK::Models::Affiliates::affiliate_revenue_bases?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Models::Affiliates::OverrideUpdateResponse + + def list: ( + String id, + ?after: String?, + ?before: String?, + ?first: Integer?, + ?last: Integer?, + ?override_type: WhopSDK::Models::Affiliates::affiliate_override_roles?, + ?request_options: WhopSDK::request_opts + ) -> WhopSDK::Internal::CursorPage[WhopSDK::Models::Affiliates::OverrideListResponse] + + def delete: ( + String override_id, + id: String, + ?request_options: WhopSDK::request_opts + ) -> bool + + def initialize: (client: WhopSDK::Client) -> void + end + end + end +end diff --git a/sig/whop_sdk/resources/ai_chats.rbs b/sig/whop_sdk/resources/ai_chats.rbs index 30b859cf..dc1e9dc7 100644 --- a/sig/whop_sdk/resources/ai_chats.rbs +++ b/sig/whop_sdk/resources/ai_chats.rbs @@ -19,7 +19,7 @@ module WhopSDK def update: ( String id, ?current_company_id: String?, - ?notification_preference: WhopSDK::Models::AIChatUpdateParams::notification_preference?, + ?notification_preference: WhopSDK::Models::notification_preferences?, ?title: String?, ?request_options: WhopSDK::request_opts ) -> WhopSDK::AIChat diff --git a/test/whop_sdk/resource_namespaces.rb b/test/whop_sdk/resource_namespaces.rb index 1c15604a..658d9b96 100644 --- a/test/whop_sdk/resource_namespaces.rb +++ b/test/whop_sdk/resource_namespaces.rb @@ -3,6 +3,8 @@ module WhopSDK module Test module Resources + module Affiliates + end end end end diff --git a/test/whop_sdk/resources/affiliates/overrides_test.rb b/test/whop_sdk/resources/affiliates/overrides_test.rb new file mode 100644 index 00000000..53a077a1 --- /dev/null +++ b/test/whop_sdk/resources/affiliates/overrides_test.rb @@ -0,0 +1,134 @@ +# frozen_string_literal: true + +require_relative "../../test_helper" + +class WhopSDK::Test::Resources::Affiliates::OverridesTest < WhopSDK::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = + @whop.affiliates.overrides.create( + "aff_xxxxxxxxxxxxxx", + body: {id: "id", commission_value: 6.9, override_type: :standard, plan_id: "plan_xxxxxxxxxxxxx"} + ) + + assert_pattern do + response => WhopSDK::Models::Affiliates::OverrideCreateResponse + end + + assert_pattern do + response => { + id: String, + applies_to_payments: WhopSDK::Affiliates::AffiliateAppliesToPayments | nil, + applies_to_products: WhopSDK::Affiliates::AffiliateAppliesToProducts | nil, + checkout_direct_link: String | nil, + commission_type: WhopSDK::Affiliates::AffiliatePayoutTypes, + commission_value: Float, + override_type: WhopSDK::Affiliates::AffiliateOverrideRoles, + plan_id: String | nil, + product_direct_link: String | nil, + product_id: String | nil, + revenue_basis: WhopSDK::Affiliates::AffiliateRevenueBases | nil, + total_referral_earnings_usd: Float + } + end + end + + def test_retrieve_required_params + skip("Mock server tests are disabled") + + response = @whop.affiliates.overrides.retrieve("override_id", id: "aff_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::Affiliates::OverrideRetrieveResponse + end + + assert_pattern do + response => { + id: String, + applies_to_payments: WhopSDK::Affiliates::AffiliateAppliesToPayments | nil, + applies_to_products: WhopSDK::Affiliates::AffiliateAppliesToProducts | nil, + checkout_direct_link: String | nil, + commission_type: WhopSDK::Affiliates::AffiliatePayoutTypes, + commission_value: Float, + override_type: WhopSDK::Affiliates::AffiliateOverrideRoles, + plan_id: String | nil, + product_direct_link: String | nil, + product_id: String | nil, + revenue_basis: WhopSDK::Affiliates::AffiliateRevenueBases | nil, + total_referral_earnings_usd: Float + } + end + end + + def test_update_required_params + skip("Mock server tests are disabled") + + response = @whop.affiliates.overrides.update("override_id", id: "aff_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Models::Affiliates::OverrideUpdateResponse + end + + assert_pattern do + response => { + id: String, + applies_to_payments: WhopSDK::Affiliates::AffiliateAppliesToPayments | nil, + applies_to_products: WhopSDK::Affiliates::AffiliateAppliesToProducts | nil, + checkout_direct_link: String | nil, + commission_type: WhopSDK::Affiliates::AffiliatePayoutTypes, + commission_value: Float, + override_type: WhopSDK::Affiliates::AffiliateOverrideRoles, + plan_id: String | nil, + product_direct_link: String | nil, + product_id: String | nil, + revenue_basis: WhopSDK::Affiliates::AffiliateRevenueBases | nil, + total_referral_earnings_usd: Float + } + end + end + + def test_list + skip("Mock server tests are disabled") + + response = @whop.affiliates.overrides.list("aff_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => WhopSDK::Models::Affiliates::OverrideListResponse + end + + assert_pattern do + row => { + id: String, + applies_to_payments: WhopSDK::Affiliates::AffiliateAppliesToPayments | nil, + applies_to_products: WhopSDK::Affiliates::AffiliateAppliesToProducts | nil, + checkout_direct_link: String | nil, + commission_type: WhopSDK::Affiliates::AffiliatePayoutTypes, + commission_value: Float, + override_type: WhopSDK::Affiliates::AffiliateOverrideRoles, + plan_id: String | nil, + product_direct_link: String | nil, + product_id: String | nil, + revenue_basis: WhopSDK::Affiliates::AffiliateRevenueBases | nil, + total_referral_earnings_usd: Float + } + end + end + + def test_delete_required_params + skip("Mock server tests are disabled") + + response = @whop.affiliates.overrides.delete("override_id", id: "aff_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Internal::Type::Boolean + end + end +end diff --git a/test/whop_sdk/resources/affiliates_test.rb b/test/whop_sdk/resources/affiliates_test.rb new file mode 100644 index 00000000..cfebe6f8 --- /dev/null +++ b/test/whop_sdk/resources/affiliates_test.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class WhopSDK::Test::Resources::AffiliatesTest < WhopSDK::Test::ResourceTest + def test_create_required_params + skip("Mock server tests are disabled") + + response = @whop.affiliates.create(company_id: "biz_xxxxxxxxxxxxxx", user_identifier: "user_identifier") + + assert_pattern do + response => WhopSDK::Affiliate + end + + assert_pattern do + response => { + id: String, + active_members_count: Integer, + company: WhopSDK::Affiliate::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Status | nil, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Affiliate::User + } + end + end + + def test_retrieve + skip("Mock server tests are disabled") + + response = @whop.affiliates.retrieve("aff_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Affiliate + end + + assert_pattern do + response => { + id: String, + active_members_count: Integer, + company: WhopSDK::Affiliate::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Status | nil, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Affiliate::User + } + end + end + + def test_list_required_params + skip("Mock server tests are disabled") + + response = @whop.affiliates.list(company_id: "biz_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Internal::CursorPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => WhopSDK::Models::AffiliateListResponse + end + + assert_pattern do + row => { + id: String, + active_members_count: Integer, + company: WhopSDK::Models::AffiliateListResponse::Company, + created_at: Time, + customer_retention_rate: String, + customer_retention_rate_ninety_days: String, + monthly_recurring_revenue_usd: String, + status: WhopSDK::Status | nil, + total_overrides_count: Integer, + total_referral_earnings_usd: String, + total_referrals_count: Integer, + total_revenue_usd: String, + updated_at: Time, + user: WhopSDK::Models::AffiliateListResponse::User + } + end + end + + def test_archive + skip("Mock server tests are disabled") + + response = @whop.affiliates.archive("aff_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Internal::Type::Boolean + end + end + + def test_unarchive + skip("Mock server tests are disabled") + + response = @whop.affiliates.unarchive("aff_xxxxxxxxxxxxxx") + + assert_pattern do + response => WhopSDK::Internal::Type::Boolean + end + end +end diff --git a/test/whop_sdk/resources/ai_chats_test.rb b/test/whop_sdk/resources/ai_chats_test.rb index c3a206a0..a1d31154 100644 --- a/test/whop_sdk/resources/ai_chats_test.rb +++ b/test/whop_sdk/resources/ai_chats_test.rb @@ -19,7 +19,7 @@ def test_create_required_params created_at: Time, last_message_at: Time | nil, message_count: Integer, - notification_preference: WhopSDK::AIChat::NotificationPreference, + notification_preference: WhopSDK::NotificationPreferences, title: String | nil, updated_at: Time, user: WhopSDK::AIChat::User @@ -43,7 +43,7 @@ def test_retrieve created_at: Time, last_message_at: Time | nil, message_count: Integer, - notification_preference: WhopSDK::AIChat::NotificationPreference, + notification_preference: WhopSDK::NotificationPreferences, title: String | nil, updated_at: Time, user: WhopSDK::AIChat::User @@ -67,7 +67,7 @@ def test_update created_at: Time, last_message_at: Time | nil, message_count: Integer, - notification_preference: WhopSDK::AIChat::NotificationPreference, + notification_preference: WhopSDK::NotificationPreferences, title: String | nil, updated_at: Time, user: WhopSDK::AIChat::User @@ -98,7 +98,7 @@ def test_list created_at: Time, last_message_at: Time | nil, message_count: Integer, - notification_preference: WhopSDK::Models::AIChatListResponse::NotificationPreference, + notification_preference: WhopSDK::NotificationPreferences, title: String | nil, updated_at: Time, user: WhopSDK::Models::AIChatListResponse::User From 7aec0b326fc855b865ef18fdc4c2852224015aa1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 03:20:33 +0000 Subject: [PATCH 7/7] release: 0.0.35 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 16 ++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/whop_sdk/version.rb | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 09a565df..9682ed86 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.34" + ".": "0.0.35" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 56931185..30f26638 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Gemfile.lock b/Gemfile.lock index db17d07e..3ffd2371 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - whop_sdk (0.0.34) + whop_sdk (0.0.35) cgi connection_pool standardwebhooks diff --git a/README.md b/README.md index 1bb645f9..857ec72c 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.34" +gem "whop_sdk", "~> 0.0.35" ``` diff --git a/lib/whop_sdk/version.rb b/lib/whop_sdk/version.rb index 30d9b812..48d35db5 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.34" + VERSION = "0.0.35" end