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,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Topups#create
|
|
6
|
+
class TopupCreateResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The payment ID
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created_at
|
|
14
|
+
# The datetime the payment was created
|
|
15
|
+
#
|
|
16
|
+
# @return [Time]
|
|
17
|
+
required :created_at, Time
|
|
18
|
+
|
|
19
|
+
# @!attribute currency
|
|
20
|
+
# The available currencies on the platform
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, WhopSDK::Models::Currency, nil]
|
|
23
|
+
required :currency, enum: -> { WhopSDK::Currency }, nil?: true
|
|
24
|
+
|
|
25
|
+
# @!attribute failure_message
|
|
26
|
+
# If the payment failed, the reason for the failure.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
required :failure_message, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute paid_at
|
|
32
|
+
# The datetime the payment was paid
|
|
33
|
+
#
|
|
34
|
+
# @return [Time, nil]
|
|
35
|
+
required :paid_at, Time, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute status
|
|
38
|
+
# The status of a receipt
|
|
39
|
+
#
|
|
40
|
+
# @return [Symbol, WhopSDK::Models::ReceiptStatus, nil]
|
|
41
|
+
required :status, enum: -> { WhopSDK::ReceiptStatus }, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute total
|
|
44
|
+
# The total to show to the creator (excluding buyer fees).
|
|
45
|
+
#
|
|
46
|
+
# @return [Float, nil]
|
|
47
|
+
required :total, Float, nil?: true
|
|
48
|
+
|
|
49
|
+
# @!method initialize(id:, created_at:, currency:, failure_message:, paid_at:, status:, total:)
|
|
50
|
+
# An object representing a receipt for a membership.
|
|
51
|
+
#
|
|
52
|
+
# @param id [String] The payment ID
|
|
53
|
+
#
|
|
54
|
+
# @param created_at [Time] The datetime the payment was created
|
|
55
|
+
#
|
|
56
|
+
# @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
|
|
57
|
+
#
|
|
58
|
+
# @param failure_message [String, nil] If the payment failed, the reason for the failure.
|
|
59
|
+
#
|
|
60
|
+
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
61
|
+
#
|
|
62
|
+
# @param status [Symbol, WhopSDK::Models::ReceiptStatus, nil] The status of a receipt
|
|
63
|
+
#
|
|
64
|
+
# @param total [Float, nil] The total to show to the creator (excluding buyer fees).
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -40,6 +40,10 @@ module WhopSDK
|
|
|
40
40
|
variant :"course_lesson_interaction.completed",
|
|
41
41
|
-> { WhopSDK::CourseLessonInteractionCompletedWebhookEvent }
|
|
42
42
|
|
|
43
|
+
variant :"payout_method.created", -> { WhopSDK::PayoutMethodCreatedWebhookEvent }
|
|
44
|
+
|
|
45
|
+
variant :"verification.succeeded", -> { WhopSDK::VerificationSucceededWebhookEvent }
|
|
46
|
+
|
|
43
47
|
variant :"payment.created", -> { WhopSDK::PaymentCreatedWebhookEvent }
|
|
44
48
|
|
|
45
49
|
variant :"payment.succeeded", -> { WhopSDK::PaymentSucceededWebhookEvent }
|
|
@@ -56,8 +60,11 @@ module WhopSDK
|
|
|
56
60
|
|
|
57
61
|
variant :"refund.updated", -> { WhopSDK::RefundUpdatedWebhookEvent }
|
|
58
62
|
|
|
63
|
+
variant :"membership.cancel_at_period_end_changed",
|
|
64
|
+
-> { WhopSDK::MembershipCancelAtPeriodEndChangedWebhookEvent }
|
|
65
|
+
|
|
59
66
|
# @!method self.variants
|
|
60
|
-
# @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::WithdrawalCreatedWebhookEvent, WhopSDK::Models::WithdrawalUpdatedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PaymentCreatedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent)]
|
|
67
|
+
# @return [Array(WhopSDK::Models::InvoiceCreatedWebhookEvent, WhopSDK::Models::InvoicePaidWebhookEvent, WhopSDK::Models::InvoicePastDueWebhookEvent, WhopSDK::Models::InvoiceVoidedWebhookEvent, WhopSDK::Models::MembershipActivatedWebhookEvent, WhopSDK::Models::MembershipDeactivatedWebhookEvent, WhopSDK::Models::EntryCreatedWebhookEvent, WhopSDK::Models::EntryApprovedWebhookEvent, WhopSDK::Models::EntryDeniedWebhookEvent, WhopSDK::Models::EntryDeletedWebhookEvent, WhopSDK::Models::SetupIntentRequiresActionWebhookEvent, WhopSDK::Models::SetupIntentSucceededWebhookEvent, WhopSDK::Models::SetupIntentCanceledWebhookEvent, WhopSDK::Models::WithdrawalCreatedWebhookEvent, WhopSDK::Models::WithdrawalUpdatedWebhookEvent, WhopSDK::Models::CourseLessonInteractionCompletedWebhookEvent, WhopSDK::Models::PayoutMethodCreatedWebhookEvent, WhopSDK::Models::VerificationSucceededWebhookEvent, WhopSDK::Models::PaymentCreatedWebhookEvent, WhopSDK::Models::PaymentSucceededWebhookEvent, WhopSDK::Models::PaymentFailedWebhookEvent, WhopSDK::Models::PaymentPendingWebhookEvent, WhopSDK::Models::DisputeCreatedWebhookEvent, WhopSDK::Models::DisputeUpdatedWebhookEvent, WhopSDK::Models::RefundCreatedWebhookEvent, WhopSDK::Models::RefundUpdatedWebhookEvent, WhopSDK::Models::MembershipCancelAtPeriodEndChangedWebhookEvent)]
|
|
61
68
|
end
|
|
62
69
|
end
|
|
63
70
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Verifications#retrieve
|
|
6
|
+
class VerificationRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Verifications#retrieve
|
|
6
|
+
class VerificationRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# A unique identifier for the verification.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute last_error_code
|
|
14
|
+
# An error code for a verification attempt.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode, nil]
|
|
17
|
+
required :last_error_code,
|
|
18
|
+
enum: -> { WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode },
|
|
19
|
+
nil?: true
|
|
20
|
+
|
|
21
|
+
# @!attribute last_error_reason
|
|
22
|
+
# The last error reason that occurred during the verification.
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
required :last_error_reason, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute status
|
|
28
|
+
# The status of the verification.
|
|
29
|
+
#
|
|
30
|
+
# @return [Symbol, WhopSDK::Models::VerificationRetrieveResponse::Status]
|
|
31
|
+
required :status, enum: -> { WhopSDK::Models::VerificationRetrieveResponse::Status }
|
|
32
|
+
|
|
33
|
+
# @!method initialize(id:, last_error_code:, last_error_reason:, status:)
|
|
34
|
+
# An object representing an identity verification session
|
|
35
|
+
#
|
|
36
|
+
# @param id [String] A unique identifier for the verification.
|
|
37
|
+
#
|
|
38
|
+
# @param last_error_code [Symbol, WhopSDK::Models::VerificationRetrieveResponse::LastErrorCode, nil] An error code for a verification attempt.
|
|
39
|
+
#
|
|
40
|
+
# @param last_error_reason [String, nil] The last error reason that occurred during the verification.
|
|
41
|
+
#
|
|
42
|
+
# @param status [Symbol, WhopSDK::Models::VerificationRetrieveResponse::Status] The status of the verification.
|
|
43
|
+
|
|
44
|
+
# An error code for a verification attempt.
|
|
45
|
+
#
|
|
46
|
+
# @see WhopSDK::Models::VerificationRetrieveResponse#last_error_code
|
|
47
|
+
module LastErrorCode
|
|
48
|
+
extend WhopSDK::Internal::Type::Enum
|
|
49
|
+
|
|
50
|
+
ABANDONED = :abandoned
|
|
51
|
+
CONSENT_DECLINED = :consent_declined
|
|
52
|
+
COUNTRY_NOT_SUPPORTED = :country_not_supported
|
|
53
|
+
DEVICE_NOT_SUPPORTED = :device_not_supported
|
|
54
|
+
DOCUMENT_EXPIRED = :document_expired
|
|
55
|
+
DOCUMENT_TYPE_NOT_SUPPORTED = :document_type_not_supported
|
|
56
|
+
DOCUMENT_UNVERIFIED_OTHER = :document_unverified_other
|
|
57
|
+
EMAIL_UNVERIFIED_OTHER = :email_unverified_other
|
|
58
|
+
EMAIL_VERIFICATION_DECLINED = :email_verification_declined
|
|
59
|
+
ID_NUMBER_INSUFFICIENT_DOCUMENT_DATA = :id_number_insufficient_document_data
|
|
60
|
+
ID_NUMBER_MISMATCH = :id_number_mismatch
|
|
61
|
+
ID_NUMBER_UNVERIFIED_OTHER = :id_number_unverified_other
|
|
62
|
+
PHONE_UNVERIFIED_OTHER = :phone_unverified_other
|
|
63
|
+
PHONE_VERIFICATION_DECLINED = :phone_verification_declined
|
|
64
|
+
SELFIE_DOCUMENT_MISSING_PHOTO = :selfie_document_missing_photo
|
|
65
|
+
SELFIE_FACE_MISMATCH = :selfie_face_mismatch
|
|
66
|
+
SELFIE_MANIPULATED = :selfie_manipulated
|
|
67
|
+
SELFIE_UNVERIFIED_OTHER = :selfie_unverified_other
|
|
68
|
+
UNDER_SUPPORTED_AGE = :under_supported_age
|
|
69
|
+
|
|
70
|
+
# @!method self.values
|
|
71
|
+
# @return [Array<Symbol>]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# The status of the verification.
|
|
75
|
+
#
|
|
76
|
+
# @see WhopSDK::Models::VerificationRetrieveResponse#status
|
|
77
|
+
module Status
|
|
78
|
+
extend WhopSDK::Internal::Type::Enum
|
|
79
|
+
|
|
80
|
+
REQUIRES_INPUT = :requires_input
|
|
81
|
+
PROCESSING = :processing
|
|
82
|
+
VERIFIED = :verified
|
|
83
|
+
CANCELED = :canceled
|
|
84
|
+
CREATED = :created
|
|
85
|
+
STARTED = :started
|
|
86
|
+
SUBMITTED = :submitted
|
|
87
|
+
APPROVED = :approved
|
|
88
|
+
DECLINED = :declined
|
|
89
|
+
RESUBMISSION_REQUESTED = :resubmission_requested
|
|
90
|
+
EXPIRED = :expired
|
|
91
|
+
ABANDONED = :abandoned
|
|
92
|
+
REVIEW = :review
|
|
93
|
+
|
|
94
|
+
# @!method self.values
|
|
95
|
+
# @return [Array<Symbol>]
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class VerificationSucceededWebhookEvent < 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 identity verification session
|
|
20
|
+
#
|
|
21
|
+
# @return [WhopSDK::Models::VerificationSucceededWebhookEvent::Data]
|
|
22
|
+
required :data, -> { WhopSDK::VerificationSucceededWebhookEvent::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, :"verification.succeeded"]
|
|
34
|
+
required :type, const: :"verification.succeeded"
|
|
35
|
+
|
|
36
|
+
# @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"verification.succeeded")
|
|
37
|
+
# @param id [String] A unique ID for every single webhook request
|
|
38
|
+
#
|
|
39
|
+
# @param data [WhopSDK::Models::VerificationSucceededWebhookEvent::Data] An object representing an identity verification session
|
|
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, :"verification.succeeded"] The webhook event type
|
|
46
|
+
|
|
47
|
+
# @see WhopSDK::Models::VerificationSucceededWebhookEvent#data
|
|
48
|
+
class Data < WhopSDK::Internal::Type::BaseModel
|
|
49
|
+
# @!attribute id
|
|
50
|
+
# A unique identifier for the verification.
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
required :id, String
|
|
54
|
+
|
|
55
|
+
# @!attribute last_error_code
|
|
56
|
+
# An error code for a verification attempt.
|
|
57
|
+
#
|
|
58
|
+
# @return [Symbol, WhopSDK::Models::VerificationSucceededWebhookEvent::Data::LastErrorCode, nil]
|
|
59
|
+
required :last_error_code,
|
|
60
|
+
enum: -> { WhopSDK::VerificationSucceededWebhookEvent::Data::LastErrorCode },
|
|
61
|
+
nil?: true
|
|
62
|
+
|
|
63
|
+
# @!attribute last_error_reason
|
|
64
|
+
# The last error reason that occurred during the verification.
|
|
65
|
+
#
|
|
66
|
+
# @return [String, nil]
|
|
67
|
+
required :last_error_reason, String, nil?: true
|
|
68
|
+
|
|
69
|
+
# @!attribute status
|
|
70
|
+
# The status of the verification.
|
|
71
|
+
#
|
|
72
|
+
# @return [Symbol, WhopSDK::Models::VerificationSucceededWebhookEvent::Data::Status]
|
|
73
|
+
required :status, enum: -> { WhopSDK::VerificationSucceededWebhookEvent::Data::Status }
|
|
74
|
+
|
|
75
|
+
# @!method initialize(id:, last_error_code:, last_error_reason:, status:)
|
|
76
|
+
# An object representing an identity verification session
|
|
77
|
+
#
|
|
78
|
+
# @param id [String] A unique identifier for the verification.
|
|
79
|
+
#
|
|
80
|
+
# @param last_error_code [Symbol, WhopSDK::Models::VerificationSucceededWebhookEvent::Data::LastErrorCode, nil] An error code for a verification attempt.
|
|
81
|
+
#
|
|
82
|
+
# @param last_error_reason [String, nil] The last error reason that occurred during the verification.
|
|
83
|
+
#
|
|
84
|
+
# @param status [Symbol, WhopSDK::Models::VerificationSucceededWebhookEvent::Data::Status] The status of the verification.
|
|
85
|
+
|
|
86
|
+
# An error code for a verification attempt.
|
|
87
|
+
#
|
|
88
|
+
# @see WhopSDK::Models::VerificationSucceededWebhookEvent::Data#last_error_code
|
|
89
|
+
module LastErrorCode
|
|
90
|
+
extend WhopSDK::Internal::Type::Enum
|
|
91
|
+
|
|
92
|
+
ABANDONED = :abandoned
|
|
93
|
+
CONSENT_DECLINED = :consent_declined
|
|
94
|
+
COUNTRY_NOT_SUPPORTED = :country_not_supported
|
|
95
|
+
DEVICE_NOT_SUPPORTED = :device_not_supported
|
|
96
|
+
DOCUMENT_EXPIRED = :document_expired
|
|
97
|
+
DOCUMENT_TYPE_NOT_SUPPORTED = :document_type_not_supported
|
|
98
|
+
DOCUMENT_UNVERIFIED_OTHER = :document_unverified_other
|
|
99
|
+
EMAIL_UNVERIFIED_OTHER = :email_unverified_other
|
|
100
|
+
EMAIL_VERIFICATION_DECLINED = :email_verification_declined
|
|
101
|
+
ID_NUMBER_INSUFFICIENT_DOCUMENT_DATA = :id_number_insufficient_document_data
|
|
102
|
+
ID_NUMBER_MISMATCH = :id_number_mismatch
|
|
103
|
+
ID_NUMBER_UNVERIFIED_OTHER = :id_number_unverified_other
|
|
104
|
+
PHONE_UNVERIFIED_OTHER = :phone_unverified_other
|
|
105
|
+
PHONE_VERIFICATION_DECLINED = :phone_verification_declined
|
|
106
|
+
SELFIE_DOCUMENT_MISSING_PHOTO = :selfie_document_missing_photo
|
|
107
|
+
SELFIE_FACE_MISMATCH = :selfie_face_mismatch
|
|
108
|
+
SELFIE_MANIPULATED = :selfie_manipulated
|
|
109
|
+
SELFIE_UNVERIFIED_OTHER = :selfie_unverified_other
|
|
110
|
+
UNDER_SUPPORTED_AGE = :under_supported_age
|
|
111
|
+
|
|
112
|
+
# @!method self.values
|
|
113
|
+
# @return [Array<Symbol>]
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# The status of the verification.
|
|
117
|
+
#
|
|
118
|
+
# @see WhopSDK::Models::VerificationSucceededWebhookEvent::Data#status
|
|
119
|
+
module Status
|
|
120
|
+
extend WhopSDK::Internal::Type::Enum
|
|
121
|
+
|
|
122
|
+
REQUIRES_INPUT = :requires_input
|
|
123
|
+
PROCESSING = :processing
|
|
124
|
+
VERIFIED = :verified
|
|
125
|
+
CANCELED = :canceled
|
|
126
|
+
CREATED = :created
|
|
127
|
+
STARTED = :started
|
|
128
|
+
SUBMITTED = :submitted
|
|
129
|
+
APPROVED = :approved
|
|
130
|
+
DECLINED = :declined
|
|
131
|
+
RESUBMISSION_REQUESTED = :resubmission_requested
|
|
132
|
+
EXPIRED = :expired
|
|
133
|
+
ABANDONED = :abandoned
|
|
134
|
+
REVIEW = :review
|
|
135
|
+
|
|
136
|
+
# @!method self.values
|
|
137
|
+
# @return [Array<Symbol>]
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
data/lib/whop_sdk/models.rb
CHANGED
|
@@ -302,6 +302,14 @@ module WhopSDK
|
|
|
302
302
|
|
|
303
303
|
Languages = WhopSDK::Models::Languages
|
|
304
304
|
|
|
305
|
+
LeadCreateParams = WhopSDK::Models::LeadCreateParams
|
|
306
|
+
|
|
307
|
+
LeadListParams = WhopSDK::Models::LeadListParams
|
|
308
|
+
|
|
309
|
+
LeadRetrieveParams = WhopSDK::Models::LeadRetrieveParams
|
|
310
|
+
|
|
311
|
+
LeadUpdateParams = WhopSDK::Models::LeadUpdateParams
|
|
312
|
+
|
|
305
313
|
LedgerAccountRetrieveParams = WhopSDK::Models::LedgerAccountRetrieveParams
|
|
306
314
|
|
|
307
315
|
Lesson = WhopSDK::Models::Lesson
|
|
@@ -320,6 +328,9 @@ module WhopSDK
|
|
|
320
328
|
|
|
321
329
|
MembershipActivatedWebhookEvent = WhopSDK::Models::MembershipActivatedWebhookEvent
|
|
322
330
|
|
|
331
|
+
MembershipCancelAtPeriodEndChangedWebhookEvent =
|
|
332
|
+
WhopSDK::Models::MembershipCancelAtPeriodEndChangedWebhookEvent
|
|
333
|
+
|
|
323
334
|
MembershipCancelParams = WhopSDK::Models::MembershipCancelParams
|
|
324
335
|
|
|
325
336
|
MembershipDeactivatedWebhookEvent = WhopSDK::Models::MembershipDeactivatedWebhookEvent
|
|
@@ -384,8 +395,12 @@ module WhopSDK
|
|
|
384
395
|
|
|
385
396
|
PaymentVoidParams = WhopSDK::Models::PaymentVoidParams
|
|
386
397
|
|
|
398
|
+
PayoutMethodCreatedWebhookEvent = WhopSDK::Models::PayoutMethodCreatedWebhookEvent
|
|
399
|
+
|
|
387
400
|
PayoutMethodListParams = WhopSDK::Models::PayoutMethodListParams
|
|
388
401
|
|
|
402
|
+
PayoutMethodRetrieveParams = WhopSDK::Models::PayoutMethodRetrieveParams
|
|
403
|
+
|
|
389
404
|
Plan = WhopSDK::Models::Plan
|
|
390
405
|
|
|
391
406
|
PlanCreateParams = WhopSDK::Models::PlanCreateParams
|
|
@@ -500,6 +515,8 @@ module WhopSDK
|
|
|
500
515
|
|
|
501
516
|
TaxType = WhopSDK::Models::TaxType
|
|
502
517
|
|
|
518
|
+
TopupCreateParams = WhopSDK::Models::TopupCreateParams
|
|
519
|
+
|
|
503
520
|
Transfer = WhopSDK::Models::Transfer
|
|
504
521
|
|
|
505
522
|
TransferCreateParams = WhopSDK::Models::TransferCreateParams
|
|
@@ -514,6 +531,10 @@ module WhopSDK
|
|
|
514
531
|
|
|
515
532
|
UserRetrieveParams = WhopSDK::Models::UserRetrieveParams
|
|
516
533
|
|
|
534
|
+
VerificationRetrieveParams = WhopSDK::Models::VerificationRetrieveParams
|
|
535
|
+
|
|
536
|
+
VerificationSucceededWebhookEvent = WhopSDK::Models::VerificationSucceededWebhookEvent
|
|
537
|
+
|
|
517
538
|
Visibility = WhopSDK::Models::Visibility
|
|
518
539
|
|
|
519
540
|
VisibilityFilter = WhopSDK::Models::VisibilityFilter
|
|
@@ -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.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Leads
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {WhopSDK::Models::LeadCreateParams} for more details.
|
|
8
|
+
#
|
|
9
|
+
# Creates a new lead
|
|
10
|
+
#
|
|
11
|
+
# Required permissions:
|
|
12
|
+
#
|
|
13
|
+
# - `lead:manage`
|
|
14
|
+
# - `member:email:read`
|
|
15
|
+
# - `access_pass:basic:read`
|
|
16
|
+
# - `member:basic:read`
|
|
17
|
+
#
|
|
18
|
+
# @overload create(company_id:, metadata: nil, product_id: nil, referrer: nil, user_id: nil, request_options: {})
|
|
19
|
+
#
|
|
20
|
+
# @param company_id [String] The ID of the company to create a lead for.
|
|
21
|
+
#
|
|
22
|
+
# @param metadata [Hash{Symbol=>Object}, nil] Custom metadata for the lead.
|
|
23
|
+
#
|
|
24
|
+
# @param product_id [String, nil] The ID of the product the lead is interested in.
|
|
25
|
+
#
|
|
26
|
+
# @param referrer [String, nil] The url referrer of the lead, if any.
|
|
27
|
+
#
|
|
28
|
+
# @param user_id [String, nil] The ID of the user to create a lead for. If the request is made by a user, that
|
|
29
|
+
#
|
|
30
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
31
|
+
#
|
|
32
|
+
# @return [WhopSDK::Models::LeadCreateResponse]
|
|
33
|
+
#
|
|
34
|
+
# @see WhopSDK::Models::LeadCreateParams
|
|
35
|
+
def create(params)
|
|
36
|
+
parsed, options = WhopSDK::LeadCreateParams.dump_request(params)
|
|
37
|
+
@client.request(
|
|
38
|
+
method: :post,
|
|
39
|
+
path: "leads",
|
|
40
|
+
body: parsed,
|
|
41
|
+
model: WhopSDK::Models::LeadCreateResponse,
|
|
42
|
+
options: options
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Retrieves a lead by ID
|
|
47
|
+
#
|
|
48
|
+
# Required permissions:
|
|
49
|
+
#
|
|
50
|
+
# - `lead:basic:read`
|
|
51
|
+
# - `member:email:read`
|
|
52
|
+
# - `access_pass:basic:read`
|
|
53
|
+
# - `member:basic:read`
|
|
54
|
+
#
|
|
55
|
+
# @overload retrieve(id, request_options: {})
|
|
56
|
+
#
|
|
57
|
+
# @param id [String] The ID of the lead
|
|
58
|
+
#
|
|
59
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
60
|
+
#
|
|
61
|
+
# @return [WhopSDK::Models::LeadRetrieveResponse]
|
|
62
|
+
#
|
|
63
|
+
# @see WhopSDK::Models::LeadRetrieveParams
|
|
64
|
+
def retrieve(id, params = {})
|
|
65
|
+
@client.request(
|
|
66
|
+
method: :get,
|
|
67
|
+
path: ["leads/%1$s", id],
|
|
68
|
+
model: WhopSDK::Models::LeadRetrieveResponse,
|
|
69
|
+
options: params[:request_options]
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Updates a lead
|
|
74
|
+
#
|
|
75
|
+
# Required permissions:
|
|
76
|
+
#
|
|
77
|
+
# - `lead:manage`
|
|
78
|
+
# - `member:email:read`
|
|
79
|
+
# - `access_pass:basic:read`
|
|
80
|
+
# - `member:basic:read`
|
|
81
|
+
#
|
|
82
|
+
# @overload update(id, metadata: nil, referrer: nil, request_options: {})
|
|
83
|
+
#
|
|
84
|
+
# @param id [String] The ID of the lead to update.
|
|
85
|
+
#
|
|
86
|
+
# @param metadata [Hash{Symbol=>Object}, nil] Custom metadata for the lead.
|
|
87
|
+
#
|
|
88
|
+
# @param referrer [String, nil] The url referrer of the lead.
|
|
89
|
+
#
|
|
90
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
91
|
+
#
|
|
92
|
+
# @return [WhopSDK::Models::LeadUpdateResponse]
|
|
93
|
+
#
|
|
94
|
+
# @see WhopSDK::Models::LeadUpdateParams
|
|
95
|
+
def update(id, params = {})
|
|
96
|
+
parsed, options = WhopSDK::LeadUpdateParams.dump_request(params)
|
|
97
|
+
@client.request(
|
|
98
|
+
method: :patch,
|
|
99
|
+
path: ["leads/%1$s", id],
|
|
100
|
+
body: parsed,
|
|
101
|
+
model: WhopSDK::Models::LeadUpdateResponse,
|
|
102
|
+
options: options
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Lists leads for a company
|
|
107
|
+
#
|
|
108
|
+
# Required permissions:
|
|
109
|
+
#
|
|
110
|
+
# - `lead:basic:read`
|
|
111
|
+
# - `member:email:read`
|
|
112
|
+
# - `access_pass:basic:read`
|
|
113
|
+
# - `member:basic:read`
|
|
114
|
+
#
|
|
115
|
+
# @overload list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, first: nil, last: nil, product_ids: nil, request_options: {})
|
|
116
|
+
#
|
|
117
|
+
# @param company_id [String] The ID of the company to list leads for
|
|
118
|
+
#
|
|
119
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
120
|
+
#
|
|
121
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
122
|
+
#
|
|
123
|
+
# @param created_after [Time, nil] The minimum creation date to filter by
|
|
124
|
+
#
|
|
125
|
+
# @param created_before [Time, nil] The maximum creation date to filter by
|
|
126
|
+
#
|
|
127
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
128
|
+
#
|
|
129
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
130
|
+
#
|
|
131
|
+
# @param product_ids [Array<String>, nil] The product IDs to filter the leads by
|
|
132
|
+
#
|
|
133
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
134
|
+
#
|
|
135
|
+
# @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::LeadListResponse>]
|
|
136
|
+
#
|
|
137
|
+
# @see WhopSDK::Models::LeadListParams
|
|
138
|
+
def list(params)
|
|
139
|
+
parsed, options = WhopSDK::LeadListParams.dump_request(params)
|
|
140
|
+
@client.request(
|
|
141
|
+
method: :get,
|
|
142
|
+
path: "leads",
|
|
143
|
+
query: parsed,
|
|
144
|
+
page: WhopSDK::Internal::CursorPage,
|
|
145
|
+
model: WhopSDK::Models::LeadListResponse,
|
|
146
|
+
options: options
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# @api private
|
|
151
|
+
#
|
|
152
|
+
# @param client [WhopSDK::Client]
|
|
153
|
+
def initialize(client:)
|
|
154
|
+
@client = client
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
@@ -7,24 +7,26 @@ module WhopSDK
|
|
|
7
7
|
# such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
8
8
|
# details and can be attached to a member for future one-time or recurring
|
|
9
9
|
# charges. This lets you reuse the same payment credentials across multiple
|
|
10
|
-
# payments.
|
|
10
|
+
# payments. You must provide exactly one of company_id or member_id.
|
|
11
11
|
#
|
|
12
12
|
# Required permissions:
|
|
13
13
|
#
|
|
14
14
|
# - `member:payment_methods:read`
|
|
15
15
|
#
|
|
16
|
-
# @overload retrieve(id, member_id
|
|
16
|
+
# @overload retrieve(id, company_id: nil, member_id: nil, request_options: {})
|
|
17
17
|
#
|
|
18
18
|
# @param id [String] The ID of the PaymentMethod
|
|
19
19
|
#
|
|
20
|
-
# @param
|
|
20
|
+
# @param company_id [String, nil] The ID of the Company. Provide either this or member_id (not both).
|
|
21
|
+
#
|
|
22
|
+
# @param member_id [String, nil] The ID of the Member. Provide either this or company_id (not both).
|
|
21
23
|
#
|
|
22
24
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
23
25
|
#
|
|
24
26
|
# @return [WhopSDK::Models::PaymentMethodRetrieveResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::UsBankAccountPaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::CashappPaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::IdealPaymentMethod, WhopSDK::Models::PaymentMethodRetrieveResponse::SepaDebitPaymentMethod]
|
|
25
27
|
#
|
|
26
28
|
# @see WhopSDK::Models::PaymentMethodRetrieveParams
|
|
27
|
-
def retrieve(id, params)
|
|
29
|
+
def retrieve(id, params = {})
|
|
28
30
|
parsed, options = WhopSDK::PaymentMethodRetrieveParams.dump_request(params)
|
|
29
31
|
@client.request(
|
|
30
32
|
method: :get,
|
|
@@ -45,14 +47,14 @@ module WhopSDK
|
|
|
45
47
|
#
|
|
46
48
|
# - `member:payment_methods:read`
|
|
47
49
|
#
|
|
48
|
-
# @overload list(
|
|
49
|
-
#
|
|
50
|
-
# @param member_id [String] The ID of the Member to list payment methods for
|
|
50
|
+
# @overload list(after: nil, before: nil, company_id: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, member_id: nil, request_options: {})
|
|
51
51
|
#
|
|
52
52
|
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
53
53
|
#
|
|
54
54
|
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
55
55
|
#
|
|
56
|
+
# @param company_id [String, nil] The ID of the Company. Provide either this or member_id (not both).
|
|
57
|
+
#
|
|
56
58
|
# @param created_after [Time, nil] The minimum creation date to filter by
|
|
57
59
|
#
|
|
58
60
|
# @param created_before [Time, nil] The maximum creation date to filter by
|
|
@@ -63,12 +65,14 @@ module WhopSDK
|
|
|
63
65
|
#
|
|
64
66
|
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
65
67
|
#
|
|
68
|
+
# @param member_id [String, nil] The ID of the Member to list payment methods for
|
|
69
|
+
#
|
|
66
70
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
67
71
|
#
|
|
68
72
|
# @return [WhopSDK::Internal::CursorPage<WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CashappPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::IdealPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::SepaDebitPaymentMethod>]
|
|
69
73
|
#
|
|
70
74
|
# @see WhopSDK::Models::PaymentMethodListParams
|
|
71
|
-
def list(params)
|
|
75
|
+
def list(params = {})
|
|
72
76
|
parsed, options = WhopSDK::PaymentMethodListParams.dump_request(params)
|
|
73
77
|
@client.request(
|
|
74
78
|
method: :get,
|