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
105FAKER_CXX_EXPORT std::string iban(Locale locale = Locale::de_DE);
106
118FAKER_CXX_EXPORT std::string_view bic(Locale locale = Locale::en_US);
119
132FAKER_CXX_EXPORT std::string accountNumber(unsigned length = 8);
133
146FAKER_CXX_EXPORT std::string pin(unsigned length = 4);
147
157FAKER_CXX_EXPORT std::string routingNumber();
158
160{
162 Discover,
164 Visa
165};
166
179
189FAKER_CXX_EXPORT std::string creditCardCvv();
190
200FAKER_CXX_EXPORT std::string bitcoinAddress();
201
211FAKER_CXX_EXPORT std::string litecoinAddress();
212
222FAKER_CXX_EXPORT std::string ethereumAddress();
223
233FAKER_CXX_EXPORT std::string creditCardExpirationDate();
234
244FAKER_CXX_EXPORT std::string_view creditCardType();
245
246}
Definition finance.h:11
FAKER_CXX_EXPORT Currency currency()
Returns a random currency.
FAKER_CXX_EXPORT std::string creditCardCvv()
Generates a random credit card CVV.
FAKER_CXX_EXPORT std::string pin(unsigned length=4)
Generates a random PIN number.
FAKER_CXX_EXPORT std::string ethereumAddress()
Generates a random ethereum address.
FAKER_CXX_EXPORT std::string creditCardNumber(CreditCardType creditCardType=CreditCardType::Visa)
Generates a random credit card number.
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()
Generates a random credit card type.
FAKER_CXX_EXPORT std::string creditCardExpirationDate()
Generates a random expiration date.
FAKER_CXX_EXPORT std::string_view currencyName()
Returns a random currency name.
FAKER_CXX_EXPORT std::string_view bic(Locale locale=Locale::en_US)
Generates a random BIC.
FAKER_CXX_EXPORT std::string accountNumber(unsigned length=8)
Generates a random account number.
FAKER_CXX_EXPORT std::string_view currencyCode()
Returns a random currency code.
FAKER_CXX_EXPORT std::string litecoinAddress()
Generates a random litecoin address.
CreditCardType
Definition finance.h:160
FAKER_CXX_EXPORT std::string bitcoinAddress()
Generates a random bitcoin address.
FAKER_CXX_EXPORT std::string_view accountType()
Returns a random account type.
FAKER_CXX_EXPORT std::string routingNumber()
Generates a random routing number.
FAKER_CXX_EXPORT std::string iban(Locale locale=Locale::de_DE)
Generates a random IBAN.
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