whop_sdk 0.0.9 → 0.0.11

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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +8 -0
  5. data/lib/whop_sdk/internal/type/union.rb +12 -0
  6. data/lib/whop_sdk/models/app_build_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/invoice_create_params.rb +10 -1
  8. data/lib/whop_sdk/models/payment.rb +88 -1
  9. data/lib/whop_sdk/models/payment_create_params.rb +307 -0
  10. data/lib/whop_sdk/models/payment_list_response.rb +88 -1
  11. data/lib/whop_sdk/models/payment_method_list_params.rb +78 -0
  12. data/lib/whop_sdk/models/payment_method_list_response.rb +85 -0
  13. data/lib/whop_sdk/models/payment_method_retrieve_params.rb +22 -0
  14. data/lib/whop_sdk/models/payment_method_retrieve_response.rb +85 -0
  15. data/lib/whop_sdk/models/setup_intent.rb +251 -0
  16. data/lib/whop_sdk/models/setup_intent_canceled_webhook_event.rb +52 -0
  17. data/lib/whop_sdk/models/setup_intent_list_params.rb +78 -0
  18. data/lib/whop_sdk/models/setup_intent_list_response.rb +253 -0
  19. data/lib/whop_sdk/models/setup_intent_requires_action_webhook_event.rb +52 -0
  20. data/lib/whop_sdk/models/setup_intent_retrieve_params.rb +14 -0
  21. data/lib/whop_sdk/models/setup_intent_status.rb +18 -0
  22. data/lib/whop_sdk/models/setup_intent_succeeded_webhook_event.rb +52 -0
  23. data/lib/whop_sdk/models/unwrap_webhook_event.rb +28 -19
  24. data/lib/whop_sdk/models.rb +20 -0
  25. data/lib/whop_sdk/resources/app_builds.rb +3 -1
  26. data/lib/whop_sdk/resources/invoices.rb +3 -1
  27. data/lib/whop_sdk/resources/payment_methods.rb +91 -0
  28. data/lib/whop_sdk/resources/payments.rb +50 -0
  29. data/lib/whop_sdk/resources/setup_intents.rb +91 -0
  30. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  31. data/lib/whop_sdk/version.rb +1 -1
  32. data/lib/whop_sdk.rb +15 -0
  33. data/rbi/whop_sdk/client.rbi +6 -0
  34. data/rbi/whop_sdk/models/app_build_create_params.rbi +8 -0
  35. data/rbi/whop_sdk/models/invoice_create_params.rbi +10 -0
  36. data/rbi/whop_sdk/models/payment.rbi +139 -0
  37. data/rbi/whop_sdk/models/payment_create_params.rbi +384 -0
  38. data/rbi/whop_sdk/models/payment_list_response.rbi +164 -0
  39. data/rbi/whop_sdk/models/payment_method_list_params.rbi +99 -0
  40. data/rbi/whop_sdk/models/payment_method_list_response.rbi +137 -0
  41. data/rbi/whop_sdk/models/payment_method_retrieve_params.rbi +43 -0
  42. data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +142 -0
  43. data/rbi/whop_sdk/models/setup_intent.rbi +410 -0
  44. data/rbi/whop_sdk/models/setup_intent_canceled_webhook_event.rbi +77 -0
  45. data/rbi/whop_sdk/models/setup_intent_list_params.rbi +99 -0
  46. data/rbi/whop_sdk/models/setup_intent_list_response.rbi +491 -0
  47. data/rbi/whop_sdk/models/setup_intent_requires_action_webhook_event.rbi +77 -0
  48. data/rbi/whop_sdk/models/setup_intent_retrieve_params.rbi +27 -0
  49. data/rbi/whop_sdk/models/setup_intent_status.rbi +25 -0
  50. data/rbi/whop_sdk/models/setup_intent_succeeded_webhook_event.rbi +77 -0
  51. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -0
  52. data/rbi/whop_sdk/models.rbi +23 -0
  53. data/rbi/whop_sdk/resources/app_builds.rbi +3 -0
  54. data/rbi/whop_sdk/resources/invoices.rbi +4 -0
  55. data/rbi/whop_sdk/resources/payment_methods.rbi +84 -0
  56. data/rbi/whop_sdk/resources/payments.rbi +44 -0
  57. data/rbi/whop_sdk/resources/setup_intents.rbi +85 -0
  58. data/rbi/whop_sdk/resources/webhooks.rbi +3 -0
  59. data/sig/whop_sdk/client.rbs +4 -0
  60. data/sig/whop_sdk/models/app_build_create_params.rbs +5 -0
  61. data/sig/whop_sdk/models/invoice_create_params.rbs +5 -0
  62. data/sig/whop_sdk/models/payment.rbs +69 -0
  63. data/sig/whop_sdk/models/payment_create_params.rbs +210 -0
  64. data/sig/whop_sdk/models/payment_list_response.rbs +69 -0
  65. data/sig/whop_sdk/models/payment_method_list_params.rbs +61 -0
  66. data/sig/whop_sdk/models/payment_method_list_response.rbs +67 -0
  67. data/sig/whop_sdk/models/payment_method_retrieve_params.rbs +23 -0
  68. data/sig/whop_sdk/models/payment_method_retrieve_response.rbs +67 -0
  69. data/sig/whop_sdk/models/setup_intent.rbs +189 -0
  70. data/sig/whop_sdk/models/setup_intent_canceled_webhook_event.rbs +40 -0
  71. data/sig/whop_sdk/models/setup_intent_list_params.rbs +61 -0
  72. data/sig/whop_sdk/models/setup_intent_list_response.rbs +193 -0
  73. data/sig/whop_sdk/models/setup_intent_requires_action_webhook_event.rbs +40 -0
  74. data/sig/whop_sdk/models/setup_intent_retrieve_params.rbs +15 -0
  75. data/sig/whop_sdk/models/setup_intent_status.rbs +17 -0
  76. data/sig/whop_sdk/models/setup_intent_succeeded_webhook_event.rbs +40 -0
  77. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
  78. data/sig/whop_sdk/models.rbs +20 -0
  79. data/sig/whop_sdk/resources/app_builds.rbs +1 -0
  80. data/sig/whop_sdk/resources/invoices.rbs +1 -0
  81. data/sig/whop_sdk/resources/payment_methods.rbs +25 -0
  82. data/sig/whop_sdk/resources/payments.rbs +9 -0
  83. data/sig/whop_sdk/resources/setup_intents.rbs +24 -0
  84. data/sig/whop_sdk/resources/webhooks.rbs +3 -0
  85. metadata +47 -2
@@ -0,0 +1,78 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::SetupIntents#list
6
+ class SetupIntentListParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute company_id
11
+ # The ID of the company to list setup intents for
12
+ #
13
+ # @return [String]
14
+ required :company_id, String
15
+
16
+ # @!attribute after
17
+ # Returns the elements in the list that come after the specified cursor.
18
+ #
19
+ # @return [String, nil]
20
+ optional :after, String, nil?: true
21
+
22
+ # @!attribute before
23
+ # Returns the elements in the list that come before the specified cursor.
24
+ #
25
+ # @return [String, nil]
26
+ optional :before, String, nil?: true
27
+
28
+ # @!attribute created_after
29
+ # The minimum creation date to filter by
30
+ #
31
+ # @return [Time, nil]
32
+ optional :created_after, Time, nil?: true
33
+
34
+ # @!attribute created_before
35
+ # The maximum creation date to filter by
36
+ #
37
+ # @return [Time, nil]
38
+ optional :created_before, Time, nil?: true
39
+
40
+ # @!attribute direction
41
+ # The direction of the sort.
42
+ #
43
+ # @return [Symbol, WhopSDK::Models::Direction, nil]
44
+ optional :direction, enum: -> { WhopSDK::Direction }, nil?: true
45
+
46
+ # @!attribute first
47
+ # Returns the first _n_ elements from the list.
48
+ #
49
+ # @return [Integer, nil]
50
+ optional :first, Integer, nil?: true
51
+
52
+ # @!attribute last
53
+ # Returns the last _n_ elements from the list.
54
+ #
55
+ # @return [Integer, nil]
56
+ optional :last, Integer, nil?: true
57
+
58
+ # @!method initialize(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
59
+ # @param company_id [String] The ID of the company to list setup intents for
60
+ #
61
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
62
+ #
63
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
64
+ #
65
+ # @param created_after [Time, nil] The minimum creation date to filter by
66
+ #
67
+ # @param created_before [Time, nil] The maximum creation date to filter by
68
+ #
69
+ # @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
70
+ #
71
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
72
+ #
73
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
74
+ #
75
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,253 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::SetupIntents#list
6
+ class SetupIntentListResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The setup intent ID
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute checkout_configuration
14
+ # The checkout configuration associated with the setup intent
15
+ #
16
+ # @return [WhopSDK::Models::SetupIntentListResponse::CheckoutConfiguration, nil]
17
+ required :checkout_configuration,
18
+ -> { WhopSDK::Models::SetupIntentListResponse::CheckoutConfiguration },
19
+ nil?: true
20
+
21
+ # @!attribute company
22
+ # The company of the setup intent
23
+ #
24
+ # @return [WhopSDK::Models::SetupIntentListResponse::Company, nil]
25
+ required :company, -> { WhopSDK::Models::SetupIntentListResponse::Company }, nil?: true
26
+
27
+ # @!attribute created_at
28
+ # The datetime the payment was created
29
+ #
30
+ # @return [Time]
31
+ required :created_at, Time
32
+
33
+ # @!attribute error_message
34
+ # The error message, if any.
35
+ #
36
+ # @return [String, nil]
37
+ required :error_message, String, nil?: true
38
+
39
+ # @!attribute member
40
+ # The member connected to the setup intent
41
+ #
42
+ # @return [WhopSDK::Models::SetupIntentListResponse::Member, nil]
43
+ required :member, -> { WhopSDK::Models::SetupIntentListResponse::Member }, nil?: true
44
+
45
+ # @!attribute metadata
46
+ # The metadata associated with the setup intent
47
+ #
48
+ # @return [Hash{Symbol=>Object}, nil]
49
+ required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
50
+
51
+ # @!attribute payment_method
52
+ # The payment method created during the setup, if available.
53
+ #
54
+ # @return [WhopSDK::Models::SetupIntentListResponse::PaymentMethod, nil]
55
+ required :payment_method, -> { WhopSDK::Models::SetupIntentListResponse::PaymentMethod }, nil?: true
56
+
57
+ # @!attribute status
58
+ # The status of the setup intent
59
+ #
60
+ # @return [Symbol, WhopSDK::Models::SetupIntentStatus]
61
+ required :status, enum: -> { WhopSDK::SetupIntentStatus }
62
+
63
+ # @!method initialize(id:, checkout_configuration:, company:, created_at:, error_message:, member:, metadata:, payment_method:, status:)
64
+ # An object representing a setup intent, which is a flow for allowing a customer
65
+ # to add a payment method to their account without making a purchase.
66
+ #
67
+ # @param id [String] The setup intent ID
68
+ #
69
+ # @param checkout_configuration [WhopSDK::Models::SetupIntentListResponse::CheckoutConfiguration, nil] The checkout configuration associated with the setup intent
70
+ #
71
+ # @param company [WhopSDK::Models::SetupIntentListResponse::Company, nil] The company of the setup intent
72
+ #
73
+ # @param created_at [Time] The datetime the payment was created
74
+ #
75
+ # @param error_message [String, nil] The error message, if any.
76
+ #
77
+ # @param member [WhopSDK::Models::SetupIntentListResponse::Member, nil] The member connected to the setup intent
78
+ #
79
+ # @param metadata [Hash{Symbol=>Object}, nil] The metadata associated with the setup intent
80
+ #
81
+ # @param payment_method [WhopSDK::Models::SetupIntentListResponse::PaymentMethod, nil] The payment method created during the setup, if available.
82
+ #
83
+ # @param status [Symbol, WhopSDK::Models::SetupIntentStatus] The status of the setup intent
84
+
85
+ # @see WhopSDK::Models::SetupIntentListResponse#checkout_configuration
86
+ class CheckoutConfiguration < WhopSDK::Internal::Type::BaseModel
87
+ # @!attribute id
88
+ # The ID of the checkout configuration
89
+ #
90
+ # @return [String]
91
+ required :id, String
92
+
93
+ # @!method initialize(id:)
94
+ # The checkout configuration associated with the setup intent
95
+ #
96
+ # @param id [String] The ID of the checkout configuration
97
+ end
98
+
99
+ # @see WhopSDK::Models::SetupIntentListResponse#company
100
+ class Company < WhopSDK::Internal::Type::BaseModel
101
+ # @!attribute id
102
+ # The ID (tag) of the company.
103
+ #
104
+ # @return [String]
105
+ required :id, String
106
+
107
+ # @!method initialize(id:)
108
+ # The company of the setup intent
109
+ #
110
+ # @param id [String] The ID (tag) of the company.
111
+ end
112
+
113
+ # @see WhopSDK::Models::SetupIntentListResponse#member
114
+ class Member < WhopSDK::Internal::Type::BaseModel
115
+ # @!attribute id
116
+ # The ID of the member
117
+ #
118
+ # @return [String]
119
+ required :id, String
120
+
121
+ # @!attribute user
122
+ # The user for this member, if any.
123
+ #
124
+ # @return [WhopSDK::Models::SetupIntentListResponse::Member::User, nil]
125
+ required :user, -> { WhopSDK::Models::SetupIntentListResponse::Member::User }, nil?: true
126
+
127
+ # @!method initialize(id:, user:)
128
+ # The member connected to the setup intent
129
+ #
130
+ # @param id [String] The ID of the member
131
+ #
132
+ # @param user [WhopSDK::Models::SetupIntentListResponse::Member::User, nil] The user for this member, if any.
133
+
134
+ # @see WhopSDK::Models::SetupIntentListResponse::Member#user
135
+ class User < WhopSDK::Internal::Type::BaseModel
136
+ # @!attribute id
137
+ # The internal ID of the user account.
138
+ #
139
+ # @return [String]
140
+ required :id, String
141
+
142
+ # @!attribute email
143
+ # The digital mailing address of the user.
144
+ #
145
+ # @return [String, nil]
146
+ required :email, String, nil?: true
147
+
148
+ # @!attribute name
149
+ # The user's full name.
150
+ #
151
+ # @return [String, nil]
152
+ required :name, String, nil?: true
153
+
154
+ # @!attribute username
155
+ # The whop username.
156
+ #
157
+ # @return [String]
158
+ required :username, String
159
+
160
+ # @!method initialize(id:, email:, name:, username:)
161
+ # The user for this member, if any.
162
+ #
163
+ # @param id [String] The internal ID of the user account.
164
+ #
165
+ # @param email [String, nil] The digital mailing address of the user.
166
+ #
167
+ # @param name [String, nil] The user's full name.
168
+ #
169
+ # @param username [String] The whop username.
170
+ end
171
+ end
172
+
173
+ # @see WhopSDK::Models::SetupIntentListResponse#payment_method
174
+ class PaymentMethod < WhopSDK::Internal::Type::BaseModel
175
+ # @!attribute id
176
+ # The ID of the payment method
177
+ #
178
+ # @return [String]
179
+ required :id, String
180
+
181
+ # @!attribute card
182
+ # The card data associated with the payment method, if its a debit or credit card.
183
+ #
184
+ # @return [WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card, nil]
185
+ required :card, -> { WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card }, nil?: true
186
+
187
+ # @!attribute created_at
188
+ # The date and time the payment method was created
189
+ #
190
+ # @return [Time]
191
+ required :created_at, Time
192
+
193
+ # @!attribute payment_method_type
194
+ # The payment method type of the payment method
195
+ #
196
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
197
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
198
+
199
+ # @!method initialize(id:, card:, created_at:, payment_method_type:)
200
+ # Some parameter documentations has been truncated, see
201
+ # {WhopSDK::Models::SetupIntentListResponse::PaymentMethod} for more details.
202
+ #
203
+ # The payment method created during the setup, if available.
204
+ #
205
+ # @param id [String] The ID of the payment method
206
+ #
207
+ # @param card [WhopSDK::Models::SetupIntentListResponse::PaymentMethod::Card, nil] The card data associated with the payment method, if its a debit or credit card.
208
+ #
209
+ # @param created_at [Time] The date and time the payment method was created
210
+ #
211
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
212
+
213
+ # @see WhopSDK::Models::SetupIntentListResponse::PaymentMethod#card
214
+ class Card < WhopSDK::Internal::Type::BaseModel
215
+ # @!attribute brand
216
+ # Possible card brands that a payment token can have
217
+ #
218
+ # @return [Symbol, WhopSDK::Models::CardBrands, nil]
219
+ required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
220
+
221
+ # @!attribute exp_month
222
+ # Card expiration month, like 03 for March.
223
+ #
224
+ # @return [Integer, nil]
225
+ required :exp_month, Integer, nil?: true
226
+
227
+ # @!attribute exp_year
228
+ # Card expiration year, like 27 for 2027.
229
+ #
230
+ # @return [Integer, nil]
231
+ required :exp_year, Integer, nil?: true
232
+
233
+ # @!attribute last4
234
+ # Last four digits of the card.
235
+ #
236
+ # @return [String, nil]
237
+ required :last4, String, nil?: true
238
+
239
+ # @!method initialize(brand:, exp_month:, exp_year:, last4:)
240
+ # The card data associated with the payment method, if its a debit or credit card.
241
+ #
242
+ # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
243
+ #
244
+ # @param exp_month [Integer, nil] Card expiration month, like 03 for March.
245
+ #
246
+ # @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
247
+ #
248
+ # @param last4 [String, nil] Last four digits of the card.
249
+ end
250
+ end
251
+ end
252
+ end
253
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class SetupIntentRequiresActionWebhookEvent < 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 a setup intent, which is a flow for allowing a customer
20
+ # to add a payment method to their account without making a purchase.
21
+ #
22
+ # @return [WhopSDK::Models::SetupIntent]
23
+ required :data, -> { WhopSDK::SetupIntent }
24
+
25
+ # @!attribute timestamp
26
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
27
+ #
28
+ # @return [Time]
29
+ required :timestamp, Time
30
+
31
+ # @!attribute type
32
+ # The webhook event type
33
+ #
34
+ # @return [Symbol, :"setup_intent.requires_action"]
35
+ required :type, const: :"setup_intent.requires_action"
36
+
37
+ # @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"setup_intent.requires_action")
38
+ # Some parameter documentations has been truncated, see
39
+ # {WhopSDK::Models::SetupIntentRequiresActionWebhookEvent} for more details.
40
+ #
41
+ # @param id [String] A unique ID for every single webhook request
42
+ #
43
+ # @param data [WhopSDK::Models::SetupIntent] An object representing a setup intent, which is a flow for allowing a customer t
44
+ #
45
+ # @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
46
+ #
47
+ # @param api_version [Symbol, :v1] The API version for this webhook
48
+ #
49
+ # @param type [Symbol, :"setup_intent.requires_action"] The webhook event type
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::SetupIntents#retrieve
6
+ class SetupIntentRetrieveParams < 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,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The status of the setup intent.
6
+ module SetupIntentStatus
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ PROCESSING = :processing
10
+ SUCCEEDED = :succeeded
11
+ CANCELED = :canceled
12
+ REQUIRES_ACTION = :requires_action
13
+
14
+ # @!method self.values
15
+ # @return [Array<Symbol>]
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class SetupIntentSucceededWebhookEvent < 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 a setup intent, which is a flow for allowing a customer
20
+ # to add a payment method to their account without making a purchase.
21
+ #
22
+ # @return [WhopSDK::Models::SetupIntent]
23
+ required :data, -> { WhopSDK::SetupIntent }
24
+
25
+ # @!attribute timestamp
26
+ # The timestamp in ISO 8601 format that the webhook was sent at on the server
27
+ #
28
+ # @return [Time]
29
+ required :timestamp, Time
30
+
31
+ # @!attribute type
32
+ # The webhook event type
33
+ #
34
+ # @return [Symbol, :"setup_intent.succeeded"]
35
+ required :type, const: :"setup_intent.succeeded"
36
+
37
+ # @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"setup_intent.succeeded")
38
+ # Some parameter documentations has been truncated, see
39
+ # {WhopSDK::Models::SetupIntentSucceededWebhookEvent} for more details.
40
+ #
41
+ # @param id [String] A unique ID for every single webhook request
42
+ #
43
+ # @param data [WhopSDK::Models::SetupIntent] An object representing a setup intent, which is a flow for allowing a customer t
44
+ #
45
+ # @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
46
+ #
47
+ # @param api_version [Symbol, :v1] The API version for this webhook
48
+ #
49
+ # @param type [Symbol, :"setup_intent.succeeded"] The webhook event type
50
+ end
51
+ end
52
+ end
@@ -5,44 +5,53 @@ module WhopSDK
5
5
  module UnwrapWebhookEvent
6
6
  extend WhopSDK::Internal::Type::Union
7
7
 
8
- variant -> { WhopSDK::InvoiceCreatedWebhookEvent }
8
+ discriminator :type
9
9
 
10
- variant -> { WhopSDK::InvoicePaidWebhookEvent }
10
+ variant :"invoice.created", -> { WhopSDK::InvoiceCreatedWebhookEvent }
11
11
 
12
- variant -> { WhopSDK::InvoicePastDueWebhookEvent }
12
+ variant :"invoice.paid", -> { WhopSDK::InvoicePaidWebhookEvent }
13
13
 
14
- variant -> { WhopSDK::InvoiceVoidedWebhookEvent }
14
+ variant :"invoice.past_due", -> { WhopSDK::InvoicePastDueWebhookEvent }
15
15
 
16
- variant -> { WhopSDK::MembershipActivatedWebhookEvent }
16
+ variant :"invoice.voided", -> { WhopSDK::InvoiceVoidedWebhookEvent }
17
17
 
18
- variant -> { WhopSDK::MembershipDeactivatedWebhookEvent }
18
+ variant :"membership.activated", -> { WhopSDK::MembershipActivatedWebhookEvent }
19
19
 
20
- variant -> { WhopSDK::EntryCreatedWebhookEvent }
20
+ variant :"membership.deactivated", -> { WhopSDK::MembershipDeactivatedWebhookEvent }
21
21
 
22
- variant -> { WhopSDK::EntryApprovedWebhookEvent }
22
+ variant :"entry.created", -> { WhopSDK::EntryCreatedWebhookEvent }
23
23
 
24
- variant -> { WhopSDK::EntryDeniedWebhookEvent }
24
+ variant :"entry.approved", -> { WhopSDK::EntryApprovedWebhookEvent }
25
25
 
26
- variant -> { WhopSDK::EntryDeletedWebhookEvent }
26
+ variant :"entry.denied", -> { WhopSDK::EntryDeniedWebhookEvent }
27
27
 
28
- variant -> { WhopSDK::CourseLessonInteractionCompletedWebhookEvent }
28
+ variant :"entry.deleted", -> { WhopSDK::EntryDeletedWebhookEvent }
29
29
 
30
- variant -> { WhopSDK::PaymentSucceededWebhookEvent }
30
+ variant :"setup_intent.requires_action", -> { WhopSDK::SetupIntentRequiresActionWebhookEvent }
31
31
 
32
- variant -> { WhopSDK::PaymentFailedWebhookEvent }
32
+ variant :"setup_intent.succeeded", -> { WhopSDK::SetupIntentSucceededWebhookEvent }
33
33
 
34
- variant -> { WhopSDK::PaymentPendingWebhookEvent }
34
+ variant :"setup_intent.canceled", -> { WhopSDK::SetupIntentCanceledWebhookEvent }
35
35
 
36
- variant -> { WhopSDK::DisputeCreatedWebhookEvent }
36
+ variant :"course_lesson_interaction.completed",
37
+ -> { WhopSDK::CourseLessonInteractionCompletedWebhookEvent }
37
38
 
38
- variant -> { WhopSDK::DisputeUpdatedWebhookEvent }
39
+ variant :"payment.succeeded", -> { WhopSDK::PaymentSucceededWebhookEvent }
39
40
 
40
- variant -> { WhopSDK::RefundCreatedWebhookEvent }
41
+ variant :"payment.failed", -> { WhopSDK::PaymentFailedWebhookEvent }
41
42
 
42
- variant -> { WhopSDK::RefundUpdatedWebhookEvent }
43
+ variant :"payment.pending", -> { WhopSDK::PaymentPendingWebhookEvent }
44
+
45
+ variant :"dispute.created", -> { WhopSDK::DisputeCreatedWebhookEvent }
46
+
47
+ variant :"dispute.updated", -> { WhopSDK::DisputeUpdatedWebhookEvent }
48
+
49
+ variant :"refund.created", -> { WhopSDK::RefundCreatedWebhookEvent }
50
+
51
+ variant :"refund.updated", -> { WhopSDK::RefundUpdatedWebhookEvent }
43
52
 
44
53
  # @!method self.variants
45
- # @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::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
54
+ # @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::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
46
55
  end
47
56
  end
48
57
  end
@@ -344,10 +344,16 @@ module WhopSDK
344
344
 
345
345
  Payment = WhopSDK::Models::Payment
346
346
 
347
+ PaymentCreateParams = WhopSDK::Models::PaymentCreateParams
348
+
347
349
  PaymentFailedWebhookEvent = WhopSDK::Models::PaymentFailedWebhookEvent
348
350
 
349
351
  PaymentListParams = WhopSDK::Models::PaymentListParams
350
352
 
353
+ PaymentMethodListParams = WhopSDK::Models::PaymentMethodListParams
354
+
355
+ PaymentMethodRetrieveParams = WhopSDK::Models::PaymentMethodRetrieveParams
356
+
351
357
  PaymentMethodTypes = WhopSDK::Models::PaymentMethodTypes
352
358
 
353
359
  PaymentPendingWebhookEvent = WhopSDK::Models::PaymentPendingWebhookEvent
@@ -440,6 +446,20 @@ module WhopSDK
440
446
 
441
447
  ReviewStatus = WhopSDK::Models::ReviewStatus
442
448
 
449
+ SetupIntent = WhopSDK::Models::SetupIntent
450
+
451
+ SetupIntentCanceledWebhookEvent = WhopSDK::Models::SetupIntentCanceledWebhookEvent
452
+
453
+ SetupIntentListParams = WhopSDK::Models::SetupIntentListParams
454
+
455
+ SetupIntentRequiresActionWebhookEvent = WhopSDK::Models::SetupIntentRequiresActionWebhookEvent
456
+
457
+ SetupIntentRetrieveParams = WhopSDK::Models::SetupIntentRetrieveParams
458
+
459
+ SetupIntentStatus = WhopSDK::Models::SetupIntentStatus
460
+
461
+ SetupIntentSucceededWebhookEvent = WhopSDK::Models::SetupIntentSucceededWebhookEvent
462
+
443
463
  Shipment = WhopSDK::Models::Shipment
444
464
 
445
465
  ShipmentCarrier = WhopSDK::Models::ShipmentCarrier
@@ -12,7 +12,7 @@ module WhopSDK
12
12
  #
13
13
  # - `developer:manage_builds`
14
14
  #
15
- # @overload create(attachment:, checksum:, platform:, app_id: nil, supported_app_view_types: nil, request_options: {})
15
+ # @overload create(attachment:, checksum:, platform:, ai_prompt_id: nil, app_id: nil, supported_app_view_types: nil, request_options: {})
16
16
  #
17
17
  # @param attachment [WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::AppBuildCreateParams::Attachment::AttachmentInputWithID] Attachment input for the app build file. This should be an upload in .zip format
18
18
  #
@@ -20,6 +20,8 @@ module WhopSDK
20
20
  #
21
21
  # @param platform [Symbol, WhopSDK::Models::AppBuildPlatforms] The platform of the app build (ios, android, web)
22
22
  #
23
+ # @param ai_prompt_id [String, nil] The id of the ai prompt that created this build
24
+ #
23
25
  # @param app_id [String, nil] The ID of the app to create a build for. By default the current app from the api
24
26
  #
25
27
  # @param supported_app_view_types [Array<Symbol, WhopSDK::Models::AppViewType>, nil] Supported app view types for the app build. A build can specify multiple view ty
@@ -13,7 +13,7 @@ module WhopSDK
13
13
  # - `invoice:create`
14
14
  # - `plan:basic:read`
15
15
  #
16
- # @overload create(collection_method:, company_id:, due_date:, member_id:, plan:, product:, email_address:, product_id:, charge_buyer_fee: nil, customer_name: nil, payment_token_id: nil, request_options: {})
16
+ # @overload create(collection_method:, company_id:, due_date:, member_id:, plan:, product:, email_address:, product_id:, charge_buyer_fee: nil, customer_name: nil, payment_method_id: nil, payment_token_id: nil, request_options: {})
17
17
  #
18
18
  # @param collection_method [Symbol, WhopSDK::Models::CollectionMethod] The method of collection for this invoice. If using charge_automatically, you mu
19
19
  #
@@ -35,6 +35,8 @@ module WhopSDK
35
35
  #
36
36
  # @param customer_name [String, nil] The name of the customer to create this invoice for. This is required if you wan
37
37
  #
38
+ # @param payment_method_id [String, nil] The payment method ID to use for this invoice. If using charge_automatically, yo
39
+ #
38
40
  # @param payment_token_id [String, nil] The payment token ID to use for this invoice. If using charge_automatically, you
39
41
  #
40
42
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]