whop_sdk 0.0.9 → 0.0.11
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 +23 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +8 -0
- data/lib/whop_sdk/internal/type/union.rb +12 -0
- data/lib/whop_sdk/models/app_build_create_params.rb +9 -1
- data/lib/whop_sdk/models/invoice_create_params.rb +10 -1
- data/lib/whop_sdk/models/payment.rb +88 -1
- data/lib/whop_sdk/models/payment_create_params.rb +307 -0
- data/lib/whop_sdk/models/payment_list_response.rb +88 -1
- data/lib/whop_sdk/models/payment_method_list_params.rb +78 -0
- data/lib/whop_sdk/models/payment_method_list_response.rb +85 -0
- data/lib/whop_sdk/models/payment_method_retrieve_params.rb +22 -0
- data/lib/whop_sdk/models/payment_method_retrieve_response.rb +85 -0
- data/lib/whop_sdk/models/setup_intent.rb +251 -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 +253 -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 +28 -19
- data/lib/whop_sdk/models.rb +20 -0
- data/lib/whop_sdk/resources/app_builds.rb +3 -1
- data/lib/whop_sdk/resources/invoices.rb +3 -1
- data/lib/whop_sdk/resources/payment_methods.rb +91 -0
- data/lib/whop_sdk/resources/payments.rb +50 -0
- data/lib/whop_sdk/resources/setup_intents.rb +91 -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/invoice_create_params.rbi +10 -0
- data/rbi/whop_sdk/models/payment.rbi +139 -0
- data/rbi/whop_sdk/models/payment_create_params.rbi +384 -0
- data/rbi/whop_sdk/models/payment_list_response.rbi +164 -0
- data/rbi/whop_sdk/models/payment_method_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/payment_method_list_response.rbi +137 -0
- data/rbi/whop_sdk/models/payment_method_retrieve_params.rbi +43 -0
- data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +142 -0
- data/rbi/whop_sdk/models/setup_intent.rbi +410 -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 +491 -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/invoices.rbi +4 -0
- data/rbi/whop_sdk/resources/payment_methods.rbi +84 -0
- data/rbi/whop_sdk/resources/payments.rbi +44 -0
- data/rbi/whop_sdk/resources/setup_intents.rbi +85 -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/invoice_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_method_list_params.rbs +61 -0
- data/sig/whop_sdk/models/payment_method_list_response.rbs +67 -0
- data/sig/whop_sdk/models/payment_method_retrieve_params.rbs +23 -0
- data/sig/whop_sdk/models/payment_method_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/invoices.rbs +1 -0
- data/sig/whop_sdk/resources/payment_methods.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
data/rbi/whop_sdk/models.rbi
CHANGED
|
@@ -316,10 +316,16 @@ module WhopSDK
|
|
|
316
316
|
|
|
317
317
|
Payment = WhopSDK::Models::Payment
|
|
318
318
|
|
|
319
|
+
PaymentCreateParams = WhopSDK::Models::PaymentCreateParams
|
|
320
|
+
|
|
319
321
|
PaymentFailedWebhookEvent = WhopSDK::Models::PaymentFailedWebhookEvent
|
|
320
322
|
|
|
321
323
|
PaymentListParams = WhopSDK::Models::PaymentListParams
|
|
322
324
|
|
|
325
|
+
PaymentMethodListParams = WhopSDK::Models::PaymentMethodListParams
|
|
326
|
+
|
|
327
|
+
PaymentMethodRetrieveParams = WhopSDK::Models::PaymentMethodRetrieveParams
|
|
328
|
+
|
|
323
329
|
PaymentMethodTypes = WhopSDK::Models::PaymentMethodTypes
|
|
324
330
|
|
|
325
331
|
PaymentPendingWebhookEvent = WhopSDK::Models::PaymentPendingWebhookEvent
|
|
@@ -412,6 +418,23 @@ module WhopSDK
|
|
|
412
418
|
|
|
413
419
|
ReviewStatus = WhopSDK::Models::ReviewStatus
|
|
414
420
|
|
|
421
|
+
SetupIntent = WhopSDK::Models::SetupIntent
|
|
422
|
+
|
|
423
|
+
SetupIntentCanceledWebhookEvent =
|
|
424
|
+
WhopSDK::Models::SetupIntentCanceledWebhookEvent
|
|
425
|
+
|
|
426
|
+
SetupIntentListParams = WhopSDK::Models::SetupIntentListParams
|
|
427
|
+
|
|
428
|
+
SetupIntentRequiresActionWebhookEvent =
|
|
429
|
+
WhopSDK::Models::SetupIntentRequiresActionWebhookEvent
|
|
430
|
+
|
|
431
|
+
SetupIntentRetrieveParams = WhopSDK::Models::SetupIntentRetrieveParams
|
|
432
|
+
|
|
433
|
+
SetupIntentStatus = WhopSDK::Models::SetupIntentStatus
|
|
434
|
+
|
|
435
|
+
SetupIntentSucceededWebhookEvent =
|
|
436
|
+
WhopSDK::Models::SetupIntentSucceededWebhookEvent
|
|
437
|
+
|
|
415
438
|
Shipment = WhopSDK::Models::Shipment
|
|
416
439
|
|
|
417
440
|
ShipmentCarrier = WhopSDK::Models::ShipmentCarrier
|
|
@@ -17,6 +17,7 @@ module WhopSDK
|
|
|
17
17
|
),
|
|
18
18
|
checksum: String,
|
|
19
19
|
platform: WhopSDK::AppBuildPlatforms::OrSymbol,
|
|
20
|
+
ai_prompt_id: T.nilable(String),
|
|
20
21
|
app_id: T.nilable(String),
|
|
21
22
|
supported_app_view_types:
|
|
22
23
|
T.nilable(T::Array[WhopSDK::AppViewType::OrSymbol]),
|
|
@@ -34,6 +35,8 @@ module WhopSDK
|
|
|
34
35
|
checksum:,
|
|
35
36
|
# The platform of the app build (ios, android, web)
|
|
36
37
|
platform:,
|
|
38
|
+
# The id of the ai prompt that created this build
|
|
39
|
+
ai_prompt_id: nil,
|
|
37
40
|
# The ID of the app to create a build for. By default the current app from the api
|
|
38
41
|
# key is used.
|
|
39
42
|
app_id: nil,
|
|
@@ -21,6 +21,7 @@ module WhopSDK
|
|
|
21
21
|
product_id: String,
|
|
22
22
|
charge_buyer_fee: T.nilable(T::Boolean),
|
|
23
23
|
customer_name: T.nilable(String),
|
|
24
|
+
payment_method_id: T.nilable(String),
|
|
24
25
|
payment_token_id: T.nilable(String),
|
|
25
26
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
26
27
|
).returns(WhopSDK::Invoice)
|
|
@@ -54,6 +55,9 @@ module WhopSDK
|
|
|
54
55
|
# want to create an invoice for a customer who does not have a member of your
|
|
55
56
|
# company yet.
|
|
56
57
|
customer_name: nil,
|
|
58
|
+
# The payment method ID to use for this invoice. If using charge_automatically,
|
|
59
|
+
# you must provide a payment_method_id.
|
|
60
|
+
payment_method_id: nil,
|
|
57
61
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
58
62
|
# must provide a payment_token.
|
|
59
63
|
payment_token_id: nil,
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class PaymentMethods
|
|
6
|
+
# A payment method is a stored representation of how a customer intends to pay,
|
|
7
|
+
# such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
8
|
+
# details and can be attached to a member for future one-time or recurring
|
|
9
|
+
# charges. This lets you reuse the same payment credentials across multiple
|
|
10
|
+
# payments.
|
|
11
|
+
#
|
|
12
|
+
# Required permissions:
|
|
13
|
+
#
|
|
14
|
+
# - `member:payment_methods:read`
|
|
15
|
+
sig do
|
|
16
|
+
params(
|
|
17
|
+
id: String,
|
|
18
|
+
member_id: String,
|
|
19
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
20
|
+
).returns(WhopSDK::Models::PaymentMethodRetrieveResponse)
|
|
21
|
+
end
|
|
22
|
+
def retrieve(
|
|
23
|
+
# The ID of the PaymentMethod
|
|
24
|
+
id,
|
|
25
|
+
# The ID of the Member associated with the PaymentMethod
|
|
26
|
+
member_id:,
|
|
27
|
+
request_options: {}
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# A payment method is a stored representation of how a customer intends to pay,
|
|
32
|
+
# such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
33
|
+
# details and can be attached to a member for future one-time or recurring
|
|
34
|
+
# charges. This lets you reuse the same payment credentials across multiple
|
|
35
|
+
# payments.
|
|
36
|
+
#
|
|
37
|
+
# Required permissions:
|
|
38
|
+
#
|
|
39
|
+
# - `member:payment_methods:read`
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
member_id: String,
|
|
43
|
+
after: T.nilable(String),
|
|
44
|
+
before: T.nilable(String),
|
|
45
|
+
created_after: T.nilable(Time),
|
|
46
|
+
created_before: T.nilable(Time),
|
|
47
|
+
direction: T.nilable(WhopSDK::Direction::OrSymbol),
|
|
48
|
+
first: T.nilable(Integer),
|
|
49
|
+
last: T.nilable(Integer),
|
|
50
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
51
|
+
).returns(
|
|
52
|
+
WhopSDK::Internal::CursorPage[
|
|
53
|
+
WhopSDK::Models::PaymentMethodListResponse
|
|
54
|
+
]
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
def list(
|
|
58
|
+
# The ID of the Member to list payment methods for
|
|
59
|
+
member_id:,
|
|
60
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
61
|
+
after: nil,
|
|
62
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
63
|
+
before: nil,
|
|
64
|
+
# The minimum creation date to filter by
|
|
65
|
+
created_after: nil,
|
|
66
|
+
# The maximum creation date to filter by
|
|
67
|
+
created_before: nil,
|
|
68
|
+
# The direction of the sort.
|
|
69
|
+
direction: nil,
|
|
70
|
+
# Returns the first _n_ elements from the list.
|
|
71
|
+
first: nil,
|
|
72
|
+
# Returns the last _n_ elements from the list.
|
|
73
|
+
last: nil,
|
|
74
|
+
request_options: {}
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @api private
|
|
79
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
80
|
+
def self.new(client:)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -3,6 +3,50 @@
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Resources
|
|
5
5
|
class Payments
|
|
6
|
+
# Charge an existing member off-session using one of their stored payment methods.
|
|
7
|
+
# You can provide an existing plan, or create a new one in-line. This endpoint
|
|
8
|
+
# will respond with a payment object immediately, but the payment is processed
|
|
9
|
+
# asynchronously in the background. Use webhooks to be notified when the payment
|
|
10
|
+
# succeeds or fails.
|
|
11
|
+
#
|
|
12
|
+
# Required permissions:
|
|
13
|
+
#
|
|
14
|
+
# - `payment:charge`
|
|
15
|
+
# - `plan:create`
|
|
16
|
+
# - `access_pass:create`
|
|
17
|
+
# - `access_pass:update`
|
|
18
|
+
# - `plan:basic:read`
|
|
19
|
+
# - `access_pass:basic:read`
|
|
20
|
+
# - `member:email:read`
|
|
21
|
+
# - `member:basic:read`
|
|
22
|
+
# - `member:phone:read`
|
|
23
|
+
# - `promo_code:basic:read`
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
company_id: String,
|
|
27
|
+
member_id: String,
|
|
28
|
+
payment_method_id: String,
|
|
29
|
+
plan: WhopSDK::PaymentCreateParams::Plan::OrHash,
|
|
30
|
+
plan_id: String,
|
|
31
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
32
|
+
).returns(WhopSDK::Payment)
|
|
33
|
+
end
|
|
34
|
+
def create(
|
|
35
|
+
# The ID of the company to create the payment for.
|
|
36
|
+
company_id:,
|
|
37
|
+
# The ID of the member to create the payment for.
|
|
38
|
+
member_id:,
|
|
39
|
+
# The ID of the payment method to use for the payment. It must be connected to the
|
|
40
|
+
# Member being charged.
|
|
41
|
+
payment_method_id:,
|
|
42
|
+
# Pass this object to create a new plan for this payment
|
|
43
|
+
plan:,
|
|
44
|
+
# An ID of an existing plan to use for the payment.
|
|
45
|
+
plan_id:,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
6
50
|
# Retrieves a payment by ID
|
|
7
51
|
#
|
|
8
52
|
# Required permissions:
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class SetupIntents
|
|
6
|
+
# A setup intent is an object used to securely collect and store a member’s
|
|
7
|
+
# payment method for future use without charging them immediately. It handles
|
|
8
|
+
# authentication steps up front so future off-session payments can be completed
|
|
9
|
+
# smoothly. This ensures the payment method is verified and ready for later
|
|
10
|
+
# billing.
|
|
11
|
+
#
|
|
12
|
+
# Required permissions:
|
|
13
|
+
#
|
|
14
|
+
# - `payment:setup_intent:read`
|
|
15
|
+
# - `member:basic:read`
|
|
16
|
+
# - `member:email:read`
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
id: String,
|
|
20
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
21
|
+
).returns(WhopSDK::SetupIntent)
|
|
22
|
+
end
|
|
23
|
+
def retrieve(
|
|
24
|
+
# The ID of the Setup Intent
|
|
25
|
+
id,
|
|
26
|
+
request_options: {}
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# A setup intent is an object used to securely collect and store a member’s
|
|
31
|
+
# payment method for future use without charging them immediately. It handles
|
|
32
|
+
# authentication steps up front so future off-session payments can be completed
|
|
33
|
+
# smoothly. This ensures the payment method is verified and ready for later
|
|
34
|
+
# billing.
|
|
35
|
+
#
|
|
36
|
+
# Required permissions:
|
|
37
|
+
#
|
|
38
|
+
# - `payment:setup_intent:read`
|
|
39
|
+
# - `member:basic:read`
|
|
40
|
+
# - `member:email:read`
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
company_id: String,
|
|
44
|
+
after: T.nilable(String),
|
|
45
|
+
before: T.nilable(String),
|
|
46
|
+
created_after: T.nilable(Time),
|
|
47
|
+
created_before: T.nilable(Time),
|
|
48
|
+
direction: T.nilable(WhopSDK::Direction::OrSymbol),
|
|
49
|
+
first: T.nilable(Integer),
|
|
50
|
+
last: T.nilable(Integer),
|
|
51
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
52
|
+
).returns(
|
|
53
|
+
WhopSDK::Internal::CursorPage[
|
|
54
|
+
WhopSDK::Models::SetupIntentListResponse
|
|
55
|
+
]
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def list(
|
|
59
|
+
# The ID of the company to list setup intents for
|
|
60
|
+
company_id:,
|
|
61
|
+
# Returns the elements in the list that come after the specified cursor.
|
|
62
|
+
after: nil,
|
|
63
|
+
# Returns the elements in the list that come before the specified cursor.
|
|
64
|
+
before: nil,
|
|
65
|
+
# The minimum creation date to filter by
|
|
66
|
+
created_after: nil,
|
|
67
|
+
# The maximum creation date to filter by
|
|
68
|
+
created_before: nil,
|
|
69
|
+
# The direction of the sort.
|
|
70
|
+
direction: nil,
|
|
71
|
+
# Returns the first _n_ elements from the list.
|
|
72
|
+
first: nil,
|
|
73
|
+
# Returns the last _n_ elements from the list.
|
|
74
|
+
last: nil,
|
|
75
|
+
request_options: {}
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# @api private
|
|
80
|
+
sig { params(client: WhopSDK::Client).returns(T.attached_class) }
|
|
81
|
+
def self.new(client:)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -16,6 +16,9 @@ module WhopSDK
|
|
|
16
16
|
WhopSDK::EntryApprovedWebhookEvent,
|
|
17
17
|
WhopSDK::EntryDeniedWebhookEvent,
|
|
18
18
|
WhopSDK::EntryDeletedWebhookEvent,
|
|
19
|
+
WhopSDK::SetupIntentRequiresActionWebhookEvent,
|
|
20
|
+
WhopSDK::SetupIntentSucceededWebhookEvent,
|
|
21
|
+
WhopSDK::SetupIntentCanceledWebhookEvent,
|
|
19
22
|
WhopSDK::CourseLessonInteractionCompletedWebhookEvent,
|
|
20
23
|
WhopSDK::PaymentSucceededWebhookEvent,
|
|
21
24
|
WhopSDK::PaymentFailedWebhookEvent,
|
data/sig/whop_sdk/client.rbs
CHANGED
|
@@ -86,6 +86,10 @@ module WhopSDK
|
|
|
86
86
|
|
|
87
87
|
attr_reader account_links: WhopSDK::Resources::AccountLinks
|
|
88
88
|
|
|
89
|
+
attr_reader setup_intents: WhopSDK::Resources::SetupIntents
|
|
90
|
+
|
|
91
|
+
attr_reader payment_methods: WhopSDK::Resources::PaymentMethods
|
|
92
|
+
|
|
89
93
|
private def auth_headers: -> ::Hash[String, String]
|
|
90
94
|
|
|
91
95
|
def initialize: (
|
|
@@ -5,6 +5,7 @@ module WhopSDK
|
|
|
5
5
|
attachment: WhopSDK::Models::AppBuildCreateParams::attachment,
|
|
6
6
|
checksum: String,
|
|
7
7
|
platform: WhopSDK::Models::app_build_platforms,
|
|
8
|
+
ai_prompt_id: String?,
|
|
8
9
|
app_id: String?,
|
|
9
10
|
supported_app_view_types: ::Array[WhopSDK::Models::app_view_type]?
|
|
10
11
|
}
|
|
@@ -20,6 +21,8 @@ module WhopSDK
|
|
|
20
21
|
|
|
21
22
|
attr_accessor platform: WhopSDK::Models::app_build_platforms
|
|
22
23
|
|
|
24
|
+
attr_accessor ai_prompt_id: String?
|
|
25
|
+
|
|
23
26
|
attr_accessor app_id: String?
|
|
24
27
|
|
|
25
28
|
attr_accessor supported_app_view_types: ::Array[WhopSDK::Models::app_view_type]?
|
|
@@ -28,6 +31,7 @@ module WhopSDK
|
|
|
28
31
|
attachment: WhopSDK::Models::AppBuildCreateParams::attachment,
|
|
29
32
|
checksum: String,
|
|
30
33
|
platform: WhopSDK::Models::app_build_platforms,
|
|
34
|
+
?ai_prompt_id: String?,
|
|
31
35
|
?app_id: String?,
|
|
32
36
|
?supported_app_view_types: ::Array[WhopSDK::Models::app_view_type]?,
|
|
33
37
|
?request_options: WhopSDK::request_opts
|
|
@@ -37,6 +41,7 @@ module WhopSDK
|
|
|
37
41
|
attachment: WhopSDK::Models::AppBuildCreateParams::attachment,
|
|
38
42
|
checksum: String,
|
|
39
43
|
platform: WhopSDK::Models::app_build_platforms,
|
|
44
|
+
ai_prompt_id: String?,
|
|
40
45
|
app_id: String?,
|
|
41
46
|
supported_app_view_types: ::Array[WhopSDK::Models::app_view_type]?,
|
|
42
47
|
request_options: WhopSDK::RequestOptions
|
|
@@ -10,6 +10,7 @@ module WhopSDK
|
|
|
10
10
|
product: WhopSDK::InvoiceCreateParams::Product,
|
|
11
11
|
charge_buyer_fee: bool?,
|
|
12
12
|
customer_name: String?,
|
|
13
|
+
payment_method_id: String?,
|
|
13
14
|
payment_token_id: String?,
|
|
14
15
|
email_address: String,
|
|
15
16
|
product_id: String
|
|
@@ -36,6 +37,8 @@ module WhopSDK
|
|
|
36
37
|
|
|
37
38
|
attr_accessor customer_name: String?
|
|
38
39
|
|
|
40
|
+
attr_accessor payment_method_id: String?
|
|
41
|
+
|
|
39
42
|
attr_accessor payment_token_id: String?
|
|
40
43
|
|
|
41
44
|
attr_accessor email_address: String
|
|
@@ -53,6 +56,7 @@ module WhopSDK
|
|
|
53
56
|
product_id: String,
|
|
54
57
|
?charge_buyer_fee: bool?,
|
|
55
58
|
?customer_name: String?,
|
|
59
|
+
?payment_method_id: String?,
|
|
56
60
|
?payment_token_id: String?,
|
|
57
61
|
?request_options: WhopSDK::request_opts
|
|
58
62
|
) -> void
|
|
@@ -66,6 +70,7 @@ module WhopSDK
|
|
|
66
70
|
product: WhopSDK::InvoiceCreateParams::Product,
|
|
67
71
|
charge_buyer_fee: bool?,
|
|
68
72
|
customer_name: String?,
|
|
73
|
+
payment_method_id: String?,
|
|
69
74
|
payment_token_id: String?,
|
|
70
75
|
email_address: String,
|
|
71
76
|
product_id: String,
|
|
@@ -19,6 +19,7 @@ module WhopSDK
|
|
|
19
19
|
membership: WhopSDK::Payment::Membership?,
|
|
20
20
|
metadata: ::Hash[Symbol, top]?,
|
|
21
21
|
paid_at: Time?,
|
|
22
|
+
payment_method: WhopSDK::Payment::PaymentMethod?,
|
|
22
23
|
payment_method_type: WhopSDK::Models::payment_method_types?,
|
|
23
24
|
plan: WhopSDK::Payment::Plan?,
|
|
24
25
|
product: WhopSDK::Payment::Product?,
|
|
@@ -71,6 +72,8 @@ module WhopSDK
|
|
|
71
72
|
|
|
72
73
|
attr_accessor paid_at: Time?
|
|
73
74
|
|
|
75
|
+
attr_accessor payment_method: WhopSDK::Payment::PaymentMethod?
|
|
76
|
+
|
|
74
77
|
attr_accessor payment_method_type: WhopSDK::Models::payment_method_types?
|
|
75
78
|
|
|
76
79
|
attr_accessor plan: WhopSDK::Payment::Plan?
|
|
@@ -119,6 +122,7 @@ module WhopSDK
|
|
|
119
122
|
membership: WhopSDK::Payment::Membership?,
|
|
120
123
|
metadata: ::Hash[Symbol, top]?,
|
|
121
124
|
paid_at: Time?,
|
|
125
|
+
payment_method: WhopSDK::Payment::PaymentMethod?,
|
|
122
126
|
payment_method_type: WhopSDK::Models::payment_method_types?,
|
|
123
127
|
plan: WhopSDK::Payment::Plan?,
|
|
124
128
|
product: WhopSDK::Payment::Product?,
|
|
@@ -154,6 +158,7 @@ module WhopSDK
|
|
|
154
158
|
membership: WhopSDK::Payment::Membership?,
|
|
155
159
|
metadata: ::Hash[Symbol, top]?,
|
|
156
160
|
paid_at: Time?,
|
|
161
|
+
payment_method: WhopSDK::Payment::PaymentMethod?,
|
|
157
162
|
payment_method_type: WhopSDK::Models::payment_method_types?,
|
|
158
163
|
plan: WhopSDK::Payment::Plan?,
|
|
159
164
|
product: WhopSDK::Payment::Product?,
|
|
@@ -263,6 +268,70 @@ module WhopSDK
|
|
|
263
268
|
}
|
|
264
269
|
end
|
|
265
270
|
|
|
271
|
+
type payment_method =
|
|
272
|
+
{
|
|
273
|
+
id: String,
|
|
274
|
+
card: WhopSDK::Payment::PaymentMethod::Card?,
|
|
275
|
+
created_at: Time,
|
|
276
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
280
|
+
attr_accessor id: String
|
|
281
|
+
|
|
282
|
+
attr_accessor card: WhopSDK::Payment::PaymentMethod::Card?
|
|
283
|
+
|
|
284
|
+
attr_accessor created_at: Time
|
|
285
|
+
|
|
286
|
+
attr_accessor payment_method_type: WhopSDK::Models::payment_method_types
|
|
287
|
+
|
|
288
|
+
def initialize: (
|
|
289
|
+
id: String,
|
|
290
|
+
card: WhopSDK::Payment::PaymentMethod::Card?,
|
|
291
|
+
created_at: Time,
|
|
292
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
293
|
+
) -> void
|
|
294
|
+
|
|
295
|
+
def to_hash: -> {
|
|
296
|
+
id: String,
|
|
297
|
+
card: WhopSDK::Payment::PaymentMethod::Card?,
|
|
298
|
+
created_at: Time,
|
|
299
|
+
payment_method_type: WhopSDK::Models::payment_method_types
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
type card =
|
|
303
|
+
{
|
|
304
|
+
brand: WhopSDK::Models::card_brands?,
|
|
305
|
+
exp_month: Integer?,
|
|
306
|
+
exp_year: Integer?,
|
|
307
|
+
:last4 => String?
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
class Card < WhopSDK::Internal::Type::BaseModel
|
|
311
|
+
attr_accessor brand: WhopSDK::Models::card_brands?
|
|
312
|
+
|
|
313
|
+
attr_accessor exp_month: Integer?
|
|
314
|
+
|
|
315
|
+
attr_accessor exp_year: Integer?
|
|
316
|
+
|
|
317
|
+
attr_accessor last4: String?
|
|
318
|
+
|
|
319
|
+
def initialize: (
|
|
320
|
+
brand: WhopSDK::Models::card_brands?,
|
|
321
|
+
exp_month: Integer?,
|
|
322
|
+
exp_year: Integer?,
|
|
323
|
+
last4: String?
|
|
324
|
+
) -> void
|
|
325
|
+
|
|
326
|
+
def to_hash: -> {
|
|
327
|
+
brand: WhopSDK::Models::card_brands?,
|
|
328
|
+
exp_month: Integer?,
|
|
329
|
+
exp_year: Integer?,
|
|
330
|
+
:last4 => String?
|
|
331
|
+
}
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
|
|
266
335
|
type plan = { id: String }
|
|
267
336
|
|
|
268
337
|
class Plan < WhopSDK::Internal::Type::BaseModel
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
module WhopSDK
|
|
2
|
+
module Models
|
|
3
|
+
type payment_create_params =
|
|
4
|
+
{
|
|
5
|
+
company_id: String,
|
|
6
|
+
member_id: String,
|
|
7
|
+
payment_method_id: String,
|
|
8
|
+
plan: WhopSDK::PaymentCreateParams::Plan,
|
|
9
|
+
plan_id: String
|
|
10
|
+
}
|
|
11
|
+
& WhopSDK::Internal::Type::request_parameters
|
|
12
|
+
|
|
13
|
+
class PaymentCreateParams < WhopSDK::Internal::Type::BaseModel
|
|
14
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
attr_accessor company_id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor member_id: String
|
|
20
|
+
|
|
21
|
+
attr_accessor payment_method_id: String
|
|
22
|
+
|
|
23
|
+
attr_accessor plan: WhopSDK::PaymentCreateParams::Plan
|
|
24
|
+
|
|
25
|
+
attr_accessor plan_id: String
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
company_id: String,
|
|
29
|
+
member_id: String,
|
|
30
|
+
payment_method_id: String,
|
|
31
|
+
plan: WhopSDK::PaymentCreateParams::Plan,
|
|
32
|
+
plan_id: String,
|
|
33
|
+
?request_options: WhopSDK::request_opts
|
|
34
|
+
) -> void
|
|
35
|
+
|
|
36
|
+
def to_hash: -> {
|
|
37
|
+
company_id: String,
|
|
38
|
+
member_id: String,
|
|
39
|
+
payment_method_id: String,
|
|
40
|
+
plan: WhopSDK::PaymentCreateParams::Plan,
|
|
41
|
+
plan_id: String,
|
|
42
|
+
request_options: WhopSDK::RequestOptions
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type plan =
|
|
46
|
+
{
|
|
47
|
+
currency: WhopSDK::Models::currency,
|
|
48
|
+
billing_period: Integer?,
|
|
49
|
+
description: String?,
|
|
50
|
+
expiration_days: Integer?,
|
|
51
|
+
force_create_new_plan: bool?,
|
|
52
|
+
initial_price: Float?,
|
|
53
|
+
internal_notes: String?,
|
|
54
|
+
plan_type: WhopSDK::Models::plan_type?,
|
|
55
|
+
product: WhopSDK::PaymentCreateParams::Plan::Product?,
|
|
56
|
+
product_id: String?,
|
|
57
|
+
renewal_price: Float?,
|
|
58
|
+
title: String?,
|
|
59
|
+
trial_period_days: Integer?,
|
|
60
|
+
visibility: WhopSDK::Models::visibility?
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
class Plan < WhopSDK::Internal::Type::BaseModel
|
|
64
|
+
attr_accessor currency: WhopSDK::Models::currency
|
|
65
|
+
|
|
66
|
+
attr_accessor billing_period: Integer?
|
|
67
|
+
|
|
68
|
+
attr_accessor description: String?
|
|
69
|
+
|
|
70
|
+
attr_accessor expiration_days: Integer?
|
|
71
|
+
|
|
72
|
+
attr_accessor force_create_new_plan: bool?
|
|
73
|
+
|
|
74
|
+
attr_accessor initial_price: Float?
|
|
75
|
+
|
|
76
|
+
attr_accessor internal_notes: String?
|
|
77
|
+
|
|
78
|
+
attr_accessor plan_type: WhopSDK::Models::plan_type?
|
|
79
|
+
|
|
80
|
+
attr_accessor product: WhopSDK::PaymentCreateParams::Plan::Product?
|
|
81
|
+
|
|
82
|
+
attr_accessor product_id: String?
|
|
83
|
+
|
|
84
|
+
attr_accessor renewal_price: Float?
|
|
85
|
+
|
|
86
|
+
attr_accessor title: String?
|
|
87
|
+
|
|
88
|
+
attr_accessor trial_period_days: Integer?
|
|
89
|
+
|
|
90
|
+
attr_accessor visibility: WhopSDK::Models::visibility?
|
|
91
|
+
|
|
92
|
+
def initialize: (
|
|
93
|
+
currency: WhopSDK::Models::currency,
|
|
94
|
+
?billing_period: Integer?,
|
|
95
|
+
?description: String?,
|
|
96
|
+
?expiration_days: Integer?,
|
|
97
|
+
?force_create_new_plan: bool?,
|
|
98
|
+
?initial_price: Float?,
|
|
99
|
+
?internal_notes: String?,
|
|
100
|
+
?plan_type: WhopSDK::Models::plan_type?,
|
|
101
|
+
?product: WhopSDK::PaymentCreateParams::Plan::Product?,
|
|
102
|
+
?product_id: String?,
|
|
103
|
+
?renewal_price: Float?,
|
|
104
|
+
?title: String?,
|
|
105
|
+
?trial_period_days: Integer?,
|
|
106
|
+
?visibility: WhopSDK::Models::visibility?
|
|
107
|
+
) -> void
|
|
108
|
+
|
|
109
|
+
def to_hash: -> {
|
|
110
|
+
currency: WhopSDK::Models::currency,
|
|
111
|
+
billing_period: Integer?,
|
|
112
|
+
description: String?,
|
|
113
|
+
expiration_days: Integer?,
|
|
114
|
+
force_create_new_plan: bool?,
|
|
115
|
+
initial_price: Float?,
|
|
116
|
+
internal_notes: String?,
|
|
117
|
+
plan_type: WhopSDK::Models::plan_type?,
|
|
118
|
+
product: WhopSDK::PaymentCreateParams::Plan::Product?,
|
|
119
|
+
product_id: String?,
|
|
120
|
+
renewal_price: Float?,
|
|
121
|
+
title: String?,
|
|
122
|
+
trial_period_days: Integer?,
|
|
123
|
+
visibility: WhopSDK::Models::visibility?
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
type product =
|
|
127
|
+
{
|
|
128
|
+
external_identifier: String,
|
|
129
|
+
title: String,
|
|
130
|
+
business_type: WhopSDK::Models::business_types?,
|
|
131
|
+
collect_shipping_address: bool?,
|
|
132
|
+
custom_statement_descriptor: String?,
|
|
133
|
+
description: String?,
|
|
134
|
+
global_affiliate_percentage: Float?,
|
|
135
|
+
global_affiliate_status: WhopSDK::Models::global_affiliate_status?,
|
|
136
|
+
headline: String?,
|
|
137
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
138
|
+
product_tax_code_id: String?,
|
|
139
|
+
redirect_purchase_url: String?,
|
|
140
|
+
route: String?,
|
|
141
|
+
visibility: WhopSDK::Models::visibility?
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
class Product < WhopSDK::Internal::Type::BaseModel
|
|
145
|
+
attr_accessor external_identifier: String
|
|
146
|
+
|
|
147
|
+
attr_accessor title: String
|
|
148
|
+
|
|
149
|
+
attr_accessor business_type: WhopSDK::Models::business_types?
|
|
150
|
+
|
|
151
|
+
attr_accessor collect_shipping_address: bool?
|
|
152
|
+
|
|
153
|
+
attr_accessor custom_statement_descriptor: String?
|
|
154
|
+
|
|
155
|
+
attr_accessor description: String?
|
|
156
|
+
|
|
157
|
+
attr_accessor global_affiliate_percentage: Float?
|
|
158
|
+
|
|
159
|
+
attr_accessor global_affiliate_status: WhopSDK::Models::global_affiliate_status?
|
|
160
|
+
|
|
161
|
+
attr_accessor headline: String?
|
|
162
|
+
|
|
163
|
+
attr_accessor industry_type: WhopSDK::Models::industry_types?
|
|
164
|
+
|
|
165
|
+
attr_accessor product_tax_code_id: String?
|
|
166
|
+
|
|
167
|
+
attr_accessor redirect_purchase_url: String?
|
|
168
|
+
|
|
169
|
+
attr_accessor route: String?
|
|
170
|
+
|
|
171
|
+
attr_accessor visibility: WhopSDK::Models::visibility?
|
|
172
|
+
|
|
173
|
+
def initialize: (
|
|
174
|
+
external_identifier: String,
|
|
175
|
+
title: String,
|
|
176
|
+
?business_type: WhopSDK::Models::business_types?,
|
|
177
|
+
?collect_shipping_address: bool?,
|
|
178
|
+
?custom_statement_descriptor: String?,
|
|
179
|
+
?description: String?,
|
|
180
|
+
?global_affiliate_percentage: Float?,
|
|
181
|
+
?global_affiliate_status: WhopSDK::Models::global_affiliate_status?,
|
|
182
|
+
?headline: String?,
|
|
183
|
+
?industry_type: WhopSDK::Models::industry_types?,
|
|
184
|
+
?product_tax_code_id: String?,
|
|
185
|
+
?redirect_purchase_url: String?,
|
|
186
|
+
?route: String?,
|
|
187
|
+
?visibility: WhopSDK::Models::visibility?
|
|
188
|
+
) -> void
|
|
189
|
+
|
|
190
|
+
def to_hash: -> {
|
|
191
|
+
external_identifier: String,
|
|
192
|
+
title: String,
|
|
193
|
+
business_type: WhopSDK::Models::business_types?,
|
|
194
|
+
collect_shipping_address: bool?,
|
|
195
|
+
custom_statement_descriptor: String?,
|
|
196
|
+
description: String?,
|
|
197
|
+
global_affiliate_percentage: Float?,
|
|
198
|
+
global_affiliate_status: WhopSDK::Models::global_affiliate_status?,
|
|
199
|
+
headline: String?,
|
|
200
|
+
industry_type: WhopSDK::Models::industry_types?,
|
|
201
|
+
product_tax_code_id: String?,
|
|
202
|
+
redirect_purchase_url: String?,
|
|
203
|
+
route: String?,
|
|
204
|
+
visibility: WhopSDK::Models::visibility?
|
|
205
|
+
}
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
end
|