forked from ciphrex/mSIGNA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaymentrequest.h
58 lines (46 loc) · 1.41 KB
/
paymentrequest.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
///////////////////////////////////////////////////////////////////////////////
//
// mSIGNA
//
// paymentrequest.h
//
// Copyright (c) 2013 Eric Lombrozo
//
// All Rights Reserved.
#pragma once
#include <QString>
#include <stdint.h>
class QUrl;
class PaymentRequest
{
public:
PaymentRequest() : value_(0), hasAddress_(false), hasVersion_(false), hasValue_(false), hasLabel_(false), hasMessage_(false), hasSend_(false) { }
PaymentRequest(const QUrl& url);
static uint64_t parseAmount(const QString& amountString);
const QString& address() const { return address_; }
const QString& version() const { return version_; }
uint64_t value() const { return value_; }
const QString& label() const { return label_; }
const QString& message() const { return message_; }
const QString& send() const { return send_; }
bool hasAddress() const { return hasAddress_; }
bool hasVersion() const { return hasVersion_; }
bool hasValue() const { return hasValue_; }
bool hasLabel() const { return hasLabel_; }
bool hasMessage() const { return hasMessage_; }
bool hasSend() const { return hasSend_; }
QString toJson() const;
private:
QString address_;
QString version_;
uint64_t value_;
QString label_;
QString message_;
QString send_;
bool hasAddress_;
bool hasVersion_;
bool hasValue_;
bool hasLabel_;
bool hasMessage_;
bool hasSend_;
};