whop_sdk 0.0.14 → 0.0.16
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 +24 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +8 -0
- data/lib/whop_sdk/models/checkout_configuration.rb +9 -1
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +9 -1
- data/lib/whop_sdk/models/course.rb +57 -1
- data/lib/whop_sdk/models/course_lesson_interaction.rb +23 -1
- data/lib/whop_sdk/models/course_lesson_interaction_list_item.rb +23 -1
- data/lib/whop_sdk/models/experience.rb +9 -1
- data/lib/whop_sdk/models/experience_create_params.rb +9 -1
- data/lib/whop_sdk/models/experience_list_response.rb +9 -1
- data/lib/whop_sdk/models/experience_update_params.rb +9 -1
- data/lib/whop_sdk/models/fee_markup_create_params.rb +62 -0
- data/lib/whop_sdk/models/fee_markup_create_response.rb +67 -0
- data/lib/whop_sdk/models/fee_markup_delete_params.rb +14 -0
- data/lib/whop_sdk/models/fee_markup_delete_response.rb +8 -0
- data/lib/whop_sdk/models/fee_markup_list_params.rb +58 -0
- data/lib/whop_sdk/models/fee_markup_list_response.rb +67 -0
- data/lib/whop_sdk/models/fee_markup_type.rb +19 -0
- data/lib/whop_sdk/models/payment_list_fees_params.rb +46 -0
- data/lib/whop_sdk/models/payment_list_fees_response.rb +84 -0
- data/lib/whop_sdk/models/payment_method_list_response.rb +214 -76
- data/lib/whop_sdk/models/payment_method_retrieve_response.rb +214 -76
- data/lib/whop_sdk/models/payout_method_list_params.rb +54 -0
- data/lib/whop_sdk/models/payout_method_list_response.rb +95 -0
- data/lib/whop_sdk/models/withdrawal_create_params.rb +46 -0
- data/lib/whop_sdk/models/withdrawal_create_response.rb +275 -0
- data/lib/whop_sdk/models.rb +14 -0
- data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
- data/lib/whop_sdk/resources/experiences.rb +6 -2
- data/lib/whop_sdk/resources/fee_markups.rb +112 -0
- data/lib/whop_sdk/resources/payment_methods.rb +2 -2
- data/lib/whop_sdk/resources/payments.rb +35 -0
- data/lib/whop_sdk/resources/payout_methods.rb +49 -0
- data/lib/whop_sdk/resources/withdrawals.rb +34 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +15 -0
- data/rbi/whop_sdk/client.rbi +6 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +8 -0
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/course.rbi +115 -3
- data/rbi/whop_sdk/models/course_lesson_interaction.rbi +55 -2
- data/rbi/whop_sdk/models/course_lesson_interaction_list_item.rbi +60 -2
- data/rbi/whop_sdk/models/experience.rbi +8 -0
- data/rbi/whop_sdk/models/experience_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/experience_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/experience_update_params.rbi +8 -0
- data/rbi/whop_sdk/models/fee_markup_create_params.rbi +83 -0
- data/rbi/whop_sdk/models/fee_markup_create_response.rbi +89 -0
- data/rbi/whop_sdk/models/fee_markup_delete_params.rbi +27 -0
- data/rbi/whop_sdk/models/fee_markup_delete_response.rbi +8 -0
- data/rbi/whop_sdk/models/fee_markup_list_params.rbi +77 -0
- data/rbi/whop_sdk/models/fee_markup_list_response.rbi +89 -0
- data/rbi/whop_sdk/models/fee_markup_type.rbi +37 -0
- data/rbi/whop_sdk/models/payment_list_fees_params.rbi +67 -0
- data/rbi/whop_sdk/models/payment_list_fees_response.rbi +239 -0
- data/rbi/whop_sdk/models/payment_method_list_response.rbi +305 -83
- data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +305 -88
- data/rbi/whop_sdk/models/payout_method_list_params.rbi +75 -0
- data/rbi/whop_sdk/models/payout_method_list_response.rbi +200 -0
- data/rbi/whop_sdk/models/withdrawal_create_params.rbi +67 -0
- data/rbi/whop_sdk/models/withdrawal_create_response.rbi +564 -0
- data/rbi/whop_sdk/models.rbi +14 -0
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
- data/rbi/whop_sdk/resources/experiences.rbi +6 -0
- data/rbi/whop_sdk/resources/fee_markups.rbi +96 -0
- data/rbi/whop_sdk/resources/payment_methods.rbi +2 -2
- data/rbi/whop_sdk/resources/payments.rbi +34 -0
- data/rbi/whop_sdk/resources/payout_methods.rbi +46 -0
- data/rbi/whop_sdk/resources/withdrawals.rbi +29 -0
- data/sig/whop_sdk/client.rbs +4 -0
- data/sig/whop_sdk/models/checkout_configuration.rbs +5 -0
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
- data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +5 -0
- data/sig/whop_sdk/models/course.rbs +45 -3
- data/sig/whop_sdk/models/course_lesson_interaction.rbs +28 -3
- data/sig/whop_sdk/models/course_lesson_interaction_list_item.rbs +28 -3
- data/sig/whop_sdk/models/experience.rbs +5 -0
- data/sig/whop_sdk/models/experience_create_params.rbs +11 -1
- data/sig/whop_sdk/models/experience_list_response.rbs +5 -0
- data/sig/whop_sdk/models/experience_update_params.rbs +5 -0
- data/sig/whop_sdk/models/fee_markup_create_params.rbs +51 -0
- data/sig/whop_sdk/models/fee_markup_create_response.rbs +50 -0
- data/sig/whop_sdk/models/fee_markup_delete_params.rbs +15 -0
- data/sig/whop_sdk/models/fee_markup_delete_response.rbs +5 -0
- data/sig/whop_sdk/models/fee_markup_list_params.rbs +46 -0
- data/sig/whop_sdk/models/fee_markup_list_response.rbs +50 -0
- data/sig/whop_sdk/models/fee_markup_type.rbs +22 -0
- data/sig/whop_sdk/models/payment_list_fees_params.rbs +36 -0
- data/sig/whop_sdk/models/payment_list_fees_response.rbs +104 -0
- data/sig/whop_sdk/models/payment_method_list_response.rbs +149 -41
- data/sig/whop_sdk/models/payment_method_retrieve_response.rbs +149 -41
- data/sig/whop_sdk/models/payout_method_list_params.rbs +46 -0
- data/sig/whop_sdk/models/payout_method_list_response.rbs +83 -0
- data/sig/whop_sdk/models/withdrawal_create_params.rbs +41 -0
- data/sig/whop_sdk/models/withdrawal_create_response.rbs +243 -0
- data/sig/whop_sdk/models.rbs +14 -0
- data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
- data/sig/whop_sdk/resources/experiences.rbs +2 -0
- data/sig/whop_sdk/resources/fee_markups.rbs +28 -0
- data/sig/whop_sdk/resources/payment_methods.rbs +2 -2
- data/sig/whop_sdk/resources/payments.rbs +9 -0
- data/sig/whop_sdk/resources/payout_methods.rbs +16 -0
- data/sig/whop_sdk/resources/withdrawals.rbs +8 -0
- metadata +47 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::FeeMarkups#list
|
|
6
|
+
class FeeMarkupListResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The unique identifier of the fee markup.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created_at
|
|
14
|
+
# When this fee markup was created.
|
|
15
|
+
#
|
|
16
|
+
# @return [Time]
|
|
17
|
+
required :created_at, Time
|
|
18
|
+
|
|
19
|
+
# @!attribute fee_type
|
|
20
|
+
# The type of fee this markup applies to.
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, WhopSDK::Models::FeeMarkupType]
|
|
23
|
+
required :fee_type, enum: -> { WhopSDK::FeeMarkupType }
|
|
24
|
+
|
|
25
|
+
# @!attribute fixed_fee_usd
|
|
26
|
+
# The fixed fee in USD to charge (0-50).
|
|
27
|
+
#
|
|
28
|
+
# @return [Float, nil]
|
|
29
|
+
required :fixed_fee_usd, Float, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute notes
|
|
32
|
+
# Internal notes about this fee markup.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
required :notes, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute percentage_fee
|
|
38
|
+
# The percentage fee to charge (0-25).
|
|
39
|
+
#
|
|
40
|
+
# @return [Float, nil]
|
|
41
|
+
required :percentage_fee, Float, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute updated_at
|
|
44
|
+
# When this fee markup was last updated.
|
|
45
|
+
#
|
|
46
|
+
# @return [Time]
|
|
47
|
+
required :updated_at, Time
|
|
48
|
+
|
|
49
|
+
# @!method initialize(id:, created_at:, fee_type:, fixed_fee_usd:, notes:, percentage_fee:, updated_at:)
|
|
50
|
+
# Represents a fee markup configuration for a company
|
|
51
|
+
#
|
|
52
|
+
# @param id [String] The unique identifier of the fee markup.
|
|
53
|
+
#
|
|
54
|
+
# @param created_at [Time] When this fee markup was created.
|
|
55
|
+
#
|
|
56
|
+
# @param fee_type [Symbol, WhopSDK::Models::FeeMarkupType] The type of fee this markup applies to.
|
|
57
|
+
#
|
|
58
|
+
# @param fixed_fee_usd [Float, nil] The fixed fee in USD to charge (0-50).
|
|
59
|
+
#
|
|
60
|
+
# @param notes [String, nil] Internal notes about this fee markup.
|
|
61
|
+
#
|
|
62
|
+
# @param percentage_fee [Float, nil] The percentage fee to charge (0-25).
|
|
63
|
+
#
|
|
64
|
+
# @param updated_at [Time] When this fee markup was last updated.
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# The types of fee markups that can be configured
|
|
6
|
+
module FeeMarkupType
|
|
7
|
+
extend WhopSDK::Internal::Type::Enum
|
|
8
|
+
|
|
9
|
+
CRYPTO_WITHDRAWAL_MARKUP = :crypto_withdrawal_markup
|
|
10
|
+
RTP_WITHDRAWAL_MARKUP = :rtp_withdrawal_markup
|
|
11
|
+
NEXT_DAY_BANK_WITHDRAWAL_MARKUP = :next_day_bank_withdrawal_markup
|
|
12
|
+
BANK_WIRE_WITHDRAWAL_MARKUP = :bank_wire_withdrawal_markup
|
|
13
|
+
DIGITAL_WALLET_WITHDRAWAL_MARKUP = :digital_wallet_withdrawal_markup
|
|
14
|
+
|
|
15
|
+
# @!method self.values
|
|
16
|
+
# @return [Array<Symbol>]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Payments#list_fees
|
|
6
|
+
class PaymentListFeesParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute after
|
|
11
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :after, String, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute before
|
|
17
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :before, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute first
|
|
23
|
+
# Returns the first _n_ elements from the list.
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :first, Integer, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute last
|
|
29
|
+
# Returns the last _n_ elements from the list.
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :last, Integer, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!method initialize(after: nil, before: nil, first: nil, last: nil, request_options: {})
|
|
35
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
36
|
+
#
|
|
37
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
38
|
+
#
|
|
39
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
40
|
+
#
|
|
41
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::Payments#list_fees
|
|
6
|
+
class PaymentListFeesResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute amount
|
|
8
|
+
# The value or amount to display for the fee.
|
|
9
|
+
#
|
|
10
|
+
# @return [Float]
|
|
11
|
+
required :amount, Float
|
|
12
|
+
|
|
13
|
+
# @!attribute currency
|
|
14
|
+
# The currency of the fee.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, WhopSDK::Models::Currency]
|
|
17
|
+
required :currency, enum: -> { WhopSDK::Currency }
|
|
18
|
+
|
|
19
|
+
# @!attribute name
|
|
20
|
+
# The label to display for the fee.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :name, String
|
|
24
|
+
|
|
25
|
+
# @!attribute type
|
|
26
|
+
# The specific origin of the fee, if applicable.
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, WhopSDK::Models::PaymentListFeesResponse::Type]
|
|
29
|
+
required :type, enum: -> { WhopSDK::Models::PaymentListFeesResponse::Type }
|
|
30
|
+
|
|
31
|
+
# @!method initialize(amount:, currency:, name:, type:)
|
|
32
|
+
# Represents a fee related to a payment
|
|
33
|
+
#
|
|
34
|
+
# @param amount [Float] The value or amount to display for the fee.
|
|
35
|
+
#
|
|
36
|
+
# @param currency [Symbol, WhopSDK::Models::Currency] The currency of the fee.
|
|
37
|
+
#
|
|
38
|
+
# @param name [String] The label to display for the fee.
|
|
39
|
+
#
|
|
40
|
+
# @param type [Symbol, WhopSDK::Models::PaymentListFeesResponse::Type] The specific origin of the fee, if applicable.
|
|
41
|
+
|
|
42
|
+
# The specific origin of the fee, if applicable.
|
|
43
|
+
#
|
|
44
|
+
# @see WhopSDK::Models::PaymentListFeesResponse#type
|
|
45
|
+
module Type
|
|
46
|
+
extend WhopSDK::Internal::Type::Enum
|
|
47
|
+
|
|
48
|
+
STRIPE_DOMESTIC_PROCESSING_FEE = :stripe_domestic_processing_fee
|
|
49
|
+
STRIPE_INTERNATIONAL_PROCESSING_FEE = :stripe_international_processing_fee
|
|
50
|
+
STRIPE_FIXED_PROCESSING_FEE = :stripe_fixed_processing_fee
|
|
51
|
+
STRIPE_BILLING_FEE = :stripe_billing_fee
|
|
52
|
+
STRIPE_RADAR_FEE = :stripe_radar_fee
|
|
53
|
+
SALES_TAX_REMITTANCE = :sales_tax_remittance
|
|
54
|
+
SALES_TAX_REMITTANCE_REVERSAL = :sales_tax_remittance_reversal
|
|
55
|
+
STRIPE_SALES_TAX_FEE = :stripe_sales_tax_fee
|
|
56
|
+
WHOP_PROCESSING_FEE = :whop_processing_fee
|
|
57
|
+
MARKETPLACE_AFFILIATE_FEE = :marketplace_affiliate_fee
|
|
58
|
+
AFFILIATE_FEE = :affiliate_fee
|
|
59
|
+
CRYPTO_FEE = :crypto_fee
|
|
60
|
+
STRIPE_STANDARD_PROCESSING_FEE = :stripe_standard_processing_fee
|
|
61
|
+
PAYPAL_FEE = :paypal_fee
|
|
62
|
+
STRIPE_PAYOUT_FEE = :stripe_payout_fee
|
|
63
|
+
DISPUTE_FEE = :dispute_fee
|
|
64
|
+
DISPUTE_ALERT_FEE = :dispute_alert_fee
|
|
65
|
+
APPLE_PROCESSING_FEE = :apple_processing_fee
|
|
66
|
+
BUYER_FEE = :buyer_fee
|
|
67
|
+
SEZZLE_PROCESSING_FEE = :sezzle_processing_fee
|
|
68
|
+
SPLITIT_PROCESSING_FEE = :splitit_processing_fee
|
|
69
|
+
PLATFORM_BALANCE_PROCESSING_FEE = :platform_balance_processing_fee
|
|
70
|
+
PAYMENT_PROCESSING_PERCENTAGE_FEE = :payment_processing_percentage_fee
|
|
71
|
+
PAYMENT_PROCESSING_FIXED_FEE = :payment_processing_fixed_fee
|
|
72
|
+
CROSS_BORDER_PERCENTAGE_FEE = :cross_border_percentage_fee
|
|
73
|
+
FX_PERCENTAGE_FEE = :fx_percentage_fee
|
|
74
|
+
ORCHESTRATION_PERCENTAGE_FEE = :orchestration_percentage_fee
|
|
75
|
+
THREE_DS_FIXED_FEE = :three_ds_fixed_fee
|
|
76
|
+
BILLING_PERCENTAGE_FEE = :billing_percentage_fee
|
|
77
|
+
REVSHARE_PERCENTAGE_FEE = :revshare_percentage_fee
|
|
78
|
+
|
|
79
|
+
# @!method self.values
|
|
80
|
+
# @return [Array<Symbol>]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -2,84 +2,222 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
+
# A payment method with no additional properties
|
|
6
|
+
#
|
|
5
7
|
# @see WhopSDK::Resources::PaymentMethods#list
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# @
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
# @return [Integer, nil]
|
|
58
|
-
required :exp_month, Integer, nil?: true
|
|
59
|
-
|
|
60
|
-
# @!attribute exp_year
|
|
61
|
-
# Card expiration year, like 27 for 2027.
|
|
62
|
-
#
|
|
63
|
-
# @return [Integer, nil]
|
|
64
|
-
required :exp_year, Integer, nil?: true
|
|
65
|
-
|
|
66
|
-
# @!attribute last4
|
|
67
|
-
# Last four digits of the card.
|
|
68
|
-
#
|
|
69
|
-
# @return [String, nil]
|
|
70
|
-
required :last4, String, nil?: true
|
|
71
|
-
|
|
72
|
-
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
73
|
-
# The card data associated with the payment method, if its a debit or credit card.
|
|
74
|
-
#
|
|
75
|
-
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
76
|
-
#
|
|
77
|
-
# @param exp_month [Integer, nil] Card expiration month, like 03 for March.
|
|
78
|
-
#
|
|
79
|
-
# @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
|
|
80
|
-
#
|
|
81
|
-
# @param last4 [String, nil] Last four digits of the card.
|
|
8
|
+
module PaymentMethodListResponse
|
|
9
|
+
extend WhopSDK::Internal::Type::Union
|
|
10
|
+
|
|
11
|
+
discriminator :typename
|
|
12
|
+
|
|
13
|
+
# A payment method with no additional properties
|
|
14
|
+
variant :BasePaymentMethod, -> { WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod }
|
|
15
|
+
|
|
16
|
+
# The card for the payment method
|
|
17
|
+
variant :CardPaymentMethod, -> { WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod }
|
|
18
|
+
|
|
19
|
+
# The bank account for the payment method
|
|
20
|
+
variant :UsBankAccountPaymentMethod,
|
|
21
|
+
-> { WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod }
|
|
22
|
+
|
|
23
|
+
class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
24
|
+
# @!attribute id
|
|
25
|
+
# The ID of the payment method
|
|
26
|
+
#
|
|
27
|
+
# @return [String]
|
|
28
|
+
required :id, String
|
|
29
|
+
|
|
30
|
+
# @!attribute created_at
|
|
31
|
+
# When the payment method was created
|
|
32
|
+
#
|
|
33
|
+
# @return [Time]
|
|
34
|
+
required :created_at, Time
|
|
35
|
+
|
|
36
|
+
# @!attribute payment_method_type
|
|
37
|
+
# The type of the payment method
|
|
38
|
+
#
|
|
39
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
40
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
41
|
+
|
|
42
|
+
# @!attribute typename
|
|
43
|
+
# The typename of this object
|
|
44
|
+
#
|
|
45
|
+
# @return [Symbol, :BasePaymentMethod]
|
|
46
|
+
required :typename, const: :BasePaymentMethod
|
|
47
|
+
|
|
48
|
+
# @!method initialize(id:, created_at:, payment_method_type:, typename: :BasePaymentMethod)
|
|
49
|
+
# A payment method with no additional properties
|
|
50
|
+
#
|
|
51
|
+
# @param id [String] The ID of the payment method
|
|
52
|
+
#
|
|
53
|
+
# @param created_at [Time] When the payment method was created
|
|
54
|
+
#
|
|
55
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
|
|
56
|
+
#
|
|
57
|
+
# @param typename [Symbol, :BasePaymentMethod] The typename of this object
|
|
82
58
|
end
|
|
59
|
+
|
|
60
|
+
class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
61
|
+
# @!attribute id
|
|
62
|
+
# The ID of the payment method
|
|
63
|
+
#
|
|
64
|
+
# @return [String]
|
|
65
|
+
required :id, String
|
|
66
|
+
|
|
67
|
+
# @!attribute card
|
|
68
|
+
# The card details associated with this payment method
|
|
69
|
+
#
|
|
70
|
+
# @return [WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod::Card]
|
|
71
|
+
required :card, -> { WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod::Card }
|
|
72
|
+
|
|
73
|
+
# @!attribute created_at
|
|
74
|
+
# When the payment method was created
|
|
75
|
+
#
|
|
76
|
+
# @return [Time]
|
|
77
|
+
required :created_at, Time
|
|
78
|
+
|
|
79
|
+
# @!attribute payment_method_type
|
|
80
|
+
# The type of the payment method
|
|
81
|
+
#
|
|
82
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
83
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
84
|
+
|
|
85
|
+
# @!attribute typename
|
|
86
|
+
# The typename of this object
|
|
87
|
+
#
|
|
88
|
+
# @return [Symbol, :CardPaymentMethod]
|
|
89
|
+
required :typename, const: :CardPaymentMethod
|
|
90
|
+
|
|
91
|
+
# @!method initialize(id:, card:, created_at:, payment_method_type:, typename: :CardPaymentMethod)
|
|
92
|
+
# The card for the payment method
|
|
93
|
+
#
|
|
94
|
+
# @param id [String] The ID of the payment method
|
|
95
|
+
#
|
|
96
|
+
# @param card [WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod::Card] The card details associated with this payment method
|
|
97
|
+
#
|
|
98
|
+
# @param created_at [Time] When the payment method was created
|
|
99
|
+
#
|
|
100
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
|
|
101
|
+
#
|
|
102
|
+
# @param typename [Symbol, :CardPaymentMethod] The typename of this object
|
|
103
|
+
|
|
104
|
+
# @see WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod#card
|
|
105
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
106
|
+
# @!attribute brand
|
|
107
|
+
# Possible card brands that a payment token can have
|
|
108
|
+
#
|
|
109
|
+
# @return [Symbol, WhopSDK::Models::CardBrands, nil]
|
|
110
|
+
required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
|
|
111
|
+
|
|
112
|
+
# @!attribute exp_month
|
|
113
|
+
# Card expiration month, like 03 for March.
|
|
114
|
+
#
|
|
115
|
+
# @return [Integer, nil]
|
|
116
|
+
required :exp_month, Integer, nil?: true
|
|
117
|
+
|
|
118
|
+
# @!attribute exp_year
|
|
119
|
+
# Card expiration year, like 27 for 2027.
|
|
120
|
+
#
|
|
121
|
+
# @return [Integer, nil]
|
|
122
|
+
required :exp_year, Integer, nil?: true
|
|
123
|
+
|
|
124
|
+
# @!attribute last4
|
|
125
|
+
# Last four digits of the card.
|
|
126
|
+
#
|
|
127
|
+
# @return [String, nil]
|
|
128
|
+
required :last4, String, nil?: true
|
|
129
|
+
|
|
130
|
+
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
131
|
+
# The card details associated with this payment method
|
|
132
|
+
#
|
|
133
|
+
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
134
|
+
#
|
|
135
|
+
# @param exp_month [Integer, nil] Card expiration month, like 03 for March.
|
|
136
|
+
#
|
|
137
|
+
# @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
|
|
138
|
+
#
|
|
139
|
+
# @param last4 [String, nil] Last four digits of the card.
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
144
|
+
# @!attribute id
|
|
145
|
+
# The ID of the payment method
|
|
146
|
+
#
|
|
147
|
+
# @return [String]
|
|
148
|
+
required :id, String
|
|
149
|
+
|
|
150
|
+
# @!attribute created_at
|
|
151
|
+
# When the payment method was created
|
|
152
|
+
#
|
|
153
|
+
# @return [Time]
|
|
154
|
+
required :created_at, Time
|
|
155
|
+
|
|
156
|
+
# @!attribute payment_method_type
|
|
157
|
+
# The type of the payment method
|
|
158
|
+
#
|
|
159
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
160
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
161
|
+
|
|
162
|
+
# @!attribute typename
|
|
163
|
+
# The typename of this object
|
|
164
|
+
#
|
|
165
|
+
# @return [Symbol, :UsBankAccountPaymentMethod]
|
|
166
|
+
required :typename, const: :UsBankAccountPaymentMethod
|
|
167
|
+
|
|
168
|
+
# @!attribute us_bank_account
|
|
169
|
+
# The bank details associated with this payment method
|
|
170
|
+
#
|
|
171
|
+
# @return [WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod::UsBankAccount]
|
|
172
|
+
required :us_bank_account,
|
|
173
|
+
-> { WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod::UsBankAccount }
|
|
174
|
+
|
|
175
|
+
# @!method initialize(id:, created_at:, payment_method_type:, us_bank_account:, typename: :UsBankAccountPaymentMethod)
|
|
176
|
+
# The bank account for the payment method
|
|
177
|
+
#
|
|
178
|
+
# @param id [String] The ID of the payment method
|
|
179
|
+
#
|
|
180
|
+
# @param created_at [Time] When the payment method was created
|
|
181
|
+
#
|
|
182
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
|
|
183
|
+
#
|
|
184
|
+
# @param us_bank_account [WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod::UsBankAccount] The bank details associated with this payment method
|
|
185
|
+
#
|
|
186
|
+
# @param typename [Symbol, :UsBankAccountPaymentMethod] The typename of this object
|
|
187
|
+
|
|
188
|
+
# @see WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod#us_bank_account
|
|
189
|
+
class UsBankAccount < WhopSDK::Internal::Type::BaseModel
|
|
190
|
+
# @!attribute account_type
|
|
191
|
+
# The type of account
|
|
192
|
+
#
|
|
193
|
+
# @return [String]
|
|
194
|
+
required :account_type, String
|
|
195
|
+
|
|
196
|
+
# @!attribute bank_name
|
|
197
|
+
# The name of the bank
|
|
198
|
+
#
|
|
199
|
+
# @return [String]
|
|
200
|
+
required :bank_name, String
|
|
201
|
+
|
|
202
|
+
# @!attribute last4
|
|
203
|
+
# The last 4 digits of the account number
|
|
204
|
+
#
|
|
205
|
+
# @return [String]
|
|
206
|
+
required :last4, String
|
|
207
|
+
|
|
208
|
+
# @!method initialize(account_type:, bank_name:, last4:)
|
|
209
|
+
# The bank details associated with this payment method
|
|
210
|
+
#
|
|
211
|
+
# @param account_type [String] The type of account
|
|
212
|
+
#
|
|
213
|
+
# @param bank_name [String] The name of the bank
|
|
214
|
+
#
|
|
215
|
+
# @param last4 [String] The last 4 digits of the account number
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# @!method self.variants
|
|
220
|
+
# @return [Array(WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod)]
|
|
83
221
|
end
|
|
84
222
|
end
|
|
85
223
|
end
|