@pax2pay/client 0.3.136 → 0.3.137

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.
@@ -2,10 +2,9 @@ import { AmountPair } from "./AmountPair";
2
2
  export interface BillingTransactionAmountPair {
3
3
  billing: AmountPair;
4
4
  transaction: AmountPair;
5
- fxRate: number;
6
- rebate?: number;
7
- rebateRate?: number;
5
+ fxRate?: number;
8
6
  }
9
7
  export declare namespace BillingTransactionAmountPair {
10
- function is(value: BillingTransactionAmountPair | any): value is BillingTransactionAmountPair;
8
+ const type: import("isly/dist/cjs/object").IslyObject<BillingTransactionAmountPair, object>;
9
+ const is: (value: BillingTransactionAmountPair | any) => value is BillingTransactionAmountPair;
11
10
  }
@@ -1,14 +1,12 @@
1
+ import { isly } from "isly";
1
2
  import { AmountPair } from "./AmountPair";
2
3
  export var BillingTransactionAmountPair;
3
4
  (function (BillingTransactionAmountPair) {
4
- function is(value) {
5
- return (typeof value == "object" &&
6
- AmountPair.is(value.billing) &&
7
- AmountPair.is(value.transaction) &&
8
- typeof value.fxRate == "number" &&
9
- (typeof value.rebate == "number" || value.rebate == undefined) &&
10
- (typeof value.rebateRate == "number" || value.rebateRate == undefined));
11
- }
12
- BillingTransactionAmountPair.is = is;
5
+ BillingTransactionAmountPair.type = isly.object({
6
+ billing: isly.fromIs("AmountPair", AmountPair.is),
7
+ transaction: isly.fromIs("AmountPair", AmountPair.is),
8
+ fxRate: isly.number().optional(),
9
+ });
10
+ BillingTransactionAmountPair.is = BillingTransactionAmountPair.type.is;
13
11
  })(BillingTransactionAmountPair || (BillingTransactionAmountPair = {}));
14
12
  //# sourceMappingURL=BillingTransactionAmountPair.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BillingTransactionAmountPair.js","sourceRoot":"../","sources":["model/BillingTransactionAmountPair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AASzC,MAAM,KAAW,4BAA4B,CAW5C;AAXD,WAAiB,4BAA4B;IAC5C,SAAgB,EAAE,CAAC,KAAyC;QAC3D,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;YAC5B,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC;YAChC,OAAO,KAAK,CAAC,MAAM,IAAI,QAAQ;YAC/B,CAAC,OAAO,KAAK,CAAC,MAAM,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,SAAS,CAAC;YAC9D,CAAC,OAAO,KAAK,CAAC,UAAU,IAAI,QAAQ,IAAI,KAAK,CAAC,UAAU,IAAI,SAAS,CAAC,CACtE,CAAA;IACF,CAAC;IATe,+BAAE,KASjB,CAAA;AACF,CAAC,EAXgB,4BAA4B,KAA5B,4BAA4B,QAW5C"}
1
+ {"version":3,"file":"BillingTransactionAmountPair.js","sourceRoot":"../","sources":["model/BillingTransactionAmountPair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAOzC,MAAM,KAAW,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC/B,iCAAI,GAAG,IAAI,CAAC,MAAM,CAA+B;QAC7D,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,EAAE,CAAC;QACjD,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,EAAE,CAAC;QACrD,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC,CAAA;IACW,+BAAE,GAAG,6BAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAPgB,4BAA4B,KAA5B,4BAA4B,QAO5C"}
@@ -1,21 +1,16 @@
1
+ import { isly } from "isly"
1
2
  import { AmountPair } from "./AmountPair"
2
3
 
3
4
  export interface BillingTransactionAmountPair {
4
5
  billing: AmountPair
5
6
  transaction: AmountPair
6
- fxRate: number
7
- rebate?: number
8
- rebateRate?: number
7
+ fxRate?: number
9
8
  }
10
9
  export namespace BillingTransactionAmountPair {
11
- export function is(value: BillingTransactionAmountPair | any): value is BillingTransactionAmountPair {
12
- return (
13
- typeof value == "object" &&
14
- AmountPair.is(value.billing) &&
15
- AmountPair.is(value.transaction) &&
16
- typeof value.fxRate == "number" &&
17
- (typeof value.rebate == "number" || value.rebate == undefined) &&
18
- (typeof value.rebateRate == "number" || value.rebateRate == undefined)
19
- )
20
- }
10
+ export const type = isly.object<BillingTransactionAmountPair>({
11
+ billing: isly.fromIs("AmountPair", AmountPair.is),
12
+ transaction: isly.fromIs("AmountPair", AmountPair.is),
13
+ fxRate: isly.number().optional(),
14
+ })
15
+ export const is = type.is
21
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.3.136",
3
+ "version": "0.3.137",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",