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.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +4 -7
  4. data/lib/whop_sdk/client.rb +17 -6
  5. data/lib/whop_sdk/models/company.rb +1 -0
  6. data/lib/whop_sdk/models/dispute.rb +672 -0
  7. data/lib/whop_sdk/models/dispute_created_webhook_event.rb +48 -0
  8. data/lib/whop_sdk/models/dispute_list_params.rb +62 -0
  9. data/lib/whop_sdk/models/dispute_list_response.rb +187 -0
  10. data/lib/whop_sdk/models/dispute_retrieve_params.rb +14 -0
  11. data/lib/whop_sdk/models/dispute_statuses.rb +23 -0
  12. data/lib/whop_sdk/models/dispute_submit_evidence_params.rb +14 -0
  13. data/lib/whop_sdk/models/dispute_update_evidence_params.rb +342 -0
  14. data/lib/whop_sdk/models/dispute_updated_webhook_event.rb +48 -0
  15. data/lib/whop_sdk/models/notification_create_params.rb +88 -0
  16. data/lib/whop_sdk/models/notification_create_response.rb +19 -0
  17. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  18. data/lib/whop_sdk/models.rb +18 -0
  19. data/lib/whop_sdk/resources/disputes.rb +182 -0
  20. data/lib/whop_sdk/resources/notifications.rb +53 -0
  21. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  22. data/lib/whop_sdk/version.rb +1 -1
  23. data/lib/whop_sdk.rb +13 -0
  24. data/rbi/whop_sdk/client.rbi +11 -2
  25. data/rbi/whop_sdk/models/company.rbi +2 -0
  26. data/rbi/whop_sdk/models/dispute.rbi +938 -0
  27. data/rbi/whop_sdk/models/dispute_created_webhook_event.rbi +72 -0
  28. data/rbi/whop_sdk/models/dispute_list_params.rbi +83 -0
  29. data/rbi/whop_sdk/models/dispute_list_response.rbi +287 -0
  30. data/rbi/whop_sdk/models/dispute_retrieve_params.rbi +27 -0
  31. data/rbi/whop_sdk/models/dispute_statuses.rbi +32 -0
  32. data/rbi/whop_sdk/models/dispute_submit_evidence_params.rbi +30 -0
  33. data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +566 -0
  34. data/rbi/whop_sdk/models/dispute_updated_webhook_event.rbi +72 -0
  35. data/rbi/whop_sdk/models/notification_create_params.rbi +113 -0
  36. data/rbi/whop_sdk/models/notification_create_response.rbi +31 -0
  37. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
  38. data/rbi/whop_sdk/models.rbi +18 -0
  39. data/rbi/whop_sdk/resources/disputes.rbi +194 -0
  40. data/rbi/whop_sdk/resources/notifications.rbi +54 -0
  41. data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
  42. data/sig/whop_sdk/client.rbs +5 -1
  43. data/sig/whop_sdk/models/company.rbs +2 -0
  44. data/sig/whop_sdk/models/dispute.rbs +437 -0
  45. data/sig/whop_sdk/models/dispute_created_webhook_event.rbs +40 -0
  46. data/sig/whop_sdk/models/dispute_list_params.rbs +51 -0
  47. data/sig/whop_sdk/models/dispute_list_response.rbs +124 -0
  48. data/sig/whop_sdk/models/dispute_retrieve_params.rbs +15 -0
  49. data/sig/whop_sdk/models/dispute_statuses.rbs +30 -0
  50. data/sig/whop_sdk/models/dispute_submit_evidence_params.rbs +15 -0
  51. data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +215 -0
  52. data/sig/whop_sdk/models/dispute_updated_webhook_event.rbs +40 -0
  53. data/sig/whop_sdk/models/notification_create_params.rbs +61 -0
  54. data/sig/whop_sdk/models/notification_create_response.rbs +13 -0
  55. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  56. data/sig/whop_sdk/models.rbs +18 -0
  57. data/sig/whop_sdk/resources/disputes.rbs +46 -0
  58. data/sig/whop_sdk/resources/notifications.rbs +19 -0
  59. data/sig/whop_sdk/resources/webhooks.rbs +3 -1
  60. metadata +41 -2
@@ -0,0 +1,342 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Disputes#update_evidence
6
+ class DisputeUpdateEvidenceParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute access_activity_log
11
+ # An IP access log for the user from Whop.
12
+ #
13
+ # @return [String, nil]
14
+ optional :access_activity_log, String, nil?: true
15
+
16
+ # @!attribute billing_address
17
+ # The billing address of the user from their payment details.
18
+ #
19
+ # @return [String, nil]
20
+ optional :billing_address, String, nil?: true
21
+
22
+ # @!attribute cancellation_policy_attachment
23
+ # A file containing the cancellation policy from the company.
24
+ #
25
+ # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID, nil]
26
+ optional :cancellation_policy_attachment,
27
+ union: -> { WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment },
28
+ nil?: true
29
+
30
+ # @!attribute cancellation_policy_disclosure
31
+ # A cancellation policy disclosure from the company.
32
+ #
33
+ # @return [String, nil]
34
+ optional :cancellation_policy_disclosure, String, nil?: true
35
+
36
+ # @!attribute customer_communication_attachment
37
+ # A file containing the customer communication from the company (An image).
38
+ #
39
+ # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID, nil]
40
+ optional :customer_communication_attachment,
41
+ union: -> { WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment },
42
+ nil?: true
43
+
44
+ # @!attribute customer_email_address
45
+ # The email of the customer from their payment details.
46
+ #
47
+ # @return [String, nil]
48
+ optional :customer_email_address, String, nil?: true
49
+
50
+ # @!attribute customer_name
51
+ # The name of the customer from their payment details.
52
+ #
53
+ # @return [String, nil]
54
+ optional :customer_name, String, nil?: true
55
+
56
+ # @!attribute notes
57
+ # Additional notes the company chooses to submit regarding the dispute.
58
+ #
59
+ # @return [String, nil]
60
+ optional :notes, String, nil?: true
61
+
62
+ # @!attribute product_description
63
+ # The description of the product from the company.
64
+ #
65
+ # @return [String, nil]
66
+ optional :product_description, String, nil?: true
67
+
68
+ # @!attribute refund_policy_attachment
69
+ # A file containing the refund policy from the company.
70
+ #
71
+ # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID, nil]
72
+ optional :refund_policy_attachment,
73
+ union: -> { WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment },
74
+ nil?: true
75
+
76
+ # @!attribute refund_policy_disclosure
77
+ # A refund policy disclosure from the company.
78
+ #
79
+ # @return [String, nil]
80
+ optional :refund_policy_disclosure, String, nil?: true
81
+
82
+ # @!attribute refund_refusal_explanation
83
+ # A description on why the refund is being refused by the company.
84
+ #
85
+ # @return [String, nil]
86
+ optional :refund_refusal_explanation, String, nil?: true
87
+
88
+ # @!attribute service_date
89
+ # When the product was delivered by the company.
90
+ #
91
+ # @return [String, nil]
92
+ optional :service_date, String, nil?: true
93
+
94
+ # @!attribute uncategorized_attachment
95
+ # A file that does not fit in the other categories.
96
+ #
97
+ # @return [WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID, nil]
98
+ optional :uncategorized_attachment,
99
+ union: -> { WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment },
100
+ nil?: true
101
+
102
+ # @!method initialize(access_activity_log: nil, billing_address: nil, cancellation_policy_attachment: nil, cancellation_policy_disclosure: nil, customer_communication_attachment: nil, customer_email_address: nil, customer_name: nil, notes: nil, product_description: nil, refund_policy_attachment: nil, refund_policy_disclosure: nil, refund_refusal_explanation: nil, service_date: nil, uncategorized_attachment: nil, request_options: {})
103
+ # @param access_activity_log [String, nil] An IP access log for the user from Whop.
104
+ #
105
+ # @param billing_address [String, nil] The billing address of the user from their payment details.
106
+ #
107
+ # @param cancellation_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID, nil] A file containing the cancellation policy from the company.
108
+ #
109
+ # @param cancellation_policy_disclosure [String, nil] A cancellation policy disclosure from the company.
110
+ #
111
+ # @param customer_communication_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID, nil] A file containing the customer communication from the company (An image).
112
+ #
113
+ # @param customer_email_address [String, nil] The email of the customer from their payment details.
114
+ #
115
+ # @param customer_name [String, nil] The name of the customer from their payment details.
116
+ #
117
+ # @param notes [String, nil] Additional notes the company chooses to submit regarding the dispute.
118
+ #
119
+ # @param product_description [String, nil] The description of the product from the company.
120
+ #
121
+ # @param refund_policy_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID, nil] A file containing the refund policy from the company.
122
+ #
123
+ # @param refund_policy_disclosure [String, nil] A refund policy disclosure from the company.
124
+ #
125
+ # @param refund_refusal_explanation [String, nil] A description on why the refund is being refused by the company.
126
+ #
127
+ # @param service_date [String, nil] When the product was delivered by the company.
128
+ #
129
+ # @param uncategorized_attachment [WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID, nil] A file that does not fit in the other categories.
130
+ #
131
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
132
+
133
+ # A file containing the cancellation policy from the company.
134
+ module CancellationPolicyAttachment
135
+ extend WhopSDK::Internal::Type::Union
136
+
137
+ # Input for an attachment
138
+ variant -> { WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID }
139
+
140
+ # Input for an attachment
141
+ variant -> { WhopSDK::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID }
142
+
143
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
144
+ # @!attribute direct_upload_id
145
+ # This ID should be used the first time you upload an attachment. It is the ID of
146
+ # the direct upload that was created when uploading the file to S3 via the
147
+ # mediaDirectUpload mutation.
148
+ #
149
+ # @return [String]
150
+ required :direct_upload_id, String
151
+
152
+ # @!method initialize(direct_upload_id:)
153
+ # Some parameter documentations has been truncated, see
154
+ # {WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID}
155
+ # for more details.
156
+ #
157
+ # Input for an attachment
158
+ #
159
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
160
+ end
161
+
162
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
163
+ # @!attribute id
164
+ # The ID of an existing attachment object. Use this when updating a resource and
165
+ # keeping a subset of the attachments. Don't use this unless you know what you're
166
+ # doing.
167
+ #
168
+ # @return [String]
169
+ required :id, String
170
+
171
+ # @!method initialize(id:)
172
+ # Some parameter documentations has been truncated, see
173
+ # {WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID}
174
+ # for more details.
175
+ #
176
+ # Input for an attachment
177
+ #
178
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
179
+ end
180
+
181
+ # @!method self.variants
182
+ # @return [Array(WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CancellationPolicyAttachment::AttachmentInputWithID)]
183
+ end
184
+
185
+ # A file containing the customer communication from the company (An image).
186
+ module CustomerCommunicationAttachment
187
+ extend WhopSDK::Internal::Type::Union
188
+
189
+ # Input for an attachment
190
+ variant -> { WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID }
191
+
192
+ # Input for an attachment
193
+ variant -> { WhopSDK::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID }
194
+
195
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
196
+ # @!attribute direct_upload_id
197
+ # This ID should be used the first time you upload an attachment. It is the ID of
198
+ # the direct upload that was created when uploading the file to S3 via the
199
+ # mediaDirectUpload mutation.
200
+ #
201
+ # @return [String]
202
+ required :direct_upload_id, String
203
+
204
+ # @!method initialize(direct_upload_id:)
205
+ # Some parameter documentations has been truncated, see
206
+ # {WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID}
207
+ # for more details.
208
+ #
209
+ # Input for an attachment
210
+ #
211
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
212
+ end
213
+
214
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
215
+ # @!attribute id
216
+ # The ID of an existing attachment object. Use this when updating a resource and
217
+ # keeping a subset of the attachments. Don't use this unless you know what you're
218
+ # doing.
219
+ #
220
+ # @return [String]
221
+ required :id, String
222
+
223
+ # @!method initialize(id:)
224
+ # Some parameter documentations has been truncated, see
225
+ # {WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID}
226
+ # for more details.
227
+ #
228
+ # Input for an attachment
229
+ #
230
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
231
+ end
232
+
233
+ # @!method self.variants
234
+ # @return [Array(WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::CustomerCommunicationAttachment::AttachmentInputWithID)]
235
+ end
236
+
237
+ # A file containing the refund policy from the company.
238
+ module RefundPolicyAttachment
239
+ extend WhopSDK::Internal::Type::Union
240
+
241
+ # Input for an attachment
242
+ variant -> { WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID }
243
+
244
+ # Input for an attachment
245
+ variant -> { WhopSDK::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID }
246
+
247
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
248
+ # @!attribute direct_upload_id
249
+ # This ID should be used the first time you upload an attachment. It is the ID of
250
+ # the direct upload that was created when uploading the file to S3 via the
251
+ # mediaDirectUpload mutation.
252
+ #
253
+ # @return [String]
254
+ required :direct_upload_id, String
255
+
256
+ # @!method initialize(direct_upload_id:)
257
+ # Some parameter documentations has been truncated, see
258
+ # {WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID}
259
+ # for more details.
260
+ #
261
+ # Input for an attachment
262
+ #
263
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
264
+ end
265
+
266
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
267
+ # @!attribute id
268
+ # The ID of an existing attachment object. Use this when updating a resource and
269
+ # keeping a subset of the attachments. Don't use this unless you know what you're
270
+ # doing.
271
+ #
272
+ # @return [String]
273
+ required :id, String
274
+
275
+ # @!method initialize(id:)
276
+ # Some parameter documentations has been truncated, see
277
+ # {WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID}
278
+ # for more details.
279
+ #
280
+ # Input for an attachment
281
+ #
282
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
283
+ end
284
+
285
+ # @!method self.variants
286
+ # @return [Array(WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::RefundPolicyAttachment::AttachmentInputWithID)]
287
+ end
288
+
289
+ # A file that does not fit in the other categories.
290
+ module UncategorizedAttachment
291
+ extend WhopSDK::Internal::Type::Union
292
+
293
+ # Input for an attachment
294
+ variant -> { WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID }
295
+
296
+ # Input for an attachment
297
+ variant -> { WhopSDK::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID }
298
+
299
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
300
+ # @!attribute direct_upload_id
301
+ # This ID should be used the first time you upload an attachment. It is the ID of
302
+ # the direct upload that was created when uploading the file to S3 via the
303
+ # mediaDirectUpload mutation.
304
+ #
305
+ # @return [String]
306
+ required :direct_upload_id, String
307
+
308
+ # @!method initialize(direct_upload_id:)
309
+ # Some parameter documentations has been truncated, see
310
+ # {WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID}
311
+ # for more details.
312
+ #
313
+ # Input for an attachment
314
+ #
315
+ # @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
316
+ end
317
+
318
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
319
+ # @!attribute id
320
+ # The ID of an existing attachment object. Use this when updating a resource and
321
+ # keeping a subset of the attachments. Don't use this unless you know what you're
322
+ # doing.
323
+ #
324
+ # @return [String]
325
+ required :id, String
326
+
327
+ # @!method initialize(id:)
328
+ # Some parameter documentations has been truncated, see
329
+ # {WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID}
330
+ # for more details.
331
+ #
332
+ # Input for an attachment
333
+ #
334
+ # @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
335
+ end
336
+
337
+ # @!method self.variants
338
+ # @return [Array(WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::DisputeUpdateEvidenceParams::UncategorizedAttachment::AttachmentInputWithID)]
339
+ end
340
+ end
341
+ end
342
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class DisputeUpdatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # A unique ID for every single webhook request
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute api_version
13
+ # The API version for this webhook
14
+ #
15
+ # @return [Symbol, :v1]
16
+ required :api_version, const: :v1
17
+
18
+ # @!attribute data
19
+ # An object representing a dispute against a company.
20
+ #
21
+ # @return [WhopSDK::Models::Dispute]
22
+ required :data, -> { WhopSDK::Dispute }
23
+
24
+ # @!attribute timestamp
25
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
26
+ #
27
+ # @return [Time]
28
+ required :timestamp, Time
29
+
30
+ # @!attribute type
31
+ # The webhook event type
32
+ #
33
+ # @return [Symbol, :"dispute.updated"]
34
+ required :type, const: :"dispute.updated"
35
+
36
+ # @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"dispute.updated")
37
+ # @param id [String] A unique ID for every single webhook request
38
+ #
39
+ # @param data [WhopSDK::Models::Dispute] An object representing a dispute against a company.
40
+ #
41
+ # @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
42
+ #
43
+ # @param api_version [Symbol, :v1] The API version for this webhook
44
+ #
45
+ # @param type [Symbol, :"dispute.updated"] The webhook event type
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Notifications#create
6
+ class NotificationCreateParams < 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 to target. Only team members of this company will receive
12
+ # the notification. When clicked will take the user to your dashboard app view.
13
+ #
14
+ # @return [String]
15
+ required :company_id, String
16
+
17
+ # @!attribute content
18
+ # The content of the notification
19
+ #
20
+ # @return [String]
21
+ required :content, String
22
+
23
+ # @!attribute title
24
+ # The title of the notification
25
+ #
26
+ # @return [String]
27
+ required :title, String
28
+
29
+ # @!attribute icon_user_id
30
+ # Optional: ID of a Whop user whose profile picture will be used as the
31
+ # notification icon. If not provided, defaults to the experience or company
32
+ # avatar.
33
+ #
34
+ # @return [String, nil]
35
+ optional :icon_user_id, String, nil?: true
36
+
37
+ # @!attribute rest_path
38
+ # The rest path to append to the generated deep link that opens your app. Use
39
+ # [restPath] in your app path in the dashboard to read this parameter.
40
+ #
41
+ # @return [String, nil]
42
+ optional :rest_path, String, nil?: true
43
+
44
+ # @!attribute subtitle
45
+ # The subtitle of the notification
46
+ #
47
+ # @return [String, nil]
48
+ optional :subtitle, String, nil?: true
49
+
50
+ # @!attribute user_ids
51
+ # If provided, this will only send to these users if they are also in the main
52
+ # scope (experience or company)
53
+ #
54
+ # @return [Array<String>, nil]
55
+ optional :user_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true
56
+
57
+ # @!attribute experience_id
58
+ # The id of the experience to target. All users with access to this experience
59
+ # (customers and admins) will receive the notification. When clicked, open your
60
+ # experience view.
61
+ #
62
+ # @return [String]
63
+ required :experience_id, String
64
+
65
+ # @!method initialize(company_id:, content:, title:, experience_id:, icon_user_id: nil, rest_path: nil, subtitle: nil, user_ids: nil, request_options: {})
66
+ # Some parameter documentations has been truncated, see
67
+ # {WhopSDK::Models::NotificationCreateParams} for more details.
68
+ #
69
+ # @param company_id [String] The id of the company to target. Only team members of this company will receive
70
+ #
71
+ # @param content [String] The content of the notification
72
+ #
73
+ # @param title [String] The title of the notification
74
+ #
75
+ # @param experience_id [String] The id of the experience to target. All users with access to this experience (cu
76
+ #
77
+ # @param icon_user_id [String, nil] Optional: ID of a Whop user whose profile picture will be used as the notificati
78
+ #
79
+ # @param rest_path [String, nil] The rest path to append to the generated deep link that opens your app. Use [res
80
+ #
81
+ # @param subtitle [String, nil] The subtitle of the notification
82
+ #
83
+ # @param user_ids [Array<String>, nil] If provided, this will only send to these users if they are also in the main sco
84
+ #
85
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Notifications#create
6
+ class NotificationCreateResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute success
8
+ # Whether the notification was successfully queued for delivery
9
+ #
10
+ # @return [Boolean]
11
+ required :success, WhopSDK::Internal::Type::Boolean
12
+
13
+ # @!method initialize(success:)
14
+ # Response from queuing a notification
15
+ #
16
+ # @param success [Boolean] Whether the notification was successfully queued for delivery
17
+ end
18
+ end
19
+ end
@@ -33,8 +33,12 @@ module WhopSDK
33
33
 
34
34
  variant -> { WhopSDK::PaymentPendingWebhookEvent }
35
35
 
36
+ variant -> { WhopSDK::DisputeCreatedWebhookEvent }
37
+
38
+ variant -> { WhopSDK::DisputeUpdatedWebhookEvent }
39
+
36
40
  # @!method self.variants
37
- # @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent)]
41
+ # @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent)]
38
42
  end
39
43
  end
40
44
  end
@@ -170,6 +170,22 @@ module WhopSDK
170
170
 
171
171
  Direction = WhopSDK::Models::Direction
172
172
 
173
+ Dispute = WhopSDK::Models::Dispute
174
+
175
+ DisputeCreatedWebhookEvent = WhopSDK::Models::DisputeCreatedWebhookEvent
176
+
177
+ DisputeListParams = WhopSDK::Models::DisputeListParams
178
+
179
+ DisputeRetrieveParams = WhopSDK::Models::DisputeRetrieveParams
180
+
181
+ DisputeStatuses = WhopSDK::Models::DisputeStatuses
182
+
183
+ DisputeSubmitEvidenceParams = WhopSDK::Models::DisputeSubmitEvidenceParams
184
+
185
+ DisputeUpdatedWebhookEvent = WhopSDK::Models::DisputeUpdatedWebhookEvent
186
+
187
+ DisputeUpdateEvidenceParams = WhopSDK::Models::DisputeUpdateEvidenceParams
188
+
173
189
  DmsPostTypes = WhopSDK::Models::DmsPostTypes
174
190
 
175
191
  EmailNotificationPreferences = WhopSDK::Models::EmailNotificationPreferences
@@ -308,6 +324,8 @@ module WhopSDK
308
324
 
309
325
  MessageUpdateParams = WhopSDK::Models::MessageUpdateParams
310
326
 
327
+ NotificationCreateParams = WhopSDK::Models::NotificationCreateParams
328
+
311
329
  PageInfo = WhopSDK::Models::PageInfo
312
330
 
313
331
  Payment = WhopSDK::Models::Payment