@pax2pay/model-banking 0.1.207 → 0.1.208
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.
|
@@ -9,7 +9,7 @@ import { Fee } from "../Fee"
|
|
|
9
9
|
export interface Refund extends Refund.Creatable {
|
|
10
10
|
status: "succeeded" | "failed"
|
|
11
11
|
reason?: string
|
|
12
|
-
transaction?:
|
|
12
|
+
transaction?: Transaction
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export namespace Refund {
|
|
@@ -25,7 +25,7 @@ export namespace Refund {
|
|
|
25
25
|
amount: Amount
|
|
26
26
|
}
|
|
27
27
|
export function from(refund: Refund.Creatable, transaction: Transaction): Refund {
|
|
28
|
-
return { ...refund, status: "succeeded", transaction
|
|
28
|
+
return { ...refund, status: "succeeded", transaction }
|
|
29
29
|
}
|
|
30
30
|
export namespace Creatable {
|
|
31
31
|
export const type = isly.object<Creatable>({
|
|
@@ -45,7 +45,7 @@ export namespace Refund {
|
|
|
45
45
|
export const type = Creatable.type.extend<Refund>({
|
|
46
46
|
status: isly.string(["succeeded", "failed"]),
|
|
47
47
|
reason: isly.string().optional(),
|
|
48
|
-
transaction:
|
|
48
|
+
transaction: Transaction.type,
|
|
49
49
|
})
|
|
50
50
|
export const is = type.is
|
|
51
51
|
export const flaw = type.flaw
|
|
@@ -2,12 +2,13 @@ import { isly } from "isly";
|
|
|
2
2
|
import { Acquirer } from "../../Acquirer";
|
|
3
3
|
import { Amount } from "../../Amount";
|
|
4
4
|
import { Merchant } from "../../Merchant";
|
|
5
|
+
import { Transaction } from "../../Transaction";
|
|
5
6
|
import { Batch } from "../Batch";
|
|
6
7
|
import { Fee } from "../Fee";
|
|
7
8
|
export var Refund;
|
|
8
9
|
(function (Refund) {
|
|
9
10
|
function from(refund, transaction) {
|
|
10
|
-
return { ...refund, status: "succeeded", transaction
|
|
11
|
+
return { ...refund, status: "succeeded", transaction };
|
|
11
12
|
}
|
|
12
13
|
Refund.from = from;
|
|
13
14
|
let Creatable;
|
|
@@ -29,7 +30,7 @@ export var Refund;
|
|
|
29
30
|
Refund.type = Creatable.type.extend({
|
|
30
31
|
status: isly.string(["succeeded", "failed"]),
|
|
31
32
|
reason: isly.string().optional(),
|
|
32
|
-
transaction:
|
|
33
|
+
transaction: Transaction.type,
|
|
33
34
|
});
|
|
34
35
|
Refund.is = Refund.type.is;
|
|
35
36
|
Refund.flaw = Refund.type.flaw;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Refund.js","sourceRoot":"../","sources":["Settlement/Entry/Refund.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"Refund.js","sourceRoot":"../","sources":["Settlement/Entry/Refund.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAQ5B,MAAM,KAAW,MAAM,CAqCtB;AArCD,WAAiB,MAAM;IAYtB,SAAgB,IAAI,CAAC,MAAwB,EAAE,WAAwB;QACtE,OAAO,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA;IACvD,CAAC;IAFe,WAAI,OAEnB,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