Class: Sentdm::Models::PaymentDetails

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sentdm/models/payment_details.rb

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(card_number:, cvc:, expiry:, zip_code:) ⇒ Object

Payment card details for a profile. Accepted when billing_model is “profile” or “profile_and_organization”. These details are not stored on our servers and will be forwarded to the payment processor.

Parameters:

  • card_number (String)

    Card number (digits only, 13–19 characters)

  • cvc (String)

    Card security code (3–4 digits)

  • expiry (String)

    Card expiry date in MM/YY format (e.g. “09/27”)

  • zip_code (String)

    Billing ZIP / postal code associated with the card



# File 'lib/sentdm/models/payment_details.rb', line 30

Instance Attribute Details

#card_numberString

Card number (digits only, 13–19 characters)

Returns:

  • (String)


10
# File 'lib/sentdm/models/payment_details.rb', line 10

required :card_number, String

#cvcString

Card security code (3–4 digits)

Returns:

  • (String)


16
# File 'lib/sentdm/models/payment_details.rb', line 16

required :cvc, String

#expiryString

Card expiry date in MM/YY format (e.g. “09/27”)

Returns:

  • (String)


22
# File 'lib/sentdm/models/payment_details.rb', line 22

required :expiry, String

#zip_codeString

Billing ZIP / postal code associated with the card

Returns:

  • (String)


28
# File 'lib/sentdm/models/payment_details.rb', line 28

required :zip_code, String