@pax2pay/model-banking 0.1.545 → 0.1.546
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/Client/Accounts/Charge.ts +20 -0
- package/Client/Accounts/index.ts +3 -0
- package/dist/cjs/Client/Accounts/Charge.d.ts +10 -0
- package/dist/cjs/Client/Accounts/Charge.js +20 -0
- package/dist/cjs/Client/Accounts/Charge.js.map +1 -0
- package/dist/cjs/Client/Accounts/index.d.ts +2 -0
- package/dist/cjs/Client/Accounts/index.js +3 -0
- package/dist/cjs/Client/Accounts/index.js.map +1 -1
- package/dist/mjs/Client/Accounts/Charge.d.ts +10 -0
- package/dist/mjs/Client/Accounts/Charge.js +16 -0
- package/dist/mjs/Client/Accounts/Charge.js.map +1 -0
- package/dist/mjs/Client/Accounts/index.d.ts +2 -0
- package/dist/mjs/Client/Accounts/index.js +3 -0
- package/dist/mjs/Client/Accounts/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { gracely } from "gracely"
|
|
2
|
+
import { http } from "cloudly-http"
|
|
3
|
+
import { Account } from "../../Account"
|
|
4
|
+
|
|
5
|
+
export class Charge {
|
|
6
|
+
constructor(private readonly client: http.Client) {}
|
|
7
|
+
async create(account: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error> {
|
|
8
|
+
return this.client.post<Account.Charge>(`/account/${account}/charge`, charge)
|
|
9
|
+
}
|
|
10
|
+
async remove(account: string, id: string): Promise<Account.Charge | gracely.Error> {
|
|
11
|
+
return this.client.delete<Account.Charge>(`/account/${account}/charge/${id}`)
|
|
12
|
+
}
|
|
13
|
+
async replace(
|
|
14
|
+
account: string,
|
|
15
|
+
id: string,
|
|
16
|
+
charge: Account.Charge.Creatable
|
|
17
|
+
): Promise<Account.Charge | gracely.Error> {
|
|
18
|
+
return this.client.put<Account.Charge>(`/account/${account}/charge/${id}`, charge)
|
|
19
|
+
}
|
|
20
|
+
}
|
package/Client/Accounts/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { gracely } from "gracely"
|
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
3
|
import { Account } from "../../Account"
|
|
4
4
|
import { Buffer } from "./Buffer"
|
|
5
|
+
import { Charge } from "./Charge"
|
|
5
6
|
import { Counterparts } from "./Counterparts"
|
|
6
7
|
import { Details } from "./Details"
|
|
7
8
|
import { History } from "./History"
|
|
@@ -10,6 +11,7 @@ import { Status } from "./Status"
|
|
|
10
11
|
|
|
11
12
|
export class Accounts {
|
|
12
13
|
readonly buffer: Buffer
|
|
14
|
+
readonly charge: Charge
|
|
13
15
|
readonly details: Details
|
|
14
16
|
readonly rules: Rules
|
|
15
17
|
readonly status: Status
|
|
@@ -17,6 +19,7 @@ export class Accounts {
|
|
|
17
19
|
readonly history: History
|
|
18
20
|
constructor(private readonly client: http.Client) {
|
|
19
21
|
this.buffer = new Buffer(this.client)
|
|
22
|
+
this.charge = new Charge(this.client)
|
|
20
23
|
this.details = new Details(this.client)
|
|
21
24
|
this.rules = new Rules(this.client)
|
|
22
25
|
this.status = new Status(this.client)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { gracely } from "gracely";
|
|
2
|
+
import { http } from "cloudly-http";
|
|
3
|
+
import { Account } from "../../Account";
|
|
4
|
+
export declare class Charge {
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: http.Client);
|
|
7
|
+
create(account: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error>;
|
|
8
|
+
remove(account: string, id: string): Promise<Account.Charge | gracely.Error>;
|
|
9
|
+
replace(account: string, id: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Charge = void 0;
|
|
4
|
+
class Charge {
|
|
5
|
+
client;
|
|
6
|
+
constructor(client) {
|
|
7
|
+
this.client = client;
|
|
8
|
+
}
|
|
9
|
+
async create(account, charge) {
|
|
10
|
+
return this.client.post(`/account/${account}/charge`, charge);
|
|
11
|
+
}
|
|
12
|
+
async remove(account, id) {
|
|
13
|
+
return this.client.delete(`/account/${account}/charge/${id}`);
|
|
14
|
+
}
|
|
15
|
+
async replace(account, id, charge) {
|
|
16
|
+
return this.client.put(`/account/${account}/charge/${id}`, charge);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Charge = Charge;
|
|
20
|
+
//# sourceMappingURL=Charge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Charge.js","sourceRoot":"","sources":["../../../../Client/Accounts/Charge.ts"],"names":[],"mappings":";;;AAIA,MAAa,MAAM;IACW;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,MAAgC;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAiB,YAAY,OAAO,SAAS,EAAE,MAAM,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,EAAU;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAiB,YAAY,OAAO,WAAW,EAAE,EAAE,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,OAAO,CACZ,OAAe,EACf,EAAU,EACV,MAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiB,YAAY,OAAO,WAAW,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;IACnF,CAAC;CACD;AAfD,wBAeC"}
|
|
@@ -2,6 +2,7 @@ import { gracely } from "gracely";
|
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
3
|
import { Account } from "../../Account";
|
|
4
4
|
import { Buffer } from "./Buffer";
|
|
5
|
+
import { Charge } from "./Charge";
|
|
5
6
|
import { Counterparts } from "./Counterparts";
|
|
6
7
|
import { Details } from "./Details";
|
|
7
8
|
import { History } from "./History";
|
|
@@ -10,6 +11,7 @@ import { Status } from "./Status";
|
|
|
10
11
|
export declare class Accounts {
|
|
11
12
|
private readonly client;
|
|
12
13
|
readonly buffer: Buffer;
|
|
14
|
+
readonly charge: Charge;
|
|
13
15
|
readonly details: Details;
|
|
14
16
|
readonly rules: Rules;
|
|
15
17
|
readonly status: Status;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Accounts = void 0;
|
|
4
4
|
const Buffer_1 = require("./Buffer");
|
|
5
|
+
const Charge_1 = require("./Charge");
|
|
5
6
|
const Counterparts_1 = require("./Counterparts");
|
|
6
7
|
const Details_1 = require("./Details");
|
|
7
8
|
const History_1 = require("./History");
|
|
@@ -10,6 +11,7 @@ const Status_1 = require("./Status");
|
|
|
10
11
|
class Accounts {
|
|
11
12
|
client;
|
|
12
13
|
buffer;
|
|
14
|
+
charge;
|
|
13
15
|
details;
|
|
14
16
|
rules;
|
|
15
17
|
status;
|
|
@@ -18,6 +20,7 @@ class Accounts {
|
|
|
18
20
|
constructor(client) {
|
|
19
21
|
this.client = client;
|
|
20
22
|
this.buffer = new Buffer_1.Buffer(this.client);
|
|
23
|
+
this.charge = new Charge_1.Charge(this.client);
|
|
21
24
|
this.details = new Details_1.Details(this.client);
|
|
22
25
|
this.rules = new Rules_1.Rules(this.client);
|
|
23
26
|
this.status = new Status_1.Status(this.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":";;;AAGA,qCAAiC;AACjC,iDAA6C;AAC7C,uCAAmC;AACnC,uCAAmC;AACnC,mCAA+B;AAC/B,qCAAiC;AAEjC,MAAa,QAAQ;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/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UAAU,EAAE,OAAO,CAAC,CAAA;IACzF,CAAC;CACD;AA/BD,4BA+BC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { gracely } from "gracely";
|
|
2
|
+
import { http } from "cloudly-http";
|
|
3
|
+
import { Account } from "../../Account";
|
|
4
|
+
export declare class Charge {
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: http.Client);
|
|
7
|
+
create(account: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error>;
|
|
8
|
+
remove(account: string, id: string): Promise<Account.Charge | gracely.Error>;
|
|
9
|
+
replace(account: string, id: string, charge: Account.Charge.Creatable): Promise<Account.Charge | gracely.Error>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class Charge {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
async create(account, charge) {
|
|
7
|
+
return this.client.post(`/account/${account}/charge`, charge);
|
|
8
|
+
}
|
|
9
|
+
async remove(account, id) {
|
|
10
|
+
return this.client.delete(`/account/${account}/charge/${id}`);
|
|
11
|
+
}
|
|
12
|
+
async replace(account, id, charge) {
|
|
13
|
+
return this.client.put(`/account/${account}/charge/${id}`, charge);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=Charge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Charge.js","sourceRoot":"","sources":["../../../../Client/Accounts/Charge.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,MAAM;IACW;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,MAAgC;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAiB,YAAY,OAAO,SAAS,EAAE,MAAM,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,EAAU;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAiB,YAAY,OAAO,WAAW,EAAE,EAAE,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,OAAO,CACZ,OAAe,EACf,EAAU,EACV,MAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiB,YAAY,OAAO,WAAW,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;IACnF,CAAC;CACD"}
|
|
@@ -2,6 +2,7 @@ import { gracely } from "gracely";
|
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
3
|
import { Account } from "../../Account";
|
|
4
4
|
import { Buffer } from "./Buffer";
|
|
5
|
+
import { Charge } from "./Charge";
|
|
5
6
|
import { Counterparts } from "./Counterparts";
|
|
6
7
|
import { Details } from "./Details";
|
|
7
8
|
import { History } from "./History";
|
|
@@ -10,6 +11,7 @@ import { Status } from "./Status";
|
|
|
10
11
|
export declare class Accounts {
|
|
11
12
|
private readonly client;
|
|
12
13
|
readonly buffer: Buffer;
|
|
14
|
+
readonly charge: Charge;
|
|
13
15
|
readonly details: Details;
|
|
14
16
|
readonly rules: Rules;
|
|
15
17
|
readonly status: Status;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Buffer } from "./Buffer";
|
|
2
|
+
import { Charge } from "./Charge";
|
|
2
3
|
import { Counterparts } from "./Counterparts";
|
|
3
4
|
import { Details } from "./Details";
|
|
4
5
|
import { History } from "./History";
|
|
@@ -7,6 +8,7 @@ import { Status } from "./Status";
|
|
|
7
8
|
export class Accounts {
|
|
8
9
|
client;
|
|
9
10
|
buffer;
|
|
11
|
+
charge;
|
|
10
12
|
details;
|
|
11
13
|
rules;
|
|
12
14
|
status;
|
|
@@ -15,6 +17,7 @@ export class Accounts {
|
|
|
15
17
|
constructor(client) {
|
|
16
18
|
this.client = client;
|
|
17
19
|
this.buffer = new Buffer(this.client);
|
|
20
|
+
this.charge = new Charge(this.client);
|
|
18
21
|
this.details = new Details(this.client);
|
|
19
22
|
this.rules = new Rules(this.client);
|
|
20
23
|
this.status = new Status(this.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,OAAO,QAAQ;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,OAAO,QAAQ;IAQS;IAPpB,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,OAAO,CAAS;IAChB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACd,YAAY,CAAc;IAC1B,OAAO,CAAS;IACzB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrC,I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