-
Notifications
You must be signed in to change notification settings - Fork 1
/
operation-cancel-sale-creation-request.x
69 lines (55 loc) · 1.66 KB
/
operation-cancel-sale-creation-request.x
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
58
59
60
61
62
63
64
65
66
67
68
69
%#include "xdr/ledger-entries.h"
namespace stellar
{
/* CancelSaleCreationRequestOp
Cancels Sale creation request
Threshold: high
Result: CancelSaleCreationRequestResult
*/
//: CancelSaleCreationRequest operation is used to cancel sale creation request.
//: If successful, request with the corresponding ID will be deleted
//: SaleCreationRequest with provided ID
struct CancelSaleCreationRequestOp
{
//: ID of the SaleCreation request to be canceled
uint64 requestID;
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
/******* CancelSaleCreationRequest Result ********/
//: Result codes for CancelSaleCreationRequest operation
enum CancelSaleCreationRequestResultCode
{
// codes considered as "success" for the operation
//: Operation is successfully applied
SUCCESS = 0,
// codes considered as "failure" for the operation
//: ID of a request cannot be 0
REQUEST_ID_INVALID = -1, // request id can not be equal zero
//: SaleCreation request with provided ID is not found
REQUEST_NOT_FOUND = -2 // trying to cancel not existing reviewable request
};
//: Result of successful `CancelSaleCreationRequestOp` application
struct CancelSaleCreationSuccess {
//: Reserved for future use
union switch (LedgerVersion v)
{
case EMPTY_VERSION:
void;
}
ext;
};
//: Result of CancelSaleCreationRequest operation application along with the result code
union CancelSaleCreationRequestResult switch (CancelSaleCreationRequestResultCode code)
{
case SUCCESS:
CancelSaleCreationSuccess success;
default:
void;
};
}