Skip to contents

credit card methods

Super class

charlatan::BareProvider -> CreditCardProvider

Public fields

luhn_lookup

(list) luhn lookup, named list

Methods

Inherited methods


Method credit_card_type()

Returns a random credit card type

Usage

CreditCardProvider$credit_card_type(card_type = NULL)

Arguments

card_type

(character) a card type, see credit_card_types


Method generate_number()

make a credit card number with specific starting numbers

Usage

CreditCardProvider$generate_number(prefix, length = 13)

Arguments

prefix

the start of the CC number as a string, any number of digits.

length

the length of the CC number to generate. Typically 13 or 16


Method credit_card_provider()

credit card provider

Usage

CreditCardProvider$credit_card_provider(card_type = NULL)

Arguments

card_type

(character) a card type, see credit_card_types


Method credit_card_number()

credit card number

Usage

CreditCardProvider$credit_card_number(card_type = NULL)

Arguments

card_type

(character) a card type, see credit_card_types


Method credit_card_security_code()

credit card security code

Usage

CreditCardProvider$credit_card_security_code(card_type = NULL)

Arguments

card_type

(character) a card type, see credit_card_types


Method clone()

The objects of this class are cloneable with this method.

Usage

CreditCardProvider$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

z <- CreditCardProvider$new()
z$credit_card_provider()
#> [1] "Voyager"
z$credit_card_number()
#> [1] "52800008128475030"
z$credit_card_security_code()
#> [1] "216"
z$generate_number(13)
#> [1] "13991459652327"