whop_sdk 0.0.20 → 0.0.23

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 (247) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/README.md +10 -1
  4. data/lib/whop_sdk/client.rb +16 -0
  5. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +12 -10
  6. data/lib/whop_sdk/internal/util.rb +7 -2
  7. data/lib/whop_sdk/models/course_lesson_interaction_completed_webhook_event.rb +9 -1
  8. data/lib/whop_sdk/models/dispute_created_webhook_event.rb +9 -1
  9. data/lib/whop_sdk/models/dispute_updated_webhook_event.rb +9 -1
  10. data/lib/whop_sdk/models/entry_approved_webhook_event.rb +9 -1
  11. data/lib/whop_sdk/models/entry_created_webhook_event.rb +9 -1
  12. data/lib/whop_sdk/models/entry_deleted_webhook_event.rb +9 -1
  13. data/lib/whop_sdk/models/entry_denied_webhook_event.rb +9 -1
  14. data/lib/whop_sdk/models/file_create_params.rb +22 -0
  15. data/lib/whop_sdk/models/file_create_response.rb +90 -0
  16. data/lib/whop_sdk/models/file_retrieve_params.rb +14 -0
  17. data/lib/whop_sdk/models/file_retrieve_response.rb +74 -0
  18. data/lib/whop_sdk/models/invoice_created_webhook_event.rb +9 -1
  19. data/lib/whop_sdk/models/invoice_paid_webhook_event.rb +9 -1
  20. data/lib/whop_sdk/models/invoice_past_due_webhook_event.rb +9 -1
  21. data/lib/whop_sdk/models/invoice_voided_webhook_event.rb +9 -1
  22. data/lib/whop_sdk/models/lead_create_params.rb +58 -0
  23. data/lib/whop_sdk/models/lead_create_response.rb +149 -0
  24. data/lib/whop_sdk/models/lead_list_params.rb +78 -0
  25. data/lib/whop_sdk/models/lead_list_response.rb +149 -0
  26. data/lib/whop_sdk/models/lead_retrieve_params.rb +14 -0
  27. data/lib/whop_sdk/models/lead_retrieve_response.rb +149 -0
  28. data/lib/whop_sdk/models/lead_update_params.rb +30 -0
  29. data/lib/whop_sdk/models/lead_update_response.rb +149 -0
  30. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +106 -1
  31. data/lib/whop_sdk/models/membership_activated_webhook_event.rb +9 -1
  32. data/lib/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rb +61 -0
  33. data/lib/whop_sdk/models/membership_deactivated_webhook_event.rb +9 -1
  34. data/lib/whop_sdk/models/membership_status.rb +1 -0
  35. data/lib/whop_sdk/models/payment.rb +3 -3
  36. data/lib/whop_sdk/models/payment_create_params.rb +9 -1
  37. data/lib/whop_sdk/models/payment_created_webhook_event.rb +9 -1
  38. data/lib/whop_sdk/models/payment_failed_webhook_event.rb +9 -1
  39. data/lib/whop_sdk/models/payment_list_fees_response.rb +1 -0
  40. data/lib/whop_sdk/models/payment_list_response.rb +3 -3
  41. data/lib/whop_sdk/models/payment_method_list_params.rb +16 -8
  42. data/lib/whop_sdk/models/payment_method_retrieve_params.rb +13 -5
  43. data/lib/whop_sdk/models/payment_method_types.rb +30 -30
  44. data/lib/whop_sdk/models/payment_pending_webhook_event.rb +9 -1
  45. data/lib/whop_sdk/models/payment_succeeded_webhook_event.rb +9 -1
  46. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +176 -0
  47. data/lib/whop_sdk/models/payout_method_list_response.rb +31 -1
  48. data/lib/whop_sdk/models/payout_method_retrieve_params.rb +14 -0
  49. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +125 -0
  50. data/lib/whop_sdk/models/plan_create_params.rb +9 -1
  51. data/lib/whop_sdk/models/plan_update_params.rb +9 -1
  52. data/lib/whop_sdk/models/refund_created_webhook_event.rb +9 -1
  53. data/lib/whop_sdk/models/refund_updated_webhook_event.rb +9 -1
  54. data/lib/whop_sdk/models/setup_intent_canceled_webhook_event.rb +9 -1
  55. data/lib/whop_sdk/models/setup_intent_requires_action_webhook_event.rb +9 -1
  56. data/lib/whop_sdk/models/setup_intent_succeeded_webhook_event.rb +9 -1
  57. data/lib/whop_sdk/models/support_channel_create_params.rb +2 -2
  58. data/lib/whop_sdk/models/topup_create_params.rb +46 -0
  59. data/lib/whop_sdk/models/topup_create_response.rb +67 -0
  60. data/lib/whop_sdk/models/unwrap_webhook_event.rb +8 -1
  61. data/lib/whop_sdk/models/verification_retrieve_params.rb +14 -0
  62. data/lib/whop_sdk/models/verification_retrieve_response.rb +99 -0
  63. data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +150 -0
  64. data/lib/whop_sdk/models/webhook_create_params.rb +117 -0
  65. data/lib/whop_sdk/models/webhook_create_response.rb +184 -0
  66. data/lib/whop_sdk/models/webhook_delete_params.rb +14 -0
  67. data/lib/whop_sdk/models/webhook_delete_response.rb +8 -0
  68. data/lib/whop_sdk/models/webhook_list_params.rb +54 -0
  69. data/lib/whop_sdk/models/webhook_list_response.rb +123 -0
  70. data/lib/whop_sdk/models/webhook_retrieve_params.rb +14 -0
  71. data/lib/whop_sdk/models/webhook_retrieve_response.rb +176 -0
  72. data/lib/whop_sdk/models/webhook_update_params.rb +104 -0
  73. data/lib/whop_sdk/models/webhook_update_response.rb +176 -0
  74. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +9 -1
  75. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +9 -1
  76. data/lib/whop_sdk/models.rb +35 -0
  77. data/lib/whop_sdk/resources/files.rb +56 -0
  78. data/lib/whop_sdk/resources/leads.rb +158 -0
  79. data/lib/whop_sdk/resources/payment_methods.rb +12 -8
  80. data/lib/whop_sdk/resources/payments.rb +3 -1
  81. data/lib/whop_sdk/resources/payout_methods.rb +24 -0
  82. data/lib/whop_sdk/resources/plans.rb +6 -2
  83. data/lib/whop_sdk/resources/support_channels.rb +1 -1
  84. data/lib/whop_sdk/resources/topups.rb +46 -0
  85. data/lib/whop_sdk/resources/verifications.rb +38 -0
  86. data/lib/whop_sdk/resources/webhooks.rb +159 -1
  87. data/lib/whop_sdk/version.rb +1 -1
  88. data/lib/whop_sdk.rb +35 -0
  89. data/rbi/whop_sdk/client.rbi +12 -0
  90. data/rbi/whop_sdk/models/course_lesson_interaction_completed_webhook_event.rbi +9 -1
  91. data/rbi/whop_sdk/models/dispute_created_webhook_event.rbi +9 -1
  92. data/rbi/whop_sdk/models/dispute_updated_webhook_event.rbi +9 -1
  93. data/rbi/whop_sdk/models/entry_approved_webhook_event.rbi +9 -1
  94. data/rbi/whop_sdk/models/entry_created_webhook_event.rbi +9 -1
  95. data/rbi/whop_sdk/models/entry_deleted_webhook_event.rbi +9 -1
  96. data/rbi/whop_sdk/models/entry_denied_webhook_event.rbi +9 -1
  97. data/rbi/whop_sdk/models/file_create_params.rbi +40 -0
  98. data/rbi/whop_sdk/models/file_create_response.rbi +140 -0
  99. data/rbi/whop_sdk/models/file_retrieve_params.rbi +27 -0
  100. data/rbi/whop_sdk/models/file_retrieve_response.rbi +129 -0
  101. data/rbi/whop_sdk/models/invoice_created_webhook_event.rbi +9 -1
  102. data/rbi/whop_sdk/models/invoice_paid_webhook_event.rbi +9 -1
  103. data/rbi/whop_sdk/models/invoice_past_due_webhook_event.rbi +9 -1
  104. data/rbi/whop_sdk/models/invoice_voided_webhook_event.rbi +9 -1
  105. data/rbi/whop_sdk/models/lead_create_params.rbi +77 -0
  106. data/rbi/whop_sdk/models/lead_create_response.rbi +234 -0
  107. data/rbi/whop_sdk/models/lead_list_params.rbi +99 -0
  108. data/rbi/whop_sdk/models/lead_list_response.rbi +230 -0
  109. data/rbi/whop_sdk/models/lead_retrieve_params.rbi +27 -0
  110. data/rbi/whop_sdk/models/lead_retrieve_response.rbi +238 -0
  111. data/rbi/whop_sdk/models/lead_update_params.rbi +51 -0
  112. data/rbi/whop_sdk/models/lead_update_response.rbi +234 -0
  113. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +318 -0
  114. data/rbi/whop_sdk/models/membership_activated_webhook_event.rbi +9 -1
  115. data/rbi/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbi +85 -0
  116. data/rbi/whop_sdk/models/membership_deactivated_webhook_event.rbi +9 -1
  117. data/rbi/whop_sdk/models/membership_status.rbi +1 -0
  118. data/rbi/whop_sdk/models/payment.rbi +4 -4
  119. data/rbi/whop_sdk/models/payment_create_params.rbi +8 -0
  120. data/rbi/whop_sdk/models/payment_created_webhook_event.rbi +9 -1
  121. data/rbi/whop_sdk/models/payment_failed_webhook_event.rbi +9 -1
  122. data/rbi/whop_sdk/models/payment_list_fees_response.rbi +5 -0
  123. data/rbi/whop_sdk/models/payment_list_response.rbi +4 -4
  124. data/rbi/whop_sdk/models/payment_method_list_params.rbi +16 -8
  125. data/rbi/whop_sdk/models/payment_method_retrieve_params.rbi +17 -6
  126. data/rbi/whop_sdk/models/payment_method_types.rbi +33 -33
  127. data/rbi/whop_sdk/models/payment_pending_webhook_event.rbi +9 -1
  128. data/rbi/whop_sdk/models/payment_succeeded_webhook_event.rbi +9 -1
  129. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +348 -0
  130. data/rbi/whop_sdk/models/payout_method_list_response.rbi +58 -0
  131. data/rbi/whop_sdk/models/payout_method_retrieve_params.rbi +27 -0
  132. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +262 -0
  133. data/rbi/whop_sdk/models/plan_create_params.rbi +8 -0
  134. data/rbi/whop_sdk/models/plan_update_params.rbi +8 -0
  135. data/rbi/whop_sdk/models/refund_created_webhook_event.rbi +9 -1
  136. data/rbi/whop_sdk/models/refund_updated_webhook_event.rbi +9 -1
  137. data/rbi/whop_sdk/models/setup_intent_canceled_webhook_event.rbi +9 -1
  138. data/rbi/whop_sdk/models/setup_intent_requires_action_webhook_event.rbi +9 -1
  139. data/rbi/whop_sdk/models/setup_intent_succeeded_webhook_event.rbi +9 -1
  140. data/rbi/whop_sdk/models/support_channel_create_params.rbi +2 -2
  141. data/rbi/whop_sdk/models/topup_create_params.rbi +67 -0
  142. data/rbi/whop_sdk/models/topup_create_response.rbi +89 -0
  143. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +4 -1
  144. data/rbi/whop_sdk/models/verification_retrieve_params.rbi +27 -0
  145. data/rbi/whop_sdk/models/verification_retrieve_response.rbi +290 -0
  146. data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +375 -0
  147. data/rbi/whop_sdk/models/webhook_create_params.rbi +275 -0
  148. data/rbi/whop_sdk/models/webhook_create_response.rbi +494 -0
  149. data/rbi/whop_sdk/models/webhook_delete_params.rbi +27 -0
  150. data/rbi/whop_sdk/models/webhook_delete_response.rbi +8 -0
  151. data/rbi/whop_sdk/models/webhook_list_params.rbi +75 -0
  152. data/rbi/whop_sdk/models/webhook_list_response.rbi +297 -0
  153. data/rbi/whop_sdk/models/webhook_retrieve_params.rbi +27 -0
  154. data/rbi/whop_sdk/models/webhook_retrieve_response.rbi +491 -0
  155. data/rbi/whop_sdk/models/webhook_update_params.rbi +263 -0
  156. data/rbi/whop_sdk/models/webhook_update_response.rbi +486 -0
  157. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +9 -1
  158. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +9 -1
  159. data/rbi/whop_sdk/models.rbi +37 -0
  160. data/rbi/whop_sdk/resources/files.rbi +40 -0
  161. data/rbi/whop_sdk/resources/leads.rbi +138 -0
  162. data/rbi/whop_sdk/resources/payment_methods.rbi +13 -7
  163. data/rbi/whop_sdk/resources/payments.rbi +3 -0
  164. data/rbi/whop_sdk/resources/payout_methods.rbi +18 -0
  165. data/rbi/whop_sdk/resources/plans.rbi +6 -0
  166. data/rbi/whop_sdk/resources/support_channels.rbi +1 -1
  167. data/rbi/whop_sdk/resources/topups.rbi +39 -0
  168. data/rbi/whop_sdk/resources/verifications.rbi +30 -0
  169. data/rbi/whop_sdk/resources/webhooks.rbi +144 -1
  170. data/sig/whop_sdk/client.rbs +8 -0
  171. data/sig/whop_sdk/models/course_lesson_interaction_completed_webhook_event.rbs +7 -2
  172. data/sig/whop_sdk/models/dispute_created_webhook_event.rbs +7 -2
  173. data/sig/whop_sdk/models/dispute_updated_webhook_event.rbs +7 -2
  174. data/sig/whop_sdk/models/entry_approved_webhook_event.rbs +7 -2
  175. data/sig/whop_sdk/models/entry_created_webhook_event.rbs +7 -2
  176. data/sig/whop_sdk/models/entry_deleted_webhook_event.rbs +7 -2
  177. data/sig/whop_sdk/models/entry_denied_webhook_event.rbs +7 -2
  178. data/sig/whop_sdk/models/file_create_params.rbs +23 -0
  179. data/sig/whop_sdk/models/file_create_response.rbs +68 -0
  180. data/sig/whop_sdk/models/file_retrieve_params.rbs +15 -0
  181. data/sig/whop_sdk/models/file_retrieve_response.rbs +58 -0
  182. data/sig/whop_sdk/models/invoice_created_webhook_event.rbs +7 -2
  183. data/sig/whop_sdk/models/invoice_paid_webhook_event.rbs +7 -2
  184. data/sig/whop_sdk/models/invoice_past_due_webhook_event.rbs +7 -2
  185. data/sig/whop_sdk/models/invoice_voided_webhook_event.rbs +7 -2
  186. data/sig/whop_sdk/models/lead_create_params.rbs +46 -0
  187. data/sig/whop_sdk/models/lead_create_response.rbs +104 -0
  188. data/sig/whop_sdk/models/lead_list_params.rbs +61 -0
  189. data/sig/whop_sdk/models/lead_list_response.rbs +104 -0
  190. data/sig/whop_sdk/models/lead_retrieve_params.rbs +15 -0
  191. data/sig/whop_sdk/models/lead_retrieve_response.rbs +104 -0
  192. data/sig/whop_sdk/models/lead_update_params.rbs +28 -0
  193. data/sig/whop_sdk/models/lead_update_response.rbs +104 -0
  194. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +119 -0
  195. data/sig/whop_sdk/models/membership_activated_webhook_event.rbs +7 -2
  196. data/sig/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbs +45 -0
  197. data/sig/whop_sdk/models/membership_deactivated_webhook_event.rbs +7 -2
  198. data/sig/whop_sdk/models/membership_status.rbs +2 -0
  199. data/sig/whop_sdk/models/payment_create_params.rbs +5 -0
  200. data/sig/whop_sdk/models/payment_created_webhook_event.rbs +7 -2
  201. data/sig/whop_sdk/models/payment_failed_webhook_event.rbs +7 -2
  202. data/sig/whop_sdk/models/payment_list_fees_response.rbs +2 -0
  203. data/sig/whop_sdk/models/payment_method_list_params.rbs +11 -6
  204. data/sig/whop_sdk/models/payment_method_retrieve_params.rbs +9 -4
  205. data/sig/whop_sdk/models/payment_method_types.rbs +61 -61
  206. data/sig/whop_sdk/models/payment_pending_webhook_event.rbs +7 -2
  207. data/sig/whop_sdk/models/payment_succeeded_webhook_event.rbs +7 -2
  208. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +145 -0
  209. data/sig/whop_sdk/models/payout_method_list_response.rbs +20 -0
  210. data/sig/whop_sdk/models/payout_method_retrieve_params.rbs +15 -0
  211. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +103 -0
  212. data/sig/whop_sdk/models/plan_create_params.rbs +5 -0
  213. data/sig/whop_sdk/models/plan_update_params.rbs +5 -0
  214. data/sig/whop_sdk/models/refund_created_webhook_event.rbs +7 -2
  215. data/sig/whop_sdk/models/refund_updated_webhook_event.rbs +7 -2
  216. data/sig/whop_sdk/models/setup_intent_canceled_webhook_event.rbs +7 -2
  217. data/sig/whop_sdk/models/setup_intent_requires_action_webhook_event.rbs +7 -2
  218. data/sig/whop_sdk/models/setup_intent_succeeded_webhook_event.rbs +7 -2
  219. data/sig/whop_sdk/models/topup_create_params.rbs +41 -0
  220. data/sig/whop_sdk/models/topup_create_response.rbs +50 -0
  221. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
  222. data/sig/whop_sdk/models/verification_retrieve_params.rbs +15 -0
  223. data/sig/whop_sdk/models/verification_retrieve_response.rbs +117 -0
  224. data/sig/whop_sdk/models/verification_succeeded_webhook_event.rbs +159 -0
  225. data/sig/whop_sdk/models/webhook_create_params.rbs +126 -0
  226. data/sig/whop_sdk/models/webhook_create_response.rbs +203 -0
  227. data/sig/whop_sdk/models/webhook_delete_params.rbs +15 -0
  228. data/sig/whop_sdk/models/webhook_delete_response.rbs +5 -0
  229. data/sig/whop_sdk/models/webhook_list_params.rbs +46 -0
  230. data/sig/whop_sdk/models/webhook_list_response.rbs +125 -0
  231. data/sig/whop_sdk/models/webhook_retrieve_params.rbs +15 -0
  232. data/sig/whop_sdk/models/webhook_retrieve_response.rbs +198 -0
  233. data/sig/whop_sdk/models/webhook_update_params.rbs +121 -0
  234. data/sig/whop_sdk/models/webhook_update_response.rbs +198 -0
  235. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +7 -2
  236. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +7 -2
  237. data/sig/whop_sdk/models.rbs +34 -0
  238. data/sig/whop_sdk/resources/files.rbs +17 -0
  239. data/sig/whop_sdk/resources/leads.rbs +40 -0
  240. data/sig/whop_sdk/resources/payment_methods.rbs +4 -2
  241. data/sig/whop_sdk/resources/payments.rbs +1 -0
  242. data/sig/whop_sdk/resources/payout_methods.rbs +5 -0
  243. data/sig/whop_sdk/resources/plans.rbs +2 -0
  244. data/sig/whop_sdk/resources/topups.rbs +15 -0
  245. data/sig/whop_sdk/resources/verifications.rbs +12 -0
  246. data/sig/whop_sdk/resources/webhooks.rbs +40 -1
  247. metadata +107 -2
@@ -594,6 +594,26 @@ module WhopSDK
594
594
  sig { returns(T.nilable(String)) }
595
595
  attr_accessor :email
596
596
 
597
+ # The latest verification for the connected account.
598
+ sig do
599
+ returns(
600
+ T.nilable(
601
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification
602
+ )
603
+ )
604
+ end
605
+ attr_reader :latest_verification
606
+
607
+ sig do
608
+ params(
609
+ latest_verification:
610
+ T.nilable(
611
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::OrHash
612
+ )
613
+ ).void
614
+ end
615
+ attr_writer :latest_verification
616
+
597
617
  # The business representative's phone
598
618
  sig { returns(T.nilable(String)) }
599
619
  attr_accessor :phone
@@ -612,6 +632,10 @@ module WhopSDK
612
632
  WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative::OrHash
613
633
  ),
614
634
  email: T.nilable(String),
635
+ latest_verification:
636
+ T.nilable(
637
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::OrHash
638
+ ),
615
639
  phone: T.nilable(String)
616
640
  ).returns(T.attached_class)
617
641
  end
@@ -626,6 +650,8 @@ module WhopSDK
626
650
  business_representative:,
627
651
  # The email address of the representative
628
652
  email:,
653
+ # The latest verification for the connected account.
654
+ latest_verification:,
629
655
  # The business representative's phone
630
656
  phone:
631
657
  )
@@ -645,6 +671,10 @@ module WhopSDK
645
671
  WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative
646
672
  ),
647
673
  email: T.nilable(String),
674
+ latest_verification:
675
+ T.nilable(
676
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification
677
+ ),
648
678
  phone: T.nilable(String)
649
679
  }
650
680
  )
@@ -789,6 +819,294 @@ module WhopSDK
789
819
  def to_hash
790
820
  end
791
821
  end
822
+
823
+ class LatestVerification < WhopSDK::Internal::Type::BaseModel
824
+ OrHash =
825
+ T.type_alias do
826
+ T.any(
827
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification,
828
+ WhopSDK::Internal::AnyHash
829
+ )
830
+ end
831
+
832
+ # A unique identifier for the verification.
833
+ sig { returns(String) }
834
+ attr_accessor :id
835
+
836
+ # An error code for a verification attempt.
837
+ sig do
838
+ returns(
839
+ T.nilable(
840
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
841
+ )
842
+ )
843
+ end
844
+ attr_accessor :last_error_code
845
+
846
+ # The last error reason that occurred during the verification.
847
+ sig { returns(T.nilable(String)) }
848
+ attr_accessor :last_error_reason
849
+
850
+ # The status of the verification.
851
+ sig do
852
+ returns(
853
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
854
+ )
855
+ end
856
+ attr_accessor :status
857
+
858
+ # The latest verification for the connected account.
859
+ sig do
860
+ params(
861
+ id: String,
862
+ last_error_code:
863
+ T.nilable(
864
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::OrSymbol
865
+ ),
866
+ last_error_reason: T.nilable(String),
867
+ status:
868
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::OrSymbol
869
+ ).returns(T.attached_class)
870
+ end
871
+ def self.new(
872
+ # A unique identifier for the verification.
873
+ id:,
874
+ # An error code for a verification attempt.
875
+ last_error_code:,
876
+ # The last error reason that occurred during the verification.
877
+ last_error_reason:,
878
+ # The status of the verification.
879
+ status:
880
+ )
881
+ end
882
+
883
+ sig do
884
+ override.returns(
885
+ {
886
+ id: String,
887
+ last_error_code:
888
+ T.nilable(
889
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
890
+ ),
891
+ last_error_reason: T.nilable(String),
892
+ status:
893
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
894
+ }
895
+ )
896
+ end
897
+ def to_hash
898
+ end
899
+
900
+ # An error code for a verification attempt.
901
+ module LastErrorCode
902
+ extend WhopSDK::Internal::Type::Enum
903
+
904
+ TaggedSymbol =
905
+ T.type_alias do
906
+ T.all(
907
+ Symbol,
908
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode
909
+ )
910
+ end
911
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
912
+
913
+ ABANDONED =
914
+ T.let(
915
+ :abandoned,
916
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
917
+ )
918
+ CONSENT_DECLINED =
919
+ T.let(
920
+ :consent_declined,
921
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
922
+ )
923
+ COUNTRY_NOT_SUPPORTED =
924
+ T.let(
925
+ :country_not_supported,
926
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
927
+ )
928
+ DEVICE_NOT_SUPPORTED =
929
+ T.let(
930
+ :device_not_supported,
931
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
932
+ )
933
+ DOCUMENT_EXPIRED =
934
+ T.let(
935
+ :document_expired,
936
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
937
+ )
938
+ DOCUMENT_TYPE_NOT_SUPPORTED =
939
+ T.let(
940
+ :document_type_not_supported,
941
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
942
+ )
943
+ DOCUMENT_UNVERIFIED_OTHER =
944
+ T.let(
945
+ :document_unverified_other,
946
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
947
+ )
948
+ EMAIL_UNVERIFIED_OTHER =
949
+ T.let(
950
+ :email_unverified_other,
951
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
952
+ )
953
+ EMAIL_VERIFICATION_DECLINED =
954
+ T.let(
955
+ :email_verification_declined,
956
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
957
+ )
958
+ ID_NUMBER_INSUFFICIENT_DOCUMENT_DATA =
959
+ T.let(
960
+ :id_number_insufficient_document_data,
961
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
962
+ )
963
+ ID_NUMBER_MISMATCH =
964
+ T.let(
965
+ :id_number_mismatch,
966
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
967
+ )
968
+ ID_NUMBER_UNVERIFIED_OTHER =
969
+ T.let(
970
+ :id_number_unverified_other,
971
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
972
+ )
973
+ PHONE_UNVERIFIED_OTHER =
974
+ T.let(
975
+ :phone_unverified_other,
976
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
977
+ )
978
+ PHONE_VERIFICATION_DECLINED =
979
+ T.let(
980
+ :phone_verification_declined,
981
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
982
+ )
983
+ SELFIE_DOCUMENT_MISSING_PHOTO =
984
+ T.let(
985
+ :selfie_document_missing_photo,
986
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
987
+ )
988
+ SELFIE_FACE_MISMATCH =
989
+ T.let(
990
+ :selfie_face_mismatch,
991
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
992
+ )
993
+ SELFIE_MANIPULATED =
994
+ T.let(
995
+ :selfie_manipulated,
996
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
997
+ )
998
+ SELFIE_UNVERIFIED_OTHER =
999
+ T.let(
1000
+ :selfie_unverified_other,
1001
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
1002
+ )
1003
+ UNDER_SUPPORTED_AGE =
1004
+ T.let(
1005
+ :under_supported_age,
1006
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
1007
+ )
1008
+
1009
+ sig do
1010
+ override.returns(
1011
+ T::Array[
1012
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode::TaggedSymbol
1013
+ ]
1014
+ )
1015
+ end
1016
+ def self.values
1017
+ end
1018
+ end
1019
+
1020
+ # The status of the verification.
1021
+ module Status
1022
+ extend WhopSDK::Internal::Type::Enum
1023
+
1024
+ TaggedSymbol =
1025
+ T.type_alias do
1026
+ T.all(
1027
+ Symbol,
1028
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status
1029
+ )
1030
+ end
1031
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1032
+
1033
+ REQUIRES_INPUT =
1034
+ T.let(
1035
+ :requires_input,
1036
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1037
+ )
1038
+ PROCESSING =
1039
+ T.let(
1040
+ :processing,
1041
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1042
+ )
1043
+ VERIFIED =
1044
+ T.let(
1045
+ :verified,
1046
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1047
+ )
1048
+ CANCELED =
1049
+ T.let(
1050
+ :canceled,
1051
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1052
+ )
1053
+ CREATED =
1054
+ T.let(
1055
+ :created,
1056
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1057
+ )
1058
+ STARTED =
1059
+ T.let(
1060
+ :started,
1061
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1062
+ )
1063
+ SUBMITTED =
1064
+ T.let(
1065
+ :submitted,
1066
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1067
+ )
1068
+ APPROVED =
1069
+ T.let(
1070
+ :approved,
1071
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1072
+ )
1073
+ DECLINED =
1074
+ T.let(
1075
+ :declined,
1076
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1077
+ )
1078
+ RESUBMISSION_REQUESTED =
1079
+ T.let(
1080
+ :resubmission_requested,
1081
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1082
+ )
1083
+ EXPIRED =
1084
+ T.let(
1085
+ :expired,
1086
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1087
+ )
1088
+ ABANDONED =
1089
+ T.let(
1090
+ :abandoned,
1091
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1092
+ )
1093
+ REVIEW =
1094
+ T.let(
1095
+ :review,
1096
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1097
+ )
1098
+
1099
+ sig do
1100
+ override.returns(
1101
+ T::Array[
1102
+ WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status::TaggedSymbol
1103
+ ]
1104
+ )
1105
+ end
1106
+ def self.values
1107
+ end
1108
+ end
1109
+ end
792
1110
  end
793
1111
  end
794
1112
  end
@@ -35,11 +35,16 @@ module WhopSDK
35
35
  sig { returns(Symbol) }
36
36
  attr_accessor :type
37
37
 
38
+ # The company ID that this webhook event is associated with
39
+ sig { returns(T.nilable(String)) }
40
+ attr_accessor :company_id
41
+
38
42
  sig do
39
43
  params(
40
44
  id: String,
41
45
  data: WhopSDK::Membership::OrHash,
42
46
  timestamp: Time,
47
+ company_id: T.nilable(String),
43
48
  api_version: Symbol,
44
49
  type: Symbol
45
50
  ).returns(T.attached_class)
@@ -52,6 +57,8 @@ module WhopSDK
52
57
  data:,
53
58
  # The timestamp in ISO 8601 format that the webhook was sent at on the server
54
59
  timestamp:,
60
+ # The company ID that this webhook event is associated with
61
+ company_id: nil,
55
62
  # The API version for this webhook
56
63
  api_version: :v1,
57
64
  # The webhook event type
@@ -66,7 +73,8 @@ module WhopSDK
66
73
  api_version: Symbol,
67
74
  data: WhopSDK::Membership,
68
75
  timestamp: Time,
69
- type: Symbol
76
+ type: Symbol,
77
+ company_id: T.nilable(String)
70
78
  }
71
79
  )
72
80
  end
@@ -0,0 +1,85 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class MembershipCancelAtPeriodEndChangedWebhookEvent < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::MembershipCancelAtPeriodEndChangedWebhookEvent,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # A unique ID for every single webhook request
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The API version for this webhook
19
+ sig { returns(Symbol) }
20
+ attr_accessor :api_version
21
+
22
+ # A membership represents a purchase between a User and a Company for a specific
23
+ # Product.
24
+ sig { returns(WhopSDK::Membership) }
25
+ attr_reader :data
26
+
27
+ sig { params(data: WhopSDK::Membership::OrHash).void }
28
+ attr_writer :data
29
+
30
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
31
+ sig { returns(Time) }
32
+ attr_accessor :timestamp
33
+
34
+ # The webhook event type
35
+ sig { returns(Symbol) }
36
+ attr_accessor :type
37
+
38
+ # The company ID that this webhook event is associated with
39
+ sig { returns(T.nilable(String)) }
40
+ attr_accessor :company_id
41
+
42
+ sig do
43
+ params(
44
+ id: String,
45
+ data: WhopSDK::Membership::OrHash,
46
+ timestamp: Time,
47
+ company_id: T.nilable(String),
48
+ api_version: Symbol,
49
+ type: Symbol
50
+ ).returns(T.attached_class)
51
+ end
52
+ def self.new(
53
+ # A unique ID for every single webhook request
54
+ id:,
55
+ # A membership represents a purchase between a User and a Company for a specific
56
+ # Product.
57
+ data:,
58
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
59
+ timestamp:,
60
+ # The company ID that this webhook event is associated with
61
+ company_id: nil,
62
+ # The API version for this webhook
63
+ api_version: :v1,
64
+ # The webhook event type
65
+ type: :"membership.cancel_at_period_end_changed"
66
+ )
67
+ end
68
+
69
+ sig do
70
+ override.returns(
71
+ {
72
+ id: String,
73
+ api_version: Symbol,
74
+ data: WhopSDK::Membership,
75
+ timestamp: Time,
76
+ type: Symbol,
77
+ company_id: T.nilable(String)
78
+ }
79
+ )
80
+ end
81
+ def to_hash
82
+ end
83
+ end
84
+ end
85
+ end
@@ -35,11 +35,16 @@ module WhopSDK
35
35
  sig { returns(Symbol) }
36
36
  attr_accessor :type
37
37
 
38
+ # The company ID that this webhook event is associated with
39
+ sig { returns(T.nilable(String)) }
40
+ attr_accessor :company_id
41
+
38
42
  sig do
39
43
  params(
40
44
  id: String,
41
45
  data: WhopSDK::Membership::OrHash,
42
46
  timestamp: Time,
47
+ company_id: T.nilable(String),
43
48
  api_version: Symbol,
44
49
  type: Symbol
45
50
  ).returns(T.attached_class)
@@ -52,6 +57,8 @@ module WhopSDK
52
57
  data:,
53
58
  # The timestamp in ISO 8601 format that the webhook was sent at on the server
54
59
  timestamp:,
60
+ # The company ID that this webhook event is associated with
61
+ company_id: nil,
55
62
  # The API version for this webhook
56
63
  api_version: :v1,
57
64
  # The webhook event type
@@ -66,7 +73,8 @@ module WhopSDK
66
73
  api_version: Symbol,
67
74
  data: WhopSDK::Membership,
68
75
  timestamp: Time,
69
- type: Symbol
76
+ type: Symbol,
77
+ company_id: T.nilable(String)
70
78
  }
71
79
  )
72
80
  end
@@ -17,6 +17,7 @@ module WhopSDK
17
17
  EXPIRED = T.let(:expired, WhopSDK::MembershipStatus::TaggedSymbol)
18
18
  UNRESOLVED = T.let(:unresolved, WhopSDK::MembershipStatus::TaggedSymbol)
19
19
  DRAFTED = T.let(:drafted, WhopSDK::MembershipStatus::TaggedSymbol)
20
+ CANCELING = T.let(:canceling, WhopSDK::MembershipStatus::TaggedSymbol)
20
21
 
21
22
  sig do
22
23
  override.returns(T::Array[WhopSDK::MembershipStatus::TaggedSymbol])
@@ -84,8 +84,8 @@ module WhopSDK
84
84
  end
85
85
  attr_writer :membership
86
86
 
87
- # The custom metadata stored on this payment. This will be copied the checkout
88
- # configuration for which this payment was made
87
+ # The custom metadata stored on this payment. This will be copied over to the
88
+ # checkout configuration for which this payment was made
89
89
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
90
90
  attr_accessor :metadata
91
91
 
@@ -251,8 +251,8 @@ module WhopSDK
251
251
  member:,
252
252
  # The membership attached to this payment.
253
253
  membership:,
254
- # The custom metadata stored on this payment. This will be copied the checkout
255
- # configuration for which this payment was made
254
+ # The custom metadata stored on this payment. This will be copied over to the
255
+ # checkout configuration for which this payment was made
256
256
  metadata:,
257
257
  # The datetime the payment was paid
258
258
  paid_at:,
@@ -31,6 +31,10 @@ module WhopSDK
31
31
  sig { params(plan: WhopSDK::PaymentCreateParams::Plan::OrHash).void }
32
32
  attr_writer :plan
33
33
 
34
+ # Custom metadata to attach to the payment.
35
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
36
+ attr_accessor :metadata
37
+
34
38
  # An ID of an existing plan to use for the payment.
35
39
  sig { returns(String) }
36
40
  attr_accessor :plan_id
@@ -42,6 +46,7 @@ module WhopSDK
42
46
  payment_method_id: String,
43
47
  plan: WhopSDK::PaymentCreateParams::Plan::OrHash,
44
48
  plan_id: String,
49
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
45
50
  request_options: WhopSDK::RequestOptions::OrHash
46
51
  ).returns(T.attached_class)
47
52
  end
@@ -57,6 +62,8 @@ module WhopSDK
57
62
  plan:,
58
63
  # An ID of an existing plan to use for the payment.
59
64
  plan_id:,
65
+ # Custom metadata to attach to the payment.
66
+ metadata: nil,
60
67
  request_options: {}
61
68
  )
62
69
  end
@@ -68,6 +75,7 @@ module WhopSDK
68
75
  member_id: String,
69
76
  payment_method_id: String,
70
77
  plan: WhopSDK::PaymentCreateParams::Plan,
78
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
71
79
  plan_id: String,
72
80
  request_options: WhopSDK::RequestOptions
73
81
  }
@@ -31,11 +31,16 @@ module WhopSDK
31
31
  sig { returns(Symbol) }
32
32
  attr_accessor :type
33
33
 
34
+ # The company ID that this webhook event is associated with
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :company_id
37
+
34
38
  sig do
35
39
  params(
36
40
  id: String,
37
41
  data: WhopSDK::Payment::OrHash,
38
42
  timestamp: Time,
43
+ company_id: T.nilable(String),
39
44
  api_version: Symbol,
40
45
  type: Symbol
41
46
  ).returns(T.attached_class)
@@ -47,6 +52,8 @@ module WhopSDK
47
52
  data:,
48
53
  # The timestamp in ISO 8601 format that the webhook was sent at on the server
49
54
  timestamp:,
55
+ # The company ID that this webhook event is associated with
56
+ company_id: nil,
50
57
  # The API version for this webhook
51
58
  api_version: :v1,
52
59
  # The webhook event type
@@ -61,7 +68,8 @@ module WhopSDK
61
68
  api_version: Symbol,
62
69
  data: WhopSDK::Payment,
63
70
  timestamp: Time,
64
- type: Symbol
71
+ type: Symbol,
72
+ company_id: T.nilable(String)
65
73
  }
66
74
  )
67
75
  end
@@ -31,11 +31,16 @@ module WhopSDK
31
31
  sig { returns(Symbol) }
32
32
  attr_accessor :type
33
33
 
34
+ # The company ID that this webhook event is associated with
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :company_id
37
+
34
38
  sig do
35
39
  params(
36
40
  id: String,
37
41
  data: WhopSDK::Payment::OrHash,
38
42
  timestamp: Time,
43
+ company_id: T.nilable(String),
39
44
  api_version: Symbol,
40
45
  type: Symbol
41
46
  ).returns(T.attached_class)
@@ -47,6 +52,8 @@ module WhopSDK
47
52
  data:,
48
53
  # The timestamp in ISO 8601 format that the webhook was sent at on the server
49
54
  timestamp:,
55
+ # The company ID that this webhook event is associated with
56
+ company_id: nil,
50
57
  # The API version for this webhook
51
58
  api_version: :v1,
52
59
  # The webhook event type
@@ -61,7 +68,8 @@ module WhopSDK
61
68
  api_version: Symbol,
62
69
  data: WhopSDK::Payment,
63
70
  timestamp: Time,
64
- type: Symbol
71
+ type: Symbol,
72
+ company_id: T.nilable(String)
65
73
  }
66
74
  )
67
75
  end
@@ -223,6 +223,11 @@ module WhopSDK
223
223
  :revshare_percentage_fee,
224
224
  WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
225
225
  )
226
+ APPLICATION_FEE =
227
+ T.let(
228
+ :application_fee,
229
+ WhopSDK::Models::PaymentListFeesResponse::Type::TaggedSymbol
230
+ )
226
231
 
227
232
  sig do
228
233
  override.returns(
@@ -109,8 +109,8 @@ module WhopSDK
109
109
  end
110
110
  attr_writer :membership
111
111
 
112
- # The custom metadata stored on this payment. This will be copied the checkout
113
- # configuration for which this payment was made
112
+ # The custom metadata stored on this payment. This will be copied over to the
113
+ # checkout configuration for which this payment was made
114
114
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
115
115
  attr_accessor :metadata
116
116
 
@@ -310,8 +310,8 @@ module WhopSDK
310
310
  member:,
311
311
  # The membership attached to this payment.
312
312
  membership:,
313
- # The custom metadata stored on this payment. This will be copied the checkout
314
- # configuration for which this payment was made
313
+ # The custom metadata stored on this payment. This will be copied over to the
314
+ # checkout configuration for which this payment was made
315
315
  metadata:,
316
316
  # The datetime the payment was paid
317
317
  paid_at:,