Finance

The following generator functions are available in the Finance provider:

┌────────────────────┬───────────────────┬────────────────┐
│ Generator Function │ Available Locales │ Unique Entries │
│             String │             Int64 │          Int64 │
├────────────────────┼───────────────────┼────────────────┤
│               bank │                 1 │            143 │
│        credit_card │                 1 │              2 │
└────────────────────┴───────────────────┴────────────────┘

Impostor.bank_nameFunction
bank_name(n::Integer = 1; kwargs...)
bank_name(options::Vector, n::Integer; level::Symbol, kwargs...)
bank_name(mask::Vector; level::Symbol, kwargs...)

Parameters

  • n::Integer = 1: number of bank name entries to generate
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :bank_code: Level of values in options or mask when using option-based or mask-based eneration.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.

Example

julia> bank_name(5; locale = ["pt_BR"])
5-element Vector{String}:
 "Broker"
 "Nubank"
 "Itaubank"
 "Renascenca"
 "Daycoval"
source
Impostor.bank_official_nameFunction
bank_official_name(n::Integer = 1; kwargs...)
bank_official_name(options::Vector, n::Integer; level::Symbol, kwargs...)
bank_official_name(mask::Vector; level::Symbol, kwargs...)

Parameters

  • n::Integer = 1: number of official bank name entries to generate
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • level::Symbol = :bank_code: Level of values in options or mask when using option-based or mask-based eneration.
  • locale::Vector{String}: locale(s) from which entries are sampled. If no locale is provided, the current session locale is used.
source
Impostor.credit_card_cvvFunction
credit_card_cvv(n::Integer = 1; kwargs...)

Generate n credit card ccvs, e.g. 034

Examples

julia> credit_card_cvv(3)
3-element Vector{Int64}:
 636
 429
 117
source
Impostor.credit_card_expiryFunction
credit_card_expiry(n::Integer = 1; kwargs...)

Generate n credit card expiry entries, e.g. 05/2029.

Examples

julia> credit_card_expiry(3)
3-element Vector{String}:
 "4/2014"
 "7/2013"
 "10/2010"
source
Impostor.credit_card_numberFunction
credit_card_number(n::Integer = 1; kwargs...)
credit_card_number(options::Vector{<:AbstractString}, n::Integer; kwargs...)
credit_card_number(mask::Vector{<:AbstractString}; kwargs...)

Generate valid credit card numbers according to the credit card vendor. Available vendors are:

  • "Visa"
  • "American Express"
  • "MasterCard"

Parameters

  • n::Integer = 1: number of credit card numbers to generate.
  • options::Vector{<:AbstractString}: vector with options restricting the possible values generated.
  • mask::Vector{<:AbstractString}: mask vector with element-wise option restrictions.

Kwargs

  • formatted::Bool: whether to return the raw credit card numbers e.g. "3756808757861311" or to format the output e.g. "3756-8087-5786-1311"

Examples

julia> credit_card_number()
"5186794250685172"

julia> credit_card_number(; formatted = true)
"4046-7508-2101-2729"
source
Impostor.credit_card_vendorFunction
credit_card_vendor(n::Integer = 1; kwargs...)
credit_card_vendor(options::Vector{<:AbstractString}, n::Integer; kwargs...)

Generate n credit card vendor names.

Example

julia> credit_card_vendor(3)
3-element Vector{String}:
 "American Express"
 "American Express"
 "Visa"
source