Faker C++
Loading...
Searching...
No Matches
finance.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <string_view>
5
6#include "faker-cxx/export.h"
7#include "faker-cxx/types/locale.h"
8#include "types/precision.h"
9
11{
12struct FAKER_CXX_EXPORT Currency
13{
14 std::string_view name;
15 std::string_view code;
16 std::string_view symbol;
17};
18
28FAKER_CXX_EXPORT Currency currency();
29
39FAKER_CXX_EXPORT std::string_view currencyName();
40
50FAKER_CXX_EXPORT std::string_view currencyCode();
51
61FAKER_CXX_EXPORT std::string_view currencySymbol();
62
72FAKER_CXX_EXPORT std::string_view accountType();
73
91FAKER_CXX_EXPORT std::string amount(double min = 0, double max = 1000, Precision precision = Precision::TwoDp,
92 const std::string& symbol = "");
93
106FAKER_CXX_EXPORT std::string iban(Locale locale = Locale::de_DE);
107
119FAKER_CXX_EXPORT std::string_view bic(Locale locale = Locale::en_US);
120
133FAKER_CXX_EXPORT std::string accountNumber(unsigned length = 8);
134
147FAKER_CXX_EXPORT std::string pin(unsigned length = 4);
148
158FAKER_CXX_EXPORT std::string routingNumber();
159
161{
163 Discover,
165 Visa
166};
167
180
190FAKER_CXX_EXPORT std::string creditCardCvv();
191
201FAKER_CXX_EXPORT std::string bitcoinAddress();
202
212FAKER_CXX_EXPORT std::string litecoinAddress();
213
223FAKER_CXX_EXPORT std::string ethereumAddress();
224
234FAKER_CXX_EXPORT std::string creditCardExpirationDate();
235
245FAKER_CXX_EXPORT std::string_view creditCardType();
246
247}
Definition finance.h:11
FAKER_CXX_EXPORT Currency currency()
Returns a random currency.
FAKER_CXX_EXPORT std::string creditCardCvv()
FAKER_CXX_EXPORT std::string pin(unsigned length=4)
FAKER_CXX_EXPORT std::string ethereumAddress()
FAKER_CXX_EXPORT std::string creditCardNumber(CreditCardType creditCardType=CreditCardType::Visa)
FAKER_CXX_EXPORT std::string amount(double min=0, double max=1000, Precision precision=Precision::TwoDp, const std::string &symbol="")
Generates a random amount between the given bounds (inclusive).
FAKER_CXX_EXPORT std::string_view creditCardType()
FAKER_CXX_EXPORT std::string creditCardExpirationDate()
FAKER_CXX_EXPORT std::string_view currencyName()
Returns a random currency name.
FAKER_CXX_EXPORT std::string_view bic(Locale locale=Locale::en_US)
FAKER_CXX_EXPORT std::string accountNumber(unsigned length=8)
FAKER_CXX_EXPORT std::string_view currencyCode()
Returns a random currency code.
FAKER_CXX_EXPORT std::string litecoinAddress()
CreditCardType
Definition finance.h:161
FAKER_CXX_EXPORT std::string bitcoinAddress()
FAKER_CXX_EXPORT std::string_view accountType()
Returns a random account type.
FAKER_CXX_EXPORT std::string routingNumber()
FAKER_CXX_EXPORT std::string iban(Locale locale=Locale::de_DE)
FAKER_CXX_EXPORT std::string_view currencySymbol()
Returns a random currency symbol.
Definition finance.h:13
std::string_view name
Definition finance.h:14
std::string_view code
Definition finance.h:15
std::string_view symbol
Definition finance.h:16