Class: Stripe::PaymentMethod::CreateParams::Card
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::PaymentMethod::CreateParams::Card
- Defined in:
- lib/stripe/resources/payment_method.rb
Defined Under Namespace
Classes: Networks
Instance Attribute Summary collapse
-
#cvc ⇒ Object
The card’s CVC.
-
#exp_month ⇒ Object
Two-digit number representing the card’s expiration month.
-
#exp_year ⇒ Object
Four-digit number representing the card’s expiration year.
-
#networks ⇒ Object
Contains information about card networks used to process the payment.
-
#number ⇒ Object
The card number, as a string without any separators.
-
#token ⇒ Object
For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: “tok_visa”.
Instance Method Summary collapse
-
#initialize(cvc: nil, exp_month: nil, exp_year: nil, networks: nil, number: nil, token: nil) ⇒ Card
constructor
A new instance of Card.
Methods inherited from RequestParams
Constructor Details
#initialize(cvc: nil, exp_month: nil, exp_year: nil, networks: nil, number: nil, token: nil) ⇒ Card
Returns a new instance of Card.
866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 |
# File 'lib/stripe/resources/payment_method.rb', line 866 def initialize( cvc: nil, exp_month: nil, exp_year: nil, networks: nil, number: nil, token: nil ) @cvc = cvc @exp_month = exp_month @exp_year = exp_year @networks = networks @number = number @token = token end |
Instance Attribute Details
#cvc ⇒ Object
The card’s CVC. It is highly recommended to always include this value.
854 855 856 |
# File 'lib/stripe/resources/payment_method.rb', line 854 def cvc @cvc end |
#exp_month ⇒ Object
Two-digit number representing the card’s expiration month.
856 857 858 |
# File 'lib/stripe/resources/payment_method.rb', line 856 def exp_month @exp_month end |
#exp_year ⇒ Object
Four-digit number representing the card’s expiration year.
858 859 860 |
# File 'lib/stripe/resources/payment_method.rb', line 858 def exp_year @exp_year end |
#networks ⇒ Object
Contains information about card networks used to process the payment.
860 861 862 |
# File 'lib/stripe/resources/payment_method.rb', line 860 def networks @networks end |
#number ⇒ Object
The card number, as a string without any separators.
862 863 864 |
# File 'lib/stripe/resources/payment_method.rb', line 862 def number @number end |
#token ⇒ Object
For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: “tok_visa”.
864 865 866 |
# File 'lib/stripe/resources/payment_method.rb', line 864 def token @token end |