whop_sdk 0.0.20 → 0.0.22

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 (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/README.md +10 -1
  4. data/lib/whop_sdk/client.rb +12 -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/lead_create_params.rb +58 -0
  8. data/lib/whop_sdk/models/lead_create_response.rb +149 -0
  9. data/lib/whop_sdk/models/lead_list_params.rb +78 -0
  10. data/lib/whop_sdk/models/lead_list_response.rb +149 -0
  11. data/lib/whop_sdk/models/lead_retrieve_params.rb +14 -0
  12. data/lib/whop_sdk/models/lead_retrieve_response.rb +149 -0
  13. data/lib/whop_sdk/models/lead_update_params.rb +30 -0
  14. data/lib/whop_sdk/models/lead_update_response.rb +149 -0
  15. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +106 -1
  16. data/lib/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rb +53 -0
  17. data/lib/whop_sdk/models/membership_status.rb +1 -0
  18. data/lib/whop_sdk/models/payment.rb +3 -3
  19. data/lib/whop_sdk/models/payment_create_params.rb +9 -1
  20. data/lib/whop_sdk/models/payment_list_fees_response.rb +1 -0
  21. data/lib/whop_sdk/models/payment_list_response.rb +3 -3
  22. data/lib/whop_sdk/models/payment_method_list_params.rb +16 -8
  23. data/lib/whop_sdk/models/payment_method_retrieve_params.rb +13 -5
  24. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +168 -0
  25. data/lib/whop_sdk/models/payout_method_list_response.rb +31 -1
  26. data/lib/whop_sdk/models/payout_method_retrieve_params.rb +14 -0
  27. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +125 -0
  28. data/lib/whop_sdk/models/support_channel_create_params.rb +2 -2
  29. data/lib/whop_sdk/models/topup_create_params.rb +46 -0
  30. data/lib/whop_sdk/models/topup_create_response.rb +67 -0
  31. data/lib/whop_sdk/models/unwrap_webhook_event.rb +8 -1
  32. data/lib/whop_sdk/models/verification_retrieve_params.rb +14 -0
  33. data/lib/whop_sdk/models/verification_retrieve_response.rb +99 -0
  34. data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +142 -0
  35. data/lib/whop_sdk/models.rb +21 -0
  36. data/lib/whop_sdk/resources/leads.rb +158 -0
  37. data/lib/whop_sdk/resources/payment_methods.rb +12 -8
  38. data/lib/whop_sdk/resources/payments.rb +3 -1
  39. data/lib/whop_sdk/resources/payout_methods.rb +24 -0
  40. data/lib/whop_sdk/resources/support_channels.rb +1 -1
  41. data/lib/whop_sdk/resources/topups.rb +46 -0
  42. data/lib/whop_sdk/resources/verifications.rb +38 -0
  43. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  44. data/lib/whop_sdk/version.rb +1 -1
  45. data/lib/whop_sdk.rb +20 -0
  46. data/rbi/whop_sdk/client.rbi +9 -0
  47. data/rbi/whop_sdk/models/lead_create_params.rbi +77 -0
  48. data/rbi/whop_sdk/models/lead_create_response.rbi +234 -0
  49. data/rbi/whop_sdk/models/lead_list_params.rbi +99 -0
  50. data/rbi/whop_sdk/models/lead_list_response.rbi +230 -0
  51. data/rbi/whop_sdk/models/lead_retrieve_params.rbi +27 -0
  52. data/rbi/whop_sdk/models/lead_retrieve_response.rbi +238 -0
  53. data/rbi/whop_sdk/models/lead_update_params.rbi +51 -0
  54. data/rbi/whop_sdk/models/lead_update_response.rbi +234 -0
  55. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +318 -0
  56. data/rbi/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbi +77 -0
  57. data/rbi/whop_sdk/models/membership_status.rbi +1 -0
  58. data/rbi/whop_sdk/models/payment.rbi +4 -4
  59. data/rbi/whop_sdk/models/payment_create_params.rbi +8 -0
  60. data/rbi/whop_sdk/models/payment_list_fees_response.rbi +5 -0
  61. data/rbi/whop_sdk/models/payment_list_response.rbi +4 -4
  62. data/rbi/whop_sdk/models/payment_method_list_params.rbi +16 -8
  63. data/rbi/whop_sdk/models/payment_method_retrieve_params.rbi +17 -6
  64. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +340 -0
  65. data/rbi/whop_sdk/models/payout_method_list_response.rbi +58 -0
  66. data/rbi/whop_sdk/models/payout_method_retrieve_params.rbi +27 -0
  67. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +262 -0
  68. data/rbi/whop_sdk/models/support_channel_create_params.rbi +2 -2
  69. data/rbi/whop_sdk/models/topup_create_params.rbi +67 -0
  70. data/rbi/whop_sdk/models/topup_create_response.rbi +89 -0
  71. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +4 -1
  72. data/rbi/whop_sdk/models/verification_retrieve_params.rbi +27 -0
  73. data/rbi/whop_sdk/models/verification_retrieve_response.rbi +290 -0
  74. data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +367 -0
  75. data/rbi/whop_sdk/models.rbi +23 -0
  76. data/rbi/whop_sdk/resources/leads.rbi +138 -0
  77. data/rbi/whop_sdk/resources/payment_methods.rbi +13 -7
  78. data/rbi/whop_sdk/resources/payments.rbi +3 -0
  79. data/rbi/whop_sdk/resources/payout_methods.rbi +18 -0
  80. data/rbi/whop_sdk/resources/support_channels.rbi +1 -1
  81. data/rbi/whop_sdk/resources/topups.rbi +39 -0
  82. data/rbi/whop_sdk/resources/verifications.rbi +30 -0
  83. data/rbi/whop_sdk/resources/webhooks.rbi +4 -1
  84. data/sig/whop_sdk/client.rbs +6 -0
  85. data/sig/whop_sdk/models/lead_create_params.rbs +46 -0
  86. data/sig/whop_sdk/models/lead_create_response.rbs +104 -0
  87. data/sig/whop_sdk/models/lead_list_params.rbs +61 -0
  88. data/sig/whop_sdk/models/lead_list_response.rbs +104 -0
  89. data/sig/whop_sdk/models/lead_retrieve_params.rbs +15 -0
  90. data/sig/whop_sdk/models/lead_retrieve_response.rbs +104 -0
  91. data/sig/whop_sdk/models/lead_update_params.rbs +28 -0
  92. data/sig/whop_sdk/models/lead_update_response.rbs +104 -0
  93. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +119 -0
  94. data/sig/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbs +40 -0
  95. data/sig/whop_sdk/models/membership_status.rbs +2 -0
  96. data/sig/whop_sdk/models/payment_create_params.rbs +5 -0
  97. data/sig/whop_sdk/models/payment_list_fees_response.rbs +2 -0
  98. data/sig/whop_sdk/models/payment_method_list_params.rbs +11 -6
  99. data/sig/whop_sdk/models/payment_method_retrieve_params.rbs +9 -4
  100. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +140 -0
  101. data/sig/whop_sdk/models/payout_method_list_response.rbs +20 -0
  102. data/sig/whop_sdk/models/payout_method_retrieve_params.rbs +15 -0
  103. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +103 -0
  104. data/sig/whop_sdk/models/topup_create_params.rbs +41 -0
  105. data/sig/whop_sdk/models/topup_create_response.rbs +50 -0
  106. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
  107. data/sig/whop_sdk/models/verification_retrieve_params.rbs +15 -0
  108. data/sig/whop_sdk/models/verification_retrieve_response.rbs +117 -0
  109. data/sig/whop_sdk/models/verification_succeeded_webhook_event.rbs +154 -0
  110. data/sig/whop_sdk/models.rbs +20 -0
  111. data/sig/whop_sdk/resources/leads.rbs +40 -0
  112. data/sig/whop_sdk/resources/payment_methods.rbs +4 -2
  113. data/sig/whop_sdk/resources/payments.rbs +1 -0
  114. data/sig/whop_sdk/resources/payout_methods.rbs +5 -0
  115. data/sig/whop_sdk/resources/topups.rbs +15 -0
  116. data/sig/whop_sdk/resources/verifications.rbs +12 -0
  117. data/sig/whop_sdk/resources/webhooks.rbs +4 -1
  118. metadata +62 -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
@@ -0,0 +1,77 @@
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
+ sig do
39
+ params(
40
+ id: String,
41
+ data: WhopSDK::Membership::OrHash,
42
+ timestamp: Time,
43
+ api_version: Symbol,
44
+ type: Symbol
45
+ ).returns(T.attached_class)
46
+ end
47
+ def self.new(
48
+ # A unique ID for every single webhook request
49
+ id:,
50
+ # A membership represents a purchase between a User and a Company for a specific
51
+ # Product.
52
+ data:,
53
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
54
+ timestamp:,
55
+ # The API version for this webhook
56
+ api_version: :v1,
57
+ # The webhook event type
58
+ type: :"membership.cancel_at_period_end_changed"
59
+ )
60
+ end
61
+
62
+ sig do
63
+ override.returns(
64
+ {
65
+ id: String,
66
+ api_version: Symbol,
67
+ data: WhopSDK::Membership,
68
+ timestamp: Time,
69
+ type: Symbol
70
+ }
71
+ )
72
+ end
73
+ def to_hash
74
+ end
75
+ end
76
+ end
77
+ 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
  }
@@ -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:,
@@ -11,10 +11,6 @@ module WhopSDK
11
11
  T.any(WhopSDK::PaymentMethodListParams, WhopSDK::Internal::AnyHash)
12
12
  end
13
13
 
14
- # The ID of the Member to list payment methods for
15
- sig { returns(String) }
16
- attr_accessor :member_id
17
-
18
14
  # Returns the elements in the list that come after the specified cursor.
19
15
  sig { returns(T.nilable(String)) }
20
16
  attr_accessor :after
@@ -23,6 +19,10 @@ module WhopSDK
23
19
  sig { returns(T.nilable(String)) }
24
20
  attr_accessor :before
25
21
 
22
+ # The ID of the Company. Provide either this or member_id (not both).
23
+ sig { returns(T.nilable(String)) }
24
+ attr_accessor :company_id
25
+
26
26
  # The minimum creation date to filter by
27
27
  sig { returns(T.nilable(Time)) }
28
28
  attr_accessor :created_after
@@ -43,26 +43,31 @@ module WhopSDK
43
43
  sig { returns(T.nilable(Integer)) }
44
44
  attr_accessor :last
45
45
 
46
+ # The ID of the Member to list payment methods for
47
+ sig { returns(T.nilable(String)) }
48
+ attr_accessor :member_id
49
+
46
50
  sig do
47
51
  params(
48
- member_id: String,
49
52
  after: T.nilable(String),
50
53
  before: T.nilable(String),
54
+ company_id: T.nilable(String),
51
55
  created_after: T.nilable(Time),
52
56
  created_before: T.nilable(Time),
53
57
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
54
58
  first: T.nilable(Integer),
55
59
  last: T.nilable(Integer),
60
+ member_id: T.nilable(String),
56
61
  request_options: WhopSDK::RequestOptions::OrHash
57
62
  ).returns(T.attached_class)
58
63
  end
59
64
  def self.new(
60
- # The ID of the Member to list payment methods for
61
- member_id:,
62
65
  # Returns the elements in the list that come after the specified cursor.
63
66
  after: nil,
64
67
  # Returns the elements in the list that come before the specified cursor.
65
68
  before: nil,
69
+ # The ID of the Company. Provide either this or member_id (not both).
70
+ company_id: nil,
66
71
  # The minimum creation date to filter by
67
72
  created_after: nil,
68
73
  # The maximum creation date to filter by
@@ -73,6 +78,8 @@ module WhopSDK
73
78
  first: nil,
74
79
  # Returns the last _n_ elements from the list.
75
80
  last: nil,
81
+ # The ID of the Member to list payment methods for
82
+ member_id: nil,
76
83
  request_options: {}
77
84
  )
78
85
  end
@@ -80,14 +87,15 @@ module WhopSDK
80
87
  sig do
81
88
  override.returns(
82
89
  {
83
- member_id: String,
84
90
  after: T.nilable(String),
85
91
  before: T.nilable(String),
92
+ company_id: T.nilable(String),
86
93
  created_after: T.nilable(Time),
87
94
  created_before: T.nilable(Time),
88
95
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
89
96
  first: T.nilable(Integer),
90
97
  last: T.nilable(Integer),
98
+ member_id: T.nilable(String),
91
99
  request_options: WhopSDK::RequestOptions
92
100
  }
93
101
  )
@@ -14,26 +14,37 @@ module WhopSDK
14
14
  )
15
15
  end
16
16
 
17
- # The ID of the Member associated with the PaymentMethod
18
- sig { returns(String) }
17
+ # The ID of the Company. Provide either this or member_id (not both).
18
+ sig { returns(T.nilable(String)) }
19
+ attr_accessor :company_id
20
+
21
+ # The ID of the Member. Provide either this or company_id (not both).
22
+ sig { returns(T.nilable(String)) }
19
23
  attr_accessor :member_id
20
24
 
21
25
  sig do
22
26
  params(
23
- member_id: String,
27
+ company_id: T.nilable(String),
28
+ member_id: T.nilable(String),
24
29
  request_options: WhopSDK::RequestOptions::OrHash
25
30
  ).returns(T.attached_class)
26
31
  end
27
32
  def self.new(
28
- # The ID of the Member associated with the PaymentMethod
29
- member_id:,
33
+ # The ID of the Company. Provide either this or member_id (not both).
34
+ company_id: nil,
35
+ # The ID of the Member. Provide either this or company_id (not both).
36
+ member_id: nil,
30
37
  request_options: {}
31
38
  )
32
39
  end
33
40
 
34
41
  sig do
35
42
  override.returns(
36
- { member_id: String, request_options: WhopSDK::RequestOptions }
43
+ {
44
+ company_id: T.nilable(String),
45
+ member_id: T.nilable(String),
46
+ request_options: WhopSDK::RequestOptions
47
+ }
37
48
  )
38
49
  end
39
50
  def to_hash