@pax2pay/model-banking 0.1.64 → 0.1.66

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.
@@ -1,4 +1,5 @@
1
1
  import { gracely } from "gracely"
2
+ import { isoly } from "isoly"
2
3
  import { http } from "cloudly-http"
3
4
  import * as rest from "cloudly-rest"
4
5
  import { Settlement } from "../Settlement"
@@ -8,13 +9,19 @@ export class Settlements extends rest.Collection<gracely.Error> {
8
9
  super(client)
9
10
  }
10
11
 
11
- async fetch(settlement: string): Promise<Settlement | gracely.Error> {
12
- return this.client.get<Settlement>(`/card/settlement/${settlement}`)
12
+ async create(configuration: string): Promise<Settlement | gracely.Error> {
13
+ return this.client.post<Settlement>(`/card/settlement`, { configuration: configuration })
13
14
  }
14
- async list(): Promise<Settlement.Summary | gracely.Error> {
15
- return this.client.get<Settlement.Summary & { cursor?: string | undefined }>(`/card/settlement`)
15
+ async fetch(id: string, created: isoly.DateTime): Promise<Settlement | gracely.Error> {
16
+ return this.client.get<Settlement>(`/card/settlement/${id}?created=${created}`)
16
17
  }
17
- async settle(settlement: string): Promise<Settlement | gracely.Error> {
18
+ async list(): Promise<Settlement.Summary[] | gracely.Error> {
19
+ return this.client.get<Settlement.Summary[] & { cursor?: string | undefined }>(`/card/settlement`)
20
+ }
21
+ async remove(settlement: string): Promise<Settlement | gracely.Error> {
22
+ return this.client.delete<Settlement>(`/card/settlement/${settlement}`)
23
+ }
24
+ async update(settlement: string): Promise<Settlement | gracely.Error> {
18
25
  return this.client.patch<Settlement>(`/card/settlement/${settlement}`, {})
19
26
  }
20
27
  }
@@ -1,10 +1,13 @@
1
1
  import { gracely } from "gracely";
2
+ import { isoly } from "isoly";
2
3
  import { http } from "cloudly-http";
3
4
  import * as rest from "cloudly-rest";
4
5
  import { Settlement } from "../Settlement";
5
6
  export declare class Settlements extends rest.Collection<gracely.Error> {
6
7
  constructor(client: http.Client);
7
- fetch(settlement: string): Promise<Settlement | gracely.Error>;
8
- list(): Promise<Settlement.Summary | gracely.Error>;
9
- settle(settlement: string): Promise<Settlement | gracely.Error>;
8
+ create(configuration: string): Promise<Settlement | gracely.Error>;
9
+ fetch(id: string, created: isoly.DateTime): Promise<Settlement | gracely.Error>;
10
+ list(): Promise<Settlement.Summary[] | gracely.Error>;
11
+ remove(settlement: string): Promise<Settlement | gracely.Error>;
12
+ update(settlement: string): Promise<Settlement | gracely.Error>;
10
13
  }
@@ -3,13 +3,19 @@ export class Settlements extends rest.Collection {
3
3
  constructor(client) {
4
4
  super(client);
5
5
  }
6
- async fetch(settlement) {
7
- return this.client.get(`/card/settlement/${settlement}`);
6
+ async create(configuration) {
7
+ return this.client.post(`/card/settlement`, { configuration: configuration });
8
+ }
9
+ async fetch(id, created) {
10
+ return this.client.get(`/card/settlement/${id}?created=${created}`);
8
11
  }
9
12
  async list() {
10
13
  return this.client.get(`/card/settlement`);
11
14
  }
12
- async settle(settlement) {
15
+ async remove(settlement) {
16
+ return this.client.delete(`/card/settlement/${settlement}`);
17
+ }
18
+ async update(settlement) {
13
19
  return this.client.patch(`/card/settlement/${settlement}`, {});
14
20
  }
15
21
  }
@@ -1 +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;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAuD,kBAAkB,CAAC,CAAA;IACjG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,UAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAa,oBAAoB,UAAU,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3E,CAAC;CACD"}
1
+ {"version":3,"file":"Settlements.js","sourceRoot":"../","sources":["Client/Settlements.ts"],"names":[],"mappings":"AAGA,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,MAAM,CAAC,aAAqB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAa,kBAAkB,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC,CAAA;IAC1F,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAa,oBAAoB,EAAE,YAAY,OAAO,EAAE,CAAC,CAAA;IAChF,CAAC;IACD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAyD,kBAAkB,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,UAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAa,oBAAoB,UAAU,EAAE,CAAC,CAAA;IACxE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,UAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAa,oBAAoB,UAAU,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3E,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.64",
3
+ "version": "0.1.66",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",