rewrite for eet 2.0 api version v4
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
#ifndef EETV4REQUEST_H
|
||||
#define EETV4REQUEST_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QUuid>
|
||||
|
||||
#include "eetcpp_global.h"
|
||||
|
||||
class EETCPPSHARED_EXPORT EetV4Amount
|
||||
{
|
||||
public:
|
||||
EetV4Amount() = default;
|
||||
|
||||
static bool fromString(const QString &value, EetV4Amount *amount, QString *error = nullptr);
|
||||
|
||||
qint64 cents() const;
|
||||
QString toString() const;
|
||||
|
||||
private:
|
||||
explicit EetV4Amount(qint64 cents);
|
||||
|
||||
qint64 m_cents{0};
|
||||
};
|
||||
|
||||
class EETCPPSHARED_EXPORT EetV4SaleRequest
|
||||
{
|
||||
public:
|
||||
QUuid messageUuid{QUuid::createUuid()};
|
||||
QDateTime sentAt;
|
||||
QDateTime saleAt;
|
||||
bool firstSubmission{true};
|
||||
bool verificationMode{false};
|
||||
|
||||
QString taxpayerEic;
|
||||
QString authorizingTaxpayerEic;
|
||||
bool multipleTaxpayerAuthorization{false};
|
||||
qint32 unitId{0};
|
||||
QString cashRegisterId;
|
||||
QString receiptNumber;
|
||||
EetV4Amount totalSale;
|
||||
EetV4Amount intendedSettlement;
|
||||
EetV4Amount settlement;
|
||||
bool hasIntendedSettlement{false};
|
||||
bool hasSettlement{false};
|
||||
|
||||
bool validate(QStringList *errors = nullptr) const;
|
||||
static QString formatDateTime(const QDateTime &dateTime);
|
||||
};
|
||||
|
||||
#endif // EETV4REQUEST_H
|
||||
Reference in New Issue
Block a user