whop_sdk 0.0.5 → 0.0.6
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 +15 -0
- data/README.md +4 -7
- data/lib/whop_sdk/client.rb +17 -6
- data/lib/whop_sdk/models/company.rb +1 -0
- data/lib/whop_sdk/models/dispute.rb +672 -0
- data/lib/whop_sdk/models/dispute_created_webhook_event.rb +48 -0
- data/lib/whop_sdk/models/dispute_list_params.rb +62 -0
- data/lib/whop_sdk/models/dispute_list_response.rb +187 -0
- data/lib/whop_sdk/models/dispute_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/dispute_statuses.rb +23 -0
- data/lib/whop_sdk/models/dispute_submit_evidence_params.rb +14 -0
- data/lib/whop_sdk/models/dispute_update_evidence_params.rb +342 -0
- data/lib/whop_sdk/models/dispute_updated_webhook_event.rb +48 -0
- data/lib/whop_sdk/models/notification_create_params.rb +88 -0
- data/lib/whop_sdk/models/notification_create_response.rb +19 -0
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
- data/lib/whop_sdk/models.rb +18 -0
- data/lib/whop_sdk/resources/disputes.rb +182 -0
- data/lib/whop_sdk/resources/notifications.rb +53 -0
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +13 -0
- data/rbi/whop_sdk/client.rbi +11 -2
- data/rbi/whop_sdk/models/company.rbi +2 -0
- data/rbi/whop_sdk/models/dispute.rbi +938 -0
- data/rbi/whop_sdk/models/dispute_created_webhook_event.rbi +72 -0
- data/rbi/whop_sdk/models/dispute_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/dispute_list_response.rbi +287 -0
- data/rbi/whop_sdk/models/dispute_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/dispute_statuses.rbi +32 -0
- data/rbi/whop_sdk/models/dispute_submit_evidence_params.rbi +30 -0
- data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +566 -0
- data/rbi/whop_sdk/models/dispute_updated_webhook_event.rbi +72 -0
- data/rbi/whop_sdk/models/notification_create_params.rbi +113 -0
- data/rbi/whop_sdk/models/notification_create_response.rbi +31 -0
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
- data/rbi/whop_sdk/models.rbi +18 -0
- data/rbi/whop_sdk/resources/disputes.rbi +194 -0
- data/rbi/whop_sdk/resources/notifications.rbi +54 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
- data/sig/whop_sdk/client.rbs +5 -1
- data/sig/whop_sdk/models/company.rbs +2 -0
- data/sig/whop_sdk/models/dispute.rbs +437 -0
- data/sig/whop_sdk/models/dispute_created_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/dispute_list_params.rbs +51 -0
- data/sig/whop_sdk/models/dispute_list_response.rbs +124 -0
- data/sig/whop_sdk/models/dispute_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/dispute_statuses.rbs +30 -0
- data/sig/whop_sdk/models/dispute_submit_evidence_params.rbs +15 -0
- data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +215 -0
- data/sig/whop_sdk/models/dispute_updated_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/notification_create_params.rbs +61 -0
- data/sig/whop_sdk/models/notification_create_response.rbs +13 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
- data/sig/whop_sdk/models.rbs +18 -0
- data/sig/whop_sdk/resources/disputes.rbs +46 -0
- data/sig/whop_sdk/resources/notifications.rbs +19 -0
- data/sig/whop_sdk/resources/webhooks.rbs +3 -1
- metadata +41 -2
|
@@ -0,0 +1,672 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Disputes#retrieve
|
|
6
|
+
class Dispute < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The internal ID of the dispute.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute access_activity_log
|
|
14
|
+
# An IP access log for the user from Whop.
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
required :access_activity_log, String, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute amount
|
|
20
|
+
# The amount of the dispute (formatted).
|
|
21
|
+
#
|
|
22
|
+
# @return [Float]
|
|
23
|
+
required :amount, Float
|
|
24
|
+
|
|
25
|
+
# @!attribute billing_address
|
|
26
|
+
# The billing address of the user from their payment details.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
required :billing_address, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute cancellation_policy_attachment
|
|
32
|
+
# The cancellation policy for this dispute
|
|
33
|
+
#
|
|
34
|
+
# @return [WhopSDK::Models::Dispute::CancellationPolicyAttachment, nil]
|
|
35
|
+
required :cancellation_policy_attachment,
|
|
36
|
+
-> { WhopSDK::Dispute::CancellationPolicyAttachment },
|
|
37
|
+
nil?: true
|
|
38
|
+
|
|
39
|
+
# @!attribute cancellation_policy_disclosure
|
|
40
|
+
# A cancellation policy disclosure from the company.
|
|
41
|
+
#
|
|
42
|
+
# @return [String, nil]
|
|
43
|
+
required :cancellation_policy_disclosure, String, nil?: true
|
|
44
|
+
|
|
45
|
+
# @!attribute company
|
|
46
|
+
# The company the dispute is against.
|
|
47
|
+
#
|
|
48
|
+
# @return [WhopSDK::Models::Dispute::Company, nil]
|
|
49
|
+
required :company, -> { WhopSDK::Dispute::Company }, nil?: true
|
|
50
|
+
|
|
51
|
+
# @!attribute created_at
|
|
52
|
+
# When it was made.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
required :created_at, Time, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!attribute currency
|
|
58
|
+
# The currency of the dispute.
|
|
59
|
+
#
|
|
60
|
+
# @return [Symbol, WhopSDK::Models::Currency]
|
|
61
|
+
required :currency, enum: -> { WhopSDK::Currency }
|
|
62
|
+
|
|
63
|
+
# @!attribute customer_communication_attachment
|
|
64
|
+
# The customer communication for this dispute
|
|
65
|
+
#
|
|
66
|
+
# @return [WhopSDK::Models::Dispute::CustomerCommunicationAttachment, nil]
|
|
67
|
+
required :customer_communication_attachment,
|
|
68
|
+
-> { WhopSDK::Dispute::CustomerCommunicationAttachment },
|
|
69
|
+
nil?: true
|
|
70
|
+
|
|
71
|
+
# @!attribute customer_email_address
|
|
72
|
+
# The email of the customer from their payment details. This is submitted in the
|
|
73
|
+
# evidence packet to the payment processor. You can change it before submitting
|
|
74
|
+
# the dispute.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
required :customer_email_address, String, nil?: true
|
|
78
|
+
|
|
79
|
+
# @!attribute customer_name
|
|
80
|
+
# The name of the customer from their payment details. This is submitted in the
|
|
81
|
+
# evidence packet to the payment processor. You can change it before submitting
|
|
82
|
+
# the dispute.
|
|
83
|
+
#
|
|
84
|
+
# @return [String, nil]
|
|
85
|
+
required :customer_name, String, nil?: true
|
|
86
|
+
|
|
87
|
+
# @!attribute editable
|
|
88
|
+
# Whether or not the dispute data can be edited.
|
|
89
|
+
#
|
|
90
|
+
# @return [Boolean, nil]
|
|
91
|
+
required :editable, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
92
|
+
|
|
93
|
+
# @!attribute needs_response_by
|
|
94
|
+
# The last date the dispute is allow to be submitted by.
|
|
95
|
+
#
|
|
96
|
+
# @return [Time, nil]
|
|
97
|
+
required :needs_response_by, Time, nil?: true
|
|
98
|
+
|
|
99
|
+
# @!attribute notes
|
|
100
|
+
# Additional notes the company chooses to submit regarding the dispute.
|
|
101
|
+
#
|
|
102
|
+
# @return [String, nil]
|
|
103
|
+
required :notes, String, nil?: true
|
|
104
|
+
|
|
105
|
+
# @!attribute payment
|
|
106
|
+
# The payment that got disputed
|
|
107
|
+
#
|
|
108
|
+
# @return [WhopSDK::Models::Dispute::Payment, nil]
|
|
109
|
+
required :payment, -> { WhopSDK::Dispute::Payment }, nil?: true
|
|
110
|
+
|
|
111
|
+
# @!attribute plan
|
|
112
|
+
# The plan that got disputed
|
|
113
|
+
#
|
|
114
|
+
# @return [WhopSDK::Models::Dispute::Plan, nil]
|
|
115
|
+
required :plan, -> { WhopSDK::Dispute::Plan }, nil?: true
|
|
116
|
+
|
|
117
|
+
# @!attribute product
|
|
118
|
+
# The product that got disputed
|
|
119
|
+
#
|
|
120
|
+
# @return [WhopSDK::Models::Dispute::Product, nil]
|
|
121
|
+
required :product, -> { WhopSDK::Dispute::Product }, nil?: true
|
|
122
|
+
|
|
123
|
+
# @!attribute product_description
|
|
124
|
+
# The description of the product from the company.
|
|
125
|
+
#
|
|
126
|
+
# @return [String, nil]
|
|
127
|
+
required :product_description, String, nil?: true
|
|
128
|
+
|
|
129
|
+
# @!attribute reason
|
|
130
|
+
# The reason for the dispute
|
|
131
|
+
#
|
|
132
|
+
# @return [String, nil]
|
|
133
|
+
required :reason, String, nil?: true
|
|
134
|
+
|
|
135
|
+
# @!attribute refund_policy_attachment
|
|
136
|
+
# The refund policy for this dispute
|
|
137
|
+
#
|
|
138
|
+
# @return [WhopSDK::Models::Dispute::RefundPolicyAttachment, nil]
|
|
139
|
+
required :refund_policy_attachment, -> { WhopSDK::Dispute::RefundPolicyAttachment }, nil?: true
|
|
140
|
+
|
|
141
|
+
# @!attribute refund_policy_disclosure
|
|
142
|
+
# A refund policy disclosure from the company.
|
|
143
|
+
#
|
|
144
|
+
# @return [String, nil]
|
|
145
|
+
required :refund_policy_disclosure, String, nil?: true
|
|
146
|
+
|
|
147
|
+
# @!attribute refund_refusal_explanation
|
|
148
|
+
# A description on why the refund is being refused by the company.
|
|
149
|
+
#
|
|
150
|
+
# @return [String, nil]
|
|
151
|
+
required :refund_refusal_explanation, String, nil?: true
|
|
152
|
+
|
|
153
|
+
# @!attribute service_date
|
|
154
|
+
# When the product was delivered by the company.
|
|
155
|
+
#
|
|
156
|
+
# @return [String, nil]
|
|
157
|
+
required :service_date, String, nil?: true
|
|
158
|
+
|
|
159
|
+
# @!attribute status
|
|
160
|
+
# The status of the dispute (mimics stripe's dispute status).
|
|
161
|
+
#
|
|
162
|
+
# @return [Symbol, WhopSDK::Models::DisputeStatuses]
|
|
163
|
+
required :status, enum: -> { WhopSDK::DisputeStatuses }
|
|
164
|
+
|
|
165
|
+
# @!attribute uncategorized_attachment
|
|
166
|
+
# An attachment that did not fit into the other categories
|
|
167
|
+
#
|
|
168
|
+
# @return [WhopSDK::Models::Dispute::UncategorizedAttachment, nil]
|
|
169
|
+
required :uncategorized_attachment, -> { WhopSDK::Dispute::UncategorizedAttachment }, nil?: true
|
|
170
|
+
|
|
171
|
+
# @!attribute visa_rdr
|
|
172
|
+
# Whether or not the dispute is a Visa Rapid Dispute Resolution.
|
|
173
|
+
#
|
|
174
|
+
# @return [Boolean]
|
|
175
|
+
required :visa_rdr, WhopSDK::Internal::Type::Boolean
|
|
176
|
+
|
|
177
|
+
# @!method initialize(id:, access_activity_log:, amount:, billing_address:, cancellation_policy_attachment:, cancellation_policy_disclosure:, company:, created_at:, currency:, customer_communication_attachment:, customer_email_address:, customer_name:, editable:, needs_response_by:, notes:, payment:, plan:, product:, product_description:, reason:, refund_policy_attachment:, refund_policy_disclosure:, refund_refusal_explanation:, service_date:, status:, uncategorized_attachment:, visa_rdr:)
|
|
178
|
+
# Some parameter documentations has been truncated, see {WhopSDK::Models::Dispute}
|
|
179
|
+
# for more details.
|
|
180
|
+
#
|
|
181
|
+
# An object representing a dispute against a company.
|
|
182
|
+
#
|
|
183
|
+
# @param id [String] The internal ID of the dispute.
|
|
184
|
+
#
|
|
185
|
+
# @param access_activity_log [String, nil] An IP access log for the user from Whop.
|
|
186
|
+
#
|
|
187
|
+
# @param amount [Float] The amount of the dispute (formatted).
|
|
188
|
+
#
|
|
189
|
+
# @param billing_address [String, nil] The billing address of the user from their payment details.
|
|
190
|
+
#
|
|
191
|
+
# @param cancellation_policy_attachment [WhopSDK::Models::Dispute::CancellationPolicyAttachment, nil] The cancellation policy for this dispute
|
|
192
|
+
#
|
|
193
|
+
# @param cancellation_policy_disclosure [String, nil] A cancellation policy disclosure from the company.
|
|
194
|
+
#
|
|
195
|
+
# @param company [WhopSDK::Models::Dispute::Company, nil] The company the dispute is against.
|
|
196
|
+
#
|
|
197
|
+
# @param created_at [Time, nil] When it was made.
|
|
198
|
+
#
|
|
199
|
+
# @param currency [Symbol, WhopSDK::Models::Currency] The currency of the dispute.
|
|
200
|
+
#
|
|
201
|
+
# @param customer_communication_attachment [WhopSDK::Models::Dispute::CustomerCommunicationAttachment, nil] The customer communication for this dispute
|
|
202
|
+
#
|
|
203
|
+
# @param customer_email_address [String, nil] The email of the customer from their payment details. This is submitted in the e
|
|
204
|
+
#
|
|
205
|
+
# @param customer_name [String, nil] The name of the customer from their payment details. This is submitted in the ev
|
|
206
|
+
#
|
|
207
|
+
# @param editable [Boolean, nil] Whether or not the dispute data can be edited.
|
|
208
|
+
#
|
|
209
|
+
# @param needs_response_by [Time, nil] The last date the dispute is allow to be submitted by.
|
|
210
|
+
#
|
|
211
|
+
# @param notes [String, nil] Additional notes the company chooses to submit regarding the dispute.
|
|
212
|
+
#
|
|
213
|
+
# @param payment [WhopSDK::Models::Dispute::Payment, nil] The payment that got disputed
|
|
214
|
+
#
|
|
215
|
+
# @param plan [WhopSDK::Models::Dispute::Plan, nil] The plan that got disputed
|
|
216
|
+
#
|
|
217
|
+
# @param product [WhopSDK::Models::Dispute::Product, nil] The product that got disputed
|
|
218
|
+
#
|
|
219
|
+
# @param product_description [String, nil] The description of the product from the company.
|
|
220
|
+
#
|
|
221
|
+
# @param reason [String, nil] The reason for the dispute
|
|
222
|
+
#
|
|
223
|
+
# @param refund_policy_attachment [WhopSDK::Models::Dispute::RefundPolicyAttachment, nil] The refund policy for this dispute
|
|
224
|
+
#
|
|
225
|
+
# @param refund_policy_disclosure [String, nil] A refund policy disclosure from the company.
|
|
226
|
+
#
|
|
227
|
+
# @param refund_refusal_explanation [String, nil] A description on why the refund is being refused by the company.
|
|
228
|
+
#
|
|
229
|
+
# @param service_date [String, nil] When the product was delivered by the company.
|
|
230
|
+
#
|
|
231
|
+
# @param status [Symbol, WhopSDK::Models::DisputeStatuses] The status of the dispute (mimics stripe's dispute status).
|
|
232
|
+
#
|
|
233
|
+
# @param uncategorized_attachment [WhopSDK::Models::Dispute::UncategorizedAttachment, nil] An attachment that did not fit into the other categories
|
|
234
|
+
#
|
|
235
|
+
# @param visa_rdr [Boolean] Whether or not the dispute is a Visa Rapid Dispute Resolution.
|
|
236
|
+
|
|
237
|
+
# @see WhopSDK::Models::Dispute#cancellation_policy_attachment
|
|
238
|
+
class CancellationPolicyAttachment < WhopSDK::Internal::Type::BaseModel
|
|
239
|
+
# @!attribute id
|
|
240
|
+
# The ID of the attachment
|
|
241
|
+
#
|
|
242
|
+
# @return [String]
|
|
243
|
+
required :id, String
|
|
244
|
+
|
|
245
|
+
# @!attribute content_type
|
|
246
|
+
# The attachment's content type (e.g., image/jpg, video/mp4)
|
|
247
|
+
#
|
|
248
|
+
# @return [String, nil]
|
|
249
|
+
required :content_type, String, nil?: true
|
|
250
|
+
|
|
251
|
+
# @!attribute filename
|
|
252
|
+
# The name of the file
|
|
253
|
+
#
|
|
254
|
+
# @return [String, nil]
|
|
255
|
+
required :filename, String, nil?: true
|
|
256
|
+
|
|
257
|
+
# @!attribute url
|
|
258
|
+
# This is the URL you use to render optimized attachments on the client. This
|
|
259
|
+
# should be used for apps.
|
|
260
|
+
#
|
|
261
|
+
# @return [String, nil]
|
|
262
|
+
required :url, String, nil?: true
|
|
263
|
+
|
|
264
|
+
# @!method initialize(id:, content_type:, filename:, url:)
|
|
265
|
+
# Some parameter documentations has been truncated, see
|
|
266
|
+
# {WhopSDK::Models::Dispute::CancellationPolicyAttachment} for more details.
|
|
267
|
+
#
|
|
268
|
+
# The cancellation policy for this dispute
|
|
269
|
+
#
|
|
270
|
+
# @param id [String] The ID of the attachment
|
|
271
|
+
#
|
|
272
|
+
# @param content_type [String, nil] The attachment's content type (e.g., image/jpg, video/mp4)
|
|
273
|
+
#
|
|
274
|
+
# @param filename [String, nil] The name of the file
|
|
275
|
+
#
|
|
276
|
+
# @param url [String, nil] This is the URL you use to render optimized attachments on the client. This shou
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# @see WhopSDK::Models::Dispute#company
|
|
280
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
281
|
+
# @!attribute id
|
|
282
|
+
# The ID of the company
|
|
283
|
+
#
|
|
284
|
+
# @return [String]
|
|
285
|
+
required :id, String
|
|
286
|
+
|
|
287
|
+
# @!attribute title
|
|
288
|
+
# The written name of the company.
|
|
289
|
+
#
|
|
290
|
+
# @return [String]
|
|
291
|
+
required :title, String
|
|
292
|
+
|
|
293
|
+
# @!method initialize(id:, title:)
|
|
294
|
+
# The company the dispute is against.
|
|
295
|
+
#
|
|
296
|
+
# @param id [String] The ID of the company
|
|
297
|
+
#
|
|
298
|
+
# @param title [String] The written name of the company.
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# @see WhopSDK::Models::Dispute#customer_communication_attachment
|
|
302
|
+
class CustomerCommunicationAttachment < WhopSDK::Internal::Type::BaseModel
|
|
303
|
+
# @!attribute id
|
|
304
|
+
# The ID of the attachment
|
|
305
|
+
#
|
|
306
|
+
# @return [String]
|
|
307
|
+
required :id, String
|
|
308
|
+
|
|
309
|
+
# @!attribute content_type
|
|
310
|
+
# The attachment's content type (e.g., image/jpg, video/mp4)
|
|
311
|
+
#
|
|
312
|
+
# @return [String, nil]
|
|
313
|
+
required :content_type, String, nil?: true
|
|
314
|
+
|
|
315
|
+
# @!attribute filename
|
|
316
|
+
# The name of the file
|
|
317
|
+
#
|
|
318
|
+
# @return [String, nil]
|
|
319
|
+
required :filename, String, nil?: true
|
|
320
|
+
|
|
321
|
+
# @!attribute url
|
|
322
|
+
# This is the URL you use to render optimized attachments on the client. This
|
|
323
|
+
# should be used for apps.
|
|
324
|
+
#
|
|
325
|
+
# @return [String, nil]
|
|
326
|
+
required :url, String, nil?: true
|
|
327
|
+
|
|
328
|
+
# @!method initialize(id:, content_type:, filename:, url:)
|
|
329
|
+
# Some parameter documentations has been truncated, see
|
|
330
|
+
# {WhopSDK::Models::Dispute::CustomerCommunicationAttachment} for more details.
|
|
331
|
+
#
|
|
332
|
+
# The customer communication for this dispute
|
|
333
|
+
#
|
|
334
|
+
# @param id [String] The ID of the attachment
|
|
335
|
+
#
|
|
336
|
+
# @param content_type [String, nil] The attachment's content type (e.g., image/jpg, video/mp4)
|
|
337
|
+
#
|
|
338
|
+
# @param filename [String, nil] The name of the file
|
|
339
|
+
#
|
|
340
|
+
# @param url [String, nil] This is the URL you use to render optimized attachments on the client. This shou
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# @see WhopSDK::Models::Dispute#payment
|
|
344
|
+
class Payment < WhopSDK::Internal::Type::BaseModel
|
|
345
|
+
# @!attribute id
|
|
346
|
+
# The payment ID
|
|
347
|
+
#
|
|
348
|
+
# @return [String]
|
|
349
|
+
required :id, String
|
|
350
|
+
|
|
351
|
+
# @!attribute billing_reason
|
|
352
|
+
# The reason why a specific payment was billed
|
|
353
|
+
#
|
|
354
|
+
# @return [Symbol, WhopSDK::Models::BillingReasons, nil]
|
|
355
|
+
required :billing_reason, enum: -> { WhopSDK::BillingReasons }, nil?: true
|
|
356
|
+
|
|
357
|
+
# @!attribute card_brand
|
|
358
|
+
# Possible card brands that a payment token can have
|
|
359
|
+
#
|
|
360
|
+
# @return [Symbol, WhopSDK::Models::CardBrands, nil]
|
|
361
|
+
required :card_brand, enum: -> { WhopSDK::CardBrands }, nil?: true
|
|
362
|
+
|
|
363
|
+
# @!attribute card_last4
|
|
364
|
+
# The last 4 digits of the card used to make the payment.
|
|
365
|
+
#
|
|
366
|
+
# @return [String, nil]
|
|
367
|
+
required :card_last4, String, nil?: true
|
|
368
|
+
|
|
369
|
+
# @!attribute created_at
|
|
370
|
+
# The datetime the payment was created
|
|
371
|
+
#
|
|
372
|
+
# @return [Time]
|
|
373
|
+
required :created_at, Time
|
|
374
|
+
|
|
375
|
+
# @!attribute currency
|
|
376
|
+
# The available currencies on the platform
|
|
377
|
+
#
|
|
378
|
+
# @return [Symbol, WhopSDK::Models::Currency, nil]
|
|
379
|
+
required :currency, enum: -> { WhopSDK::Currency }, nil?: true
|
|
380
|
+
|
|
381
|
+
# @!attribute dispute_alerted_at
|
|
382
|
+
# When an alert came in that this transaction will be disputed
|
|
383
|
+
#
|
|
384
|
+
# @return [Time, nil]
|
|
385
|
+
required :dispute_alerted_at, Time, nil?: true
|
|
386
|
+
|
|
387
|
+
# @!attribute member
|
|
388
|
+
# The member attached to this payment.
|
|
389
|
+
#
|
|
390
|
+
# @return [WhopSDK::Models::Dispute::Payment::Member, nil]
|
|
391
|
+
required :member, -> { WhopSDK::Dispute::Payment::Member }, nil?: true
|
|
392
|
+
|
|
393
|
+
# @!attribute membership
|
|
394
|
+
# The membership attached to this payment.
|
|
395
|
+
#
|
|
396
|
+
# @return [WhopSDK::Models::Dispute::Payment::Membership, nil]
|
|
397
|
+
required :membership, -> { WhopSDK::Dispute::Payment::Membership }, nil?: true
|
|
398
|
+
|
|
399
|
+
# @!attribute paid_at
|
|
400
|
+
# The datetime the payment was paid
|
|
401
|
+
#
|
|
402
|
+
# @return [Time, nil]
|
|
403
|
+
required :paid_at, Time, nil?: true
|
|
404
|
+
|
|
405
|
+
# @!attribute payment_method_type
|
|
406
|
+
# The different types of payment methods that can be used.
|
|
407
|
+
#
|
|
408
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
|
|
409
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
|
|
410
|
+
|
|
411
|
+
# @!attribute subtotal
|
|
412
|
+
# The subtotal to show to the creator (excluding buyer fees).
|
|
413
|
+
#
|
|
414
|
+
# @return [Float, nil]
|
|
415
|
+
required :subtotal, Float, nil?: true
|
|
416
|
+
|
|
417
|
+
# @!attribute total
|
|
418
|
+
# The total to show to the creator (excluding buyer fees).
|
|
419
|
+
#
|
|
420
|
+
# @return [Float, nil]
|
|
421
|
+
required :total, Float, nil?: true
|
|
422
|
+
|
|
423
|
+
# @!attribute usd_total
|
|
424
|
+
# The total in USD to show to the creator (excluding buyer fees).
|
|
425
|
+
#
|
|
426
|
+
# @return [Float, nil]
|
|
427
|
+
required :usd_total, Float, nil?: true
|
|
428
|
+
|
|
429
|
+
# @!attribute user
|
|
430
|
+
# The user that made this payment.
|
|
431
|
+
#
|
|
432
|
+
# @return [WhopSDK::Models::Dispute::Payment::User, nil]
|
|
433
|
+
required :user, -> { WhopSDK::Dispute::Payment::User }, nil?: true
|
|
434
|
+
|
|
435
|
+
# @!method initialize(id:, billing_reason:, card_brand:, card_last4:, created_at:, currency:, dispute_alerted_at:, member:, membership:, paid_at:, payment_method_type:, subtotal:, total:, usd_total:, user:)
|
|
436
|
+
# The payment that got disputed
|
|
437
|
+
#
|
|
438
|
+
# @param id [String] The payment ID
|
|
439
|
+
#
|
|
440
|
+
# @param billing_reason [Symbol, WhopSDK::Models::BillingReasons, nil] The reason why a specific payment was billed
|
|
441
|
+
#
|
|
442
|
+
# @param card_brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
443
|
+
#
|
|
444
|
+
# @param card_last4 [String, nil] The last 4 digits of the card used to make the payment.
|
|
445
|
+
#
|
|
446
|
+
# @param created_at [Time] The datetime the payment was created
|
|
447
|
+
#
|
|
448
|
+
# @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
|
|
449
|
+
#
|
|
450
|
+
# @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed
|
|
451
|
+
#
|
|
452
|
+
# @param member [WhopSDK::Models::Dispute::Payment::Member, nil] The member attached to this payment.
|
|
453
|
+
#
|
|
454
|
+
# @param membership [WhopSDK::Models::Dispute::Payment::Membership, nil] The membership attached to this payment.
|
|
455
|
+
#
|
|
456
|
+
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
457
|
+
#
|
|
458
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
|
|
459
|
+
#
|
|
460
|
+
# @param subtotal [Float, nil] The subtotal to show to the creator (excluding buyer fees).
|
|
461
|
+
#
|
|
462
|
+
# @param total [Float, nil] The total to show to the creator (excluding buyer fees).
|
|
463
|
+
#
|
|
464
|
+
# @param usd_total [Float, nil] The total in USD to show to the creator (excluding buyer fees).
|
|
465
|
+
#
|
|
466
|
+
# @param user [WhopSDK::Models::Dispute::Payment::User, nil] The user that made this payment.
|
|
467
|
+
|
|
468
|
+
# @see WhopSDK::Models::Dispute::Payment#member
|
|
469
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
470
|
+
# @!attribute id
|
|
471
|
+
# The ID of the member
|
|
472
|
+
#
|
|
473
|
+
# @return [String]
|
|
474
|
+
required :id, String
|
|
475
|
+
|
|
476
|
+
# @!attribute phone
|
|
477
|
+
# The phone number for the member, if available.
|
|
478
|
+
#
|
|
479
|
+
# @return [String, nil]
|
|
480
|
+
required :phone, String, nil?: true
|
|
481
|
+
|
|
482
|
+
# @!method initialize(id:, phone:)
|
|
483
|
+
# The member attached to this payment.
|
|
484
|
+
#
|
|
485
|
+
# @param id [String] The ID of the member
|
|
486
|
+
#
|
|
487
|
+
# @param phone [String, nil] The phone number for the member, if available.
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
# @see WhopSDK::Models::Dispute::Payment#membership
|
|
491
|
+
class Membership < WhopSDK::Internal::Type::BaseModel
|
|
492
|
+
# @!attribute id
|
|
493
|
+
# The internal ID of the membership.
|
|
494
|
+
#
|
|
495
|
+
# @return [String]
|
|
496
|
+
required :id, String
|
|
497
|
+
|
|
498
|
+
# @!attribute status
|
|
499
|
+
# The state of the membership.
|
|
500
|
+
#
|
|
501
|
+
# @return [Symbol, WhopSDK::Models::MembershipStatus]
|
|
502
|
+
required :status, enum: -> { WhopSDK::MembershipStatus }
|
|
503
|
+
|
|
504
|
+
# @!method initialize(id:, status:)
|
|
505
|
+
# The membership attached to this payment.
|
|
506
|
+
#
|
|
507
|
+
# @param id [String] The internal ID of the membership.
|
|
508
|
+
#
|
|
509
|
+
# @param status [Symbol, WhopSDK::Models::MembershipStatus] The state of the membership.
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
# @see WhopSDK::Models::Dispute::Payment#user
|
|
513
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
514
|
+
# @!attribute id
|
|
515
|
+
# The internal ID of the user.
|
|
516
|
+
#
|
|
517
|
+
# @return [String]
|
|
518
|
+
required :id, String
|
|
519
|
+
|
|
520
|
+
# @!attribute email
|
|
521
|
+
# The email of the user
|
|
522
|
+
#
|
|
523
|
+
# @return [String, nil]
|
|
524
|
+
required :email, String, nil?: true
|
|
525
|
+
|
|
526
|
+
# @!attribute name
|
|
527
|
+
# The name of the user from their Whop account.
|
|
528
|
+
#
|
|
529
|
+
# @return [String, nil]
|
|
530
|
+
required :name, String, nil?: true
|
|
531
|
+
|
|
532
|
+
# @!attribute username
|
|
533
|
+
# The username of the user from their Whop account.
|
|
534
|
+
#
|
|
535
|
+
# @return [String]
|
|
536
|
+
required :username, String
|
|
537
|
+
|
|
538
|
+
# @!method initialize(id:, email:, name:, username:)
|
|
539
|
+
# The user that made this payment.
|
|
540
|
+
#
|
|
541
|
+
# @param id [String] The internal ID of the user.
|
|
542
|
+
#
|
|
543
|
+
# @param email [String, nil] The email of the user
|
|
544
|
+
#
|
|
545
|
+
# @param name [String, nil] The name of the user from their Whop account.
|
|
546
|
+
#
|
|
547
|
+
# @param username [String] The username of the user from their Whop account.
|
|
548
|
+
end
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# @see WhopSDK::Models::Dispute#plan
|
|
552
|
+
class Plan < WhopSDK::Internal::Type::BaseModel
|
|
553
|
+
# @!attribute id
|
|
554
|
+
# The internal ID of the plan.
|
|
555
|
+
#
|
|
556
|
+
# @return [String]
|
|
557
|
+
required :id, String
|
|
558
|
+
|
|
559
|
+
# @!method initialize(id:)
|
|
560
|
+
# The plan that got disputed
|
|
561
|
+
#
|
|
562
|
+
# @param id [String] The internal ID of the plan.
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
# @see WhopSDK::Models::Dispute#product
|
|
566
|
+
class Product < WhopSDK::Internal::Type::BaseModel
|
|
567
|
+
# @!attribute id
|
|
568
|
+
# The internal ID of the public product.
|
|
569
|
+
#
|
|
570
|
+
# @return [String]
|
|
571
|
+
required :id, String
|
|
572
|
+
|
|
573
|
+
# @!attribute title
|
|
574
|
+
# The title of the product. Use for Whop 4.0.
|
|
575
|
+
#
|
|
576
|
+
# @return [String]
|
|
577
|
+
required :title, String
|
|
578
|
+
|
|
579
|
+
# @!method initialize(id:, title:)
|
|
580
|
+
# The product that got disputed
|
|
581
|
+
#
|
|
582
|
+
# @param id [String] The internal ID of the public product.
|
|
583
|
+
#
|
|
584
|
+
# @param title [String] The title of the product. Use for Whop 4.0.
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
# @see WhopSDK::Models::Dispute#refund_policy_attachment
|
|
588
|
+
class RefundPolicyAttachment < WhopSDK::Internal::Type::BaseModel
|
|
589
|
+
# @!attribute id
|
|
590
|
+
# The ID of the attachment
|
|
591
|
+
#
|
|
592
|
+
# @return [String]
|
|
593
|
+
required :id, String
|
|
594
|
+
|
|
595
|
+
# @!attribute content_type
|
|
596
|
+
# The attachment's content type (e.g., image/jpg, video/mp4)
|
|
597
|
+
#
|
|
598
|
+
# @return [String, nil]
|
|
599
|
+
required :content_type, String, nil?: true
|
|
600
|
+
|
|
601
|
+
# @!attribute filename
|
|
602
|
+
# The name of the file
|
|
603
|
+
#
|
|
604
|
+
# @return [String, nil]
|
|
605
|
+
required :filename, String, nil?: true
|
|
606
|
+
|
|
607
|
+
# @!attribute url
|
|
608
|
+
# This is the URL you use to render optimized attachments on the client. This
|
|
609
|
+
# should be used for apps.
|
|
610
|
+
#
|
|
611
|
+
# @return [String, nil]
|
|
612
|
+
required :url, String, nil?: true
|
|
613
|
+
|
|
614
|
+
# @!method initialize(id:, content_type:, filename:, url:)
|
|
615
|
+
# Some parameter documentations has been truncated, see
|
|
616
|
+
# {WhopSDK::Models::Dispute::RefundPolicyAttachment} for more details.
|
|
617
|
+
#
|
|
618
|
+
# The refund policy for this dispute
|
|
619
|
+
#
|
|
620
|
+
# @param id [String] The ID of the attachment
|
|
621
|
+
#
|
|
622
|
+
# @param content_type [String, nil] The attachment's content type (e.g., image/jpg, video/mp4)
|
|
623
|
+
#
|
|
624
|
+
# @param filename [String, nil] The name of the file
|
|
625
|
+
#
|
|
626
|
+
# @param url [String, nil] This is the URL you use to render optimized attachments on the client. This shou
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
# @see WhopSDK::Models::Dispute#uncategorized_attachment
|
|
630
|
+
class UncategorizedAttachment < WhopSDK::Internal::Type::BaseModel
|
|
631
|
+
# @!attribute id
|
|
632
|
+
# The ID of the attachment
|
|
633
|
+
#
|
|
634
|
+
# @return [String]
|
|
635
|
+
required :id, String
|
|
636
|
+
|
|
637
|
+
# @!attribute content_type
|
|
638
|
+
# The attachment's content type (e.g., image/jpg, video/mp4)
|
|
639
|
+
#
|
|
640
|
+
# @return [String, nil]
|
|
641
|
+
required :content_type, String, nil?: true
|
|
642
|
+
|
|
643
|
+
# @!attribute filename
|
|
644
|
+
# The name of the file
|
|
645
|
+
#
|
|
646
|
+
# @return [String, nil]
|
|
647
|
+
required :filename, String, nil?: true
|
|
648
|
+
|
|
649
|
+
# @!attribute url
|
|
650
|
+
# This is the URL you use to render optimized attachments on the client. This
|
|
651
|
+
# should be used for apps.
|
|
652
|
+
#
|
|
653
|
+
# @return [String, nil]
|
|
654
|
+
required :url, String, nil?: true
|
|
655
|
+
|
|
656
|
+
# @!method initialize(id:, content_type:, filename:, url:)
|
|
657
|
+
# Some parameter documentations has been truncated, see
|
|
658
|
+
# {WhopSDK::Models::Dispute::UncategorizedAttachment} for more details.
|
|
659
|
+
#
|
|
660
|
+
# An attachment that did not fit into the other categories
|
|
661
|
+
#
|
|
662
|
+
# @param id [String] The ID of the attachment
|
|
663
|
+
#
|
|
664
|
+
# @param content_type [String, nil] The attachment's content type (e.g., image/jpg, video/mp4)
|
|
665
|
+
#
|
|
666
|
+
# @param filename [String, nil] The name of the file
|
|
667
|
+
#
|
|
668
|
+
# @param url [String, nil] This is the URL you use to render optimized attachments on the client. This shou
|
|
669
|
+
end
|
|
670
|
+
end
|
|
671
|
+
end
|
|
672
|
+
end
|