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,308 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CompanyTokenTransactionListResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the transaction
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# The transaction amount (always positive)
|
|
19
|
+
sig { returns(Float) }
|
|
20
|
+
attr_accessor :amount
|
|
21
|
+
|
|
22
|
+
# The company
|
|
23
|
+
sig do
|
|
24
|
+
returns(WhopSDK::Models::CompanyTokenTransactionListResponse::Company)
|
|
25
|
+
end
|
|
26
|
+
attr_reader :company
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
company:
|
|
31
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::Company::OrHash
|
|
32
|
+
).void
|
|
33
|
+
end
|
|
34
|
+
attr_writer :company
|
|
35
|
+
|
|
36
|
+
# When the transaction was created
|
|
37
|
+
sig { returns(Time) }
|
|
38
|
+
attr_accessor :created_at
|
|
39
|
+
|
|
40
|
+
# Optional description
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_accessor :description
|
|
43
|
+
|
|
44
|
+
# Optional idempotency key to prevent duplicate transactions
|
|
45
|
+
sig { returns(T.nilable(String)) }
|
|
46
|
+
attr_accessor :idempotency_key
|
|
47
|
+
|
|
48
|
+
# For transfers, the ID of the linked transaction
|
|
49
|
+
sig { returns(T.nilable(String)) }
|
|
50
|
+
attr_accessor :linked_transaction_id
|
|
51
|
+
|
|
52
|
+
# The member
|
|
53
|
+
sig do
|
|
54
|
+
returns(WhopSDK::Models::CompanyTokenTransactionListResponse::Member)
|
|
55
|
+
end
|
|
56
|
+
attr_reader :member
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
params(
|
|
60
|
+
member:
|
|
61
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::Member::OrHash
|
|
62
|
+
).void
|
|
63
|
+
end
|
|
64
|
+
attr_writer :member
|
|
65
|
+
|
|
66
|
+
# The type of transaction
|
|
67
|
+
sig do
|
|
68
|
+
returns(
|
|
69
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType::TaggedSymbol
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
attr_accessor :transaction_type
|
|
73
|
+
|
|
74
|
+
# The user whose balance changed
|
|
75
|
+
sig do
|
|
76
|
+
returns(WhopSDK::Models::CompanyTokenTransactionListResponse::User)
|
|
77
|
+
end
|
|
78
|
+
attr_reader :user
|
|
79
|
+
|
|
80
|
+
sig do
|
|
81
|
+
params(
|
|
82
|
+
user:
|
|
83
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::User::OrHash
|
|
84
|
+
).void
|
|
85
|
+
end
|
|
86
|
+
attr_writer :user
|
|
87
|
+
|
|
88
|
+
# A token transaction within a company
|
|
89
|
+
sig do
|
|
90
|
+
params(
|
|
91
|
+
id: String,
|
|
92
|
+
amount: Float,
|
|
93
|
+
company:
|
|
94
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::Company::OrHash,
|
|
95
|
+
created_at: Time,
|
|
96
|
+
description: T.nilable(String),
|
|
97
|
+
idempotency_key: T.nilable(String),
|
|
98
|
+
linked_transaction_id: T.nilable(String),
|
|
99
|
+
member:
|
|
100
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::Member::OrHash,
|
|
101
|
+
transaction_type:
|
|
102
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType::OrSymbol,
|
|
103
|
+
user:
|
|
104
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::User::OrHash
|
|
105
|
+
).returns(T.attached_class)
|
|
106
|
+
end
|
|
107
|
+
def self.new(
|
|
108
|
+
# The ID of the transaction
|
|
109
|
+
id:,
|
|
110
|
+
# The transaction amount (always positive)
|
|
111
|
+
amount:,
|
|
112
|
+
# The company
|
|
113
|
+
company:,
|
|
114
|
+
# When the transaction was created
|
|
115
|
+
created_at:,
|
|
116
|
+
# Optional description
|
|
117
|
+
description:,
|
|
118
|
+
# Optional idempotency key to prevent duplicate transactions
|
|
119
|
+
idempotency_key:,
|
|
120
|
+
# For transfers, the ID of the linked transaction
|
|
121
|
+
linked_transaction_id:,
|
|
122
|
+
# The member
|
|
123
|
+
member:,
|
|
124
|
+
# The type of transaction
|
|
125
|
+
transaction_type:,
|
|
126
|
+
# The user whose balance changed
|
|
127
|
+
user:
|
|
128
|
+
)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
sig do
|
|
132
|
+
override.returns(
|
|
133
|
+
{
|
|
134
|
+
id: String,
|
|
135
|
+
amount: Float,
|
|
136
|
+
company:
|
|
137
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::Company,
|
|
138
|
+
created_at: Time,
|
|
139
|
+
description: T.nilable(String),
|
|
140
|
+
idempotency_key: T.nilable(String),
|
|
141
|
+
linked_transaction_id: T.nilable(String),
|
|
142
|
+
member:
|
|
143
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::Member,
|
|
144
|
+
transaction_type:
|
|
145
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType::TaggedSymbol,
|
|
146
|
+
user: WhopSDK::Models::CompanyTokenTransactionListResponse::User
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
def to_hash
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
154
|
+
OrHash =
|
|
155
|
+
T.type_alias do
|
|
156
|
+
T.any(
|
|
157
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::Company,
|
|
158
|
+
WhopSDK::Internal::AnyHash
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# The ID of the company
|
|
163
|
+
sig { returns(String) }
|
|
164
|
+
attr_accessor :id
|
|
165
|
+
|
|
166
|
+
# The slug/route of the company on the Whop site.
|
|
167
|
+
sig { returns(String) }
|
|
168
|
+
attr_accessor :route
|
|
169
|
+
|
|
170
|
+
# The written name of the company.
|
|
171
|
+
sig { returns(String) }
|
|
172
|
+
attr_accessor :title
|
|
173
|
+
|
|
174
|
+
# The company
|
|
175
|
+
sig do
|
|
176
|
+
params(id: String, route: String, title: String).returns(
|
|
177
|
+
T.attached_class
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
def self.new(
|
|
181
|
+
# The ID of the company
|
|
182
|
+
id:,
|
|
183
|
+
# The slug/route of the company on the Whop site.
|
|
184
|
+
route:,
|
|
185
|
+
# The written name of the company.
|
|
186
|
+
title:
|
|
187
|
+
)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
sig { override.returns({ id: String, route: String, title: String }) }
|
|
191
|
+
def to_hash
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
196
|
+
OrHash =
|
|
197
|
+
T.type_alias do
|
|
198
|
+
T.any(
|
|
199
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::Member,
|
|
200
|
+
WhopSDK::Internal::AnyHash
|
|
201
|
+
)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# The ID of the member
|
|
205
|
+
sig { returns(String) }
|
|
206
|
+
attr_accessor :id
|
|
207
|
+
|
|
208
|
+
# The member
|
|
209
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
210
|
+
def self.new(
|
|
211
|
+
# The ID of the member
|
|
212
|
+
id:
|
|
213
|
+
)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
sig { override.returns({ id: String }) }
|
|
217
|
+
def to_hash
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# The type of transaction
|
|
222
|
+
module TransactionType
|
|
223
|
+
extend WhopSDK::Internal::Type::Enum
|
|
224
|
+
|
|
225
|
+
TaggedSymbol =
|
|
226
|
+
T.type_alias do
|
|
227
|
+
T.all(
|
|
228
|
+
Symbol,
|
|
229
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType
|
|
230
|
+
)
|
|
231
|
+
end
|
|
232
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
233
|
+
|
|
234
|
+
ADD =
|
|
235
|
+
T.let(
|
|
236
|
+
:add,
|
|
237
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType::TaggedSymbol
|
|
238
|
+
)
|
|
239
|
+
SUBTRACT =
|
|
240
|
+
T.let(
|
|
241
|
+
:subtract,
|
|
242
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType::TaggedSymbol
|
|
243
|
+
)
|
|
244
|
+
TRANSFER =
|
|
245
|
+
T.let(
|
|
246
|
+
:transfer,
|
|
247
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType::TaggedSymbol
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
sig do
|
|
251
|
+
override.returns(
|
|
252
|
+
T::Array[
|
|
253
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::TransactionType::TaggedSymbol
|
|
254
|
+
]
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
def self.values
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
262
|
+
OrHash =
|
|
263
|
+
T.type_alias do
|
|
264
|
+
T.any(
|
|
265
|
+
WhopSDK::Models::CompanyTokenTransactionListResponse::User,
|
|
266
|
+
WhopSDK::Internal::AnyHash
|
|
267
|
+
)
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# The internal ID of the user.
|
|
271
|
+
sig { returns(String) }
|
|
272
|
+
attr_accessor :id
|
|
273
|
+
|
|
274
|
+
# The name of the user from their Whop account.
|
|
275
|
+
sig { returns(T.nilable(String)) }
|
|
276
|
+
attr_accessor :name
|
|
277
|
+
|
|
278
|
+
# The username of the user from their Whop account.
|
|
279
|
+
sig { returns(String) }
|
|
280
|
+
attr_accessor :username
|
|
281
|
+
|
|
282
|
+
# The user whose balance changed
|
|
283
|
+
sig do
|
|
284
|
+
params(id: String, name: T.nilable(String), username: String).returns(
|
|
285
|
+
T.attached_class
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
def self.new(
|
|
289
|
+
# The internal ID of the user.
|
|
290
|
+
id:,
|
|
291
|
+
# The name of the user from their Whop account.
|
|
292
|
+
name:,
|
|
293
|
+
# The username of the user from their Whop account.
|
|
294
|
+
username:
|
|
295
|
+
)
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
sig do
|
|
299
|
+
override.returns(
|
|
300
|
+
{ id: String, name: T.nilable(String), username: String }
|
|
301
|
+
)
|
|
302
|
+
end
|
|
303
|
+
def to_hash
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CompanyTokenTransactionRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
WhopSDK::CompanyTokenTransactionRetrieveParams,
|
|
13
|
+
WhopSDK::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(request_options: WhopSDK::RequestOptions::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ request_options: WhopSDK::RequestOptions }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CompanyTokenTransactionRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the transaction
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# The transaction amount (always positive)
|
|
19
|
+
sig { returns(Float) }
|
|
20
|
+
attr_accessor :amount
|
|
21
|
+
|
|
22
|
+
# The company
|
|
23
|
+
sig do
|
|
24
|
+
returns(
|
|
25
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Company
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
attr_reader :company
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
company:
|
|
33
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Company::OrHash
|
|
34
|
+
).void
|
|
35
|
+
end
|
|
36
|
+
attr_writer :company
|
|
37
|
+
|
|
38
|
+
# When the transaction was created
|
|
39
|
+
sig { returns(Time) }
|
|
40
|
+
attr_accessor :created_at
|
|
41
|
+
|
|
42
|
+
# Optional description
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_accessor :description
|
|
45
|
+
|
|
46
|
+
# Optional idempotency key to prevent duplicate transactions
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_accessor :idempotency_key
|
|
49
|
+
|
|
50
|
+
# For transfers, the ID of the linked transaction
|
|
51
|
+
sig { returns(T.nilable(String)) }
|
|
52
|
+
attr_accessor :linked_transaction_id
|
|
53
|
+
|
|
54
|
+
# The member
|
|
55
|
+
sig do
|
|
56
|
+
returns(
|
|
57
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Member
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
attr_reader :member
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
params(
|
|
64
|
+
member:
|
|
65
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Member::OrHash
|
|
66
|
+
).void
|
|
67
|
+
end
|
|
68
|
+
attr_writer :member
|
|
69
|
+
|
|
70
|
+
# The type of transaction
|
|
71
|
+
sig do
|
|
72
|
+
returns(
|
|
73
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType::TaggedSymbol
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
attr_accessor :transaction_type
|
|
77
|
+
|
|
78
|
+
# The user whose balance changed
|
|
79
|
+
sig do
|
|
80
|
+
returns(WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::User)
|
|
81
|
+
end
|
|
82
|
+
attr_reader :user
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
user:
|
|
87
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::User::OrHash
|
|
88
|
+
).void
|
|
89
|
+
end
|
|
90
|
+
attr_writer :user
|
|
91
|
+
|
|
92
|
+
# A token transaction within a company
|
|
93
|
+
sig do
|
|
94
|
+
params(
|
|
95
|
+
id: String,
|
|
96
|
+
amount: Float,
|
|
97
|
+
company:
|
|
98
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Company::OrHash,
|
|
99
|
+
created_at: Time,
|
|
100
|
+
description: T.nilable(String),
|
|
101
|
+
idempotency_key: T.nilable(String),
|
|
102
|
+
linked_transaction_id: T.nilable(String),
|
|
103
|
+
member:
|
|
104
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Member::OrHash,
|
|
105
|
+
transaction_type:
|
|
106
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType::OrSymbol,
|
|
107
|
+
user:
|
|
108
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::User::OrHash
|
|
109
|
+
).returns(T.attached_class)
|
|
110
|
+
end
|
|
111
|
+
def self.new(
|
|
112
|
+
# The ID of the transaction
|
|
113
|
+
id:,
|
|
114
|
+
# The transaction amount (always positive)
|
|
115
|
+
amount:,
|
|
116
|
+
# The company
|
|
117
|
+
company:,
|
|
118
|
+
# When the transaction was created
|
|
119
|
+
created_at:,
|
|
120
|
+
# Optional description
|
|
121
|
+
description:,
|
|
122
|
+
# Optional idempotency key to prevent duplicate transactions
|
|
123
|
+
idempotency_key:,
|
|
124
|
+
# For transfers, the ID of the linked transaction
|
|
125
|
+
linked_transaction_id:,
|
|
126
|
+
# The member
|
|
127
|
+
member:,
|
|
128
|
+
# The type of transaction
|
|
129
|
+
transaction_type:,
|
|
130
|
+
# The user whose balance changed
|
|
131
|
+
user:
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
sig do
|
|
136
|
+
override.returns(
|
|
137
|
+
{
|
|
138
|
+
id: String,
|
|
139
|
+
amount: Float,
|
|
140
|
+
company:
|
|
141
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Company,
|
|
142
|
+
created_at: Time,
|
|
143
|
+
description: T.nilable(String),
|
|
144
|
+
idempotency_key: T.nilable(String),
|
|
145
|
+
linked_transaction_id: T.nilable(String),
|
|
146
|
+
member:
|
|
147
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Member,
|
|
148
|
+
transaction_type:
|
|
149
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType::TaggedSymbol,
|
|
150
|
+
user: WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::User
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
end
|
|
154
|
+
def to_hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
158
|
+
OrHash =
|
|
159
|
+
T.type_alias do
|
|
160
|
+
T.any(
|
|
161
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Company,
|
|
162
|
+
WhopSDK::Internal::AnyHash
|
|
163
|
+
)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# The ID of the company
|
|
167
|
+
sig { returns(String) }
|
|
168
|
+
attr_accessor :id
|
|
169
|
+
|
|
170
|
+
# The slug/route of the company on the Whop site.
|
|
171
|
+
sig { returns(String) }
|
|
172
|
+
attr_accessor :route
|
|
173
|
+
|
|
174
|
+
# The written name of the company.
|
|
175
|
+
sig { returns(String) }
|
|
176
|
+
attr_accessor :title
|
|
177
|
+
|
|
178
|
+
# The company
|
|
179
|
+
sig do
|
|
180
|
+
params(id: String, route: String, title: String).returns(
|
|
181
|
+
T.attached_class
|
|
182
|
+
)
|
|
183
|
+
end
|
|
184
|
+
def self.new(
|
|
185
|
+
# The ID of the company
|
|
186
|
+
id:,
|
|
187
|
+
# The slug/route of the company on the Whop site.
|
|
188
|
+
route:,
|
|
189
|
+
# The written name of the company.
|
|
190
|
+
title:
|
|
191
|
+
)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
sig { override.returns({ id: String, route: String, title: String }) }
|
|
195
|
+
def to_hash
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
200
|
+
OrHash =
|
|
201
|
+
T.type_alias do
|
|
202
|
+
T.any(
|
|
203
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::Member,
|
|
204
|
+
WhopSDK::Internal::AnyHash
|
|
205
|
+
)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# The ID of the member
|
|
209
|
+
sig { returns(String) }
|
|
210
|
+
attr_accessor :id
|
|
211
|
+
|
|
212
|
+
# The member
|
|
213
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
214
|
+
def self.new(
|
|
215
|
+
# The ID of the member
|
|
216
|
+
id:
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
sig { override.returns({ id: String }) }
|
|
221
|
+
def to_hash
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# The type of transaction
|
|
226
|
+
module TransactionType
|
|
227
|
+
extend WhopSDK::Internal::Type::Enum
|
|
228
|
+
|
|
229
|
+
TaggedSymbol =
|
|
230
|
+
T.type_alias do
|
|
231
|
+
T.all(
|
|
232
|
+
Symbol,
|
|
233
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType
|
|
234
|
+
)
|
|
235
|
+
end
|
|
236
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
237
|
+
|
|
238
|
+
ADD =
|
|
239
|
+
T.let(
|
|
240
|
+
:add,
|
|
241
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType::TaggedSymbol
|
|
242
|
+
)
|
|
243
|
+
SUBTRACT =
|
|
244
|
+
T.let(
|
|
245
|
+
:subtract,
|
|
246
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType::TaggedSymbol
|
|
247
|
+
)
|
|
248
|
+
TRANSFER =
|
|
249
|
+
T.let(
|
|
250
|
+
:transfer,
|
|
251
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType::TaggedSymbol
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
sig do
|
|
255
|
+
override.returns(
|
|
256
|
+
T::Array[
|
|
257
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::TransactionType::TaggedSymbol
|
|
258
|
+
]
|
|
259
|
+
)
|
|
260
|
+
end
|
|
261
|
+
def self.values
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
266
|
+
OrHash =
|
|
267
|
+
T.type_alias do
|
|
268
|
+
T.any(
|
|
269
|
+
WhopSDK::Models::CompanyTokenTransactionRetrieveResponse::User,
|
|
270
|
+
WhopSDK::Internal::AnyHash
|
|
271
|
+
)
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# The internal ID of the user.
|
|
275
|
+
sig { returns(String) }
|
|
276
|
+
attr_accessor :id
|
|
277
|
+
|
|
278
|
+
# The name of the user from their Whop account.
|
|
279
|
+
sig { returns(T.nilable(String)) }
|
|
280
|
+
attr_accessor :name
|
|
281
|
+
|
|
282
|
+
# The username of the user from their Whop account.
|
|
283
|
+
sig { returns(String) }
|
|
284
|
+
attr_accessor :username
|
|
285
|
+
|
|
286
|
+
# The user whose balance changed
|
|
287
|
+
sig do
|
|
288
|
+
params(id: String, name: T.nilable(String), username: String).returns(
|
|
289
|
+
T.attached_class
|
|
290
|
+
)
|
|
291
|
+
end
|
|
292
|
+
def self.new(
|
|
293
|
+
# The internal ID of the user.
|
|
294
|
+
id:,
|
|
295
|
+
# The name of the user from their Whop account.
|
|
296
|
+
name:,
|
|
297
|
+
# The username of the user from their Whop account.
|
|
298
|
+
username:
|
|
299
|
+
)
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
sig do
|
|
303
|
+
override.returns(
|
|
304
|
+
{ id: String, name: T.nilable(String), username: String }
|
|
305
|
+
)
|
|
306
|
+
end
|
|
307
|
+
def to_hash
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class DmMemberCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(WhopSDK::DmMemberCreateParams, WhopSDK::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the DM channel to add the member to
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :channel_id
|
|
17
|
+
|
|
18
|
+
# The ID of the user to add to the channel
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :user_id
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
channel_id: String,
|
|
25
|
+
user_id: String,
|
|
26
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
27
|
+
).returns(T.attached_class)
|
|
28
|
+
end
|
|
29
|
+
def self.new(
|
|
30
|
+
# The ID of the DM channel to add the member to
|
|
31
|
+
channel_id:,
|
|
32
|
+
# The ID of the user to add to the channel
|
|
33
|
+
user_id:,
|
|
34
|
+
request_options: {}
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
override.returns(
|
|
40
|
+
{
|
|
41
|
+
channel_id: String,
|
|
42
|
+
user_id: String,
|
|
43
|
+
request_options: WhopSDK::RequestOptions
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def to_hash
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|