@pax2pay/model-banking 0.1.58 → 0.1.59

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.
@@ -0,0 +1,17 @@
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
+ import * as rest from "cloudly-rest"
4
+ import { Settlement } from "../Settlement"
5
+
6
+ export class Settlements extends rest.Collection<gracely.Error> {
7
+ constructor(client: http.Client) {
8
+ super(client)
9
+ }
10
+
11
+ async fetch(settlement: string): Promise<Settlement | gracely.Error> {
12
+ return this.client.get<Settlement>(`/card/settlement/${settlement}`)
13
+ }
14
+ async list(options?: { limit?: string; cursor?: string }): Promise<Omit<Settlement, "entries">[] | gracely.Error> {
15
+ return this.client.get<Omit<Settlement, "entries">[] & { cursor?: string | undefined }>(`/card/settlemnet`, options)
16
+ }
17
+ }
package/Client/index.ts CHANGED
@@ -6,6 +6,7 @@ import { Accounts } from "./Accounts"
6
6
  import { Cards } from "./Cards"
7
7
  import { Operations } from "./Operations"
8
8
  import { Organizations } from "./Organizations"
9
+ import { Settlements } from "./Settlements"
9
10
  import { Transactions } from "./Transactions"
10
11
  import { Treasury } from "./Treasury"
11
12
  import { Version } from "./Version"
@@ -21,6 +22,7 @@ export class Client extends rest.Client<gracely.Error> {
21
22
  readonly treasury = new Treasury(this.client)
22
23
  readonly version = new Version(this.client)
23
24
  readonly cards = new Cards(this.client)
25
+ readonly settlement = new Settlements(this.client)
24
26
 
25
27
  static create<T = Record<string, any>>(server: string, key: string, load?: (client: http.Client) => T): Client & T {
26
28
  let httpClient: http.Client<gracely.Error>
@@ -0,0 +1,12 @@
1
+ import { gracely } from "gracely";
2
+ import { http } from "cloudly-http";
3
+ import * as rest from "cloudly-rest";
4
+ import { Settlement } from "../Settlement";
5
+ export declare class Settlements extends rest.Collection<gracely.Error> {
6
+ constructor(client: http.Client);
7
+ fetch(settlement: string): Promise<Settlement | gracely.Error>;
8
+ list(options?: {
9
+ limit?: string;
10
+ cursor?: string;
11
+ }): Promise<Omit<Settlement, "entries">[] | gracely.Error>;
12
+ }
@@ -0,0 +1,13 @@
1
+ import * as rest from "cloudly-rest";
2
+ export class Settlements extends rest.Collection {
3
+ constructor(client) {
4
+ super(client);
5
+ }
6
+ async fetch(settlement) {
7
+ return this.client.get(`/card/settlement/${settlement}`);
8
+ }
9
+ async list(options) {
10
+ return this.client.get(`/card/settlemnet`, options);
11
+ }
12
+ }
13
+ //# sourceMappingURL=Settlements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Settlements.js","sourceRoot":"../","sources":["Client/Settlements.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAGpC,MAAM,OAAO,WAAY,SAAQ,IAAI,CAAC,UAAyB;IAC9D,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;IACd,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,UAAkB;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAa,oBAAoB,UAAU,EAAE,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAA6C;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAkE,kBAAkB,EAAE,OAAO,CAAC,CAAA;IACrH,CAAC;CACD"}
@@ -6,6 +6,7 @@ import { Accounts } from "./Accounts";
6
6
  import { Cards } from "./Cards";
7
7
  import { Operations } from "./Operations";
8
8
  import { Organizations } from "./Organizations";
9
+ import { Settlements } from "./Settlements";
9
10
  import { Transactions } from "./Transactions";
10
11
  import { Treasury } from "./Treasury";
11
12
  import { Version } from "./Version";
@@ -20,6 +21,7 @@ export declare class Client extends rest.Client<gracely.Error> {
20
21
  readonly treasury: Treasury;
21
22
  readonly version: Version;
22
23
  readonly cards: Cards;
24
+ readonly settlement: Settlements;
23
25
  static create<T = Record<string, any>>(server: string, key: string, load?: (client: http.Client) => T): Client & T;
24
26
  }
25
27
  export declare namespace Client {
@@ -5,6 +5,7 @@ import { Accounts } from "./Accounts";
5
5
  import { Cards } from "./Cards";
6
6
  import { Operations } from "./Operations";
7
7
  import { Organizations } from "./Organizations";
8
+ import { Settlements } from "./Settlements";
8
9
  import { Transactions } from "./Transactions";
9
10
  import { Treasury } from "./Treasury";
10
11
  import { Version } from "./Version";
@@ -19,6 +20,7 @@ export class Client extends rest.Client {
19
20
  this.treasury = new Treasury(this.client);
20
21
  this.version = new Version(this.client);
21
22
  this.cards = new Cards(this.client);
23
+ this.settlement = new Settlements(this.client);
22
24
  }
23
25
  static create(server, key, load) {
24
26
  let httpClient;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,MAAM,OAAO,MAAO,SAAQ,IAAI,CAAC,MAAqB;IAAtD;;QAGU,gBAAW,GAAG,IAAI,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAA;QACvF,aAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACpC,eAAU,GAAG,IAAI,UAAU,CAAC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YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;SACxG,CAAC,CAAC,CACH,CAAA;QACD,IAAI,IAAI;YACP,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;QACxC,OAAO,MAAoB,CAAA;IAC5B,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",