@pax2pay/client 0.9.20 → 0.9.21
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.
|
@@ -8,10 +8,13 @@ export class Configuration {
|
|
|
8
8
|
static create(connection: Connection) {
|
|
9
9
|
return new Configuration(connection)
|
|
10
10
|
}
|
|
11
|
-
async
|
|
12
|
-
|
|
11
|
+
async getAvailableCurrencies(
|
|
12
|
+
providerCode: ProviderCode[] | ProviderCode = "modulr"
|
|
13
|
+
): Promise<Currency[] | model.ErrorResponse> {
|
|
14
|
+
const provider = Array.isArray(providerCode) ? providerCode.join(",") : providerCode
|
|
15
|
+
return await this.connection.get<Currency[]>(`${this.folder}/currencies`, { provider: provider })
|
|
13
16
|
}
|
|
14
|
-
async
|
|
17
|
+
async getAllCurrencies() {
|
|
15
18
|
return await this.connection.get<Currency[]>(`${this.folder}/currencies/all`)
|
|
16
19
|
}
|
|
17
20
|
async getOrganisation(code?: string): Promise<model.Config.Organisation | model.ErrorResponse> {
|
|
@@ -7,8 +7,8 @@ export declare class Configuration {
|
|
|
7
7
|
protected readonly folder = "config";
|
|
8
8
|
constructor(connection: Connection);
|
|
9
9
|
static create(connection: Connection): Configuration;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
getAvailableCurrencies(providerCode?: ProviderCode[] | ProviderCode): Promise<Currency[] | model.ErrorResponse>;
|
|
11
|
+
getAllCurrencies(): Promise<("BTN" | "MKD" | "CHE" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL")[] | (model.ErrorResponse & {
|
|
12
12
|
status?: number;
|
|
13
13
|
value?: string;
|
|
14
14
|
})>;
|
|
@@ -6,10 +6,11 @@ export class Configuration {
|
|
|
6
6
|
static create(connection) {
|
|
7
7
|
return new Configuration(connection);
|
|
8
8
|
}
|
|
9
|
-
async
|
|
10
|
-
|
|
9
|
+
async getAvailableCurrencies(providerCode = "modulr") {
|
|
10
|
+
const provider = Array.isArray(providerCode) ? providerCode.join(",") : providerCode;
|
|
11
|
+
return await this.connection.get(`${this.folder}/currencies`, { provider: provider });
|
|
11
12
|
}
|
|
12
|
-
async
|
|
13
|
+
async getAllCurrencies() {
|
|
13
14
|
return await this.connection.get(`${this.folder}/currencies/all`);
|
|
14
15
|
}
|
|
15
16
|
async getOrganisation(code) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Configuration/index.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,aAAa;IAEzB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QADhC,WAAM,GAAG,QAAQ,CAAA;IACkB,CAAC;IACvD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,CAAA;IACrC,CAAC;IACD,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Configuration/index.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,aAAa;IAEzB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QADhC,WAAM,GAAG,QAAQ,CAAA;IACkB,CAAC;IACvD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,CAAA;IACrC,CAAC;IACD,KAAK,CAAC,sBAAsB,CAC3B,eAA8C,QAAQ;QAEtD,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAA;QACpF,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,GAAG,IAAI,CAAC,MAAM,aAAa,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAA;IAClG,CAAC;IACD,KAAK,CAAC,gBAAgB;QACrB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,GAA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