Class: Stripe::PaymentMethodCreateParams::Card
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::PaymentMethodCreateParams::Card
- Defined in:
- lib/stripe/params/payment_method_create_params.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
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(cvc: nil, exp_month: nil, exp_year: nil, networks: nil, number: nil, token: nil) ⇒ Card
Returns a new instance of Card.
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/stripe/params/payment_method_create_params.rb', line 139 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.
127 128 129 |
# File 'lib/stripe/params/payment_method_create_params.rb', line 127 def cvc @cvc end |
#exp_month ⇒ Object
Two-digit number representing the card’s expiration month.
129 130 131 |
# File 'lib/stripe/params/payment_method_create_params.rb', line 129 def exp_month @exp_month end |
#exp_year ⇒ Object
Four-digit number representing the card’s expiration year.
131 132 133 |
# File 'lib/stripe/params/payment_method_create_params.rb', line 131 def exp_year @exp_year end |
#networks ⇒ Object
Contains information about card networks used to process the payment.
133 134 135 |
# File 'lib/stripe/params/payment_method_create_params.rb', line 133 def networks @networks end |
#number ⇒ Object
The card number, as a string without any separators.
135 136 137 |
# File 'lib/stripe/params/payment_method_create_params.rb', line 135 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”.
137 138 139 |
# File 'lib/stripe/params/payment_method_create_params.rb', line 137 def token @token end |