@pax2pay/model-banking 0.1.571 → 0.1.573
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/Account/Charge/index.ts +1 -1
- package/Transaction/Amount/Charge/index.ts +1 -1
- package/dist/cjs/Account/Charge/index.js +1 -1
- package/dist/cjs/Account/Charge/index.js.map +1 -1
- package/dist/cjs/Transaction/Amount/Charge/index.d.ts +1 -1
- package/dist/mjs/Account/Charge/index.js +1 -1
- package/dist/mjs/Account/Charge/index.js.map +1 -1
- package/dist/mjs/Transaction/Amount/Charge/index.d.ts +1 -1
- package/package.json +1 -1
package/Account/Charge/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type Charge = { merchant?: Charge.Merchant; fx?: Charge.Fx }
|
|
|
10
10
|
export namespace Charge {
|
|
11
11
|
export import Merchant = ChargeMerchant
|
|
12
12
|
export import Fx = ChargeFx
|
|
13
|
-
export const type = isly.object<Charge>({ merchant: ChargeMerchant.type, fx: ChargeFx.type })
|
|
13
|
+
export const type = isly.object<Charge>({ merchant: ChargeMerchant.type.optional(), fx: ChargeFx.type.optional() })
|
|
14
14
|
export function evaluate(
|
|
15
15
|
counterpart: Rail.Address.Card.Counterpart,
|
|
16
16
|
currency: isoly.Currency,
|
|
@@ -39,7 +39,7 @@ export namespace Charge {
|
|
|
39
39
|
}),
|
|
40
40
|
})
|
|
41
41
|
}
|
|
42
|
-
export type ChargeTransaction = PreTransaction.Incoming & {
|
|
42
|
+
export type ChargeTransaction = PreTransaction.Incoming & { account: Rail.Address.Internal }
|
|
43
43
|
export function total(currency: isoly.Currency, charges: Charge): number {
|
|
44
44
|
return isoly.Currency.add(currency, charges.fx?.amount ?? 0, charges.merchant?.amount ?? 0)
|
|
45
45
|
}
|
|
@@ -8,7 +8,7 @@ var Charge;
|
|
|
8
8
|
(function (Charge) {
|
|
9
9
|
Charge.Merchant = Merchant_1.Merchant;
|
|
10
10
|
Charge.Fx = Fx_1.Fx;
|
|
11
|
-
Charge.type = isly_1.isly.object({ merchant: Merchant_1.Merchant.type, fx: Fx_1.Fx.type });
|
|
11
|
+
Charge.type = isly_1.isly.object({ merchant: Merchant_1.Merchant.type.optional(), fx: Fx_1.Fx.type.optional() });
|
|
12
12
|
function evaluate(counterpart, currency, amount, preset, charges, exchange) {
|
|
13
13
|
const merchant = charges?.merchant && Merchant_1.Merchant.evaluate(charges.merchant, currency, amount, counterpart, preset);
|
|
14
14
|
const fx = charges?.fx && Fx_1.Fx.evaluate(charges.fx, currency, amount, preset, exchange);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Account/Charge/index.ts"],"names":[],"mappings":";;;AACA,+BAA2B;AAI3B,6BAAqC;AACrC,yCAAuD;AAGvD,IAAiB,MAAM,CAqBtB;AArBD,WAAiB,MAAM;IACR,eAAQ,GAAG,mBAAc,CAAA;IACzB,SAAE,GAAG,OAAQ,CAAA;IACd,WAAI,GAAG,WAAI,CAAC,MAAM,CAAS,EAAE,QAAQ,EAAE,mBAAc,CAAC,IAAI,EAAE,EAAE,EAAE,OAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Account/Charge/index.ts"],"names":[],"mappings":";;;AACA,+BAA2B;AAI3B,6BAAqC;AACrC,yCAAuD;AAGvD,IAAiB,MAAM,CAqBtB;AArBD,WAAiB,MAAM;IACR,eAAQ,GAAG,mBAAc,CAAA;IACzB,SAAE,GAAG,OAAQ,CAAA;IACd,WAAI,GAAG,WAAI,CAAC,MAAM,CAAS,EAAE,QAAQ,EAAE,mBAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,OAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IACnH,SAAgB,QAAQ,CACvB,WAA0C,EAC1C,QAAwB,EACxB,MAAc,EACd,MAAoB,EACpB,OAAgB,EAChB,QAA+B;QAE/B,MAAM,QAAQ,GACb,OAAO,EAAE,QAAQ,IAAI,mBAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAA;QACtG,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,OAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;QAE3F,OAAO;YACN,GAAG,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC7B,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;SACjB,CAAA;IACF,CAAC;IAhBe,eAAQ,WAgBvB,CAAA;AACF,CAAC,EArBgB,MAAM,sBAAN,MAAM,QAqBtB"}
|
|
@@ -28,7 +28,7 @@ export declare namespace Charge {
|
|
|
28
28
|
const type: import("isly/dist/cjs/object").IslyObject<Merchant, object>;
|
|
29
29
|
}
|
|
30
30
|
type ChargeTransaction = PreTransaction.Incoming & {
|
|
31
|
-
|
|
31
|
+
account: Rail.Address.Internal;
|
|
32
32
|
};
|
|
33
33
|
function total(currency: isoly.Currency, charges: Charge): number;
|
|
34
34
|
function toTransactions(charge: Charge, account: string, id: string, currency: isoly.Currency, fxCollectAccount: string): {
|
|
@@ -5,7 +5,7 @@ export var Charge;
|
|
|
5
5
|
(function (Charge) {
|
|
6
6
|
Charge.Merchant = ChargeMerchant;
|
|
7
7
|
Charge.Fx = ChargeFx;
|
|
8
|
-
Charge.type = isly.object({ merchant: ChargeMerchant.type, fx: ChargeFx.type });
|
|
8
|
+
Charge.type = isly.object({ merchant: ChargeMerchant.type.optional(), fx: ChargeFx.type.optional() });
|
|
9
9
|
function evaluate(counterpart, currency, amount, preset, charges, exchange) {
|
|
10
10
|
const merchant = charges?.merchant && ChargeMerchant.evaluate(charges.merchant, currency, amount, counterpart, preset);
|
|
11
11
|
const fx = charges?.fx && ChargeFx.evaluate(charges.fx, currency, amount, preset, exchange);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Account/Charge/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AAGvD,MAAM,KAAW,MAAM,CAqBtB;AArBD,WAAiB,MAAM;IACR,eAAQ,GAAG,cAAc,CAAA;IACzB,SAAE,GAAG,QAAQ,CAAA;IACd,WAAI,GAAG,IAAI,CAAC,MAAM,CAAS,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Account/Charge/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AAGvD,MAAM,KAAW,MAAM,CAqBtB;AArBD,WAAiB,MAAM;IACR,eAAQ,GAAG,cAAc,CAAA;IACzB,SAAE,GAAG,QAAQ,CAAA;IACd,WAAI,GAAG,IAAI,CAAC,MAAM,CAAS,EAAE,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IACnH,SAAgB,QAAQ,CACvB,WAA0C,EAC1C,QAAwB,EACxB,MAAc,EACd,MAAoB,EACpB,OAAgB,EAChB,QAA+B;QAE/B,MAAM,QAAQ,GACb,OAAO,EAAE,QAAQ,IAAI,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAA;QACtG,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;QAE3F,OAAO;YACN,GAAG,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC7B,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;SACjB,CAAA;IACF,CAAC;IAhBe,eAAQ,WAgBvB,CAAA;AACF,CAAC,EArBgB,MAAM,KAAN,MAAM,QAqBtB"}
|
|
@@ -28,7 +28,7 @@ export declare namespace Charge {
|
|
|
28
28
|
const type: import("isly/dist/cjs/object").IslyObject<Merchant, object>;
|
|
29
29
|
}
|
|
30
30
|
type ChargeTransaction = PreTransaction.Incoming & {
|
|
31
|
-
|
|
31
|
+
account: Rail.Address.Internal;
|
|
32
32
|
};
|
|
33
33
|
function total(currency: isoly.Currency, charges: Charge): number;
|
|
34
34
|
function toTransactions(charge: Charge, account: string, id: string, currency: isoly.Currency, fxCollectAccount: string): {
|