Class: Stripe::Token::CreateParams::Card

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/token.rb

Defined Under Namespace

Classes: Networks

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#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.



683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
# File 'lib/stripe/resources/token.rb', line 683

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.



657
658
659
# File 'lib/stripe/resources/token.rb', line 657

def address_city
  @address_city
end

#address_countryObject

Billing address country, if provided.



659
660
661
# File 'lib/stripe/resources/token.rb', line 659

def address_country
  @address_country
end

#address_line1Object

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



661
662
663
# File 'lib/stripe/resources/token.rb', line 661

def address_line1
  @address_line1
end

#address_line2Object

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



663
664
665
# File 'lib/stripe/resources/token.rb', line 663

def address_line2
  @address_line2
end

#address_stateObject

State / County / Province / Region.



665
666
667
# File 'lib/stripe/resources/token.rb', line 665

def address_state
  @address_state
end

#address_zipObject

ZIP or postal code.



667
668
669
# File 'lib/stripe/resources/token.rb', line 667

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.



669
670
671
# File 'lib/stripe/resources/token.rb', line 669

def currency
  @currency
end

#cvcObject

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



671
672
673
# File 'lib/stripe/resources/token.rb', line 671

def cvc
  @cvc
end

#exp_monthObject

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



673
674
675
# File 'lib/stripe/resources/token.rb', line 673

def exp_month
  @exp_month
end

#exp_yearObject

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



675
676
677
# File 'lib/stripe/resources/token.rb', line 675

def exp_year
  @exp_year
end

#nameObject

Cardholder’s full name.



677
678
679
# File 'lib/stripe/resources/token.rb', line 677

def name
  @name
end

#networksObject

Contains information about card networks used to process the payment.



679
680
681
# File 'lib/stripe/resources/token.rb', line 679

def networks
  @networks
end

#numberObject

The card number, as a string without any separators.



681
682
683
# File 'lib/stripe/resources/token.rb', line 681

def number
  @number
end