Class: WhopSDK::Models::SetupIntent::PaymentMethod::Card

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/setup_intent.rb

Overview

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(brand: , exp_month: , exp_year: , last4: ) ⇒ Object

The card data associated with the payment method, if its a debit or credit card.

Parameters:

  • brand (Symbol, WhopSDK::Models::CardBrands, nil) (defaults to: )

    Possible card brands that a payment token can have

  • exp_month (Integer, nil) (defaults to: )

    Card expiration month, like 03 for March.

  • exp_year (Integer, nil) (defaults to: )

    Card expiration year, like 27 for 2027.

  • last4 (String, nil) (defaults to: )

    Last four digits of the card.



# File 'lib/whop_sdk/models/setup_intent.rb', line 237

Instance Attribute Details

#brandSymbol, ...

Possible card brands that a payment token can have

Returns:



217
# File 'lib/whop_sdk/models/setup_intent.rb', line 217

required :brand, enum: -> { WhopSDK::CardBrands }, nil?: true

#exp_monthInteger?

Card expiration month, like 03 for March.

Returns:

  • (Integer, nil)


223
# File 'lib/whop_sdk/models/setup_intent.rb', line 223

required :exp_month, Integer, nil?: true

#exp_yearInteger?

Card expiration year, like 27 for 2027.

Returns:

  • (Integer, nil)


229
# File 'lib/whop_sdk/models/setup_intent.rb', line 229

required :exp_year, Integer, nil?: true

#last4String?

Last four digits of the card.

Returns:

  • (String, nil)


235
# File 'lib/whop_sdk/models/setup_intent.rb', line 235

required :last4, String, nil?: true