-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transactions.proto
118 lines (87 loc) · 3.92 KB
/
Transactions.proto
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
option java_package = "com.idamobile.instabank.dto.protobuf";
option java_outer_classname = "Transactions";
import "Commons.proto";
import "Order.proto";
// Return for endpoint: fetchDrafts
// NOTE: For request, Use standard feed request (FeedRequestDTO) for this endpoint
message DraftFeedProtobufDTO {
repeated DraftProtobufDTO items = 1;
}
// Draft is an abstract container that might contany any of the following:
// order - details on payment order
// auth - authorization transaction details
// clearings - clearing transactions detail
// The contract requres that at least one of these is present, however there are no other assumptions.
message DraftProtobufDTO {
// Timestamp when transaction is first seen by the system
required int64 timestamp = 1;
// Authorization id (provided by bank). Optional, null for back office transactions.
// Note that for we might have authId but not have authorization id but not have authorization transaction itself
optional string authId = 2;
// Financial id (provided by bank). Optional, null for authorizations that are not yet cleared
optional string finId = 3;
// Presence of this field indicates that transaction has been canceled and stores timestamp when that happened
optional int64 canceled = 4;
// Payment Order
optional OrderProtobufDTO order = 5;
// Authorization
optional AuthorizationProtobufDTO auth = 6;
// Clearings
repeated ClearingProtobufDTO clearings = 7;
// The moment, when authorization has occured, according to bank's records.
// Placed on top level because it might originate both from authorization or clearing
optional int64 authTimestamp = 8;
// Calculated transaction class
optional TransactionClass clazz = 10;
// Calculated transaction category
optional string categoryId = 11;
// Terminal description. Terminal data comes aggregated from all transactions
// with data from authorization taking priority over financial.
optional TerminalProtobufDTO terminal = 12;
// User-defined transaction category
optional string userCategoryId = 21;
// Envelope bound to the authId
optional EnvelopeProtobufDTO authEnvelope = 22;
// Envelope bound to the finId
optional EnvelopeProtobufDTO finEnvelope = 23;
}
message AuthorizationProtobufDTO {
// Original transaction currency code
optional string origCurrency = 2;
// Original amount of funds, measured in original transaction currency
required int64 origAmount = 3;
// Amount of funds applied to account, measured in account currency
required int64 billAmount = 4;
// Amount of funds commissioned for this transaction, measured in account currency
optional int64 commAmount = 5;
// Amount of funds reported by bank as 'remaining balance', measured in account currency
required int64 balance = 6;
// Human readable transaction message (typically as specified by merchant)
required string message = 7;
// Transaction title (human readable text provided by bank)
required string title = 8;
// Do we really need this?
//optional string broker = 8;
}
message ClearingProtobufDTO {
// The moment, when clearing has occured, according to bank's records (financial date).
required int64 timestamp = 1;
// Original transaction currency code
optional string origCurrency = 2;
// Original amount of funds, measured in original transaction currency
optional int64 origAmount = 3;
// Amount of funds applied to account, measured in account currency
required int64 billAmount = 4;
// Transaction title (human readable text provided by bank)
required string title = 8;
}
message TerminalProtobufDTO {
optional string id = 1;
optional string name = 2;
optional string sic = 3;
optional string country = 4;
optional string city = 5;
optional string location = 6;
optional string desc = 7;
optional string retailer = 8;
}