Learn R Programming

charlatan (version 0.6.1)

CreditCardProvider: CreditCardProvider

Description

credit card methods

Arguments

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

Run this code
z <- CreditCardProvider$new()
z$credit_card_provider()
z$credit_card_number()
z$credit_card_security_code()
z$generate_number(13)

Run the code above in your browser using DataLab