Class: Stripe::PaymentMethodService::CreateParams::Card
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::PaymentMethodService::CreateParams::Card
- Defined in:
- lib/stripe/services/payment_method_service.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.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/stripe/services/payment_method_service.rb', line 199 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.
182 183 184 |
# File 'lib/stripe/services/payment_method_service.rb', line 182 def cvc @cvc end |
#exp_month ⇒ Object
Two-digit number representing the card’s expiration month.
185 186 187 |
# File 'lib/stripe/services/payment_method_service.rb', line 185 def exp_month @exp_month end |
#exp_year ⇒ Object
Four-digit number representing the card’s expiration year.
188 189 190 |
# File 'lib/stripe/services/payment_method_service.rb', line 188 def exp_year @exp_year end |
#networks ⇒ Object
Contains information about card networks used to process the payment.
191 192 193 |
# File 'lib/stripe/services/payment_method_service.rb', line 191 def networks @networks end |
#number ⇒ Object
The card number, as a string without any separators.
194 195 196 |
# File 'lib/stripe/services/payment_method_service.rb', line 194 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”.
197 198 199 |
# File 'lib/stripe/services/payment_method_service.rb', line 197 def token @token end |