Class: Stripe::TokenCreateParams::Card

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/token_create_params.rb

Defined Under Namespace

Classes: Networks

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(address_city: nil, address_country: nil, address_line1: nil, address_line2: nil, address_state: nil, address_zip: nil, currency: nil, cvc: nil, exp_month: nil, exp_year: nil, name: nil, networks: nil, number: nil) ⇒ Card

Returns a new instance of Card.



755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
# File 'lib/stripe/params/token_create_params.rb', line 755

def initialize(
  address_city: nil,
  address_country: nil,
  address_line1: nil,
  address_line2: nil,
  address_state: nil,
  address_zip: nil,
  currency: nil,
  cvc: nil,
  exp_month: nil,
  exp_year: nil,
  name: nil,
  networks: nil,
  number: nil
)
  @address_city = address_city
  @address_country = address_country
  @address_line1 = address_line1
  @address_line2 = address_line2
  @address_state = address_state
  @address_zip = address_zip
  @currency = currency
  @cvc = cvc
  @exp_month = exp_month
  @exp_year = exp_year
  @name = name
  @networks = networks
  @number = number
end

Instance Attribute Details

#address_cityObject

City / District / Suburb / Town / Village.



729
730
731
# File 'lib/stripe/params/token_create_params.rb', line 729

def address_city
  @address_city
end

#address_countryObject

Billing address country, if provided.



731
732
733
# File 'lib/stripe/params/token_create_params.rb', line 731

def address_country
  @address_country
end

#address_line1Object

Address line 1 (Street address / PO Box / Company name).



733
734
735
# File 'lib/stripe/params/token_create_params.rb', line 733

def address_line1
  @address_line1
end

#address_line2Object

Address line 2 (Apartment / Suite / Unit / Building).



735
736
737
# File 'lib/stripe/params/token_create_params.rb', line 735

def address_line2
  @address_line2
end

#address_stateObject

State / County / Province / Region.



737
738
739
# File 'lib/stripe/params/token_create_params.rb', line 737

def address_state
  @address_state
end

#address_zipObject

ZIP or postal code.



739
740
741
# File 'lib/stripe/params/token_create_params.rb', line 739

def address_zip
  @address_zip
end

#currencyObject

Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency.



741
742
743
# File 'lib/stripe/params/token_create_params.rb', line 741

def currency
  @currency
end

#cvcObject

Card security code. Highly recommended to always include this value.



743
744
745
# File 'lib/stripe/params/token_create_params.rb', line 743

def cvc
  @cvc
end

#exp_monthObject

Two-digit number representing the card’s expiration month.



745
746
747
# File 'lib/stripe/params/token_create_params.rb', line 745

def exp_month
  @exp_month
end

#exp_yearObject

Two- or four-digit number representing the card’s expiration year.



747
748
749
# File 'lib/stripe/params/token_create_params.rb', line 747

def exp_year
  @exp_year
end

#nameObject

Cardholder’s full name.



749
750
751
# File 'lib/stripe/params/token_create_params.rb', line 749

def name
  @name
end

#networksObject

Contains information about card networks used to process the payment.



751
752
753
# File 'lib/stripe/params/token_create_params.rb', line 751

def networks
  @networks
end

#numberObject

The card number, as a string without any separators.



753
754
755
# File 'lib/stripe/params/token_create_params.rb', line 753

def number
  @number
end