whop_sdk 0.0.14 → 0.0.16

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 (108) 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 +8 -0
  5. data/lib/whop_sdk/models/checkout_configuration.rb +9 -1
  6. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +9 -1
  8. data/lib/whop_sdk/models/course.rb +57 -1
  9. data/lib/whop_sdk/models/course_lesson_interaction.rb +23 -1
  10. data/lib/whop_sdk/models/course_lesson_interaction_list_item.rb +23 -1
  11. data/lib/whop_sdk/models/experience.rb +9 -1
  12. data/lib/whop_sdk/models/experience_create_params.rb +9 -1
  13. data/lib/whop_sdk/models/experience_list_response.rb +9 -1
  14. data/lib/whop_sdk/models/experience_update_params.rb +9 -1
  15. data/lib/whop_sdk/models/fee_markup_create_params.rb +62 -0
  16. data/lib/whop_sdk/models/fee_markup_create_response.rb +67 -0
  17. data/lib/whop_sdk/models/fee_markup_delete_params.rb +14 -0
  18. data/lib/whop_sdk/models/fee_markup_delete_response.rb +8 -0
  19. data/lib/whop_sdk/models/fee_markup_list_params.rb +58 -0
  20. data/lib/whop_sdk/models/fee_markup_list_response.rb +67 -0
  21. data/lib/whop_sdk/models/fee_markup_type.rb +19 -0
  22. data/lib/whop_sdk/models/payment_list_fees_params.rb +46 -0
  23. data/lib/whop_sdk/models/payment_list_fees_response.rb +84 -0
  24. data/lib/whop_sdk/models/payment_method_list_response.rb +214 -76
  25. data/lib/whop_sdk/models/payment_method_retrieve_response.rb +214 -76
  26. data/lib/whop_sdk/models/payout_method_list_params.rb +54 -0
  27. data/lib/whop_sdk/models/payout_method_list_response.rb +95 -0
  28. data/lib/whop_sdk/models/withdrawal_create_params.rb +46 -0
  29. data/lib/whop_sdk/models/withdrawal_create_response.rb +275 -0
  30. data/lib/whop_sdk/models.rb +14 -0
  31. data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
  32. data/lib/whop_sdk/resources/experiences.rb +6 -2
  33. data/lib/whop_sdk/resources/fee_markups.rb +112 -0
  34. data/lib/whop_sdk/resources/payment_methods.rb +2 -2
  35. data/lib/whop_sdk/resources/payments.rb +35 -0
  36. data/lib/whop_sdk/resources/payout_methods.rb +49 -0
  37. data/lib/whop_sdk/resources/withdrawals.rb +34 -0
  38. data/lib/whop_sdk/version.rb +1 -1
  39. data/lib/whop_sdk.rb +15 -0
  40. data/rbi/whop_sdk/client.rbi +6 -0
  41. data/rbi/whop_sdk/models/checkout_configuration.rbi +8 -0
  42. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
  43. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +8 -0
  44. data/rbi/whop_sdk/models/course.rbi +115 -3
  45. data/rbi/whop_sdk/models/course_lesson_interaction.rbi +55 -2
  46. data/rbi/whop_sdk/models/course_lesson_interaction_list_item.rbi +60 -2
  47. data/rbi/whop_sdk/models/experience.rbi +8 -0
  48. data/rbi/whop_sdk/models/experience_create_params.rbi +8 -0
  49. data/rbi/whop_sdk/models/experience_list_response.rbi +8 -0
  50. data/rbi/whop_sdk/models/experience_update_params.rbi +8 -0
  51. data/rbi/whop_sdk/models/fee_markup_create_params.rbi +83 -0
  52. data/rbi/whop_sdk/models/fee_markup_create_response.rbi +89 -0
  53. data/rbi/whop_sdk/models/fee_markup_delete_params.rbi +27 -0
  54. data/rbi/whop_sdk/models/fee_markup_delete_response.rbi +8 -0
  55. data/rbi/whop_sdk/models/fee_markup_list_params.rbi +77 -0
  56. data/rbi/whop_sdk/models/fee_markup_list_response.rbi +89 -0
  57. data/rbi/whop_sdk/models/fee_markup_type.rbi +37 -0
  58. data/rbi/whop_sdk/models/payment_list_fees_params.rbi +67 -0
  59. data/rbi/whop_sdk/models/payment_list_fees_response.rbi +239 -0
  60. data/rbi/whop_sdk/models/payment_method_list_response.rbi +305 -83
  61. data/rbi/whop_sdk/models/payment_method_retrieve_response.rbi +305 -88
  62. data/rbi/whop_sdk/models/payout_method_list_params.rbi +75 -0
  63. data/rbi/whop_sdk/models/payout_method_list_response.rbi +200 -0
  64. data/rbi/whop_sdk/models/withdrawal_create_params.rbi +67 -0
  65. data/rbi/whop_sdk/models/withdrawal_create_response.rbi +564 -0
  66. data/rbi/whop_sdk/models.rbi +14 -0
  67. data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
  68. data/rbi/whop_sdk/resources/experiences.rbi +6 -0
  69. data/rbi/whop_sdk/resources/fee_markups.rbi +96 -0
  70. data/rbi/whop_sdk/resources/payment_methods.rbi +2 -2
  71. data/rbi/whop_sdk/resources/payments.rbi +34 -0
  72. data/rbi/whop_sdk/resources/payout_methods.rbi +46 -0
  73. data/rbi/whop_sdk/resources/withdrawals.rbi +29 -0
  74. data/sig/whop_sdk/client.rbs +4 -0
  75. data/sig/whop_sdk/models/checkout_configuration.rbs +5 -0
  76. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  77. data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +5 -0
  78. data/sig/whop_sdk/models/course.rbs +45 -3
  79. data/sig/whop_sdk/models/course_lesson_interaction.rbs +28 -3
  80. data/sig/whop_sdk/models/course_lesson_interaction_list_item.rbs +28 -3
  81. data/sig/whop_sdk/models/experience.rbs +5 -0
  82. data/sig/whop_sdk/models/experience_create_params.rbs +11 -1
  83. data/sig/whop_sdk/models/experience_list_response.rbs +5 -0
  84. data/sig/whop_sdk/models/experience_update_params.rbs +5 -0
  85. data/sig/whop_sdk/models/fee_markup_create_params.rbs +51 -0
  86. data/sig/whop_sdk/models/fee_markup_create_response.rbs +50 -0
  87. data/sig/whop_sdk/models/fee_markup_delete_params.rbs +15 -0
  88. data/sig/whop_sdk/models/fee_markup_delete_response.rbs +5 -0
  89. data/sig/whop_sdk/models/fee_markup_list_params.rbs +46 -0
  90. data/sig/whop_sdk/models/fee_markup_list_response.rbs +50 -0
  91. data/sig/whop_sdk/models/fee_markup_type.rbs +22 -0
  92. data/sig/whop_sdk/models/payment_list_fees_params.rbs +36 -0
  93. data/sig/whop_sdk/models/payment_list_fees_response.rbs +104 -0
  94. data/sig/whop_sdk/models/payment_method_list_response.rbs +149 -41
  95. data/sig/whop_sdk/models/payment_method_retrieve_response.rbs +149 -41
  96. data/sig/whop_sdk/models/payout_method_list_params.rbs +46 -0
  97. data/sig/whop_sdk/models/payout_method_list_response.rbs +83 -0
  98. data/sig/whop_sdk/models/withdrawal_create_params.rbs +41 -0
  99. data/sig/whop_sdk/models/withdrawal_create_response.rbs +243 -0
  100. data/sig/whop_sdk/models.rbs +14 -0
  101. data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
  102. data/sig/whop_sdk/resources/experiences.rbs +2 -0
  103. data/sig/whop_sdk/resources/fee_markups.rbs +28 -0
  104. data/sig/whop_sdk/resources/payment_methods.rbs +2 -2
  105. data/sig/whop_sdk/resources/payments.rbs +9 -0
  106. data/sig/whop_sdk/resources/payout_methods.rbs +16 -0
  107. data/sig/whop_sdk/resources/withdrawals.rbs +8 -0
  108. metadata +47 -2
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::FeeMarkups#list
6
+ class FeeMarkupListResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The unique identifier of the fee markup.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # When this fee markup was created.
15
+ #
16
+ # @return [Time]
17
+ required :created_at, Time
18
+
19
+ # @!attribute fee_type
20
+ # The type of fee this markup applies to.
21
+ #
22
+ # @return [Symbol, WhopSDK::Models::FeeMarkupType]
23
+ required :fee_type, enum: -> { WhopSDK::FeeMarkupType }
24
+
25
+ # @!attribute fixed_fee_usd
26
+ # The fixed fee in USD to charge (0-50).
27
+ #
28
+ # @return [Float, nil]
29
+ required :fixed_fee_usd, Float, nil?: true
30
+
31
+ # @!attribute notes
32
+ # Internal notes about this fee markup.
33
+ #
34
+ # @return [String, nil]
35
+ required :notes, String, nil?: true
36
+
37
+ # @!attribute percentage_fee
38
+ # The percentage fee to charge (0-25).
39
+ #
40
+ # @return [Float, nil]
41
+ required :percentage_fee, Float, nil?: true
42
+
43
+ # @!attribute updated_at
44
+ # When this fee markup was last updated.
45
+ #
46
+ # @return [Time]
47
+ required :updated_at, Time
48
+
49
+ # @!method initialize(id:, created_at:, fee_type:, fixed_fee_usd:, notes:, percentage_fee:, updated_at:)
50
+ # Represents a fee markup configuration for a company
51
+ #
52
+ # @param id [String] The unique identifier of the fee markup.
53
+ #
54
+ # @param created_at [Time] When this fee markup was created.
55
+ #
56
+ # @param fee_type [Symbol, WhopSDK::Models::FeeMarkupType] The type of fee this markup applies to.
57
+ #
58
+ # @param fixed_fee_usd [Float, nil] The fixed fee in USD to charge (0-50).
59
+ #
60
+ # @param notes [String, nil] Internal notes about this fee markup.
61
+ #
62
+ # @param percentage_fee [Float, nil] The percentage fee to charge (0-25).
63
+ #
64
+ # @param updated_at [Time] When this fee markup was last updated.
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The types of fee markups that can be configured
6
+ module FeeMarkupType
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ CRYPTO_WITHDRAWAL_MARKUP = :crypto_withdrawal_markup
10
+ RTP_WITHDRAWAL_MARKUP = :rtp_withdrawal_markup
11
+ NEXT_DAY_BANK_WITHDRAWAL_MARKUP = :next_day_bank_withdrawal_markup
12
+ BANK_WIRE_WITHDRAWAL_MARKUP = :bank_wire_withdrawal_markup
13
+ DIGITAL_WALLET_WITHDRAWAL_MARKUP = :digital_wallet_withdrawal_markup
14
+
15
+ # @!method self.values
16
+ # @return [Array<Symbol>]
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Payments#list_fees
6
+ class PaymentListFeesParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute after
11
+ # Returns the elements in the list that come after the specified cursor.
12
+ #
13
+ # @return [String, nil]
14
+ optional :after, String, nil?: true
15
+
16
+ # @!attribute before
17
+ # Returns the elements in the list that come before the specified cursor.
18
+ #
19
+ # @return [String, nil]
20
+ optional :before, String, nil?: true
21
+
22
+ # @!attribute first
23
+ # Returns the first _n_ elements from the list.
24
+ #
25
+ # @return [Integer, nil]
26
+ optional :first, Integer, nil?: true
27
+
28
+ # @!attribute last
29
+ # Returns the last _n_ elements from the list.
30
+ #
31
+ # @return [Integer, nil]
32
+ optional :last, Integer, nil?: true
33
+
34
+ # @!method initialize(after: nil, before: nil, first: nil, last: nil, request_options: {})
35
+ # @param after [String, nil] Returns the elements in the list that come after the specified cursor.
36
+ #
37
+ # @param before [String, nil] Returns the elements in the list that come before the specified cursor.
38
+ #
39
+ # @param first [Integer, nil] Returns the first _n_ elements from the list.
40
+ #
41
+ # @param last [Integer, nil] Returns the last _n_ elements from the list.
42
+ #
43
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::Payments#list_fees
6
+ class PaymentListFeesResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute amount
8
+ # The value or amount to display for the fee.
9
+ #
10
+ # @return [Float]
11
+ required :amount, Float
12
+
13
+ # @!attribute currency
14
+ # The currency of the fee.
15
+ #
16
+ # @return [Symbol, WhopSDK::Models::Currency]
17
+ required :currency, enum: -> { WhopSDK::Currency }
18
+
19
+ # @!attribute name
20
+ # The label to display for the fee.
21
+ #
22
+ # @return [String]
23
+ required :name, String
24
+
25
+ # @!attribute type
26
+ # The specific origin of the fee, if applicable.
27
+ #
28
+ # @return [Symbol, WhopSDK::Models::PaymentListFeesResponse::Type]
29
+ required :type, enum: -> { WhopSDK::Models::PaymentListFeesResponse::Type }
30
+
31
+ # @!method initialize(amount:, currency:, name:, type:)
32
+ # Represents a fee related to a payment
33
+ #
34
+ # @param amount [Float] The value or amount to display for the fee.
35
+ #
36
+ # @param currency [Symbol, WhopSDK::Models::Currency] The currency of the fee.
37
+ #
38
+ # @param name [String] The label to display for the fee.
39
+ #
40
+ # @param type [Symbol, WhopSDK::Models::PaymentListFeesResponse::Type] The specific origin of the fee, if applicable.
41
+
42
+ # The specific origin of the fee, if applicable.
43
+ #
44
+ # @see WhopSDK::Models::PaymentListFeesResponse#type
45
+ module Type
46
+ extend WhopSDK::Internal::Type::Enum
47
+
48
+ STRIPE_DOMESTIC_PROCESSING_FEE = :stripe_domestic_processing_fee
49
+ STRIPE_INTERNATIONAL_PROCESSING_FEE = :stripe_international_processing_fee
50
+ STRIPE_FIXED_PROCESSING_FEE = :stripe_fixed_processing_fee
51
+ STRIPE_BILLING_FEE = :stripe_billing_fee
52
+ STRIPE_RADAR_FEE = :stripe_radar_fee
53
+ SALES_TAX_REMITTANCE = :sales_tax_remittance
54
+ SALES_TAX_REMITTANCE_REVERSAL = :sales_tax_remittance_reversal
55
+ STRIPE_SALES_TAX_FEE = :stripe_sales_tax_fee
56
+ WHOP_PROCESSING_FEE = :whop_processing_fee
57
+ MARKETPLACE_AFFILIATE_FEE = :marketplace_affiliate_fee
58
+ AFFILIATE_FEE = :affiliate_fee
59
+ CRYPTO_FEE = :crypto_fee
60
+ STRIPE_STANDARD_PROCESSING_FEE = :stripe_standard_processing_fee
61
+ PAYPAL_FEE = :paypal_fee
62
+ STRIPE_PAYOUT_FEE = :stripe_payout_fee
63
+ DISPUTE_FEE = :dispute_fee
64
+ DISPUTE_ALERT_FEE = :dispute_alert_fee
65
+ APPLE_PROCESSING_FEE = :apple_processing_fee
66
+ BUYER_FEE = :buyer_fee
67
+ SEZZLE_PROCESSING_FEE = :sezzle_processing_fee
68
+ SPLITIT_PROCESSING_FEE = :splitit_processing_fee
69
+ PLATFORM_BALANCE_PROCESSING_FEE = :platform_balance_processing_fee
70
+ PAYMENT_PROCESSING_PERCENTAGE_FEE = :payment_processing_percentage_fee
71
+ PAYMENT_PROCESSING_FIXED_FEE = :payment_processing_fixed_fee
72
+ CROSS_BORDER_PERCENTAGE_FEE = :cross_border_percentage_fee
73
+ FX_PERCENTAGE_FEE = :fx_percentage_fee
74
+ ORCHESTRATION_PERCENTAGE_FEE = :orchestration_percentage_fee
75
+ THREE_DS_FIXED_FEE = :three_ds_fixed_fee
76
+ BILLING_PERCENTAGE_FEE = :billing_percentage_fee
77
+ REVSHARE_PERCENTAGE_FEE = :revshare_percentage_fee
78
+
79
+ # @!method self.values
80
+ # @return [Array<Symbol>]
81
+ end
82
+ end
83
+ end
84
+ end
@@ -2,84 +2,222 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
+ # A payment method with no additional properties
6
+ #
5
7
  # @see WhopSDK::Resources::PaymentMethods#list
6
- class PaymentMethodListResponse < WhopSDK::Internal::Type::BaseModel
7
- # @!attribute id
8
- # The ID of the payment method
9
- #
10
- # @return [String]
11
- required :id, String
12
-
13
- # @!attribute card
14
- # The card data associated with the payment method, if its a debit or credit card.
15
- #
16
- # @return [WhopSDK::Models::PaymentMethodListResponse::Card, nil]
17
- required :card, -> { WhopSDK::Models::PaymentMethodListResponse::Card }, nil?: true
18
-
19
- # @!attribute created_at
20
- # The date and time the payment method was created
21
- #
22
- # @return [Time]
23
- required :created_at, Time
24
-
25
- # @!attribute payment_method_type
26
- # The payment method type of the payment method
27
- #
28
- # @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
29
- required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
30
-
31
- # @!method initialize(id:, card:, created_at:, payment_method_type:)
32
- # Some parameter documentations has been truncated, see
33
- # {WhopSDK::Models::PaymentMethodListResponse} for more details.
34
- #
35
- # A stored payment method used to process payments. This could be a credit/debit
36
- # card, bank account, PayPal wallet, etc.
37
- #
38
- # @param id [String] The ID of the payment method
39
- #
40
- # @param card [WhopSDK::Models::PaymentMethodListResponse::Card, nil] The card data associated with the payment method, if its a debit or credit card.
41
- #
42
- # @param created_at [Time] The date and time the payment method was created
43
- #
44
- # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The payment method type of the payment method
45
-
46
- # @see WhopSDK::Models::PaymentMethodListResponse#card
47
- class Card < WhopSDK::Internal::Type::BaseModel
48
- # @!attribute brand
49
- # Possible card brands that a payment token can have
50
- #
51
- # @return [Symbol, WhopSDK::Models::CardBrands, nil]
52
- required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
53
-
54
- # @!attribute exp_month
55
- # Card expiration month, like 03 for March.
56
- #
57
- # @return [Integer, nil]
58
- required :exp_month, Integer, nil?: true
59
-
60
- # @!attribute exp_year
61
- # Card expiration year, like 27 for 2027.
62
- #
63
- # @return [Integer, nil]
64
- required :exp_year, Integer, nil?: true
65
-
66
- # @!attribute last4
67
- # Last four digits of the card.
68
- #
69
- # @return [String, nil]
70
- required :last4, String, nil?: true
71
-
72
- # @!method initialize(brand:, exp_month:, exp_year:, last4:)
73
- # The card data associated with the payment method, if its a debit or credit card.
74
- #
75
- # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
76
- #
77
- # @param exp_month [Integer, nil] Card expiration month, like 03 for March.
78
- #
79
- # @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
80
- #
81
- # @param last4 [String, nil] Last four digits of the card.
8
+ module PaymentMethodListResponse
9
+ extend WhopSDK::Internal::Type::Union
10
+
11
+ discriminator :typename
12
+
13
+ # A payment method with no additional properties
14
+ variant :BasePaymentMethod, -> { WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod }
15
+
16
+ # The card for the payment method
17
+ variant :CardPaymentMethod, -> { WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod }
18
+
19
+ # The bank account for the payment method
20
+ variant :UsBankAccountPaymentMethod,
21
+ -> { WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod }
22
+
23
+ class BasePaymentMethod < WhopSDK::Internal::Type::BaseModel
24
+ # @!attribute id
25
+ # The ID of the payment method
26
+ #
27
+ # @return [String]
28
+ required :id, String
29
+
30
+ # @!attribute created_at
31
+ # When the payment method was created
32
+ #
33
+ # @return [Time]
34
+ required :created_at, Time
35
+
36
+ # @!attribute payment_method_type
37
+ # The type of the payment method
38
+ #
39
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
40
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
41
+
42
+ # @!attribute typename
43
+ # The typename of this object
44
+ #
45
+ # @return [Symbol, :BasePaymentMethod]
46
+ required :typename, const: :BasePaymentMethod
47
+
48
+ # @!method initialize(id:, created_at:, payment_method_type:, typename: :BasePaymentMethod)
49
+ # A payment method with no additional properties
50
+ #
51
+ # @param id [String] The ID of the payment method
52
+ #
53
+ # @param created_at [Time] When the payment method was created
54
+ #
55
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
56
+ #
57
+ # @param typename [Symbol, :BasePaymentMethod] The typename of this object
82
58
  end
59
+
60
+ class CardPaymentMethod < WhopSDK::Internal::Type::BaseModel
61
+ # @!attribute id
62
+ # The ID of the payment method
63
+ #
64
+ # @return [String]
65
+ required :id, String
66
+
67
+ # @!attribute card
68
+ # The card details associated with this payment method
69
+ #
70
+ # @return [WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod::Card]
71
+ required :card, -> { WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod::Card }
72
+
73
+ # @!attribute created_at
74
+ # When the payment method was created
75
+ #
76
+ # @return [Time]
77
+ required :created_at, Time
78
+
79
+ # @!attribute payment_method_type
80
+ # The type of the payment method
81
+ #
82
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
83
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
84
+
85
+ # @!attribute typename
86
+ # The typename of this object
87
+ #
88
+ # @return [Symbol, :CardPaymentMethod]
89
+ required :typename, const: :CardPaymentMethod
90
+
91
+ # @!method initialize(id:, card:, created_at:, payment_method_type:, typename: :CardPaymentMethod)
92
+ # The card for the payment method
93
+ #
94
+ # @param id [String] The ID of the payment method
95
+ #
96
+ # @param card [WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod::Card] The card details associated with this payment method
97
+ #
98
+ # @param created_at [Time] When the payment method was created
99
+ #
100
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
101
+ #
102
+ # @param typename [Symbol, :CardPaymentMethod] The typename of this object
103
+
104
+ # @see WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod#card
105
+ class Card < WhopSDK::Internal::Type::BaseModel
106
+ # @!attribute brand
107
+ # Possible card brands that a payment token can have
108
+ #
109
+ # @return [Symbol, WhopSDK::Models::CardBrands, nil]
110
+ required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true
111
+
112
+ # @!attribute exp_month
113
+ # Card expiration month, like 03 for March.
114
+ #
115
+ # @return [Integer, nil]
116
+ required :exp_month, Integer, nil?: true
117
+
118
+ # @!attribute exp_year
119
+ # Card expiration year, like 27 for 2027.
120
+ #
121
+ # @return [Integer, nil]
122
+ required :exp_year, Integer, nil?: true
123
+
124
+ # @!attribute last4
125
+ # Last four digits of the card.
126
+ #
127
+ # @return [String, nil]
128
+ required :last4, String, nil?: true
129
+
130
+ # @!method initialize(brand:, exp_month:, exp_year:, last4:)
131
+ # The card details associated with this payment method
132
+ #
133
+ # @param brand [Symbol, WhopSDK::Models::CardBrands, nil] Possible card brands that a payment token can have
134
+ #
135
+ # @param exp_month [Integer, nil] Card expiration month, like 03 for March.
136
+ #
137
+ # @param exp_year [Integer, nil] Card expiration year, like 27 for 2027.
138
+ #
139
+ # @param last4 [String, nil] Last four digits of the card.
140
+ end
141
+ end
142
+
143
+ class UsBankAccountPaymentMethod < WhopSDK::Internal::Type::BaseModel
144
+ # @!attribute id
145
+ # The ID of the payment method
146
+ #
147
+ # @return [String]
148
+ required :id, String
149
+
150
+ # @!attribute created_at
151
+ # When the payment method was created
152
+ #
153
+ # @return [Time]
154
+ required :created_at, Time
155
+
156
+ # @!attribute payment_method_type
157
+ # The type of the payment method
158
+ #
159
+ # @return [Symbol, WhopSDK::Models::PaymentMethodTypes]
160
+ required :payment_method_type, enum: -> { WhopSDK::PaymentMethodTypes }
161
+
162
+ # @!attribute typename
163
+ # The typename of this object
164
+ #
165
+ # @return [Symbol, :UsBankAccountPaymentMethod]
166
+ required :typename, const: :UsBankAccountPaymentMethod
167
+
168
+ # @!attribute us_bank_account
169
+ # The bank details associated with this payment method
170
+ #
171
+ # @return [WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod::UsBankAccount]
172
+ required :us_bank_account,
173
+ -> { WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod::UsBankAccount }
174
+
175
+ # @!method initialize(id:, created_at:, payment_method_type:, us_bank_account:, typename: :UsBankAccountPaymentMethod)
176
+ # The bank account for the payment method
177
+ #
178
+ # @param id [String] The ID of the payment method
179
+ #
180
+ # @param created_at [Time] When the payment method was created
181
+ #
182
+ # @param payment_method_type [Symbol, WhopSDK::Models::PaymentMethodTypes] The type of the payment method
183
+ #
184
+ # @param us_bank_account [WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod::UsBankAccount] The bank details associated with this payment method
185
+ #
186
+ # @param typename [Symbol, :UsBankAccountPaymentMethod] The typename of this object
187
+
188
+ # @see WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod#us_bank_account
189
+ class UsBankAccount < WhopSDK::Internal::Type::BaseModel
190
+ # @!attribute account_type
191
+ # The type of account
192
+ #
193
+ # @return [String]
194
+ required :account_type, String
195
+
196
+ # @!attribute bank_name
197
+ # The name of the bank
198
+ #
199
+ # @return [String]
200
+ required :bank_name, String
201
+
202
+ # @!attribute last4
203
+ # The last 4 digits of the account number
204
+ #
205
+ # @return [String]
206
+ required :last4, String
207
+
208
+ # @!method initialize(account_type:, bank_name:, last4:)
209
+ # The bank details associated with this payment method
210
+ #
211
+ # @param account_type [String] The type of account
212
+ #
213
+ # @param bank_name [String] The name of the bank
214
+ #
215
+ # @param last4 [String] The last 4 digits of the account number
216
+ end
217
+ end
218
+
219
+ # @!method self.variants
220
+ # @return [Array(WhopSDK::Models::PaymentMethodListResponse::BasePaymentMethod, WhopSDK::Models::PaymentMethodListResponse::CardPaymentMethod, WhopSDK::Models::PaymentMethodListResponse::UsBankAccountPaymentMethod)]
83
221
  end
84
222
  end
85
223
  end