whop_sdk 0.0.10 → 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 +14 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +3 -3
- data/lib/whop_sdk/internal/type/union.rb +12 -0
- data/lib/whop_sdk/models/invoice_create_params.rb +10 -1
- data/lib/whop_sdk/models/payment.rb +25 -27
- data/lib/whop_sdk/models/payment_create_params.rb +5 -5
- data/lib/whop_sdk/models/payment_list_response.rb +25 -27
- data/lib/whop_sdk/models/{payment_token_list_params.rb → payment_method_list_params.rb} +4 -4
- data/lib/whop_sdk/models/{payment_token_list_response.rb → payment_method_list_response.rb} +17 -18
- data/lib/whop_sdk/models/{payment_token_retrieve_params.rb → payment_method_retrieve_params.rb} +4 -4
- data/lib/whop_sdk/models/{payment_token_retrieve_response.rb → payment_method_retrieve_response.rb} +17 -18
- data/lib/whop_sdk/models/setup_intent.rb +22 -24
- data/lib/whop_sdk/models/setup_intent_list_response.rb +22 -24
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +24 -21
- data/lib/whop_sdk/models.rb +4 -4
- data/lib/whop_sdk/resources/invoices.rb +3 -1
- data/lib/whop_sdk/resources/{payment_tokens.rb → payment_methods.rb} +24 -16
- data/lib/whop_sdk/resources/payments.rb +7 -5
- data/lib/whop_sdk/resources/setup_intents.rb +10 -2
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +5 -5
- data/rbi/whop_sdk/client.rbi +2 -2
- data/rbi/whop_sdk/models/invoice_create_params.rbi +10 -0
- data/rbi/whop_sdk/models/payment.rbi +30 -33
- data/rbi/whop_sdk/models/payment_create_params.rbi +6 -6
- data/rbi/whop_sdk/models/payment_list_response.rbi +34 -37
- data/rbi/whop_sdk/models/{payment_token_list_params.rbi → payment_method_list_params.rbi} +4 -4
- data/rbi/whop_sdk/models/{payment_token_list_response.rbi → payment_method_list_response.rbi} +18 -20
- data/rbi/whop_sdk/models/{payment_token_retrieve_params.rbi → payment_method_retrieve_params.rbi} +7 -4
- data/rbi/whop_sdk/models/{payment_token_retrieve_response.rbi → payment_method_retrieve_response.rbi} +18 -20
- data/rbi/whop_sdk/models/setup_intent.rbi +27 -29
- data/rbi/whop_sdk/models/setup_intent_list_response.rbi +31 -32
- data/rbi/whop_sdk/models.rbi +4 -4
- data/rbi/whop_sdk/resources/invoices.rbi +4 -0
- data/rbi/whop_sdk/resources/{payment_tokens.rbi → payment_methods.rbi} +16 -8
- data/rbi/whop_sdk/resources/payments.rbi +8 -6
- data/rbi/whop_sdk/resources/setup_intents.rbi +10 -2
- data/sig/whop_sdk/client.rbs +1 -1
- data/sig/whop_sdk/models/invoice_create_params.rbs +5 -0
- data/sig/whop_sdk/models/payment.rbs +11 -11
- data/sig/whop_sdk/models/payment_create_params.rbs +4 -4
- data/sig/whop_sdk/models/payment_list_response.rbs +11 -11
- data/sig/whop_sdk/models/{payment_token_list_params.rbs → payment_method_list_params.rbs} +2 -2
- data/sig/whop_sdk/models/{payment_token_list_response.rbs → payment_method_list_response.rbs} +6 -6
- data/sig/whop_sdk/models/{payment_token_retrieve_params.rbs → payment_method_retrieve_params.rbs} +2 -2
- data/sig/whop_sdk/models/{payment_token_retrieve_response.rbs → payment_method_retrieve_response.rbs} +6 -6
- data/sig/whop_sdk/models/setup_intent.rbs +10 -10
- data/sig/whop_sdk/models/setup_intent_list_response.rbs +10 -10
- data/sig/whop_sdk/models.rbs +4 -4
- data/sig/whop_sdk/resources/invoices.rbs +1 -0
- data/sig/whop_sdk/resources/{payment_tokens.rbs → payment_methods.rbs} +3 -3
- data/sig/whop_sdk/resources/payments.rbs +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c1fa6283e78ac7d35742c7972630f30bde25fb899730ccb1b10daad50ee5dcb
|
|
4
|
+
data.tar.gz: 0a703e1bfda78d55b4780979e20397beff3eaa4ce6ed9d42d55f006f1c948054
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c69ac08c3f771766d2167d8ce82d54484979b583a78eb6dcd986101d21a793bbacf9f19cbe52ae5dac09e34e5dea0ff607ea4e2f324d237e8047321f69aa60e9
|
|
7
|
+
data.tar.gz: 9261ba267af898db55bd7283bf75f869e49071d8d36d37c5cfa7648e136f811be5b8f43713192fa622e1e5af0f4faa7aa95776266a22cefe6b84e88b796f5457
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.11 (2025-12-02)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.0.10...v0.0.11](https://github.com/whopio/whopsdk-ruby/compare/v0.0.10...v0.0.11)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([eb70106](https://github.com/whopio/whopsdk-ruby/commit/eb70106cabeebd2c9c3ce95c130f5537b65e613b))
|
|
10
|
+
* **api:** manual updates ([ae17f10](https://github.com/whopio/whopsdk-ruby/commit/ae17f10718e7bcbfb51471ea56bfb17c7ada5b72))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Chores
|
|
14
|
+
|
|
15
|
+
* **internal:** codegen related update ([6dfe6e1](https://github.com/whopio/whopsdk-ruby/commit/6dfe6e1fa2ffd8f47ae76cfa355fd4b678a128f8))
|
|
16
|
+
|
|
3
17
|
## 0.0.10 (2025-12-02)
|
|
4
18
|
|
|
5
19
|
Full Changelog: [v0.0.9...v0.0.10](https://github.com/whopio/whopsdk-ruby/compare/v0.0.9...v0.0.10)
|
data/README.md
CHANGED
data/lib/whop_sdk/client.rb
CHANGED
|
@@ -138,8 +138,8 @@ module WhopSDK
|
|
|
138
138
|
# @return [WhopSDK::Resources::SetupIntents]
|
|
139
139
|
attr_reader :setup_intents
|
|
140
140
|
|
|
141
|
-
# @return [WhopSDK::Resources::
|
|
142
|
-
attr_reader :
|
|
141
|
+
# @return [WhopSDK::Resources::PaymentMethods]
|
|
142
|
+
attr_reader :payment_methods
|
|
143
143
|
|
|
144
144
|
# @api private
|
|
145
145
|
#
|
|
@@ -236,7 +236,7 @@ module WhopSDK
|
|
|
236
236
|
@withdrawals = WhopSDK::Resources::Withdrawals.new(client: self)
|
|
237
237
|
@account_links = WhopSDK::Resources::AccountLinks.new(client: self)
|
|
238
238
|
@setup_intents = WhopSDK::Resources::SetupIntents.new(client: self)
|
|
239
|
-
@
|
|
239
|
+
@payment_methods = WhopSDK::Resources::PaymentMethods.new(client: self)
|
|
240
240
|
end
|
|
241
241
|
|
|
242
242
|
# Verifies a Whop user token
|
|
@@ -17,6 +17,18 @@ module WhopSDK
|
|
|
17
17
|
# else
|
|
18
18
|
# puts(unwrap_webhook_event)
|
|
19
19
|
# end
|
|
20
|
+
#
|
|
21
|
+
# @example
|
|
22
|
+
# case unwrap_webhook_event
|
|
23
|
+
# in {type: :"invoice.created", id: id, api_version: api_version, data: data}
|
|
24
|
+
# puts(id)
|
|
25
|
+
# in {type: :"invoice.paid", id: id, api_version: api_version, data: data}
|
|
26
|
+
# puts(api_version)
|
|
27
|
+
# in {type: :"invoice.past_due", id: id, api_version: api_version, data: data}
|
|
28
|
+
# puts(data)
|
|
29
|
+
# else
|
|
30
|
+
# puts(unwrap_webhook_event)
|
|
31
|
+
# end
|
|
20
32
|
module Union
|
|
21
33
|
include WhopSDK::Internal::Type::Converter
|
|
22
34
|
include WhopSDK::Internal::Util::SorbetRuntimeSupport
|
|
@@ -61,6 +61,13 @@ module WhopSDK
|
|
|
61
61
|
# @return [String, nil]
|
|
62
62
|
optional :customer_name, String, nil?: true
|
|
63
63
|
|
|
64
|
+
# @!attribute payment_method_id
|
|
65
|
+
# The payment method ID to use for this invoice. If using charge_automatically,
|
|
66
|
+
# you must provide a payment_method_id.
|
|
67
|
+
#
|
|
68
|
+
# @return [String, nil]
|
|
69
|
+
optional :payment_method_id, String, nil?: true
|
|
70
|
+
|
|
64
71
|
# @!attribute payment_token_id
|
|
65
72
|
# The payment token ID to use for this invoice. If using charge_automatically, you
|
|
66
73
|
# must provide a payment_token.
|
|
@@ -82,7 +89,7 @@ module WhopSDK
|
|
|
82
89
|
# @return [String]
|
|
83
90
|
required :product_id, String
|
|
84
91
|
|
|
85
|
-
# @!method initialize(collection_method:, company_id:, due_date:, member_id:, plan:, product:, email_address:, product_id:, charge_buyer_fee: nil, customer_name: nil, payment_token_id: nil, request_options: {})
|
|
92
|
+
# @!method initialize(collection_method:, company_id:, due_date:, member_id:, plan:, product:, email_address:, product_id:, charge_buyer_fee: nil, customer_name: nil, payment_method_id: nil, payment_token_id: nil, request_options: {})
|
|
86
93
|
# Some parameter documentations has been truncated, see
|
|
87
94
|
# {WhopSDK::Models::InvoiceCreateParams} for more details.
|
|
88
95
|
#
|
|
@@ -106,6 +113,8 @@ module WhopSDK
|
|
|
106
113
|
#
|
|
107
114
|
# @param customer_name [String, nil] The name of the customer to create this invoice for. This is required if you wan
|
|
108
115
|
#
|
|
116
|
+
# @param payment_method_id [String, nil] The payment method ID to use for this invoice. If using charge_automatically, yo
|
|
117
|
+
#
|
|
109
118
|
# @param payment_token_id [String, nil] The payment token ID to use for this invoice. If using charge_automatically, you
|
|
110
119
|
#
|
|
111
120
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -106,18 +106,18 @@ module WhopSDK
|
|
|
106
106
|
# @return [Time, nil]
|
|
107
107
|
required :paid_at, Time, nil?: true
|
|
108
108
|
|
|
109
|
+
# @!attribute payment_method
|
|
110
|
+
# The payment method used for the payment, if available.
|
|
111
|
+
#
|
|
112
|
+
# @return [WhopSDK::Models::Payment::PaymentMethod, nil]
|
|
113
|
+
required :payment_method, -> { WhopSDK::Payment::PaymentMethod }, nil?: true
|
|
114
|
+
|
|
109
115
|
# @!attribute payment_method_type
|
|
110
116
|
# The different types of payment methods that can be used.
|
|
111
117
|
#
|
|
112
118
|
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
|
|
113
119
|
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
|
|
114
120
|
|
|
115
|
-
# @!attribute payment_token
|
|
116
|
-
# The payment token used for the payment, if available.
|
|
117
|
-
#
|
|
118
|
-
# @return [WhopSDK::Models::Payment::PaymentToken, nil]
|
|
119
|
-
required :payment_token, -> { WhopSDK::Payment::PaymentToken }, nil?: true
|
|
120
|
-
|
|
121
121
|
# @!attribute plan
|
|
122
122
|
# The plan attached to this payment.
|
|
123
123
|
#
|
|
@@ -206,7 +206,7 @@ module WhopSDK
|
|
|
206
206
|
# @return [Boolean]
|
|
207
207
|
required :voidable, WhopSDK::Internal::Type::Boolean
|
|
208
208
|
|
|
209
|
-
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:,
|
|
209
|
+
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
210
210
|
# Some parameter documentations has been truncated, see {WhopSDK::Models::Payment}
|
|
211
211
|
# for more details.
|
|
212
212
|
#
|
|
@@ -246,9 +246,9 @@ module WhopSDK
|
|
|
246
246
|
#
|
|
247
247
|
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
248
248
|
#
|
|
249
|
-
# @param
|
|
249
|
+
# @param payment_method [WhopSDK::Models::Payment::PaymentMethod, nil] The payment method used for the payment, if available.
|
|
250
250
|
#
|
|
251
|
-
# @param
|
|
251
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
|
|
252
252
|
#
|
|
253
253
|
# @param plan [WhopSDK::Models::Payment::Plan, nil] The plan attached to this payment.
|
|
254
254
|
#
|
|
@@ -414,48 +414,47 @@ module WhopSDK
|
|
|
414
414
|
# @param status [Symbol, WhopSDK::Models::MembershipStatus] The state of the membership.
|
|
415
415
|
end
|
|
416
416
|
|
|
417
|
-
# @see WhopSDK::Models::Payment#
|
|
418
|
-
class
|
|
417
|
+
# @see WhopSDK::Models::Payment#payment_method
|
|
418
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
419
419
|
# @!attribute id
|
|
420
|
-
# The ID of the payment
|
|
420
|
+
# The ID of the payment method
|
|
421
421
|
#
|
|
422
422
|
# @return [String]
|
|
423
423
|
required :id, String
|
|
424
424
|
|
|
425
425
|
# @!attribute card
|
|
426
|
-
# The card data associated with the payment
|
|
427
|
-
# token.
|
|
426
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
428
427
|
#
|
|
429
|
-
# @return [WhopSDK::Models::Payment::
|
|
430
|
-
required :card, -> { WhopSDK::Payment::
|
|
428
|
+
# @return [WhopSDK::Models::Payment::PaymentMethod::Card, nil]
|
|
429
|
+
required :card, -> { WhopSDK::Payment::PaymentMethod::Card }, nil?: true
|
|
431
430
|
|
|
432
431
|
# @!attribute created_at
|
|
433
|
-
# The date and time the payment
|
|
432
|
+
# The date and time the payment method was created
|
|
434
433
|
#
|
|
435
434
|
# @return [Time]
|
|
436
435
|
required :created_at, Time
|
|
437
436
|
|
|
438
437
|
# @!attribute payment_method_type
|
|
439
|
-
# The payment method type of the payment
|
|
438
|
+
# The payment method type of the payment method
|
|
440
439
|
#
|
|
441
440
|
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
442
441
|
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
443
442
|
|
|
444
443
|
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
445
444
|
# Some parameter documentations has been truncated, see
|
|
446
|
-
# {WhopSDK::Models::Payment::
|
|
445
|
+
# {WhopSDK::Models::Payment::PaymentMethod} for more details.
|
|
447
446
|
#
|
|
448
|
-
# The payment
|
|
447
|
+
# The payment method used for the payment, if available.
|
|
449
448
|
#
|
|
450
|
-
# @param id [String] The ID of the payment
|
|
449
|
+
# @param id [String] The ID of the payment method
|
|
451
450
|
#
|
|
452
|
-
# @param card [WhopSDK::Models::Payment::
|
|
451
|
+
# @param card [WhopSDK::Models::Payment::PaymentMethod::Card, nil] The card data associated with the payment method, if its a debit or credit card.
|
|
453
452
|
#
|
|
454
|
-
# @param created_at [Time] The date and time the payment
|
|
453
|
+
# @param created_at [Time] The date and time the payment method was created
|
|
455
454
|
#
|
|
456
|
-
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment
|
|
455
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
|
|
457
456
|
|
|
458
|
-
# @see WhopSDK::Models::Payment::
|
|
457
|
+
# @see WhopSDK::Models::Payment::PaymentMethod#card
|
|
459
458
|
class Card < WhopSDK::Internal::Type::BaseModel
|
|
460
459
|
# @!attribute brand
|
|
461
460
|
# Possible card brands that a payment token can have
|
|
@@ -482,8 +481,7 @@ module WhopSDK
|
|
|
482
481
|
required :last4, String, nil?: true
|
|
483
482
|
|
|
484
483
|
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
485
|
-
# The card data associated with the payment
|
|
486
|
-
# token.
|
|
484
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
487
485
|
#
|
|
488
486
|
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
489
487
|
#
|
|
@@ -19,12 +19,12 @@ module WhopSDK
|
|
|
19
19
|
# @return [String]
|
|
20
20
|
required :member_id, String
|
|
21
21
|
|
|
22
|
-
# @!attribute
|
|
23
|
-
# The ID of the payment
|
|
22
|
+
# @!attribute payment_method_id
|
|
23
|
+
# The ID of the payment method to use for the payment. It must be connected to the
|
|
24
24
|
# Member being charged.
|
|
25
25
|
#
|
|
26
26
|
# @return [String]
|
|
27
|
-
required :
|
|
27
|
+
required :payment_method_id, String
|
|
28
28
|
|
|
29
29
|
# @!attribute plan
|
|
30
30
|
# Pass this object to create a new plan for this payment
|
|
@@ -38,7 +38,7 @@ module WhopSDK
|
|
|
38
38
|
# @return [String]
|
|
39
39
|
required :plan_id, String
|
|
40
40
|
|
|
41
|
-
# @!method initialize(company_id:, member_id:,
|
|
41
|
+
# @!method initialize(company_id:, member_id:, payment_method_id:, plan:, plan_id:, request_options: {})
|
|
42
42
|
# Some parameter documentations has been truncated, see
|
|
43
43
|
# {WhopSDK::Models::PaymentCreateParams} for more details.
|
|
44
44
|
#
|
|
@@ -46,7 +46,7 @@ module WhopSDK
|
|
|
46
46
|
#
|
|
47
47
|
# @param member_id [String] The ID of the member to create the payment for.
|
|
48
48
|
#
|
|
49
|
-
# @param
|
|
49
|
+
# @param payment_method_id [String] The ID of the payment method to use for the payment. It must be connected to the
|
|
50
50
|
#
|
|
51
51
|
# @param plan [WhopSDK::Models::PaymentCreateParams::Plan] Pass this object to create a new plan for this payment
|
|
52
52
|
#
|
|
@@ -107,18 +107,18 @@ module WhopSDK
|
|
|
107
107
|
# @return [Time, nil]
|
|
108
108
|
required :paid_at, Time, nil?: true
|
|
109
109
|
|
|
110
|
+
# @!attribute payment_method
|
|
111
|
+
# The payment method used for the payment, if available.
|
|
112
|
+
#
|
|
113
|
+
# @return [WhopSDK::Models::PaymentListResponse::PaymentMethod, nil]
|
|
114
|
+
required :payment_method, -> { WhopSDK::Models::PaymentListResponse::PaymentMethod }, nil?: true
|
|
115
|
+
|
|
110
116
|
# @!attribute payment_method_type
|
|
111
117
|
# The different types of payment methods that can be used.
|
|
112
118
|
#
|
|
113
119
|
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes, nil]
|
|
114
120
|
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }, nil?: true
|
|
115
121
|
|
|
116
|
-
# @!attribute payment_token
|
|
117
|
-
# The payment token used for the payment, if available.
|
|
118
|
-
#
|
|
119
|
-
# @return [WhopSDK::Models::PaymentListResponse::PaymentToken, nil]
|
|
120
|
-
required :payment_token, -> { WhopSDK::Models::PaymentListResponse::PaymentToken }, nil?: true
|
|
121
|
-
|
|
122
122
|
# @!attribute plan
|
|
123
123
|
# The plan attached to this payment.
|
|
124
124
|
#
|
|
@@ -207,7 +207,7 @@ module WhopSDK
|
|
|
207
207
|
# @return [Boolean]
|
|
208
208
|
required :voidable, WhopSDK::Internal::Type::Boolean
|
|
209
209
|
|
|
210
|
-
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:,
|
|
210
|
+
# @!method initialize(id:, amount_after_fees:, auto_refunded:, billing_address:, billing_reason:, card_brand:, card_last4:, company:, created_at:, currency:, dispute_alerted_at:, failure_message:, last_payment_attempt:, member:, membership:, metadata:, paid_at:, payment_method:, payment_method_type:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
|
|
211
211
|
# Some parameter documentations has been truncated, see
|
|
212
212
|
# {WhopSDK::Models::PaymentListResponse} for more details.
|
|
213
213
|
#
|
|
@@ -247,9 +247,9 @@ module WhopSDK
|
|
|
247
247
|
#
|
|
248
248
|
# @param paid_at [Time, nil] The datetime the payment was paid
|
|
249
249
|
#
|
|
250
|
-
# @param
|
|
250
|
+
# @param payment_method [WhopSDK::Models::PaymentListResponse::PaymentMethod, nil] The payment method used for the payment, if available.
|
|
251
251
|
#
|
|
252
|
-
# @param
|
|
252
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
|
|
253
253
|
#
|
|
254
254
|
# @param plan [WhopSDK::Models::PaymentListResponse::Plan, nil] The plan attached to this payment.
|
|
255
255
|
#
|
|
@@ -415,48 +415,47 @@ module WhopSDK
|
|
|
415
415
|
# @param status [Symbol, WhopSDK::Models::MembershipStatus] The state of the membership.
|
|
416
416
|
end
|
|
417
417
|
|
|
418
|
-
# @see WhopSDK::Models::PaymentListResponse#
|
|
419
|
-
class
|
|
418
|
+
# @see WhopSDK::Models::PaymentListResponse#payment_method
|
|
419
|
+
class PaymentMethod < WhopSDK::Internal::Type::BaseModel
|
|
420
420
|
# @!attribute id
|
|
421
|
-
# The ID of the payment
|
|
421
|
+
# The ID of the payment method
|
|
422
422
|
#
|
|
423
423
|
# @return [String]
|
|
424
424
|
required :id, String
|
|
425
425
|
|
|
426
426
|
# @!attribute card
|
|
427
|
-
# The card data associated with the payment
|
|
428
|
-
# token.
|
|
427
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
429
428
|
#
|
|
430
|
-
# @return [WhopSDK::Models::PaymentListResponse::
|
|
431
|
-
required :card, -> { WhopSDK::Models::PaymentListResponse::
|
|
429
|
+
# @return [WhopSDK::Models::PaymentListResponse::PaymentMethod::Card, nil]
|
|
430
|
+
required :card, -> { WhopSDK::Models::PaymentListResponse::PaymentMethod::Card }, nil?: true
|
|
432
431
|
|
|
433
432
|
# @!attribute created_at
|
|
434
|
-
# The date and time the payment
|
|
433
|
+
# The date and time the payment method was created
|
|
435
434
|
#
|
|
436
435
|
# @return [Time]
|
|
437
436
|
required :created_at, Time
|
|
438
437
|
|
|
439
438
|
# @!attribute payment_method_type
|
|
440
|
-
# The payment method type of the payment
|
|
439
|
+
# The payment method type of the payment method
|
|
441
440
|
#
|
|
442
441
|
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
443
442
|
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
444
443
|
|
|
445
444
|
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
446
445
|
# Some parameter documentations has been truncated, see
|
|
447
|
-
# {WhopSDK::Models::PaymentListResponse::
|
|
446
|
+
# {WhopSDK::Models::PaymentListResponse::PaymentMethod} for more details.
|
|
448
447
|
#
|
|
449
|
-
# The payment
|
|
448
|
+
# The payment method used for the payment, if available.
|
|
450
449
|
#
|
|
451
|
-
# @param id [String] The ID of the payment
|
|
450
|
+
# @param id [String] The ID of the payment method
|
|
452
451
|
#
|
|
453
|
-
# @param card [WhopSDK::Models::PaymentListResponse::
|
|
452
|
+
# @param card [WhopSDK::Models::PaymentListResponse::PaymentMethod::Card, nil] The card data associated with the payment method, if its a debit or credit card.
|
|
454
453
|
#
|
|
455
|
-
# @param created_at [Time] The date and time the payment
|
|
454
|
+
# @param created_at [Time] The date and time the payment method was created
|
|
456
455
|
#
|
|
457
|
-
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment
|
|
456
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
|
|
458
457
|
|
|
459
|
-
# @see WhopSDK::Models::PaymentListResponse::
|
|
458
|
+
# @see WhopSDK::Models::PaymentListResponse::PaymentMethod#card
|
|
460
459
|
class Card < WhopSDK::Internal::Type::BaseModel
|
|
461
460
|
# @!attribute brand
|
|
462
461
|
# Possible card brands that a payment token can have
|
|
@@ -483,8 +482,7 @@ module WhopSDK
|
|
|
483
482
|
required :last4, String, nil?: true
|
|
484
483
|
|
|
485
484
|
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
486
|
-
# The card data associated with the payment
|
|
487
|
-
# token.
|
|
485
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
488
486
|
#
|
|
489
487
|
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
490
488
|
#
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
# @see WhopSDK::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see WhopSDK::Resources::PaymentMethods#list
|
|
6
|
+
class PaymentMethodListParams < WhopSDK::Internal::Type::BaseModel
|
|
7
7
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include WhopSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute member_id
|
|
11
|
-
# The ID of the Member to list payment
|
|
11
|
+
# The ID of the Member to list payment methods for
|
|
12
12
|
#
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :member_id, String
|
|
@@ -56,7 +56,7 @@ module WhopSDK
|
|
|
56
56
|
optional :last, Integer, nil?: true
|
|
57
57
|
|
|
58
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
|
|
59
|
+
# @param member_id [String] The ID of the Member to list payment methods for
|
|
60
60
|
#
|
|
61
61
|
# @param after [String, nil] Returns the elements in the list that come after the specified cursor.
|
|
62
62
|
#
|
|
@@ -2,48 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
# @see WhopSDK::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see WhopSDK::Resources::PaymentMethods#list
|
|
6
|
+
class PaymentMethodListResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute id
|
|
8
|
-
# The ID of the payment
|
|
8
|
+
# The ID of the payment method
|
|
9
9
|
#
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :id, String
|
|
12
12
|
|
|
13
13
|
# @!attribute card
|
|
14
|
-
# The card data associated with the payment
|
|
15
|
-
# token.
|
|
14
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
16
15
|
#
|
|
17
|
-
# @return [WhopSDK::Models::
|
|
18
|
-
required :card, -> { WhopSDK::Models::
|
|
16
|
+
# @return [WhopSDK::Models::PaymentMethodListResponse::Card, nil]
|
|
17
|
+
required :card, -> { WhopSDK::Models::PaymentMethodListResponse::Card }, nil?: true
|
|
19
18
|
|
|
20
19
|
# @!attribute created_at
|
|
21
|
-
# The date and time the payment
|
|
20
|
+
# The date and time the payment method was created
|
|
22
21
|
#
|
|
23
22
|
# @return [Time]
|
|
24
23
|
required :created_at, Time
|
|
25
24
|
|
|
26
25
|
# @!attribute payment_method_type
|
|
27
|
-
# The payment method type of the payment
|
|
26
|
+
# The payment method type of the payment method
|
|
28
27
|
#
|
|
29
28
|
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
30
29
|
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
31
30
|
|
|
32
31
|
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
33
32
|
# Some parameter documentations has been truncated, see
|
|
34
|
-
# {WhopSDK::Models::
|
|
33
|
+
# {WhopSDK::Models::PaymentMethodListResponse} for more details.
|
|
35
34
|
#
|
|
36
|
-
# A payment
|
|
35
|
+
# A stored payment method used to process payments. This could be a credit/debit
|
|
36
|
+
# card, bank account, PayPal wallet, etc.
|
|
37
37
|
#
|
|
38
|
-
# @param id [String] The ID of the payment
|
|
38
|
+
# @param id [String] The ID of the payment method
|
|
39
39
|
#
|
|
40
|
-
# @param card [WhopSDK::Models::
|
|
40
|
+
# @param card [WhopSDK::Models::PaymentMethodListResponse::Card, nil] The card data associated with the payment method, if its a debit or credit card.
|
|
41
41
|
#
|
|
42
|
-
# @param created_at [Time] The date and time the payment
|
|
42
|
+
# @param created_at [Time] The date and time the payment method was created
|
|
43
43
|
#
|
|
44
|
-
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment
|
|
44
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
|
|
45
45
|
|
|
46
|
-
# @see WhopSDK::Models::
|
|
46
|
+
# @see WhopSDK::Models::PaymentMethodListResponse#card
|
|
47
47
|
class Card < WhopSDK::Internal::Type::BaseModel
|
|
48
48
|
# @!attribute brand
|
|
49
49
|
# Possible card brands that a payment token can have
|
|
@@ -70,8 +70,7 @@ module WhopSDK
|
|
|
70
70
|
required :last4, String, nil?: true
|
|
71
71
|
|
|
72
72
|
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
73
|
-
# The card data associated with the payment
|
|
74
|
-
# token.
|
|
73
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
75
74
|
#
|
|
76
75
|
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
77
76
|
#
|
data/lib/whop_sdk/models/{payment_token_retrieve_params.rb → payment_method_retrieve_params.rb}
RENAMED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
# @see WhopSDK::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see WhopSDK::Resources::PaymentMethods#retrieve
|
|
6
|
+
class PaymentMethodRetrieveParams < WhopSDK::Internal::Type::BaseModel
|
|
7
7
|
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include WhopSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute member_id
|
|
11
|
-
# The ID of the Member associated with the
|
|
11
|
+
# The ID of the Member associated with the PaymentMethod
|
|
12
12
|
#
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :member_id, String
|
|
15
15
|
|
|
16
16
|
# @!method initialize(member_id:, request_options: {})
|
|
17
|
-
# @param member_id [String] The ID of the Member associated with the
|
|
17
|
+
# @param member_id [String] The ID of the Member associated with the PaymentMethod
|
|
18
18
|
#
|
|
19
19
|
# @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
20
20
|
end
|
data/lib/whop_sdk/models/{payment_token_retrieve_response.rb → payment_method_retrieve_response.rb}
RENAMED
|
@@ -2,48 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
module WhopSDK
|
|
4
4
|
module Models
|
|
5
|
-
# @see WhopSDK::Resources::
|
|
6
|
-
class
|
|
5
|
+
# @see WhopSDK::Resources::PaymentMethods#retrieve
|
|
6
|
+
class PaymentMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute id
|
|
8
|
-
# The ID of the payment
|
|
8
|
+
# The ID of the payment method
|
|
9
9
|
#
|
|
10
10
|
# @return [String]
|
|
11
11
|
required :id, String
|
|
12
12
|
|
|
13
13
|
# @!attribute card
|
|
14
|
-
# The card data associated with the payment
|
|
15
|
-
# token.
|
|
14
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
16
15
|
#
|
|
17
|
-
# @return [WhopSDK::Models::
|
|
18
|
-
required :card, -> { WhopSDK::Models::
|
|
16
|
+
# @return [WhopSDK::Models::PaymentMethodRetrieveResponse::Card, nil]
|
|
17
|
+
required :card, -> { WhopSDK::Models::PaymentMethodRetrieveResponse::Card }, nil?: true
|
|
19
18
|
|
|
20
19
|
# @!attribute created_at
|
|
21
|
-
# The date and time the payment
|
|
20
|
+
# The date and time the payment method was created
|
|
22
21
|
#
|
|
23
22
|
# @return [Time]
|
|
24
23
|
required :created_at, Time
|
|
25
24
|
|
|
26
25
|
# @!attribute payment_method_type
|
|
27
|
-
# The payment method type of the payment
|
|
26
|
+
# The payment method type of the payment method
|
|
28
27
|
#
|
|
29
28
|
# @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
|
|
30
29
|
required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
|
|
31
30
|
|
|
32
31
|
# @!method initialize(id:, card:, created_at:, payment_method_type:)
|
|
33
32
|
# Some parameter documentations has been truncated, see
|
|
34
|
-
# {WhopSDK::Models::
|
|
33
|
+
# {WhopSDK::Models::PaymentMethodRetrieveResponse} for more details.
|
|
35
34
|
#
|
|
36
|
-
# A payment
|
|
35
|
+
# A stored payment method used to process payments. This could be a credit/debit
|
|
36
|
+
# card, bank account, PayPal wallet, etc.
|
|
37
37
|
#
|
|
38
|
-
# @param id [String] The ID of the payment
|
|
38
|
+
# @param id [String] The ID of the payment method
|
|
39
39
|
#
|
|
40
|
-
# @param card [WhopSDK::Models::
|
|
40
|
+
# @param card [WhopSDK::Models::PaymentMethodRetrieveResponse::Card, nil] The card data associated with the payment method, if its a debit or credit card.
|
|
41
41
|
#
|
|
42
|
-
# @param created_at [Time] The date and time the payment
|
|
42
|
+
# @param created_at [Time] The date and time the payment method was created
|
|
43
43
|
#
|
|
44
|
-
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment
|
|
44
|
+
# @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
|
|
45
45
|
|
|
46
|
-
# @see WhopSDK::Models::
|
|
46
|
+
# @see WhopSDK::Models::PaymentMethodRetrieveResponse#card
|
|
47
47
|
class Card < WhopSDK::Internal::Type::BaseModel
|
|
48
48
|
# @!attribute brand
|
|
49
49
|
# Possible card brands that a payment token can have
|
|
@@ -70,8 +70,7 @@ module WhopSDK
|
|
|
70
70
|
required :last4, String, nil?: true
|
|
71
71
|
|
|
72
72
|
# @!method initialize(brand:, exp_month:, exp_year:, last4:)
|
|
73
|
-
# The card data associated with the payment
|
|
74
|
-
# token.
|
|
73
|
+
# The card data associated with the payment method, if its a debit or credit card.
|
|
75
74
|
#
|
|
76
75
|
# @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
|
|
77
76
|
#
|