whop_sdk 0.0.9 → 0.0.10
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 +9 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +8 -0
- data/lib/whop_sdk/models/app_build_create_params.rb +9 -1
- data/lib/whop_sdk/models/payment.rb +90 -1
- data/lib/whop_sdk/models/payment_create_params.rb +307 -0
- data/lib/whop_sdk/models/payment_list_response.rb +90 -1
- data/lib/whop_sdk/models/payment_token_list_params.rb +78 -0
- data/lib/whop_sdk/models/payment_token_list_response.rb +86 -0
- data/lib/whop_sdk/models/payment_token_retrieve_params.rb +22 -0
- data/lib/whop_sdk/models/payment_token_retrieve_response.rb +86 -0
- data/lib/whop_sdk/models/setup_intent.rb +253 -0
- data/lib/whop_sdk/models/setup_intent_canceled_webhook_event.rb +52 -0
- data/lib/whop_sdk/models/setup_intent_list_params.rb +78 -0
- data/lib/whop_sdk/models/setup_intent_list_response.rb +255 -0
- data/lib/whop_sdk/models/setup_intent_requires_action_webhook_event.rb +52 -0
- data/lib/whop_sdk/models/setup_intent_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/setup_intent_status.rb +18 -0
- data/lib/whop_sdk/models/setup_intent_succeeded_webhook_event.rb +52 -0
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +7 -1
- data/lib/whop_sdk/models.rb +20 -0
- data/lib/whop_sdk/resources/app_builds.rb +3 -1
- data/lib/whop_sdk/resources/payment_tokens.rb +83 -0
- data/lib/whop_sdk/resources/payments.rb +48 -0
- data/lib/whop_sdk/resources/setup_intents.rb +83 -0
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- 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/app_build_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/payment.rbi +142 -0
- data/rbi/whop_sdk/models/payment_create_params.rbi +384 -0
- data/rbi/whop_sdk/models/payment_list_response.rbi +167 -0
- data/rbi/whop_sdk/models/payment_token_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/payment_token_list_response.rbi +139 -0
- data/rbi/whop_sdk/models/payment_token_retrieve_params.rbi +40 -0
- data/rbi/whop_sdk/models/payment_token_retrieve_response.rbi +144 -0
- data/rbi/whop_sdk/models/setup_intent.rbi +412 -0
- data/rbi/whop_sdk/models/setup_intent_canceled_webhook_event.rbi +77 -0
- data/rbi/whop_sdk/models/setup_intent_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/setup_intent_list_response.rbi +492 -0
- data/rbi/whop_sdk/models/setup_intent_requires_action_webhook_event.rbi +77 -0
- data/rbi/whop_sdk/models/setup_intent_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/setup_intent_status.rbi +25 -0
- data/rbi/whop_sdk/models/setup_intent_succeeded_webhook_event.rbi +77 -0
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -0
- data/rbi/whop_sdk/models.rbi +23 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +3 -0
- data/rbi/whop_sdk/resources/payment_tokens.rbi +76 -0
- data/rbi/whop_sdk/resources/payments.rbi +42 -0
- data/rbi/whop_sdk/resources/setup_intents.rbi +77 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +3 -0
- data/sig/whop_sdk/client.rbs +4 -0
- data/sig/whop_sdk/models/app_build_create_params.rbs +5 -0
- data/sig/whop_sdk/models/payment.rbs +69 -0
- data/sig/whop_sdk/models/payment_create_params.rbs +210 -0
- data/sig/whop_sdk/models/payment_list_response.rbs +69 -0
- data/sig/whop_sdk/models/payment_token_list_params.rbs +61 -0
- data/sig/whop_sdk/models/payment_token_list_response.rbs +67 -0
- data/sig/whop_sdk/models/payment_token_retrieve_params.rbs +23 -0
- data/sig/whop_sdk/models/payment_token_retrieve_response.rbs +67 -0
- data/sig/whop_sdk/models/setup_intent.rbs +189 -0
- data/sig/whop_sdk/models/setup_intent_canceled_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/setup_intent_list_params.rbs +61 -0
- data/sig/whop_sdk/models/setup_intent_list_response.rbs +193 -0
- data/sig/whop_sdk/models/setup_intent_requires_action_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/setup_intent_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/setup_intent_status.rbs +17 -0
- data/sig/whop_sdk/models/setup_intent_succeeded_webhook_event.rbs +40 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +3 -0
- data/sig/whop_sdk/models.rbs +20 -0
- data/sig/whop_sdk/resources/app_builds.rbs +1 -0
- data/sig/whop_sdk/resources/payment_tokens.rbs +25 -0
- data/sig/whop_sdk/resources/payments.rbs +9 -0
- data/sig/whop_sdk/resources/setup_intents.rbs +24 -0
- data/sig/whop_sdk/resources/webhooks.rbs +3 -0
- metadata +47 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::PaymentTokens#list
|
|
6
|
+
class PaymentTokenListParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute member_id
|
|
11
|
+
# The ID of the Member to list payment tokens for
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :member_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute after
|
|
17
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :after, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute before
|
|
23
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :before, String, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute created_after
|
|
29
|
+
# The minimum creation date to filter by
|
|
30
|
+
#
|
|
31
|
+
# @return [Time, nil]
|
|
32
|
+
optional :created_after, Time, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute created_before
|
|
35
|
+
# The maximum creation date to filter by
|
|
36
|
+
#
|
|
37
|
+
# @return [Time, nil]
|
|
38
|
+
optional :created_before, Time, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute direction
|
|
41
|
+
# The direction of the sort.
|
|
42
|
+
#
|
|
43
|
+
# @return [Symbol, WhopSDK::Models::Direction, nil]
|
|
44
|
+
optional :direction, enum: -> { WhopSDK::Direction }, nil?: true
|
|
45
|
+
|
|
46
|
+
# @!attribute first
|
|
47
|
+
# Returns the first _n_ elements from the list.
|
|
48
|
+
#
|
|
49
|
+
# @return [Integer, nil]
|
|
50
|
+
optional :first, Integer, nil?: true
|
|
51
|
+
|
|
52
|
+
# @!attribute last
|
|
53
|
+
# Returns the last _n_ elements from the list.
|
|
54
|
+
#
|
|
55
|
+
# @return [Integer, nil]
|
|
56
|
+
optional :last, Integer, nil?: true
|
|
57
|
+
|
|
58
|
+
# @!method initialize(member_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
|
|
59
|
+
# @param member_id [String] The ID of the Member to list payment tokens for
|
|
60
|
+
#
|
|
61
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
62
|
+
#
|
|
63
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
64
|
+
#
|
|
65
|
+
# @param created_after [Time, nil] The minimum creation date to filter by
|
|
66
|
+
#
|
|
67
|
+
# @param created_before [Time, nil] The maximum creation date to filter by
|
|
68
|
+
#
|
|
69
|
+
# @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
|
|
70
|
+
#
|
|
71
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
72
|
+
#
|
|
73
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
74
|
+
#
|
|
75
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::PaymentTokens#list
|
|
6
|
+
class PaymentTokenListResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the payment token
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute card
|
|
14
|
+
# The card data associated with the payment token, if its a debit or credit card
|
|
15
|
+
# token.
|
|
16
|
+
#
|
|
17
|
+
# @return [WhopSDK::Models::PaymentTokenListResponse::Card, nil]
|
|
18
|
+
required :card, -> { WhopSDK::Models::PaymentTokenListResponse::Card }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute created_at
|
|
21
|
+
# The date and time the payment token was created
|
|
22
|
+
#
|
|
23
|
+
# @return [Time]
|
|
24
|
+
required :created_at, Time
|
|
25
|
+
|
|
26
|
+
# @!attribute payment_method_type
|
|
27
|
+
# The payment method type of the payment token
|
|
28
|
+
#
|
|
29
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
30
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
31
|
+
|
|
32
|
+
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
33
|
+
# Some parameter documentations has been truncated, see
|
|
34
|
+
# {WhopSDK::Models::PaymentTokenListResponse} for more details.
|
|
35
|
+
#
|
|
36
|
+
# A payment token used to process payments.
|
|
37
|
+
#
|
|
38
|
+
# @param id [String] The ID of the payment token
|
|
39
|
+
#
|
|
40
|
+
# @param card [WhopSDK::Models::PaymentTokenListResponse::Card, nil] The card data associated with the payment token, if its a debit or credit card t
|
|
41
|
+
#
|
|
42
|
+
# @param created_at [Time] The date and time the payment token was created
|
|
43
|
+
#
|
|
44
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment token
|
|
45
|
+
|
|
46
|
+
# @see WhopSDK::Models::PaymentTokenListResponse#card
|
|
47
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
48
|
+
# @!attribute brand
|
|
49
|
+
# Possible card brands that a payment token can have
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, WhopSDK::Models::CardBrands, nil]
|
|
52
|
+
required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
|
|
53
|
+
|
|
54
|
+
# @!attribute exp_month
|
|
55
|
+
# Card expiration month, like 03 for March.
|
|
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 token, if its a debit or credit card
|
|
74
|
+
# token.
|
|
75
|
+
#
|
|
76
|
+
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
77
|
+
#
|
|
78
|
+
# @param exp_month [Integer, nil] Card expiration month, like 03 for March.
|
|
79
|
+
#
|
|
80
|
+
# @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
|
|
81
|
+
#
|
|
82
|
+
# @param last4 [String, nil] Last four digits of the card.
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::PaymentTokens#retrieve
|
|
6
|
+
class PaymentTokenRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute member_id
|
|
11
|
+
# The ID of the Member associated with the PaymentToken
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :member_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(member_id:, request_options: {})
|
|
17
|
+
# @param member_id [String] The ID of the Member associated with the PaymentToken
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::PaymentTokens#retrieve
|
|
6
|
+
class PaymentTokenRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The ID of the payment token
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute card
|
|
14
|
+
# The card data associated with the payment token, if its a debit or credit card
|
|
15
|
+
# token.
|
|
16
|
+
#
|
|
17
|
+
# @return [WhopSDK::Models::PaymentTokenRetrieveResponse::Card, nil]
|
|
18
|
+
required :card, -> { WhopSDK::Models::PaymentTokenRetrieveResponse::Card }, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute created_at
|
|
21
|
+
# The date and time the payment token was created
|
|
22
|
+
#
|
|
23
|
+
# @return [Time]
|
|
24
|
+
required :created_at, Time
|
|
25
|
+
|
|
26
|
+
# @!attribute payment_method_type
|
|
27
|
+
# The payment method type of the payment token
|
|
28
|
+
#
|
|
29
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
30
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
31
|
+
|
|
32
|
+
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
33
|
+
# Some parameter documentations has been truncated, see
|
|
34
|
+
# {WhopSDK::Models::PaymentTokenRetrieveResponse} for more details.
|
|
35
|
+
#
|
|
36
|
+
# A payment token used to process payments.
|
|
37
|
+
#
|
|
38
|
+
# @param id [String] The ID of the payment token
|
|
39
|
+
#
|
|
40
|
+
# @param card [WhopSDK::Models::PaymentTokenRetrieveResponse::Card, nil] The card data associated with the payment token, if its a debit or credit card t
|
|
41
|
+
#
|
|
42
|
+
# @param created_at [Time] The date and time the payment token was created
|
|
43
|
+
#
|
|
44
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment token
|
|
45
|
+
|
|
46
|
+
# @see WhopSDK::Models::PaymentTokenRetrieveResponse#card
|
|
47
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
48
|
+
# @!attribute brand
|
|
49
|
+
# Possible card brands that a payment token can have
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, WhopSDK::Models::CardBrands, nil]
|
|
52
|
+
required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
|
|
53
|
+
|
|
54
|
+
# @!attribute exp_month
|
|
55
|
+
# Card expiration month, like 03 for March.
|
|
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 token, if its a debit or credit card
|
|
74
|
+
# token.
|
|
75
|
+
#
|
|
76
|
+
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
77
|
+
#
|
|
78
|
+
# @param exp_month [Integer, nil] Card expiration month, like 03 for March.
|
|
79
|
+
#
|
|
80
|
+
# @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
|
|
81
|
+
#
|
|
82
|
+
# @param last4 [String, nil] Last four digits of the card.
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::SetupIntents#retrieve
|
|
6
|
+
class SetupIntent < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The setup intent ID
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute checkout_configuration
|
|
14
|
+
# The checkout configuration associated with the setup intent
|
|
15
|
+
#
|
|
16
|
+
# @return [WhopSDK::Models::SetupIntent::CheckoutConfiguration, nil]
|
|
17
|
+
required :checkout_configuration, -> { WhopSDK::SetupIntent::CheckoutConfiguration }, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute company
|
|
20
|
+
# The company of the setup intent
|
|
21
|
+
#
|
|
22
|
+
# @return [WhopSDK::Models::SetupIntent::Company, nil]
|
|
23
|
+
required :company, -> { WhopSDK::SetupIntent::Company }, nil?: true
|
|
24
|
+
|
|
25
|
+
# @!attribute created_at
|
|
26
|
+
# The datetime the payment was created
|
|
27
|
+
#
|
|
28
|
+
# @return [Time]
|
|
29
|
+
required :created_at, Time
|
|
30
|
+
|
|
31
|
+
# @!attribute error_message
|
|
32
|
+
# The error message, if any.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
required :error_message, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute member
|
|
38
|
+
# The member connected to the setup intent
|
|
39
|
+
#
|
|
40
|
+
# @return [WhopSDK::Models::SetupIntent::Member, nil]
|
|
41
|
+
required :member, -> { WhopSDK::SetupIntent::Member }, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute metadata
|
|
44
|
+
# The metadata associated with the setup intent
|
|
45
|
+
#
|
|
46
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
47
|
+
required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true
|
|
48
|
+
|
|
49
|
+
# @!attribute payment_token
|
|
50
|
+
# The payment token created during the setup, if available.
|
|
51
|
+
#
|
|
52
|
+
# @return [WhopSDK::Models::SetupIntent::PaymentToken, nil]
|
|
53
|
+
required :payment_token, -> { WhopSDK::SetupIntent::PaymentToken }, nil?: true
|
|
54
|
+
|
|
55
|
+
# @!attribute status
|
|
56
|
+
# The status of the setup intent
|
|
57
|
+
#
|
|
58
|
+
# @return [Symbol, WhopSDK::Models::SetupIntentStatus]
|
|
59
|
+
required :status, enum: -> { WhopSDK::SetupIntentStatus }
|
|
60
|
+
|
|
61
|
+
# @!method initialize(id:, checkout_configuration:, company:, created_at:, error_message:, member:, metadata:, payment_token:, status:)
|
|
62
|
+
# An object representing a setup intent, which is a flow for allowing a customer
|
|
63
|
+
# to add a payment method to their account without making a purchase.
|
|
64
|
+
#
|
|
65
|
+
# @param id [String] The setup intent ID
|
|
66
|
+
#
|
|
67
|
+
# @param checkout_configuration [WhopSDK::Models::SetupIntent::CheckoutConfiguration, nil] The checkout configuration associated with the setup intent
|
|
68
|
+
#
|
|
69
|
+
# @param company [WhopSDK::Models::SetupIntent::Company, nil] The company of the setup intent
|
|
70
|
+
#
|
|
71
|
+
# @param created_at [Time] The datetime the payment was created
|
|
72
|
+
#
|
|
73
|
+
# @param error_message [String, nil] The error message, if any.
|
|
74
|
+
#
|
|
75
|
+
# @param member [WhopSDK::Models::SetupIntent::Member, nil] The member connected to the setup intent
|
|
76
|
+
#
|
|
77
|
+
# @param metadata [Hash{Symbol=>Object}, nil] The metadata associated with the setup intent
|
|
78
|
+
#
|
|
79
|
+
# @param payment_token [WhopSDK::Models::SetupIntent::PaymentToken, nil] The payment token created during the setup, if available.
|
|
80
|
+
#
|
|
81
|
+
# @param status [Symbol, WhopSDK::Models::SetupIntentStatus] The status of the setup intent
|
|
82
|
+
|
|
83
|
+
# @see WhopSDK::Models::SetupIntent#checkout_configuration
|
|
84
|
+
class CheckoutConfiguration < WhopSDK::Internal::Type::BaseModel
|
|
85
|
+
# @!attribute id
|
|
86
|
+
# The ID of the checkout configuration
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
required :id, String
|
|
90
|
+
|
|
91
|
+
# @!method initialize(id:)
|
|
92
|
+
# The checkout configuration associated with the setup intent
|
|
93
|
+
#
|
|
94
|
+
# @param id [String] The ID of the checkout configuration
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see WhopSDK::Models::SetupIntent#company
|
|
98
|
+
class Company < WhopSDK::Internal::Type::BaseModel
|
|
99
|
+
# @!attribute id
|
|
100
|
+
# The ID (tag) of the company.
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
required :id, String
|
|
104
|
+
|
|
105
|
+
# @!method initialize(id:)
|
|
106
|
+
# The company of the setup intent
|
|
107
|
+
#
|
|
108
|
+
# @param id [String] The ID (tag) of the company.
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see WhopSDK::Models::SetupIntent#member
|
|
112
|
+
class Member < WhopSDK::Internal::Type::BaseModel
|
|
113
|
+
# @!attribute id
|
|
114
|
+
# The ID of the member
|
|
115
|
+
#
|
|
116
|
+
# @return [String]
|
|
117
|
+
required :id, String
|
|
118
|
+
|
|
119
|
+
# @!attribute user
|
|
120
|
+
# The user for this member, if any.
|
|
121
|
+
#
|
|
122
|
+
# @return [WhopSDK::Models::SetupIntent::Member::User, nil]
|
|
123
|
+
required :user, -> { WhopSDK::SetupIntent::Member::User }, nil?: true
|
|
124
|
+
|
|
125
|
+
# @!method initialize(id:, user:)
|
|
126
|
+
# The member connected to the setup intent
|
|
127
|
+
#
|
|
128
|
+
# @param id [String] The ID of the member
|
|
129
|
+
#
|
|
130
|
+
# @param user [WhopSDK::Models::SetupIntent::Member::User, nil] The user for this member, if any.
|
|
131
|
+
|
|
132
|
+
# @see WhopSDK::Models::SetupIntent::Member#user
|
|
133
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
134
|
+
# @!attribute id
|
|
135
|
+
# The internal ID of the user account.
|
|
136
|
+
#
|
|
137
|
+
# @return [String]
|
|
138
|
+
required :id, String
|
|
139
|
+
|
|
140
|
+
# @!attribute email
|
|
141
|
+
# The digital mailing address of the user.
|
|
142
|
+
#
|
|
143
|
+
# @return [String, nil]
|
|
144
|
+
required :email, String, nil?: true
|
|
145
|
+
|
|
146
|
+
# @!attribute name
|
|
147
|
+
# The user's full name.
|
|
148
|
+
#
|
|
149
|
+
# @return [String, nil]
|
|
150
|
+
required :name, String, nil?: true
|
|
151
|
+
|
|
152
|
+
# @!attribute username
|
|
153
|
+
# The whop username.
|
|
154
|
+
#
|
|
155
|
+
# @return [String]
|
|
156
|
+
required :username, String
|
|
157
|
+
|
|
158
|
+
# @!method initialize(id:, email:, name:, username:)
|
|
159
|
+
# The user for this member, if any.
|
|
160
|
+
#
|
|
161
|
+
# @param id [String] The internal ID of the user account.
|
|
162
|
+
#
|
|
163
|
+
# @param email [String, nil] The digital mailing address of the user.
|
|
164
|
+
#
|
|
165
|
+
# @param name [String, nil] The user's full name.
|
|
166
|
+
#
|
|
167
|
+
# @param username [String] The whop username.
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# @see WhopSDK::Models::SetupIntent#payment_token
|
|
172
|
+
class PaymentToken < WhopSDK::Internal::Type::BaseModel
|
|
173
|
+
# @!attribute id
|
|
174
|
+
# The ID of the payment token
|
|
175
|
+
#
|
|
176
|
+
# @return [String]
|
|
177
|
+
required :id, String
|
|
178
|
+
|
|
179
|
+
# @!attribute card
|
|
180
|
+
# The card data associated with the payment token, if its a debit or credit card
|
|
181
|
+
# token.
|
|
182
|
+
#
|
|
183
|
+
# @return [WhopSDK::Models::SetupIntent::PaymentToken::Card, nil]
|
|
184
|
+
required :card, -> { WhopSDK::SetupIntent::PaymentToken::Card }, nil?: true
|
|
185
|
+
|
|
186
|
+
# @!attribute created_at
|
|
187
|
+
# The date and time the payment token was created
|
|
188
|
+
#
|
|
189
|
+
# @return [Time]
|
|
190
|
+
required :created_at, Time
|
|
191
|
+
|
|
192
|
+
# @!attribute payment_method_type
|
|
193
|
+
# The payment method type of the payment token
|
|
194
|
+
#
|
|
195
|
+
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
196
|
+
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
197
|
+
|
|
198
|
+
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
199
|
+
# Some parameter documentations has been truncated, see
|
|
200
|
+
# {WhopSDK::Models::SetupIntent::PaymentToken} for more details.
|
|
201
|
+
#
|
|
202
|
+
# The payment token created during the setup, if available.
|
|
203
|
+
#
|
|
204
|
+
# @param id [String] The ID of the payment token
|
|
205
|
+
#
|
|
206
|
+
# @param card [WhopSDK::Models::SetupIntent::PaymentToken::Card, nil] The card data associated with the payment token, if its a debit or credit card t
|
|
207
|
+
#
|
|
208
|
+
# @param created_at [Time] The date and time the payment token was created
|
|
209
|
+
#
|
|
210
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment token
|
|
211
|
+
|
|
212
|
+
# @see WhopSDK::Models::SetupIntent::PaymentToken#card
|
|
213
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
214
|
+
# @!attribute brand
|
|
215
|
+
# Possible card brands that a payment token can have
|
|
216
|
+
#
|
|
217
|
+
# @return [Symbol, WhopSDK::Models::CardBrands, nil]
|
|
218
|
+
required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
|
|
219
|
+
|
|
220
|
+
# @!attribute exp_month
|
|
221
|
+
# Card expiration month, like 03 for March.
|
|
222
|
+
#
|
|
223
|
+
# @return [Integer, nil]
|
|
224
|
+
required :exp_month, Integer, nil?: true
|
|
225
|
+
|
|
226
|
+
# @!attribute exp_year
|
|
227
|
+
# Card expiration year, like 27 for 2027.
|
|
228
|
+
#
|
|
229
|
+
# @return [Integer, nil]
|
|
230
|
+
required :exp_year, Integer, nil?: true
|
|
231
|
+
|
|
232
|
+
# @!attribute last4
|
|
233
|
+
# Last four digits of the card.
|
|
234
|
+
#
|
|
235
|
+
# @return [String, nil]
|
|
236
|
+
required :last4, String, nil?: true
|
|
237
|
+
|
|
238
|
+
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
239
|
+
# The card data associated with the payment token, if its a debit or credit card
|
|
240
|
+
# token.
|
|
241
|
+
#
|
|
242
|
+
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
243
|
+
#
|
|
244
|
+
# @param exp_month [Integer, nil] Card expiration month, like 03 for March.
|
|
245
|
+
#
|
|
246
|
+
# @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
|
|
247
|
+
#
|
|
248
|
+
# @param last4 [String, nil] Last four digits of the card.
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class SetupIntentCanceledWebhookEvent < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# A unique ID for every single webhook request
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute api_version
|
|
13
|
+
# The API version for this webhook
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, :v1]
|
|
16
|
+
required :api_version, const: :v1
|
|
17
|
+
|
|
18
|
+
# @!attribute data
|
|
19
|
+
# An object representing a setup intent, which is a flow for allowing a customer
|
|
20
|
+
# to add a payment method to their account without making a purchase.
|
|
21
|
+
#
|
|
22
|
+
# @return [WhopSDK::Models::SetupIntent]
|
|
23
|
+
required :data, -> { WhopSDK::SetupIntent }
|
|
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, :"setup_intent.canceled"]
|
|
35
|
+
required :type, const: :"setup_intent.canceled"
|
|
36
|
+
|
|
37
|
+
# @!method initialize(id:, data:, timestamp:, api_version: :v1, type: :"setup_intent.canceled")
|
|
38
|
+
# Some parameter documentations has been truncated, see
|
|
39
|
+
# {WhopSDK::Models::SetupIntentCanceledWebhookEvent} for more details.
|
|
40
|
+
#
|
|
41
|
+
# @param id [String] A unique ID for every single webhook request
|
|
42
|
+
#
|
|
43
|
+
# @param data [WhopSDK::Models::SetupIntent] An object representing a setup intent, which is a flow for allowing a customer t
|
|
44
|
+
#
|
|
45
|
+
# @param timestamp [Time] The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
46
|
+
#
|
|
47
|
+
# @param api_version [Symbol, :v1] The API version for this webhook
|
|
48
|
+
#
|
|
49
|
+
# @param type [Symbol, :"setup_intent.canceled"] The webhook event type
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see WhopSDK::Resources::SetupIntents#list
|
|
6
|
+
class SetupIntentListParams < WhopSDK::Internal::Type::BaseModel
|
|
7
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute company_id
|
|
11
|
+
# The ID of the company to list setup intents for
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :company_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute after
|
|
17
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :after, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute before
|
|
23
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :before, String, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute created_after
|
|
29
|
+
# The minimum creation date to filter by
|
|
30
|
+
#
|
|
31
|
+
# @return [Time, nil]
|
|
32
|
+
optional :created_after, Time, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute created_before
|
|
35
|
+
# The maximum creation date to filter by
|
|
36
|
+
#
|
|
37
|
+
# @return [Time, nil]
|
|
38
|
+
optional :created_before, Time, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute direction
|
|
41
|
+
# The direction of the sort.
|
|
42
|
+
#
|
|
43
|
+
# @return [Symbol, WhopSDK::Models::Direction, nil]
|
|
44
|
+
optional :direction, enum: -> { WhopSDK::Direction }, nil?: true
|
|
45
|
+
|
|
46
|
+
# @!attribute first
|
|
47
|
+
# Returns the first _n_ elements from the list.
|
|
48
|
+
#
|
|
49
|
+
# @return [Integer, nil]
|
|
50
|
+
optional :first, Integer, nil?: true
|
|
51
|
+
|
|
52
|
+
# @!attribute last
|
|
53
|
+
# Returns the last _n_ elements from the list.
|
|
54
|
+
#
|
|
55
|
+
# @return [Integer, nil]
|
|
56
|
+
optional :last, Integer, nil?: true
|
|
57
|
+
|
|
58
|
+
# @!method initialize(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {})
|
|
59
|
+
# @param company_id [String] The ID of the company to list setup intents for
|
|
60
|
+
#
|
|
61
|
+
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
62
|
+
#
|
|
63
|
+
# @param before [String, nil] Returns the elements in the list that come before the specified cursor.
|
|
64
|
+
#
|
|
65
|
+
# @param created_after [Time, nil] The minimum creation date to filter by
|
|
66
|
+
#
|
|
67
|
+
# @param created_before [Time, nil] The maximum creation date to filter by
|
|
68
|
+
#
|
|
69
|
+
# @param direction [Symbol, WhopSDK::Models::Direction, nil] The direction of the sort.
|
|
70
|
+
#
|
|
71
|
+
# @param first [Integer, nil] Returns the first _n_ elements from the list.
|
|
72
|
+
#
|
|
73
|
+
# @param last [Integer, nil] Returns the last _n_ elements from the list.
|
|
74
|
+
#
|
|
75
|
+
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|