@pax2pay/model-banking 0.1.562 → 0.1.563
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Settlement/Entry/fromCreatable.ts +6 -8
- package/dist/cjs/Settlement/Entry/fromCreatable.js +6 -8
- package/dist/cjs/Settlement/Entry/fromCreatable.js.map +1 -1
- package/dist/mjs/Settlement/Entry/fromCreatable.js +6 -8
- package/dist/mjs/Settlement/Entry/fromCreatable.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,21 +17,19 @@ export function fromCreatable(
|
|
|
17
17
|
reasons.push(`gracely error: ${JSON.stringify(transaction)}`)
|
|
18
18
|
else if (typeof transaction == "string")
|
|
19
19
|
reasons.push(transaction || "No reason provided.")
|
|
20
|
-
else if (transaction.status != "finalized")
|
|
20
|
+
else if (transaction.status != "finalized" && transaction.status != "processing")
|
|
21
21
|
reasons.push(`Transaction ${transaction.id} on account ${transaction.accountId} unable to be finalized.`)
|
|
22
22
|
if (reasons.length > 0)
|
|
23
23
|
result = { status: "failed", reason: reasons.join("\n"), ...creatable, created }
|
|
24
|
-
else
|
|
24
|
+
else {
|
|
25
|
+
const cardTransaction = transaction as Transaction.CardTransaction
|
|
25
26
|
result = {
|
|
26
27
|
status: "succeeded",
|
|
27
28
|
...(creatable as Creatable.Known),
|
|
28
29
|
created,
|
|
29
|
-
card:
|
|
30
|
-
transaction: {
|
|
31
|
-
id: (transaction as Transaction.CardTransaction).id,
|
|
32
|
-
posted: (transaction as Transaction.CardTransaction).posted,
|
|
33
|
-
description: (transaction as Transaction.CardTransaction).description,
|
|
34
|
-
},
|
|
30
|
+
card: cardTransaction.account,
|
|
31
|
+
transaction: { id: cardTransaction.id, posted: cardTransaction.posted, description: cardTransaction.description },
|
|
35
32
|
}
|
|
33
|
+
}
|
|
36
34
|
return result
|
|
37
35
|
}
|
|
@@ -13,22 +13,20 @@ function fromCreatable(creatable, transaction) {
|
|
|
13
13
|
reasons.push(`gracely error: ${JSON.stringify(transaction)}`);
|
|
14
14
|
else if (typeof transaction == "string")
|
|
15
15
|
reasons.push(transaction || "No reason provided.");
|
|
16
|
-
else if (transaction.status != "finalized")
|
|
16
|
+
else if (transaction.status != "finalized" && transaction.status != "processing")
|
|
17
17
|
reasons.push(`Transaction ${transaction.id} on account ${transaction.accountId} unable to be finalized.`);
|
|
18
18
|
if (reasons.length > 0)
|
|
19
19
|
result = { status: "failed", reason: reasons.join("\n"), ...creatable, created };
|
|
20
|
-
else
|
|
20
|
+
else {
|
|
21
|
+
const cardTransaction = transaction;
|
|
21
22
|
result = {
|
|
22
23
|
status: "succeeded",
|
|
23
24
|
...creatable,
|
|
24
25
|
created,
|
|
25
|
-
card:
|
|
26
|
-
transaction: {
|
|
27
|
-
id: transaction.id,
|
|
28
|
-
posted: transaction.posted,
|
|
29
|
-
description: transaction.description,
|
|
30
|
-
},
|
|
26
|
+
card: cardTransaction.account,
|
|
27
|
+
transaction: { id: cardTransaction.id, posted: cardTransaction.posted, description: cardTransaction.description },
|
|
31
28
|
};
|
|
29
|
+
}
|
|
32
30
|
return result;
|
|
33
31
|
}
|
|
34
32
|
//# sourceMappingURL=fromCreatable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fromCreatable.js","sourceRoot":"","sources":["../../../../Settlement/Entry/fromCreatable.ts"],"names":[],"mappings":";;AAMA,
|
|
1
|
+
{"version":3,"file":"fromCreatable.js","sourceRoot":"","sources":["../../../../Settlement/Entry/fromCreatable.ts"],"names":[],"mappings":";;AAMA,sCA4BC;AAlCD,qCAAiC;AACjC,iCAA6B;AAK7B,SAAgB,aAAa,CAC5B,SAAoB,EACpB,WAAiE;IAEjE,IAAI,MAAa,CAAA;IACjB,MAAM,OAAO,GAAa,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,aAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;IACpC,IAAI,SAAS,CAAC,IAAI,IAAI,SAAS;QAC9B,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACpC,IAAI,iBAAO,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC;QAChC,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;SACzD,IAAI,OAAO,WAAW,IAAI,QAAQ;QACtC,OAAO,CAAC,IAAI,CAAC,WAAW,IAAI,qBAAqB,CAAC,CAAA;SAC9C,IAAI,WAAW,CAAC,MAAM,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,IAAI,YAAY;QAC/E,OAAO,CAAC,IAAI,CAAC,eAAe,WAAW,CAAC,EAAE,eAAe,WAAW,CAAC,SAAS,0BAA0B,CAAC,CAAA;IAC1G,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QACrB,MAAM,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,CAAA;SAC5E,CAAC;QACL,MAAM,eAAe,GAAG,WAA0C,CAAA;QAClE,MAAM,GAAG;YACR,MAAM,EAAE,WAAW;YACnB,GAAI,SAA6B;YACjC,OAAO;YACP,IAAI,EAAE,eAAe,CAAC,OAAO;YAC7B,WAAW,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,WAAW,EAAE,eAAe,CAAC,WAAW,EAAE;SACjH,CAAA;IACF,CAAC;IACD,OAAO,MAAM,CAAA;AACd,CAAC"}
|
|
@@ -10,22 +10,20 @@ export function fromCreatable(creatable, transaction) {
|
|
|
10
10
|
reasons.push(`gracely error: ${JSON.stringify(transaction)}`);
|
|
11
11
|
else if (typeof transaction == "string")
|
|
12
12
|
reasons.push(transaction || "No reason provided.");
|
|
13
|
-
else if (transaction.status != "finalized")
|
|
13
|
+
else if (transaction.status != "finalized" && transaction.status != "processing")
|
|
14
14
|
reasons.push(`Transaction ${transaction.id} on account ${transaction.accountId} unable to be finalized.`);
|
|
15
15
|
if (reasons.length > 0)
|
|
16
16
|
result = { status: "failed", reason: reasons.join("\n"), ...creatable, created };
|
|
17
|
-
else
|
|
17
|
+
else {
|
|
18
|
+
const cardTransaction = transaction;
|
|
18
19
|
result = {
|
|
19
20
|
status: "succeeded",
|
|
20
21
|
...creatable,
|
|
21
22
|
created,
|
|
22
|
-
card:
|
|
23
|
-
transaction: {
|
|
24
|
-
id: transaction.id,
|
|
25
|
-
posted: transaction.posted,
|
|
26
|
-
description: transaction.description,
|
|
27
|
-
},
|
|
23
|
+
card: cardTransaction.account,
|
|
24
|
+
transaction: { id: cardTransaction.id, posted: cardTransaction.posted, description: cardTransaction.description },
|
|
28
25
|
};
|
|
26
|
+
}
|
|
29
27
|
return result;
|
|
30
28
|
}
|
|
31
29
|
//# sourceMappingURL=fromCreatable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fromCreatable.js","sourceRoot":"","sources":["../../../../Settlement/Entry/fromCreatable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAK7B,MAAM,UAAU,aAAa,CAC5B,SAAoB,EACpB,WAAiE;IAEjE,IAAI,MAAa,CAAA;IACjB,MAAM,OAAO,GAAa,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;IACpC,IAAI,SAAS,CAAC,IAAI,IAAI,SAAS;QAC9B,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACpC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC;QAChC,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;SACzD,IAAI,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