whop_sdk 0.0.25 → 0.0.26

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 (228) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +4 -0
  5. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +1 -1
  6. data/lib/whop_sdk/models/{ai_chat_create_response.rb → ai_chat.rb} +5 -5
  7. data/lib/whop_sdk/models/api_version.rb +17 -0
  8. data/lib/whop_sdk/models/authorized_user_list_params.rb +9 -9
  9. data/lib/whop_sdk/models/authorized_user_list_response.rb +31 -1
  10. data/lib/whop_sdk/models/authorized_user_retrieve_response.rb +31 -1
  11. data/lib/whop_sdk/models/bot_token_transaction_types.rb +17 -0
  12. data/lib/whop_sdk/models/cancel_options.rb +22 -0
  13. data/lib/whop_sdk/models/{company_token_transaction_create_response.rb → company_token_transaction.rb} +16 -31
  14. data/lib/whop_sdk/models/company_token_transaction_list_params.rb +3 -17
  15. data/lib/whop_sdk/models/company_token_transaction_list_response.rb +3 -18
  16. data/lib/whop_sdk/models/dm_channel.rb +43 -0
  17. data/lib/whop_sdk/models/dm_channel_create_params.rb +38 -0
  18. data/lib/whop_sdk/models/dm_channel_delete_params.rb +14 -0
  19. data/lib/whop_sdk/models/dm_channel_delete_response.rb +8 -0
  20. data/lib/whop_sdk/models/dm_channel_list_params.rb +54 -0
  21. data/lib/whop_sdk/models/dm_channel_list_response.rb +43 -0
  22. data/lib/whop_sdk/models/dm_channel_retrieve_params.rb +14 -0
  23. data/lib/whop_sdk/models/dm_channel_update_params.rb +22 -0
  24. data/lib/whop_sdk/models/dm_feed_member_notification_preferences.rb +17 -0
  25. data/lib/whop_sdk/models/dm_feed_member_statuses.rb +19 -0
  26. data/lib/whop_sdk/models/{dm_member_create_response.rb → dm_member.rb} +8 -39
  27. data/lib/whop_sdk/models/dm_member_list_response.rb +3 -19
  28. data/lib/whop_sdk/models/dm_member_update_params.rb +6 -34
  29. data/lib/whop_sdk/models/file_create_response.rb +3 -18
  30. data/lib/whop_sdk/models/file_retrieve_response.rb +3 -18
  31. data/lib/whop_sdk/models/{lead_create_response.rb → lead.rb} +13 -13
  32. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +6 -63
  33. data/lib/whop_sdk/models/member_list_params.rb +9 -9
  34. data/lib/whop_sdk/models/membership.rb +3 -22
  35. data/lib/whop_sdk/models/membership_list_params.rb +3 -20
  36. data/lib/whop_sdk/models/membership_list_response.rb +3 -22
  37. data/lib/whop_sdk/models/payment.rb +63 -1
  38. data/lib/whop_sdk/models/payment_list_response.rb +63 -1
  39. data/lib/whop_sdk/models/payout_destination_category.rb +20 -0
  40. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +3 -20
  41. data/lib/whop_sdk/models/payout_method_list_response.rb +3 -20
  42. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +3 -20
  43. data/lib/whop_sdk/models/upload_status.rb +18 -0
  44. data/lib/whop_sdk/models/verification_error_code.rb +33 -0
  45. data/lib/whop_sdk/models/verification_retrieve_response.rb +6 -62
  46. data/lib/whop_sdk/models/verification_status.rb +27 -0
  47. data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +6 -62
  48. data/lib/whop_sdk/models/webhook.rb +88 -0
  49. data/lib/whop_sdk/models/webhook_create_params.rb +6 -56
  50. data/lib/whop_sdk/models/webhook_create_response.rb +9 -97
  51. data/lib/whop_sdk/models/webhook_event.rb +41 -0
  52. data/lib/whop_sdk/models/webhook_list_response.rb +6 -57
  53. data/lib/whop_sdk/models/webhook_update_params.rb +6 -56
  54. data/lib/whop_sdk/models/{withdrawal_create_response.rb → withdrawal.rb} +15 -15
  55. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +3 -267
  56. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +3 -267
  57. data/lib/whop_sdk/models.rb +44 -0
  58. data/lib/whop_sdk/resources/ai_chats.rb +6 -6
  59. data/lib/whop_sdk/resources/authorized_users.rb +4 -4
  60. data/lib/whop_sdk/resources/company_token_transactions.rb +5 -5
  61. data/lib/whop_sdk/resources/dm_channels.rb +151 -0
  62. data/lib/whop_sdk/resources/dm_members.rb +8 -8
  63. data/lib/whop_sdk/resources/leads.rb +6 -12
  64. data/lib/whop_sdk/resources/members.rb +4 -4
  65. data/lib/whop_sdk/resources/memberships.rb +1 -1
  66. data/lib/whop_sdk/resources/webhooks.rb +8 -8
  67. data/lib/whop_sdk/resources/withdrawals.rb +4 -4
  68. data/lib/whop_sdk/version.rb +1 -1
  69. data/lib/whop_sdk.rb +25 -15
  70. data/rbi/whop_sdk/client.rbi +3 -0
  71. data/rbi/whop_sdk/models/{ai_chat_update_response.rbi → ai_chat.rbi} +7 -17
  72. data/rbi/whop_sdk/models/api_version.rbi +21 -0
  73. data/rbi/whop_sdk/models/authorized_user_list_params.rbi +8 -8
  74. data/rbi/whop_sdk/models/authorized_user_list_response.rbi +47 -0
  75. data/rbi/whop_sdk/models/authorized_user_retrieve_response.rbi +49 -0
  76. data/rbi/whop_sdk/models/bot_token_transaction_types.rbi +28 -0
  77. data/rbi/whop_sdk/models/cancel_options.rbi +30 -0
  78. data/rbi/whop_sdk/models/{company_token_transaction_create_response.rbi → company_token_transaction.rbi} +20 -91
  79. data/rbi/whop_sdk/models/company_token_transaction_list_params.rbi +3 -53
  80. data/rbi/whop_sdk/models/company_token_transaction_list_response.rbi +3 -49
  81. data/rbi/whop_sdk/models/dm_channel.rbi +60 -0
  82. data/rbi/whop_sdk/models/dm_channel_create_params.rbi +59 -0
  83. data/rbi/whop_sdk/models/dm_channel_delete_params.rbi +27 -0
  84. data/rbi/whop_sdk/models/dm_channel_delete_response.rbi +8 -0
  85. data/rbi/whop_sdk/models/dm_channel_list_params.rbi +75 -0
  86. data/rbi/whop_sdk/models/dm_channel_list_response.rbi +65 -0
  87. data/rbi/whop_sdk/models/dm_channel_retrieve_params.rbi +27 -0
  88. data/rbi/whop_sdk/models/dm_channel_update_params.rbi +43 -0
  89. data/rbi/whop_sdk/models/dm_feed_member_notification_preferences.rbi +34 -0
  90. data/rbi/whop_sdk/models/dm_feed_member_statuses.rbi +26 -0
  91. data/rbi/whop_sdk/models/dm_member.rbi +82 -0
  92. data/rbi/whop_sdk/models/dm_member_list_response.rbi +3 -52
  93. data/rbi/whop_sdk/models/dm_member_update_params.rbi +6 -79
  94. data/rbi/whop_sdk/models/file_create_response.rbi +3 -49
  95. data/rbi/whop_sdk/models/file_retrieve_response.rbi +3 -51
  96. data/rbi/whop_sdk/models/{lead_update_response.rbi → lead.rbi} +17 -42
  97. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +6 -230
  98. data/rbi/whop_sdk/models/member_list_params.rbi +8 -8
  99. data/rbi/whop_sdk/models/membership.rbi +3 -47
  100. data/rbi/whop_sdk/models/membership_list_params.rbi +3 -70
  101. data/rbi/whop_sdk/models/membership_list_response.rbi +3 -73
  102. data/rbi/whop_sdk/models/payment.rbi +88 -0
  103. data/rbi/whop_sdk/models/payment_list_response.rbi +100 -0
  104. data/rbi/whop_sdk/models/payout_destination_category.rbi +33 -0
  105. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +3 -64
  106. data/rbi/whop_sdk/models/payout_method_list_response.rbi +3 -64
  107. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +3 -64
  108. data/rbi/whop_sdk/models/upload_status.rbi +22 -0
  109. data/rbi/whop_sdk/models/verification_error_code.rbi +101 -0
  110. data/rbi/whop_sdk/models/verification_retrieve_response.rbi +6 -230
  111. data/rbi/whop_sdk/models/verification_status.rbi +38 -0
  112. data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +6 -232
  113. data/rbi/whop_sdk/models/webhook.rbi +104 -0
  114. data/rbi/whop_sdk/models/webhook_create_params.rbi +6 -194
  115. data/rbi/whop_sdk/models/webhook_create_response.rbi +9 -386
  116. data/rbi/whop_sdk/models/webhook_event.rbi +79 -0
  117. data/rbi/whop_sdk/models/webhook_list_response.rbi +6 -210
  118. data/rbi/whop_sdk/models/webhook_update_params.rbi +6 -194
  119. data/rbi/whop_sdk/models/{withdrawal_create_response.rbi → withdrawal.rbi} +63 -127
  120. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +4 -571
  121. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +4 -571
  122. data/rbi/whop_sdk/models.rbi +45 -0
  123. data/rbi/whop_sdk/resources/ai_chats.rbi +3 -3
  124. data/rbi/whop_sdk/resources/authorized_users.rbi +3 -3
  125. data/rbi/whop_sdk/resources/company_token_transactions.rbi +3 -5
  126. data/rbi/whop_sdk/resources/dm_channels.rbi +121 -0
  127. data/rbi/whop_sdk/resources/dm_members.rbi +5 -7
  128. data/rbi/whop_sdk/resources/leads.rbi +3 -3
  129. data/rbi/whop_sdk/resources/members.rbi +3 -3
  130. data/rbi/whop_sdk/resources/memberships.rbi +1 -4
  131. data/rbi/whop_sdk/resources/webhooks.rbi +6 -10
  132. data/rbi/whop_sdk/resources/withdrawals.rbi +2 -2
  133. data/sig/whop_sdk/client.rbs +2 -0
  134. data/sig/whop_sdk/models/{ai_chat_update_response.rbs → ai_chat.rbs} +6 -6
  135. data/sig/whop_sdk/models/api_version.rbs +15 -0
  136. data/sig/whop_sdk/models/authorized_user_list_params.rbs +5 -5
  137. data/sig/whop_sdk/models/authorized_user_list_response.rbs +17 -0
  138. data/sig/whop_sdk/models/authorized_user_retrieve_response.rbs +17 -0
  139. data/sig/whop_sdk/models/bot_token_transaction_types.rbs +15 -0
  140. data/sig/whop_sdk/models/cancel_options.rbs +26 -0
  141. data/sig/whop_sdk/models/{company_token_transaction_create_response.rbs → company_token_transaction.rbs} +18 -30
  142. data/sig/whop_sdk/models/company_token_transaction_list_params.rbs +4 -16
  143. data/sig/whop_sdk/models/company_token_transaction_list_response.rbs +4 -16
  144. data/sig/whop_sdk/models/dm_channel.rbs +30 -0
  145. data/sig/whop_sdk/models/dm_channel_create_params.rbs +36 -0
  146. data/sig/whop_sdk/models/dm_channel_delete_params.rbs +15 -0
  147. data/sig/whop_sdk/models/dm_channel_delete_response.rbs +5 -0
  148. data/sig/whop_sdk/models/dm_channel_list_params.rbs +46 -0
  149. data/sig/whop_sdk/models/dm_channel_list_response.rbs +30 -0
  150. data/sig/whop_sdk/models/dm_channel_retrieve_params.rbs +15 -0
  151. data/sig/whop_sdk/models/dm_channel_update_params.rbs +23 -0
  152. data/sig/whop_sdk/models/dm_feed_member_notification_preferences.rbs +15 -0
  153. data/sig/whop_sdk/models/dm_feed_member_statuses.rbs +18 -0
  154. data/sig/whop_sdk/models/dm_member.rbs +45 -0
  155. data/sig/whop_sdk/models/dm_member_list_response.rbs +4 -18
  156. data/sig/whop_sdk/models/dm_member_update_params.rbs +8 -34
  157. data/sig/whop_sdk/models/file_create_response.rbs +4 -17
  158. data/sig/whop_sdk/models/file_retrieve_response.rbs +4 -17
  159. data/sig/whop_sdk/models/{lead_update_response.rbs → lead.rbs} +14 -14
  160. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +8 -90
  161. data/sig/whop_sdk/models/member_list_params.rbs +5 -5
  162. data/sig/whop_sdk/models/membership.rbs +4 -27
  163. data/sig/whop_sdk/models/membership_list_params.rbs +4 -27
  164. data/sig/whop_sdk/models/membership_list_response.rbs +4 -27
  165. data/sig/whop_sdk/models/payment.rbs +47 -0
  166. data/sig/whop_sdk/models/payment_list_response.rbs +47 -0
  167. data/sig/whop_sdk/models/payout_destination_category.rbs +19 -0
  168. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +4 -25
  169. data/sig/whop_sdk/models/payout_method_list_response.rbs +4 -25
  170. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +4 -25
  171. data/sig/whop_sdk/models/upload_status.rbs +16 -0
  172. data/sig/whop_sdk/models/verification_error_code.rbs +50 -0
  173. data/sig/whop_sdk/models/verification_retrieve_response.rbs +8 -90
  174. data/sig/whop_sdk/models/verification_status.rbs +38 -0
  175. data/sig/whop_sdk/models/verification_succeeded_webhook_event.rbs +8 -90
  176. data/sig/whop_sdk/models/webhook.rbs +60 -0
  177. data/sig/whop_sdk/models/webhook_create_params.rbs +8 -83
  178. data/sig/whop_sdk/models/webhook_create_response.rbs +12 -150
  179. data/sig/whop_sdk/models/webhook_event.rbs +66 -0
  180. data/sig/whop_sdk/models/webhook_list_response.rbs +8 -83
  181. data/sig/whop_sdk/models/webhook_update_params.rbs +8 -83
  182. data/sig/whop_sdk/models/{withdrawal_create_response.rbs → withdrawal.rbs} +15 -15
  183. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +4 -241
  184. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +4 -241
  185. data/sig/whop_sdk/models.rbs +44 -0
  186. data/sig/whop_sdk/resources/ai_chats.rbs +3 -3
  187. data/sig/whop_sdk/resources/authorized_users.rbs +1 -1
  188. data/sig/whop_sdk/resources/company_token_transactions.rbs +3 -3
  189. data/sig/whop_sdk/resources/dm_channels.rbs +36 -0
  190. data/sig/whop_sdk/resources/dm_members.rbs +5 -5
  191. data/sig/whop_sdk/resources/leads.rbs +3 -3
  192. data/sig/whop_sdk/resources/members.rbs +1 -1
  193. data/sig/whop_sdk/resources/memberships.rbs +1 -1
  194. data/sig/whop_sdk/resources/webhooks.rbs +6 -6
  195. data/sig/whop_sdk/resources/withdrawals.rbs +2 -2
  196. metadata +77 -47
  197. data/lib/whop_sdk/models/ai_chat_retrieve_response.rb +0 -89
  198. data/lib/whop_sdk/models/ai_chat_update_response.rb +0 -89
  199. data/lib/whop_sdk/models/company_token_transaction_retrieve_response.rb +0 -180
  200. data/lib/whop_sdk/models/dm_member_retrieve_response.rb +0 -94
  201. data/lib/whop_sdk/models/dm_member_update_response.rb +0 -94
  202. data/lib/whop_sdk/models/lead_retrieve_response.rb +0 -149
  203. data/lib/whop_sdk/models/lead_update_response.rb +0 -149
  204. data/lib/whop_sdk/models/webhook_retrieve_response.rb +0 -176
  205. data/lib/whop_sdk/models/webhook_update_response.rb +0 -176
  206. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +0 -268
  207. data/rbi/whop_sdk/models/ai_chat_create_response.rbi +0 -128
  208. data/rbi/whop_sdk/models/ai_chat_retrieve_response.rbi +0 -128
  209. data/rbi/whop_sdk/models/company_token_transaction_retrieve_response.rbi +0 -312
  210. data/rbi/whop_sdk/models/dm_member_create_response.rbi +0 -179
  211. data/rbi/whop_sdk/models/dm_member_retrieve_response.rbi +0 -179
  212. data/rbi/whop_sdk/models/dm_member_update_response.rbi +0 -179
  213. data/rbi/whop_sdk/models/lead_create_response.rbi +0 -234
  214. data/rbi/whop_sdk/models/lead_retrieve_response.rbi +0 -238
  215. data/rbi/whop_sdk/models/webhook_retrieve_response.rbi +0 -491
  216. data/rbi/whop_sdk/models/webhook_update_response.rbi +0 -486
  217. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +0 -568
  218. data/sig/whop_sdk/models/ai_chat_create_response.rbs +0 -65
  219. data/sig/whop_sdk/models/ai_chat_retrieve_response.rbs +0 -65
  220. data/sig/whop_sdk/models/company_token_transaction_retrieve_response.rbs +0 -115
  221. data/sig/whop_sdk/models/dm_member_create_response.rbs +0 -71
  222. data/sig/whop_sdk/models/dm_member_retrieve_response.rbs +0 -71
  223. data/sig/whop_sdk/models/dm_member_update_response.rbs +0 -71
  224. data/sig/whop_sdk/models/lead_create_response.rbs +0 -104
  225. data/sig/whop_sdk/models/lead_retrieve_response.rbs +0 -104
  226. data/sig/whop_sdk/models/webhook_retrieve_response.rbs +0 -198
  227. data/sig/whop_sdk/models/webhook_update_response.rbs +0 -198
  228. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +0 -240
@@ -16,13 +16,7 @@ module WhopSDK
16
16
  attr_accessor :id
17
17
 
18
18
  # An error code for a verification attempt.
19
- sig do
20
- returns(
21
- T.nilable(
22
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
23
- )
24
- )
25
- end
19
+ sig { returns(T.nilable(WhopSDK::VerificationErrorCode::TaggedSymbol)) }
26
20
  attr_accessor :last_error_code
27
21
 
28
22
  # The last error reason that occurred during the verification.
@@ -30,24 +24,16 @@ module WhopSDK
30
24
  attr_accessor :last_error_reason
31
25
 
32
26
  # The status of the verification.
33
- sig do
34
- returns(
35
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
36
- )
37
- end
27
+ sig { returns(WhopSDK::VerificationStatus::TaggedSymbol) }
38
28
  attr_accessor :status
39
29
 
40
30
  # An object representing an identity verification session
41
31
  sig do
42
32
  params(
43
33
  id: String,
44
- last_error_code:
45
- T.nilable(
46
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::OrSymbol
47
- ),
34
+ last_error_code: T.nilable(WhopSDK::VerificationErrorCode::OrSymbol),
48
35
  last_error_reason: T.nilable(String),
49
- status:
50
- WhopSDK::Models::VerificationRetrieveResponse::Status::OrSymbol
36
+ status: WhopSDK::VerificationStatus::OrSymbol
51
37
  ).returns(T.attached_class)
52
38
  end
53
39
  def self.new(
@@ -67,224 +53,14 @@ module WhopSDK
67
53
  {
68
54
  id: String,
69
55
  last_error_code:
70
- T.nilable(
71
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
72
- ),
56
+ T.nilable(WhopSDK::VerificationErrorCode::TaggedSymbol),
73
57
  last_error_reason: T.nilable(String),
74
- status:
75
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
58
+ status: WhopSDK::VerificationStatus::TaggedSymbol
76
59
  }
77
60
  )
78
61
  end
79
62
  def to_hash
80
63
  end
81
-
82
- # An error code for a verification attempt.
83
- module LastErrorCode
84
- extend WhopSDK::Internal::Type::Enum
85
-
86
- TaggedSymbol =
87
- T.type_alias do
88
- T.all(
89
- Symbol,
90
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode
91
- )
92
- end
93
- OrSymbol = T.type_alias { T.any(Symbol, String) }
94
-
95
- ABANDONED =
96
- T.let(
97
- :abandoned,
98
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
99
- )
100
- CONSENT_DECLINED =
101
- T.let(
102
- :consent_declined,
103
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
104
- )
105
- COUNTRY_NOT_SUPPORTED =
106
- T.let(
107
- :country_not_supported,
108
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
109
- )
110
- DEVICE_NOT_SUPPORTED =
111
- T.let(
112
- :device_not_supported,
113
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
114
- )
115
- DOCUMENT_EXPIRED =
116
- T.let(
117
- :document_expired,
118
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
119
- )
120
- DOCUMENT_TYPE_NOT_SUPPORTED =
121
- T.let(
122
- :document_type_not_supported,
123
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
124
- )
125
- DOCUMENT_UNVERIFIED_OTHER =
126
- T.let(
127
- :document_unverified_other,
128
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
129
- )
130
- EMAIL_UNVERIFIED_OTHER =
131
- T.let(
132
- :email_unverified_other,
133
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
134
- )
135
- EMAIL_VERIFICATION_DECLINED =
136
- T.let(
137
- :email_verification_declined,
138
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
139
- )
140
- ID_NUMBER_INSUFFICIENT_DOCUMENT_DATA =
141
- T.let(
142
- :id_number_insufficient_document_data,
143
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
144
- )
145
- ID_NUMBER_MISMATCH =
146
- T.let(
147
- :id_number_mismatch,
148
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
149
- )
150
- ID_NUMBER_UNVERIFIED_OTHER =
151
- T.let(
152
- :id_number_unverified_other,
153
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
154
- )
155
- PHONE_UNVERIFIED_OTHER =
156
- T.let(
157
- :phone_unverified_other,
158
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
159
- )
160
- PHONE_VERIFICATION_DECLINED =
161
- T.let(
162
- :phone_verification_declined,
163
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
164
- )
165
- SELFIE_DOCUMENT_MISSING_PHOTO =
166
- T.let(
167
- :selfie_document_missing_photo,
168
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
169
- )
170
- SELFIE_FACE_MISMATCH =
171
- T.let(
172
- :selfie_face_mismatch,
173
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
174
- )
175
- SELFIE_MANIPULATED =
176
- T.let(
177
- :selfie_manipulated,
178
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
179
- )
180
- SELFIE_UNVERIFIED_OTHER =
181
- T.let(
182
- :selfie_unverified_other,
183
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
184
- )
185
- UNDER_SUPPORTED_AGE =
186
- T.let(
187
- :under_supported_age,
188
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
189
- )
190
-
191
- sig do
192
- override.returns(
193
- T::Array[
194
- WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode::TaggedSymbol
195
- ]
196
- )
197
- end
198
- def self.values
199
- end
200
- end
201
-
202
- # The status of the verification.
203
- module Status
204
- extend WhopSDK::Internal::Type::Enum
205
-
206
- TaggedSymbol =
207
- T.type_alias do
208
- T.all(Symbol, WhopSDK::Models::VerificationRetrieveResponse::Status)
209
- end
210
- OrSymbol = T.type_alias { T.any(Symbol, String) }
211
-
212
- REQUIRES_INPUT =
213
- T.let(
214
- :requires_input,
215
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
216
- )
217
- PROCESSING =
218
- T.let(
219
- :processing,
220
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
221
- )
222
- VERIFIED =
223
- T.let(
224
- :verified,
225
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
226
- )
227
- CANCELED =
228
- T.let(
229
- :canceled,
230
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
231
- )
232
- CREATED =
233
- T.let(
234
- :created,
235
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
236
- )
237
- STARTED =
238
- T.let(
239
- :started,
240
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
241
- )
242
- SUBMITTED =
243
- T.let(
244
- :submitted,
245
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
246
- )
247
- APPROVED =
248
- T.let(
249
- :approved,
250
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
251
- )
252
- DECLINED =
253
- T.let(
254
- :declined,
255
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
256
- )
257
- RESUBMISSION_REQUESTED =
258
- T.let(
259
- :resubmission_requested,
260
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
261
- )
262
- EXPIRED =
263
- T.let(
264
- :expired,
265
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
266
- )
267
- ABANDONED =
268
- T.let(
269
- :abandoned,
270
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
271
- )
272
- REVIEW =
273
- T.let(
274
- :review,
275
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
276
- )
277
-
278
- sig do
279
- override.returns(
280
- T::Array[
281
- WhopSDK::Models::VerificationRetrieveResponse::Status::TaggedSymbol
282
- ]
283
- )
284
- end
285
- def self.values
286
- end
287
- end
288
64
  end
289
65
  end
290
66
  end
@@ -0,0 +1,38 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # A status for a verification.
6
+ module VerificationStatus
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::VerificationStatus) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ REQUIRES_INPUT =
13
+ T.let(:requires_input, WhopSDK::VerificationStatus::TaggedSymbol)
14
+ PROCESSING = T.let(:processing, WhopSDK::VerificationStatus::TaggedSymbol)
15
+ VERIFIED = T.let(:verified, WhopSDK::VerificationStatus::TaggedSymbol)
16
+ CANCELED = T.let(:canceled, WhopSDK::VerificationStatus::TaggedSymbol)
17
+ CREATED = T.let(:created, WhopSDK::VerificationStatus::TaggedSymbol)
18
+ STARTED = T.let(:started, WhopSDK::VerificationStatus::TaggedSymbol)
19
+ SUBMITTED = T.let(:submitted, WhopSDK::VerificationStatus::TaggedSymbol)
20
+ APPROVED = T.let(:approved, WhopSDK::VerificationStatus::TaggedSymbol)
21
+ DECLINED = T.let(:declined, WhopSDK::VerificationStatus::TaggedSymbol)
22
+ RESUBMISSION_REQUESTED =
23
+ T.let(
24
+ :resubmission_requested,
25
+ WhopSDK::VerificationStatus::TaggedSymbol
26
+ )
27
+ EXPIRED = T.let(:expired, WhopSDK::VerificationStatus::TaggedSymbol)
28
+ ABANDONED = T.let(:abandoned, WhopSDK::VerificationStatus::TaggedSymbol)
29
+ REVIEW = T.let(:review, WhopSDK::VerificationStatus::TaggedSymbol)
30
+
31
+ sig do
32
+ override.returns(T::Array[WhopSDK::VerificationStatus::TaggedSymbol])
33
+ end
34
+ def self.values
35
+ end
36
+ end
37
+ end
38
+ end
@@ -97,13 +97,7 @@ module WhopSDK
97
97
  attr_accessor :id
98
98
 
99
99
  # An error code for a verification attempt.
100
- sig do
101
- returns(
102
- T.nilable(
103
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
104
- )
105
- )
106
- end
100
+ sig { returns(T.nilable(WhopSDK::VerificationErrorCode::TaggedSymbol)) }
107
101
  attr_accessor :last_error_code
108
102
 
109
103
  # The last error reason that occurred during the verification.
@@ -111,11 +105,7 @@ module WhopSDK
111
105
  attr_accessor :last_error_reason
112
106
 
113
107
  # The status of the verification.
114
- sig do
115
- returns(
116
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
117
- )
118
- end
108
+ sig { returns(WhopSDK::VerificationStatus::TaggedSymbol) }
119
109
  attr_accessor :status
120
110
 
121
111
  # An object representing an identity verification session
@@ -123,12 +113,9 @@ module WhopSDK
123
113
  params(
124
114
  id: String,
125
115
  last_error_code:
126
- T.nilable(
127
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::OrSymbol
128
- ),
116
+ T.nilable(WhopSDK::VerificationErrorCode::OrSymbol),
129
117
  last_error_reason: T.nilable(String),
130
- status:
131
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::OrSymbol
118
+ status: WhopSDK::VerificationStatus::OrSymbol
132
119
  ).returns(T.attached_class)
133
120
  end
134
121
  def self.new(
@@ -148,227 +135,14 @@ module WhopSDK
148
135
  {
149
136
  id: String,
150
137
  last_error_code:
151
- T.nilable(
152
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
153
- ),
138
+ T.nilable(WhopSDK::VerificationErrorCode::TaggedSymbol),
154
139
  last_error_reason: T.nilable(String),
155
- status:
156
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
140
+ status: WhopSDK::VerificationStatus::TaggedSymbol
157
141
  }
158
142
  )
159
143
  end
160
144
  def to_hash
161
145
  end
162
-
163
- # An error code for a verification attempt.
164
- module LastErrorCode
165
- extend WhopSDK::Internal::Type::Enum
166
-
167
- TaggedSymbol =
168
- T.type_alias do
169
- T.all(
170
- Symbol,
171
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode
172
- )
173
- end
174
- OrSymbol = T.type_alias { T.any(Symbol, String) }
175
-
176
- ABANDONED =
177
- T.let(
178
- :abandoned,
179
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
180
- )
181
- CONSENT_DECLINED =
182
- T.let(
183
- :consent_declined,
184
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
185
- )
186
- COUNTRY_NOT_SUPPORTED =
187
- T.let(
188
- :country_not_supported,
189
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
190
- )
191
- DEVICE_NOT_SUPPORTED =
192
- T.let(
193
- :device_not_supported,
194
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
195
- )
196
- DOCUMENT_EXPIRED =
197
- T.let(
198
- :document_expired,
199
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
200
- )
201
- DOCUMENT_TYPE_NOT_SUPPORTED =
202
- T.let(
203
- :document_type_not_supported,
204
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
205
- )
206
- DOCUMENT_UNVERIFIED_OTHER =
207
- T.let(
208
- :document_unverified_other,
209
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
210
- )
211
- EMAIL_UNVERIFIED_OTHER =
212
- T.let(
213
- :email_unverified_other,
214
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
215
- )
216
- EMAIL_VERIFICATION_DECLINED =
217
- T.let(
218
- :email_verification_declined,
219
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
220
- )
221
- ID_NUMBER_INSUFFICIENT_DOCUMENT_DATA =
222
- T.let(
223
- :id_number_insufficient_document_data,
224
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
225
- )
226
- ID_NUMBER_MISMATCH =
227
- T.let(
228
- :id_number_mismatch,
229
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
230
- )
231
- ID_NUMBER_UNVERIFIED_OTHER =
232
- T.let(
233
- :id_number_unverified_other,
234
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
235
- )
236
- PHONE_UNVERIFIED_OTHER =
237
- T.let(
238
- :phone_unverified_other,
239
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
240
- )
241
- PHONE_VERIFICATION_DECLINED =
242
- T.let(
243
- :phone_verification_declined,
244
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
245
- )
246
- SELFIE_DOCUMENT_MISSING_PHOTO =
247
- T.let(
248
- :selfie_document_missing_photo,
249
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
250
- )
251
- SELFIE_FACE_MISMATCH =
252
- T.let(
253
- :selfie_face_mismatch,
254
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
255
- )
256
- SELFIE_MANIPULATED =
257
- T.let(
258
- :selfie_manipulated,
259
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
260
- )
261
- SELFIE_UNVERIFIED_OTHER =
262
- T.let(
263
- :selfie_unverified_other,
264
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
265
- )
266
- UNDER_SUPPORTED_AGE =
267
- T.let(
268
- :under_supported_age,
269
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
270
- )
271
-
272
- sig do
273
- override.returns(
274
- T::Array[
275
- WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode::TaggedSymbol
276
- ]
277
- )
278
- end
279
- def self.values
280
- end
281
- end
282
-
283
- # The status of the verification.
284
- module Status
285
- extend WhopSDK::Internal::Type::Enum
286
-
287
- TaggedSymbol =
288
- T.type_alias do
289
- T.all(
290
- Symbol,
291
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status
292
- )
293
- end
294
- OrSymbol = T.type_alias { T.any(Symbol, String) }
295
-
296
- REQUIRES_INPUT =
297
- T.let(
298
- :requires_input,
299
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
300
- )
301
- PROCESSING =
302
- T.let(
303
- :processing,
304
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
305
- )
306
- VERIFIED =
307
- T.let(
308
- :verified,
309
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
310
- )
311
- CANCELED =
312
- T.let(
313
- :canceled,
314
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
315
- )
316
- CREATED =
317
- T.let(
318
- :created,
319
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
320
- )
321
- STARTED =
322
- T.let(
323
- :started,
324
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
325
- )
326
- SUBMITTED =
327
- T.let(
328
- :submitted,
329
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
330
- )
331
- APPROVED =
332
- T.let(
333
- :approved,
334
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
335
- )
336
- DECLINED =
337
- T.let(
338
- :declined,
339
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
340
- )
341
- RESUBMISSION_REQUESTED =
342
- T.let(
343
- :resubmission_requested,
344
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
345
- )
346
- EXPIRED =
347
- T.let(
348
- :expired,
349
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
350
- )
351
- ABANDONED =
352
- T.let(
353
- :abandoned,
354
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
355
- )
356
- REVIEW =
357
- T.let(
358
- :review,
359
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
360
- )
361
-
362
- sig do
363
- override.returns(
364
- T::Array[
365
- WhopSDK::VerificationSucceededWebhookEvent::Data::Status::TaggedSymbol
366
- ]
367
- )
368
- end
369
- def self.values
370
- end
371
- end
372
146
  end
373
147
  end
374
148
  end
@@ -0,0 +1,104 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class Webhook < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(WhopSDK::Webhook, WhopSDK::Internal::AnyHash) }
8
+
9
+ # The ID of the webhook
10
+ sig { returns(String) }
11
+ attr_accessor :id
12
+
13
+ # The API version for this webhook
14
+ sig { returns(WhopSDK::APIVersion::TaggedSymbol) }
15
+ attr_accessor :api_version
16
+
17
+ # Whether or not to send events for child resources. For example, if the webhook
18
+ # is created for a Company, enabling this will only send events from the Company's
19
+ # sub-merchants (child companies).
20
+ sig { returns(T::Boolean) }
21
+ attr_accessor :child_resource_events
22
+
23
+ # The timestamp of when the webhook was created
24
+ sig { returns(Time) }
25
+ attr_accessor :created_at
26
+
27
+ # Whether or not this webhook is turned on or not
28
+ sig { returns(T::Boolean) }
29
+ attr_accessor :enabled
30
+
31
+ # The number of events this webhooks is configured to receive
32
+ sig { returns(T::Array[WhopSDK::WebhookEvent::TaggedSymbol]) }
33
+ attr_accessor :events
34
+
35
+ # The resource ID
36
+ sig { returns(String) }
37
+ attr_accessor :resource_id
38
+
39
+ # The list of events that can be tested with this webhook
40
+ sig { returns(T::Array[WhopSDK::WebhookEvent::TaggedSymbol]) }
41
+ attr_accessor :testable_events
42
+
43
+ # The URL the webhook events will be sent to
44
+ sig { returns(String) }
45
+ attr_accessor :url
46
+
47
+ # A webhook object, which can be configured to be sent updates about a company
48
+ sig do
49
+ params(
50
+ id: String,
51
+ api_version: WhopSDK::APIVersion::OrSymbol,
52
+ child_resource_events: T::Boolean,
53
+ created_at: Time,
54
+ enabled: T::Boolean,
55
+ events: T::Array[WhopSDK::WebhookEvent::OrSymbol],
56
+ resource_id: String,
57
+ testable_events: T::Array[WhopSDK::WebhookEvent::OrSymbol],
58
+ url: String
59
+ ).returns(T.attached_class)
60
+ end
61
+ def self.new(
62
+ # The ID of the webhook
63
+ id:,
64
+ # The API version for this webhook
65
+ api_version:,
66
+ # Whether or not to send events for child resources. For example, if the webhook
67
+ # is created for a Company, enabling this will only send events from the Company's
68
+ # sub-merchants (child companies).
69
+ child_resource_events:,
70
+ # The timestamp of when the webhook was created
71
+ created_at:,
72
+ # Whether or not this webhook is turned on or not
73
+ enabled:,
74
+ # The number of events this webhooks is configured to receive
75
+ events:,
76
+ # The resource ID
77
+ resource_id:,
78
+ # The list of events that can be tested with this webhook
79
+ testable_events:,
80
+ # The URL the webhook events will be sent to
81
+ url:
82
+ )
83
+ end
84
+
85
+ sig do
86
+ override.returns(
87
+ {
88
+ id: String,
89
+ api_version: WhopSDK::APIVersion::TaggedSymbol,
90
+ child_resource_events: T::Boolean,
91
+ created_at: Time,
92
+ enabled: T::Boolean,
93
+ events: T::Array[WhopSDK::WebhookEvent::TaggedSymbol],
94
+ resource_id: String,
95
+ testable_events: T::Array[WhopSDK::WebhookEvent::TaggedSymbol],
96
+ url: String
97
+ }
98
+ )
99
+ end
100
+ def to_hash
101
+ end
102
+ end
103
+ end
104
+ end