whop_sdk 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +3 -3
- data/lib/whop_sdk/client.rb +12 -0
- data/lib/whop_sdk/models/ai_chat_create_params.rb +22 -0
- data/lib/whop_sdk/models/ai_chat_create_response.rb +89 -0
- data/lib/whop_sdk/models/ai_chat_delete_params.rb +14 -0
- data/lib/whop_sdk/models/ai_chat_delete_response.rb +8 -0
- data/lib/whop_sdk/models/ai_chat_list_params.rb +46 -0
- data/lib/whop_sdk/models/ai_chat_list_response.rb +89 -0
- data/lib/whop_sdk/models/ai_chat_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/ai_chat_retrieve_response.rb +89 -0
- data/lib/whop_sdk/models/ai_chat_update_params.rb +22 -0
- data/lib/whop_sdk/models/ai_chat_update_response.rb +89 -0
- data/lib/whop_sdk/models/app_list_params.rb +1 -0
- data/lib/whop_sdk/models/company_token_transaction_create_params.rb +69 -0
- data/lib/whop_sdk/models/company_token_transaction_create_response.rb +180 -0
- data/lib/whop_sdk/models/company_token_transaction_list_params.rb +84 -0
- data/lib/whop_sdk/models/company_token_transaction_list_response.rb +180 -0
- data/lib/whop_sdk/models/company_token_transaction_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/company_token_transaction_retrieve_response.rb +180 -0
- data/lib/whop_sdk/models/dm_member_create_params.rb +30 -0
- data/lib/whop_sdk/models/dm_member_create_response.rb +94 -0
- data/lib/whop_sdk/models/dm_member_delete_params.rb +14 -0
- data/lib/whop_sdk/models/dm_member_delete_response.rb +8 -0
- data/lib/whop_sdk/models/dm_member_list_params.rb +54 -0
- data/lib/whop_sdk/models/dm_member_list_response.rb +71 -0
- data/lib/whop_sdk/models/dm_member_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/dm_member_retrieve_response.rb +94 -0
- data/lib/whop_sdk/models/dm_member_update_params.rb +58 -0
- data/lib/whop_sdk/models/dm_member_update_response.rb +94 -0
- data/lib/whop_sdk/models/message_create_params.rb +9 -1
- data/lib/whop_sdk/models/message_delete_params.rb +14 -0
- data/lib/whop_sdk/models/message_delete_response.rb +8 -0
- data/lib/whop_sdk/models/payment_method_types.rb +1 -0
- data/lib/whop_sdk/models/reaction_create_params.rb +10 -1
- data/lib/whop_sdk/models/reaction_delete_params.rb +22 -0
- data/lib/whop_sdk/models/reaction_delete_response.rb +8 -0
- data/lib/whop_sdk/models.rb +30 -0
- data/lib/whop_sdk/resources/ai_chats.rb +141 -0
- data/lib/whop_sdk/resources/company_token_transactions.rb +121 -0
- data/lib/whop_sdk/resources/dm_members.rb +155 -0
- data/lib/whop_sdk/resources/messages.rb +27 -1
- data/lib/whop_sdk/resources/reactions.rb +34 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +33 -0
- data/rbi/whop_sdk/client.rbi +9 -0
- data/rbi/whop_sdk/models/ai_chat_create_params.rbi +40 -0
- data/rbi/whop_sdk/models/ai_chat_create_response.rbi +128 -0
- data/rbi/whop_sdk/models/ai_chat_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/ai_chat_delete_response.rbi +7 -0
- data/rbi/whop_sdk/models/ai_chat_list_params.rbi +67 -0
- data/rbi/whop_sdk/models/ai_chat_list_response.rbi +125 -0
- data/rbi/whop_sdk/models/ai_chat_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/ai_chat_retrieve_response.rbi +128 -0
- data/rbi/whop_sdk/models/ai_chat_update_params.rbi +40 -0
- data/rbi/whop_sdk/models/ai_chat_update_response.rbi +128 -0
- data/rbi/whop_sdk/models/app_list_params.rbi +2 -0
- data/rbi/whop_sdk/models/company_token_transaction_create_params.rbi +92 -0
- data/rbi/whop_sdk/models/company_token_transaction_create_response.rbi +308 -0
- data/rbi/whop_sdk/models/company_token_transaction_list_params.rbi +146 -0
- data/rbi/whop_sdk/models/company_token_transaction_list_response.rbi +308 -0
- data/rbi/whop_sdk/models/company_token_transaction_retrieve_params.rbi +30 -0
- data/rbi/whop_sdk/models/company_token_transaction_retrieve_response.rbi +312 -0
- data/rbi/whop_sdk/models/dm_member_create_params.rbi +51 -0
- data/rbi/whop_sdk/models/dm_member_create_response.rbi +179 -0
- data/rbi/whop_sdk/models/dm_member_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/dm_member_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/dm_member_list_params.rbi +75 -0
- data/rbi/whop_sdk/models/dm_member_list_response.rbi +124 -0
- data/rbi/whop_sdk/models/dm_member_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/dm_member_retrieve_response.rbi +179 -0
- data/rbi/whop_sdk/models/dm_member_update_params.rbi +130 -0
- data/rbi/whop_sdk/models/dm_member_update_response.rbi +179 -0
- data/rbi/whop_sdk/models/message_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/message_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/message_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/payment_method_types.rbi +1 -0
- data/rbi/whop_sdk/models/reaction_create_params.rbi +10 -0
- data/rbi/whop_sdk/models/reaction_delete_params.rbi +40 -0
- data/rbi/whop_sdk/models/reaction_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models.rbi +33 -0
- data/rbi/whop_sdk/resources/ai_chats.rbi +108 -0
- data/rbi/whop_sdk/resources/company_token_transactions.rbi +114 -0
- data/rbi/whop_sdk/resources/dm_members.rbi +128 -0
- data/rbi/whop_sdk/resources/messages.rbi +21 -0
- data/rbi/whop_sdk/resources/reactions.rbi +26 -0
- data/sig/whop_sdk/client.rbs +6 -0
- data/sig/whop_sdk/models/ai_chat_create_params.rbs +23 -0
- data/sig/whop_sdk/models/ai_chat_create_response.rbs +65 -0
- data/sig/whop_sdk/models/ai_chat_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/ai_chat_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/ai_chat_list_params.rbs +36 -0
- data/sig/whop_sdk/models/ai_chat_list_response.rbs +65 -0
- data/sig/whop_sdk/models/ai_chat_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/ai_chat_retrieve_response.rbs +65 -0
- data/sig/whop_sdk/models/ai_chat_update_params.rbs +23 -0
- data/sig/whop_sdk/models/ai_chat_update_response.rbs +65 -0
- data/sig/whop_sdk/models/app_list_params.rbs +3 -1
- data/sig/whop_sdk/models/company_token_transaction_create_params.rbs +56 -0
- data/sig/whop_sdk/models/company_token_transaction_create_response.rbs +115 -0
- data/sig/whop_sdk/models/company_token_transaction_list_params.rbs +68 -0
- data/sig/whop_sdk/models/company_token_transaction_list_response.rbs +115 -0
- data/sig/whop_sdk/models/company_token_transaction_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/company_token_transaction_retrieve_response.rbs +115 -0
- data/sig/whop_sdk/models/dm_member_create_params.rbs +28 -0
- data/sig/whop_sdk/models/dm_member_create_response.rbs +71 -0
- data/sig/whop_sdk/models/dm_member_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/dm_member_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/dm_member_list_params.rbs +46 -0
- data/sig/whop_sdk/models/dm_member_list_response.rbs +54 -0
- data/sig/whop_sdk/models/dm_member_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/dm_member_retrieve_response.rbs +71 -0
- data/sig/whop_sdk/models/dm_member_update_params.rbs +57 -0
- data/sig/whop_sdk/models/dm_member_update_response.rbs +71 -0
- data/sig/whop_sdk/models/message_create_params.rbs +6 -1
- data/sig/whop_sdk/models/message_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/message_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/payment_method_types.rbs +2 -0
- data/sig/whop_sdk/models/reaction_create_params.rbs +5 -1
- data/sig/whop_sdk/models/reaction_delete_params.rbs +23 -0
- data/sig/whop_sdk/models/reaction_delete_response.rbs +5 -0
- data/sig/whop_sdk/models.rbs +30 -0
- data/sig/whop_sdk/resources/ai_chats.rbs +33 -0
- data/sig/whop_sdk/resources/company_token_transactions.rbs +34 -0
- data/sig/whop_sdk/resources/dm_members.rbs +36 -0
- data/sig/whop_sdk/resources/messages.rbs +3 -0
- data/sig/whop_sdk/resources/reactions.rbs +7 -0
- metadata +101 -2
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::CompanyTokenTransactions#create
|
|
6
|
+
class CompanyTokenTransactionCreateResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the transaction
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute amount
|
|
14
|
+
# The transaction amount (always positive)
|
|
15
|
+
#
|
|
16
|
+
# @return [Float]
|
|
17
|
+
required :amount, Float
|
|
18
|
+
|
|
19
|
+
# @!attribute company
|
|
20
|
+
# The company
|
|
21
|
+
#
|
|
22
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionCreateResponse::Company]
|
|
23
|
+
required :company, -> { WhopSDK::Models::CompanyTokenTransactionCreateResponse::Company }
|
|
24
|
+
|
|
25
|
+
# @!attribute created_at
|
|
26
|
+
# When the transaction was created
|
|
27
|
+
#
|
|
28
|
+
# @return [Time]
|
|
29
|
+
required :created_at, Time
|
|
30
|
+
|
|
31
|
+
# @!attribute description
|
|
32
|
+
# Optional description
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
required :description, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute idempotency_key
|
|
38
|
+
# Optional idempotency key to prevent duplicate transactions
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
required :idempotency_key, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute linked_transaction_id
|
|
44
|
+
# For transfers, the ID of the linked transaction
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
required :linked_transaction_id, String, nil?: true
|
|
48
|
+
|
|
49
|
+
# @!attribute member
|
|
50
|
+
# The member
|
|
51
|
+
#
|
|
52
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionCreateResponse::Member]
|
|
53
|
+
required :member, -> { WhopSDK::Models::CompanyTokenTransactionCreateResponse::Member }
|
|
54
|
+
|
|
55
|
+
# @!attribute transaction_type
|
|
56
|
+
# The type of transaction
|
|
57
|
+
#
|
|
58
|
+
# @return [Symbol, WhopSDK::Models::CompanyTokenTransactionCreateResponse::TransactionType]
|
|
59
|
+
required :transaction_type,
|
|
60
|
+
enum: -> { WhopSDK::Models::CompanyTokenTransactionCreateResponse::TransactionType }
|
|
61
|
+
|
|
62
|
+
# @!attribute user
|
|
63
|
+
# The user whose balance changed
|
|
64
|
+
#
|
|
65
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionCreateResponse::User]
|
|
66
|
+
required :user, -> { WhopSDK::Models::CompanyTokenTransactionCreateResponse::User }
|
|
67
|
+
|
|
68
|
+
# @!method initialize(id:, amount:, company:, created_at:, description:, idempotency_key:, linked_transaction_id:, member:, transaction_type:, user:)
|
|
69
|
+
# A token transaction within a company
|
|
70
|
+
#
|
|
71
|
+
# @param id [String] The ID of the transaction
|
|
72
|
+
#
|
|
73
|
+
# @param amount [Float] The transaction amount (always positive)
|
|
74
|
+
#
|
|
75
|
+
# @param company [WhopSDK::Models::CompanyTokenTransactionCreateResponse::Company] The company
|
|
76
|
+
#
|
|
77
|
+
# @param created_at [Time] When the transaction was created
|
|
78
|
+
#
|
|
79
|
+
# @param description [String, nil] Optional description
|
|
80
|
+
#
|
|
81
|
+
# @param idempotency_key [String, nil] Optional idempotency key to prevent duplicate transactions
|
|
82
|
+
#
|
|
83
|
+
# @param linked_transaction_id [String, nil] For transfers, the ID of the linked transaction
|
|
84
|
+
#
|
|
85
|
+
# @param member [WhopSDK::Models::CompanyTokenTransactionCreateResponse::Member] The member
|
|
86
|
+
#
|
|
87
|
+
# @param transaction_type [Symbol, WhopSDK::Models::CompanyTokenTransactionCreateResponse::TransactionType] The type of transaction
|
|
88
|
+
#
|
|
89
|
+
# @param user [WhopSDK::Models::CompanyTokenTransactionCreateResponse::User] The user whose balance changed
|
|
90
|
+
|
|
91
|
+
# @see WhopSDK::Models::CompanyTokenTransactionCreateResponse#company
|
|
92
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
93
|
+
# @!attribute id
|
|
94
|
+
# The ID of the company
|
|
95
|
+
#
|
|
96
|
+
# @return [String]
|
|
97
|
+
required :id, String
|
|
98
|
+
|
|
99
|
+
# @!attribute route
|
|
100
|
+
# The slug/route of the company on the Whop site.
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
required :route, String
|
|
104
|
+
|
|
105
|
+
# @!attribute title
|
|
106
|
+
# The written name of the company.
|
|
107
|
+
#
|
|
108
|
+
# @return [String]
|
|
109
|
+
required :title, String
|
|
110
|
+
|
|
111
|
+
# @!method initialize(id:, route:, title:)
|
|
112
|
+
# The company
|
|
113
|
+
#
|
|
114
|
+
# @param id [String] The ID of the company
|
|
115
|
+
#
|
|
116
|
+
# @param route [String] The slug/route of the company on the Whop site.
|
|
117
|
+
#
|
|
118
|
+
# @param title [String] The written name of the company.
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see WhopSDK::Models::CompanyTokenTransactionCreateResponse#member
|
|
122
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
123
|
+
# @!attribute id
|
|
124
|
+
# The ID of the member
|
|
125
|
+
#
|
|
126
|
+
# @return [String]
|
|
127
|
+
required :id, String
|
|
128
|
+
|
|
129
|
+
# @!method initialize(id:)
|
|
130
|
+
# The member
|
|
131
|
+
#
|
|
132
|
+
# @param id [String] The ID of the member
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# The type of transaction
|
|
136
|
+
#
|
|
137
|
+
# @see WhopSDK::Models::CompanyTokenTransactionCreateResponse#transaction_type
|
|
138
|
+
module TransactionType
|
|
139
|
+
extend WhopSDK::Internal::Type::Enum
|
|
140
|
+
|
|
141
|
+
ADD = :add
|
|
142
|
+
SUBTRACT = :subtract
|
|
143
|
+
TRANSFER = :transfer
|
|
144
|
+
|
|
145
|
+
# @!method self.values
|
|
146
|
+
# @return [Array<Symbol>]
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see WhopSDK::Models::CompanyTokenTransactionCreateResponse#user
|
|
150
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
151
|
+
# @!attribute id
|
|
152
|
+
# The internal ID of the user.
|
|
153
|
+
#
|
|
154
|
+
# @return [String]
|
|
155
|
+
required :id, String
|
|
156
|
+
|
|
157
|
+
# @!attribute name
|
|
158
|
+
# The name of the user from their Whop account.
|
|
159
|
+
#
|
|
160
|
+
# @return [String, nil]
|
|
161
|
+
required :name, String, nil?: true
|
|
162
|
+
|
|
163
|
+
# @!attribute username
|
|
164
|
+
# The username of the user from their Whop account.
|
|
165
|
+
#
|
|
166
|
+
# @return [String]
|
|
167
|
+
required :username, String
|
|
168
|
+
|
|
169
|
+
# @!method initialize(id:, name:, username:)
|
|
170
|
+
# The user whose balance changed
|
|
171
|
+
#
|
|
172
|
+
# @param id [String] The internal ID of the user.
|
|
173
|
+
#
|
|
174
|
+
# @param name [String, nil] The name of the user from their Whop account.
|
|
175
|
+
#
|
|
176
|
+
# @param username [String] The username of the user from their Whop account.
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::CompanyTokenTransactions#list
|
|
6
|
+
class CompanyTokenTransactionListParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute company_id
|
|
11
|
+
# The ID of the company
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :company_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute after
|
|
17
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :after, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute before
|
|
23
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :before, String, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute first
|
|
29
|
+
# Returns the first _n_ elements from the list.
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :first, Integer, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute last
|
|
35
|
+
# Returns the last _n_ elements from the list.
|
|
36
|
+
#
|
|
37
|
+
# @return [Integer, nil]
|
|
38
|
+
optional :last, Integer, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute transaction_type
|
|
41
|
+
# The type of token transaction
|
|
42
|
+
#
|
|
43
|
+
# @return [Symbol, WhopSDK::Models::CompanyTokenTransactionListParams::TransactionType, nil]
|
|
44
|
+
optional :transaction_type,
|
|
45
|
+
enum: -> { WhopSDK::CompanyTokenTransactionListParams::TransactionType },
|
|
46
|
+
nil?: true
|
|
47
|
+
|
|
48
|
+
# @!attribute user_id
|
|
49
|
+
# Filter by user ID
|
|
50
|
+
#
|
|
51
|
+
# @return [String, nil]
|
|
52
|
+
optional :user_id, String, nil?: true
|
|
53
|
+
|
|
54
|
+
# @!method initialize(company_id:, after: nil, before: nil, first: nil, last: nil, transaction_type: nil, user_id: nil, request_options: {})
|
|
55
|
+
# @param company_id [String] The ID of the company
|
|
56
|
+
#
|
|
57
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
58
|
+
#
|
|
59
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
60
|
+
#
|
|
61
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
62
|
+
#
|
|
63
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
64
|
+
#
|
|
65
|
+
# @param transaction_type [Symbol, WhopSDK::Models::CompanyTokenTransactionListParams::TransactionType, nil] The type of token transaction
|
|
66
|
+
#
|
|
67
|
+
# @param user_id [String, nil] Filter by user ID
|
|
68
|
+
#
|
|
69
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
70
|
+
|
|
71
|
+
# The type of token transaction
|
|
72
|
+
module TransactionType
|
|
73
|
+
extend WhopSDK::Internal::Type::Enum
|
|
74
|
+
|
|
75
|
+
ADD = :add
|
|
76
|
+
SUBTRACT = :subtract
|
|
77
|
+
TRANSFER = :transfer
|
|
78
|
+
|
|
79
|
+
# @!method self.values
|
|
80
|
+
# @return [Array<Symbol>]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::CompanyTokenTransactions#list
|
|
6
|
+
class CompanyTokenTransactionListResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the transaction
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute amount
|
|
14
|
+
# The transaction amount (always positive)
|
|
15
|
+
#
|
|
16
|
+
# @return [Float]
|
|
17
|
+
required :amount, Float
|
|
18
|
+
|
|
19
|
+
# @!attribute company
|
|
20
|
+
# The company
|
|
21
|
+
#
|
|
22
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionListResponse::Company]
|
|
23
|
+
required :company, -> { WhopSDK::Models::CompanyTokenTransactionListResponse::Company }
|
|
24
|
+
|
|
25
|
+
# @!attribute created_at
|
|
26
|
+
# When the transaction was created
|
|
27
|
+
#
|
|
28
|
+
# @return [Time]
|
|
29
|
+
required :created_at, Time
|
|
30
|
+
|
|
31
|
+
# @!attribute description
|
|
32
|
+
# Optional description
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
required :description, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute idempotency_key
|
|
38
|
+
# Optional idempotency key to prevent duplicate transactions
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
required :idempotency_key, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute linked_transaction_id
|
|
44
|
+
# For transfers, the ID of the linked transaction
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
required :linked_transaction_id, String, nil?: true
|
|
48
|
+
|
|
49
|
+
# @!attribute member
|
|
50
|
+
# The member
|
|
51
|
+
#
|
|
52
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionListResponse::Member]
|
|
53
|
+
required :member, -> { WhopSDK::Models::CompanyTokenTransactionListResponse::Member }
|
|
54
|
+
|
|
55
|
+
# @!attribute transaction_type
|
|
56
|
+
# The type of transaction
|
|
57
|
+
#
|
|
58
|
+
# @return [Symbol, WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType]
|
|
59
|
+
required :transaction_type,
|
|
60
|
+
enum: -> { WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType }
|
|
61
|
+
|
|
62
|
+
# @!attribute user
|
|
63
|
+
# The user whose balance changed
|
|
64
|
+
#
|
|
65
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionListResponse::User]
|
|
66
|
+
required :user, -> { WhopSDK::Models::CompanyTokenTransactionListResponse::User }
|
|
67
|
+
|
|
68
|
+
# @!method initialize(id:, amount:, company:, created_at:, description:, idempotency_key:, linked_transaction_id:, member:, transaction_type:, user:)
|
|
69
|
+
# A token transaction within a company
|
|
70
|
+
#
|
|
71
|
+
# @param id [String] The ID of the transaction
|
|
72
|
+
#
|
|
73
|
+
# @param amount [Float] The transaction amount (always positive)
|
|
74
|
+
#
|
|
75
|
+
# @param company [WhopSDK::Models::CompanyTokenTransactionListResponse::Company] The company
|
|
76
|
+
#
|
|
77
|
+
# @param created_at [Time] When the transaction was created
|
|
78
|
+
#
|
|
79
|
+
# @param description [String, nil] Optional description
|
|
80
|
+
#
|
|
81
|
+
# @param idempotency_key [String, nil] Optional idempotency key to prevent duplicate transactions
|
|
82
|
+
#
|
|
83
|
+
# @param linked_transaction_id [String, nil] For transfers, the ID of the linked transaction
|
|
84
|
+
#
|
|
85
|
+
# @param member [WhopSDK::Models::CompanyTokenTransactionListResponse::Member] The member
|
|
86
|
+
#
|
|
87
|
+
# @param transaction_type [Symbol, WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType] The type of transaction
|
|
88
|
+
#
|
|
89
|
+
# @param user [WhopSDK::Models::CompanyTokenTransactionListResponse::User] The user whose balance changed
|
|
90
|
+
|
|
91
|
+
# @see WhopSDK::Models::CompanyTokenTransactionListResponse#company
|
|
92
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
93
|
+
# @!attribute id
|
|
94
|
+
# The ID of the company
|
|
95
|
+
#
|
|
96
|
+
# @return [String]
|
|
97
|
+
required :id, String
|
|
98
|
+
|
|
99
|
+
# @!attribute route
|
|
100
|
+
# The slug/route of the company on the Whop site.
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
required :route, String
|
|
104
|
+
|
|
105
|
+
# @!attribute title
|
|
106
|
+
# The written name of the company.
|
|
107
|
+
#
|
|
108
|
+
# @return [String]
|
|
109
|
+
required :title, String
|
|
110
|
+
|
|
111
|
+
# @!method initialize(id:, route:, title:)
|
|
112
|
+
# The company
|
|
113
|
+
#
|
|
114
|
+
# @param id [String] The ID of the company
|
|
115
|
+
#
|
|
116
|
+
# @param route [String] The slug/route of the company on the Whop site.
|
|
117
|
+
#
|
|
118
|
+
# @param title [String] The written name of the company.
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see WhopSDK::Models::CompanyTokenTransactionListResponse#member
|
|
122
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
123
|
+
# @!attribute id
|
|
124
|
+
# The ID of the member
|
|
125
|
+
#
|
|
126
|
+
# @return [String]
|
|
127
|
+
required :id, String
|
|
128
|
+
|
|
129
|
+
# @!method initialize(id:)
|
|
130
|
+
# The member
|
|
131
|
+
#
|
|
132
|
+
# @param id [String] The ID of the member
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# The type of transaction
|
|
136
|
+
#
|
|
137
|
+
# @see WhopSDK::Models::CompanyTokenTransactionListResponse#transaction_type
|
|
138
|
+
module TransactionType
|
|
139
|
+
extend WhopSDK::Internal::Type::Enum
|
|
140
|
+
|
|
141
|
+
ADD = :add
|
|
142
|
+
SUBTRACT = :subtract
|
|
143
|
+
TRANSFER = :transfer
|
|
144
|
+
|
|
145
|
+
# @!method self.values
|
|
146
|
+
# @return [Array<Symbol>]
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see WhopSDK::Models::CompanyTokenTransactionListResponse#user
|
|
150
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
151
|
+
# @!attribute id
|
|
152
|
+
# The internal ID of the user.
|
|
153
|
+
#
|
|
154
|
+
# @return [String]
|
|
155
|
+
required :id, String
|
|
156
|
+
|
|
157
|
+
# @!attribute name
|
|
158
|
+
# The name of the user from their Whop account.
|
|
159
|
+
#
|
|
160
|
+
# @return [String, nil]
|
|
161
|
+
required :name, String, nil?: true
|
|
162
|
+
|
|
163
|
+
# @!attribute username
|
|
164
|
+
# The username of the user from their Whop account.
|
|
165
|
+
#
|
|
166
|
+
# @return [String]
|
|
167
|
+
required :username, String
|
|
168
|
+
|
|
169
|
+
# @!method initialize(id:, name:, username:)
|
|
170
|
+
# The user whose balance changed
|
|
171
|
+
#
|
|
172
|
+
# @param id [String] The internal ID of the user.
|
|
173
|
+
#
|
|
174
|
+
# @param name [String, nil] The name of the user from their Whop account.
|
|
175
|
+
#
|
|
176
|
+
# @param username [String] The username of the user from their Whop account.
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::CompanyTokenTransactions#retrieve
|
|
6
|
+
class CompanyTokenTransactionRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::CompanyTokenTransactions#retrieve
|
|
6
|
+
class CompanyTokenTransactionRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the transaction
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute amount
|
|
14
|
+
# The transaction amount (always positive)
|
|
15
|
+
#
|
|
16
|
+
# @return [Float]
|
|
17
|
+
required :amount, Float
|
|
18
|
+
|
|
19
|
+
# @!attribute company
|
|
20
|
+
# The company
|
|
21
|
+
#
|
|
22
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Company]
|
|
23
|
+
required :company, -> { WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Company }
|
|
24
|
+
|
|
25
|
+
# @!attribute created_at
|
|
26
|
+
# When the transaction was created
|
|
27
|
+
#
|
|
28
|
+
# @return [Time]
|
|
29
|
+
required :created_at, Time
|
|
30
|
+
|
|
31
|
+
# @!attribute description
|
|
32
|
+
# Optional description
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
required :description, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute idempotency_key
|
|
38
|
+
# Optional idempotency key to prevent duplicate transactions
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
required :idempotency_key, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute linked_transaction_id
|
|
44
|
+
# For transfers, the ID of the linked transaction
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
required :linked_transaction_id, String, nil?: true
|
|
48
|
+
|
|
49
|
+
# @!attribute member
|
|
50
|
+
# The member
|
|
51
|
+
#
|
|
52
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Member]
|
|
53
|
+
required :member, -> { WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Member }
|
|
54
|
+
|
|
55
|
+
# @!attribute transaction_type
|
|
56
|
+
# The type of transaction
|
|
57
|
+
#
|
|
58
|
+
# @return [Symbol, WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType]
|
|
59
|
+
required :transaction_type,
|
|
60
|
+
enum: -> { WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType }
|
|
61
|
+
|
|
62
|
+
# @!attribute user
|
|
63
|
+
# The user whose balance changed
|
|
64
|
+
#
|
|
65
|
+
# @return [WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::User]
|
|
66
|
+
required :user, -> { WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::User }
|
|
67
|
+
|
|
68
|
+
# @!method initialize(id:, amount:, company:, created_at:, description:, idempotency_key:, linked_transaction_id:, member:, transaction_type:, user:)
|
|
69
|
+
# A token transaction within a company
|
|
70
|
+
#
|
|
71
|
+
# @param id [String] The ID of the transaction
|
|
72
|
+
#
|
|
73
|
+
# @param amount [Float] The transaction amount (always positive)
|
|
74
|
+
#
|
|
75
|
+
# @param company [WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Company] The company
|
|
76
|
+
#
|
|
77
|
+
# @param created_at [Time] When the transaction was created
|
|
78
|
+
#
|
|
79
|
+
# @param description [String, nil] Optional description
|
|
80
|
+
#
|
|
81
|
+
# @param idempotency_key [String, nil] Optional idempotency key to prevent duplicate transactions
|
|
82
|
+
#
|
|
83
|
+
# @param linked_transaction_id [String, nil] For transfers, the ID of the linked transaction
|
|
84
|
+
#
|
|
85
|
+
# @param member [WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Member] The member
|
|
86
|
+
#
|
|
87
|
+
# @param transaction_type [Symbol, WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType] The type of transaction
|
|
88
|
+
#
|
|
89
|
+
# @param user [WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::User] The user whose balance changed
|
|
90
|
+
|
|
91
|
+
# @see WhopSDK::Models::CompanyTokenTransactionRetrieveResponse#company
|
|
92
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
93
|
+
# @!attribute id
|
|
94
|
+
# The ID of the company
|
|
95
|
+
#
|
|
96
|
+
# @return [String]
|
|
97
|
+
required :id, String
|
|
98
|
+
|
|
99
|
+
# @!attribute route
|
|
100
|
+
# The slug/route of the company on the Whop site.
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
required :route, String
|
|
104
|
+
|
|
105
|
+
# @!attribute title
|
|
106
|
+
# The written name of the company.
|
|
107
|
+
#
|
|
108
|
+
# @return [String]
|
|
109
|
+
required :title, String
|
|
110
|
+
|
|
111
|
+
# @!method initialize(id:, route:, title:)
|
|
112
|
+
# The company
|
|
113
|
+
#
|
|
114
|
+
# @param id [String] The ID of the company
|
|
115
|
+
#
|
|
116
|
+
# @param route [String] The slug/route of the company on the Whop site.
|
|
117
|
+
#
|
|
118
|
+
# @param title [String] The written name of the company.
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see WhopSDK::Models::CompanyTokenTransactionRetrieveResponse#member
|
|
122
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
123
|
+
# @!attribute id
|
|
124
|
+
# The ID of the member
|
|
125
|
+
#
|
|
126
|
+
# @return [String]
|
|
127
|
+
required :id, String
|
|
128
|
+
|
|
129
|
+
# @!method initialize(id:)
|
|
130
|
+
# The member
|
|
131
|
+
#
|
|
132
|
+
# @param id [String] The ID of the member
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# The type of transaction
|
|
136
|
+
#
|
|
137
|
+
# @see WhopSDK::Models::CompanyTokenTransactionRetrieveResponse#transaction_type
|
|
138
|
+
module TransactionType
|
|
139
|
+
extend WhopSDK::Internal::Type::Enum
|
|
140
|
+
|
|
141
|
+
ADD = :add
|
|
142
|
+
SUBTRACT = :subtract
|
|
143
|
+
TRANSFER = :transfer
|
|
144
|
+
|
|
145
|
+
# @!method self.values
|
|
146
|
+
# @return [Array<Symbol>]
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see WhopSDK::Models::CompanyTokenTransactionRetrieveResponse#user
|
|
150
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
151
|
+
# @!attribute id
|
|
152
|
+
# The internal ID of the user.
|
|
153
|
+
#
|
|
154
|
+
# @return [String]
|
|
155
|
+
required :id, String
|
|
156
|
+
|
|
157
|
+
# @!attribute name
|
|
158
|
+
# The name of the user from their Whop account.
|
|
159
|
+
#
|
|
160
|
+
# @return [String, nil]
|
|
161
|
+
required :name, String, nil?: true
|
|
162
|
+
|
|
163
|
+
# @!attribute username
|
|
164
|
+
# The username of the user from their Whop account.
|
|
165
|
+
#
|
|
166
|
+
# @return [String]
|
|
167
|
+
required :username, String
|
|
168
|
+
|
|
169
|
+
# @!method initialize(id:, name:, username:)
|
|
170
|
+
# The user whose balance changed
|
|
171
|
+
#
|
|
172
|
+
# @param id [String] The internal ID of the user.
|
|
173
|
+
#
|
|
174
|
+
# @param name [String, nil] The name of the user from their Whop account.
|
|
175
|
+
#
|
|
176
|
+
# @param username [String] The username of the user from their Whop account.
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::DmMembers#create
|
|
6
|
+
class DmMemberCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute channel_id
|
|
11
|
+
# The ID of the DM channel to add the member to
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :channel_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute user_id
|
|
17
|
+
# The ID of the user to add to the channel
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :user_id, String
|
|
21
|
+
|
|
22
|
+
# @!method initialize(channel_id:, user_id:, request_options: {})
|
|
23
|
+
# @param channel_id [String] The ID of the DM channel to add the member to
|
|
24
|
+
#
|
|
25
|
+
# @param user_id [String] The ID of the user to add to the channel
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|