whop_sdk 0.0.19 → 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 (130) 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 +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/checkout_configuration_create_params.rb +11 -1
  8. data/lib/whop_sdk/models/company_create_params.rb +17 -1
  9. data/lib/whop_sdk/models/company_update_params.rb +17 -1
  10. data/lib/whop_sdk/models/lead_create_params.rb +58 -0
  11. data/lib/whop_sdk/models/lead_create_response.rb +149 -0
  12. data/lib/whop_sdk/models/lead_list_params.rb +78 -0
  13. data/lib/whop_sdk/models/lead_list_response.rb +149 -0
  14. data/lib/whop_sdk/models/lead_retrieve_params.rb +14 -0
  15. data/lib/whop_sdk/models/lead_retrieve_response.rb +149 -0
  16. data/lib/whop_sdk/models/lead_update_params.rb +30 -0
  17. data/lib/whop_sdk/models/lead_update_response.rb +149 -0
  18. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +128 -2
  19. data/lib/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rb +53 -0
  20. data/lib/whop_sdk/models/membership_status.rb +1 -0
  21. data/lib/whop_sdk/models/payment.rb +3 -3
  22. data/lib/whop_sdk/models/payment_create_params.rb +9 -1
  23. data/lib/whop_sdk/models/payment_list_fees_response.rb +1 -0
  24. data/lib/whop_sdk/models/payment_list_response.rb +3 -3
  25. data/lib/whop_sdk/models/payment_method_list_params.rb +16 -8
  26. data/lib/whop_sdk/models/payment_method_retrieve_params.rb +13 -5
  27. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +168 -0
  28. data/lib/whop_sdk/models/payout_method_list_response.rb +31 -1
  29. data/lib/whop_sdk/models/payout_method_retrieve_params.rb +14 -0
  30. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +125 -0
  31. data/lib/whop_sdk/models/support_channel_create_params.rb +2 -2
  32. data/lib/whop_sdk/models/topup_create_params.rb +46 -0
  33. data/lib/whop_sdk/models/topup_create_response.rb +67 -0
  34. data/lib/whop_sdk/models/unwrap_webhook_event.rb +8 -1
  35. data/lib/whop_sdk/models/verification_retrieve_params.rb +14 -0
  36. data/lib/whop_sdk/models/verification_retrieve_response.rb +99 -0
  37. data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +142 -0
  38. data/lib/whop_sdk/models.rb +21 -0
  39. data/lib/whop_sdk/resources/companies.rb +10 -2
  40. data/lib/whop_sdk/resources/leads.rb +158 -0
  41. data/lib/whop_sdk/resources/payment_methods.rb +12 -8
  42. data/lib/whop_sdk/resources/payments.rb +3 -1
  43. data/lib/whop_sdk/resources/payout_methods.rb +24 -0
  44. data/lib/whop_sdk/resources/support_channels.rb +1 -1
  45. data/lib/whop_sdk/resources/topups.rb +46 -0
  46. data/lib/whop_sdk/resources/verifications.rb +38 -0
  47. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  48. data/lib/whop_sdk/version.rb +1 -1
  49. data/lib/whop_sdk.rb +20 -0
  50. data/rbi/whop_sdk/client.rbi +9 -0
  51. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +12 -0
  52. data/rbi/whop_sdk/models/company_create_params.rbi +16 -0
  53. data/rbi/whop_sdk/models/company_update_params.rbi +16 -0
  54. data/rbi/whop_sdk/models/lead_create_params.rbi +77 -0
  55. data/rbi/whop_sdk/models/lead_create_response.rbi +234 -0
  56. data/rbi/whop_sdk/models/lead_list_params.rbi +99 -0
  57. data/rbi/whop_sdk/models/lead_list_response.rbi +230 -0
  58. data/rbi/whop_sdk/models/lead_retrieve_params.rbi +27 -0
  59. data/rbi/whop_sdk/models/lead_retrieve_response.rbi +238 -0
  60. data/rbi/whop_sdk/models/lead_update_params.rbi +51 -0
  61. data/rbi/whop_sdk/models/lead_update_response.rbi +234 -0
  62. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +336 -0
  63. data/rbi/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbi +77 -0
  64. data/rbi/whop_sdk/models/membership_status.rbi +1 -0
  65. data/rbi/whop_sdk/models/payment.rbi +4 -4
  66. data/rbi/whop_sdk/models/payment_create_params.rbi +8 -0
  67. data/rbi/whop_sdk/models/payment_list_fees_response.rbi +5 -0
  68. data/rbi/whop_sdk/models/payment_list_response.rbi +4 -4
  69. data/rbi/whop_sdk/models/payment_method_list_params.rbi +16 -8
  70. data/rbi/whop_sdk/models/payment_method_retrieve_params.rbi +17 -6
  71. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +340 -0
  72. data/rbi/whop_sdk/models/payout_method_list_response.rbi +58 -0
  73. data/rbi/whop_sdk/models/payout_method_retrieve_params.rbi +27 -0
  74. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +262 -0
  75. data/rbi/whop_sdk/models/support_channel_create_params.rbi +2 -2
  76. data/rbi/whop_sdk/models/topup_create_params.rbi +67 -0
  77. data/rbi/whop_sdk/models/topup_create_response.rbi +89 -0
  78. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +4 -1
  79. data/rbi/whop_sdk/models/verification_retrieve_params.rbi +27 -0
  80. data/rbi/whop_sdk/models/verification_retrieve_response.rbi +290 -0
  81. data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +367 -0
  82. data/rbi/whop_sdk/models.rbi +23 -0
  83. data/rbi/whop_sdk/resources/companies.rbi +12 -0
  84. data/rbi/whop_sdk/resources/leads.rbi +138 -0
  85. data/rbi/whop_sdk/resources/payment_methods.rbi +13 -7
  86. data/rbi/whop_sdk/resources/payments.rbi +3 -0
  87. data/rbi/whop_sdk/resources/payout_methods.rbi +18 -0
  88. data/rbi/whop_sdk/resources/support_channels.rbi +1 -1
  89. data/rbi/whop_sdk/resources/topups.rbi +39 -0
  90. data/rbi/whop_sdk/resources/verifications.rbi +30 -0
  91. data/rbi/whop_sdk/resources/webhooks.rbi +4 -1
  92. data/sig/whop_sdk/client.rbs +6 -0
  93. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  94. data/sig/whop_sdk/models/company_create_params.rbs +10 -0
  95. data/sig/whop_sdk/models/company_update_params.rbs +10 -0
  96. data/sig/whop_sdk/models/lead_create_params.rbs +46 -0
  97. data/sig/whop_sdk/models/lead_create_response.rbs +104 -0
  98. data/sig/whop_sdk/models/lead_list_params.rbs +61 -0
  99. data/sig/whop_sdk/models/lead_list_response.rbs +104 -0
  100. data/sig/whop_sdk/models/lead_retrieve_params.rbs +15 -0
  101. data/sig/whop_sdk/models/lead_retrieve_response.rbs +104 -0
  102. data/sig/whop_sdk/models/lead_update_params.rbs +28 -0
  103. data/sig/whop_sdk/models/lead_update_response.rbs +104 -0
  104. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +134 -1
  105. data/sig/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbs +40 -0
  106. data/sig/whop_sdk/models/membership_status.rbs +2 -0
  107. data/sig/whop_sdk/models/payment_create_params.rbs +5 -0
  108. data/sig/whop_sdk/models/payment_list_fees_response.rbs +2 -0
  109. data/sig/whop_sdk/models/payment_method_list_params.rbs +11 -6
  110. data/sig/whop_sdk/models/payment_method_retrieve_params.rbs +9 -4
  111. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +140 -0
  112. data/sig/whop_sdk/models/payout_method_list_response.rbs +20 -0
  113. data/sig/whop_sdk/models/payout_method_retrieve_params.rbs +15 -0
  114. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +103 -0
  115. data/sig/whop_sdk/models/topup_create_params.rbs +41 -0
  116. data/sig/whop_sdk/models/topup_create_response.rbs +50 -0
  117. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
  118. data/sig/whop_sdk/models/verification_retrieve_params.rbs +15 -0
  119. data/sig/whop_sdk/models/verification_retrieve_response.rbs +117 -0
  120. data/sig/whop_sdk/models/verification_succeeded_webhook_event.rbs +154 -0
  121. data/sig/whop_sdk/models.rbs +20 -0
  122. data/sig/whop_sdk/resources/companies.rbs +4 -0
  123. data/sig/whop_sdk/resources/leads.rbs +40 -0
  124. data/sig/whop_sdk/resources/payment_methods.rbs +4 -2
  125. data/sig/whop_sdk/resources/payments.rbs +1 -0
  126. data/sig/whop_sdk/resources/payout_methods.rbs +5 -0
  127. data/sig/whop_sdk/resources/topups.rbs +15 -0
  128. data/sig/whop_sdk/resources/verifications.rbs +12 -0
  129. data/sig/whop_sdk/resources/webhooks.rbs +4 -1
  130. metadata +62 -2
@@ -0,0 +1,149 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Leads#list
6
+ class LeadListResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the lead.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # The timestamp of when the lead was created.
15
+ #
16
+ # @return [Time]
17
+ required :created_at, Time
18
+
19
+ # @!attribute member
20
+ # The converted member, if any.
21
+ #
22
+ # @return [WhopSDK::Models::LeadListResponse::Member, nil]
23
+ required :member, -> { WhopSDK::Models::LeadListResponse::Member }, nil?: true
24
+
25
+ # @!attribute metadata
26
+ # Custom metadata for the lead.
27
+ #
28
+ # @return [Hash{Symbol=>Object}, nil]
29
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
30
+
31
+ # @!attribute product
32
+ # The access pass the lead is interested in, if available.
33
+ #
34
+ # @return [WhopSDK::Models::LeadListResponse::Product, nil]
35
+ required :product, -> { WhopSDK::Models::LeadListResponse::Product }, nil?: true
36
+
37
+ # @!attribute referrer
38
+ # The referrer URL that brought this lead.
39
+ #
40
+ # @return [String, nil]
41
+ required :referrer, String, nil?: true
42
+
43
+ # @!attribute updated_at
44
+ # The timestamp of when the lead was last updated.
45
+ #
46
+ # @return [Time]
47
+ required :updated_at, Time
48
+
49
+ # @!attribute user
50
+ # The user who is the lead.
51
+ #
52
+ # @return [WhopSDK::Models::LeadListResponse::User]
53
+ required :user, -> { WhopSDK::Models::LeadListResponse::User }
54
+
55
+ # @!method initialize(id:, created_at:, member:, metadata:, product:, referrer:, updated_at:, user:)
56
+ # An object representing a lead (someone who is interested in a whop).
57
+ #
58
+ # @param id [String] The ID of the lead.
59
+ #
60
+ # @param created_at [Time] The timestamp of when the lead was created.
61
+ #
62
+ # @param member [WhopSDK::Models::LeadListResponse::Member, nil] The converted member, if any.
63
+ #
64
+ # @param metadata [Hash{Symbol=>Object}, nil] Custom metadata for the lead.
65
+ #
66
+ # @param product [WhopSDK::Models::LeadListResponse::Product, nil] The access pass the lead is interested in, if available.
67
+ #
68
+ # @param referrer [String, nil] The referrer URL that brought this lead.
69
+ #
70
+ # @param updated_at [Time] The timestamp of when the lead was last updated.
71
+ #
72
+ # @param user [WhopSDK::Models::LeadListResponse::User] The user who is the lead.
73
+
74
+ # @see WhopSDK::Models::LeadListResponse#member
75
+ class Member < WhopSDK::Internal::Type::BaseModel
76
+ # @!attribute id
77
+ # The ID of the member
78
+ #
79
+ # @return [String]
80
+ required :id, String
81
+
82
+ # @!method initialize(id:)
83
+ # The converted member, if any.
84
+ #
85
+ # @param id [String] The ID of the member
86
+ end
87
+
88
+ # @see WhopSDK::Models::LeadListResponse#product
89
+ class Product < WhopSDK::Internal::Type::BaseModel
90
+ # @!attribute id
91
+ # The internal ID of the public product.
92
+ #
93
+ # @return [String]
94
+ required :id, String
95
+
96
+ # @!attribute title
97
+ # The title of the product. Use for Whop 4.0.
98
+ #
99
+ # @return [String]
100
+ required :title, String
101
+
102
+ # @!method initialize(id:, title:)
103
+ # The access pass the lead is interested in, if available.
104
+ #
105
+ # @param id [String] The internal ID of the public product.
106
+ #
107
+ # @param title [String] The title of the product. Use for Whop 4.0.
108
+ end
109
+
110
+ # @see WhopSDK::Models::LeadListResponse#user
111
+ class User < WhopSDK::Internal::Type::BaseModel
112
+ # @!attribute id
113
+ # The internal ID of the user.
114
+ #
115
+ # @return [String]
116
+ required :id, String
117
+
118
+ # @!attribute email
119
+ # The email of the user
120
+ #
121
+ # @return [String, nil]
122
+ required :email, String, nil?: true
123
+
124
+ # @!attribute name
125
+ # The name of the user from their Whop account.
126
+ #
127
+ # @return [String, nil]
128
+ required :name, String, nil?: true
129
+
130
+ # @!attribute username
131
+ # The username of the user from their Whop account.
132
+ #
133
+ # @return [String]
134
+ required :username, String
135
+
136
+ # @!method initialize(id:, email:, name:, username:)
137
+ # The user who is the lead.
138
+ #
139
+ # @param id [String] The internal ID of the user.
140
+ #
141
+ # @param email [String, nil] The email of the user
142
+ #
143
+ # @param name [String, nil] The name of the user from their Whop account.
144
+ #
145
+ # @param username [String] The username of the user from their Whop account.
146
+ end
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Leads#retrieve
6
+ class LeadRetrieveParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,149 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Leads#retrieve
6
+ class LeadRetrieveResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the lead.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # The timestamp of when the lead was created.
15
+ #
16
+ # @return [Time]
17
+ required :created_at, Time
18
+
19
+ # @!attribute member
20
+ # The converted member, if any.
21
+ #
22
+ # @return [WhopSDK::Models::LeadRetrieveResponse::Member, nil]
23
+ required :member, -> { WhopSDK::Models::LeadRetrieveResponse::Member }, nil?: true
24
+
25
+ # @!attribute metadata
26
+ # Custom metadata for the lead.
27
+ #
28
+ # @return [Hash{Symbol=>Object}, nil]
29
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
30
+
31
+ # @!attribute product
32
+ # The access pass the lead is interested in, if available.
33
+ #
34
+ # @return [WhopSDK::Models::LeadRetrieveResponse::Product, nil]
35
+ required :product, -> { WhopSDK::Models::LeadRetrieveResponse::Product }, nil?: true
36
+
37
+ # @!attribute referrer
38
+ # The referrer URL that brought this lead.
39
+ #
40
+ # @return [String, nil]
41
+ required :referrer, String, nil?: true
42
+
43
+ # @!attribute updated_at
44
+ # The timestamp of when the lead was last updated.
45
+ #
46
+ # @return [Time]
47
+ required :updated_at, Time
48
+
49
+ # @!attribute user
50
+ # The user who is the lead.
51
+ #
52
+ # @return [WhopSDK::Models::LeadRetrieveResponse::User]
53
+ required :user, -> { WhopSDK::Models::LeadRetrieveResponse::User }
54
+
55
+ # @!method initialize(id:, created_at:, member:, metadata:, product:, referrer:, updated_at:, user:)
56
+ # An object representing a lead (someone who is interested in a whop).
57
+ #
58
+ # @param id [String] The ID of the lead.
59
+ #
60
+ # @param created_at [Time] The timestamp of when the lead was created.
61
+ #
62
+ # @param member [WhopSDK::Models::LeadRetrieveResponse::Member, nil] The converted member, if any.
63
+ #
64
+ # @param metadata [Hash{Symbol=>Object}, nil] Custom metadata for the lead.
65
+ #
66
+ # @param product [WhopSDK::Models::LeadRetrieveResponse::Product, nil] The access pass the lead is interested in, if available.
67
+ #
68
+ # @param referrer [String, nil] The referrer URL that brought this lead.
69
+ #
70
+ # @param updated_at [Time] The timestamp of when the lead was last updated.
71
+ #
72
+ # @param user [WhopSDK::Models::LeadRetrieveResponse::User] The user who is the lead.
73
+
74
+ # @see WhopSDK::Models::LeadRetrieveResponse#member
75
+ class Member < WhopSDK::Internal::Type::BaseModel
76
+ # @!attribute id
77
+ # The ID of the member
78
+ #
79
+ # @return [String]
80
+ required :id, String
81
+
82
+ # @!method initialize(id:)
83
+ # The converted member, if any.
84
+ #
85
+ # @param id [String] The ID of the member
86
+ end
87
+
88
+ # @see WhopSDK::Models::LeadRetrieveResponse#product
89
+ class Product < WhopSDK::Internal::Type::BaseModel
90
+ # @!attribute id
91
+ # The internal ID of the public product.
92
+ #
93
+ # @return [String]
94
+ required :id, String
95
+
96
+ # @!attribute title
97
+ # The title of the product. Use for Whop 4.0.
98
+ #
99
+ # @return [String]
100
+ required :title, String
101
+
102
+ # @!method initialize(id:, title:)
103
+ # The access pass the lead is interested in, if available.
104
+ #
105
+ # @param id [String] The internal ID of the public product.
106
+ #
107
+ # @param title [String] The title of the product. Use for Whop 4.0.
108
+ end
109
+
110
+ # @see WhopSDK::Models::LeadRetrieveResponse#user
111
+ class User < WhopSDK::Internal::Type::BaseModel
112
+ # @!attribute id
113
+ # The internal ID of the user.
114
+ #
115
+ # @return [String]
116
+ required :id, String
117
+
118
+ # @!attribute email
119
+ # The email of the user
120
+ #
121
+ # @return [String, nil]
122
+ required :email, String, nil?: true
123
+
124
+ # @!attribute name
125
+ # The name of the user from their Whop account.
126
+ #
127
+ # @return [String, nil]
128
+ required :name, String, nil?: true
129
+
130
+ # @!attribute username
131
+ # The username of the user from their Whop account.
132
+ #
133
+ # @return [String]
134
+ required :username, String
135
+
136
+ # @!method initialize(id:, email:, name:, username:)
137
+ # The user who is the lead.
138
+ #
139
+ # @param id [String] The internal ID of the user.
140
+ #
141
+ # @param email [String, nil] The email of the user
142
+ #
143
+ # @param name [String, nil] The name of the user from their Whop account.
144
+ #
145
+ # @param username [String] The username of the user from their Whop account.
146
+ end
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Leads#update
6
+ class LeadUpdateParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute metadata
11
+ # Custom metadata for the lead.
12
+ #
13
+ # @return [Hash{Symbol=>Object}, nil]
14
+ optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
15
+
16
+ # @!attribute referrer
17
+ # The url referrer of the lead.
18
+ #
19
+ # @return [String, nil]
20
+ optional :referrer, String, nil?: true
21
+
22
+ # @!method initialize(metadata: nil, referrer: nil, request_options: {})
23
+ # @param metadata [Hash{Symbol=>Object}, nil] Custom metadata for the lead.
24
+ #
25
+ # @param referrer [String, nil] The url referrer of the lead.
26
+ #
27
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,149 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Leads#update
6
+ class LeadUpdateResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the lead.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # The timestamp of when the lead was created.
15
+ #
16
+ # @return [Time]
17
+ required :created_at, Time
18
+
19
+ # @!attribute member
20
+ # The converted member, if any.
21
+ #
22
+ # @return [WhopSDK::Models::LeadUpdateResponse::Member, nil]
23
+ required :member, -> { WhopSDK::Models::LeadUpdateResponse::Member }, nil?: true
24
+
25
+ # @!attribute metadata
26
+ # Custom metadata for the lead.
27
+ #
28
+ # @return [Hash{Symbol=>Object}, nil]
29
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
30
+
31
+ # @!attribute product
32
+ # The access pass the lead is interested in, if available.
33
+ #
34
+ # @return [WhopSDK::Models::LeadUpdateResponse::Product, nil]
35
+ required :product, -> { WhopSDK::Models::LeadUpdateResponse::Product }, nil?: true
36
+
37
+ # @!attribute referrer
38
+ # The referrer URL that brought this lead.
39
+ #
40
+ # @return [String, nil]
41
+ required :referrer, String, nil?: true
42
+
43
+ # @!attribute updated_at
44
+ # The timestamp of when the lead was last updated.
45
+ #
46
+ # @return [Time]
47
+ required :updated_at, Time
48
+
49
+ # @!attribute user
50
+ # The user who is the lead.
51
+ #
52
+ # @return [WhopSDK::Models::LeadUpdateResponse::User]
53
+ required :user, -> { WhopSDK::Models::LeadUpdateResponse::User }
54
+
55
+ # @!method initialize(id:, created_at:, member:, metadata:, product:, referrer:, updated_at:, user:)
56
+ # An object representing a lead (someone who is interested in a whop).
57
+ #
58
+ # @param id [String] The ID of the lead.
59
+ #
60
+ # @param created_at [Time] The timestamp of when the lead was created.
61
+ #
62
+ # @param member [WhopSDK::Models::LeadUpdateResponse::Member, nil] The converted member, if any.
63
+ #
64
+ # @param metadata [Hash{Symbol=>Object}, nil] Custom metadata for the lead.
65
+ #
66
+ # @param product [WhopSDK::Models::LeadUpdateResponse::Product, nil] The access pass the lead is interested in, if available.
67
+ #
68
+ # @param referrer [String, nil] The referrer URL that brought this lead.
69
+ #
70
+ # @param updated_at [Time] The timestamp of when the lead was last updated.
71
+ #
72
+ # @param user [WhopSDK::Models::LeadUpdateResponse::User] The user who is the lead.
73
+
74
+ # @see WhopSDK::Models::LeadUpdateResponse#member
75
+ class Member < WhopSDK::Internal::Type::BaseModel
76
+ # @!attribute id
77
+ # The ID of the member
78
+ #
79
+ # @return [String]
80
+ required :id, String
81
+
82
+ # @!method initialize(id:)
83
+ # The converted member, if any.
84
+ #
85
+ # @param id [String] The ID of the member
86
+ end
87
+
88
+ # @see WhopSDK::Models::LeadUpdateResponse#product
89
+ class Product < WhopSDK::Internal::Type::BaseModel
90
+ # @!attribute id
91
+ # The internal ID of the public product.
92
+ #
93
+ # @return [String]
94
+ required :id, String
95
+
96
+ # @!attribute title
97
+ # The title of the product. Use for Whop 4.0.
98
+ #
99
+ # @return [String]
100
+ required :title, String
101
+
102
+ # @!method initialize(id:, title:)
103
+ # The access pass the lead is interested in, if available.
104
+ #
105
+ # @param id [String] The internal ID of the public product.
106
+ #
107
+ # @param title [String] The title of the product. Use for Whop 4.0.
108
+ end
109
+
110
+ # @see WhopSDK::Models::LeadUpdateResponse#user
111
+ class User < WhopSDK::Internal::Type::BaseModel
112
+ # @!attribute id
113
+ # The internal ID of the user.
114
+ #
115
+ # @return [String]
116
+ required :id, String
117
+
118
+ # @!attribute email
119
+ # The email of the user
120
+ #
121
+ # @return [String, nil]
122
+ required :email, String, nil?: true
123
+
124
+ # @!attribute name
125
+ # The name of the user from their Whop account.
126
+ #
127
+ # @return [String, nil]
128
+ required :name, String, nil?: true
129
+
130
+ # @!attribute username
131
+ # The username of the user from their Whop account.
132
+ #
133
+ # @return [String]
134
+ required :username, String
135
+
136
+ # @!method initialize(id:, email:, name:, username:)
137
+ # The user who is the lead.
138
+ #
139
+ # @param id [String] The internal ID of the user.
140
+ #
141
+ # @param email [String, nil] The email of the user
142
+ #
143
+ # @param name [String, nil] The name of the user from their Whop account.
144
+ #
145
+ # @param username [String] The username of the user from their Whop account.
146
+ end
147
+ end
148
+ end
149
+ end
@@ -288,13 +288,27 @@ module WhopSDK
288
288
  -> { WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative },
289
289
  nil?: true
290
290
 
291
+ # @!attribute email
292
+ # The email address of the representative
293
+ #
294
+ # @return [String, nil]
295
+ required :email, String, nil?: true
296
+
297
+ # @!attribute latest_verification
298
+ # The latest verification for the connected account.
299
+ #
300
+ # @return [WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification, nil]
301
+ required :latest_verification,
302
+ -> { WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification },
303
+ nil?: true
304
+
291
305
  # @!attribute phone
292
306
  # The business representative's phone
293
307
  #
294
308
  # @return [String, nil]
295
309
  required :phone, String, nil?: true
296
310
 
297
- # @!method initialize(id:, address:, business_name:, business_representative:, phone:)
311
+ # @!method initialize(id:, address:, business_name:, business_representative:, email:, latest_verification:, phone:)
298
312
  # The payout account associated with the LedgerAccount, if any.
299
313
  #
300
314
  # @param id [String] Unique identifier for the object
@@ -305,6 +319,10 @@ module WhopSDK
305
319
  #
306
320
  # @param business_representative [WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative, nil] The business representative for this payout account
307
321
  #
322
+ # @param email [String, nil] The email address of the representative
323
+ #
324
+ # @param latest_verification [WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification, nil] The latest verification for the connected account.
325
+ #
308
326
  # @param phone [String, nil] The business representative's phone
309
327
 
310
328
  # @see WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails#address
@@ -363,6 +381,13 @@ module WhopSDK
363
381
 
364
382
  # @see WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails#business_representative
365
383
  class BusinessRepresentative < WhopSDK::Internal::Type::BaseModel
384
+ # @!attribute date_of_birth
385
+ # The date of birth of the business representative in ISO 8601 format
386
+ # (YYYY-MM-DD).
387
+ #
388
+ # @return [String, nil]
389
+ required :date_of_birth, String, nil?: true
390
+
366
391
  # @!attribute first_name
367
392
  # The first name of the business representative.
368
393
  #
@@ -381,15 +406,116 @@ module WhopSDK
381
406
  # @return [String, nil]
382
407
  required :middle_name, String, nil?: true
383
408
 
384
- # @!method initialize(first_name:, last_name:, middle_name:)
409
+ # @!method initialize(date_of_birth:, first_name:, last_name:, middle_name:)
410
+ # Some parameter documentations has been truncated, see
411
+ # {WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative}
412
+ # for more details.
413
+ #
385
414
  # The business representative for this payout account
386
415
  #
416
+ # @param date_of_birth [String, nil] The date of birth of the business representative in ISO 8601 format (YYYY-MM-DD)
417
+ #
387
418
  # @param first_name [String, nil] The first name of the business representative.
388
419
  #
389
420
  # @param last_name [String, nil] The last name of the business representative.
390
421
  #
391
422
  # @param middle_name [String, nil] The middle name of the business representative.
392
423
  end
424
+
425
+ # @see WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails#latest_verification
426
+ class LatestVerification < WhopSDK::Internal::Type::BaseModel
427
+ # @!attribute id
428
+ # A unique identifier for the verification.
429
+ #
430
+ # @return [String]
431
+ required :id, String
432
+
433
+ # @!attribute last_error_code
434
+ # An error code for a verification attempt.
435
+ #
436
+ # @return [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode, nil]
437
+ required :last_error_code,
438
+ enum: -> { WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode },
439
+ nil?: true
440
+
441
+ # @!attribute last_error_reason
442
+ # The last error reason that occurred during the verification.
443
+ #
444
+ # @return [String, nil]
445
+ required :last_error_reason, String, nil?: true
446
+
447
+ # @!attribute status
448
+ # The status of the verification.
449
+ #
450
+ # @return [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status]
451
+ required :status,
452
+ enum: -> { WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status }
453
+
454
+ # @!method initialize(id:, last_error_code:, last_error_reason:, status:)
455
+ # The latest verification for the connected account.
456
+ #
457
+ # @param id [String] A unique identifier for the verification.
458
+ #
459
+ # @param last_error_code [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::LastErrorCode, nil] An error code for a verification attempt.
460
+ #
461
+ # @param last_error_reason [String, nil] The last error reason that occurred during the verification.
462
+ #
463
+ # @param status [Symbol, WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification::Status] The status of the verification.
464
+
465
+ # An error code for a verification attempt.
466
+ #
467
+ # @see WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification#last_error_code
468
+ module LastErrorCode
469
+ extend WhopSDK::Internal::Type::Enum
470
+
471
+ ABANDONED = :abandoned
472
+ CONSENT_DECLINED = :consent_declined
473
+ COUNTRY_NOT_SUPPORTED = :country_not_supported
474
+ DEVICE_NOT_SUPPORTED = :device_not_supported
475
+ DOCUMENT_EXPIRED = :document_expired
476
+ DOCUMENT_TYPE_NOT_SUPPORTED = :document_type_not_supported
477
+ DOCUMENT_UNVERIFIED_OTHER = :document_unverified_other
478
+ EMAIL_UNVERIFIED_OTHER = :email_unverified_other
479
+ EMAIL_VERIFICATION_DECLINED = :email_verification_declined
480
+ ID_NUMBER_INSUFFICIENT_DOCUMENT_DATA = :id_number_insufficient_document_data
481
+ ID_NUMBER_MISMATCH = :id_number_mismatch
482
+ ID_NUMBER_UNVERIFIED_OTHER = :id_number_unverified_other
483
+ PHONE_UNVERIFIED_OTHER = :phone_unverified_other
484
+ PHONE_VERIFICATION_DECLINED = :phone_verification_declined
485
+ SELFIE_DOCUMENT_MISSING_PHOTO = :selfie_document_missing_photo
486
+ SELFIE_FACE_MISMATCH = :selfie_face_mismatch
487
+ SELFIE_MANIPULATED = :selfie_manipulated
488
+ SELFIE_UNVERIFIED_OTHER = :selfie_unverified_other
489
+ UNDER_SUPPORTED_AGE = :under_supported_age
490
+
491
+ # @!method self.values
492
+ # @return [Array<Symbol>]
493
+ end
494
+
495
+ # The status of the verification.
496
+ #
497
+ # @see WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::LatestVerification#status
498
+ module Status
499
+ extend WhopSDK::Internal::Type::Enum
500
+
501
+ REQUIRES_INPUT = :requires_input
502
+ PROCESSING = :processing
503
+ VERIFIED = :verified
504
+ CANCELED = :canceled
505
+ CREATED = :created
506
+ STARTED = :started
507
+ SUBMITTED = :submitted
508
+ APPROVED = :approved
509
+ DECLINED = :declined
510
+ RESUBMISSION_REQUESTED = :resubmission_requested
511
+ EXPIRED = :expired
512
+ ABANDONED = :abandoned
513
+ REVIEW = :review
514
+
515
+ # @!method self.values
516
+ # @return [Array<Symbol>]
517
+ end
518
+ end
393
519
  end
394
520
  end
395
521
  end