whop_sdk 0.0.28 → 0.0.29

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +4 -0
  5. data/lib/whop_sdk/models/card_brands.rb +1 -0
  6. data/lib/whop_sdk/models/company_update_params.rb +11 -1
  7. data/lib/whop_sdk/models/currency.rb +1 -0
  8. data/lib/whop_sdk/models/dispute_alert_created_webhook_event.rb +419 -0
  9. data/lib/whop_sdk/models/dispute_alert_list_params.rb +78 -0
  10. data/lib/whop_sdk/models/dispute_alert_list_response.rb +112 -0
  11. data/lib/whop_sdk/models/dispute_alert_retrieve_params.rb +14 -0
  12. data/lib/whop_sdk/models/dispute_alert_retrieve_response.rb +361 -0
  13. data/lib/whop_sdk/models/dispute_alert_type.rb +17 -0
  14. data/lib/whop_sdk/models/industry_groups.rb +7 -3
  15. data/lib/whop_sdk/models/industry_types.rb +49 -39
  16. data/lib/whop_sdk/models/message_create_params.rb +9 -1
  17. data/lib/whop_sdk/models/payment_provider.rb +1 -0
  18. data/lib/whop_sdk/models/support_channel_create_params.rb +9 -1
  19. data/lib/whop_sdk/models/unwrap_webhook_event.rb +3 -1
  20. data/lib/whop_sdk/models/webhook_event.rb +1 -0
  21. data/lib/whop_sdk/models.rb +8 -0
  22. data/lib/whop_sdk/resources/companies.rb +3 -1
  23. data/lib/whop_sdk/resources/dispute_alerts.rb +87 -0
  24. data/lib/whop_sdk/resources/experiences.rb +0 -4
  25. data/lib/whop_sdk/resources/messages.rb +3 -1
  26. data/lib/whop_sdk/resources/support_channels.rb +3 -1
  27. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  28. data/lib/whop_sdk/version.rb +1 -1
  29. data/lib/whop_sdk.rb +7 -0
  30. data/rbi/whop_sdk/client.rbi +3 -0
  31. data/rbi/whop_sdk/models/card_brands.rbi +1 -0
  32. data/rbi/whop_sdk/models/company_update_params.rbi +12 -0
  33. data/rbi/whop_sdk/models/currency.rbi +1 -0
  34. data/rbi/whop_sdk/models/dispute_alert_created_webhook_event.rbi +668 -0
  35. data/rbi/whop_sdk/models/dispute_alert_list_params.rbi +99 -0
  36. data/rbi/whop_sdk/models/dispute_alert_list_response.rbi +190 -0
  37. data/rbi/whop_sdk/models/dispute_alert_retrieve_params.rbi +27 -0
  38. data/rbi/whop_sdk/models/dispute_alert_retrieve_response.rbi +579 -0
  39. data/rbi/whop_sdk/models/dispute_alert_type.rbi +23 -0
  40. data/rbi/whop_sdk/models/industry_groups.rbi +24 -8
  41. data/rbi/whop_sdk/models/industry_types.rbi +100 -71
  42. data/rbi/whop_sdk/models/message_create_params.rbi +8 -0
  43. data/rbi/whop_sdk/models/payment_provider.rbi +1 -0
  44. data/rbi/whop_sdk/models/support_channel_create_params.rbi +8 -0
  45. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +1 -0
  46. data/rbi/whop_sdk/models/webhook_event.rbi +2 -0
  47. data/rbi/whop_sdk/models.rbi +9 -0
  48. data/rbi/whop_sdk/resources/companies.rbi +5 -0
  49. data/rbi/whop_sdk/resources/dispute_alerts.rbi +81 -0
  50. data/rbi/whop_sdk/resources/experiences.rbi +0 -4
  51. data/rbi/whop_sdk/resources/messages.rbi +3 -0
  52. data/rbi/whop_sdk/resources/support_channels.rbi +3 -0
  53. data/rbi/whop_sdk/resources/webhooks.rbi +1 -0
  54. data/sig/whop_sdk/client.rbs +2 -0
  55. data/sig/whop_sdk/models/card_brands.rbs +2 -0
  56. data/sig/whop_sdk/models/company_update_params.rbs +5 -0
  57. data/sig/whop_sdk/models/currency.rbs +2 -0
  58. data/sig/whop_sdk/models/dispute_alert_created_webhook_event.rbs +289 -0
  59. data/sig/whop_sdk/models/dispute_alert_list_params.rbs +61 -0
  60. data/sig/whop_sdk/models/dispute_alert_list_response.rbs +80 -0
  61. data/sig/whop_sdk/models/dispute_alert_retrieve_params.rbs +15 -0
  62. data/sig/whop_sdk/models/dispute_alert_retrieve_response.rbs +247 -0
  63. data/sig/whop_sdk/models/dispute_alert_type.rbs +15 -0
  64. data/sig/whop_sdk/models/industry_groups.rbs +14 -6
  65. data/sig/whop_sdk/models/industry_types.rbs +98 -78
  66. data/sig/whop_sdk/models/message_create_params.rbs +5 -0
  67. data/sig/whop_sdk/models/payment_provider.rbs +2 -0
  68. data/sig/whop_sdk/models/support_channel_create_params.rbs +5 -1
  69. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +1 -0
  70. data/sig/whop_sdk/models/webhook_event.rbs +2 -0
  71. data/sig/whop_sdk/models.rbs +8 -0
  72. data/sig/whop_sdk/resources/companies.rbs +1 -0
  73. data/sig/whop_sdk/resources/dispute_alerts.rbs +24 -0
  74. data/sig/whop_sdk/resources/messages.rbs +1 -0
  75. data/sig/whop_sdk/resources/support_channels.rbs +1 -0
  76. data/sig/whop_sdk/resources/webhooks.rbs +1 -0
  77. metadata +23 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65d1daae72b60c920b505a3d0d31fa263abea2a5c3d7d64f3f08a28dd1ca19b8
4
- data.tar.gz: ff1e4ffb828933835fc5d71a89c7fd64cc5fbf06cc925d72f5cd666feb24f612
3
+ metadata.gz: a1c8347713a53f29270c39bc8ea120e18f17faed4f215f4b2cd321d150451885
4
+ data.tar.gz: 7be29cebbc6904c087962587d62f75331049ea07ed261e572373545b9ebfbc04
5
5
  SHA512:
6
- metadata.gz: ca8f9e650c7cf95c9c542f8a8f0d875c898edcbf3206ec04aa2b74073da7081bf4bbbbbcb0d4f2e856a693a277c8caf195efb3aa753a8ca82e36d405e034c3be
7
- data.tar.gz: bb1912a81b99c2bf887636a855d30a82cebe518b3f6948523794279e2b513f037f8f8b1e597c44c72ed41c1549e6bddd0a8ed4b0265d47f16581f20675d2cabf
6
+ metadata.gz: d9efc23ab43a437e44489f276453856d626ebe57dfff902defbec09c97b2f25cfb6a8330a7a47ac2f4f3b6e4653891a9f631240eb7243738b7ccb5c2ab7f968e
7
+ data.tar.gz: 876c0f3dc05a42ef81cbd76f9bd308b9deef2983117ec7dada8c94f900cf3f596062f7880bde09edc1879b152933dc1473690fbdb9e853cea94929d7acb2b635
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.29 (2026-02-25)
4
+
5
+ Full Changelog: [v0.0.28...v0.0.29](https://github.com/whopio/whopsdk-ruby/compare/v0.0.28...v0.0.29)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([dd0c477](https://github.com/whopio/whopsdk-ruby/commit/dd0c4775cfe10e86d6fe38058b7686a69d29d7c1))
10
+ * **api:** api update ([c9720e3](https://github.com/whopio/whopsdk-ruby/commit/c9720e3ccdab33937d69b590862c9967920e9ec8))
11
+ * **api:** api update ([f6cd5ab](https://github.com/whopio/whopsdk-ruby/commit/f6cd5ab63316146f4204c0c126d62c8ed683bdb3))
12
+ * **api:** api update ([a28862d](https://github.com/whopio/whopsdk-ruby/commit/a28862d8e96dc206cb83ae50eff7dd894bd3ae6c))
13
+ * **api:** api update ([7a37568](https://github.com/whopio/whopsdk-ruby/commit/7a375686cbb8e92c0933f3f6515d65730b256722))
14
+ * **api:** api update ([7e1b479](https://github.com/whopio/whopsdk-ruby/commit/7e1b479182b4e8fe5792fe6ceb646e372c275f72))
15
+ * **api:** api update ([250f14b](https://github.com/whopio/whopsdk-ruby/commit/250f14b2681ea016f1b3c28f85c4a55448ec40b5))
16
+ * **api:** api update ([098d113](https://github.com/whopio/whopsdk-ruby/commit/098d113a2c56a4e09c7ba92276f3e1a83c74adf7))
17
+ * **api:** manual updates ([9cc6b72](https://github.com/whopio/whopsdk-ruby/commit/9cc6b727ef20391cabd8ec178b4d5b97d5ce68c6))
18
+
19
+
20
+ ### Chores
21
+
22
+ * **internal:** remove mock server code ([ebe6b38](https://github.com/whopio/whopsdk-ruby/commit/ebe6b38e33ede6d5dec883091caf81a87d35752f))
23
+ * update mock server docs ([acc392b](https://github.com/whopio/whopsdk-ruby/commit/acc392bf812ad643278a0e6ffb1ceedeae3766a1))
24
+
3
25
  ## 0.0.28 (2026-02-19)
4
26
 
5
27
  Full Changelog: [v0.0.27...v0.0.28](https://github.com/whopio/whopsdk-ruby/compare/v0.0.27...v0.0.28)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "whop_sdk", "~> 0.0.28"
29
+ gem "whop_sdk", "~> 0.0.29"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -173,6 +173,9 @@ module WhopSDK
173
173
  # @return [WhopSDK::Resources::DmChannels]
174
174
  attr_reader :dm_channels
175
175
 
176
+ # @return [WhopSDK::Resources::DisputeAlerts]
177
+ attr_reader :dispute_alerts
178
+
176
179
  # @api private
177
180
  #
178
181
  # @return [Hash{String=>String}]
@@ -280,6 +283,7 @@ module WhopSDK
280
283
  @dm_members = WhopSDK::Resources::DmMembers.new(client: self)
281
284
  @ai_chats = WhopSDK::Resources::AIChats.new(client: self)
282
285
  @dm_channels = WhopSDK::Resources::DmChannels.new(client: self)
286
+ @dispute_alerts = WhopSDK::Resources::DisputeAlerts.new(client: self)
283
287
  end
284
288
 
285
289
  # Verifies a Whop user token
@@ -42,6 +42,7 @@ module WhopSDK
42
42
  CHINA_UNION_PAYUZCARD = :china_union_payuzcard
43
43
  CODENSA = :codensa
44
44
  CABAL = :cabal
45
+ HIPERCARD = :hipercard
45
46
  UNKNOWN = :unknown
46
47
 
47
48
  # @!method self.values
@@ -44,6 +44,14 @@ module WhopSDK
44
44
  # @return [WhopSDK::Models::CompanyUpdateParams::Logo, nil]
45
45
  optional :logo, -> { WhopSDK::CompanyUpdateParams::Logo }, nil?: true
46
46
 
47
+ # @!attribute route
48
+ # The unique URL slug for the company's store page. Must be lowercase and can
49
+ # include hyphens (e.g., 'my-company'). If not provided, the route will remain
50
+ # unchanged.
51
+ #
52
+ # @return [String, nil]
53
+ optional :route, String, nil?: true
54
+
47
55
  # @!attribute send_customer_emails
48
56
  # Whether Whop sends transactional emails (receipts, renewals, cancelations) to
49
57
  # customers on behalf of this company.
@@ -64,7 +72,7 @@ module WhopSDK
64
72
  # @return [String, nil]
65
73
  optional :title, String, nil?: true
66
74
 
67
- # @!method initialize(banner_image: nil, business_type: nil, description: nil, industry_group: nil, industry_type: nil, logo: nil, send_customer_emails: nil, target_audience: nil, title: nil, request_options: {})
75
+ # @!method initialize(banner_image: nil, business_type: nil, description: nil, industry_group: nil, industry_type: nil, logo: nil, route: nil, send_customer_emails: nil, target_audience: nil, title: nil, request_options: {})
68
76
  # Some parameter documentations has been truncated, see
69
77
  # {WhopSDK::Models::CompanyUpdateParams} for more details.
70
78
  #
@@ -80,6 +88,8 @@ module WhopSDK
80
88
  #
81
89
  # @param logo [WhopSDK::Models::CompanyUpdateParams::Logo, nil] The company's logo image. Accepts PNG, JPEG, or GIF format.
82
90
  #
91
+ # @param route [String, nil] The unique URL slug for the company's store page. Must be lowercase and can incl
92
+ #
83
93
  # @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails (receipts, renewals, cancelations) to cu
84
94
  #
85
95
  # @param target_audience [String, nil] The target audience for this company (e.g., 'beginner day traders aged 18-25 loo
@@ -91,6 +91,7 @@ module WhopSDK
91
91
  RUB = :rub
92
92
  BTC = :btc
93
93
  CNY = :cny
94
+ USDT = :usdt
94
95
 
95
96
  # @!method self.values
96
97
  # @return [Array<Symbol>]
@@ -0,0 +1,419 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class DisputeAlertCreatedWebhookEvent < 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
+ # A dispute alert represents an early warning notification from a payment
20
+ # processor about a potential dispute or chargeback.
21
+ #
22
+ # @return [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data]
23
+ required :data, -> { WhopSDK::DisputeAlertCreatedWebhookEvent::Data }
24
+
25
+ # @!attribute timestamp
26
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
27
+ #
28
+ # @return [Time]
29
+ required :timestamp, Time
30
+
31
+ # @!attribute type
32
+ # The webhook event type
33
+ #
34
+ # @return [Symbol, :"dispute_alert.created"]
35
+ required :type, const: :"dispute_alert.created"
36
+
37
+ # @!attribute company_id
38
+ # The company ID that this webhook event is associated with
39
+ #
40
+ # @return [String, nil]
41
+ optional :company_id, String, nil?: true
42
+
43
+ # @!method initialize(id:, data:, timestamp:, company_id: nil, api_version: :v1, type: :"dispute_alert.created")
44
+ # Some parameter documentations has been truncated, see
45
+ # {WhopSDK::Models::DisputeAlertCreatedWebhookEvent} for more details.
46
+ #
47
+ # @param id [String] A unique ID for every single webhook request
48
+ #
49
+ # @param data [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data] A dispute alert represents an early warning notification from a payment processo
50
+ #
51
+ # @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
52
+ #
53
+ # @param company_id [String, nil] The company ID that this webhook event is associated with
54
+ #
55
+ # @param api_version [Symbol, :v1] The API version for this webhook
56
+ #
57
+ # @param type [Symbol, :"dispute_alert.created"] The webhook event type
58
+
59
+ # @see WhopSDK::Models::DisputeAlertCreatedWebhookEvent#data
60
+ class Data < WhopSDK::Internal::Type::BaseModel
61
+ # @!attribute id
62
+ # The unique identifier of the dispute alert.
63
+ #
64
+ # @return [String]
65
+ required :id, String
66
+
67
+ # @!attribute alert_type
68
+ # The type of the dispute alert.
69
+ #
70
+ # @return [Symbol, WhopSDK::Models::DisputeAlertType]
71
+ required :alert_type, enum: -> { WhopSDK::DisputeAlertType }
72
+
73
+ # @!attribute amount
74
+ # The alerted amount in the specified currency.
75
+ #
76
+ # @return [Float]
77
+ required :amount, Float
78
+
79
+ # @!attribute charge_for_alert
80
+ # Whether this alert incurs a charge.
81
+ #
82
+ # @return [Boolean]
83
+ required :charge_for_alert, WhopSDK::Internal::Type::Boolean
84
+
85
+ # @!attribute created_at
86
+ # The time the dispute alert was created.
87
+ #
88
+ # @return [Time]
89
+ required :created_at, Time
90
+
91
+ # @!attribute currency
92
+ # The three-letter ISO currency code for the alerted amount.
93
+ #
94
+ # @return [Symbol, WhopSDK::Models::Currency]
95
+ required :currency, enum: -> { WhopSDK::Currency }
96
+
97
+ # @!attribute dispute
98
+ # The dispute associated with the dispute alert.
99
+ #
100
+ # @return [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Dispute, nil]
101
+ required :dispute, -> { WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Dispute }, nil?: true
102
+
103
+ # @!attribute payment
104
+ # The payment associated with the dispute alert.
105
+ #
106
+ # @return [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment, nil]
107
+ required :payment, -> { WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment }, nil?: true
108
+
109
+ # @!attribute transaction_date
110
+ # The date of the original transaction.
111
+ #
112
+ # @return [Time, nil]
113
+ required :transaction_date, Time, nil?: true
114
+
115
+ # @!method initialize(id:, alert_type:, amount:, charge_for_alert:, created_at:, currency:, dispute:, payment:, transaction_date:)
116
+ # A dispute alert represents an early warning notification from a payment
117
+ # processor about a potential dispute or chargeback.
118
+ #
119
+ # @param id [String] The unique identifier of the dispute alert.
120
+ #
121
+ # @param alert_type [Symbol, WhopSDK::Models::DisputeAlertType] The type of the dispute alert.
122
+ #
123
+ # @param amount [Float] The alerted amount in the specified currency.
124
+ #
125
+ # @param charge_for_alert [Boolean] Whether this alert incurs a charge.
126
+ #
127
+ # @param created_at [Time] The time the dispute alert was created.
128
+ #
129
+ # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for the alerted amount.
130
+ #
131
+ # @param dispute [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Dispute, nil] The dispute associated with the dispute alert.
132
+ #
133
+ # @param payment [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment, nil] The payment associated with the dispute alert.
134
+ #
135
+ # @param transaction_date [Time, nil] The date of the original transaction.
136
+
137
+ # @see WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data#dispute
138
+ class Dispute < WhopSDK::Internal::Type::BaseModel
139
+ # @!attribute id
140
+ # The unique identifier for the dispute.
141
+ #
142
+ # @return [String]
143
+ required :id, String
144
+
145
+ # @!attribute amount
146
+ # The disputed amount in the specified currency, formatted as a decimal.
147
+ #
148
+ # @return [Float]
149
+ required :amount, Float
150
+
151
+ # @!attribute created_at
152
+ # The datetime the dispute was created.
153
+ #
154
+ # @return [Time, nil]
155
+ required :created_at, Time, nil?: true
156
+
157
+ # @!attribute currency
158
+ # The three-letter ISO currency code for the disputed amount.
159
+ #
160
+ # @return [Symbol, WhopSDK::Models::Currency]
161
+ required :currency, enum: -> { WhopSDK::Currency }
162
+
163
+ # @!attribute reason
164
+ # A human-readable reason for the dispute.
165
+ #
166
+ # @return [String, nil]
167
+ required :reason, String, nil?: true
168
+
169
+ # @!attribute status
170
+ # The current status of the dispute lifecycle, such as needs_response,
171
+ # under_review, won, or lost.
172
+ #
173
+ # @return [Symbol, WhopSDK::Models::DisputeStatuses]
174
+ required :status, enum: -> { WhopSDK::DisputeStatuses }
175
+
176
+ # @!method initialize(id:, amount:, created_at:, currency:, reason:, status:)
177
+ # Some parameter documentations has been truncated, see
178
+ # {WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Dispute} for more
179
+ # details.
180
+ #
181
+ # The dispute associated with the dispute alert.
182
+ #
183
+ # @param id [String] The unique identifier for the dispute.
184
+ #
185
+ # @param amount [Float] The disputed amount in the specified currency, formatted as a decimal.
186
+ #
187
+ # @param created_at [Time, nil] The datetime the dispute was created.
188
+ #
189
+ # @param currency [Symbol, WhopSDK::Models::Currency] The three-letter ISO currency code for the disputed amount.
190
+ #
191
+ # @param reason [String, nil] A human-readable reason for the dispute.
192
+ #
193
+ # @param status [Symbol, WhopSDK::Models::DisputeStatuses] The current status of the dispute lifecycle, such as needs_response, under_revie
194
+ end
195
+
196
+ # @see WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data#payment
197
+ class Payment < WhopSDK::Internal::Type::BaseModel
198
+ # @!attribute id
199
+ # The unique identifier for the payment.
200
+ #
201
+ # @return [String]
202
+ required :id, String
203
+
204
+ # @!attribute billing_reason
205
+ # The reason why a specific payment was billed
206
+ #
207
+ # @return [Symbol, WhopSDK::Models::BillingReasons, nil]
208
+ required :billing_reason, enum: -> { WhopSDK::BillingReasons }, nil?: true
209
+
210
+ # @!attribute card_brand
211
+ # Possible card brands that a payment token can have
212
+ #
213
+ # @return [Symbol, WhopSDK::Models::CardBrands, nil]
214
+ required :card_brand, enum: -> { WhopSDK::CardBrands }, nil?: true
215
+
216
+ # @!attribute card_last4
217
+ # The last four digits of the card used to make this payment. Null if the payment
218
+ # was not made with a card.
219
+ #
220
+ # @return [String, nil]
221
+ required :card_last4, String, nil?: true
222
+
223
+ # @!attribute created_at
224
+ # The datetime the payment was created.
225
+ #
226
+ # @return [Time]
227
+ required :created_at, Time
228
+
229
+ # @!attribute currency
230
+ # The available currencies on the platform
231
+ #
232
+ # @return [Symbol, WhopSDK::Models::Currency, nil]
233
+ required :currency, enum: -> { WhopSDK::Currency }, nil?: true
234
+
235
+ # @!attribute dispute_alerted_at
236
+ # When an alert came in that this transaction will be disputed
237
+ #
238
+ # @return [Time, nil]
239
+ required :dispute_alerted_at, Time, nil?: true
240
+
241
+ # @!attribute member
242
+ # The member attached to this payment.
243
+ #
244
+ # @return [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment::Member, nil]
245
+ required :member, -> { WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::Member }, nil?: true
246
+
247
+ # @!attribute membership
248
+ # The membership attached to this payment.
249
+ #
250
+ # @return [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment::Membership, nil]
251
+ required :membership,
252
+ -> { WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::Membership },
253
+ nil?: true
254
+
255
+ # @!attribute paid_at
256
+ # The time at which this payment was successfully collected. Null if the payment
257
+ # has not yet succeeded. As a Unix timestamp.
258
+ #
259
+ # @return [Time, nil]
260
+ required :paid_at, Time, nil?: true
261
+
262
+ # @!attribute payment_method_type
263
+ # The different types of payment methods that can be used.
264
+ #
265
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
266
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
267
+
268
+ # @!attribute subtotal
269
+ # The subtotal to show to the creator (excluding buyer fees).
270
+ #
271
+ # @return [Float, nil]
272
+ required :subtotal, Float, nil?: true
273
+
274
+ # @!attribute total
275
+ # The total to show to the creator (excluding buyer fees).
276
+ #
277
+ # @return [Float, nil]
278
+ required :total, Float, nil?: true
279
+
280
+ # @!attribute usd_total
281
+ # The total in USD to show to the creator (excluding buyer fees).
282
+ #
283
+ # @return [Float, nil]
284
+ required :usd_total, Float, nil?: true
285
+
286
+ # @!attribute user
287
+ # The user that made this payment.
288
+ #
289
+ # @return [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment::User, nil]
290
+ required :user, -> { WhopSDK::DisputeAlertCreatedWebhookEvent::Data::Payment::User }, nil?: true
291
+
292
+ # @!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:)
293
+ # Some parameter documentations has been truncated, see
294
+ # {WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment} for more
295
+ # details.
296
+ #
297
+ # The payment associated with the dispute alert.
298
+ #
299
+ # @param id [String] The unique identifier for the payment.
300
+ #
301
+ # @param billing_reason [Symbol, WhopSDK::Models::BillingReasons, nil] The reason why a specific payment was billed
302
+ #
303
+ # @param card_brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
304
+ #
305
+ # @param card_last4 [String, nil] The last four digits of the card used to make this payment. Null if the payment
306
+ #
307
+ # @param created_at [Time] The datetime the payment was created.
308
+ #
309
+ # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
310
+ #
311
+ # @param dispute_alerted_at [Time, nil] When an alert came in that this transaction will be disputed
312
+ #
313
+ # @param member [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment::Member, nil] The member attached to this payment.
314
+ #
315
+ # @param membership [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment::Membership, nil] The membership attached to this payment.
316
+ #
317
+ # @param paid_at [Time, nil] The time at which this payment was successfully collected. Null if the payment h
318
+ #
319
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
320
+ #
321
+ # @param subtotal [Float, nil] The subtotal to show to the creator (excluding buyer fees).
322
+ #
323
+ # @param total [Float, nil] The total to show to the creator (excluding buyer fees).
324
+ #
325
+ # @param usd_total [Float, nil] The total in USD to show to the creator (excluding buyer fees).
326
+ #
327
+ # @param user [WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment::User, nil] The user that made this payment.
328
+
329
+ # @see WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment#member
330
+ class Member < WhopSDK::Internal::Type::BaseModel
331
+ # @!attribute id
332
+ # The unique identifier for the company member.
333
+ #
334
+ # @return [String]
335
+ required :id, String
336
+
337
+ # @!attribute phone
338
+ # The phone number for the member, if available.
339
+ #
340
+ # @return [String, nil]
341
+ required :phone, String, nil?: true
342
+
343
+ # @!method initialize(id:, phone:)
344
+ # The member attached to this payment.
345
+ #
346
+ # @param id [String] The unique identifier for the company member.
347
+ #
348
+ # @param phone [String, nil] The phone number for the member, if available.
349
+ end
350
+
351
+ # @see WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment#membership
352
+ class Membership < WhopSDK::Internal::Type::BaseModel
353
+ # @!attribute id
354
+ # The unique identifier for the membership.
355
+ #
356
+ # @return [String]
357
+ required :id, String
358
+
359
+ # @!attribute status
360
+ # The state of the membership.
361
+ #
362
+ # @return [Symbol, WhopSDK::Models::MembershipStatus]
363
+ required :status, enum: -> { WhopSDK::MembershipStatus }
364
+
365
+ # @!method initialize(id:, status:)
366
+ # The membership attached to this payment.
367
+ #
368
+ # @param id [String] The unique identifier for the membership.
369
+ #
370
+ # @param status [Symbol, WhopSDK::Models::MembershipStatus] The state of the membership.
371
+ end
372
+
373
+ # @see WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment#user
374
+ class User < WhopSDK::Internal::Type::BaseModel
375
+ # @!attribute id
376
+ # The unique identifier for the user.
377
+ #
378
+ # @return [String]
379
+ required :id, String
380
+
381
+ # @!attribute email
382
+ # The user's email address. Requires the member:email:read permission to access.
383
+ # Null if not authorized.
384
+ #
385
+ # @return [String, nil]
386
+ required :email, String, nil?: true
387
+
388
+ # @!attribute name
389
+ # The user's display name shown on their public profile.
390
+ #
391
+ # @return [String, nil]
392
+ required :name, String, nil?: true
393
+
394
+ # @!attribute username
395
+ # The user's unique username shown on their public profile.
396
+ #
397
+ # @return [String]
398
+ required :username, String
399
+
400
+ # @!method initialize(id:, email:, name:, username:)
401
+ # Some parameter documentations has been truncated, see
402
+ # {WhopSDK::Models::DisputeAlertCreatedWebhookEvent::Data::Payment::User} for more
403
+ # details.
404
+ #
405
+ # The user that made this payment.
406
+ #
407
+ # @param id [String] The unique identifier for the user.
408
+ #
409
+ # @param email [String, nil] The user's email address. Requires the member:email:read permission to access. N
410
+ #
411
+ # @param name [String, nil] The user's display name shown on their public profile.
412
+ #
413
+ # @param username [String] The user's unique username shown on their public profile.
414
+ end
415
+ end
416
+ end
417
+ end
418
+ end
419
+ end
@@ -0,0 +1,78 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::DisputeAlerts#list
6
+ class DisputeAlertListParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute company_id
11
+ # The unique identifier of the company to list dispute alerts for.
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 created_after
29
+ # Only return dispute alerts created after this timestamp.
30
+ #
31
+ # @return [Time, nil]
32
+ optional :created_after, Time, nil?: true
33
+
34
+ # @!attribute created_before
35
+ # Only return dispute alerts created before this timestamp.
36
+ #
37
+ # @return [Time, nil]
38
+ optional :created_before, Time, nil?: true
39
+
40
+ # @!attribute direction
41
+ # The direction of the sort.
42
+ #
43
+ # @return [Symbol, WhopSDK::Models::Direction, nil]
44
+ optional :direction, enum: -> { WhopSDK::Direction }, nil?: true
45
+
46
+ # @!attribute first
47
+ # Returns the first _n_ elements from the list.
48
+ #
49
+ # @return [Integer, nil]
50
+ optional :first, Integer, nil?: true
51
+
52
+ # @!attribute last
53
+ # Returns the last _n_ elements from the list.
54
+ #
55
+ # @return [Integer, nil]
56
+ optional :last, Integer, nil?: true
57
+
58
+ # @!method initialize(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
59
+ # @param company_id [String] The unique identifier of the company to list dispute alerts for.
60
+ #
61
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
62
+ #
63
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
64
+ #
65
+ # @param created_after [Time, nil] Only return dispute alerts created after this timestamp.
66
+ #
67
+ # @param created_before [Time, nil] Only return dispute alerts created before this timestamp.
68
+ #
69
+ # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
70
+ #
71
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
72
+ #
73
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
74
+ #
75
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
76
+ end
77
+ end
78
+ end