whop_sdk 0.0.12 → 0.0.14
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 +19 -0
- data/README.md +1 -1
- data/lib/whop_sdk/models/company.rb +9 -1
- data/lib/whop_sdk/models/company_create_params.rb +15 -1
- data/lib/whop_sdk/models/company_list_params.rb +2 -2
- data/lib/whop_sdk/models/company_list_response.rb +9 -1
- data/lib/whop_sdk/models/company_update_params.rb +96 -0
- data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +11 -1
- data/lib/whop_sdk/models/withdrawal_list_response.rb +11 -1
- data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +11 -1
- data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +11 -1
- data/lib/whop_sdk/models.rb +2 -0
- data/lib/whop_sdk/resources/companies.rb +45 -3
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +1 -0
- data/rbi/whop_sdk/models/company.rbi +8 -0
- data/rbi/whop_sdk/models/company_create_params.rbi +14 -0
- data/rbi/whop_sdk/models/company_list_params.rbi +2 -2
- data/rbi/whop_sdk/models/company_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/company_update_params.rbi +167 -0
- data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +12 -0
- data/rbi/whop_sdk/models/withdrawal_list_response.rbi +12 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +12 -0
- data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +12 -0
- data/rbi/whop_sdk/models.rbi +2 -0
- data/rbi/whop_sdk/resources/companies.rbi +46 -2
- data/sig/whop_sdk/models/company.rbs +5 -0
- data/sig/whop_sdk/models/company_create_params.rbs +6 -1
- data/sig/whop_sdk/models/company_list_response.rbs +5 -0
- data/sig/whop_sdk/models/company_update_params.rbs +67 -0
- data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +5 -0
- data/sig/whop_sdk/models/withdrawal_list_response.rbs +5 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +5 -0
- data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +5 -0
- data/sig/whop_sdk/models.rbs +2 -0
- data/sig/whop_sdk/resources/companies.rbs +9 -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: dde88bf09d2270f31069e1d16f87df27fbf56f613122fd773342c597fed553a3
|
|
4
|
+
data.tar.gz: f4cb89608641823c87dbd156da5d91f1aa1ecd2ef091a9a647d1cfad98c0cc39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6e8d8d18893c43a9ec7ffffaa7f4efe23357c0eba64d6ebb4a6db00ed4bfb18333c595ac0b9bdc0e5474d4d31d8d8afad2808567211eea1780308bafd9e630d4
|
|
7
|
+
data.tar.gz: 37c37a923a6580d024985ae04f00aae915b433c9cf8a9c36b2d1fc2648d65fa433a1db30fff1d3270c9fdc7293548a1504f1d94b997b0575f39f4bd3a42a92ef
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.14 (2025-12-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.0.13...v0.0.14](https://github.com/whopio/whopsdk-ruby/compare/v0.0.13...v0.0.14)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([8515327](https://github.com/whopio/whopsdk-ruby/commit/8515327ce19264fd2b3d0774ef501941c29e8673))
|
|
10
|
+
* **api:** api update ([1dae032](https://github.com/whopio/whopsdk-ruby/commit/1dae03238e8624959bffcd188140d2976601809d))
|
|
11
|
+
* **api:** api update ([925f7eb](https://github.com/whopio/whopsdk-ruby/commit/925f7eb7a9c2f9eb5103ccd84274de6f636ea427))
|
|
12
|
+
|
|
13
|
+
## 0.0.13 (2025-12-05)
|
|
14
|
+
|
|
15
|
+
Full Changelog: [v0.0.12...v0.0.13](https://github.com/whopio/whopsdk-ruby/compare/v0.0.12...v0.0.13)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **api:** api update ([8a998ee](https://github.com/whopio/whopsdk-ruby/commit/8a998ee8f1c88f45572b1cdb63138a8c0dbbbd85))
|
|
20
|
+
* **api:** manual updates ([48eb150](https://github.com/whopio/whopsdk-ruby/commit/48eb150b33b58dc2f56dad9b24b756a26795b649))
|
|
21
|
+
|
|
3
22
|
## 0.0.12 (2025-12-03)
|
|
4
23
|
|
|
5
24
|
Full Changelog: [v0.0.11...v0.0.12](https://github.com/whopio/whopsdk-ruby/compare/v0.0.11...v0.0.12)
|
data/README.md
CHANGED
|
@@ -70,6 +70,12 @@ module WhopSDK
|
|
|
70
70
|
# @return [String]
|
|
71
71
|
required :route, String
|
|
72
72
|
|
|
73
|
+
# @!attribute send_customer_emails
|
|
74
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
75
|
+
#
|
|
76
|
+
# @return [Boolean]
|
|
77
|
+
required :send_customer_emails, WhopSDK::Internal::Type::Boolean
|
|
78
|
+
|
|
73
79
|
# @!attribute social_links
|
|
74
80
|
# The social media accounts of the company
|
|
75
81
|
#
|
|
@@ -94,7 +100,7 @@ module WhopSDK
|
|
|
94
100
|
# @return [Boolean]
|
|
95
101
|
required :verified, WhopSDK::Internal::Type::Boolean
|
|
96
102
|
|
|
97
|
-
# @!method initialize(id:, business_type:, created_at:, description:, industry_type:, logo:, member_count:, metadata:, owner_user:, published_reviews_count:, route:, social_links:, title:, updated_at:, verified:)
|
|
103
|
+
# @!method initialize(id:, business_type:, created_at:, description:, industry_type:, logo:, member_count:, metadata:, owner_user:, published_reviews_count:, route:, send_customer_emails:, social_links:, title:, updated_at:, verified:)
|
|
98
104
|
# Some parameter documentations has been truncated, see {WhopSDK::Models::Company}
|
|
99
105
|
# for more details.
|
|
100
106
|
#
|
|
@@ -122,6 +128,8 @@ module WhopSDK
|
|
|
122
128
|
#
|
|
123
129
|
# @param route [String] The slug/route of the company on the Whop site.
|
|
124
130
|
#
|
|
131
|
+
# @param send_customer_emails [Boolean] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
132
|
+
#
|
|
125
133
|
# @param social_links [Array<WhopSDK::Models::Company::SocialLink>] The social media accounts of the company
|
|
126
134
|
#
|
|
127
135
|
# @param title [String] The title of the company.
|
|
@@ -31,7 +31,19 @@ module WhopSDK
|
|
|
31
31
|
# @return [Hash{Symbol=>Object}, nil]
|
|
32
32
|
optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
33
33
|
|
|
34
|
-
# @!
|
|
34
|
+
# @!attribute send_customer_emails
|
|
35
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
36
|
+
# Includes: order confirmations, payment failures, refund notifications, upcoming
|
|
37
|
+
# renewals, and membership cancelations/expirations. When disabled, the platform
|
|
38
|
+
# is responsible for handling these communications. This is defaulted to true.
|
|
39
|
+
#
|
|
40
|
+
# @return [Boolean, nil]
|
|
41
|
+
optional :send_customer_emails, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(email:, parent_company_id:, title:, metadata: nil, send_customer_emails: nil, request_options: {})
|
|
44
|
+
# Some parameter documentations has been truncated, see
|
|
45
|
+
# {WhopSDK::Models::CompanyCreateParams} for more details.
|
|
46
|
+
#
|
|
35
47
|
# @param email [String] The email of the user who the company will belong to.
|
|
36
48
|
#
|
|
37
49
|
# @param parent_company_id [String] The company ID of the platform creating this company.
|
|
@@ -40,6 +52,8 @@ module WhopSDK
|
|
|
40
52
|
#
|
|
41
53
|
# @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account
|
|
42
54
|
#
|
|
55
|
+
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
56
|
+
#
|
|
43
57
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
44
58
|
end
|
|
45
59
|
end
|
|
@@ -8,7 +8,7 @@ module WhopSDK
|
|
|
8
8
|
include WhopSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute parent_company_id
|
|
11
|
-
# The ID of the parent company to list
|
|
11
|
+
# The ID of the parent company to list connected accounts for
|
|
12
12
|
#
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :parent_company_id, String
|
|
@@ -56,7 +56,7 @@ module WhopSDK
|
|
|
56
56
|
optional :last, Integer, nil?: true
|
|
57
57
|
|
|
58
58
|
# @!method initialize(parent_company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
|
|
59
|
-
# @param parent_company_id [String] The ID of the parent company to list
|
|
59
|
+
# @param parent_company_id [String] The ID of the parent company to list connected accounts for
|
|
60
60
|
#
|
|
61
61
|
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
62
62
|
#
|
|
@@ -71,6 +71,12 @@ module WhopSDK
|
|
|
71
71
|
# @return [String]
|
|
72
72
|
required :route, String
|
|
73
73
|
|
|
74
|
+
# @!attribute send_customer_emails
|
|
75
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
76
|
+
#
|
|
77
|
+
# @return [Boolean]
|
|
78
|
+
required :send_customer_emails, WhopSDK::Internal::Type::Boolean
|
|
79
|
+
|
|
74
80
|
# @!attribute title
|
|
75
81
|
# The title of the company.
|
|
76
82
|
#
|
|
@@ -89,7 +95,7 @@ module WhopSDK
|
|
|
89
95
|
# @return [Boolean]
|
|
90
96
|
required :verified, WhopSDK::Internal::Type::Boolean
|
|
91
97
|
|
|
92
|
-
# @!method initialize(id:, business_type:, created_at:, description:, industry_type:, logo:, member_count:, metadata:, owner_user:, published_reviews_count:, route:, title:, updated_at:, verified:)
|
|
98
|
+
# @!method initialize(id:, business_type:, created_at:, description:, industry_type:, logo:, member_count:, metadata:, owner_user:, published_reviews_count:, route:, send_customer_emails:, title:, updated_at:, verified:)
|
|
93
99
|
# Some parameter documentations has been truncated, see
|
|
94
100
|
# {WhopSDK::Models::CompanyListResponse} for more details.
|
|
95
101
|
#
|
|
@@ -117,6 +123,8 @@ module WhopSDK
|
|
|
117
123
|
#
|
|
118
124
|
# @param route [String] The slug/route of the company on the Whop site.
|
|
119
125
|
#
|
|
126
|
+
# @param send_customer_emails [Boolean] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
127
|
+
#
|
|
120
128
|
# @param title [String] The title of the company.
|
|
121
129
|
#
|
|
122
130
|
# @param updated_at [Time] The time the company was last updated.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Companies#update
|
|
6
|
+
class CompanyUpdateParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute logo
|
|
11
|
+
# The logo for the company in png, jpeg, or gif format
|
|
12
|
+
#
|
|
13
|
+
# @return [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil]
|
|
14
|
+
optional :logo, union: -> { WhopSDK::CompanyUpdateParams::Logo }, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute send_customer_emails
|
|
17
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
18
|
+
# Includes: order confirmations, payment failures, refund notifications, upcoming
|
|
19
|
+
# renewals, and membership cancelations/expirations. When disabled, the platform
|
|
20
|
+
# is responsible for handling these communications.
|
|
21
|
+
#
|
|
22
|
+
# @return [Boolean, nil]
|
|
23
|
+
optional :send_customer_emails, WhopSDK::Internal::Type::Boolean, nil?: true
|
|
24
|
+
|
|
25
|
+
# @!attribute title
|
|
26
|
+
# The title of the company
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :title, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!method initialize(logo: nil, send_customer_emails: nil, title: nil, request_options: {})
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {WhopSDK::Models::CompanyUpdateParams} for more details.
|
|
34
|
+
#
|
|
35
|
+
# @param logo [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the company in png, jpeg, or gif format
|
|
36
|
+
#
|
|
37
|
+
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
38
|
+
#
|
|
39
|
+
# @param title [String, nil] The title of the company
|
|
40
|
+
#
|
|
41
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
42
|
+
|
|
43
|
+
# The logo for the company in png, jpeg, or gif format
|
|
44
|
+
module Logo
|
|
45
|
+
extend WhopSDK::Internal::Type::Union
|
|
46
|
+
|
|
47
|
+
# Input for an attachment
|
|
48
|
+
variant -> { WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID }
|
|
49
|
+
|
|
50
|
+
# Input for an attachment
|
|
51
|
+
variant -> { WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID }
|
|
52
|
+
|
|
53
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
54
|
+
# @!attribute direct_upload_id
|
|
55
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
56
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
57
|
+
# mediaDirectUpload mutation.
|
|
58
|
+
#
|
|
59
|
+
# @return [String]
|
|
60
|
+
required :direct_upload_id, String
|
|
61
|
+
|
|
62
|
+
# @!method initialize(direct_upload_id:)
|
|
63
|
+
# Some parameter documentations has been truncated, see
|
|
64
|
+
# {WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID}
|
|
65
|
+
# for more details.
|
|
66
|
+
#
|
|
67
|
+
# Input for an attachment
|
|
68
|
+
#
|
|
69
|
+
# @param direct_upload_id [String] This ID should be used the first time you upload an attachment. It is the ID of
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
73
|
+
# @!attribute id
|
|
74
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
75
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
76
|
+
# doing.
|
|
77
|
+
#
|
|
78
|
+
# @return [String]
|
|
79
|
+
required :id, String
|
|
80
|
+
|
|
81
|
+
# @!method initialize(id:)
|
|
82
|
+
# Some parameter documentations has been truncated, see
|
|
83
|
+
# {WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID} for more
|
|
84
|
+
# details.
|
|
85
|
+
#
|
|
86
|
+
# Input for an attachment
|
|
87
|
+
#
|
|
88
|
+
# @param id [String] The ID of an existing attachment object. Use this when updating a resource and k
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# @!method self.variants
|
|
92
|
+
# @return [Array(WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID)]
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -107,6 +107,14 @@ module WhopSDK
|
|
|
107
107
|
# @return [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::LedgerAccount]
|
|
108
108
|
required :ledger_account, -> { WhopSDK::WithdrawalCreatedWebhookEvent::Data::LedgerAccount }
|
|
109
109
|
|
|
110
|
+
# @!attribute markup_fee
|
|
111
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
112
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
113
|
+
# Rails.
|
|
114
|
+
#
|
|
115
|
+
# @return [Float]
|
|
116
|
+
required :markup_fee, Float
|
|
117
|
+
|
|
110
118
|
# @!attribute payout_token
|
|
111
119
|
# The payout token used for the withdrawal, if applicable.
|
|
112
120
|
#
|
|
@@ -138,7 +146,7 @@ module WhopSDK
|
|
|
138
146
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
139
147
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
140
148
|
|
|
141
|
-
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
149
|
+
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
142
150
|
# Some parameter documentations has been truncated, see
|
|
143
151
|
# {WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data} for more details.
|
|
144
152
|
#
|
|
@@ -164,6 +172,8 @@ module WhopSDK
|
|
|
164
172
|
#
|
|
165
173
|
# @param ledger_account [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::LedgerAccount] The ledger account associated with the withdrawal.
|
|
166
174
|
#
|
|
175
|
+
# @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
|
|
176
|
+
#
|
|
167
177
|
# @param payout_token [WhopSDK::Models::WithdrawalCreatedWebhookEvent::Data::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
|
|
168
178
|
#
|
|
169
179
|
# @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
|
|
@@ -41,6 +41,14 @@ module WhopSDK
|
|
|
41
41
|
# @return [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil]
|
|
42
42
|
required :fee_type, enum: -> { WhopSDK::WithdrawalFeeTypes }, nil?: true
|
|
43
43
|
|
|
44
|
+
# @!attribute markup_fee
|
|
45
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
46
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
47
|
+
# Rails.
|
|
48
|
+
#
|
|
49
|
+
# @return [Float]
|
|
50
|
+
required :markup_fee, Float
|
|
51
|
+
|
|
44
52
|
# @!attribute speed
|
|
45
53
|
# The speed of the withdrawal.
|
|
46
54
|
#
|
|
@@ -59,7 +67,7 @@ module WhopSDK
|
|
|
59
67
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
60
68
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
61
69
|
|
|
62
|
-
# @!method initialize(id:, amount:, created_at:, currency:, fee_amount:, fee_type:, speed:, status:, withdrawal_type:)
|
|
70
|
+
# @!method initialize(id:, amount:, created_at:, currency:, fee_amount:, fee_type:, markup_fee:, speed:, status:, withdrawal_type:)
|
|
63
71
|
# Some parameter documentations has been truncated, see
|
|
64
72
|
# {WhopSDK::Models::WithdrawalListResponse} for more details.
|
|
65
73
|
#
|
|
@@ -77,6 +85,8 @@ module WhopSDK
|
|
|
77
85
|
#
|
|
78
86
|
# @param fee_type [Symbol, WhopSDK::Models::WithdrawalFeeTypes, nil] The different fee types for a withdrawal.
|
|
79
87
|
#
|
|
88
|
+
# @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
|
|
89
|
+
#
|
|
80
90
|
# @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
|
|
81
91
|
#
|
|
82
92
|
# @param status [Symbol, WhopSDK::Models::WithdrawalStatus] Status of the withdrawal.
|
|
@@ -65,6 +65,14 @@ module WhopSDK
|
|
|
65
65
|
# @return [WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount]
|
|
66
66
|
required :ledger_account, -> { WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount }
|
|
67
67
|
|
|
68
|
+
# @!attribute markup_fee
|
|
69
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
70
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
71
|
+
# Rails.
|
|
72
|
+
#
|
|
73
|
+
# @return [Float]
|
|
74
|
+
required :markup_fee, Float
|
|
75
|
+
|
|
68
76
|
# @!attribute payout_token
|
|
69
77
|
# The payout token used for the withdrawal, if applicable.
|
|
70
78
|
#
|
|
@@ -96,7 +104,7 @@ module WhopSDK
|
|
|
96
104
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
97
105
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
98
106
|
|
|
99
|
-
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
107
|
+
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
100
108
|
# Some parameter documentations has been truncated, see
|
|
101
109
|
# {WhopSDK::Models::WithdrawalRetrieveResponse} for more details.
|
|
102
110
|
#
|
|
@@ -122,6 +130,8 @@ module WhopSDK
|
|
|
122
130
|
#
|
|
123
131
|
# @param ledger_account [WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount] The ledger account associated with the withdrawal.
|
|
124
132
|
#
|
|
133
|
+
# @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
|
|
134
|
+
#
|
|
125
135
|
# @param payout_token [WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
|
|
126
136
|
#
|
|
127
137
|
# @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
|
|
@@ -107,6 +107,14 @@ module WhopSDK
|
|
|
107
107
|
# @return [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount]
|
|
108
108
|
required :ledger_account, -> { WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount }
|
|
109
109
|
|
|
110
|
+
# @!attribute markup_fee
|
|
111
|
+
# The markup fee that was charged for the withdrawal. This is in the same currency
|
|
112
|
+
# as the withdrawal amount. This only applies to platform accounts using Whop
|
|
113
|
+
# Rails.
|
|
114
|
+
#
|
|
115
|
+
# @return [Float]
|
|
116
|
+
required :markup_fee, Float
|
|
117
|
+
|
|
110
118
|
# @!attribute payout_token
|
|
111
119
|
# The payout token used for the withdrawal, if applicable.
|
|
112
120
|
#
|
|
@@ -138,7 +146,7 @@ module WhopSDK
|
|
|
138
146
|
# @return [Symbol, WhopSDK::Models::WithdrawalTypes]
|
|
139
147
|
required :withdrawal_type, enum: -> { WhopSDK::WithdrawalTypes }
|
|
140
148
|
|
|
141
|
-
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
149
|
+
# @!method initialize(id:, amount:, created_at:, currency:, error_code:, error_message:, estimated_availability:, fee_amount:, fee_type:, ledger_account:, markup_fee:, payout_token:, speed:, status:, trace_code:, withdrawal_type:)
|
|
142
150
|
# Some parameter documentations has been truncated, see
|
|
143
151
|
# {WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data} for more details.
|
|
144
152
|
#
|
|
@@ -164,6 +172,8 @@ module WhopSDK
|
|
|
164
172
|
#
|
|
165
173
|
# @param ledger_account [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount] The ledger account associated with the withdrawal.
|
|
166
174
|
#
|
|
175
|
+
# @param markup_fee [Float] The markup fee that was charged for the withdrawal. This is in the same currency
|
|
176
|
+
#
|
|
167
177
|
# @param payout_token [WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::PayoutToken, nil] The payout token used for the withdrawal, if applicable.
|
|
168
178
|
#
|
|
169
179
|
# @param speed [Symbol, WhopSDK::Models::WithdrawalSpeeds] The speed of the withdrawal.
|
data/lib/whop_sdk/models.rb
CHANGED
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Resources
|
|
5
5
|
class Companies
|
|
6
|
-
#
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {WhopSDK::Models::CompanyCreateParams} for more details.
|
|
8
|
+
#
|
|
9
|
+
# Create a new connected account for your platform
|
|
7
10
|
#
|
|
8
11
|
# Required permissions:
|
|
9
12
|
#
|
|
10
13
|
# - `company:create_child`
|
|
11
14
|
# - `company:basic:read`
|
|
12
15
|
#
|
|
13
|
-
# @overload create(email:, parent_company_id:, title:, metadata: nil, request_options: {})
|
|
16
|
+
# @overload create(email:, parent_company_id:, title:, metadata: nil, send_customer_emails: nil, request_options: {})
|
|
14
17
|
#
|
|
15
18
|
# @param email [String] The email of the user who the company will belong to.
|
|
16
19
|
#
|
|
@@ -20,6 +23,8 @@ module WhopSDK
|
|
|
20
23
|
#
|
|
21
24
|
# @param metadata [Hash{Symbol=>Object}, nil] Additional metadata for the account
|
|
22
25
|
#
|
|
26
|
+
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
27
|
+
#
|
|
23
28
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
29
|
#
|
|
25
30
|
# @return [WhopSDK::Models::Company]
|
|
@@ -60,6 +65,43 @@ module WhopSDK
|
|
|
60
65
|
)
|
|
61
66
|
end
|
|
62
67
|
|
|
68
|
+
# Some parameter documentations has been truncated, see
|
|
69
|
+
# {WhopSDK::Models::CompanyUpdateParams} for more details.
|
|
70
|
+
#
|
|
71
|
+
# Update an existing company. Either a regular company, platform company, or one
|
|
72
|
+
# of a platform's connected accounts
|
|
73
|
+
#
|
|
74
|
+
# Required permissions:
|
|
75
|
+
#
|
|
76
|
+
# - `company:update`
|
|
77
|
+
# - `company:basic:read`
|
|
78
|
+
#
|
|
79
|
+
# @overload update(id, logo: nil, send_customer_emails: nil, title: nil, request_options: {})
|
|
80
|
+
#
|
|
81
|
+
# @param id [String] The ID of the company to update
|
|
82
|
+
#
|
|
83
|
+
# @param logo [WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID, WhopSDK::Models::CompanyUpdateParams::Logo::AttachmentInputWithID, nil] The logo for the company in png, jpeg, or gif format
|
|
84
|
+
#
|
|
85
|
+
# @param send_customer_emails [Boolean, nil] Whether Whop sends transactional emails to customers on behalf of this company.
|
|
86
|
+
#
|
|
87
|
+
# @param title [String, nil] The title of the company
|
|
88
|
+
#
|
|
89
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
90
|
+
#
|
|
91
|
+
# @return [WhopSDK::Models::Company]
|
|
92
|
+
#
|
|
93
|
+
# @see WhopSDK::Models::CompanyUpdateParams
|
|
94
|
+
def update(id, params = {})
|
|
95
|
+
parsed, options = WhopSDK::CompanyUpdateParams.dump_request(params)
|
|
96
|
+
@client.request(
|
|
97
|
+
method: :patch,
|
|
98
|
+
path: ["companies/%1$s", id],
|
|
99
|
+
body: parsed,
|
|
100
|
+
model: WhopSDK::Company,
|
|
101
|
+
options: options
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
63
105
|
# Lists companies the current user has access to
|
|
64
106
|
#
|
|
65
107
|
# Required permissions:
|
|
@@ -68,7 +110,7 @@ module WhopSDK
|
|
|
68
110
|
#
|
|
69
111
|
# @overload list(parent_company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
|
|
70
112
|
#
|
|
71
|
-
# @param parent_company_id [String] The ID of the parent company to list
|
|
113
|
+
# @param parent_company_id [String] The ID of the parent company to list connected accounts for
|
|
72
114
|
#
|
|
73
115
|
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
74
116
|
#
|
data/lib/whop_sdk/version.rb
CHANGED
data/lib/whop_sdk.rb
CHANGED
|
@@ -102,6 +102,7 @@ require_relative "whop_sdk/models/company_create_params"
|
|
|
102
102
|
require_relative "whop_sdk/models/company_list_params"
|
|
103
103
|
require_relative "whop_sdk/models/company_list_response"
|
|
104
104
|
require_relative "whop_sdk/models/company_retrieve_params"
|
|
105
|
+
require_relative "whop_sdk/models/company_update_params"
|
|
105
106
|
require_relative "whop_sdk/models/course"
|
|
106
107
|
require_relative "whop_sdk/models/course_chapter"
|
|
107
108
|
require_relative "whop_sdk/models/course_chapter_create_params"
|
|
@@ -57,6 +57,10 @@ module WhopSDK
|
|
|
57
57
|
sig { returns(String) }
|
|
58
58
|
attr_accessor :route
|
|
59
59
|
|
|
60
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
61
|
+
sig { returns(T::Boolean) }
|
|
62
|
+
attr_accessor :send_customer_emails
|
|
63
|
+
|
|
60
64
|
# The social media accounts of the company
|
|
61
65
|
sig { returns(T::Array[WhopSDK::Company::SocialLink]) }
|
|
62
66
|
attr_accessor :social_links
|
|
@@ -87,6 +91,7 @@ module WhopSDK
|
|
|
87
91
|
owner_user: WhopSDK::Company::OwnerUser::OrHash,
|
|
88
92
|
published_reviews_count: Integer,
|
|
89
93
|
route: String,
|
|
94
|
+
send_customer_emails: T::Boolean,
|
|
90
95
|
social_links: T::Array[WhopSDK::Company::SocialLink::OrHash],
|
|
91
96
|
title: String,
|
|
92
97
|
updated_at: Time,
|
|
@@ -117,6 +122,8 @@ module WhopSDK
|
|
|
117
122
|
published_reviews_count:,
|
|
118
123
|
# The slug/route of the company on the Whop site.
|
|
119
124
|
route:,
|
|
125
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
126
|
+
send_customer_emails:,
|
|
120
127
|
# The social media accounts of the company
|
|
121
128
|
social_links:,
|
|
122
129
|
# The title of the company.
|
|
@@ -142,6 +149,7 @@ module WhopSDK
|
|
|
142
149
|
owner_user: WhopSDK::Company::OwnerUser,
|
|
143
150
|
published_reviews_count: Integer,
|
|
144
151
|
route: String,
|
|
152
|
+
send_customer_emails: T::Boolean,
|
|
145
153
|
social_links: T::Array[WhopSDK::Company::SocialLink],
|
|
146
154
|
title: String,
|
|
147
155
|
updated_at: Time,
|
|
@@ -27,12 +27,20 @@ module WhopSDK
|
|
|
27
27
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
28
28
|
attr_accessor :metadata
|
|
29
29
|
|
|
30
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
31
|
+
# Includes: order confirmations, payment failures, refund notifications, upcoming
|
|
32
|
+
# renewals, and membership cancelations/expirations. When disabled, the platform
|
|
33
|
+
# is responsible for handling these communications. This is defaulted to true.
|
|
34
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
35
|
+
attr_accessor :send_customer_emails
|
|
36
|
+
|
|
30
37
|
sig do
|
|
31
38
|
params(
|
|
32
39
|
email: String,
|
|
33
40
|
parent_company_id: String,
|
|
34
41
|
title: String,
|
|
35
42
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
43
|
+
send_customer_emails: T.nilable(T::Boolean),
|
|
36
44
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
37
45
|
).returns(T.attached_class)
|
|
38
46
|
end
|
|
@@ -45,6 +53,11 @@ module WhopSDK
|
|
|
45
53
|
title:,
|
|
46
54
|
# Additional metadata for the account
|
|
47
55
|
metadata: nil,
|
|
56
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
57
|
+
# Includes: order confirmations, payment failures, refund notifications, upcoming
|
|
58
|
+
# renewals, and membership cancelations/expirations. When disabled, the platform
|
|
59
|
+
# is responsible for handling these communications. This is defaulted to true.
|
|
60
|
+
send_customer_emails: nil,
|
|
48
61
|
request_options: {}
|
|
49
62
|
)
|
|
50
63
|
end
|
|
@@ -56,6 +69,7 @@ module WhopSDK
|
|
|
56
69
|
parent_company_id: String,
|
|
57
70
|
title: String,
|
|
58
71
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
72
|
+
send_customer_emails: T.nilable(T::Boolean),
|
|
59
73
|
request_options: WhopSDK::RequestOptions
|
|
60
74
|
}
|
|
61
75
|
)
|
|
@@ -11,7 +11,7 @@ module WhopSDK
|
|
|
11
11
|
T.any(WhopSDK::CompanyListParams, WhopSDK::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The ID of the parent company to list
|
|
14
|
+
# The ID of the parent company to list connected accounts for
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :parent_company_id
|
|
17
17
|
|
|
@@ -57,7 +57,7 @@ module WhopSDK
|
|
|
57
57
|
).returns(T.attached_class)
|
|
58
58
|
end
|
|
59
59
|
def self.new(
|
|
60
|
-
# The ID of the parent company to list
|
|
60
|
+
# The ID of the parent company to list connected accounts for
|
|
61
61
|
parent_company_id:,
|
|
62
62
|
# Returns the elements in the list that come after the specified cursor.
|
|
63
63
|
after: nil,
|
|
@@ -70,6 +70,10 @@ module WhopSDK
|
|
|
70
70
|
sig { returns(String) }
|
|
71
71
|
attr_accessor :route
|
|
72
72
|
|
|
73
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
74
|
+
sig { returns(T::Boolean) }
|
|
75
|
+
attr_accessor :send_customer_emails
|
|
76
|
+
|
|
73
77
|
# The title of the company.
|
|
74
78
|
sig { returns(String) }
|
|
75
79
|
attr_accessor :title
|
|
@@ -96,6 +100,7 @@ module WhopSDK
|
|
|
96
100
|
owner_user: WhopSDK::Models::CompanyListResponse::OwnerUser::OrHash,
|
|
97
101
|
published_reviews_count: Integer,
|
|
98
102
|
route: String,
|
|
103
|
+
send_customer_emails: T::Boolean,
|
|
99
104
|
title: String,
|
|
100
105
|
updated_at: Time,
|
|
101
106
|
verified: T::Boolean
|
|
@@ -125,6 +130,8 @@ module WhopSDK
|
|
|
125
130
|
published_reviews_count:,
|
|
126
131
|
# The slug/route of the company on the Whop site.
|
|
127
132
|
route:,
|
|
133
|
+
# Whether Whop sends transactional emails to customers on behalf of this company.
|
|
134
|
+
send_customer_emails:,
|
|
128
135
|
# The title of the company.
|
|
129
136
|
title:,
|
|
130
137
|
# The time the company was last updated.
|
|
@@ -148,6 +155,7 @@ module WhopSDK
|
|
|
148
155
|
owner_user: WhopSDK::Models::CompanyListResponse::OwnerUser,
|
|
149
156
|
published_reviews_count: Integer,
|
|
150
157
|
route: String,
|
|
158
|
+
send_customer_emails: T::Boolean,
|
|
151
159
|
title: String,
|
|
152
160
|
updated_at: Time,
|
|
153
161
|
verified: T::Boolean
|