@pax2pay/client 0.5.1 → 0.5.2
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/Merchants/index.ts +3 -0
- package/dist/Client/Merchants/index.d.ts +3 -0
- package/dist/Client/Merchants/index.js +3 -0
- package/dist/Client/Merchants/index.js.map +1 -1
- package/dist/model/MerchantResponse.d.ts +1 -1
- package/dist/model/MerchantResponse.js +1 -1
- package/dist/model/MerchantResponse.js.map +1 -1
- package/dist/model/SummaryMerchantResponse.d.ts +1 -1
- package/dist/model/SummaryMerchantResponse.js +1 -1
- package/dist/model/SummaryMerchantResponse.js.map +1 -1
- package/model/MerchantResponse.ts +2 -2
- package/model/SummaryMerchantResponse.ts +2 -2
- package/package.json +1 -1
|
@@ -14,6 +14,9 @@ export class Merchants extends List<model.MerchantResponse> {
|
|
|
14
14
|
async create(request: model.MerchantRequest) {
|
|
15
15
|
return await this.connection.post<model.MerchantResponse>(this.folder, request)
|
|
16
16
|
}
|
|
17
|
+
async delete(merchantId: string) {
|
|
18
|
+
return await this.connection.remove<model.MerchantResponse>(`${this.folder}/${merchantId}`)
|
|
19
|
+
}
|
|
17
20
|
async searchByName(searchString: string) {
|
|
18
21
|
const response = await this.connection.get<model.ErrorResponse | model.MerchantResponse[]>(
|
|
19
22
|
`${this.folder}/searches/${searchString}`,
|
|
@@ -9,6 +9,9 @@ export declare class Merchants extends List<model.MerchantResponse> {
|
|
|
9
9
|
create(request: model.MerchantRequest): Promise<model.MerchantResponse | (model.ErrorResponse & {
|
|
10
10
|
status: 400 | 404 | 500 | 403 | 503;
|
|
11
11
|
})>;
|
|
12
|
+
delete(merchantId: string): Promise<model.MerchantResponse | (model.ErrorResponse & {
|
|
13
|
+
status: 400 | 404 | 500 | 403 | 503;
|
|
14
|
+
})>;
|
|
12
15
|
searchByName(searchString: string): Promise<model.ErrorResponse | model.MerchantResponse[]>;
|
|
13
16
|
getMerchant(value: string): Promise<model.MerchantResponse | model.ErrorResponse | (model.ErrorResponse & {
|
|
14
17
|
status: 400 | 404 | 500 | 403 | 503;
|
|
@@ -10,6 +10,9 @@ export class Merchants extends List {
|
|
|
10
10
|
async create(request) {
|
|
11
11
|
return await this.connection.post(this.folder, request);
|
|
12
12
|
}
|
|
13
|
+
async delete(merchantId) {
|
|
14
|
+
return await this.connection.remove(`${this.folder}/${merchantId}`);
|
|
15
|
+
}
|
|
13
16
|
async searchByName(searchString) {
|
|
14
17
|
const response = await this.connection.get(`${this.folder}/searches/${searchString}`, {
|
|
15
18
|
page: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Merchants/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAG9B,MAAM,OAAO,SAAU,SAAQ,IAA4B;IAE1D,YAAY,UAAsB;QACjC,KAAK,CAAC,UAAU,CAAC,CAAA;QAFC,WAAM,GAAG,WAAW,CAAA;IAGvC,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,SAAS,CAAC,UAAU,CAAC,CAAA;IACjC,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAA8B;QAC1C,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAyB,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChF,CAAC;IACD,KAAK,CAAC,YAAY,CAAC,YAAoB;QACtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CACzC,GAAG,IAAI,CAAC,MAAM,aAAa,YAAY,EAAE,EACzC;YACC,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,IAAI;SACV,CACD,CAAA;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAA;IACtC,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,KAAa;QAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,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,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAA;IACtC,CAAC;CACD"}
|
|
@@ -3,7 +3,7 @@ import { BeneficiaryResponse } from "./BeneficiaryResponse";
|
|
|
3
3
|
import { MerchantType } from "./MerchantType";
|
|
4
4
|
export interface MerchantResponse {
|
|
5
5
|
id?: string;
|
|
6
|
-
name
|
|
6
|
+
name?: string;
|
|
7
7
|
mcc?: string;
|
|
8
8
|
type?: MerchantType;
|
|
9
9
|
isSuitableForCardMerchantRestriction?: true;
|
|
@@ -6,7 +6,7 @@ export var MerchantResponse;
|
|
|
6
6
|
(function (MerchantResponse) {
|
|
7
7
|
MerchantResponse.type = isly.object({
|
|
8
8
|
id: isly.string().optional(),
|
|
9
|
-
name: isly.string(),
|
|
9
|
+
name: isly.string().optional(),
|
|
10
10
|
mcc: isly.string().optional(),
|
|
11
11
|
type: MerchantType.type.optional(),
|
|
12
12
|
isSuitableForCardMerchantRestriction: isly.boolean(true).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MerchantResponse.js","sourceRoot":"../","sources":["model/MerchantResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAW7C,MAAM,KAAW,gBAAgB,CAYhC;AAZD,WAAiB,gBAAgB;IACnB,qBAAI,GAAG,IAAI,CAAC,MAAM,CAAmB;QACjD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"MerchantResponse.js","sourceRoot":"../","sources":["model/MerchantResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAW7C,MAAM,KAAW,gBAAgB,CAYhC;AAZD,WAAiB,gBAAgB;IACnB,qBAAI,GAAG,IAAI,CAAC,MAAM,CAAmB;QACjD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;QAClC,oCAAoC,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QACnE,aAAa,EAAE,IAAI;aACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;aACxG,QAAQ,EAAE;KACZ,CAAC,CAAA;IACW,mBAAE,GAAG,iBAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAZgB,gBAAgB,KAAhB,gBAAgB,QAYhC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
2
|
export var SummaryMerchantResponse;
|
|
3
3
|
(function (SummaryMerchantResponse) {
|
|
4
|
-
SummaryMerchantResponse.type = isly.object({ name: isly.string() });
|
|
4
|
+
SummaryMerchantResponse.type = isly.object({ name: isly.string().optional() });
|
|
5
5
|
SummaryMerchantResponse.is = SummaryMerchantResponse.type.is;
|
|
6
6
|
})(SummaryMerchantResponse || (SummaryMerchantResponse = {}));
|
|
7
7
|
//# sourceMappingURL=SummaryMerchantResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryMerchantResponse.js","sourceRoot":"../","sources":["model/SummaryMerchantResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAK3B,MAAM,KAAW,uBAAuB,CAGvC;AAHD,WAAiB,uBAAuB;IAC1B,4BAAI,GAAG,IAAI,CAAC,MAAM,CAA0B,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"SummaryMerchantResponse.js","sourceRoot":"../","sources":["model/SummaryMerchantResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAK3B,MAAM,KAAW,uBAAuB,CAGvC;AAHD,WAAiB,uBAAuB;IAC1B,4BAAI,GAAG,IAAI,CAAC,MAAM,CAA0B,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IAC/E,0BAAE,GAAG,wBAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAHgB,uBAAuB,KAAvB,uBAAuB,QAGvC"}
|
|
@@ -5,7 +5,7 @@ import { MerchantType } from "./MerchantType"
|
|
|
5
5
|
|
|
6
6
|
export interface MerchantResponse {
|
|
7
7
|
id?: string
|
|
8
|
-
name
|
|
8
|
+
name?: string
|
|
9
9
|
mcc?: string
|
|
10
10
|
type?: MerchantType
|
|
11
11
|
isSuitableForCardMerchantRestriction?: true
|
|
@@ -15,7 +15,7 @@ export interface MerchantResponse {
|
|
|
15
15
|
export namespace MerchantResponse {
|
|
16
16
|
export const type = isly.object<MerchantResponse>({
|
|
17
17
|
id: isly.string().optional(),
|
|
18
|
-
name: isly.string(),
|
|
18
|
+
name: isly.string().optional(),
|
|
19
19
|
mcc: isly.string().optional(),
|
|
20
20
|
type: MerchantType.type.optional(),
|
|
21
21
|
isSuitableForCardMerchantRestriction: isly.boolean(true).optional(),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
2
|
|
|
3
3
|
export interface SummaryMerchantResponse {
|
|
4
|
-
name
|
|
4
|
+
name?: string
|
|
5
5
|
}
|
|
6
6
|
export namespace SummaryMerchantResponse {
|
|
7
|
-
export const type = isly.object<SummaryMerchantResponse>({ name: isly.string() })
|
|
7
|
+
export const type = isly.object<SummaryMerchantResponse>({ name: isly.string().optional() })
|
|
8
8
|
export const is = type.is
|
|
9
9
|
}
|