Finance
Module to generate finance and money related entries.For a random amount, use {{$finance.amount}}
.For traditional bank accounts, use: {{$finance.accountNumber}}
, {{$finance.accountName}}
, {{$finance.bic}}
, {{$finance.iban}}
, {{$finance.pin}}
and {{$finance.routingNumber}}
.For credit card related methods, use: {{$finance.creditCardNumber}}
, {{$finance.creditCardCVV}}
, {{$finance.creditCardIssuer}}
, {{$finance.transactionDescription}}
and {{$finance.transactionType}}
.For blockchain related methods, use: {{$finance.bitcoinAddress}}
, {{$finance.ethereumAddress}}
and {{$finance.litecoinAddress}}
.
accountName#
Generates a random account name.
accountNumber#
Generates a random account number.Name | Type | Default | Description |
---|
length | number | 8 | The length of the account number. |
amount#
Generates a random amount between the given bounds (inclusive).Name | Type | Default | Description |
---|
autoFormat | boolean | false | |
dec | number | 2 | The number of decimal places for the amount. |
max | number | 1000 | The upper bound for the amount. |
min | number | 0 | The lower bound for the amount. |
symbol | string | '' | The symbol used to prefix the amount. |
bic#
Generates a random SWIFT/BIC code based on the ISO-9362 format.Name | Type | Default | Description |
---|
includeBranchCode | boolean | {{$datatype.boolean}} | Whether to include a three-digit branch code at the end of the generated code. |
bitcoinAddress#
Generates a random Bitcoin address.Name | Type | Default | Description |
---|
network | 'mainnet' | 'testnet' | mainnet | The bitcoin network ('mainnet' or 'testnet' ). |
type | 'legacy' | 'segwit' | 'bech32' | 'taproot'| faker.helpers.arrayElement(['legacy','sewgit','bech32','taproot']) | The bitcoin address type ('legacy' , 'sewgit' , 'bech32' or 'taproot' ). | |
creditCardCVV#
Generates a random credit card CVV.
creditCardIssuer#
Returns a random credit card issuer.
creditCardNumber#
Generates a random credit card number.Name | Type | Default | Description |
---|
issuer | string | | The name of the issuer (case-insensitive) or the format used to generate one. |
currencyCode#
Returns a random currency code. (The short text/abbreviation for the currency (e.g. US Dollar
-> USD
))
currencyName#
Returns a random currency name.
currencySymbol#
Returns a random currency symbol.
ethereumAddress#
Creates a random, non-checksum Ethereum address.To generate a checksummed Ethereum address (with specific per character casing), wrap this method in a custom method and use third-party libraries to transform the result.
iban#
Name | Type | Default | Description |
---|
countryCode | string | | The country code from which you want to generate an IBAN, if none is provided a random country will be used. |
formatted | boolean | false | Return a formatted version of the generated IBAN. |
maskedNumber#
Generates a random masked number.Name | Type | Default | Description |
---|
ellipsis | boolean | true | Whether to prefix the numbers with an ellipsis. |
length | number | 4 | The length of the unmasked number. |
parens | boolean | true | Whether to use surrounding parenthesis. |
pin#
Generates a random PIN number.Name | Type | Default | Description |
---|
length | number | 4 | The length of the PIN to generate. |
routingNumber#
Generates a random routing number.
transactionDescription#
Generates a random transaction description.
transactionType#
Returns a random transaction type. Modified atΒ 2024-09-03 05:52:30