whop_sdk 0.0.5 → 0.0.7

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/README.md +4 -7
  4. data/lib/whop_sdk/client.rb +17 -6
  5. data/lib/whop_sdk/models/access_token_create_params.rb +26 -36
  6. data/lib/whop_sdk/models/card_brands.rb +1 -0
  7. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -9
  8. data/lib/whop_sdk/models/company.rb +1 -0
  9. data/lib/whop_sdk/models/currency.rb +1 -0
  10. data/lib/whop_sdk/models/dispute.rb +672 -0
  11. data/lib/whop_sdk/models/dispute_created_webhook_event.rb +48 -0
  12. data/lib/whop_sdk/models/dispute_list_params.rb +62 -0
  13. data/lib/whop_sdk/models/dispute_list_response.rb +187 -0
  14. data/lib/whop_sdk/models/dispute_retrieve_params.rb +14 -0
  15. data/lib/whop_sdk/models/dispute_statuses.rb +23 -0
  16. data/lib/whop_sdk/models/dispute_submit_evidence_params.rb +14 -0
  17. data/lib/whop_sdk/models/dispute_update_evidence_params.rb +342 -0
  18. data/lib/whop_sdk/models/dispute_updated_webhook_event.rb +48 -0
  19. data/lib/whop_sdk/models/forum_post_create_params.rb +20 -1
  20. data/lib/whop_sdk/models/forum_post_update_params.rb +20 -1
  21. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +1 -0
  22. data/lib/whop_sdk/models/notification_create_params.rb +88 -0
  23. data/lib/whop_sdk/models/notification_create_response.rb +19 -0
  24. data/lib/whop_sdk/models/shipment.rb +3 -3
  25. data/lib/whop_sdk/models/shipment_list_response.rb +3 -3
  26. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  27. data/lib/whop_sdk/models.rb +18 -0
  28. data/lib/whop_sdk/resources/access_tokens.rb +9 -7
  29. data/lib/whop_sdk/resources/disputes.rb +182 -0
  30. data/lib/whop_sdk/resources/forum_posts.rb +6 -2
  31. data/lib/whop_sdk/resources/notifications.rb +53 -0
  32. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  33. data/lib/whop_sdk/version.rb +1 -1
  34. data/lib/whop_sdk.rb +13 -0
  35. data/rbi/whop_sdk/client.rbi +11 -2
  36. data/rbi/whop_sdk/models/access_token_create_params.rbi +34 -77
  37. data/rbi/whop_sdk/models/card_brands.rbi +1 -0
  38. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -8
  39. data/rbi/whop_sdk/models/company.rbi +2 -0
  40. data/rbi/whop_sdk/models/currency.rbi +1 -0
  41. data/rbi/whop_sdk/models/dispute.rbi +938 -0
  42. data/rbi/whop_sdk/models/dispute_created_webhook_event.rbi +72 -0
  43. data/rbi/whop_sdk/models/dispute_list_params.rbi +83 -0
  44. data/rbi/whop_sdk/models/dispute_list_response.rbi +287 -0
  45. data/rbi/whop_sdk/models/dispute_retrieve_params.rbi +27 -0
  46. data/rbi/whop_sdk/models/dispute_statuses.rbi +32 -0
  47. data/rbi/whop_sdk/models/dispute_submit_evidence_params.rbi +30 -0
  48. data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +566 -0
  49. data/rbi/whop_sdk/models/dispute_updated_webhook_event.rbi +72 -0
  50. data/rbi/whop_sdk/models/forum_post_create_params.rbi +42 -0
  51. data/rbi/whop_sdk/models/forum_post_update_params.rbi +42 -0
  52. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +5 -0
  53. data/rbi/whop_sdk/models/notification_create_params.rbi +113 -0
  54. data/rbi/whop_sdk/models/notification_create_response.rbi +31 -0
  55. data/rbi/whop_sdk/models/shipment.rbi +6 -4
  56. data/rbi/whop_sdk/models/shipment_list_response.rbi +6 -4
  57. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
  58. data/rbi/whop_sdk/models.rbi +18 -0
  59. data/rbi/whop_sdk/resources/access_tokens.rbi +19 -14
  60. data/rbi/whop_sdk/resources/disputes.rbi +194 -0
  61. data/rbi/whop_sdk/resources/forum_posts.rbi +8 -0
  62. data/rbi/whop_sdk/resources/notifications.rbi +54 -0
  63. data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
  64. data/sig/whop_sdk/client.rbs +5 -1
  65. data/sig/whop_sdk/models/access_token_create_params.rbs +14 -29
  66. data/sig/whop_sdk/models/card_brands.rbs +2 -0
  67. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -5
  68. data/sig/whop_sdk/models/company.rbs +2 -0
  69. data/sig/whop_sdk/models/currency.rbs +2 -0
  70. data/sig/whop_sdk/models/dispute.rbs +437 -0
  71. data/sig/whop_sdk/models/dispute_created_webhook_event.rbs +40 -0
  72. data/sig/whop_sdk/models/dispute_list_params.rbs +51 -0
  73. data/sig/whop_sdk/models/dispute_list_response.rbs +124 -0
  74. data/sig/whop_sdk/models/dispute_retrieve_params.rbs +15 -0
  75. data/sig/whop_sdk/models/dispute_statuses.rbs +30 -0
  76. data/sig/whop_sdk/models/dispute_submit_evidence_params.rbs +15 -0
  77. data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +215 -0
  78. data/sig/whop_sdk/models/dispute_updated_webhook_event.rbs +40 -0
  79. data/sig/whop_sdk/models/forum_post_create_params.rbs +17 -1
  80. data/sig/whop_sdk/models/forum_post_update_params.rbs +17 -1
  81. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +2 -0
  82. data/sig/whop_sdk/models/notification_create_params.rbs +61 -0
  83. data/sig/whop_sdk/models/notification_create_response.rbs +13 -0
  84. data/sig/whop_sdk/models/shipment.rbs +4 -4
  85. data/sig/whop_sdk/models/shipment_list_response.rbs +4 -4
  86. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  87. data/sig/whop_sdk/models.rbs +18 -0
  88. data/sig/whop_sdk/resources/access_tokens.rbs +3 -3
  89. data/sig/whop_sdk/resources/disputes.rbs +46 -0
  90. data/sig/whop_sdk/resources/forum_posts.rbs +2 -0
  91. data/sig/whop_sdk/resources/notifications.rbs +19 -0
  92. data/sig/whop_sdk/resources/webhooks.rbs +3 -1
  93. metadata +41 -2
@@ -19,7 +19,9 @@ module WhopSDK
19
19
  WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
20
20
  WhopSDK::PaymentSucceededWebhookEvent,
21
21
  WhopSDK::PaymentFailedWebhookEvent,
22
- WhopSDK::PaymentPendingWebhookEvent
22
+ WhopSDK::PaymentPendingWebhookEvent,
23
+ WhopSDK::DisputeCreatedWebhookEvent,
24
+ WhopSDK::DisputeUpdatedWebhookEvent
23
25
  )
24
26
  )
25
27
  end
@@ -10,7 +10,7 @@ module WhopSDK
10
10
 
11
11
  attr_reader api_key: String
12
12
 
13
- attr_reader app_id: String
13
+ attr_reader app_id: String?
14
14
 
15
15
  attr_reader apps: WhopSDK::Resources::Apps
16
16
 
@@ -76,6 +76,10 @@ module WhopSDK
76
76
 
77
77
  attr_reader access_tokens: WhopSDK::Resources::AccessTokens
78
78
 
79
+ attr_reader notifications: WhopSDK::Resources::Notifications
80
+
81
+ attr_reader disputes: WhopSDK::Resources::Disputes
82
+
79
83
  private def auth_headers: -> ::Hash[String, String]
80
84
 
81
85
  def initialize: (
@@ -2,10 +2,10 @@ module WhopSDK
2
2
  module Models
3
3
  type access_token_create_params =
4
4
  {
5
- scoped_actions: ::Array[String],
6
- target_resource_id: String,
7
- target_resource_type: WhopSDK::Models::AccessTokenCreateParams::target_resource_type,
8
- expires_at: Time?
5
+ company_id: String,
6
+ expires_at: Time?,
7
+ scoped_actions: ::Array[String]?,
8
+ user_id: String
9
9
  }
10
10
  & WhopSDK::Internal::Type::request_parameters
11
11
 
@@ -13,44 +13,29 @@ module WhopSDK
13
13
  extend WhopSDK::Internal::Type::RequestParameters::Converter
14
14
  include WhopSDK::Internal::Type::RequestParameters
15
15
 
16
- attr_accessor scoped_actions: ::Array[String]
16
+ attr_accessor company_id: String
17
17
 
18
- attr_accessor target_resource_id: String
18
+ attr_accessor expires_at: Time?
19
19
 
20
- attr_accessor target_resource_type: WhopSDK::Models::AccessTokenCreateParams::target_resource_type
20
+ attr_accessor scoped_actions: ::Array[String]?
21
21
 
22
- attr_accessor expires_at: Time?
22
+ attr_accessor user_id: String
23
23
 
24
24
  def initialize: (
25
- scoped_actions: ::Array[String],
26
- target_resource_id: String,
27
- target_resource_type: WhopSDK::Models::AccessTokenCreateParams::target_resource_type,
25
+ company_id: String,
26
+ user_id: String,
28
27
  ?expires_at: Time?,
28
+ ?scoped_actions: ::Array[String]?,
29
29
  ?request_options: WhopSDK::request_opts
30
30
  ) -> void
31
31
 
32
32
  def to_hash: -> {
33
- scoped_actions: ::Array[String],
34
- target_resource_id: String,
35
- target_resource_type: WhopSDK::Models::AccessTokenCreateParams::target_resource_type,
33
+ company_id: String,
36
34
  expires_at: Time?,
35
+ scoped_actions: ::Array[String]?,
36
+ user_id: String,
37
37
  request_options: WhopSDK::RequestOptions
38
38
  }
39
-
40
- type target_resource_type =
41
- :company | :product | :experience | :app | :user
42
-
43
- module TargetResourceType
44
- extend WhopSDK::Internal::Type::Enum
45
-
46
- COMPANY: :company
47
- PRODUCT: :product
48
- EXPERIENCE: :experience
49
- APP: :app
50
- USER: :user
51
-
52
- def self?.values: -> ::Array[WhopSDK::Models::AccessTokenCreateParams::target_resource_type]
53
- end
54
39
  end
55
40
  end
56
41
  end
@@ -16,6 +16,7 @@ module WhopSDK
16
16
  | :rupay
17
17
  | :jcbrupay
18
18
  | :elo
19
+ | :maestro
19
20
  | :unknown
20
21
 
21
22
  module CardBrands
@@ -36,6 +37,7 @@ module WhopSDK
36
37
  RUPAY: :rupay
37
38
  JCBRUPAY: :jcbrupay
38
39
  ELO: :elo
40
+ MAESTRO: :maestro
39
41
  UNKNOWN: :unknown
40
42
 
41
43
  def self?.values: -> ::Array[WhopSDK::Models::card_brands]
@@ -45,8 +45,8 @@ module WhopSDK
45
45
  type plan =
46
46
  {
47
47
  company_id: String,
48
+ currency: WhopSDK::Models::currency,
48
49
  billing_period: Integer?,
49
- currency: WhopSDK::Models::currency?,
50
50
  custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
51
51
  description: String?,
52
52
  expiration_days: Integer?,
@@ -69,9 +69,9 @@ module WhopSDK
69
69
  class Plan < WhopSDK::Internal::Type::BaseModel
70
70
  attr_accessor company_id: String
71
71
 
72
- attr_accessor billing_period: Integer?
72
+ attr_accessor currency: WhopSDK::Models::currency
73
73
 
74
- attr_accessor currency: WhopSDK::Models::currency?
74
+ attr_accessor billing_period: Integer?
75
75
 
76
76
  attr_accessor custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?
77
77
 
@@ -109,8 +109,8 @@ module WhopSDK
109
109
 
110
110
  def initialize: (
111
111
  company_id: String,
112
+ currency: WhopSDK::Models::currency,
112
113
  ?billing_period: Integer?,
113
- ?currency: WhopSDK::Models::currency?,
114
114
  ?custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
115
115
  ?description: String?,
116
116
  ?expiration_days: Integer?,
@@ -132,8 +132,8 @@ module WhopSDK
132
132
 
133
133
  def to_hash: -> {
134
134
  company_id: String,
135
+ currency: WhopSDK::Models::currency,
135
136
  billing_period: Integer?,
136
- currency: WhopSDK::Models::currency?,
137
137
  custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
138
138
  description: String?,
139
139
  expiration_days: Integer?,
@@ -145,6 +145,7 @@ module WhopSDK
145
145
  | :linkedin
146
146
  | :twitch
147
147
  | :website
148
+ | :custom
148
149
 
149
150
  module Website
150
151
  extend WhopSDK::Internal::Type::Enum
@@ -157,6 +158,7 @@ module WhopSDK
157
158
  LINKEDIN: :linkedin
158
159
  TWITCH: :twitch
159
160
  WEBSITE: :website
161
+ CUSTOM: :custom
160
162
 
161
163
  def self?.values: -> ::Array[WhopSDK::Models::Company::SocialLink::website]
162
164
  end
@@ -85,6 +85,7 @@ module WhopSDK
85
85
  | :uzs
86
86
  | :rub
87
87
  | :btc
88
+ | :cny
88
89
 
89
90
  module Currency
90
91
  extend WhopSDK::Internal::Type::Enum
@@ -173,6 +174,7 @@ module WhopSDK
173
174
  UZS: :uzs
174
175
  RUB: :rub
175
176
  BTC: :btc
177
+ CNY: :cny
176
178
 
177
179
  def self?.values: -> ::Array[WhopSDK::Models::currency]
178
180
  end
@@ -0,0 +1,437 @@
1
+ module WhopSDK
2
+ module Models
3
+ type dispute =
4
+ {
5
+ id: String,
6
+ access_activity_log: String?,
7
+ amount: Float,
8
+ billing_address: String?,
9
+ cancellation_policy_attachment: WhopSDK::Dispute::CancellationPolicyAttachment?,
10
+ cancellation_policy_disclosure: String?,
11
+ company: WhopSDK::Dispute::Company?,
12
+ created_at: Time?,
13
+ currency: WhopSDK::Models::currency,
14
+ customer_communication_attachment: WhopSDK::Dispute::CustomerCommunicationAttachment?,
15
+ customer_email_address: String?,
16
+ customer_name: String?,
17
+ editable: bool?,
18
+ needs_response_by: Time?,
19
+ notes: String?,
20
+ payment: WhopSDK::Dispute::Payment?,
21
+ plan: WhopSDK::Dispute::Plan?,
22
+ product: WhopSDK::Dispute::Product?,
23
+ product_description: String?,
24
+ reason: String?,
25
+ refund_policy_attachment: WhopSDK::Dispute::RefundPolicyAttachment?,
26
+ refund_policy_disclosure: String?,
27
+ refund_refusal_explanation: String?,
28
+ service_date: String?,
29
+ status: WhopSDK::Models::dispute_statuses,
30
+ uncategorized_attachment: WhopSDK::Dispute::UncategorizedAttachment?,
31
+ visa_rdr: bool
32
+ }
33
+
34
+ class Dispute < WhopSDK::Internal::Type::BaseModel
35
+ attr_accessor id: String
36
+
37
+ attr_accessor access_activity_log: String?
38
+
39
+ attr_accessor amount: Float
40
+
41
+ attr_accessor billing_address: String?
42
+
43
+ attr_accessor cancellation_policy_attachment: WhopSDK::Dispute::CancellationPolicyAttachment?
44
+
45
+ attr_accessor cancellation_policy_disclosure: String?
46
+
47
+ attr_accessor company: WhopSDK::Dispute::Company?
48
+
49
+ attr_accessor created_at: Time?
50
+
51
+ attr_accessor currency: WhopSDK::Models::currency
52
+
53
+ attr_accessor customer_communication_attachment: WhopSDK::Dispute::CustomerCommunicationAttachment?
54
+
55
+ attr_accessor customer_email_address: String?
56
+
57
+ attr_accessor customer_name: String?
58
+
59
+ attr_accessor editable: bool?
60
+
61
+ attr_accessor needs_response_by: Time?
62
+
63
+ attr_accessor notes: String?
64
+
65
+ attr_accessor payment: WhopSDK::Dispute::Payment?
66
+
67
+ attr_accessor plan: WhopSDK::Dispute::Plan?
68
+
69
+ attr_accessor product: WhopSDK::Dispute::Product?
70
+
71
+ attr_accessor product_description: String?
72
+
73
+ attr_accessor reason: String?
74
+
75
+ attr_accessor refund_policy_attachment: WhopSDK::Dispute::RefundPolicyAttachment?
76
+
77
+ attr_accessor refund_policy_disclosure: String?
78
+
79
+ attr_accessor refund_refusal_explanation: String?
80
+
81
+ attr_accessor service_date: String?
82
+
83
+ attr_accessor status: WhopSDK::Models::dispute_statuses
84
+
85
+ attr_accessor uncategorized_attachment: WhopSDK::Dispute::UncategorizedAttachment?
86
+
87
+ attr_accessor visa_rdr: bool
88
+
89
+ def initialize: (
90
+ id: String,
91
+ access_activity_log: String?,
92
+ amount: Float,
93
+ billing_address: String?,
94
+ cancellation_policy_attachment: WhopSDK::Dispute::CancellationPolicyAttachment?,
95
+ cancellation_policy_disclosure: String?,
96
+ company: WhopSDK::Dispute::Company?,
97
+ created_at: Time?,
98
+ currency: WhopSDK::Models::currency,
99
+ customer_communication_attachment: WhopSDK::Dispute::CustomerCommunicationAttachment?,
100
+ customer_email_address: String?,
101
+ customer_name: String?,
102
+ editable: bool?,
103
+ needs_response_by: Time?,
104
+ notes: String?,
105
+ payment: WhopSDK::Dispute::Payment?,
106
+ plan: WhopSDK::Dispute::Plan?,
107
+ product: WhopSDK::Dispute::Product?,
108
+ product_description: String?,
109
+ reason: String?,
110
+ refund_policy_attachment: WhopSDK::Dispute::RefundPolicyAttachment?,
111
+ refund_policy_disclosure: String?,
112
+ refund_refusal_explanation: String?,
113
+ service_date: String?,
114
+ status: WhopSDK::Models::dispute_statuses,
115
+ uncategorized_attachment: WhopSDK::Dispute::UncategorizedAttachment?,
116
+ visa_rdr: bool
117
+ ) -> void
118
+
119
+ def to_hash: -> {
120
+ id: String,
121
+ access_activity_log: String?,
122
+ amount: Float,
123
+ billing_address: String?,
124
+ cancellation_policy_attachment: WhopSDK::Dispute::CancellationPolicyAttachment?,
125
+ cancellation_policy_disclosure: String?,
126
+ company: WhopSDK::Dispute::Company?,
127
+ created_at: Time?,
128
+ currency: WhopSDK::Models::currency,
129
+ customer_communication_attachment: WhopSDK::Dispute::CustomerCommunicationAttachment?,
130
+ customer_email_address: String?,
131
+ customer_name: String?,
132
+ editable: bool?,
133
+ needs_response_by: Time?,
134
+ notes: String?,
135
+ payment: WhopSDK::Dispute::Payment?,
136
+ plan: WhopSDK::Dispute::Plan?,
137
+ product: WhopSDK::Dispute::Product?,
138
+ product_description: String?,
139
+ reason: String?,
140
+ refund_policy_attachment: WhopSDK::Dispute::RefundPolicyAttachment?,
141
+ refund_policy_disclosure: String?,
142
+ refund_refusal_explanation: String?,
143
+ service_date: String?,
144
+ status: WhopSDK::Models::dispute_statuses,
145
+ uncategorized_attachment: WhopSDK::Dispute::UncategorizedAttachment?,
146
+ visa_rdr: bool
147
+ }
148
+
149
+ type cancellation_policy_attachment =
150
+ { id: String, content_type: String?, filename: String?, url: String? }
151
+
152
+ class CancellationPolicyAttachment < WhopSDK::Internal::Type::BaseModel
153
+ attr_accessor id: String
154
+
155
+ attr_accessor content_type: String?
156
+
157
+ attr_accessor filename: String?
158
+
159
+ attr_accessor url: String?
160
+
161
+ def initialize: (
162
+ id: String,
163
+ content_type: String?,
164
+ filename: String?,
165
+ url: String?
166
+ ) -> void
167
+
168
+ def to_hash: -> {
169
+ id: String,
170
+ content_type: String?,
171
+ filename: String?,
172
+ url: String?
173
+ }
174
+ end
175
+
176
+ type company = { id: String, title: String }
177
+
178
+ class Company < WhopSDK::Internal::Type::BaseModel
179
+ attr_accessor id: String
180
+
181
+ attr_accessor title: String
182
+
183
+ def initialize: (id: String, title: String) -> void
184
+
185
+ def to_hash: -> { id: String, title: String }
186
+ end
187
+
188
+ type customer_communication_attachment =
189
+ { id: String, content_type: String?, filename: String?, url: String? }
190
+
191
+ class CustomerCommunicationAttachment < WhopSDK::Internal::Type::BaseModel
192
+ attr_accessor id: String
193
+
194
+ attr_accessor content_type: String?
195
+
196
+ attr_accessor filename: String?
197
+
198
+ attr_accessor url: String?
199
+
200
+ def initialize: (
201
+ id: String,
202
+ content_type: String?,
203
+ filename: String?,
204
+ url: String?
205
+ ) -> void
206
+
207
+ def to_hash: -> {
208
+ id: String,
209
+ content_type: String?,
210
+ filename: String?,
211
+ url: String?
212
+ }
213
+ end
214
+
215
+ type payment =
216
+ {
217
+ id: String,
218
+ billing_reason: WhopSDK::Models::billing_reasons?,
219
+ card_brand: WhopSDK::Models::card_brands?,
220
+ :card_last4 => String?,
221
+ created_at: Time,
222
+ currency: WhopSDK::Models::currency?,
223
+ dispute_alerted_at: Time?,
224
+ member: WhopSDK::Dispute::Payment::Member?,
225
+ membership: WhopSDK::Dispute::Payment::Membership?,
226
+ paid_at: Time?,
227
+ payment_method_type: WhopSDK::Models::payment_method_types?,
228
+ subtotal: Float?,
229
+ total: Float?,
230
+ usd_total: Float?,
231
+ user: WhopSDK::Dispute::Payment::User?
232
+ }
233
+
234
+ class Payment < WhopSDK::Internal::Type::BaseModel
235
+ attr_accessor id: String
236
+
237
+ attr_accessor billing_reason: WhopSDK::Models::billing_reasons?
238
+
239
+ attr_accessor card_brand: WhopSDK::Models::card_brands?
240
+
241
+ attr_accessor card_last4: String?
242
+
243
+ attr_accessor created_at: Time
244
+
245
+ attr_accessor currency: WhopSDK::Models::currency?
246
+
247
+ attr_accessor dispute_alerted_at: Time?
248
+
249
+ attr_accessor member: WhopSDK::Dispute::Payment::Member?
250
+
251
+ attr_accessor membership: WhopSDK::Dispute::Payment::Membership?
252
+
253
+ attr_accessor paid_at: Time?
254
+
255
+ attr_accessor payment_method_type: WhopSDK::Models::payment_method_types?
256
+
257
+ attr_accessor subtotal: Float?
258
+
259
+ attr_accessor total: Float?
260
+
261
+ attr_accessor usd_total: Float?
262
+
263
+ attr_accessor user: WhopSDK::Dispute::Payment::User?
264
+
265
+ def initialize: (
266
+ id: String,
267
+ billing_reason: WhopSDK::Models::billing_reasons?,
268
+ card_brand: WhopSDK::Models::card_brands?,
269
+ card_last4: String?,
270
+ created_at: Time,
271
+ currency: WhopSDK::Models::currency?,
272
+ dispute_alerted_at: Time?,
273
+ member: WhopSDK::Dispute::Payment::Member?,
274
+ membership: WhopSDK::Dispute::Payment::Membership?,
275
+ paid_at: Time?,
276
+ payment_method_type: WhopSDK::Models::payment_method_types?,
277
+ subtotal: Float?,
278
+ total: Float?,
279
+ usd_total: Float?,
280
+ user: WhopSDK::Dispute::Payment::User?
281
+ ) -> void
282
+
283
+ def to_hash: -> {
284
+ id: String,
285
+ billing_reason: WhopSDK::Models::billing_reasons?,
286
+ card_brand: WhopSDK::Models::card_brands?,
287
+ :card_last4 => String?,
288
+ created_at: Time,
289
+ currency: WhopSDK::Models::currency?,
290
+ dispute_alerted_at: Time?,
291
+ member: WhopSDK::Dispute::Payment::Member?,
292
+ membership: WhopSDK::Dispute::Payment::Membership?,
293
+ paid_at: Time?,
294
+ payment_method_type: WhopSDK::Models::payment_method_types?,
295
+ subtotal: Float?,
296
+ total: Float?,
297
+ usd_total: Float?,
298
+ user: WhopSDK::Dispute::Payment::User?
299
+ }
300
+
301
+ type member = { id: String, phone: String? }
302
+
303
+ class Member < WhopSDK::Internal::Type::BaseModel
304
+ attr_accessor id: String
305
+
306
+ attr_accessor phone: String?
307
+
308
+ def initialize: (id: String, phone: String?) -> void
309
+
310
+ def to_hash: -> { id: String, phone: String? }
311
+ end
312
+
313
+ type membership =
314
+ { id: String, status: WhopSDK::Models::membership_status }
315
+
316
+ class Membership < WhopSDK::Internal::Type::BaseModel
317
+ attr_accessor id: String
318
+
319
+ attr_accessor status: WhopSDK::Models::membership_status
320
+
321
+ def initialize: (
322
+ id: String,
323
+ status: WhopSDK::Models::membership_status
324
+ ) -> void
325
+
326
+ def to_hash: -> {
327
+ id: String,
328
+ status: WhopSDK::Models::membership_status
329
+ }
330
+ end
331
+
332
+ type user =
333
+ { id: String, email: String?, name: String?, username: String }
334
+
335
+ class User < WhopSDK::Internal::Type::BaseModel
336
+ attr_accessor id: String
337
+
338
+ attr_accessor email: String?
339
+
340
+ attr_accessor name: String?
341
+
342
+ attr_accessor username: String
343
+
344
+ def initialize: (
345
+ id: String,
346
+ email: String?,
347
+ name: String?,
348
+ username: String
349
+ ) -> void
350
+
351
+ def to_hash: -> {
352
+ id: String,
353
+ email: String?,
354
+ name: String?,
355
+ username: String
356
+ }
357
+ end
358
+ end
359
+
360
+ type plan = { id: String }
361
+
362
+ class Plan < WhopSDK::Internal::Type::BaseModel
363
+ attr_accessor id: String
364
+
365
+ def initialize: (id: String) -> void
366
+
367
+ def to_hash: -> { id: String }
368
+ end
369
+
370
+ type product = { id: String, title: String }
371
+
372
+ class Product < WhopSDK::Internal::Type::BaseModel
373
+ attr_accessor id: String
374
+
375
+ attr_accessor title: String
376
+
377
+ def initialize: (id: String, title: String) -> void
378
+
379
+ def to_hash: -> { id: String, title: String }
380
+ end
381
+
382
+ type refund_policy_attachment =
383
+ { id: String, content_type: String?, filename: String?, url: String? }
384
+
385
+ class RefundPolicyAttachment < WhopSDK::Internal::Type::BaseModel
386
+ attr_accessor id: String
387
+
388
+ attr_accessor content_type: String?
389
+
390
+ attr_accessor filename: String?
391
+
392
+ attr_accessor url: String?
393
+
394
+ def initialize: (
395
+ id: String,
396
+ content_type: String?,
397
+ filename: String?,
398
+ url: String?
399
+ ) -> void
400
+
401
+ def to_hash: -> {
402
+ id: String,
403
+ content_type: String?,
404
+ filename: String?,
405
+ url: String?
406
+ }
407
+ end
408
+
409
+ type uncategorized_attachment =
410
+ { id: String, content_type: String?, filename: String?, url: String? }
411
+
412
+ class UncategorizedAttachment < WhopSDK::Internal::Type::BaseModel
413
+ attr_accessor id: String
414
+
415
+ attr_accessor content_type: String?
416
+
417
+ attr_accessor filename: String?
418
+
419
+ attr_accessor url: String?
420
+
421
+ def initialize: (
422
+ id: String,
423
+ content_type: String?,
424
+ filename: String?,
425
+ url: String?
426
+ ) -> void
427
+
428
+ def to_hash: -> {
429
+ id: String,
430
+ content_type: String?,
431
+ filename: String?,
432
+ url: String?
433
+ }
434
+ end
435
+ end
436
+ end
437
+ end
@@ -0,0 +1,40 @@
1
+ module WhopSDK
2
+ module Models
3
+ type dispute_created_webhook_event =
4
+ {
5
+ id: String,
6
+ api_version: :v1,
7
+ data: WhopSDK::Dispute,
8
+ timestamp: Time,
9
+ type: :"dispute.created"
10
+ }
11
+
12
+ class DisputeCreatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
13
+ attr_accessor id: String
14
+
15
+ attr_accessor api_version: :v1
16
+
17
+ attr_accessor data: WhopSDK::Dispute
18
+
19
+ attr_accessor timestamp: Time
20
+
21
+ attr_accessor type: :"dispute.created"
22
+
23
+ def initialize: (
24
+ id: String,
25
+ data: WhopSDK::Dispute,
26
+ timestamp: Time,
27
+ ?api_version: :v1,
28
+ ?type: :"dispute.created"
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ id: String,
33
+ api_version: :v1,
34
+ data: WhopSDK::Dispute,
35
+ timestamp: Time,
36
+ type: :"dispute.created"
37
+ }
38
+ end
39
+ end
40
+ end