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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -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/invoice_create_params.rb +10 -1
  7. data/lib/whop_sdk/models/payment.rb +25 -27
  8. data/lib/whop_sdk/models/payment_create_params.rb +5 -5
  9. data/lib/whop_sdk/models/payment_list_response.rb +25 -27
  10. data/lib/whop_sdk/models/{payment_token_list_params.rb → payment_method_list_params.rb} +4 -4
  11. data/lib/whop_sdk/models/{payment_token_list_response.rb → payment_method_list_response.rb} +17 -18
  12. data/lib/whop_sdk/models/{payment_token_retrieve_params.rb → payment_method_retrieve_params.rb} +4 -4
  13. data/lib/whop_sdk/models/{payment_token_retrieve_response.rb → payment_method_retrieve_response.rb} +17 -18
  14. data/lib/whop_sdk/models/setup_intent.rb +22 -24
  15. data/lib/whop_sdk/models/setup_intent_list_response.rb +22 -24
  16. data/lib/whop_sdk/models/unwrap_webhook_event.rb +24 -21
  17. data/lib/whop_sdk/models.rb +4 -4
  18. data/lib/whop_sdk/resources/invoices.rb +3 -1
  19. data/lib/whop_sdk/resources/{payment_tokens.rb → payment_methods.rb} +24 -16
  20. data/lib/whop_sdk/resources/payments.rb +7 -5
  21. data/lib/whop_sdk/resources/setup_intents.rb +10 -2
  22. data/lib/whop_sdk/version.rb +1 -1
  23. data/lib/whop_sdk.rb +5 -5
  24. data/rbi/whop_sdk/client.rbi +2 -2
  25. data/rbi/whop_sdk/models/invoice_create_params.rbi +10 -0
  26. data/rbi/whop_sdk/models/payment.rbi +30 -33
  27. data/rbi/whop_sdk/models/payment_create_params.rbi +6 -6
  28. data/rbi/whop_sdk/models/payment_list_response.rbi +34 -37
  29. data/rbi/whop_sdk/models/{payment_token_list_params.rbi → payment_method_list_params.rbi} +4 -4
  30. data/rbi/whop_sdk/models/{payment_token_list_response.rbi → payment_method_list_response.rbi} +18 -20
  31. data/rbi/whop_sdk/models/{payment_token_retrieve_params.rbi → payment_method_retrieve_params.rbi} +7 -4
  32. data/rbi/whop_sdk/models/{payment_token_retrieve_response.rbi → payment_method_retrieve_response.rbi} +18 -20
  33. data/rbi/whop_sdk/models/setup_intent.rbi +27 -29
  34. data/rbi/whop_sdk/models/setup_intent_list_response.rbi +31 -32
  35. data/rbi/whop_sdk/models.rbi +4 -4
  36. data/rbi/whop_sdk/resources/invoices.rbi +4 -0
  37. data/rbi/whop_sdk/resources/{payment_tokens.rbi → payment_methods.rbi} +16 -8
  38. data/rbi/whop_sdk/resources/payments.rbi +8 -6
  39. data/rbi/whop_sdk/resources/setup_intents.rbi +10 -2
  40. data/sig/whop_sdk/client.rbs +1 -1
  41. data/sig/whop_sdk/models/invoice_create_params.rbs +5 -0
  42. data/sig/whop_sdk/models/payment.rbs +11 -11
  43. data/sig/whop_sdk/models/payment_create_params.rbs +4 -4
  44. data/sig/whop_sdk/models/payment_list_response.rbs +11 -11
  45. data/sig/whop_sdk/models/{payment_token_list_params.rbs → payment_method_list_params.rbs} +2 -2
  46. data/sig/whop_sdk/models/{payment_token_list_response.rbs → payment_method_list_response.rbs} +6 -6
  47. data/sig/whop_sdk/models/{payment_token_retrieve_params.rbs → payment_method_retrieve_params.rbs} +2 -2
  48. data/sig/whop_sdk/models/{payment_token_retrieve_response.rbs → payment_method_retrieve_response.rbs} +6 -6
  49. data/sig/whop_sdk/models/setup_intent.rbs +10 -10
  50. data/sig/whop_sdk/models/setup_intent_list_response.rbs +10 -10
  51. data/sig/whop_sdk/models.rbs +4 -4
  52. data/sig/whop_sdk/resources/invoices.rbs +1 -0
  53. data/sig/whop_sdk/resources/{payment_tokens.rbs → payment_methods.rbs} +3 -3
  54. data/sig/whop_sdk/resources/payments.rbs +1 -1
  55. metadata +16 -16
@@ -93,20 +93,20 @@ module WhopSDK
93
93
  sig { returns(T.nilable(Time)) }
94
94
  attr_accessor :paid_at
95
95
 
96
- # The different types of payment methods that can be used.
97
- sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
98
- attr_accessor :payment_method_type
99
-
100
- # The payment token used for the payment, if available.
101
- sig { returns(T.nilable(WhopSDK::Payment::PaymentToken)) }
102
- attr_reader :payment_token
96
+ # The payment method used for the payment, if available.
97
+ sig { returns(T.nilable(WhopSDK::Payment::PaymentMethod)) }
98
+ attr_reader :payment_method
103
99
 
104
100
  sig do
105
101
  params(
106
- payment_token: T.nilable(WhopSDK::Payment::PaymentToken::OrHash)
102
+ payment_method: T.nilable(WhopSDK::Payment::PaymentMethod::OrHash)
107
103
  ).void
108
104
  end
109
- attr_writer :payment_token
105
+ attr_writer :payment_method
106
+
107
+ # The different types of payment methods that can be used.
108
+ sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
109
+ attr_accessor :payment_method_type
110
110
 
111
111
  # The plan attached to this payment.
112
112
  sig { returns(T.nilable(WhopSDK::Payment::Plan)) }
@@ -202,8 +202,8 @@ module WhopSDK
202
202
  membership: T.nilable(WhopSDK::Payment::Membership::OrHash),
203
203
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
204
204
  paid_at: T.nilable(Time),
205
+ payment_method: T.nilable(WhopSDK::Payment::PaymentMethod::OrHash),
205
206
  payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
206
- payment_token: T.nilable(WhopSDK::Payment::PaymentToken::OrHash),
207
207
  plan: T.nilable(WhopSDK::Payment::Plan::OrHash),
208
208
  product: T.nilable(WhopSDK::Payment::Product::OrHash),
209
209
  promo_code: T.nilable(WhopSDK::Payment::PromoCode::OrHash),
@@ -256,10 +256,10 @@ module WhopSDK
256
256
  metadata:,
257
257
  # The datetime the payment was paid
258
258
  paid_at:,
259
+ # The payment method used for the payment, if available.
260
+ payment_method:,
259
261
  # The different types of payment methods that can be used.
260
262
  payment_method_type:,
261
- # The payment token used for the payment, if available.
262
- payment_token:,
263
263
  # The plan attached to this payment.
264
264
  plan:,
265
265
  # The product this payment was made for
@@ -315,9 +315,9 @@ module WhopSDK
315
315
  membership: T.nilable(WhopSDK::Payment::Membership),
316
316
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
317
317
  paid_at: T.nilable(Time),
318
+ payment_method: T.nilable(WhopSDK::Payment::PaymentMethod),
318
319
  payment_method_type:
319
320
  T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
320
- payment_token: T.nilable(WhopSDK::Payment::PaymentToken),
321
321
  plan: T.nilable(WhopSDK::Payment::Plan),
322
322
  product: T.nilable(WhopSDK::Payment::Product),
323
323
  promo_code: T.nilable(WhopSDK::Payment::PromoCode),
@@ -527,54 +527,52 @@ module WhopSDK
527
527
  end
528
528
  end
529
529
 
530
- class PaymentToken < WhopSDK::Internal::Type::BaseModel
530
+ class PaymentMethod < WhopSDK::Internal::Type::BaseModel
531
531
  OrHash =
532
532
  T.type_alias do
533
- T.any(WhopSDK::Payment::PaymentToken, WhopSDK::Internal::AnyHash)
533
+ T.any(WhopSDK::Payment::PaymentMethod, WhopSDK::Internal::AnyHash)
534
534
  end
535
535
 
536
- # The ID of the payment token
536
+ # The ID of the payment method
537
537
  sig { returns(String) }
538
538
  attr_accessor :id
539
539
 
540
- # The card data associated with the payment token, if its a debit or credit card
541
- # token.
542
- sig { returns(T.nilable(WhopSDK::Payment::PaymentToken::Card)) }
540
+ # The card data associated with the payment method, if its a debit or credit card.
541
+ sig { returns(T.nilable(WhopSDK::Payment::PaymentMethod::Card)) }
543
542
  attr_reader :card
544
543
 
545
544
  sig do
546
545
  params(
547
- card: T.nilable(WhopSDK::Payment::PaymentToken::Card::OrHash)
546
+ card: T.nilable(WhopSDK::Payment::PaymentMethod::Card::OrHash)
548
547
  ).void
549
548
  end
550
549
  attr_writer :card
551
550
 
552
- # The date and time the payment token was created
551
+ # The date and time the payment method was created
553
552
  sig { returns(Time) }
554
553
  attr_accessor :created_at
555
554
 
556
- # The payment method type of the payment token
555
+ # The payment method type of the payment method
557
556
  sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
558
557
  attr_accessor :payment_method_type
559
558
 
560
- # The payment token used for the payment, if available.
559
+ # The payment method used for the payment, if available.
561
560
  sig do
562
561
  params(
563
562
  id: String,
564
- card: T.nilable(WhopSDK::Payment::PaymentToken::Card::OrHash),
563
+ card: T.nilable(WhopSDK::Payment::PaymentMethod::Card::OrHash),
565
564
  created_at: Time,
566
565
  payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
567
566
  ).returns(T.attached_class)
568
567
  end
569
568
  def self.new(
570
- # The ID of the payment token
569
+ # The ID of the payment method
571
570
  id:,
572
- # The card data associated with the payment token, if its a debit or credit card
573
- # token.
571
+ # The card data associated with the payment method, if its a debit or credit card.
574
572
  card:,
575
- # The date and time the payment token was created
573
+ # The date and time the payment method was created
576
574
  created_at:,
577
- # The payment method type of the payment token
575
+ # The payment method type of the payment method
578
576
  payment_method_type:
579
577
  )
580
578
  end
@@ -583,7 +581,7 @@ module WhopSDK
583
581
  override.returns(
584
582
  {
585
583
  id: String,
586
- card: T.nilable(WhopSDK::Payment::PaymentToken::Card),
584
+ card: T.nilable(WhopSDK::Payment::PaymentMethod::Card),
587
585
  created_at: Time,
588
586
  payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
589
587
  }
@@ -596,7 +594,7 @@ module WhopSDK
596
594
  OrHash =
597
595
  T.type_alias do
598
596
  T.any(
599
- WhopSDK::Payment::PaymentToken::Card,
597
+ WhopSDK::Payment::PaymentMethod::Card,
600
598
  WhopSDK::Internal::AnyHash
601
599
  )
602
600
  end
@@ -617,8 +615,7 @@ module WhopSDK
617
615
  sig { returns(T.nilable(String)) }
618
616
  attr_accessor :last4
619
617
 
620
- # The card data associated with the payment token, if its a debit or credit card
621
- # token.
618
+ # The card data associated with the payment method, if its a debit or credit card.
622
619
  sig do
623
620
  params(
624
621
  brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
@@ -19,10 +19,10 @@ module WhopSDK
19
19
  sig { returns(String) }
20
20
  attr_accessor :member_id
21
21
 
22
- # The ID of the payment token to use for the payment. It must be connected to the
22
+ # The ID of the payment method to use for the payment. It must be connected to the
23
23
  # Member being charged.
24
24
  sig { returns(String) }
25
- attr_accessor :payment_token_id
25
+ attr_accessor :payment_method_id
26
26
 
27
27
  # Pass this object to create a new plan for this payment
28
28
  sig { returns(WhopSDK::PaymentCreateParams::Plan) }
@@ -39,7 +39,7 @@ module WhopSDK
39
39
  params(
40
40
  company_id: String,
41
41
  member_id: String,
42
- payment_token_id: String,
42
+ payment_method_id: String,
43
43
  plan: WhopSDK::PaymentCreateParams::Plan::OrHash,
44
44
  plan_id: String,
45
45
  request_options: WhopSDK::RequestOptions::OrHash
@@ -50,9 +50,9 @@ module WhopSDK
50
50
  company_id:,
51
51
  # The ID of the member to create the payment for.
52
52
  member_id:,
53
- # The ID of the payment token to use for the payment. It must be connected to the
53
+ # The ID of the payment method to use for the payment. It must be connected to the
54
54
  # Member being charged.
55
- payment_token_id:,
55
+ payment_method_id:,
56
56
  # Pass this object to create a new plan for this payment
57
57
  plan:,
58
58
  # An ID of an existing plan to use for the payment.
@@ -66,7 +66,7 @@ module WhopSDK
66
66
  {
67
67
  company_id: String,
68
68
  member_id: String,
69
- payment_token_id: String,
69
+ payment_method_id: String,
70
70
  plan: WhopSDK::PaymentCreateParams::Plan,
71
71
  plan_id: String,
72
72
  request_options: WhopSDK::RequestOptions
@@ -118,25 +118,25 @@ module WhopSDK
118
118
  sig { returns(T.nilable(Time)) }
119
119
  attr_accessor :paid_at
120
120
 
121
- # The different types of payment methods that can be used.
122
- sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
123
- attr_accessor :payment_method_type
124
-
125
- # The payment token used for the payment, if available.
121
+ # The payment method used for the payment, if available.
126
122
  sig do
127
- returns(T.nilable(WhopSDK::Models::PaymentListResponse::PaymentToken))
123
+ returns(T.nilable(WhopSDK::Models::PaymentListResponse::PaymentMethod))
128
124
  end
129
- attr_reader :payment_token
125
+ attr_reader :payment_method
130
126
 
131
127
  sig do
132
128
  params(
133
- payment_token:
129
+ payment_method:
134
130
  T.nilable(
135
- WhopSDK::Models::PaymentListResponse::PaymentToken::OrHash
131
+ WhopSDK::Models::PaymentListResponse::PaymentMethod::OrHash
136
132
  )
137
133
  ).void
138
134
  end
139
- attr_writer :payment_token
135
+ attr_writer :payment_method
136
+
137
+ # The different types of payment methods that can be used.
138
+ sig { returns(T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol)) }
139
+ attr_accessor :payment_method_type
140
140
 
141
141
  # The plan attached to this payment.
142
142
  sig { returns(T.nilable(WhopSDK::Models::PaymentListResponse::Plan)) }
@@ -256,11 +256,11 @@ module WhopSDK
256
256
  T.nilable(WhopSDK::Models::PaymentListResponse::Membership::OrHash),
257
257
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
258
258
  paid_at: T.nilable(Time),
259
- payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
260
- payment_token:
259
+ payment_method:
261
260
  T.nilable(
262
- WhopSDK::Models::PaymentListResponse::PaymentToken::OrHash
261
+ WhopSDK::Models::PaymentListResponse::PaymentMethod::OrHash
263
262
  ),
263
+ payment_method_type: T.nilable(WhopSDK::PaymentMethodTypes::OrSymbol),
264
264
  plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan::OrHash),
265
265
  product:
266
266
  T.nilable(WhopSDK::Models::PaymentListResponse::Product::OrHash),
@@ -315,10 +315,10 @@ module WhopSDK
315
315
  metadata:,
316
316
  # The datetime the payment was paid
317
317
  paid_at:,
318
+ # The payment method used for the payment, if available.
319
+ payment_method:,
318
320
  # The different types of payment methods that can be used.
319
321
  payment_method_type:,
320
- # The payment token used for the payment, if available.
321
- payment_token:,
322
322
  # The plan attached to this payment.
323
323
  plan:,
324
324
  # The product this payment was made for
@@ -376,10 +376,10 @@ module WhopSDK
376
376
  T.nilable(WhopSDK::Models::PaymentListResponse::Membership),
377
377
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
378
378
  paid_at: T.nilable(Time),
379
+ payment_method:
380
+ T.nilable(WhopSDK::Models::PaymentListResponse::PaymentMethod),
379
381
  payment_method_type:
380
382
  T.nilable(WhopSDK::PaymentMethodTypes::TaggedSymbol),
381
- payment_token:
382
- T.nilable(WhopSDK::Models::PaymentListResponse::PaymentToken),
383
383
  plan: T.nilable(WhopSDK::Models::PaymentListResponse::Plan),
384
384
  product: T.nilable(WhopSDK::Models::PaymentListResponse::Product),
385
385
  promo_code:
@@ -602,24 +602,23 @@ module WhopSDK
602
602
  end
603
603
  end
604
604
 
605
- class PaymentToken < WhopSDK::Internal::Type::BaseModel
605
+ class PaymentMethod < WhopSDK::Internal::Type::BaseModel
606
606
  OrHash =
607
607
  T.type_alias do
608
608
  T.any(
609
- WhopSDK::Models::PaymentListResponse::PaymentToken,
609
+ WhopSDK::Models::PaymentListResponse::PaymentMethod,
610
610
  WhopSDK::Internal::AnyHash
611
611
  )
612
612
  end
613
613
 
614
- # The ID of the payment token
614
+ # The ID of the payment method
615
615
  sig { returns(String) }
616
616
  attr_accessor :id
617
617
 
618
- # The card data associated with the payment token, if its a debit or credit card
619
- # token.
618
+ # The card data associated with the payment method, if its a debit or credit card.
620
619
  sig do
621
620
  returns(
622
- T.nilable(WhopSDK::Models::PaymentListResponse::PaymentToken::Card)
621
+ T.nilable(WhopSDK::Models::PaymentListResponse::PaymentMethod::Card)
623
622
  )
624
623
  end
625
624
  attr_reader :card
@@ -628,41 +627,40 @@ module WhopSDK
628
627
  params(
629
628
  card:
630
629
  T.nilable(
631
- WhopSDK::Models::PaymentListResponse::PaymentToken::Card::OrHash
630
+ WhopSDK::Models::PaymentListResponse::PaymentMethod::Card::OrHash
632
631
  )
633
632
  ).void
634
633
  end
635
634
  attr_writer :card
636
635
 
637
- # The date and time the payment token was created
636
+ # The date and time the payment method was created
638
637
  sig { returns(Time) }
639
638
  attr_accessor :created_at
640
639
 
641
- # The payment method type of the payment token
640
+ # The payment method type of the payment method
642
641
  sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
643
642
  attr_accessor :payment_method_type
644
643
 
645
- # The payment token used for the payment, if available.
644
+ # The payment method used for the payment, if available.
646
645
  sig do
647
646
  params(
648
647
  id: String,
649
648
  card:
650
649
  T.nilable(
651
- WhopSDK::Models::PaymentListResponse::PaymentToken::Card::OrHash
650
+ WhopSDK::Models::PaymentListResponse::PaymentMethod::Card::OrHash
652
651
  ),
653
652
  created_at: Time,
654
653
  payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
655
654
  ).returns(T.attached_class)
656
655
  end
657
656
  def self.new(
658
- # The ID of the payment token
657
+ # The ID of the payment method
659
658
  id:,
660
- # The card data associated with the payment token, if its a debit or credit card
661
- # token.
659
+ # The card data associated with the payment method, if its a debit or credit card.
662
660
  card:,
663
- # The date and time the payment token was created
661
+ # The date and time the payment method was created
664
662
  created_at:,
665
- # The payment method type of the payment token
663
+ # The payment method type of the payment method
666
664
  payment_method_type:
667
665
  )
668
666
  end
@@ -673,7 +671,7 @@ module WhopSDK
673
671
  id: String,
674
672
  card:
675
673
  T.nilable(
676
- WhopSDK::Models::PaymentListResponse::PaymentToken::Card
674
+ WhopSDK::Models::PaymentListResponse::PaymentMethod::Card
677
675
  ),
678
676
  created_at: Time,
679
677
  payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
@@ -687,7 +685,7 @@ module WhopSDK
687
685
  OrHash =
688
686
  T.type_alias do
689
687
  T.any(
690
- WhopSDK::Models::PaymentListResponse::PaymentToken::Card,
688
+ WhopSDK::Models::PaymentListResponse::PaymentMethod::Card,
691
689
  WhopSDK::Internal::AnyHash
692
690
  )
693
691
  end
@@ -708,8 +706,7 @@ module WhopSDK
708
706
  sig { returns(T.nilable(String)) }
709
707
  attr_accessor :last4
710
708
 
711
- # The card data associated with the payment token, if its a debit or credit card
712
- # token.
709
+ # The card data associated with the payment method, if its a debit or credit card.
713
710
  sig do
714
711
  params(
715
712
  brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
@@ -2,16 +2,16 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
- class PaymentTokenListParams < WhopSDK::Internal::Type::BaseModel
5
+ class PaymentMethodListParams < WhopSDK::Internal::Type::BaseModel
6
6
  extend WhopSDK::Internal::Type::RequestParameters::Converter
7
7
  include WhopSDK::Internal::Type::RequestParameters
8
8
 
9
9
  OrHash =
10
10
  T.type_alias do
11
- T.any(WhopSDK::PaymentTokenListParams, WhopSDK::Internal::AnyHash)
11
+ T.any(WhopSDK::PaymentMethodListParams, WhopSDK::Internal::AnyHash)
12
12
  end
13
13
 
14
- # The ID of the Member to list payment tokens for
14
+ # The ID of the Member to list payment methods for
15
15
  sig { returns(String) }
16
16
  attr_accessor :member_id
17
17
 
@@ -57,7 +57,7 @@ module WhopSDK
57
57
  ).returns(T.attached_class)
58
58
  end
59
59
  def self.new(
60
- # The ID of the Member to list payment tokens for
60
+ # The ID of the Member to list payment methods for
61
61
  member_id:,
62
62
  # Returns the elements in the list that come after the specified cursor.
63
63
  after: nil,
@@ -2,61 +2,60 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
- class PaymentTokenListResponse < WhopSDK::Internal::Type::BaseModel
5
+ class PaymentMethodListResponse < WhopSDK::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
8
  T.any(
9
- WhopSDK::Models::PaymentTokenListResponse,
9
+ WhopSDK::Models::PaymentMethodListResponse,
10
10
  WhopSDK::Internal::AnyHash
11
11
  )
12
12
  end
13
13
 
14
- # The ID of the payment token
14
+ # The ID of the payment method
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
18
- # The card data associated with the payment token, if its a debit or credit card
19
- # token.
18
+ # The card data associated with the payment method, if its a debit or credit card.
20
19
  sig do
21
- returns(T.nilable(WhopSDK::Models::PaymentTokenListResponse::Card))
20
+ returns(T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card))
22
21
  end
23
22
  attr_reader :card
24
23
 
25
24
  sig do
26
25
  params(
27
26
  card:
28
- T.nilable(WhopSDK::Models::PaymentTokenListResponse::Card::OrHash)
27
+ T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card::OrHash)
29
28
  ).void
30
29
  end
31
30
  attr_writer :card
32
31
 
33
- # The date and time the payment token was created
32
+ # The date and time the payment method was created
34
33
  sig { returns(Time) }
35
34
  attr_accessor :created_at
36
35
 
37
- # The payment method type of the payment token
36
+ # The payment method type of the payment method
38
37
  sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
39
38
  attr_accessor :payment_method_type
40
39
 
41
- # A payment token used to process payments.
40
+ # A stored payment method used to process payments. This could be a credit/debit
41
+ # card, bank account, PayPal wallet, etc.
42
42
  sig do
43
43
  params(
44
44
  id: String,
45
45
  card:
46
- T.nilable(WhopSDK::Models::PaymentTokenListResponse::Card::OrHash),
46
+ T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card::OrHash),
47
47
  created_at: Time,
48
48
  payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
49
49
  ).returns(T.attached_class)
50
50
  end
51
51
  def self.new(
52
- # The ID of the payment token
52
+ # The ID of the payment method
53
53
  id:,
54
- # The card data associated with the payment token, if its a debit or credit card
55
- # token.
54
+ # The card data associated with the payment method, if its a debit or credit card.
56
55
  card:,
57
- # The date and time the payment token was created
56
+ # The date and time the payment method was created
58
57
  created_at:,
59
- # The payment method type of the payment token
58
+ # The payment method type of the payment method
60
59
  payment_method_type:
61
60
  )
62
61
  end
@@ -65,7 +64,7 @@ module WhopSDK
65
64
  override.returns(
66
65
  {
67
66
  id: String,
68
- card: T.nilable(WhopSDK::Models::PaymentTokenListResponse::Card),
67
+ card: T.nilable(WhopSDK::Models::PaymentMethodListResponse::Card),
69
68
  created_at: Time,
70
69
  payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
71
70
  }
@@ -78,7 +77,7 @@ module WhopSDK
78
77
  OrHash =
79
78
  T.type_alias do
80
79
  T.any(
81
- WhopSDK::Models::PaymentTokenListResponse::Card,
80
+ WhopSDK::Models::PaymentMethodListResponse::Card,
82
81
  WhopSDK::Internal::AnyHash
83
82
  )
84
83
  end
@@ -99,8 +98,7 @@ module WhopSDK
99
98
  sig { returns(T.nilable(String)) }
100
99
  attr_accessor :last4
101
100
 
102
- # The card data associated with the payment token, if its a debit or credit card
103
- # token.
101
+ # The card data associated with the payment method, if its a debit or credit card.
104
102
  sig do
105
103
  params(
106
104
  brand: T.nilable(WhopSDK::CardBrands::OrSymbol),
@@ -2,16 +2,19 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
- class PaymentTokenRetrieveParams < WhopSDK::Internal::Type::BaseModel
5
+ class PaymentMethodRetrieveParams < WhopSDK::Internal::Type::BaseModel
6
6
  extend WhopSDK::Internal::Type::RequestParameters::Converter
7
7
  include WhopSDK::Internal::Type::RequestParameters
8
8
 
9
9
  OrHash =
10
10
  T.type_alias do
11
- T.any(WhopSDK::PaymentTokenRetrieveParams, WhopSDK::Internal::AnyHash)
11
+ T.any(
12
+ WhopSDK::PaymentMethodRetrieveParams,
13
+ WhopSDK::Internal::AnyHash
14
+ )
12
15
  end
13
16
 
14
- # The ID of the Member associated with the PaymentToken
17
+ # The ID of the Member associated with the PaymentMethod
15
18
  sig { returns(String) }
16
19
  attr_accessor :member_id
17
20
 
@@ -22,7 +25,7 @@ module WhopSDK
22
25
  ).returns(T.attached_class)
23
26
  end
24
27
  def self.new(
25
- # The ID of the Member associated with the PaymentToken
28
+ # The ID of the Member associated with the PaymentMethod
26
29
  member_id:,
27
30
  request_options: {}
28
31
  )
@@ -2,23 +2,22 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
- class PaymentTokenRetrieveResponse < WhopSDK::Internal::Type::BaseModel
5
+ class PaymentMethodRetrieveResponse < WhopSDK::Internal::Type::BaseModel
6
6
  OrHash =
7
7
  T.type_alias do
8
8
  T.any(
9
- WhopSDK::Models::PaymentTokenRetrieveResponse,
9
+ WhopSDK::Models::PaymentMethodRetrieveResponse,
10
10
  WhopSDK::Internal::AnyHash
11
11
  )
12
12
  end
13
13
 
14
- # The ID of the payment token
14
+ # The ID of the payment method
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
18
- # The card data associated with the payment token, if its a debit or credit card
19
- # token.
18
+ # The card data associated with the payment method, if its a debit or credit card.
20
19
  sig do
21
- returns(T.nilable(WhopSDK::Models::PaymentTokenRetrieveResponse::Card))
20
+ returns(T.nilable(WhopSDK::Models::PaymentMethodRetrieveResponse::Card))
22
21
  end
23
22
  attr_reader :card
24
23
 
@@ -26,41 +25,41 @@ module WhopSDK
26
25
  params(
27
26
  card:
28
27
  T.nilable(
29
- WhopSDK::Models::PaymentTokenRetrieveResponse::Card::OrHash
28
+ WhopSDK::Models::PaymentMethodRetrieveResponse::Card::OrHash
30
29
  )
31
30
  ).void
32
31
  end
33
32
  attr_writer :card
34
33
 
35
- # The date and time the payment token was created
34
+ # The date and time the payment method was created
36
35
  sig { returns(Time) }
37
36
  attr_accessor :created_at
38
37
 
39
- # The payment method type of the payment token
38
+ # The payment method type of the payment method
40
39
  sig { returns(WhopSDK::PaymentMethodTypes::TaggedSymbol) }
41
40
  attr_accessor :payment_method_type
42
41
 
43
- # A payment token used to process payments.
42
+ # A stored payment method used to process payments. This could be a credit/debit
43
+ # card, bank account, PayPal wallet, etc.
44
44
  sig do
45
45
  params(
46
46
  id: String,
47
47
  card:
48
48
  T.nilable(
49
- WhopSDK::Models::PaymentTokenRetrieveResponse::Card::OrHash
49
+ WhopSDK::Models::PaymentMethodRetrieveResponse::Card::OrHash
50
50
  ),
51
51
  created_at: Time,
52
52
  payment_method_type: WhopSDK::PaymentMethodTypes::OrSymbol
53
53
  ).returns(T.attached_class)
54
54
  end
55
55
  def self.new(
56
- # The ID of the payment token
56
+ # The ID of the payment method
57
57
  id:,
58
- # The card data associated with the payment token, if its a debit or credit card
59
- # token.
58
+ # The card data associated with the payment method, if its a debit or credit card.
60
59
  card:,
61
- # The date and time the payment token was created
60
+ # The date and time the payment method was created
62
61
  created_at:,
63
- # The payment method type of the payment token
62
+ # The payment method type of the payment method
64
63
  payment_method_type:
65
64
  )
66
65
  end
@@ -70,7 +69,7 @@ module WhopSDK
70
69
  {
71
70
  id: String,
72
71
  card:
73
- T.nilable(WhopSDK::Models::PaymentTokenRetrieveResponse::Card),
72
+ T.nilable(WhopSDK::Models::PaymentMethodRetrieveResponse::Card),
74
73
  created_at: Time,
75
74
  payment_method_type: WhopSDK::PaymentMethodTypes::TaggedSymbol
76
75
  }
@@ -83,7 +82,7 @@ module WhopSDK
83
82
  OrHash =
84
83
  T.type_alias do
85
84
  T.any(
86
- WhopSDK::Models::PaymentTokenRetrieveResponse::Card,
85
+ WhopSDK::Models::PaymentMethodRetrieveResponse::Card,
87
86
  WhopSDK::Internal::AnyHash
88
87
  )
89
88
  end
@@ -104,8 +103,7 @@ module WhopSDK
104
103
  sig { returns(T.nilable(String)) }
105
104
  attr_accessor :last4
106
105
 
107
- # The card data associated with the payment token, if its a debit or credit card
108
- # token.
106
+ # The card data associated with the payment method, if its a debit or credit card.
109
107
  sig do
110
108
  params(
111
109
  brand: T.nilable(WhopSDK::CardBrands::OrSymbol),