44 lines
843 B
C++
44 lines
843 B
C++
#ifndef EETV4RESPONSE_H
|
|
#define EETV4RESPONSE_H
|
|
|
|
#include <QDateTime>
|
|
#include <QList>
|
|
#include <QString>
|
|
|
|
#include "eetcpp_global.h"
|
|
|
|
enum class EetV4ResponseStatus
|
|
{
|
|
Success,
|
|
Error,
|
|
SoapFault
|
|
};
|
|
|
|
struct EETCPPSHARED_EXPORT EetV4Response
|
|
{
|
|
EetV4ResponseStatus status = EetV4ResponseStatus::Error;
|
|
QString message;
|
|
QString messageUuid;
|
|
QDateTime receivedAt;
|
|
QDateTime rejectedAt;
|
|
QString pok;
|
|
int errorCode = 0;
|
|
bool test = false;
|
|
QList<int> warningCodes;
|
|
|
|
bool isSuccess() const
|
|
{
|
|
return status == EetV4ResponseStatus::Success;
|
|
}
|
|
};
|
|
|
|
class EETCPPSHARED_EXPORT EetV4ResponseParser
|
|
{
|
|
public:
|
|
static bool parseSoap(const QByteArray &soap,
|
|
EetV4Response *response,
|
|
QString *error = nullptr);
|
|
};
|
|
|
|
#endif // EETV4RESPONSE_H
|