whop_sdk 0.0.19 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -0
- data/README.md +10 -1
- data/lib/whop_sdk/client.rb +12 -0
- data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +12 -10
- data/lib/whop_sdk/internal/util.rb +7 -2
- 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/lead_create_params.rb +58 -0
- data/lib/whop_sdk/models/lead_create_response.rb +149 -0
- data/lib/whop_sdk/models/lead_list_params.rb +78 -0
- data/lib/whop_sdk/models/lead_list_response.rb +149 -0
- data/lib/whop_sdk/models/lead_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/lead_retrieve_response.rb +149 -0
- data/lib/whop_sdk/models/lead_update_params.rb +30 -0
- data/lib/whop_sdk/models/lead_update_response.rb +149 -0
- data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +128 -2
- data/lib/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rb +53 -0
- data/lib/whop_sdk/models/membership_status.rb +1 -0
- data/lib/whop_sdk/models/payment.rb +3 -3
- data/lib/whop_sdk/models/payment_create_params.rb +9 -1
- data/lib/whop_sdk/models/payment_list_fees_response.rb +1 -0
- data/lib/whop_sdk/models/payment_list_response.rb +3 -3
- data/lib/whop_sdk/models/payment_method_list_params.rb +16 -8
- data/lib/whop_sdk/models/payment_method_retrieve_params.rb +13 -5
- data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +168 -0
- data/lib/whop_sdk/models/payout_method_list_response.rb +31 -1
- data/lib/whop_sdk/models/payout_method_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/payout_method_retrieve_response.rb +125 -0
- data/lib/whop_sdk/models/support_channel_create_params.rb +2 -2
- data/lib/whop_sdk/models/topup_create_params.rb +46 -0
- data/lib/whop_sdk/models/topup_create_response.rb +67 -0
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +8 -1
- data/lib/whop_sdk/models/verification_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/verification_retrieve_response.rb +99 -0
- data/lib/whop_sdk/models/verification_succeeded_webhook_event.rb +142 -0
- data/lib/whop_sdk/models.rb +21 -0
- data/lib/whop_sdk/resources/companies.rb +10 -2
- data/lib/whop_sdk/resources/leads.rb +158 -0
- data/lib/whop_sdk/resources/payment_methods.rb +12 -8
- data/lib/whop_sdk/resources/payments.rb +3 -1
- data/lib/whop_sdk/resources/payout_methods.rb +24 -0
- data/lib/whop_sdk/resources/support_channels.rb +1 -1
- data/lib/whop_sdk/resources/topups.rb +46 -0
- data/lib/whop_sdk/resources/verifications.rb +38 -0
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +20 -0
- data/rbi/whop_sdk/client.rbi +9 -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/lead_create_params.rbi +77 -0
- data/rbi/whop_sdk/models/lead_create_response.rbi +234 -0
- data/rbi/whop_sdk/models/lead_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/lead_list_response.rbi +230 -0
- data/rbi/whop_sdk/models/lead_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/lead_retrieve_response.rbi +238 -0
- data/rbi/whop_sdk/models/lead_update_params.rbi +51 -0
- data/rbi/whop_sdk/models/lead_update_response.rbi +234 -0
- data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +336 -0
- data/rbi/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbi +77 -0
- data/rbi/whop_sdk/models/membership_status.rbi +1 -0
- data/rbi/whop_sdk/models/payment.rbi +4 -4
- data/rbi/whop_sdk/models/payment_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/payment_list_fees_response.rbi +5 -0
- data/rbi/whop_sdk/models/payment_list_response.rbi +4 -4
- data/rbi/whop_sdk/models/payment_method_list_params.rbi +16 -8
- data/rbi/whop_sdk/models/payment_method_retrieve_params.rbi +17 -6
- data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +340 -0
- data/rbi/whop_sdk/models/payout_method_list_response.rbi +58 -0
- data/rbi/whop_sdk/models/payout_method_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +262 -0
- data/rbi/whop_sdk/models/support_channel_create_params.rbi +2 -2
- data/rbi/whop_sdk/models/topup_create_params.rbi +67 -0
- data/rbi/whop_sdk/models/topup_create_response.rbi +89 -0
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +4 -1
- data/rbi/whop_sdk/models/verification_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/verification_retrieve_response.rbi +290 -0
- data/rbi/whop_sdk/models/verification_succeeded_webhook_event.rbi +367 -0
- data/rbi/whop_sdk/models.rbi +23 -0
- data/rbi/whop_sdk/resources/companies.rbi +12 -0
- data/rbi/whop_sdk/resources/leads.rbi +138 -0
- data/rbi/whop_sdk/resources/payment_methods.rbi +13 -7
- data/rbi/whop_sdk/resources/payments.rbi +3 -0
- data/rbi/whop_sdk/resources/payout_methods.rbi +18 -0
- data/rbi/whop_sdk/resources/support_channels.rbi +1 -1
- data/rbi/whop_sdk/resources/topups.rbi +39 -0
- data/rbi/whop_sdk/resources/verifications.rbi +30 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +4 -1
- data/sig/whop_sdk/client.rbs +6 -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/lead_create_params.rbs +46 -0
- data/sig/whop_sdk/models/lead_create_response.rbs +104 -0
- data/sig/whop_sdk/models/lead_list_params.rbs +61 -0
- data/sig/whop_sdk/models/lead_list_response.rbs +104 -0
- data/sig/whop_sdk/models/lead_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/lead_retrieve_response.rbs +104 -0
- data/sig/whop_sdk/models/lead_update_params.rbs +28 -0
- data/sig/whop_sdk/models/lead_update_response.rbs +104 -0
- data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +134 -1
- data/sig/whop_sdk/models/membership_cancel_at_period_end_changed_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/membership_status.rbs +2 -0
- data/sig/whop_sdk/models/payment_create_params.rbs +5 -0
- data/sig/whop_sdk/models/payment_list_fees_response.rbs +2 -0
- data/sig/whop_sdk/models/payment_method_list_params.rbs +11 -6
- data/sig/whop_sdk/models/payment_method_retrieve_params.rbs +9 -4
- data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +140 -0
- data/sig/whop_sdk/models/payout_method_list_response.rbs +20 -0
- data/sig/whop_sdk/models/payout_method_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +103 -0
- data/sig/whop_sdk/models/topup_create_params.rbs +41 -0
- data/sig/whop_sdk/models/topup_create_response.rbs +50 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
- data/sig/whop_sdk/models/verification_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/verification_retrieve_response.rbs +117 -0
- data/sig/whop_sdk/models/verification_succeeded_webhook_event.rbs +154 -0
- data/sig/whop_sdk/models.rbs +20 -0
- data/sig/whop_sdk/resources/companies.rbs +4 -0
- data/sig/whop_sdk/resources/leads.rbs +40 -0
- data/sig/whop_sdk/resources/payment_methods.rbs +4 -2
- data/sig/whop_sdk/resources/payments.rbs +1 -0
- data/sig/whop_sdk/resources/payout_methods.rbs +5 -0
- data/sig/whop_sdk/resources/topups.rbs +15 -0
- data/sig/whop_sdk/resources/verifications.rbs +12 -0
- data/sig/whop_sdk/resources/webhooks.rbs +4 -1
- metadata +62 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class MembershipCancelAtPeriodEndChangedWebhookEvent < 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
|
+
# A membership represents a purchase between a User and a Company for a specific
|
|
20
|
+
# Product.
|
|
21
|
+
#
|
|
22
|
+
# @return [WhopSDK::Models::Membership]
|
|
23
|
+
required :data, -> { WhopSDK::Membership }
|
|
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, :"membership.cancel_at_period_end_changed"]
|
|
35
|
+
required :type, const: :"membership.cancel_at_period_end_changed"
|
|
36
|
+
|
|
37
|
+
# @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"membership.cancel_at_period_end_changed")
|
|
38
|
+
# Some parameter documentations has been truncated, see
|
|
39
|
+
# {WhopSDK::Models::MembershipCancelAtPeriodEndChangedWebhookEvent} for more
|
|
40
|
+
# details.
|
|
41
|
+
#
|
|
42
|
+
# @param id [String] A unique ID for every single webhook request
|
|
43
|
+
#
|
|
44
|
+
# @param data [WhopSDK::Models::Membership] A membership represents a purchase between a User and a Company for a specific P
|
|
45
|
+
#
|
|
46
|
+
# @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
47
|
+
#
|
|
48
|
+
# @param api_version [Symbol, :v1] The API version for this webhook
|
|
49
|
+
#
|
|
50
|
+
# @param type [Symbol, :"membership.cancel_at_period_end_changed"] The webhook event type
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -94,8 +94,8 @@ module WhopSDK
|
|
|
94
94
|
required :membership, -> { WhopSDK::Payment::Membership }, nil?: true
|
|
95
95
|
|
|
96
96
|
# @!attribute metadata
|
|
97
|
-
# The custom metadata stored on this payment. This will be copied the
|
|
98
|
-
# configuration for which this payment was made
|
|
97
|
+
# The custom metadata stored on this payment. This will be copied over to the
|
|
98
|
+
# checkout configuration for which this payment was made
|
|
99
99
|
#
|
|
100
100
|
# @return [Hash{Symbol=>Object}, nil]
|
|
101
101
|
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
@@ -242,7 +242,7 @@ module WhopSDK
|
|
|
242
242
|
#
|
|
243
243
|
# @param membership [WhopSDK::Models::Payment::Membership, nil] The membership attached to this payment.
|
|
244
244
|
#
|
|
245
|
-
# @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied the
|
|
245
|
+
# @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied over to the chec
|
|
246
246
|
#
|
|
247
247
|
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
248
248
|
#
|
|
@@ -32,13 +32,19 @@ module WhopSDK
|
|
|
32
32
|
# @return [WhopSDK::Models::PaymentCreateParams::Plan]
|
|
33
33
|
required :plan, -> { WhopSDK::PaymentCreateParams::Plan }
|
|
34
34
|
|
|
35
|
+
# @!attribute metadata
|
|
36
|
+
# Custom metadata to attach to the payment.
|
|
37
|
+
#
|
|
38
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
39
|
+
optional :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
40
|
+
|
|
35
41
|
# @!attribute plan_id
|
|
36
42
|
# An ID of an existing plan to use for the payment.
|
|
37
43
|
#
|
|
38
44
|
# @return [String]
|
|
39
45
|
required :plan_id, String
|
|
40
46
|
|
|
41
|
-
# @!method initialize(company_id:, member_id:, payment_method_id:, plan:, plan_id:, request_options: {})
|
|
47
|
+
# @!method initialize(company_id:, member_id:, payment_method_id:, plan:, plan_id:, metadata: nil, request_options: {})
|
|
42
48
|
# Some parameter documentations has been truncated, see
|
|
43
49
|
# {WhopSDK::Models::PaymentCreateParams} for more details.
|
|
44
50
|
#
|
|
@@ -52,6 +58,8 @@ module WhopSDK
|
|
|
52
58
|
#
|
|
53
59
|
# @param plan_id [String] An ID of an existing plan to use for the payment.
|
|
54
60
|
#
|
|
61
|
+
# @param metadata [Hash{Symbol=>Object}, nil] Custom metadata to attach to the payment.
|
|
62
|
+
#
|
|
55
63
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
56
64
|
|
|
57
65
|
class Plan < WhopSDK::Internal::Type::BaseModel
|
|
@@ -95,8 +95,8 @@ module WhopSDK
|
|
|
95
95
|
required :membership, -> { WhopSDK::Models::PaymentListResponse::Membership }, nil?: true
|
|
96
96
|
|
|
97
97
|
# @!attribute metadata
|
|
98
|
-
# The custom metadata stored on this payment. This will be copied the
|
|
99
|
-
# configuration for which this payment was made
|
|
98
|
+
# The custom metadata stored on this payment. This will be copied over to the
|
|
99
|
+
# checkout configuration for which this payment was made
|
|
100
100
|
#
|
|
101
101
|
# @return [Hash{Symbol=>Object}, nil]
|
|
102
102
|
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
@@ -243,7 +243,7 @@ module WhopSDK
|
|
|
243
243
|
#
|
|
244
244
|
# @param membership [WhopSDK::Models::PaymentListResponse::Membership, nil] The membership attached to this payment.
|
|
245
245
|
#
|
|
246
|
-
# @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied the
|
|
246
|
+
# @param metadata [Hash{Symbol=>Object}, nil] The custom metadata stored on this payment. This will be copied over to the chec
|
|
247
247
|
#
|
|
248
248
|
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
249
249
|
#
|
|
@@ -7,12 +7,6 @@ module WhopSDK
|
|
|
7
7
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include WhopSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute member_id
|
|
11
|
-
# The ID of the Member to list payment methods for
|
|
12
|
-
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
required :member_id, String
|
|
15
|
-
|
|
16
10
|
# @!attribute after
|
|
17
11
|
# Returns the elements in the list that come after the specified cursor.
|
|
18
12
|
#
|
|
@@ -25,6 +19,12 @@ module WhopSDK
|
|
|
25
19
|
# @return [String, nil]
|
|
26
20
|
optional :before, String, nil?: true
|
|
27
21
|
|
|
22
|
+
# @!attribute company_id
|
|
23
|
+
# The ID of the Company. Provide either this or member_id (not both).
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :company_id, String, nil?: true
|
|
27
|
+
|
|
28
28
|
# @!attribute created_after
|
|
29
29
|
# The minimum creation date to filter by
|
|
30
30
|
#
|
|
@@ -55,13 +55,19 @@ module WhopSDK
|
|
|
55
55
|
# @return [Integer, nil]
|
|
56
56
|
optional :last, Integer, nil?: true
|
|
57
57
|
|
|
58
|
-
# @!
|
|
59
|
-
#
|
|
58
|
+
# @!attribute member_id
|
|
59
|
+
# The ID of the Member to list payment methods for
|
|
60
60
|
#
|
|
61
|
+
# @return [String, nil]
|
|
62
|
+
optional :member_id, String, nil?: true
|
|
63
|
+
|
|
64
|
+
# @!method initialize(after: nil, before: nil, company_id: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, member_id: nil, request_options: {})
|
|
61
65
|
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
62
66
|
#
|
|
63
67
|
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
64
68
|
#
|
|
69
|
+
# @param company_id [String, nil] The ID of the Company. Provide either this or member_id (not both).
|
|
70
|
+
#
|
|
65
71
|
# @param created_after [Time, nil] The minimum creation date to filter by
|
|
66
72
|
#
|
|
67
73
|
# @param created_before [Time, nil] The maximum creation date to filter by
|
|
@@ -72,6 +78,8 @@ module WhopSDK
|
|
|
72
78
|
#
|
|
73
79
|
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
74
80
|
#
|
|
81
|
+
# @param member_id [String, nil] The ID of the Member to list payment methods for
|
|
82
|
+
#
|
|
75
83
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
76
84
|
end
|
|
77
85
|
end
|
|
@@ -7,14 +7,22 @@ module WhopSDK
|
|
|
7
7
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include WhopSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute company_id
|
|
11
|
+
# The ID of the Company. Provide either this or member_id (not both).
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :company_id, String, nil?: true
|
|
15
|
+
|
|
10
16
|
# @!attribute member_id
|
|
11
|
-
# The ID of the Member
|
|
17
|
+
# The ID of the Member. Provide either this or company_id (not both).
|
|
12
18
|
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :member_id, String, nil?: true
|
|
15
21
|
|
|
16
|
-
# @!method initialize(member_id
|
|
17
|
-
# @param
|
|
22
|
+
# @!method initialize(company_id: nil, member_id: nil, request_options: {})
|
|
23
|
+
# @param company_id [String, nil] The ID of the Company. Provide either this or member_id (not both).
|
|
24
|
+
#
|
|
25
|
+
# @param member_id [String, nil] The ID of the Member. Provide either this or company_id (not both).
|
|
18
26
|
#
|
|
19
27
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
20
28
|
end
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class PayoutMethodCreatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# A unique ID for every single webhook request
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute api_version
|
|
13
|
+
# The API version for this webhook
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, :v1]
|
|
16
|
+
required :api_version, const: :v1
|
|
17
|
+
|
|
18
|
+
# @!attribute data
|
|
19
|
+
# An object representing an user's setup payout destination.
|
|
20
|
+
#
|
|
21
|
+
# @return [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data]
|
|
22
|
+
required :data, -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data }
|
|
23
|
+
|
|
24
|
+
# @!attribute timestamp
|
|
25
|
+
# The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
26
|
+
#
|
|
27
|
+
# @return [Time]
|
|
28
|
+
required :timestamp, Time
|
|
29
|
+
|
|
30
|
+
# @!attribute type
|
|
31
|
+
# The webhook event type
|
|
32
|
+
#
|
|
33
|
+
# @return [Symbol, :"payout_method.created"]
|
|
34
|
+
required :type, const: :"payout_method.created"
|
|
35
|
+
|
|
36
|
+
# @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"payout_method.created")
|
|
37
|
+
# @param id [String] A unique ID for every single webhook request
|
|
38
|
+
#
|
|
39
|
+
# @param data [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data] An object representing an user's setup payout destination.
|
|
40
|
+
#
|
|
41
|
+
# @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
42
|
+
#
|
|
43
|
+
# @param api_version [Symbol, :v1] The API version for this webhook
|
|
44
|
+
#
|
|
45
|
+
# @param type [Symbol, :"payout_method.created"] The webhook event type
|
|
46
|
+
|
|
47
|
+
# @see WhopSDK::Models::PayoutMethodCreatedWebhookEvent#data
|
|
48
|
+
class Data < WhopSDK::Internal::Type::BaseModel
|
|
49
|
+
# @!attribute id
|
|
50
|
+
# The ID of the payout token
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :id, String
|
|
54
|
+
|
|
55
|
+
# @!attribute company
|
|
56
|
+
# The company associated with the payout token
|
|
57
|
+
#
|
|
58
|
+
# @return [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Company, nil]
|
|
59
|
+
required :company, -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Company }, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute currency
|
|
62
|
+
# The currency code of the payout destination. This is the currency that payouts
|
|
63
|
+
# will be made in for this token.
|
|
64
|
+
#
|
|
65
|
+
# @return [String]
|
|
66
|
+
required :currency, String
|
|
67
|
+
|
|
68
|
+
# @!attribute destination
|
|
69
|
+
# The payout destination associated with the payout token
|
|
70
|
+
#
|
|
71
|
+
# @return [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination, nil]
|
|
72
|
+
required :destination, -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination }, nil?: true
|
|
73
|
+
|
|
74
|
+
# @!attribute is_default
|
|
75
|
+
# Whether this payout token is the default for the payout account
|
|
76
|
+
#
|
|
77
|
+
# @return [Boolean]
|
|
78
|
+
required :is_default, WhopSDK::Internal::Type::Boolean
|
|
79
|
+
|
|
80
|
+
# @!attribute nickname
|
|
81
|
+
# An optional nickname for the payout token to help the user identify it. This is
|
|
82
|
+
# not used by the provider and is only for the user's reference.
|
|
83
|
+
#
|
|
84
|
+
# @return [String, nil]
|
|
85
|
+
required :nickname, String, nil?: true
|
|
86
|
+
|
|
87
|
+
# @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:)
|
|
88
|
+
# Some parameter documentations has been truncated, see
|
|
89
|
+
# {WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data} for more details.
|
|
90
|
+
#
|
|
91
|
+
# An object representing an user's setup payout destination.
|
|
92
|
+
#
|
|
93
|
+
# @param id [String] The ID of the payout token
|
|
94
|
+
#
|
|
95
|
+
# @param company [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Company, nil] The company associated with the payout token
|
|
96
|
+
#
|
|
97
|
+
# @param currency [String] The currency code of the payout destination. This is the currency that payouts w
|
|
98
|
+
#
|
|
99
|
+
# @param destination [WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination, nil] The payout destination associated with the payout token
|
|
100
|
+
#
|
|
101
|
+
# @param is_default [Boolean] Whether this payout token is the default for the payout account
|
|
102
|
+
#
|
|
103
|
+
# @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
|
|
104
|
+
|
|
105
|
+
# @see WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data#company
|
|
106
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
107
|
+
# @!attribute id
|
|
108
|
+
# The ID (tag) of the company.
|
|
109
|
+
#
|
|
110
|
+
# @return [String]
|
|
111
|
+
required :id, String
|
|
112
|
+
|
|
113
|
+
# @!method initialize(id:)
|
|
114
|
+
# The company associated with the payout token
|
|
115
|
+
#
|
|
116
|
+
# @param id [String] The ID (tag) of the company.
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data#destination
|
|
120
|
+
class Destination < WhopSDK::Internal::Type::BaseModel
|
|
121
|
+
# @!attribute category
|
|
122
|
+
# The category of the payout destination
|
|
123
|
+
#
|
|
124
|
+
# @return [Symbol, WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination::Category]
|
|
125
|
+
required :category, enum: -> { WhopSDK::PayoutMethodCreatedWebhookEvent::Data::Destination::Category }
|
|
126
|
+
|
|
127
|
+
# @!attribute country_code
|
|
128
|
+
# The country code of the payout destination
|
|
129
|
+
#
|
|
130
|
+
# @return [String]
|
|
131
|
+
required :country_code, String
|
|
132
|
+
|
|
133
|
+
# @!attribute name
|
|
134
|
+
# The name of the payer associated with the payout destination
|
|
135
|
+
#
|
|
136
|
+
# @return [String]
|
|
137
|
+
required :name, String
|
|
138
|
+
|
|
139
|
+
# @!method initialize(category:, country_code:, name:)
|
|
140
|
+
# The payout destination associated with the payout token
|
|
141
|
+
#
|
|
142
|
+
# @param category [Symbol, WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination::Category] The category of the payout destination
|
|
143
|
+
#
|
|
144
|
+
# @param country_code [String] The country code of the payout destination
|
|
145
|
+
#
|
|
146
|
+
# @param name [String] The name of the payer associated with the payout destination
|
|
147
|
+
|
|
148
|
+
# The category of the payout destination
|
|
149
|
+
#
|
|
150
|
+
# @see WhopSDK::Models::PayoutMethodCreatedWebhookEvent::Data::Destination#category
|
|
151
|
+
module Category
|
|
152
|
+
extend WhopSDK::Internal::Type::Enum
|
|
153
|
+
|
|
154
|
+
CRYPTO = :crypto
|
|
155
|
+
RTP = :rtp
|
|
156
|
+
NEXT_DAY_BANK = :next_day_bank
|
|
157
|
+
BANK_WIRE = :bank_wire
|
|
158
|
+
DIGITAL_WALLET = :digital_wallet
|
|
159
|
+
UNKNOWN = :unknown
|
|
160
|
+
|
|
161
|
+
# @!method self.values
|
|
162
|
+
# @return [Array<Symbol>]
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|
|
@@ -10,6 +10,12 @@ module WhopSDK
|
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :id, String
|
|
12
12
|
|
|
13
|
+
# @!attribute company
|
|
14
|
+
# The company associated with the payout token
|
|
15
|
+
#
|
|
16
|
+
# @return [WhopSDK::Models::PayoutMethodListResponse::Company, nil]
|
|
17
|
+
required :company, -> { WhopSDK::Models::PayoutMethodListResponse::Company }, nil?: true
|
|
18
|
+
|
|
13
19
|
# @!attribute currency
|
|
14
20
|
# The currency code of the payout destination. This is the currency that payouts
|
|
15
21
|
# will be made in for this token.
|
|
@@ -23,6 +29,12 @@ module WhopSDK
|
|
|
23
29
|
# @return [WhopSDK::Models::PayoutMethodListResponse::Destination, nil]
|
|
24
30
|
required :destination, -> { WhopSDK::Models::PayoutMethodListResponse::Destination }, nil?: true
|
|
25
31
|
|
|
32
|
+
# @!attribute is_default
|
|
33
|
+
# Whether this payout token is the default for the payout account
|
|
34
|
+
#
|
|
35
|
+
# @return [Boolean]
|
|
36
|
+
required :is_default, WhopSDK::Internal::Type::Boolean
|
|
37
|
+
|
|
26
38
|
# @!attribute nickname
|
|
27
39
|
# An optional nickname for the payout token to help the user identify it. This is
|
|
28
40
|
# not used by the provider and is only for the user's reference.
|
|
@@ -30,7 +42,7 @@ module WhopSDK
|
|
|
30
42
|
# @return [String, nil]
|
|
31
43
|
required :nickname, String, nil?: true
|
|
32
44
|
|
|
33
|
-
# @!method initialize(id:, currency:, destination:, nickname:)
|
|
45
|
+
# @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:)
|
|
34
46
|
# Some parameter documentations has been truncated, see
|
|
35
47
|
# {WhopSDK::Models::PayoutMethodListResponse} for more details.
|
|
36
48
|
#
|
|
@@ -38,12 +50,30 @@ module WhopSDK
|
|
|
38
50
|
#
|
|
39
51
|
# @param id [String] The ID of the payout token
|
|
40
52
|
#
|
|
53
|
+
# @param company [WhopSDK::Models::PayoutMethodListResponse::Company, nil] The company associated with the payout token
|
|
54
|
+
#
|
|
41
55
|
# @param currency [String] The currency code of the payout destination. This is the currency that payouts w
|
|
42
56
|
#
|
|
43
57
|
# @param destination [WhopSDK::Models::PayoutMethodListResponse::Destination, nil] The payout destination associated with the payout token
|
|
44
58
|
#
|
|
59
|
+
# @param is_default [Boolean] Whether this payout token is the default for the payout account
|
|
60
|
+
#
|
|
45
61
|
# @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
|
|
46
62
|
|
|
63
|
+
# @see WhopSDK::Models::PayoutMethodListResponse#company
|
|
64
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
65
|
+
# @!attribute id
|
|
66
|
+
# The ID (tag) of the company.
|
|
67
|
+
#
|
|
68
|
+
# @return [String]
|
|
69
|
+
required :id, String
|
|
70
|
+
|
|
71
|
+
# @!method initialize(id:)
|
|
72
|
+
# The company associated with the payout token
|
|
73
|
+
#
|
|
74
|
+
# @param id [String] The ID (tag) of the company.
|
|
75
|
+
end
|
|
76
|
+
|
|
47
77
|
# @see WhopSDK::Models::PayoutMethodListResponse#destination
|
|
48
78
|
class Destination < WhopSDK::Internal::Type::BaseModel
|
|
49
79
|
# @!attribute category
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::PayoutMethods#retrieve
|
|
6
|
+
class PayoutMethodRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::PayoutMethods#retrieve
|
|
6
|
+
class PayoutMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the payout token
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute company
|
|
14
|
+
# The company associated with the payout token
|
|
15
|
+
#
|
|
16
|
+
# @return [WhopSDK::Models::PayoutMethodRetrieveResponse::Company, nil]
|
|
17
|
+
required :company, -> { WhopSDK::Models::PayoutMethodRetrieveResponse::Company }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute currency
|
|
20
|
+
# The currency code of the payout destination. This is the currency that payouts
|
|
21
|
+
# will be made in for this token.
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :currency, String
|
|
25
|
+
|
|
26
|
+
# @!attribute destination
|
|
27
|
+
# The payout destination associated with the payout token
|
|
28
|
+
#
|
|
29
|
+
# @return [WhopSDK::Models::PayoutMethodRetrieveResponse::Destination, nil]
|
|
30
|
+
required :destination, -> { WhopSDK::Models::PayoutMethodRetrieveResponse::Destination }, nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute is_default
|
|
33
|
+
# Whether this payout token is the default for the payout account
|
|
34
|
+
#
|
|
35
|
+
# @return [Boolean]
|
|
36
|
+
required :is_default, WhopSDK::Internal::Type::Boolean
|
|
37
|
+
|
|
38
|
+
# @!attribute nickname
|
|
39
|
+
# An optional nickname for the payout token to help the user identify it. This is
|
|
40
|
+
# not used by the provider and is only for the user's reference.
|
|
41
|
+
#
|
|
42
|
+
# @return [String, nil]
|
|
43
|
+
required :nickname, String, nil?: true
|
|
44
|
+
|
|
45
|
+
# @!method initialize(id:, company:, currency:, destination:, is_default:, nickname:)
|
|
46
|
+
# Some parameter documentations has been truncated, see
|
|
47
|
+
# {WhopSDK::Models::PayoutMethodRetrieveResponse} for more details.
|
|
48
|
+
#
|
|
49
|
+
# An object representing an user's setup payout destination.
|
|
50
|
+
#
|
|
51
|
+
# @param id [String] The ID of the payout token
|
|
52
|
+
#
|
|
53
|
+
# @param company [WhopSDK::Models::PayoutMethodRetrieveResponse::Company, nil] The company associated with the payout token
|
|
54
|
+
#
|
|
55
|
+
# @param currency [String] The currency code of the payout destination. This is the currency that payouts w
|
|
56
|
+
#
|
|
57
|
+
# @param destination [WhopSDK::Models::PayoutMethodRetrieveResponse::Destination, nil] The payout destination associated with the payout token
|
|
58
|
+
#
|
|
59
|
+
# @param is_default [Boolean] Whether this payout token is the default for the payout account
|
|
60
|
+
#
|
|
61
|
+
# @param nickname [String, nil] An optional nickname for the payout token to help the user identify it. This is
|
|
62
|
+
|
|
63
|
+
# @see WhopSDK::Models::PayoutMethodRetrieveResponse#company
|
|
64
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
65
|
+
# @!attribute id
|
|
66
|
+
# The ID (tag) of the company.
|
|
67
|
+
#
|
|
68
|
+
# @return [String]
|
|
69
|
+
required :id, String
|
|
70
|
+
|
|
71
|
+
# @!method initialize(id:)
|
|
72
|
+
# The company associated with the payout token
|
|
73
|
+
#
|
|
74
|
+
# @param id [String] The ID (tag) of the company.
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @see WhopSDK::Models::PayoutMethodRetrieveResponse#destination
|
|
78
|
+
class Destination < WhopSDK::Internal::Type::BaseModel
|
|
79
|
+
# @!attribute category
|
|
80
|
+
# The category of the payout destination
|
|
81
|
+
#
|
|
82
|
+
# @return [Symbol, WhopSDK::Models::PayoutMethodRetrieveResponse::Destination::Category]
|
|
83
|
+
required :category, enum: -> { WhopSDK::Models::PayoutMethodRetrieveResponse::Destination::Category }
|
|
84
|
+
|
|
85
|
+
# @!attribute country_code
|
|
86
|
+
# The country code of the payout destination
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
required :country_code, String
|
|
90
|
+
|
|
91
|
+
# @!attribute name
|
|
92
|
+
# The name of the payer associated with the payout destination
|
|
93
|
+
#
|
|
94
|
+
# @return [String]
|
|
95
|
+
required :name, String
|
|
96
|
+
|
|
97
|
+
# @!method initialize(category:, country_code:, name:)
|
|
98
|
+
# The payout destination associated with the payout token
|
|
99
|
+
#
|
|
100
|
+
# @param category [Symbol, WhopSDK::Models::PayoutMethodRetrieveResponse::Destination::Category] The category of the payout destination
|
|
101
|
+
#
|
|
102
|
+
# @param country_code [String] The country code of the payout destination
|
|
103
|
+
#
|
|
104
|
+
# @param name [String] The name of the payer associated with the payout destination
|
|
105
|
+
|
|
106
|
+
# The category of the payout destination
|
|
107
|
+
#
|
|
108
|
+
# @see WhopSDK::Models::PayoutMethodRetrieveResponse::Destination#category
|
|
109
|
+
module Category
|
|
110
|
+
extend WhopSDK::Internal::Type::Enum
|
|
111
|
+
|
|
112
|
+
CRYPTO = :crypto
|
|
113
|
+
RTP = :rtp
|
|
114
|
+
NEXT_DAY_BANK = :next_day_bank
|
|
115
|
+
BANK_WIRE = :bank_wire
|
|
116
|
+
DIGITAL_WALLET = :digital_wallet
|
|
117
|
+
UNKNOWN = :unknown
|
|
118
|
+
|
|
119
|
+
# @!method self.values
|
|
120
|
+
# @return [Array<Symbol>]
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
@@ -14,7 +14,7 @@ module WhopSDK
|
|
|
14
14
|
required :company_id, String
|
|
15
15
|
|
|
16
16
|
# @!attribute user_id
|
|
17
|
-
# The ID of the user to create the support chat for
|
|
17
|
+
# The ID (user_xxx) or username of the user to create the support chat for
|
|
18
18
|
#
|
|
19
19
|
# @return [String]
|
|
20
20
|
required :user_id, String
|
|
@@ -22,7 +22,7 @@ module WhopSDK
|
|
|
22
22
|
# @!method initialize(company_id:, user_id:, request_options: {})
|
|
23
23
|
# @param company_id [String] The ID of the company to create the support chat in
|
|
24
24
|
#
|
|
25
|
-
# @param user_id [String] The ID of the user to create the support chat for
|
|
25
|
+
# @param user_id [String] The ID (user_xxx) or username of the user to create the support chat for
|
|
26
26
|
#
|
|
27
27
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
28
28
|
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Topups#create
|
|
6
|
+
class TopupCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute amount
|
|
11
|
+
# The amount to add to the balance.
|
|
12
|
+
#
|
|
13
|
+
# @return [Float]
|
|
14
|
+
required :amount, Float
|
|
15
|
+
|
|
16
|
+
# @!attribute company_id
|
|
17
|
+
# The ID of the company to add funds to.
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :company_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute currency
|
|
23
|
+
# The currency of the top-up.
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, WhopSDK::Models::Currency]
|
|
26
|
+
required :currency, enum: -> { WhopSDK::Currency }
|
|
27
|
+
|
|
28
|
+
# @!attribute payment_method_id
|
|
29
|
+
# The ID of the payment method to charge for the top-up.
|
|
30
|
+
#
|
|
31
|
+
# @return [String]
|
|
32
|
+
required :payment_method_id, String
|
|
33
|
+
|
|
34
|
+
# @!method initialize(amount:, company_id:, currency:, payment_method_id:, request_options: {})
|
|
35
|
+
# @param amount [Float] The amount to add to the balance.
|
|
36
|
+
#
|
|
37
|
+
# @param company_id [String] The ID of the company to add funds to.
|
|
38
|
+
#
|
|
39
|
+
# @param currency [Symbol, WhopSDK::Models::Currency] The currency of the top-up.
|
|
40
|
+
#
|
|
41
|
+
# @param payment_method_id [String] The ID of the payment method to charge for the top-up.
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|