whop_sdk 0.0.18 → 0.0.20
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +1 -1
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +11 -1
- data/lib/whop_sdk/models/company_create_params.rb +17 -1
- data/lib/whop_sdk/models/company_update_params.rb +17 -1
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +31 -2
- data/lib/whop_sdk/models/payment_created_webhook_event.rb +48 -0
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +3 -1
- data/lib/whop_sdk/models.rb +2 -0
- data/lib/whop_sdk/resources/companies.rb +10 -2
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +1 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +12 -0
- data/rbi/whop_sdk/models/company_create_params.rbi +16 -0
- data/rbi/whop_sdk/models/company_update_params.rbi +16 -0
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +29 -3
- data/rbi/whop_sdk/models/payment_created_webhook_event.rbi +72 -0
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +1 -0
- data/rbi/whop_sdk/models.rbi +2 -0
- data/rbi/whop_sdk/resources/companies.rbi +12 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +1 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- data/sig/whop_sdk/models/company_create_params.rbs +10 -0
- data/sig/whop_sdk/models/company_update_params.rbs +10 -0
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +23 -4
- data/sig/whop_sdk/models/payment_created_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +1 -0
- data/sig/whop_sdk/models.rbs +2 -0
- data/sig/whop_sdk/resources/companies.rbs +4 -0
- data/sig/whop_sdk/resources/webhooks.rbs +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d32dcd76f73b594a7fb102d804def660554a926905cf81c5ad81a2835721a71
|
|
4
|
+
data.tar.gz: 0b65615f3d8e3eaf643936cae943966f0351d2728d0882fbafa16ea33cd0c9f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2a29382fe7f2ab33548b34e2ce073daf549a99081e436b5e985fdd5b10357918f81f995f58c468ea22897ecb8672384f112d53922a06b1a3930915d7b57eac4
|
|
7
|
+
data.tar.gz: 74cb5af4f78fc63f224055e5059b6470f94aff83886ff98307312d10a0efc3be3ac3c1b29a609c25e159dae0a6de5ba2db25bbfac3ac4367c5cc653f05222cb8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.20 (2025-12-16)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.0.19...v0.0.20](https://github.com/whopio/whopsdk-ruby/compare/v0.0.19...v0.0.20)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([907710a](https://github.com/whopio/whopsdk-ruby/commit/907710abe24bd19573fc51acbe7ebde1afa223c8))
|
|
10
|
+
* **api:** api update ([5f45e44](https://github.com/whopio/whopsdk-ruby/commit/5f45e44697df33e7ece56d767569e4d2b7a32c91))
|
|
11
|
+
* **api:** api update ([40ea3a3](https://github.com/whopio/whopsdk-ruby/commit/40ea3a3baaf83a71c700b700cd3b2bc701616233))
|
|
12
|
+
|
|
13
|
+
## 0.0.19 (2025-12-12)
|
|
14
|
+
|
|
15
|
+
Full Changelog: [v0.0.18...v0.0.19](https://github.com/whopio/whopsdk-ruby/compare/v0.0.18...v0.0.19)
|
|
16
|
+
|
|
17
|
+
## 0.0.18 (2025-12-12)
|
|
18
|
+
|
|
19
|
+
Full Changelog: [v0.0.18...v0.0.18](https://github.com/whopio/whopsdk-ruby/compare/v0.0.18...v0.0.18)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **api:** api update ([91dc54d](https://github.com/whopio/whopsdk-ruby/commit/91dc54d428b0230fd6489b8cdf144af75486e7fe))
|
|
24
|
+
* **api:** api update ([eba813f](https://github.com/whopio/whopsdk-ruby/commit/eba813f64c07c3043f175a6f8560dff6e4dfacb5))
|
|
25
|
+
|
|
3
26
|
## 0.0.18 (2025-12-11)
|
|
4
27
|
|
|
5
28
|
Full Changelog: [v0.0.17...v0.0.18](https://github.com/whopio/whopsdk-ruby/compare/v0.0.17...v0.0.18)
|
data/README.md
CHANGED
|
@@ -102,6 +102,14 @@ module WhopSDK
|
|
|
102
102
|
# @return [Symbol, WhopSDK::Models::Currency]
|
|
103
103
|
required :currency, enum: -> { WhopSDK::Currency }
|
|
104
104
|
|
|
105
|
+
# @!attribute application_fee_amount
|
|
106
|
+
# The application fee amount collected by the platform from this connected
|
|
107
|
+
# account. Must be less than the total payment amount. Only valid for connected
|
|
108
|
+
# accounts with a parent company.
|
|
109
|
+
#
|
|
110
|
+
# @return [Float, nil]
|
|
111
|
+
optional :application_fee_amount, Float, nil?: true
|
|
112
|
+
|
|
105
113
|
# @!attribute billing_period
|
|
106
114
|
# The interval at which the plan charges (renewal plans).
|
|
107
115
|
#
|
|
@@ -226,7 +234,7 @@ module WhopSDK
|
|
|
226
234
|
# @return [Symbol, WhopSDK::Models::Visibility, nil]
|
|
227
235
|
optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
|
|
228
236
|
|
|
229
|
-
# @!method initialize(company_id:, currency:, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, title: nil, trial_period_days: nil, visibility: nil)
|
|
237
|
+
# @!method initialize(company_id:, currency:, application_fee_amount: nil, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, title: nil, trial_period_days: nil, visibility: nil)
|
|
230
238
|
# Some parameter documentations has been truncated, see
|
|
231
239
|
# {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan} for more details.
|
|
232
240
|
#
|
|
@@ -236,6 +244,8 @@ module WhopSDK
|
|
|
236
244
|
#
|
|
237
245
|
# @param currency [Symbol, WhopSDK::Models::Currency] The respective currency identifier for the plan.
|
|
238
246
|
#
|
|
247
|
+
# @param application_fee_amount [Float, nil] The application fee amount collected by the platform from this connected account
|
|
248
|
+
#
|
|
239
249
|
# @param billing_period [Integer, nil] The interval at which the plan charges (renewal plans).
|
|
240
250
|
#
|
|
241
251
|
# @param custom_fields [Array<WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::CustomField>, nil] An array of custom field objects.
|
|
@@ -25,6 +25,18 @@ module WhopSDK
|
|
|
25
25
|
# @return [String]
|
|
26
26
|
required :title, String
|
|
27
27
|
|
|
28
|
+
# @!attribute business_type
|
|
29
|
+
# The different business types a company can be.
|
|
30
|
+
#
|
|
31
|
+
# @return [Symbol, WhopSDK::Models::BusinessTypes, nil]
|
|
32
|
+
optional :business_type, enum: -> { WhopSDK::BusinessTypes }, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute industry_type
|
|
35
|
+
# The different industry types a company can be in.
|
|
36
|
+
#
|
|
37
|
+
# @return [Symbol, WhopSDK::Models::IndustryTypes, nil]
|
|
38
|
+
optional :industry_type, enum: -> { WhopSDK::IndustryTypes }, nil?: true
|
|
39
|
+
|
|
28
40
|
# @!attribute metadata
|
|
29
41
|
# Additional metadata for the account
|
|
30
42
|
#
|
|
@@ -40,7 +52,7 @@ module WhopSDK
|
|
|
40
52
|
# @return [Boolean, nil]
|
|
41
53
|
optional :send_customer_emails, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
42
54
|
|
|
43
|
-
# @!method initialize(email:, parent_company_id:, title:, metadata: nil, send_customer_emails: nil, request_options: {})
|
|
55
|
+
# @!method initialize(email:, parent_company_id:, title:, business_type: nil, industry_type: nil, metadata: nil, send_customer_emails: nil, request_options: {})
|
|
44
56
|
# Some parameter documentations has been truncated, see
|
|
45
57
|
# {WhopSDK::Models::CompanyCreateParams} for more details.
|
|
46
58
|
#
|
|
@@ -50,6 +62,10 @@ module WhopSDK
|
|
|
50
62
|
#
|
|
51
63
|
# @param title [String] The name of the company being created.
|
|
52
64
|
#
|
|
65
|
+
# @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
|
|
66
|
+
#
|
|
67
|
+
# @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in.
|
|
68
|
+
#
|
|
53
69
|
# @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account
|
|
54
70
|
#
|
|
55
71
|
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -13,6 +13,18 @@ module WhopSDK
|
|
|
13
13
|
# @return [WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithID, nil]
|
|
14
14
|
optional :banner_image, union: -> { WhopSDK::CompanyUpdateParams::BannerImage }, nil?: true
|
|
15
15
|
|
|
16
|
+
# @!attribute business_type
|
|
17
|
+
# The different business types a company can be.
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, WhopSDK::Models::BusinessTypes, nil]
|
|
20
|
+
optional :business_type, enum: -> { WhopSDK::BusinessTypes }, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute industry_type
|
|
23
|
+
# The different industry types a company can be in.
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, WhopSDK::Models::IndustryTypes, nil]
|
|
26
|
+
optional :industry_type, enum: -> { WhopSDK::IndustryTypes }, nil?: true
|
|
27
|
+
|
|
16
28
|
# @!attribute logo
|
|
17
29
|
# The logo for the company in png, jpeg, or gif format
|
|
18
30
|
#
|
|
@@ -34,12 +46,16 @@ module WhopSDK
|
|
|
34
46
|
# @return [String, nil]
|
|
35
47
|
optional :title, String, nil?: true
|
|
36
48
|
|
|
37
|
-
# @!method initialize(banner_image: nil, logo: nil, send_customer_emails: nil, title: nil, request_options: {})
|
|
49
|
+
# @!method initialize(banner_image: nil, business_type: nil, industry_type: nil, logo: nil, send_customer_emails: nil, title: nil, request_options: {})
|
|
38
50
|
# Some parameter documentations has been truncated, see
|
|
39
51
|
# {WhopSDK::Models::CompanyUpdateParams} for more details.
|
|
40
52
|
#
|
|
41
53
|
# @param banner_image [WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithID, nil] The banner image for the company in png or jpeg format
|
|
42
54
|
#
|
|
55
|
+
# @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
|
|
56
|
+
#
|
|
57
|
+
# @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in.
|
|
58
|
+
#
|
|
43
59
|
# @param logo [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the company in png, jpeg, or gif format
|
|
44
60
|
#
|
|
45
61
|
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -288,7 +288,19 @@ module WhopSDK
|
|
|
288
288
|
-> { WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative },
|
|
289
289
|
nil?: true
|
|
290
290
|
|
|
291
|
-
# @!
|
|
291
|
+
# @!attribute email
|
|
292
|
+
# The email address of the representative
|
|
293
|
+
#
|
|
294
|
+
# @return [String, nil]
|
|
295
|
+
required :email, String, nil?: true
|
|
296
|
+
|
|
297
|
+
# @!attribute phone
|
|
298
|
+
# The business representative's phone
|
|
299
|
+
#
|
|
300
|
+
# @return [String, nil]
|
|
301
|
+
required :phone, String, nil?: true
|
|
302
|
+
|
|
303
|
+
# @!method initialize(id:, address:, business_name:, business_representative:, email:, phone:)
|
|
292
304
|
# The payout account associated with the LedgerAccount, if any.
|
|
293
305
|
#
|
|
294
306
|
# @param id [String] Unique identifier for the object
|
|
@@ -298,6 +310,10 @@ module WhopSDK
|
|
|
298
310
|
# @param business_name [String, nil] The company's legal name
|
|
299
311
|
#
|
|
300
312
|
# @param business_representative [WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative, nil] The business representative for this payout account
|
|
313
|
+
#
|
|
314
|
+
# @param email [String, nil] The email address of the representative
|
|
315
|
+
#
|
|
316
|
+
# @param phone [String, nil] The business representative's phone
|
|
301
317
|
|
|
302
318
|
# @see WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails#address
|
|
303
319
|
class Address < WhopSDK::Internal::Type::BaseModel
|
|
@@ -355,6 +371,13 @@ module WhopSDK
|
|
|
355
371
|
|
|
356
372
|
# @see WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails#business_representative
|
|
357
373
|
class BusinessRepresentative < WhopSDK::Internal::Type::BaseModel
|
|
374
|
+
# @!attribute date_of_birth
|
|
375
|
+
# The date of birth of the business representative in ISO 8601 format
|
|
376
|
+
# (YYYY-MM-DD).
|
|
377
|
+
#
|
|
378
|
+
# @return [String, nil]
|
|
379
|
+
required :date_of_birth, String, nil?: true
|
|
380
|
+
|
|
358
381
|
# @!attribute first_name
|
|
359
382
|
# The first name of the business representative.
|
|
360
383
|
#
|
|
@@ -373,9 +396,15 @@ module WhopSDK
|
|
|
373
396
|
# @return [String, nil]
|
|
374
397
|
required :middle_name, String, nil?: true
|
|
375
398
|
|
|
376
|
-
# @!method initialize(first_name:, last_name:, middle_name:)
|
|
399
|
+
# @!method initialize(date_of_birth:, first_name:, last_name:, middle_name:)
|
|
400
|
+
# Some parameter documentations has been truncated, see
|
|
401
|
+
# {WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative}
|
|
402
|
+
# for more details.
|
|
403
|
+
#
|
|
377
404
|
# The business representative for this payout account
|
|
378
405
|
#
|
|
406
|
+
# @param date_of_birth [String, nil] The date of birth of the business representative in ISO 8601 format (YYYY-MM-DD)
|
|
407
|
+
#
|
|
379
408
|
# @param first_name [String, nil] The first name of the business representative.
|
|
380
409
|
#
|
|
381
410
|
# @param last_name [String, nil] The last name of the business representative.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class PaymentCreatedWebhookEvent < 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 receipt for a membership.
|
|
20
|
+
#
|
|
21
|
+
# @return [WhopSDK::Models::Payment]
|
|
22
|
+
required :data, -> { WhopSDK::Payment }
|
|
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, :"payment.created"]
|
|
34
|
+
required :type, const: :"payment.created"
|
|
35
|
+
|
|
36
|
+
# @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"payment.created")
|
|
37
|
+
# @param id [String] A unique ID for every single webhook request
|
|
38
|
+
#
|
|
39
|
+
# @param data [WhopSDK::Models::Payment] An object representing a receipt for a membership.
|
|
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, :"payment.created"] The webhook event type
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -40,6 +40,8 @@ module WhopSDK
|
|
|
40
40
|
variant :"course_lesson_interaction.completed",
|
|
41
41
|
-> { WhopSDK::CourseLessonInteractionCompletedWebhookEvent }
|
|
42
42
|
|
|
43
|
+
variant :"payment.created", -> { WhopSDK::PaymentCreatedWebhookEvent }
|
|
44
|
+
|
|
43
45
|
variant :"payment.succeeded", -> { WhopSDK::PaymentSucceededWebhookEvent }
|
|
44
46
|
|
|
45
47
|
variant :"payment.failed", -> { WhopSDK::PaymentFailedWebhookEvent }
|
|
@@ -55,7 +57,7 @@ module WhopSDK
|
|
|
55
57
|
variant :"refund.updated", -> { WhopSDK::RefundUpdatedWebhookEvent }
|
|
56
58
|
|
|
57
59
|
# @!method self.variants
|
|
58
|
-
# @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::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
|
|
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)]
|
|
59
61
|
end
|
|
60
62
|
end
|
|
61
63
|
end
|
data/lib/whop_sdk/models.rb
CHANGED
|
@@ -354,6 +354,8 @@ module WhopSDK
|
|
|
354
354
|
|
|
355
355
|
Payment = WhopSDK::Models::Payment
|
|
356
356
|
|
|
357
|
+
PaymentCreatedWebhookEvent = WhopSDK::Models::PaymentCreatedWebhookEvent
|
|
358
|
+
|
|
357
359
|
PaymentCreateParams = WhopSDK::Models::PaymentCreateParams
|
|
358
360
|
|
|
359
361
|
PaymentFailedWebhookEvent = WhopSDK::Models::PaymentFailedWebhookEvent
|
|
@@ -13,7 +13,7 @@ module WhopSDK
|
|
|
13
13
|
# - `company:create_child`
|
|
14
14
|
# - `company:basic:read`
|
|
15
15
|
#
|
|
16
|
-
# @overload create(email:, parent_company_id:, title:, metadata: nil, send_customer_emails: nil, request_options: {})
|
|
16
|
+
# @overload create(email:, parent_company_id:, title:, business_type: nil, industry_type: nil, metadata: nil, send_customer_emails: nil, request_options: {})
|
|
17
17
|
#
|
|
18
18
|
# @param email [String] The email of the user who the company will belong to.
|
|
19
19
|
#
|
|
@@ -21,6 +21,10 @@ module WhopSDK
|
|
|
21
21
|
#
|
|
22
22
|
# @param title [String] The name of the company being created.
|
|
23
23
|
#
|
|
24
|
+
# @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
|
|
25
|
+
#
|
|
26
|
+
# @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in.
|
|
27
|
+
#
|
|
24
28
|
# @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account
|
|
25
29
|
#
|
|
26
30
|
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -76,12 +80,16 @@ module WhopSDK
|
|
|
76
80
|
# - `company:update`
|
|
77
81
|
# - `company:basic:read`
|
|
78
82
|
#
|
|
79
|
-
# @overload update(id, banner_image: nil, logo: nil, send_customer_emails: nil, title: nil, request_options: {})
|
|
83
|
+
# @overload update(id, banner_image: nil, business_type: nil, industry_type: nil, logo: nil, send_customer_emails: nil, title: nil, request_options: {})
|
|
80
84
|
#
|
|
81
85
|
# @param id [String] The ID of the company to update
|
|
82
86
|
#
|
|
83
87
|
# @param banner_image [WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::BannerImage::AttachmentInputWithID, nil] The banner image for the company in png or jpeg format
|
|
84
88
|
#
|
|
89
|
+
# @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be.
|
|
90
|
+
#
|
|
91
|
+
# @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in.
|
|
92
|
+
#
|
|
85
93
|
# @param logo [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the company in png, jpeg, or gif format
|
|
86
94
|
#
|
|
87
95
|
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -5,7 +5,7 @@ module WhopSDK
|
|
|
5
5
|
class Webhooks
|
|
6
6
|
# @param payload [String] The raw webhook payload as a string
|
|
7
7
|
#
|
|
8
|
-
# @return [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::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent]
|
|
8
|
+
# @return [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]
|
|
9
9
|
def unwrap(payload)
|
|
10
10
|
parsed = JSON.parse(payload, symbolize_names: true)
|
|
11
11
|
WhopSDK::Internal::Type::Converter.coerce(WhopSDK::Models::UnwrapWebhookEvent, parsed)
|
data/lib/whop_sdk/version.rb
CHANGED
data/lib/whop_sdk.rb
CHANGED
|
@@ -247,6 +247,7 @@ require_relative "whop_sdk/models/notification_create_params"
|
|
|
247
247
|
require_relative "whop_sdk/models/notification_create_response"
|
|
248
248
|
require_relative "whop_sdk/models/page_info"
|
|
249
249
|
require_relative "whop_sdk/models/payment"
|
|
250
|
+
require_relative "whop_sdk/models/payment_created_webhook_event"
|
|
250
251
|
require_relative "whop_sdk/models/payment_create_params"
|
|
251
252
|
require_relative "whop_sdk/models/payment_failed_webhook_event"
|
|
252
253
|
require_relative "whop_sdk/models/payment_list_fees_params"
|
|
@@ -156,6 +156,12 @@ module WhopSDK
|
|
|
156
156
|
sig { returns(WhopSDK::Currency::OrSymbol) }
|
|
157
157
|
attr_accessor :currency
|
|
158
158
|
|
|
159
|
+
# The application fee amount collected by the platform from this connected
|
|
160
|
+
# account. Must be less than the total payment amount. Only valid for connected
|
|
161
|
+
# accounts with a parent company.
|
|
162
|
+
sig { returns(T.nilable(Float)) }
|
|
163
|
+
attr_accessor :application_fee_amount
|
|
164
|
+
|
|
159
165
|
# The interval at which the plan charges (renewal plans).
|
|
160
166
|
sig { returns(T.nilable(Integer)) }
|
|
161
167
|
attr_accessor :billing_period
|
|
@@ -288,6 +294,7 @@ module WhopSDK
|
|
|
288
294
|
params(
|
|
289
295
|
company_id: String,
|
|
290
296
|
currency: WhopSDK::Currency::OrSymbol,
|
|
297
|
+
application_fee_amount: T.nilable(Float),
|
|
291
298
|
billing_period: T.nilable(Integer),
|
|
292
299
|
custom_fields:
|
|
293
300
|
T.nilable(
|
|
@@ -331,6 +338,10 @@ module WhopSDK
|
|
|
331
338
|
company_id:,
|
|
332
339
|
# The respective currency identifier for the plan.
|
|
333
340
|
currency:,
|
|
341
|
+
# The application fee amount collected by the platform from this connected
|
|
342
|
+
# account. Must be less than the total payment amount. Only valid for connected
|
|
343
|
+
# accounts with a parent company.
|
|
344
|
+
application_fee_amount: nil,
|
|
334
345
|
# The interval at which the plan charges (renewal plans).
|
|
335
346
|
billing_period: nil,
|
|
336
347
|
# An array of custom field objects.
|
|
@@ -381,6 +392,7 @@ module WhopSDK
|
|
|
381
392
|
{
|
|
382
393
|
company_id: String,
|
|
383
394
|
currency: WhopSDK::Currency::OrSymbol,
|
|
395
|
+
application_fee_amount: T.nilable(Float),
|
|
384
396
|
billing_period: T.nilable(Integer),
|
|
385
397
|
custom_fields:
|
|
386
398
|
T.nilable(
|
|
@@ -23,6 +23,14 @@ module WhopSDK
|
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :title
|
|
25
25
|
|
|
26
|
+
# The different business types a company can be.
|
|
27
|
+
sig { returns(T.nilable(WhopSDK::BusinessTypes::OrSymbol)) }
|
|
28
|
+
attr_accessor :business_type
|
|
29
|
+
|
|
30
|
+
# The different industry types a company can be in.
|
|
31
|
+
sig { returns(T.nilable(WhopSDK::IndustryTypes::OrSymbol)) }
|
|
32
|
+
attr_accessor :industry_type
|
|
33
|
+
|
|
26
34
|
# Additional metadata for the account
|
|
27
35
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
28
36
|
attr_accessor :metadata
|
|
@@ -39,6 +47,8 @@ module WhopSDK
|
|
|
39
47
|
email: String,
|
|
40
48
|
parent_company_id: String,
|
|
41
49
|
title: String,
|
|
50
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
51
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
42
52
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
43
53
|
send_customer_emails: T.nilable(T::Boolean),
|
|
44
54
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -51,6 +61,10 @@ module WhopSDK
|
|
|
51
61
|
parent_company_id:,
|
|
52
62
|
# The name of the company being created.
|
|
53
63
|
title:,
|
|
64
|
+
# The different business types a company can be.
|
|
65
|
+
business_type: nil,
|
|
66
|
+
# The different industry types a company can be in.
|
|
67
|
+
industry_type: nil,
|
|
54
68
|
# Additional metadata for the account
|
|
55
69
|
metadata: nil,
|
|
56
70
|
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -68,6 +82,8 @@ module WhopSDK
|
|
|
68
82
|
email: String,
|
|
69
83
|
parent_company_id: String,
|
|
70
84
|
title: String,
|
|
85
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
86
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
71
87
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
72
88
|
send_customer_emails: T.nilable(T::Boolean),
|
|
73
89
|
request_options: WhopSDK::RequestOptions
|
|
@@ -24,6 +24,14 @@ module WhopSDK
|
|
|
24
24
|
end
|
|
25
25
|
attr_accessor :banner_image
|
|
26
26
|
|
|
27
|
+
# The different business types a company can be.
|
|
28
|
+
sig { returns(T.nilable(WhopSDK::BusinessTypes::OrSymbol)) }
|
|
29
|
+
attr_accessor :business_type
|
|
30
|
+
|
|
31
|
+
# The different industry types a company can be in.
|
|
32
|
+
sig { returns(T.nilable(WhopSDK::IndustryTypes::OrSymbol)) }
|
|
33
|
+
attr_accessor :industry_type
|
|
34
|
+
|
|
27
35
|
# The logo for the company in png, jpeg, or gif format
|
|
28
36
|
sig do
|
|
29
37
|
returns(
|
|
@@ -57,6 +65,8 @@ module WhopSDK
|
|
|
57
65
|
WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID::OrHash
|
|
58
66
|
)
|
|
59
67
|
),
|
|
68
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
69
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
60
70
|
logo:
|
|
61
71
|
T.nilable(
|
|
62
72
|
T.any(
|
|
@@ -72,6 +82,10 @@ module WhopSDK
|
|
|
72
82
|
def self.new(
|
|
73
83
|
# The banner image for the company in png or jpeg format
|
|
74
84
|
banner_image: nil,
|
|
85
|
+
# The different business types a company can be.
|
|
86
|
+
business_type: nil,
|
|
87
|
+
# The different industry types a company can be in.
|
|
88
|
+
industry_type: nil,
|
|
75
89
|
# The logo for the company in png, jpeg, or gif format
|
|
76
90
|
logo: nil,
|
|
77
91
|
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -95,6 +109,8 @@ module WhopSDK
|
|
|
95
109
|
WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID
|
|
96
110
|
)
|
|
97
111
|
),
|
|
112
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
113
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
98
114
|
logo:
|
|
99
115
|
T.nilable(
|
|
100
116
|
T.any(
|
|
@@ -590,6 +590,14 @@ module WhopSDK
|
|
|
590
590
|
end
|
|
591
591
|
attr_writer :business_representative
|
|
592
592
|
|
|
593
|
+
# The email address of the representative
|
|
594
|
+
sig { returns(T.nilable(String)) }
|
|
595
|
+
attr_accessor :email
|
|
596
|
+
|
|
597
|
+
# The business representative's phone
|
|
598
|
+
sig { returns(T.nilable(String)) }
|
|
599
|
+
attr_accessor :phone
|
|
600
|
+
|
|
593
601
|
# The payout account associated with the LedgerAccount, if any.
|
|
594
602
|
sig do
|
|
595
603
|
params(
|
|
@@ -602,7 +610,9 @@ module WhopSDK
|
|
|
602
610
|
business_representative:
|
|
603
611
|
T.nilable(
|
|
604
612
|
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative::OrHash
|
|
605
|
-
)
|
|
613
|
+
),
|
|
614
|
+
email: T.nilable(String),
|
|
615
|
+
phone: T.nilable(String)
|
|
606
616
|
).returns(T.attached_class)
|
|
607
617
|
end
|
|
608
618
|
def self.new(
|
|
@@ -613,7 +623,11 @@ module WhopSDK
|
|
|
613
623
|
# The company's legal name
|
|
614
624
|
business_name:,
|
|
615
625
|
# The business representative for this payout account
|
|
616
|
-
business_representative
|
|
626
|
+
business_representative:,
|
|
627
|
+
# The email address of the representative
|
|
628
|
+
email:,
|
|
629
|
+
# The business representative's phone
|
|
630
|
+
phone:
|
|
617
631
|
)
|
|
618
632
|
end
|
|
619
633
|
|
|
@@ -629,7 +643,9 @@ module WhopSDK
|
|
|
629
643
|
business_representative:
|
|
630
644
|
T.nilable(
|
|
631
645
|
WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative
|
|
632
|
-
)
|
|
646
|
+
),
|
|
647
|
+
email: T.nilable(String),
|
|
648
|
+
phone: T.nilable(String)
|
|
633
649
|
}
|
|
634
650
|
)
|
|
635
651
|
end
|
|
@@ -721,6 +737,11 @@ module WhopSDK
|
|
|
721
737
|
)
|
|
722
738
|
end
|
|
723
739
|
|
|
740
|
+
# The date of birth of the business representative in ISO 8601 format
|
|
741
|
+
# (YYYY-MM-DD).
|
|
742
|
+
sig { returns(T.nilable(String)) }
|
|
743
|
+
attr_accessor :date_of_birth
|
|
744
|
+
|
|
724
745
|
# The first name of the business representative.
|
|
725
746
|
sig { returns(T.nilable(String)) }
|
|
726
747
|
attr_accessor :first_name
|
|
@@ -736,12 +757,16 @@ module WhopSDK
|
|
|
736
757
|
# The business representative for this payout account
|
|
737
758
|
sig do
|
|
738
759
|
params(
|
|
760
|
+
date_of_birth: T.nilable(String),
|
|
739
761
|
first_name: T.nilable(String),
|
|
740
762
|
last_name: T.nilable(String),
|
|
741
763
|
middle_name: T.nilable(String)
|
|
742
764
|
).returns(T.attached_class)
|
|
743
765
|
end
|
|
744
766
|
def self.new(
|
|
767
|
+
# The date of birth of the business representative in ISO 8601 format
|
|
768
|
+
# (YYYY-MM-DD).
|
|
769
|
+
date_of_birth:,
|
|
745
770
|
# The first name of the business representative.
|
|
746
771
|
first_name:,
|
|
747
772
|
# The last name of the business representative.
|
|
@@ -754,6 +779,7 @@ module WhopSDK
|
|
|
754
779
|
sig do
|
|
755
780
|
override.returns(
|
|
756
781
|
{
|
|
782
|
+
date_of_birth: T.nilable(String),
|
|
757
783
|
first_name: T.nilable(String),
|
|
758
784
|
last_name: T.nilable(String),
|
|
759
785
|
middle_name: T.nilable(String)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class PaymentCreatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(WhopSDK::PaymentCreatedWebhookEvent, WhopSDK::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# A unique ID for every single webhook request
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :id
|
|
14
|
+
|
|
15
|
+
# The API version for this webhook
|
|
16
|
+
sig { returns(Symbol) }
|
|
17
|
+
attr_accessor :api_version
|
|
18
|
+
|
|
19
|
+
# An object representing a receipt for a membership.
|
|
20
|
+
sig { returns(WhopSDK::Payment) }
|
|
21
|
+
attr_reader :data
|
|
22
|
+
|
|
23
|
+
sig { params(data: WhopSDK::Payment::OrHash).void }
|
|
24
|
+
attr_writer :data
|
|
25
|
+
|
|
26
|
+
# The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
27
|
+
sig { returns(Time) }
|
|
28
|
+
attr_accessor :timestamp
|
|
29
|
+
|
|
30
|
+
# The webhook event type
|
|
31
|
+
sig { returns(Symbol) }
|
|
32
|
+
attr_accessor :type
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
id: String,
|
|
37
|
+
data: WhopSDK::Payment::OrHash,
|
|
38
|
+
timestamp: Time,
|
|
39
|
+
api_version: Symbol,
|
|
40
|
+
type: Symbol
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
# A unique ID for every single webhook request
|
|
45
|
+
id:,
|
|
46
|
+
# An object representing a receipt for a membership.
|
|
47
|
+
data:,
|
|
48
|
+
# The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
49
|
+
timestamp:,
|
|
50
|
+
# The API version for this webhook
|
|
51
|
+
api_version: :v1,
|
|
52
|
+
# The webhook event type
|
|
53
|
+
type: :"payment.created"
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
id: String,
|
|
61
|
+
api_version: Symbol,
|
|
62
|
+
data: WhopSDK::Payment,
|
|
63
|
+
timestamp: Time,
|
|
64
|
+
type: Symbol
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
def to_hash
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -24,6 +24,7 @@ module WhopSDK
|
|
|
24
24
|
WhopSDK::WithdrawalCreatedWebhookEvent,
|
|
25
25
|
WhopSDK::WithdrawalUpdatedWebhookEvent,
|
|
26
26
|
WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
|
|
27
|
+
WhopSDK::PaymentCreatedWebhookEvent,
|
|
27
28
|
WhopSDK::PaymentSucceededWebhookEvent,
|
|
28
29
|
WhopSDK::PaymentFailedWebhookEvent,
|
|
29
30
|
WhopSDK::PaymentPendingWebhookEvent,
|
data/rbi/whop_sdk/models.rbi
CHANGED
|
@@ -326,6 +326,8 @@ module WhopSDK
|
|
|
326
326
|
|
|
327
327
|
Payment = WhopSDK::Models::Payment
|
|
328
328
|
|
|
329
|
+
PaymentCreatedWebhookEvent = WhopSDK::Models::PaymentCreatedWebhookEvent
|
|
330
|
+
|
|
329
331
|
PaymentCreateParams = WhopSDK::Models::PaymentCreateParams
|
|
330
332
|
|
|
331
333
|
PaymentFailedWebhookEvent = WhopSDK::Models::PaymentFailedWebhookEvent
|
|
@@ -14,6 +14,8 @@ module WhopSDK
|
|
|
14
14
|
email: String,
|
|
15
15
|
parent_company_id: String,
|
|
16
16
|
title: String,
|
|
17
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
18
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
17
19
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
18
20
|
send_customer_emails: T.nilable(T::Boolean),
|
|
19
21
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
@@ -26,6 +28,10 @@ module WhopSDK
|
|
|
26
28
|
parent_company_id:,
|
|
27
29
|
# The name of the company being created.
|
|
28
30
|
title:,
|
|
31
|
+
# The different business types a company can be.
|
|
32
|
+
business_type: nil,
|
|
33
|
+
# The different industry types a company can be in.
|
|
34
|
+
industry_type: nil,
|
|
29
35
|
# Additional metadata for the account
|
|
30
36
|
metadata: nil,
|
|
31
37
|
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -72,6 +78,8 @@ module WhopSDK
|
|
|
72
78
|
WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID::OrHash
|
|
73
79
|
)
|
|
74
80
|
),
|
|
81
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
82
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
75
83
|
logo:
|
|
76
84
|
T.nilable(
|
|
77
85
|
T.any(
|
|
@@ -89,6 +97,10 @@ module WhopSDK
|
|
|
89
97
|
id,
|
|
90
98
|
# The banner image for the company in png or jpeg format
|
|
91
99
|
banner_image: nil,
|
|
100
|
+
# The different business types a company can be.
|
|
101
|
+
business_type: nil,
|
|
102
|
+
# The different industry types a company can be in.
|
|
103
|
+
industry_type: nil,
|
|
92
104
|
# The logo for the company in png, jpeg, or gif format
|
|
93
105
|
logo: nil,
|
|
94
106
|
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
@@ -22,6 +22,7 @@ module WhopSDK
|
|
|
22
22
|
WhopSDK::WithdrawalCreatedWebhookEvent,
|
|
23
23
|
WhopSDK::WithdrawalUpdatedWebhookEvent,
|
|
24
24
|
WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
|
|
25
|
+
WhopSDK::PaymentCreatedWebhookEvent,
|
|
25
26
|
WhopSDK::PaymentSucceededWebhookEvent,
|
|
26
27
|
WhopSDK::PaymentFailedWebhookEvent,
|
|
27
28
|
WhopSDK::PaymentPendingWebhookEvent,
|
|
@@ -66,6 +66,7 @@ module WhopSDK
|
|
|
66
66
|
{
|
|
67
67
|
company_id: String,
|
|
68
68
|
currency: WhopSDK::Models::currency,
|
|
69
|
+
application_fee_amount: Float?,
|
|
69
70
|
billing_period: Integer?,
|
|
70
71
|
custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
|
|
71
72
|
description: String?,
|
|
@@ -92,6 +93,8 @@ module WhopSDK
|
|
|
92
93
|
|
|
93
94
|
attr_accessor currency: WhopSDK::Models::currency
|
|
94
95
|
|
|
96
|
+
attr_accessor application_fee_amount: Float?
|
|
97
|
+
|
|
95
98
|
attr_accessor billing_period: Integer?
|
|
96
99
|
|
|
97
100
|
attr_accessor custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?
|
|
@@ -133,6 +136,7 @@ module WhopSDK
|
|
|
133
136
|
def initialize: (
|
|
134
137
|
company_id: String,
|
|
135
138
|
currency: WhopSDK::Models::currency,
|
|
139
|
+
?application_fee_amount: Float?,
|
|
136
140
|
?billing_period: Integer?,
|
|
137
141
|
?custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
|
|
138
142
|
?description: String?,
|
|
@@ -157,6 +161,7 @@ module WhopSDK
|
|
|
157
161
|
def to_hash: -> {
|
|
158
162
|
company_id: String,
|
|
159
163
|
currency: WhopSDK::Models::currency,
|
|
164
|
+
application_fee_amount: Float?,
|
|
160
165
|
billing_period: Integer?,
|
|
161
166
|
custom_fields: ::Array[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField]?,
|
|
162
167
|
description: String?,
|
|
@@ -5,6 +5,8 @@ module WhopSDK
|
|
|
5
5
|
email: String,
|
|
6
6
|
parent_company_id: String,
|
|
7
7
|
title: String,
|
|
8
|
+
business_type: WhopSDK::Models::business_types?,
|
|
9
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
8
10
|
metadata: ::Hash[Symbol, top]?,
|
|
9
11
|
send_customer_emails: bool?
|
|
10
12
|
}
|
|
@@ -20,6 +22,10 @@ module WhopSDK
|
|
|
20
22
|
|
|
21
23
|
attr_accessor title: String
|
|
22
24
|
|
|
25
|
+
attr_accessor business_type: WhopSDK::Models::business_types?
|
|
26
|
+
|
|
27
|
+
attr_accessor industry_type: WhopSDK::Models::industry_types?
|
|
28
|
+
|
|
23
29
|
attr_accessor metadata: ::Hash[Symbol, top]?
|
|
24
30
|
|
|
25
31
|
attr_accessor send_customer_emails: bool?
|
|
@@ -28,6 +34,8 @@ module WhopSDK
|
|
|
28
34
|
email: String,
|
|
29
35
|
parent_company_id: String,
|
|
30
36
|
title: String,
|
|
37
|
+
?business_type: WhopSDK::Models::business_types?,
|
|
38
|
+
?industry_type: WhopSDK::Models::industry_types?,
|
|
31
39
|
?metadata: ::Hash[Symbol, top]?,
|
|
32
40
|
?send_customer_emails: bool?,
|
|
33
41
|
?request_options: WhopSDK::request_opts
|
|
@@ -37,6 +45,8 @@ module WhopSDK
|
|
|
37
45
|
email: String,
|
|
38
46
|
parent_company_id: String,
|
|
39
47
|
title: String,
|
|
48
|
+
business_type: WhopSDK::Models::business_types?,
|
|
49
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
40
50
|
metadata: ::Hash[Symbol, top]?,
|
|
41
51
|
send_customer_emails: bool?,
|
|
42
52
|
request_options: WhopSDK::RequestOptions
|
|
@@ -3,6 +3,8 @@ module WhopSDK
|
|
|
3
3
|
type company_update_params =
|
|
4
4
|
{
|
|
5
5
|
banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
|
|
6
|
+
business_type: WhopSDK::Models::business_types?,
|
|
7
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
6
8
|
logo: WhopSDK::Models::CompanyUpdateParams::logo?,
|
|
7
9
|
send_customer_emails: bool?,
|
|
8
10
|
title: String?
|
|
@@ -15,6 +17,10 @@ module WhopSDK
|
|
|
15
17
|
|
|
16
18
|
attr_accessor banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?
|
|
17
19
|
|
|
20
|
+
attr_accessor business_type: WhopSDK::Models::business_types?
|
|
21
|
+
|
|
22
|
+
attr_accessor industry_type: WhopSDK::Models::industry_types?
|
|
23
|
+
|
|
18
24
|
attr_accessor logo: WhopSDK::Models::CompanyUpdateParams::logo?
|
|
19
25
|
|
|
20
26
|
attr_accessor send_customer_emails: bool?
|
|
@@ -23,6 +29,8 @@ module WhopSDK
|
|
|
23
29
|
|
|
24
30
|
def initialize: (
|
|
25
31
|
?banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
|
|
32
|
+
?business_type: WhopSDK::Models::business_types?,
|
|
33
|
+
?industry_type: WhopSDK::Models::industry_types?,
|
|
26
34
|
?logo: WhopSDK::Models::CompanyUpdateParams::logo?,
|
|
27
35
|
?send_customer_emails: bool?,
|
|
28
36
|
?title: String?,
|
|
@@ -31,6 +39,8 @@ module WhopSDK
|
|
|
31
39
|
|
|
32
40
|
def to_hash: -> {
|
|
33
41
|
banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
|
|
42
|
+
business_type: WhopSDK::Models::business_types?,
|
|
43
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
34
44
|
logo: WhopSDK::Models::CompanyUpdateParams::logo?,
|
|
35
45
|
send_customer_emails: bool?,
|
|
36
46
|
title: String?,
|
|
@@ -210,7 +210,9 @@ module WhopSDK
|
|
|
210
210
|
id: String,
|
|
211
211
|
address: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address?,
|
|
212
212
|
business_name: String?,
|
|
213
|
-
business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative
|
|
213
|
+
business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative?,
|
|
214
|
+
email: String?,
|
|
215
|
+
phone: String?
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
class PayoutAccountDetails < WhopSDK::Internal::Type::BaseModel
|
|
@@ -222,18 +224,26 @@ module WhopSDK
|
|
|
222
224
|
|
|
223
225
|
attr_accessor business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative?
|
|
224
226
|
|
|
227
|
+
attr_accessor email: String?
|
|
228
|
+
|
|
229
|
+
attr_accessor phone: String?
|
|
230
|
+
|
|
225
231
|
def initialize: (
|
|
226
232
|
id: String,
|
|
227
233
|
address: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address?,
|
|
228
234
|
business_name: String?,
|
|
229
|
-
business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative
|
|
235
|
+
business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative?,
|
|
236
|
+
email: String?,
|
|
237
|
+
phone: String?
|
|
230
238
|
) -> void
|
|
231
239
|
|
|
232
240
|
def to_hash: -> {
|
|
233
241
|
id: String,
|
|
234
242
|
address: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::Address?,
|
|
235
243
|
business_name: String?,
|
|
236
|
-
business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative
|
|
244
|
+
business_representative: WhopSDK::Models::LedgerAccountRetrieveResponse::PayoutAccountDetails::BusinessRepresentative?,
|
|
245
|
+
email: String?,
|
|
246
|
+
phone: String?
|
|
237
247
|
}
|
|
238
248
|
|
|
239
249
|
type address =
|
|
@@ -279,9 +289,16 @@ module WhopSDK
|
|
|
279
289
|
end
|
|
280
290
|
|
|
281
291
|
type business_representative =
|
|
282
|
-
{
|
|
292
|
+
{
|
|
293
|
+
date_of_birth: String?,
|
|
294
|
+
first_name: String?,
|
|
295
|
+
last_name: String?,
|
|
296
|
+
middle_name: String?
|
|
297
|
+
}
|
|
283
298
|
|
|
284
299
|
class BusinessRepresentative < WhopSDK::Internal::Type::BaseModel
|
|
300
|
+
attr_accessor date_of_birth: String?
|
|
301
|
+
|
|
285
302
|
attr_accessor first_name: String?
|
|
286
303
|
|
|
287
304
|
attr_accessor last_name: String?
|
|
@@ -289,12 +306,14 @@ module WhopSDK
|
|
|
289
306
|
attr_accessor middle_name: String?
|
|
290
307
|
|
|
291
308
|
def initialize: (
|
|
309
|
+
date_of_birth: String?,
|
|
292
310
|
first_name: String?,
|
|
293
311
|
last_name: String?,
|
|
294
312
|
middle_name: String?
|
|
295
313
|
) -> void
|
|
296
314
|
|
|
297
315
|
def to_hash: -> {
|
|
316
|
+
date_of_birth: String?,
|
|
298
317
|
first_name: String?,
|
|
299
318
|
last_name: String?,
|
|
300
319
|
middle_name: String?
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type payment_created_webhook_event =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
api_version: :v1,
|
|
7
|
+
data: WhopSDK::Payment,
|
|
8
|
+
timestamp: Time,
|
|
9
|
+
type: :"payment.created"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class PaymentCreatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor id: String
|
|
14
|
+
|
|
15
|
+
attr_accessor api_version: :v1
|
|
16
|
+
|
|
17
|
+
attr_accessor data: WhopSDK::Payment
|
|
18
|
+
|
|
19
|
+
attr_accessor timestamp: Time
|
|
20
|
+
|
|
21
|
+
attr_accessor type: :"payment.created"
|
|
22
|
+
|
|
23
|
+
def initialize: (
|
|
24
|
+
id: String,
|
|
25
|
+
data: WhopSDK::Payment,
|
|
26
|
+
timestamp: Time,
|
|
27
|
+
?api_version: :v1,
|
|
28
|
+
?type: :"payment.created"
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
id: String,
|
|
33
|
+
api_version: :v1,
|
|
34
|
+
data: WhopSDK::Payment,
|
|
35
|
+
timestamp: Time,
|
|
36
|
+
type: :"payment.created"
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -17,6 +17,7 @@ module WhopSDK
|
|
|
17
17
|
| WhopSDK::WithdrawalCreatedWebhookEvent
|
|
18
18
|
| WhopSDK::WithdrawalUpdatedWebhookEvent
|
|
19
19
|
| WhopSDK::CourseLessonInteractionCompletedWebhookEvent
|
|
20
|
+
| WhopSDK::PaymentCreatedWebhookEvent
|
|
20
21
|
| WhopSDK::PaymentSucceededWebhookEvent
|
|
21
22
|
| WhopSDK::PaymentFailedWebhookEvent
|
|
22
23
|
| WhopSDK::PaymentPendingWebhookEvent
|
data/sig/whop_sdk/models.rbs
CHANGED
|
@@ -313,6 +313,8 @@ module WhopSDK
|
|
|
313
313
|
|
|
314
314
|
class Payment = WhopSDK::Models::Payment
|
|
315
315
|
|
|
316
|
+
class PaymentCreatedWebhookEvent = WhopSDK::Models::PaymentCreatedWebhookEvent
|
|
317
|
+
|
|
316
318
|
class PaymentCreateParams = WhopSDK::Models::PaymentCreateParams
|
|
317
319
|
|
|
318
320
|
class PaymentFailedWebhookEvent = WhopSDK::Models::PaymentFailedWebhookEvent
|
|
@@ -5,6 +5,8 @@ module WhopSDK
|
|
|
5
5
|
email: String,
|
|
6
6
|
parent_company_id: String,
|
|
7
7
|
title: String,
|
|
8
|
+
?business_type: WhopSDK::Models::business_types?,
|
|
9
|
+
?industry_type: WhopSDK::Models::industry_types?,
|
|
8
10
|
?metadata: ::Hash[Symbol, top]?,
|
|
9
11
|
?send_customer_emails: bool?,
|
|
10
12
|
?request_options: WhopSDK::request_opts
|
|
@@ -18,6 +20,8 @@ module WhopSDK
|
|
|
18
20
|
def update: (
|
|
19
21
|
String id,
|
|
20
22
|
?banner_image: WhopSDK::Models::CompanyUpdateParams::banner_image?,
|
|
23
|
+
?business_type: WhopSDK::Models::business_types?,
|
|
24
|
+
?industry_type: WhopSDK::Models::industry_types?,
|
|
21
25
|
?logo: WhopSDK::Models::CompanyUpdateParams::logo?,
|
|
22
26
|
?send_customer_emails: bool?,
|
|
23
27
|
?title: String?,
|
|
@@ -19,6 +19,7 @@ module WhopSDK
|
|
|
19
19
|
| WhopSDK::WithdrawalCreatedWebhookEvent
|
|
20
20
|
| WhopSDK::WithdrawalUpdatedWebhookEvent
|
|
21
21
|
| WhopSDK::CourseLessonInteractionCompletedWebhookEvent
|
|
22
|
+
| WhopSDK::PaymentCreatedWebhookEvent
|
|
22
23
|
| WhopSDK::PaymentSucceededWebhookEvent
|
|
23
24
|
| WhopSDK::PaymentFailedWebhookEvent
|
|
24
25
|
| WhopSDK::PaymentPendingWebhookEvent
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: whop_sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Whop
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|
|
@@ -280,6 +280,7 @@ files:
|
|
|
280
280
|
- lib/whop_sdk/models/page_info.rb
|
|
281
281
|
- lib/whop_sdk/models/payment.rb
|
|
282
282
|
- lib/whop_sdk/models/payment_create_params.rb
|
|
283
|
+
- lib/whop_sdk/models/payment_created_webhook_event.rb
|
|
283
284
|
- lib/whop_sdk/models/payment_failed_webhook_event.rb
|
|
284
285
|
- lib/whop_sdk/models/payment_list_fees_params.rb
|
|
285
286
|
- lib/whop_sdk/models/payment_list_fees_response.rb
|
|
@@ -657,6 +658,7 @@ files:
|
|
|
657
658
|
- rbi/whop_sdk/models/page_info.rbi
|
|
658
659
|
- rbi/whop_sdk/models/payment.rbi
|
|
659
660
|
- rbi/whop_sdk/models/payment_create_params.rbi
|
|
661
|
+
- rbi/whop_sdk/models/payment_created_webhook_event.rbi
|
|
660
662
|
- rbi/whop_sdk/models/payment_failed_webhook_event.rbi
|
|
661
663
|
- rbi/whop_sdk/models/payment_list_fees_params.rbi
|
|
662
664
|
- rbi/whop_sdk/models/payment_list_fees_response.rbi
|
|
@@ -1033,6 +1035,7 @@ files:
|
|
|
1033
1035
|
- sig/whop_sdk/models/page_info.rbs
|
|
1034
1036
|
- sig/whop_sdk/models/payment.rbs
|
|
1035
1037
|
- sig/whop_sdk/models/payment_create_params.rbs
|
|
1038
|
+
- sig/whop_sdk/models/payment_created_webhook_event.rbs
|
|
1036
1039
|
- sig/whop_sdk/models/payment_failed_webhook_event.rbs
|
|
1037
1040
|
- sig/whop_sdk/models/payment_list_fees_params.rbs
|
|
1038
1041
|
- sig/whop_sdk/models/payment_list_fees_response.rbs
|