Class: WhopSDK::Models::PaymentMethodRetrieveResponse::Card

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/payment_method_retrieve_response.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/payment_method_retrieve_response.rb', line 72

Instance Attribute Details

#brandSymbol, ...

Possible card brands that a payment token can have

Returns:



52
# File 'lib/whop_sdk/models/payment_method_retrieve_response.rb', line 52

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

#exp_monthInteger?

Card expiration month, like 03 for March.

Returns:

  • (Integer, nil)


58
# File 'lib/whop_sdk/models/payment_method_retrieve_response.rb', line 58

required :exp_month, Integer, nil?: true

#exp_yearInteger?

Card expiration year, like 27 for 2027.

Returns:

  • (Integer, nil)


64
# File 'lib/whop_sdk/models/payment_method_retrieve_response.rb', line 64

required :exp_year, Integer, nil?: true

#last4String?

Last four digits of the card.

Returns:

  • (String, nil)


70
# File 'lib/whop_sdk/models/payment_method_retrieve_response.rb', line 70

required :last4, String, nil?: true