whop_sdk 0.0.10 → 0.0.12

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.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +3 -3
  5. data/lib/whop_sdk/internal/type/union.rb +12 -0
  6. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/invoice_create_params.rb +10 -1
  8. data/lib/whop_sdk/models/payment.rb +25 -27
  9. data/lib/whop_sdk/models/payment_create_params.rb +5 -5
  10. data/lib/whop_sdk/models/payment_list_response.rb +25 -27
  11. data/lib/whop_sdk/models/{payment_token_list_params.rb → payment_method_list_params.rb} +4 -4
  12. data/lib/whop_sdk/models/{payment_token_list_response.rb → payment_method_list_response.rb} +17 -18
  13. data/lib/whop_sdk/models/{payment_token_retrieve_params.rb → payment_method_retrieve_params.rb} +4 -4
  14. data/lib/whop_sdk/models/{payment_token_retrieve_response.rb → payment_method_retrieve_response.rb} +17 -18
  15. data/lib/whop_sdk/models/plan.rb +9 -1
  16. data/lib/whop_sdk/models/plan_create_params.rb +9 -1
  17. data/lib/whop_sdk/models/plan_list_response.rb +9 -1
  18. data/lib/whop_sdk/models/product_create_params.rb +2 -2
  19. data/lib/whop_sdk/models/setup_intent.rb +22 -24
  20. data/lib/whop_sdk/models/setup_intent_list_response.rb +22 -24
  21. data/lib/whop_sdk/models/unwrap_webhook_event.rb +29 -22
  22. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +309 -0
  23. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +111 -166
  24. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +309 -0
  25. data/lib/whop_sdk/models.rb +8 -4
  26. data/lib/whop_sdk/resources/invoices.rb +3 -1
  27. data/lib/whop_sdk/resources/{payment_tokens.rb → payment_methods.rb} +24 -16
  28. data/lib/whop_sdk/resources/payments.rb +7 -5
  29. data/lib/whop_sdk/resources/plans.rb +3 -1
  30. data/lib/whop_sdk/resources/products.rb +1 -1
  31. data/lib/whop_sdk/resources/setup_intents.rb +10 -2
  32. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  33. data/lib/whop_sdk/version.rb +1 -1
  34. data/lib/whop_sdk.rb +7 -5
  35. data/rbi/whop_sdk/client.rbi +2 -2
  36. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
  37. data/rbi/whop_sdk/models/invoice_create_params.rbi +10 -0
  38. data/rbi/whop_sdk/models/payment.rbi +30 -33
  39. data/rbi/whop_sdk/models/payment_create_params.rbi +6 -6
  40. data/rbi/whop_sdk/models/payment_list_response.rbi +34 -37
  41. data/rbi/whop_sdk/models/{payment_token_list_params.rbi → payment_method_list_params.rbi} +4 -4
  42. data/rbi/whop_sdk/models/{payment_token_list_response.rbi → payment_method_list_response.rbi} +18 -20
  43. data/rbi/whop_sdk/models/{payment_token_retrieve_params.rbi → payment_method_retrieve_params.rbi} +7 -4
  44. data/rbi/whop_sdk/models/{payment_token_retrieve_response.rbi → payment_method_retrieve_response.rbi} +18 -20
  45. data/rbi/whop_sdk/models/plan.rbi +8 -0
  46. data/rbi/whop_sdk/models/plan_create_params.rbi +8 -0
  47. data/rbi/whop_sdk/models/plan_list_response.rbi +8 -0
  48. data/rbi/whop_sdk/models/product_create_params.rbi +2 -2
  49. data/rbi/whop_sdk/models/setup_intent.rbi +27 -29
  50. data/rbi/whop_sdk/models/setup_intent_list_response.rbi +31 -32
  51. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +2 -0
  52. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +633 -0
  53. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +326 -480
  54. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +633 -0
  55. data/rbi/whop_sdk/models.rbi +8 -4
  56. data/rbi/whop_sdk/resources/invoices.rbi +4 -0
  57. data/rbi/whop_sdk/resources/{payment_tokens.rbi → payment_methods.rbi} +16 -8
  58. data/rbi/whop_sdk/resources/payments.rbi +8 -6
  59. data/rbi/whop_sdk/resources/plans.rbi +3 -0
  60. data/rbi/whop_sdk/resources/products.rbi +1 -1
  61. data/rbi/whop_sdk/resources/setup_intents.rbi +10 -2
  62. data/rbi/whop_sdk/resources/webhooks.rbi +2 -0
  63. data/sig/whop_sdk/client.rbs +1 -1
  64. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  65. data/sig/whop_sdk/models/invoice_create_params.rbs +5 -0
  66. data/sig/whop_sdk/models/payment.rbs +11 -11
  67. data/sig/whop_sdk/models/payment_create_params.rbs +4 -4
  68. data/sig/whop_sdk/models/payment_list_response.rbs +11 -11
  69. data/sig/whop_sdk/models/{payment_token_list_params.rbs → payment_method_list_params.rbs} +2 -2
  70. data/sig/whop_sdk/models/{payment_token_list_response.rbs → payment_method_list_response.rbs} +6 -6
  71. data/sig/whop_sdk/models/{payment_token_retrieve_params.rbs → payment_method_retrieve_params.rbs} +2 -2
  72. data/sig/whop_sdk/models/{payment_token_retrieve_response.rbs → payment_method_retrieve_response.rbs} +6 -6
  73. data/sig/whop_sdk/models/plan.rbs +5 -0
  74. data/sig/whop_sdk/models/plan_create_params.rbs +5 -0
  75. data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
  76. data/sig/whop_sdk/models/setup_intent.rbs +10 -10
  77. data/sig/whop_sdk/models/setup_intent_list_response.rbs +10 -10
  78. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  79. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +275 -0
  80. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +132 -191
  81. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +275 -0
  82. data/sig/whop_sdk/models.rbs +8 -4
  83. data/sig/whop_sdk/resources/invoices.rbs +1 -0
  84. data/sig/whop_sdk/resources/{payment_tokens.rbs → payment_methods.rbs} +3 -3
  85. data/sig/whop_sdk/resources/payments.rbs +1 -1
  86. data/sig/whop_sdk/resources/plans.rbs +1 -0
  87. data/sig/whop_sdk/resources/webhooks.rbs +2 -0
  88. metadata +23 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52fccd60ae7ccaf64e90bd05372f51f66c31948db48f36e7720e3d0ea41bef5b
4
- data.tar.gz: 240f956383f8b5133ef2190734e248cdd7458caddda070bebb92a6ad8a8d2970
3
+ metadata.gz: 2104fb2c1dc9085753b9081bb0b41e448e9032eb9edf9872685b75c08caf6c8e
4
+ data.tar.gz: 26dbb716c67b11dff5e6b9e00fdc7183bda0888bae0293ca062ff98c988d38b9
5
5
  SHA512:
6
- metadata.gz: 62b83235379a23d717ec6639bf7cef6c42600a8944a7348ffede85eafee4c5e45d7fdeb936a6c623bd0d8db28f1dd5fdcbd5c11c81c5f9131c75580f6c825089
7
- data.tar.gz: 128fd87f073ed68505f29d9b73aa581ea030de9541a25ed18962b3e765d602593f2d7696370c759ac91ae35e38edacd979bd1b6bbcb006fa18d0fdc70af4e0a5
6
+ metadata.gz: a9e4c4c3f0691435ef76bbc1c4e1f833de704aad8e8edd376b6a880da93ca0a03f7bea17aa4adaa2bcd5a4720cdbe0c22e6d8b410a60315d02ed8c6ae6c03119
7
+ data.tar.gz: 920caa9c016799f63dc2a379512cbfb460a36480eb263fcb96df6eca8577648c065209e633f21dd36d64ba5e03bc450f5198224485d585673892cb78e3af3c0c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.12 (2025-12-03)
4
+
5
+ Full Changelog: [v0.0.11...v0.0.12](https://github.com/whopio/whopsdk-ruby/compare/v0.0.11...v0.0.12)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([d339d55](https://github.com/whopio/whopsdk-ruby/commit/d339d55a2776f2ac1c41bddadcd592edc07931dd))
10
+ * **api:** api update ([6de152e](https://github.com/whopio/whopsdk-ruby/commit/6de152ec6aba2bed5897803fd555055e7a47ae18))
11
+ * **api:** api update ([b947c74](https://github.com/whopio/whopsdk-ruby/commit/b947c740bcfacacc0933c906298977190d99ee2f))
12
+
13
+ ## 0.0.11 (2025-12-02)
14
+
15
+ Full Changelog: [v0.0.10...v0.0.11](https://github.com/whopio/whopsdk-ruby/compare/v0.0.10...v0.0.11)
16
+
17
+ ### Features
18
+
19
+ * **api:** api update ([eb70106](https://github.com/whopio/whopsdk-ruby/commit/eb70106cabeebd2c9c3ce95c130f5537b65e613b))
20
+ * **api:** manual updates ([ae17f10](https://github.com/whopio/whopsdk-ruby/commit/ae17f10718e7bcbfb51471ea56bfb17c7ada5b72))
21
+
22
+
23
+ ### Chores
24
+
25
+ * **internal:** codegen related update ([6dfe6e1](https://github.com/whopio/whopsdk-ruby/commit/6dfe6e1fa2ffd8f47ae76cfa355fd4b678a128f8))
26
+
3
27
  ## 0.0.10 (2025-12-02)
4
28
 
5
29
  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
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "whop_sdk", "~> 0.0.10"
20
+ gem "whop_sdk", "~> 0.0.12"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -138,8 +138,8 @@ module WhopSDK
138
138
  # @return [WhopSDK::Resources::SetupIntents]
139
139
  attr_reader :setup_intents
140
140
 
141
- # @return [WhopSDK::Resources::PaymentTokens]
142
- attr_reader :payment_tokens
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
- @payment_tokens = WhopSDK::Resources::PaymentTokens.new(client: self)
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
@@ -194,6 +194,12 @@ module WhopSDK
194
194
  # @return [Float, nil]
195
195
  optional :renewal_price, Float, nil?: true
196
196
 
197
+ # @!attribute split_pay_required_payments
198
+ # The number of payments required before pausing the subscription.
199
+ #
200
+ # @return [Integer, nil]
201
+ optional :split_pay_required_payments, Integer, nil?: true
202
+
197
203
  # @!attribute title
198
204
  # The title of the plan. This will be visible on the product page to customers.
199
205
  #
@@ -212,7 +218,7 @@ module WhopSDK
212
218
  # @return [Symbol, WhopSDK::Models::Visibility, nil]
213
219
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true
214
220
 
215
- # @!method initialize(company_id:, currency:, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil)
221
+ # @!method initialize(company_id:, currency:, billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, payment_method_configuration: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, split_pay_required_payments: nil, title: nil, trial_period_days: nil, visibility: nil)
216
222
  # Some parameter documentations has been truncated, see
217
223
  # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan} for more details.
218
224
  #
@@ -252,6 +258,8 @@ module WhopSDK
252
258
  #
253
259
  # @param renewal_price [Float, nil] The amount the customer is charged every billing period.
254
260
  #
261
+ # @param split_pay_required_payments [Integer, nil] The number of payments required before pausing the subscription.
262
+ #
255
263
  # @param title [String, nil] The title of the plan. This will be visible on the product page to customers.
256
264
  #
257
265
  # @param trial_period_days [Integer, nil] The number of free trial days added before a renewal plan.
@@ -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:, payment_method_type:, payment_token:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
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 payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
249
+ # @param payment_method [WhopSDK::Models::Payment::PaymentMethod, nil] The payment method used for the payment, if available.
250
250
  #
251
- # @param payment_token [WhopSDK::Models::Payment::PaymentToken, nil] The payment token used for the payment, if available.
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#payment_token
418
- class PaymentToken < WhopSDK::Internal::Type::BaseModel
417
+ # @see WhopSDK::Models::Payment#payment_method
418
+ class PaymentMethod < WhopSDK::Internal::Type::BaseModel
419
419
  # @!attribute id
420
- # The ID of the payment token
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 token, if its a debit or credit card
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::PaymentToken::Card, nil]
430
- required :card, -> { WhopSDK::Payment::PaymentToken::Card }, nil?: true
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 token was created
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 token
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::PaymentToken} for more details.
445
+ # {WhopSDK::Models::Payment::PaymentMethod} for more details.
447
446
  #
448
- # The payment token used for the payment, if available.
447
+ # The payment method used for the payment, if available.
449
448
  #
450
- # @param id [String] The ID of the payment token
449
+ # @param id [String] The ID of the payment method
451
450
  #
452
- # @param card [WhopSDK::Models::Payment::PaymentToken::Card, nil] The card data associated with the payment token, if its a debit or credit card t
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 token was created
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 token
455
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
457
456
 
458
- # @see WhopSDK::Models::Payment::PaymentToken#card
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 token, if its a debit or credit card
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 payment_token_id
23
- # The ID of the payment token to use for the payment. It must be connected to the
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 :payment_token_id, String
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:, payment_token_id:, plan:, plan_id:, request_options: {})
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 payment_token_id [String] The ID of the payment token to use for the payment. It must be connected to the
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:, payment_method_type:, payment_token:, plan:, product:, promo_code:, refundable:, refunded_amount:, refunded_at:, retryable:, status:, substatus:, subtotal:, total:, usd_total:, user:, voidable:)
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 payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes, nil] The different types of payment methods that can be used.
250
+ # @param payment_method [WhopSDK::Models::PaymentListResponse::PaymentMethod, nil] The payment method used for the payment, if available.
251
251
  #
252
- # @param payment_token [WhopSDK::Models::PaymentListResponse::PaymentToken, nil] The payment token used for the payment, if available.
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#payment_token
419
- class PaymentToken < WhopSDK::Internal::Type::BaseModel
418
+ # @see WhopSDK::Models::PaymentListResponse#payment_method
419
+ class PaymentMethod < WhopSDK::Internal::Type::BaseModel
420
420
  # @!attribute id
421
- # The ID of the payment token
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 token, if its a debit or credit card
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::PaymentToken::Card, nil]
431
- required :card, -> { WhopSDK::Models::PaymentListResponse::PaymentToken::Card }, nil?: true
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 token was created
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 token
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::PaymentToken} for more details.
446
+ # {WhopSDK::Models::PaymentListResponse::PaymentMethod} for more details.
448
447
  #
449
- # The payment token used for the payment, if available.
448
+ # The payment method used for the payment, if available.
450
449
  #
451
- # @param id [String] The ID of the payment token
450
+ # @param id [String] The ID of the payment method
452
451
  #
453
- # @param card [WhopSDK::Models::PaymentListResponse::PaymentToken::Card, nil] The card data associated with the payment token, if its a debit or credit card t
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 token was created
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 token
456
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
458
457
 
459
- # @see WhopSDK::Models::PaymentListResponse::PaymentToken#card
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 token, if its a debit or credit card
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::PaymentTokens#list
6
- class PaymentTokenListParams < WhopSDK::Internal::Type::BaseModel
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 tokens for
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 tokens for
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::PaymentTokens#list
6
- class PaymentTokenListResponse < WhopSDK::Internal::Type::BaseModel
5
+ # @see WhopSDK::Resources::PaymentMethods#list
6
+ class PaymentMethodListResponse < WhopSDK::Internal::Type::BaseModel
7
7
  # @!attribute id
8
- # The ID of the payment token
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 token, if its a debit or credit card
15
- # token.
14
+ # The card data associated with the payment method, if its a debit or credit card.
16
15
  #
17
- # @return [WhopSDK::Models::PaymentTokenListResponse::Card, nil]
18
- required :card, -> { WhopSDK::Models::PaymentTokenListResponse::Card }, nil?: true
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 token was created
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 token
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::PaymentTokenListResponse} for more details.
33
+ # {WhopSDK::Models::PaymentMethodListResponse} for more details.
35
34
  #
36
- # A payment token used to process payments.
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 token
38
+ # @param id [String] The ID of the payment method
39
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
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 token was created
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 token
44
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
45
45
 
46
- # @see WhopSDK::Models::PaymentTokenListResponse#card
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 token, if its a debit or credit card
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
  #
@@ -2,19 +2,19 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
- # @see WhopSDK::Resources::PaymentTokens#retrieve
6
- class PaymentTokenRetrieveParams < WhopSDK::Internal::Type::BaseModel
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 PaymentToken
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 PaymentToken
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
@@ -2,48 +2,48 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
- # @see WhopSDK::Resources::PaymentTokens#retrieve
6
- class PaymentTokenRetrieveResponse < WhopSDK::Internal::Type::BaseModel
5
+ # @see WhopSDK::Resources::PaymentMethods#retrieve
6
+ class PaymentMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel
7
7
  # @!attribute id
8
- # The ID of the payment token
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 token, if its a debit or credit card
15
- # token.
14
+ # The card data associated with the payment method, if its a debit or credit card.
16
15
  #
17
- # @return [WhopSDK::Models::PaymentTokenRetrieveResponse::Card, nil]
18
- required :card, -> { WhopSDK::Models::PaymentTokenRetrieveResponse::Card }, nil?: true
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 token was created
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 token
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::PaymentTokenRetrieveResponse} for more details.
33
+ # {WhopSDK::Models::PaymentMethodRetrieveResponse} for more details.
35
34
  #
36
- # A payment token used to process payments.
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 token
38
+ # @param id [String] The ID of the payment method
39
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
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 token was created
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 token
44
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
45
45
 
46
- # @see WhopSDK::Models::PaymentTokenRetrieveResponse#card
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 token, if its a debit or credit card
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
  #