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
@@ -7,14 +7,22 @@ module WhopSDK
7
7
  extend WhopSDK::Internal::Type::RequestParameters::Converter
8
8
  include WhopSDK::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute company_id
11
+ # The ID of the Company. Provide either this or member_id (not both).
12
+ #
13
+ # @return [String, nil]
14
+ optional :company_id, String, nil?: true
15
+
10
16
  # @!attribute member_id
11
- # The ID of the Member associated with the PaymentMethod
17
+ # The ID of the Member. Provide either this or company_id (not both).
12
18
  #
13
- # @return [String]
14
- required :member_id, String
19
+ # @return [String, nil]
20
+ optional :member_id, String, nil?: true
15
21
 
16
- # @!method initialize(member_id:, request_options: {})
17
- # @param member_id [String] The ID of the Member associated with the PaymentMethod
22
+ # @!method initialize(company_id: nil, member_id: nil, request_options: {})
23
+ # @param company_id [String, nil] The ID of the Company. Provide either this or member_id (not both).
24
+ #
25
+ # @param member_id [String, nil] The ID of the Member. Provide either this or company_id (not both).
18
26
  #
19
27
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
20
28
  end
@@ -0,0 +1,168 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class PayoutMethodCreatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # A unique ID for every single webhook request
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute api_version
13
+ # The API version for this webhook
14
+ #
15
+ # @return [Symbol, :v1]
16
+ required :api_version, const: :v1
17
+
18
+ # @!attribute data
19
+ # An object representing an user's setup payout destination.
20
+ #
21
+ # @return [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data]
22
+ required :data, -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data }
23
+
24
+ # @!attribute timestamp
25
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
26
+ #
27
+ # @return [Time]
28
+ required :timestamp, Time
29
+
30
+ # @!attribute type
31
+ # The webhook event type
32
+ #
33
+ # @return [Symbol, :"payout_method.created"]
34
+ required :type, const: :"payout_method.created"
35
+
36
+ # @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"payout_method.created")
37
+ # @param id [String] A unique ID for every single webhook request
38
+ #
39
+ # @param data [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data] An object representing an user's setup payout destination.
40
+ #
41
+ # @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
42
+ #
43
+ # @param api_version [Symbol, :v1] The API version for this webhook
44
+ #
45
+ # @param type [Symbol, :"payout_method.created"] The webhook event type
46
+
47
+ # @see WhopSDK::Models::PayoutMethodCreatedWebhookEvent#data
48
+ class Data < WhopSDK::Internal::Type::BaseModel
49
+ # @!attribute id
50
+ # The ID of the payout token
51
+ #
52
+ # @return [String]
53
+ required :id, String
54
+
55
+ # @!attribute company
56
+ # The company associated with the payout token
57
+ #
58
+ # @return [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Company, nil]
59
+ required :company, -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company }, nil?: true
60
+
61
+ # @!attribute currency
62
+ # The currency code of the payout destination. This is the currency that payouts
63
+ # will be made in for this token.
64
+ #
65
+ # @return [String]
66
+ required :currency, String
67
+
68
+ # @!attribute destination
69
+ # The payout destination associated with the payout token
70
+ #
71
+ # @return [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination, nil]
72
+ required :destination, -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination }, nil?: true
73
+
74
+ # @!attribute is_default
75
+ # Whether this payout token is the default for the payout account
76
+ #
77
+ # @return [Boolean]
78
+ required :is_default, WhopSDK::Internal::Type::Boolean
79
+
80
+ # @!attribute nickname
81
+ # An optional nickname for the payout token to help the user identify it. This is
82
+ # not used by the provider and is only for the user's reference.
83
+ #
84
+ # @return [String, nil]
85
+ required :nickname, String, nil?: true
86
+
87
+ # @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:)
88
+ # Some parameter documentations has been truncated, see
89
+ # {WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data} for more details.
90
+ #
91
+ # An object representing an user's setup payout destination.
92
+ #
93
+ # @param id [String] The ID of the payout token
94
+ #
95
+ # @param company [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Company, nil] The company associated with the payout token
96
+ #
97
+ # @param currency [String] The currency code of the payout destination. This is the currency that payouts w
98
+ #
99
+ # @param destination [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination, nil] The payout destination associated with the payout token
100
+ #
101
+ # @param is_default [Boolean] Whether this payout token is the default for the payout account
102
+ #
103
+ # @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
104
+
105
+ # @see WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data#company
106
+ class Company < WhopSDK::Internal::Type::BaseModel
107
+ # @!attribute id
108
+ # The ID (tag) of the company.
109
+ #
110
+ # @return [String]
111
+ required :id, String
112
+
113
+ # @!method initialize(id:)
114
+ # The company associated with the payout token
115
+ #
116
+ # @param id [String] The ID (tag) of the company.
117
+ end
118
+
119
+ # @see WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data#destination
120
+ class Destination < WhopSDK::Internal::Type::BaseModel
121
+ # @!attribute category
122
+ # The category of the payout destination
123
+ #
124
+ # @return [Symbol, WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination::Category]
125
+ required :category, enum: -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination::Category }
126
+
127
+ # @!attribute country_code
128
+ # The country code of the payout destination
129
+ #
130
+ # @return [String]
131
+ required :country_code, String
132
+
133
+ # @!attribute name
134
+ # The name of the payer associated with the payout destination
135
+ #
136
+ # @return [String]
137
+ required :name, String
138
+
139
+ # @!method initialize(category:, country_code:, name:)
140
+ # The payout destination associated with the payout token
141
+ #
142
+ # @param category [Symbol, WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination::Category] The category of the payout destination
143
+ #
144
+ # @param country_code [String] The country code of the payout destination
145
+ #
146
+ # @param name [String] The name of the payer associated with the payout destination
147
+
148
+ # The category of the payout destination
149
+ #
150
+ # @see WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination#category
151
+ module Category
152
+ extend WhopSDK::Internal::Type::Enum
153
+
154
+ CRYPTO = :crypto
155
+ RTP = :rtp
156
+ NEXT_DAY_BANK = :next_day_bank
157
+ BANK_WIRE = :bank_wire
158
+ DIGITAL_WALLET = :digital_wallet
159
+ UNKNOWN = :unknown
160
+
161
+ # @!method self.values
162
+ # @return [Array<Symbol>]
163
+ end
164
+ end
165
+ end
166
+ end
167
+ end
168
+ end
@@ -10,6 +10,12 @@ module WhopSDK
10
10
  # @return [String]
11
11
  required :id, String
12
12
 
13
+ # @!attribute company
14
+ # The company associated with the payout token
15
+ #
16
+ # @return [WhopSDK::Models::PayoutMethodListResponse::Company, nil]
17
+ required :company, -> { WhopSDK::Models::PayoutMethodListResponse::Company }, nil?: true
18
+
13
19
  # @!attribute currency
14
20
  # The currency code of the payout destination. This is the currency that payouts
15
21
  # will be made in for this token.
@@ -23,6 +29,12 @@ module WhopSDK
23
29
  # @return [WhopSDK::Models::PayoutMethodListResponse::Destination, nil]
24
30
  required :destination, -> { WhopSDK::Models::PayoutMethodListResponse::Destination }, nil?: true
25
31
 
32
+ # @!attribute is_default
33
+ # Whether this payout token is the default for the payout account
34
+ #
35
+ # @return [Boolean]
36
+ required :is_default, WhopSDK::Internal::Type::Boolean
37
+
26
38
  # @!attribute nickname
27
39
  # An optional nickname for the payout token to help the user identify it. This is
28
40
  # not used by the provider and is only for the user's reference.
@@ -30,7 +42,7 @@ module WhopSDK
30
42
  # @return [String, nil]
31
43
  required :nickname, String, nil?: true
32
44
 
33
- # @!method initialize(id:, currency:, destination:, nickname:)
45
+ # @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:)
34
46
  # Some parameter documentations has been truncated, see
35
47
  # {WhopSDK::Models::PayoutMethodListResponse} for more details.
36
48
  #
@@ -38,12 +50,30 @@ module WhopSDK
38
50
  #
39
51
  # @param id [String] The ID of the payout token
40
52
  #
53
+ # @param company [WhopSDK::Models::PayoutMethodListResponse::Company, nil] The company associated with the payout token
54
+ #
41
55
  # @param currency [String] The currency code of the payout destination. This is the currency that payouts w
42
56
  #
43
57
  # @param destination [WhopSDK::Models::PayoutMethodListResponse::Destination, nil] The payout destination associated with the payout token
44
58
  #
59
+ # @param is_default [Boolean] Whether this payout token is the default for the payout account
60
+ #
45
61
  # @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
46
62
 
63
+ # @see WhopSDK::Models::PayoutMethodListResponse#company
64
+ class Company < WhopSDK::Internal::Type::BaseModel
65
+ # @!attribute id
66
+ # The ID (tag) of the company.
67
+ #
68
+ # @return [String]
69
+ required :id, String
70
+
71
+ # @!method initialize(id:)
72
+ # The company associated with the payout token
73
+ #
74
+ # @param id [String] The ID (tag) of the company.
75
+ end
76
+
47
77
  # @see WhopSDK::Models::PayoutMethodListResponse#destination
48
78
  class Destination < WhopSDK::Internal::Type::BaseModel
49
79
  # @!attribute category
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::PayoutMethods#retrieve
6
+ class PayoutMethodRetrieveParams < 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,125 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::PayoutMethods#retrieve
6
+ class PayoutMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the payout token
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute company
14
+ # The company associated with the payout token
15
+ #
16
+ # @return [WhopSDK::Models::PayoutMethodRetrieveResponse::Company, nil]
17
+ required :company, -> { WhopSDK::Models::PayoutMethodRetrieveResponse::Company }, nil?: true
18
+
19
+ # @!attribute currency
20
+ # The currency code of the payout destination. This is the currency that payouts
21
+ # will be made in for this token.
22
+ #
23
+ # @return [String]
24
+ required :currency, String
25
+
26
+ # @!attribute destination
27
+ # The payout destination associated with the payout token
28
+ #
29
+ # @return [WhopSDK::Models::PayoutMethodRetrieveResponse::Destination, nil]
30
+ required :destination, -> { WhopSDK::Models::PayoutMethodRetrieveResponse::Destination }, nil?: true
31
+
32
+ # @!attribute is_default
33
+ # Whether this payout token is the default for the payout account
34
+ #
35
+ # @return [Boolean]
36
+ required :is_default, WhopSDK::Internal::Type::Boolean
37
+
38
+ # @!attribute nickname
39
+ # An optional nickname for the payout token to help the user identify it. This is
40
+ # not used by the provider and is only for the user's reference.
41
+ #
42
+ # @return [String, nil]
43
+ required :nickname, String, nil?: true
44
+
45
+ # @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:)
46
+ # Some parameter documentations has been truncated, see
47
+ # {WhopSDK::Models::PayoutMethodRetrieveResponse} for more details.
48
+ #
49
+ # An object representing an user's setup payout destination.
50
+ #
51
+ # @param id [String] The ID of the payout token
52
+ #
53
+ # @param company [WhopSDK::Models::PayoutMethodRetrieveResponse::Company, nil] The company associated with the payout token
54
+ #
55
+ # @param currency [String] The currency code of the payout destination. This is the currency that payouts w
56
+ #
57
+ # @param destination [WhopSDK::Models::PayoutMethodRetrieveResponse::Destination, nil] The payout destination associated with the payout token
58
+ #
59
+ # @param is_default [Boolean] Whether this payout token is the default for the payout account
60
+ #
61
+ # @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
62
+
63
+ # @see WhopSDK::Models::PayoutMethodRetrieveResponse#company
64
+ class Company < WhopSDK::Internal::Type::BaseModel
65
+ # @!attribute id
66
+ # The ID (tag) of the company.
67
+ #
68
+ # @return [String]
69
+ required :id, String
70
+
71
+ # @!method initialize(id:)
72
+ # The company associated with the payout token
73
+ #
74
+ # @param id [String] The ID (tag) of the company.
75
+ end
76
+
77
+ # @see WhopSDK::Models::PayoutMethodRetrieveResponse#destination
78
+ class Destination < WhopSDK::Internal::Type::BaseModel
79
+ # @!attribute category
80
+ # The category of the payout destination
81
+ #
82
+ # @return [Symbol, WhopSDK::Models::PayoutMethodRetrieveResponse::Destination::Category]
83
+ required :category, enum: -> { WhopSDK::Models::PayoutMethodRetrieveResponse::Destination::Category }
84
+
85
+ # @!attribute country_code
86
+ # The country code of the payout destination
87
+ #
88
+ # @return [String]
89
+ required :country_code, String
90
+
91
+ # @!attribute name
92
+ # The name of the payer associated with the payout destination
93
+ #
94
+ # @return [String]
95
+ required :name, String
96
+
97
+ # @!method initialize(category:, country_code:, name:)
98
+ # The payout destination associated with the payout token
99
+ #
100
+ # @param category [Symbol, WhopSDK::Models::PayoutMethodRetrieveResponse::Destination::Category] The category of the payout destination
101
+ #
102
+ # @param country_code [String] The country code of the payout destination
103
+ #
104
+ # @param name [String] The name of the payer associated with the payout destination
105
+
106
+ # The category of the payout destination
107
+ #
108
+ # @see WhopSDK::Models::PayoutMethodRetrieveResponse::Destination#category
109
+ module Category
110
+ extend WhopSDK::Internal::Type::Enum
111
+
112
+ CRYPTO = :crypto
113
+ RTP = :rtp
114
+ NEXT_DAY_BANK = :next_day_bank
115
+ BANK_WIRE = :bank_wire
116
+ DIGITAL_WALLET = :digital_wallet
117
+ UNKNOWN = :unknown
118
+
119
+ # @!method self.values
120
+ # @return [Array<Symbol>]
121
+ end
122
+ end
123
+ end
124
+ end
125
+ end
@@ -14,7 +14,7 @@ module WhopSDK
14
14
  required :company_id, String
15
15
 
16
16
  # @!attribute user_id
17
- # The ID of the user to create the support chat for
17
+ # The ID (user_xxx) or username of the user to create the support chat for
18
18
  #
19
19
  # @return [String]
20
20
  required :user_id, String
@@ -22,7 +22,7 @@ module WhopSDK
22
22
  # @!method initialize(company_id:, user_id:, request_options: {})
23
23
  # @param company_id [String] The ID of the company to create the support chat in
24
24
  #
25
- # @param user_id [String] The ID of the user to create the support chat for
25
+ # @param user_id [String] The ID (user_xxx) or username of the user to create the support chat for
26
26
  #
27
27
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
28
28
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Topups#create
6
+ class TopupCreateParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute amount
11
+ # The amount to add to the balance.
12
+ #
13
+ # @return [Float]
14
+ required :amount, Float
15
+
16
+ # @!attribute company_id
17
+ # The ID of the company to add funds to.
18
+ #
19
+ # @return [String]
20
+ required :company_id, String
21
+
22
+ # @!attribute currency
23
+ # The currency of the top-up.
24
+ #
25
+ # @return [Symbol, WhopSDK::Models::Currency]
26
+ required :currency, enum: -> { WhopSDK::Currency }
27
+
28
+ # @!attribute payment_method_id
29
+ # The ID of the payment method to charge for the top-up.
30
+ #
31
+ # @return [String]
32
+ required :payment_method_id, String
33
+
34
+ # @!method initialize(amount:, company_id:, currency:, payment_method_id:, request_options: {})
35
+ # @param amount [Float] The amount to add to the balance.
36
+ #
37
+ # @param company_id [String] The ID of the company to add funds to.
38
+ #
39
+ # @param currency [Symbol, WhopSDK::Models::Currency] The currency of the top-up.
40
+ #
41
+ # @param payment_method_id [String] The ID of the payment method to charge for the top-up.
42
+ #
43
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Topups#create
6
+ class TopupCreateResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The payment ID
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # The datetime the payment was created
15
+ #
16
+ # @return [Time]
17
+ required :created_at, Time
18
+
19
+ # @!attribute currency
20
+ # The available currencies on the platform
21
+ #
22
+ # @return [Symbol, WhopSDK::Models::Currency, nil]
23
+ required :currency, enum: -> { WhopSDK::Currency }, nil?: true
24
+
25
+ # @!attribute failure_message
26
+ # If the payment failed, the reason for the failure.
27
+ #
28
+ # @return [String, nil]
29
+ required :failure_message, String, nil?: true
30
+
31
+ # @!attribute paid_at
32
+ # The datetime the payment was paid
33
+ #
34
+ # @return [Time, nil]
35
+ required :paid_at, Time, nil?: true
36
+
37
+ # @!attribute status
38
+ # The status of a receipt
39
+ #
40
+ # @return [Symbol, WhopSDK::Models::ReceiptStatus, nil]
41
+ required :status, enum: -> { WhopSDK::ReceiptStatus }, nil?: true
42
+
43
+ # @!attribute total
44
+ # The total to show to the creator (excluding buyer fees).
45
+ #
46
+ # @return [Float, nil]
47
+ required :total, Float, nil?: true
48
+
49
+ # @!method initialize(id:, created_at:, currency:, failure_message:, paid_at:, status:, total:)
50
+ # An object representing a receipt for a membership.
51
+ #
52
+ # @param id [String] The payment ID
53
+ #
54
+ # @param created_at [Time] The datetime the payment was created
55
+ #
56
+ # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
57
+ #
58
+ # @param failure_message [String, nil] If the payment failed, the reason for the failure.
59
+ #
60
+ # @param paid_at [Time, nil] The datetime the payment was paid
61
+ #
62
+ # @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt
63
+ #
64
+ # @param total [Float, nil] The total to show to the creator (excluding buyer fees).
65
+ end
66
+ end
67
+ end
@@ -40,6 +40,10 @@ module WhopSDK
40
40
  variant :"course_lesson_interaction.completed",
41
41
  -> { WhopSDK::CourseLessonInteractionCompletedWebhookEvent }
42
42
 
43
+ variant :"payout_method.created", -> { WhopSDK::PayoutMethodCreatedWebhookEvent }
44
+
45
+ variant :"verification.succeeded", -> { WhopSDK::VerificationSucceededWebhookEvent }
46
+
43
47
  variant :"payment.created", -> { WhopSDK::PaymentCreatedWebhookEvent }
44
48
 
45
49
  variant :"payment.succeeded", -> { WhopSDK::PaymentSucceededWebhookEvent }
@@ -56,8 +60,11 @@ module WhopSDK
56
60
 
57
61
  variant :"refund.updated", -> { WhopSDK::RefundUpdatedWebhookEvent }
58
62
 
63
+ variant :"membership.cancel_at_period_end_changed",
64
+ -> { WhopSDK::MembershipCancelAtPeriodEndChangedWebhookEvent }
65
+
59
66
  # @!method self.variants
60
- # @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::WithdrawalCreatedWebhookEvent, WhopSDK::Models::WithdrawalUpdatedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentCreatedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
67
+ # @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::WithdrawalCreatedWebhookEvent, WhopSDK::Models::WithdrawalUpdatedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PayoutMethodCreatedWebhookEvent, WhopSDK::Models::VerificationSucceededWebhookEvent, WhopSDK::Models::PaymentCreatedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent, WhopSDK::Models::MembershipCancelAtPeriodEndChangedWebhookEvent)]
61
68
  end
62
69
  end
63
70
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Verifications#retrieve
6
+ class VerificationRetrieveParams < 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,99 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Verifications#retrieve
6
+ class VerificationRetrieveResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # A unique identifier for the verification.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute last_error_code
14
+ # An error code for a verification attempt.
15
+ #
16
+ # @return [Symbol, WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode, nil]
17
+ required :last_error_code,
18
+ enum: -> { WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode },
19
+ nil?: true
20
+
21
+ # @!attribute last_error_reason
22
+ # The last error reason that occurred during the verification.
23
+ #
24
+ # @return [String, nil]
25
+ required :last_error_reason, String, nil?: true
26
+
27
+ # @!attribute status
28
+ # The status of the verification.
29
+ #
30
+ # @return [Symbol, WhopSDK::Models::VerificationRetrieveResponse::Status]
31
+ required :status, enum: -> { WhopSDK::Models::VerificationRetrieveResponse::Status }
32
+
33
+ # @!method initialize(id:, last_error_code:, last_error_reason:, status:)
34
+ # An object representing an identity verification session
35
+ #
36
+ # @param id [String] A unique identifier for the verification.
37
+ #
38
+ # @param last_error_code [Symbol, WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode, nil] An error code for a verification attempt.
39
+ #
40
+ # @param last_error_reason [String, nil] The last error reason that occurred during the verification.
41
+ #
42
+ # @param status [Symbol, WhopSDK::Models::VerificationRetrieveResponse::Status] The status of the verification.
43
+
44
+ # An error code for a verification attempt.
45
+ #
46
+ # @see WhopSDK::Models::VerificationRetrieveResponse#last_error_code
47
+ module LastErrorCode
48
+ extend WhopSDK::Internal::Type::Enum
49
+
50
+ ABANDONED = :abandoned
51
+ CONSENT_DECLINED = :consent_declined
52
+ COUNTRY_NOT_SUPPORTED = :country_not_supported
53
+ DEVICE_NOT_SUPPORTED = :device_not_supported
54
+ DOCUMENT_EXPIRED = :document_expired
55
+ DOCUMENT_TYPE_NOT_SUPPORTED = :document_type_not_supported
56
+ DOCUMENT_UNVERIFIED_OTHER = :document_unverified_other
57
+ EMAIL_UNVERIFIED_OTHER = :email_unverified_other
58
+ EMAIL_VERIFICATION_DECLINED = :email_verification_declined
59
+ ID_NUMBER_INSUFFICIENT_DOCUMENT_DATA = :id_number_insufficient_document_data
60
+ ID_NUMBER_MISMATCH = :id_number_mismatch
61
+ ID_NUMBER_UNVERIFIED_OTHER = :id_number_unverified_other
62
+ PHONE_UNVERIFIED_OTHER = :phone_unverified_other
63
+ PHONE_VERIFICATION_DECLINED = :phone_verification_declined
64
+ SELFIE_DOCUMENT_MISSING_PHOTO = :selfie_document_missing_photo
65
+ SELFIE_FACE_MISMATCH = :selfie_face_mismatch
66
+ SELFIE_MANIPULATED = :selfie_manipulated
67
+ SELFIE_UNVERIFIED_OTHER = :selfie_unverified_other
68
+ UNDER_SUPPORTED_AGE = :under_supported_age
69
+
70
+ # @!method self.values
71
+ # @return [Array<Symbol>]
72
+ end
73
+
74
+ # The status of the verification.
75
+ #
76
+ # @see WhopSDK::Models::VerificationRetrieveResponse#status
77
+ module Status
78
+ extend WhopSDK::Internal::Type::Enum
79
+
80
+ REQUIRES_INPUT = :requires_input
81
+ PROCESSING = :processing
82
+ VERIFIED = :verified
83
+ CANCELED = :canceled
84
+ CREATED = :created
85
+ STARTED = :started
86
+ SUBMITTED = :submitted
87
+ APPROVED = :approved
88
+ DECLINED = :declined
89
+ RESUBMISSION_REQUESTED = :resubmission_requested
90
+ EXPIRED = :expired
91
+ ABANDONED = :abandoned
92
+ REVIEW = :review
93
+
94
+ # @!method self.values
95
+ # @return [Array<Symbol>]
96
+ end
97
+ end
98
+ end
99
+ end