-
Notifications
You must be signed in to change notification settings - Fork 0
/
fire.go
386 lines (345 loc) · 12.4 KB
/
fire.go
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
package bca
//Auth represents authentication info used in FIRe transaction
type Auth struct {
CorporateID string
AccessCode string
BranchCode string
UserID string
LocalID string
}
//SenderAccountRequest represents sender details used in TTAccountRequest
type SenderAccountRequest struct {
FirstName string
LastName string
DateOfBirth string
Address1 string
Address2 string
City string
StateID string
PostalCode string
CountryID string
Mobile string
IdentificationType string
IdentificationNumber string
AccountNumber string
}
//BeneficiaryAccountRequest represents beneficiary details used in TTAccountRequest
type BeneficiaryAccountRequest struct {
Name string
DateOfBirth string
Address1 string
Address2 string
City string
StateID string
PostalCode string
CountryID string
Mobile string
IdentificationType string
IdentificationNumber string
NationalityID string
Occupation string
BankCodeType string
BankCodeValue string
BankCountryID string
BankAddress string
BankCity string
AccountNumber string
}
//TransactionTTAccountRequest represents transaction details used in TTAccountRequest
type TransactionAccountRequest struct {
CurrencyID string
Amount float64 `json:",string"`
PurposeCode string
Description1 string
Description2 string
DetailOfCharges string
SourceOfFund string
FormNumber string
}
//TeleTransferAccountRequest is to provides service transaction “Transaction to BCA’s Account” and also “Transfer to Other Bank”
type TeleTransferAccountRequest struct {
Authentication Auth
SenderDetails SenderAccountRequest
BeneficiaryDetails BeneficiaryAccountRequest
TransactionDetails TransactionAccountRequest
}
//BeneficiaryTTAccountResponse represents beneficiary details for response message
type BeneficiaryAccountResponse struct {
Name string
AccountNumber string
ServerBeneAccountName string
}
//TransactionTTAccountResponse represents transaction details for response message
type TransactionAccountResponse struct {
CurrencyID string
Amount float64 `json:",string"`
Description1 string
Description2 string
FormNumber string
ReferenceNumber string
ReleaseDateTime string
StatusTransaction string `json:",omitempty"`
StatusMessage string `json:",omitempty"`
}
//TTAccountResponse is to provide service transaction “Transaction to BCA’s Account” and also “Transfer to Other Bank”
type TeleTransferAccountResponse struct {
Error
BeneficiaryDetails BeneficiaryAccountResponse
TransactionDetails TransactionAccountResponse
StatusTransaction string
StatusMessage string
}
//BeneficiaryInquiryAccountRequest represents beneficiary details to inquire account(s)
type BeneficiaryInquiryAccountRequest struct {
BankCodeType string
BankCodeValue string
AccountNumber string
}
//InquiryAccountRequest is to provide service to Inquiry BCA’s Account name or Other Bank Switching’s Account name.
type InquiryAccountRequest struct {
Authentication Auth
BeneficiaryDetails BeneficiaryInquiryAccountRequest
}
//BeneficiaryInquiryAccountResponse represents response payload to inquire accounts
type BeneficiaryInquiryAccountResponse struct {
ServerBeneAccountName string
}
//InquiryAccountResponse is to provide service to Inquiry BCA’s Account name or Other Bank Switching’s Account name.
type InquiryAccountResponse struct {
Error
BeneficiaryDetails BeneficiaryInquiryAccountResponse
StatusTransaction string
StatusMessage string
}
//InquiryAccountBalanceRequest represents FID details to inquire account balance
type FIInquiryAccountBalanceRequest struct {
AccountNumber string
}
//InquiryAccountBalanceRequest is to provide service to Inquiry balance for Vostro’s Account.
type InquiryAccountBalanceRequest struct {
Authentication Auth
FIDetails FIInquiryAccountBalanceRequest
}
//FIInquiryAccountBalanceResponse represents FID details in response message
type FIInquiryAccountBalanceResponse struct {
CurrencyID string
AccountBalance float64 `json:",string"`
}
//TTInquiryAccountBalanceResponse is to provide service to Inquiry balance for Vostro’s Account.
type InquiryAccountBalanceResponse struct {
Error
FIDetails FIInquiryAccountBalanceResponse
StatusTransaction string
StatusMessage string
}
//TransactionTTInquiryTransactionRequest represents transaction details to inquire transaction
type TransactionInquiryTransactionRequest struct {
InquiryBy string
InquiryValue string
}
//InquiryTransactionRequest is to provide service to Inquiry Transaction that has been submitted before
type InquiryTransactionRequest struct {
Authentication Auth
TransactionDetails TransactionInquiryTransactionRequest
}
//SenderInquiryTransactionResponse represents sender details for response message
type SenderInquiryTransactionResponse struct {
FirstName string
LastName string
}
//BeneficiaryInquiryTransactionResponse represents beneficiary details for response message
type BeneficiaryInquiryTransactionResponse struct {
Name string
BankCodeType string
BankCodeValue string
AccountNumber string
}
//TransactionInquiryTransactionResponse represents transaction details for response message
type TransactionTTInquiryTransactionResponse struct {
AmountPaid float64 `json:",string"`
CurrencyID string
ReleaseDateTime string
LocalID string
FormNumber string
ReferenceNumber string
PIN string
Description1 string
Description2 string
}
//InquiryTransactionResponse is to provide service to Inquiry Transaction that has been submitted before
type InquiryTransactionResponse struct {
Error
SenderDetails SenderInquiryTransactionResponse
BeneficiaryDetails BeneficiaryInquiryTransactionResponse
TransactionDetails TransactionTTInquiryTransactionResponse
StatusTransaction string
StatusMessage string
}
//SenderTeleTransferCashTransferRequest represents sender details used in TTCashTransferRequest
type SenderTeleTransferCashTransferRequest struct {
FirstName string
LastName string
DateOfBirth string
Address1 string
Address2 string
City string
StateID string
PostalCode string
CountryID string
Mobile string
IdentificationType string
IdentificationNumber string
}
//BeneficiaryTeleTransferCashTransferRequest represents beneficiary details used in TTCashTransferRequest
type BeneficiaryTeleTransferCashTransferRequest struct {
Name string
DateOfBirth string
Address1 string
Address2 string
City string
StateID string
PostalCode string
CountryID string
Mobile string
IdentificationType string
IdentificationNumber string
NationalityID string
Occupation string
}
//TransactionTeleTransferCashTransferRequest represents transaction details used in TTCashTransferRequest
type TransactionTeleTransferCashTransferRequest struct {
PIN string
SecretQuestion string
SecretAnswer string
CurrencyID string
Amount float64 `json:",string"`
PurposeCode string
Description1 string
Description2 string
DetailOfCharges string
SourceOfFund string
FormNumber string
}
//TeleTransferCashTransferRequest is to provide service for transaction “Cash Transfer” to Non account holder.
type TeleTransferCashTransferRequest struct {
Authentication Auth
SenderDetails SenderTeleTransferCashTransferRequest
BeneficiaryDetails BeneficiaryTeleTransferCashTransferRequest
TransactionDetails TransactionTeleTransferCashTransferRequest
}
//BeneficiaryTeleTransferCashTransferResponse represents beneficiary details in response message
type BeneficiaryTeleTransferCashTransferResponse struct {
Name string
}
//TransactionTeleTransferCashTransferResponse represents transaction details in response message
type TransactionTeleTransferCashTransferResponse struct {
PIN string
CurrencyID string
Amount float64 `json:",string"`
Description1 string
Description2 string
FormNumber string
ReferenceNumber string
ReleaseDateTime string
}
//TTCashTransferResponse is to provide service for transaction “Cash Transfer” to Non account holder.
type TeleTransferCashTransferResponse struct {
Error
BeneficiaryDetails BeneficiaryTeleTransferCashTransferResponse
TransactionDetails TransactionTeleTransferCashTransferResponse
StatusTransaction string
StatusMessage string
}
//SenderTeleTransferAmendCashTransfer represents sender details to amend cash-transfer
type SenderTeleTransferAmendCashTransfer struct {
FirstName string
LastName string
DateOfBirth string
Address1 string
Address2 string
City string
StateID string
PostalCode string
CountryID string
Mobile string
IdentificationType string
IdentificationNumber string
}
//BeneficiaryTTAmendCashTransfer represents beneficiary details to amend cash-transfer
type BeneficiaryTeleTransferAmendCashTransfer struct {
Name string
DateOfBirth string
Address1 string
Address2 string
City string
StateID string
PostalCode string
CountryID string
Mobile string
IdentificationType string
IdentificationNumber string
NationalityID string
Occupation string
}
//Transaction1TeleTransferAmendCashTransfer represents transaction details to amend cash-transfer
type Transaction1TeleTransferAmendCashTransfer struct {
Description1 string
Description2 string
SecretQuestion string
SecretAnswer string
}
//AmendmentTeleTransferAmendCashTransfer represents amendment details to amend cash-transfer
type AmendmentTeleTransferAmendCashTransfer struct {
SenderDetails SenderTeleTransferAmendCashTransfer
BeneficiaryDetails BeneficiaryTeleTransferAmendCashTransfer
TransactionDetails Transaction1TeleTransferAmendCashTransfer
}
//Transaction2TeleTransferAmendCashTransfer represents transaction details to amend cash-transfer
type Transaction2TTAmendCashTransfer struct {
FormNumber string
}
//TeleTransferAmendCashTransferRequest is to provide service for Amendment “Cash Transfer” to Non account holder
type TeleTransferAmendCashTransferRequest struct {
Authentication Auth
AmendmentDetails AmendmentTeleTransferAmendCashTransfer
TransactionDetails Transaction2TTAmendCashTransfer
}
//TransactionTTAmendCashTransferResponse represents transaction details to amend cash-transfer
type TransactionTTAmendCashTransferResponse struct {
Description1 string
Description2 string
SecretQuestion string
SecretAnswer string
FormNumber string
}
//TeleTransferAmendCashTransferResponse is to provide service for Amendment “Cash Transfer” to Non account holder
type TeleTransferAmendCashTransferResponse struct {
Error
AmendmentDetails AmendmentTeleTransferAmendCashTransfer
TransactionDetails Transaction2TTAmendCashTransfer
StatusTransaction string
StatusMessage string
}
//TransactionTTCancelCashTransferRequest represents transaction details to cancel cash-transfer
type TransactionTeleTransferCancelCashTransferRequest struct {
FormNumber string
Amount float64 `json:",string"`
CurrencyID string
}
//TTCancelCashTransferRequest is to provide service for Cancellation “Cash Transfer” to Non account holder
type TeleTransferCancelCashTransferRequest struct {
Authentication Auth
TransactionDetails TransactionTeleTransferCancelCashTransferRequest
}
//TransactionTTCancelCashTransferResponse represents transaction details to cancel cash-transfer
type TransactionTeleTransferCancelCashTransferResponse struct {
FormNumber string
ReleaseDateTime string
}
//TTCancelCashTransferResponse is to provide service for Cancellation “Cash Transfer” to Non account holder
type TeleTransferCancelCashTransferResponse struct {
Error
TransactionDetails TransactionTeleTransferCancelCashTransferResponse
StatusTransaction string
StatusMessage string
}