mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-10 08:01:20 +00:00
Merge pull request #14 from Adyen/hotfix/release-script
adds script to publish to npm
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,10 +1,8 @@
|
||||
.src/main/test
|
||||
.vagrant
|
||||
Vagrantfile
|
||||
build
|
||||
node_modules
|
||||
.idea
|
||||
dist
|
||||
.DS_Store
|
||||
.bash_history
|
||||
.config/
|
||||
|
||||
6
dist/lib-esm/apiKeyAuthenticatedService.d.ts
vendored
Normal file
6
dist/lib-esm/apiKeyAuthenticatedService.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Client from "./client";
|
||||
import Service from "./service";
|
||||
declare class ApiKeyAuthenticatedService extends Service {
|
||||
protected constructor(client: Client);
|
||||
}
|
||||
export default ApiKeyAuthenticatedService;
|
||||
25
dist/lib-esm/apiKeyAuthenticatedService.js
vendored
Normal file
25
dist/lib-esm/apiKeyAuthenticatedService.js
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Service from "./service";
|
||||
var ApiKeyAuthenticatedService = /** @class */ (function (_super) {
|
||||
__extends(ApiKeyAuthenticatedService, _super);
|
||||
function ApiKeyAuthenticatedService(client) {
|
||||
var _this = _super.call(this, client) || this;
|
||||
_this.apiKeyRequired = true;
|
||||
return _this;
|
||||
}
|
||||
return ApiKeyAuthenticatedService;
|
||||
}(Service));
|
||||
export default ApiKeyAuthenticatedService;
|
||||
//# sourceMappingURL=apiKeyAuthenticatedService.js.map
|
||||
1
dist/lib-esm/apiKeyAuthenticatedService.js.map
vendored
Normal file
1
dist/lib-esm/apiKeyAuthenticatedService.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"apiKeyAuthenticatedService.js","sourceRoot":"","sources":["../../src/apiKeyAuthenticatedService.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAqBA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC;IAAyC,8CAAO;IAC5C,oCAAsB,MAAc;QAApC,YACI,kBAAM,MAAM,CAAC,SAEhB;QADG,KAAI,CAAC,cAAc,GAAG,IAAI,CAAC;;IAC/B,CAAC;IACL,iCAAC;AAAD,CAAC,AALD,CAAyC,OAAO,GAK/C;AAED,eAAe,0BAA0B,CAAC"}
|
||||
79
dist/lib-esm/client.d.ts
vendored
Normal file
79
dist/lib-esm/client.d.ts
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import Config from "./config";
|
||||
import ClientInterface from "./httpClient/clientInterface";
|
||||
import { Environment } from "./typings/enums/environment";
|
||||
declare type ClientParametersOverload = {
|
||||
config: Config;
|
||||
} | {
|
||||
config: Config;
|
||||
httpClient: ClientInterface;
|
||||
} | {
|
||||
username: string;
|
||||
password: string;
|
||||
environment: Environment;
|
||||
applicationName: string;
|
||||
} | {
|
||||
username: string;
|
||||
password: string;
|
||||
environment: Environment;
|
||||
applicationName: string;
|
||||
httpClient: ClientInterface;
|
||||
} | {
|
||||
username: string;
|
||||
password: string;
|
||||
environment: Environment;
|
||||
applicationName: string;
|
||||
liveEndpointUrlPrefix: string;
|
||||
} | {
|
||||
username: string;
|
||||
password: string;
|
||||
environment: Environment;
|
||||
applicationName: string;
|
||||
liveEndpointUrlPrefix: string;
|
||||
httpClient: ClientInterface;
|
||||
} | {
|
||||
apiKey: string;
|
||||
environment: Environment;
|
||||
} | {
|
||||
apiKey: string;
|
||||
environment: Environment;
|
||||
httpClient: ClientInterface;
|
||||
} | {
|
||||
apiKey: string;
|
||||
environment: Environment;
|
||||
liveEndpointUrlPrefix: string;
|
||||
httpClient: ClientInterface;
|
||||
};
|
||||
declare class Client {
|
||||
static ENDPOINT_TEST: string;
|
||||
static ENDPOINT_LIVE: string;
|
||||
static ENDPOINT_LIVE_SUFFIX: string;
|
||||
static HPP_TEST: string;
|
||||
static HPP_LIVE: string;
|
||||
static MARKETPAY_ENDPOINT_TEST: string;
|
||||
static MARKETPAY_ENDPOINT_LIVE: string;
|
||||
static API_VERSION: string;
|
||||
static RECURRING_API_VERSION: string;
|
||||
static MARKETPAY_ACCOUNT_API_VERSION: string;
|
||||
static MARKETPAY_FUND_API_VERSION: string;
|
||||
static MARKETPAY_NOTIFICATION_API_VERSION: string;
|
||||
static LIB_NAME: string;
|
||||
static LIB_VERSION: string;
|
||||
static CHECKOUT_ENDPOINT_TEST: string;
|
||||
static CHECKOUT_ENDPOINT_LIVE_SUFFIX: string;
|
||||
static CHECKOUT_API_VERSION: string;
|
||||
static BIN_LOOKUP_PAL_SUFFIX: string;
|
||||
static BIN_LOOKUP_API_VERSION: string;
|
||||
static CHECKOUT_UTILITY_API_VERSION: string;
|
||||
static TERMINAL_API_ENDPOINT_TEST: string;
|
||||
static TERMINAL_API_ENDPOINT_LIVE: string;
|
||||
static ENDPOINT_PROTOCOL: string;
|
||||
private _httpClient;
|
||||
private _config;
|
||||
constructor(clientParameters: ClientParametersOverload);
|
||||
setEnvironment(environment: Environment, liveEndpointUrlPrefix?: string): void;
|
||||
httpClient: ClientInterface;
|
||||
config: Config;
|
||||
setApplicationName(applicationName: string): void;
|
||||
setTimeouts(connectionTimeoutMillis: number, readTimeoutMillis: number): void;
|
||||
}
|
||||
export default Client;
|
||||
127
dist/lib-esm/client.js
vendored
Normal file
127
dist/lib-esm/client.js
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import Config from "./config";
|
||||
import HttpURLConnectionClient from "./httpClient/httpURLConnectionClient";
|
||||
var Client = /** @class */ (function () {
|
||||
function Client(options) {
|
||||
if (options.config) {
|
||||
this._config = options.config;
|
||||
}
|
||||
else {
|
||||
this._config = new Config();
|
||||
}
|
||||
if (options.environment) {
|
||||
this.setEnvironment(options.environment, options.liveEndpointUrlPrefix);
|
||||
if (options.username && options.password && options.applicationName) {
|
||||
this._config.username = options.username;
|
||||
this._config.password = options.password;
|
||||
this._config.applicationName = options.applicationName;
|
||||
}
|
||||
if (options.apiKey) {
|
||||
this._config.apiKey = options.apiKey;
|
||||
}
|
||||
}
|
||||
if (options.httpClient) {
|
||||
this._httpClient = options.httpClient;
|
||||
}
|
||||
}
|
||||
Client.prototype.setEnvironment = function (environment, liveEndpointUrlPrefix) {
|
||||
this._config.environment = environment;
|
||||
if (environment === "TEST") {
|
||||
this._config.endpoint = Client.ENDPOINT_TEST;
|
||||
this._config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_TEST;
|
||||
this._config.hppEndpoint = Client.HPP_TEST;
|
||||
this._config.checkoutEndpoint = Client.CHECKOUT_ENDPOINT_TEST;
|
||||
this._config.terminalApiCloudEndpoint = Client.TERMINAL_API_ENDPOINT_TEST;
|
||||
}
|
||||
else if (environment === "LIVE") {
|
||||
this._config.endpoint = Client.ENDPOINT_LIVE;
|
||||
this._config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_LIVE;
|
||||
this._config.hppEndpoint = Client.HPP_LIVE;
|
||||
if (liveEndpointUrlPrefix) {
|
||||
this._config.endpoint =
|
||||
"" + Client.ENDPOINT_PROTOCOL + liveEndpointUrlPrefix + Client.ENDPOINT_LIVE_SUFFIX;
|
||||
this._config.checkoutEndpoint =
|
||||
"" + Client.ENDPOINT_PROTOCOL + liveEndpointUrlPrefix + Client.CHECKOUT_ENDPOINT_LIVE_SUFFIX;
|
||||
}
|
||||
else {
|
||||
this._config.endpoint = Client.ENDPOINT_LIVE;
|
||||
this._config.checkoutEndpoint = undefined;
|
||||
}
|
||||
}
|
||||
};
|
||||
Object.defineProperty(Client.prototype, "httpClient", {
|
||||
get: function () {
|
||||
if (!this._httpClient) {
|
||||
this._httpClient = new HttpURLConnectionClient();
|
||||
}
|
||||
return this._httpClient;
|
||||
},
|
||||
set: function (httpClient) {
|
||||
this._httpClient = httpClient;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Client.prototype, "config", {
|
||||
get: function () {
|
||||
return this._config;
|
||||
},
|
||||
set: function (config) {
|
||||
this._config = config;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Client.prototype.setApplicationName = function (applicationName) {
|
||||
this.config.applicationName = applicationName;
|
||||
};
|
||||
Client.prototype.setTimeouts = function (connectionTimeoutMillis, readTimeoutMillis) {
|
||||
this.config.connectionTimeoutMillis = connectionTimeoutMillis;
|
||||
this.config.readTimeoutMillis = readTimeoutMillis;
|
||||
};
|
||||
Client.ENDPOINT_TEST = "https://pal-test.adyen.com";
|
||||
Client.ENDPOINT_LIVE = "https://pal-live.adyen.com";
|
||||
Client.ENDPOINT_LIVE_SUFFIX = "-pal-live.adyenpayments.com";
|
||||
Client.HPP_TEST = "https://test.adyen.com/hpp";
|
||||
Client.HPP_LIVE = "https://live.adyen.com/hpp";
|
||||
Client.MARKETPAY_ENDPOINT_TEST = "https://cal-test.adyen.com/cal/services";
|
||||
Client.MARKETPAY_ENDPOINT_LIVE = "https://cal-live.adyen.com/cal/services";
|
||||
Client.API_VERSION = "v49";
|
||||
Client.RECURRING_API_VERSION = "v30";
|
||||
Client.MARKETPAY_ACCOUNT_API_VERSION = "v4";
|
||||
Client.MARKETPAY_FUND_API_VERSION = "v3";
|
||||
Client.MARKETPAY_NOTIFICATION_API_VERSION = "v1";
|
||||
Client.LIB_NAME = "adyen-node-api-library";
|
||||
Client.LIB_VERSION = "1.0.0";
|
||||
Client.CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com/checkout";
|
||||
Client.CHECKOUT_ENDPOINT_LIVE_SUFFIX = "-checkout-live.adyenpayments.com/checkout";
|
||||
Client.CHECKOUT_API_VERSION = "v49";
|
||||
Client.BIN_LOOKUP_PAL_SUFFIX = "/pal/servlet/BinLookup/";
|
||||
Client.BIN_LOOKUP_API_VERSION = "v40";
|
||||
Client.CHECKOUT_UTILITY_API_VERSION = "v1";
|
||||
Client.TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com";
|
||||
Client.TERMINAL_API_ENDPOINT_LIVE = "https://terminal-api-live.adyen.com";
|
||||
Client.ENDPOINT_PROTOCOL = "https://";
|
||||
return Client;
|
||||
}());
|
||||
export default Client;
|
||||
//# sourceMappingURL=client.js.map
|
||||
1
dist/lib-esm/client.js.map
vendored
Normal file
1
dist/lib-esm/client.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,uBAAuB,MAAM,sCAAsC,CAAC;AAyB3E;IA6BI,gBAAmB,OAAyB;QACxC,IAAI,OAAO,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,C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;QACzE,IAAI,CAAC,MAAM,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QAC9D,IAAI,CAAC,MAAM,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IACtD,CAAC;IAxGa,oBAAa,GAAW,4BAA4B,CAAC;IACrD,oBAAa,GAAW,4BAA4B,CAAC;IACrD,2BAAoB,GAAW,6BAA6B,CAAC;IAC7D,eAAQ,GAAW,4BAA4B,CAAC;IAChD,eAAQ,GAAW,4BAA4B,CAAC;IAChD,8BAAuB,GAAW,yCAAyC,CAAC;IAC5E,8BAAuB,GAAW,yCAAyC,CAAC;IAC5E,kBAAW,GAAW,KAAK,CAAC;IAC5B,4BAAqB,GAAW,KAAK,CAAC;IACtC,oCAA6B,GAAW,IAAI,CAAC;IAC7C,iCAA0B,GAAW,IAAI,CAAC;IAC1C,yCAAkC,GAAW,IAAI,CAAC;IAClD,eAAQ,GAAW,wBAAwB,CAAC;IAC5C,kBAAW,GAAW,OAAO,CAAC;IAC9B,6BAAsB,GAAW,0CAA0C,CAAC;IAC5E,oCAA6B,GAAW,2CAA2C,CAAC;IACpF,2BAAoB,GAAW,KAAK,CAAC;IACrC,4BAAqB,GAAG,yBAAyB,CAAC;IAClD,6BAAsB,GAAG,KAAK,CAAC;IAC/B,mCAA4B,GAAW,IAAI,CAAC;IAC5C,iCAA0B,GAAW,qCAAqC,CAAC;IAC3E,iCAA0B,GAAW,qCAAqC,CAAC;IAC3E,wBAAiB,GAAW,UAAU,CAAC;IAmFzD,aAAC;CAAA,AA1GD,IA0GC;AAED,eAAe,MAAM,CAAC"}
|
||||
58
dist/lib-esm/config.d.ts
vendored
Normal file
58
dist/lib-esm/config.d.ts
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
import { Environment } from "./typings/enums/environment";
|
||||
interface ConfigConstructor {
|
||||
username?: string;
|
||||
password?: string;
|
||||
merchantAccount?: string;
|
||||
environment?: Environment;
|
||||
endpoint?: string;
|
||||
marketPayEndpoint?: string;
|
||||
applicationName?: string;
|
||||
apiKey?: string;
|
||||
connectionTimeoutMillis?: number;
|
||||
readTimeoutMillis?: number;
|
||||
certificatePath?: string;
|
||||
hppEndpoint?: string;
|
||||
skinCode?: string;
|
||||
hmacKey?: string;
|
||||
checkoutEndpoint?: string;
|
||||
terminalApiCloudEndpoint?: string;
|
||||
terminalApiLocalEndpoint?: string;
|
||||
}
|
||||
declare class Config {
|
||||
protected _username: string;
|
||||
protected _password: string;
|
||||
protected _merchantAccount: string;
|
||||
protected _environment: Environment;
|
||||
protected _endpoint: string;
|
||||
protected _marketPayEndpoint: string;
|
||||
protected _applicationName: string;
|
||||
protected _apiKey: string;
|
||||
protected _connectionTimeoutMillis: number;
|
||||
protected _readTimeoutMillis: number;
|
||||
protected _certificatePath: string;
|
||||
protected _hppEndpoint: string;
|
||||
protected _skinCode: string;
|
||||
protected _hmacKey: string;
|
||||
protected _checkoutEndpoint: string;
|
||||
protected _terminalApiCloudEndpoint: string;
|
||||
protected _terminalApiLocalEndpoint: string;
|
||||
constructor(options?: ConfigConstructor);
|
||||
username: string;
|
||||
password: string;
|
||||
merchantAccount: string;
|
||||
environment: Environment;
|
||||
endpoint: string;
|
||||
marketPayEndpoint: string;
|
||||
applicationName: string;
|
||||
apiKey: string;
|
||||
hppEndpoint: string;
|
||||
skinCode: string;
|
||||
hmacKey: string;
|
||||
checkoutEndpoint: string;
|
||||
terminalApiCloudEndpoint: string;
|
||||
terminalApiLocalEndpoint: string;
|
||||
connectionTimeoutMillis: number;
|
||||
readTimeoutMillis: number;
|
||||
certificatePath: string;
|
||||
}
|
||||
export default Config;
|
||||
199
dist/lib-esm/config.js
vendored
Normal file
199
dist/lib-esm/config.js
vendored
Normal file
@@ -0,0 +1,199 @@
|
||||
var Config = /** @class */ (function () {
|
||||
function Config(options) {
|
||||
if (options === void 0) { options = {}; }
|
||||
this._username = options.username;
|
||||
this._password = options.password;
|
||||
this._merchantAccount = options.merchantAccount;
|
||||
this._environment = options.environment;
|
||||
this._endpoint = options.endpoint;
|
||||
this._marketPayEndpoint = options.marketPayEndpoint;
|
||||
this._applicationName = options.applicationName;
|
||||
this._apiKey = options.apiKey;
|
||||
this._connectionTimeoutMillis = options.connectionTimeoutMillis || 30000;
|
||||
this._readTimeoutMillis = options.readTimeoutMillis || 3000;
|
||||
this._certificatePath = options.certificatePath;
|
||||
this._hppEndpoint = options.hppEndpoint;
|
||||
this._skinCode = options.skinCode;
|
||||
this._hmacKey = options.hmacKey;
|
||||
this._checkoutEndpoint = options.checkoutEndpoint;
|
||||
this._terminalApiCloudEndpoint = options.terminalApiCloudEndpoint;
|
||||
this._terminalApiLocalEndpoint = options.terminalApiLocalEndpoint;
|
||||
}
|
||||
Object.defineProperty(Config.prototype, "username", {
|
||||
get: function () {
|
||||
return this._username;
|
||||
},
|
||||
set: function (username) {
|
||||
this._username = username;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "password", {
|
||||
get: function () {
|
||||
return this._password;
|
||||
},
|
||||
set: function (password) {
|
||||
this._password = password;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "merchantAccount", {
|
||||
get: function () {
|
||||
return this._merchantAccount;
|
||||
},
|
||||
set: function (merchantAccount) {
|
||||
this._merchantAccount = merchantAccount;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "environment", {
|
||||
get: function () {
|
||||
return this._environment;
|
||||
},
|
||||
set: function (environment) {
|
||||
this._environment = environment;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "endpoint", {
|
||||
get: function () {
|
||||
return this._endpoint;
|
||||
},
|
||||
set: function (endpoint) {
|
||||
this._endpoint = endpoint;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "marketPayEndpoint", {
|
||||
get: function () {
|
||||
return this._marketPayEndpoint;
|
||||
},
|
||||
set: function (marketPayEndpoint) {
|
||||
this._marketPayEndpoint = marketPayEndpoint;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "applicationName", {
|
||||
get: function () {
|
||||
return this._applicationName;
|
||||
},
|
||||
set: function (applicationName) {
|
||||
this._applicationName = applicationName;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "apiKey", {
|
||||
get: function () {
|
||||
return this._apiKey;
|
||||
},
|
||||
set: function (apiKey) {
|
||||
this._apiKey = apiKey;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "hppEndpoint", {
|
||||
get: function () {
|
||||
return this._hppEndpoint;
|
||||
},
|
||||
set: function (hppEndpoint) {
|
||||
this._hppEndpoint = hppEndpoint;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "skinCode", {
|
||||
get: function () {
|
||||
return this._skinCode;
|
||||
},
|
||||
set: function (skinCode) {
|
||||
this._skinCode = skinCode;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "hmacKey", {
|
||||
get: function () {
|
||||
return this._hmacKey;
|
||||
},
|
||||
set: function (hmacKey) {
|
||||
this._hmacKey = hmacKey;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "checkoutEndpoint", {
|
||||
get: function () {
|
||||
if (!this._checkoutEndpoint) {
|
||||
var message = "Please provide your unique live url prefix on the setEnvironment() call on the Client or provide checkoutEndpoint in your config object.";
|
||||
throw new Error(message);
|
||||
}
|
||||
return this._checkoutEndpoint;
|
||||
},
|
||||
set: function (checkoutEndpoint) {
|
||||
this._checkoutEndpoint = checkoutEndpoint;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "terminalApiCloudEndpoint", {
|
||||
get: function () {
|
||||
return this._terminalApiCloudEndpoint;
|
||||
},
|
||||
set: function (terminalApiCloudEndpoint) {
|
||||
this._terminalApiCloudEndpoint = terminalApiCloudEndpoint;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "terminalApiLocalEndpoint", {
|
||||
get: function () {
|
||||
return this._terminalApiLocalEndpoint;
|
||||
},
|
||||
set: function (terminalApiLocalEndpoint) {
|
||||
this._terminalApiLocalEndpoint = terminalApiLocalEndpoint;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "connectionTimeoutMillis", {
|
||||
get: function () {
|
||||
return this._connectionTimeoutMillis;
|
||||
},
|
||||
set: function (connectionTimeoutMillis) {
|
||||
this._connectionTimeoutMillis = connectionTimeoutMillis;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "readTimeoutMillis", {
|
||||
get: function () {
|
||||
return this._readTimeoutMillis;
|
||||
},
|
||||
set: function (readTimeoutMillis) {
|
||||
this._readTimeoutMillis = readTimeoutMillis;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Config.prototype, "certificatePath", {
|
||||
get: function () {
|
||||
return this._certificatePath;
|
||||
},
|
||||
set: function (certificatePath) {
|
||||
this._certificatePath = certificatePath;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return Config;
|
||||
}());
|
||||
export default Config;
|
||||
//# sourceMappingURL=config.js.map
|
||||
1
dist/lib-esm/config.js.map
vendored
Normal file
1
dist/lib-esm/config.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[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I,CAAC,kBAAkB,CAAC;QACnC,CAAC;aAED,UAA6B,iBAAyB;YAClD,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;QAChD,CAAC;;;OAJA;IAMD,sBAAW,mCAAe;aAI1B;YACI,OAAO,IAAI,CAAC,gBAAgB,CAAC;QACjC,CAAC;aAND,UAA2B,eAAuB;YAC9C,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;QAC5C,CAAC;;;OAAA;IAKL,aAAC;AAAD,CAAC,AArLD,IAqLC;AAED,eAAe,MAAM,CAAC"}
|
||||
5
dist/lib-esm/helpers/getJsonResponse.d.ts
vendored
Normal file
5
dist/lib-esm/helpers/getJsonResponse.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import Resource from "../service/resource";
|
||||
import { RequestOptions } from "../typings/requestOptions";
|
||||
declare function getJsonResponse<T>(resource: Resource, jsonRequest: T | string, requestOptions?: RequestOptions): Promise<string>;
|
||||
declare function getJsonResponse<T, R>(resource: Resource, jsonRequest: T | string, requestOptions?: RequestOptions): Promise<R>;
|
||||
export default getJsonResponse;
|
||||
77
dist/lib-esm/helpers/getJsonResponse.js
vendored
Normal file
77
dist/lib-esm/helpers/getJsonResponse.js
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
function getJsonResponse(resource, jsonRequest, requestOptions) {
|
||||
if (requestOptions === void 0) { requestOptions = {}; }
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var response;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, resource.request(typeof jsonRequest === "string" ? jsonRequest : JSON.stringify(jsonRequest), requestOptions)];
|
||||
case 1:
|
||||
response = _a.sent();
|
||||
try {
|
||||
return [2 /*return*/, JSON.parse(response)];
|
||||
}
|
||||
catch (e) {
|
||||
return [2 /*return*/, response];
|
||||
}
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
export default getJsonResponse;
|
||||
//# sourceMappingURL=getJsonResponse.js.map
|
||||
1
dist/lib-esm/helpers/getJsonResponse.js.map
vendored
Normal file
1
dist/lib-esm/helpers/getJsonResponse.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getJsonResponse.js","sourceRoot":"","sources":["../../../src/helpers/getJsonResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQH,SAAe,eAAe,CAC1B,QAAkB,EAClB,WAAuB,EACvB,cAAmC;IAAnC,+BAAA,EAAA,mBAAmC;;;;;wBAElB,qBAAM,QAAQ,CAAC,OAAO,CACnC,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAC3E,cAAc,CAAC,EAAA;;oBAFb,QAAQ,GAAG,SAEE;oBACnB,IAAI;wBACA,sBAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAC;qBAC/B;oBAAC,OAAO,CAAC,EAAE;wBACR,sBAAO,QAAQ,EAAC;qBACnB;;;;;CACJ;AACD,eAAe,eAAe,CAAC"}
|
||||
10
dist/lib-esm/httpClient/clientInterface.d.ts
vendored
Normal file
10
dist/lib-esm/httpClient/clientInterface.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference types="node" />
|
||||
import Config from "../config";
|
||||
import { RequestOptions } from "../typings/requestOptions";
|
||||
import { AgentOptions } from "https";
|
||||
interface ClientInterface {
|
||||
request(endpoint: string, json: string, config: Config, isApiKeyRequired: boolean, requestOptions?: RequestOptions): Promise<string>;
|
||||
post(endpoint: string, postParameters: [string, string][], config: Config): Promise<string>;
|
||||
proxy?: AgentOptions;
|
||||
}
|
||||
export default ClientInterface;
|
||||
1
dist/lib-esm/httpClient/clientInterface.js
vendored
Normal file
1
dist/lib-esm/httpClient/clientInterface.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
//# sourceMappingURL=clientInterface.js.map
|
||||
1
dist/lib-esm/httpClient/clientInterface.js.map
vendored
Normal file
1
dist/lib-esm/httpClient/clientInterface.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"clientInterface.js","sourceRoot":"","sources":["../../../src/httpClient/clientInterface.ts"],"names":[],"mappings":""}
|
||||
16
dist/lib-esm/httpClient/httpClientException.d.ts
vendored
Normal file
16
dist/lib-esm/httpClient/httpClientException.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingHttpHeaders, IncomingMessage } from "http";
|
||||
declare class HttpClientException implements Error {
|
||||
private _code;
|
||||
private _responseHeaders;
|
||||
private readonly _message;
|
||||
private readonly _name;
|
||||
private _responseBody;
|
||||
constructor(message: string, code?: number, responseHeaders?: IncomingHttpHeaders, responseBody?: IncomingMessage);
|
||||
readonly message: string;
|
||||
readonly name: string;
|
||||
code: number;
|
||||
responseHeaders: IncomingHttpHeaders;
|
||||
responseBody: IncomingMessage;
|
||||
}
|
||||
export default HttpClientException;
|
||||
77
dist/lib-esm/httpClient/httpClientException.js
vendored
Normal file
77
dist/lib-esm/httpClient/httpClientException.js
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var HttpClientException = /** @class */ (function () {
|
||||
function HttpClientException(message, code, responseHeaders, responseBody) {
|
||||
this._code = 0;
|
||||
this._name = "HttpClientException";
|
||||
this._message = message;
|
||||
this._code = code;
|
||||
this._responseHeaders = responseHeaders;
|
||||
this._responseBody = responseBody;
|
||||
}
|
||||
Object.defineProperty(HttpClientException.prototype, "message", {
|
||||
get: function () {
|
||||
return this._message;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(HttpClientException.prototype, "name", {
|
||||
get: function () {
|
||||
return this._name;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(HttpClientException.prototype, "code", {
|
||||
get: function () {
|
||||
return this._code;
|
||||
},
|
||||
set: function (value) {
|
||||
this._code = value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(HttpClientException.prototype, "responseHeaders", {
|
||||
get: function () {
|
||||
return this._responseHeaders;
|
||||
},
|
||||
set: function (value) {
|
||||
this._responseHeaders = value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(HttpClientException.prototype, "responseBody", {
|
||||
get: function () {
|
||||
return this._responseBody;
|
||||
},
|
||||
set: function (value) {
|
||||
this._responseBody = value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return HttpClientException;
|
||||
}());
|
||||
export default HttpClientException;
|
||||
//# sourceMappingURL=httpClientException.js.map
|
||||
1
dist/lib-esm/httpClient/httpClientException.js.map
vendored
Normal file
1
dist/lib-esm/httpClient/httpClientException.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"httpClientException.js","sourceRoot":"","sources":["../../../src/httpClient/httpClientException.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH;IAOI,6BAAmB,OAAe,EAAE,IAAa,EAAE,eAAqC,EAAE,YAA8B;QANhH,UAAK,GAAW,CAAC,CAAC;QAOtB,IAAI,CAAC,KAAK,GAAG,qBAAqB,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACtC,CAAC;IAED,sBAAW,wCAAO;aAAlB;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAED,sBAAW,qCAAI;aAAf;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IAED,sBAAW,qCAAI;aAAf;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;aAED,UAAgB,KAAa;YACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACvB,CAAC;;;OAJA;IAMD,sBAAW,gDAAe;aAA1B;YACI,OAAO,IAAI,CAAC,gBAAgB,CAAC;QACjC,CAAC;aAED,UAA2B,KAA0B;YACjD,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAClC,CAAC;;;OAJA;IAMD,sBAAW,6CAAY;aAAvB;YACI,OAAO,IAAI,CAAC,aAAa,CAAC;QAC9B,CAAC;aAED,UAAwB,KAAsB;YAC1C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC/B,CAAC;;;OAJA;IAKL,0BAAC;AAAD,CAAC,AA9CD,IA8CC;AAED,eAAe,mBAAmB,CAAC"}
|
||||
19
dist/lib-esm/httpClient/httpURLConnectionClient.d.ts
vendored
Normal file
19
dist/lib-esm/httpClient/httpURLConnectionClient.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/// <reference types="node" />
|
||||
import { AgentOptions } from "https";
|
||||
import Config from "../config";
|
||||
import { RequestOptions } from "../typings/requestOptions";
|
||||
import ClientInterface from "./clientInterface";
|
||||
declare class HttpURLConnectionClient implements ClientInterface {
|
||||
private static CHARSET;
|
||||
private _proxy;
|
||||
private agentOptions;
|
||||
request(endpoint: string, json: string, config: Config, isApiRequired: boolean, requestOptions?: RequestOptions): Promise<string>;
|
||||
post(endpoint: string, postParameters: [string, string][], config: Config): Promise<string>;
|
||||
proxy: AgentOptions;
|
||||
private createRequest;
|
||||
private getQuery;
|
||||
private doPostRequest;
|
||||
private static setBasicAuthentication;
|
||||
private installCertificateVerifier;
|
||||
}
|
||||
export default HttpURLConnectionClient;
|
||||
153
dist/lib-esm/httpClient/httpURLConnectionClient.js
vendored
Normal file
153
dist/lib-esm/httpClient/httpURLConnectionClient.js
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
import { Agent, request as httpRequest } from "https";
|
||||
import * as fs from "fs";
|
||||
import { URL } from "url";
|
||||
import Client from "../client";
|
||||
import { ACCEPT_CHARSET, API_KEY, APPLICATION_JSON_TYPE, CONTENT_TYPE, IDEMPOTENCY_KEY, METHOD_POST, USER_AGENT, } from "../typings/constants/apiConstants";
|
||||
import HttpClientException from "./httpClientException";
|
||||
var HttpURLConnectionClient = /** @class */ (function () {
|
||||
function HttpURLConnectionClient() {
|
||||
}
|
||||
HttpURLConnectionClient.prototype.request = function (endpoint, json, config, isApiRequired, requestOptions) {
|
||||
if (requestOptions === void 0) { requestOptions = {}; }
|
||||
requestOptions.headers = {};
|
||||
requestOptions.timeout = config.connectionTimeoutMillis;
|
||||
if (config.certificatePath) {
|
||||
this.installCertificateVerifier(config.certificatePath);
|
||||
}
|
||||
var apiKey = config.apiKey;
|
||||
if (isApiRequired || apiKey) {
|
||||
requestOptions.headers[API_KEY] = apiKey;
|
||||
}
|
||||
else {
|
||||
var authString = config.username + ":" + config.password;
|
||||
var authEncBytes = new Buffer(authString);
|
||||
var authStringEnc = authEncBytes.toString();
|
||||
requestOptions.headers.Authorization = "Basic " + authStringEnc;
|
||||
}
|
||||
requestOptions.headers[CONTENT_TYPE] = APPLICATION_JSON_TYPE;
|
||||
var httpConnection = this.createRequest(endpoint, config.applicationName, requestOptions);
|
||||
return this.doPostRequest(httpConnection, json);
|
||||
};
|
||||
HttpURLConnectionClient.prototype.post = function (endpoint, postParameters, config) {
|
||||
var postQuery = this.getQuery(postParameters);
|
||||
var httpConnection = this.createRequest(endpoint, config.applicationName, {});
|
||||
return this.doPostRequest(httpConnection, postQuery);
|
||||
};
|
||||
Object.defineProperty(HttpURLConnectionClient.prototype, "proxy", {
|
||||
set: function (agentOptions) {
|
||||
this._proxy = agentOptions;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
HttpURLConnectionClient.prototype.createRequest = function (endpoint, applicationName, requestOptions) {
|
||||
var url = new URL(endpoint);
|
||||
requestOptions.hostname = url.hostname;
|
||||
requestOptions.protocol = url.protocol;
|
||||
requestOptions.port = url.port;
|
||||
requestOptions.path = url.pathname;
|
||||
if (this._proxy) {
|
||||
this.agentOptions = __assign({}, this._proxy, this.agentOptions);
|
||||
}
|
||||
if (requestOptions && requestOptions.idempotencyKey) {
|
||||
requestOptions.headers[IDEMPOTENCY_KEY] = requestOptions.idempotencyKey;
|
||||
delete requestOptions.idempotencyKey;
|
||||
}
|
||||
requestOptions.agent = new Agent(this.agentOptions);
|
||||
requestOptions.headers["Cache-Control"] = "no-cache";
|
||||
requestOptions.method = METHOD_POST;
|
||||
requestOptions.headers[ACCEPT_CHARSET] = HttpURLConnectionClient.CHARSET;
|
||||
requestOptions.headers[USER_AGENT] = applicationName + " " + Client.LIB_NAME + "/" + Client.LIB_VERSION;
|
||||
return httpRequest(requestOptions);
|
||||
};
|
||||
HttpURLConnectionClient.prototype.getQuery = function (params) {
|
||||
return params.map(function (_a) {
|
||||
var key = _a[0], value = _a[1];
|
||||
return key + "=" + value;
|
||||
}).join("&");
|
||||
};
|
||||
HttpURLConnectionClient.prototype.doPostRequest = function (httpConnection, json) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
httpConnection.flushHeaders();
|
||||
httpConnection.on("response", function (res) {
|
||||
var resData = "";
|
||||
if (res.statusCode && res.statusCode !== 200) {
|
||||
var exception = new HttpClientException("HTTP Exception: " + res.statusCode + ". " + res.statusMessage, res.statusCode, res.headers, res);
|
||||
reject(exception);
|
||||
}
|
||||
res.on("data", function (data) {
|
||||
resData += data;
|
||||
});
|
||||
res.on("end", function () {
|
||||
if (!res.complete) {
|
||||
reject(new Error("The connection was terminated while the message was still being sent"));
|
||||
}
|
||||
resolve(resData);
|
||||
});
|
||||
res.on("error", reject);
|
||||
});
|
||||
httpConnection.on("timeout", function () {
|
||||
httpConnection.abort();
|
||||
});
|
||||
httpConnection.on("error", reject);
|
||||
httpConnection.write(Buffer.from(json));
|
||||
httpConnection.end();
|
||||
});
|
||||
};
|
||||
HttpURLConnectionClient.setBasicAuthentication = function (httpConnection, username, password) {
|
||||
var authString = username + ":" + password;
|
||||
var authEncBytes = new Buffer(authString);
|
||||
var authStringEnc = authEncBytes.toString();
|
||||
httpConnection.setHeader("Authorization", "Basic " + authStringEnc);
|
||||
return httpConnection;
|
||||
};
|
||||
HttpURLConnectionClient.prototype.installCertificateVerifier = function (terminalCertificatePath) {
|
||||
try {
|
||||
var certificateInput = fs.readFileSync(terminalCertificatePath);
|
||||
this.agentOptions = {
|
||||
ca: certificateInput,
|
||||
checkServerIdentity: function () {
|
||||
return undefined;
|
||||
},
|
||||
};
|
||||
}
|
||||
catch (e) {
|
||||
throw new HttpClientException("Error loading certificate from path: " + e.message);
|
||||
}
|
||||
};
|
||||
HttpURLConnectionClient.CHARSET = "utf-8";
|
||||
return HttpURLConnectionClient;
|
||||
}());
|
||||
export default HttpURLConnectionClient;
|
||||
//# sourceMappingURL=httpURLConnectionClient.js.map
|
||||
1
dist/lib-esm/httpClient/httpURLConnectionClient.js.map
vendored
Normal file
1
dist/lib-esm/httpClient/httpURLConnectionClient.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"httpURLConnectionClient.js","sourceRoot":"","sources":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AO,SAAS,CAAC;gBACrB,CAAC;aACJ,CAAC;SAEL;QAAC,OAAO,CAAC,EAAE;YACR,MAAM,IAAI,mBAAmB,CAAC,0CAAwC,CAAC,CAAC,OAAS,CAAC,CAAC;SACtF;IAEL,CAAC;IAtIc,+BAAO,GAAW,OAAO,CAAC;IAwI7C,8BAAC;CAAA,AAzID,IAyIC;AAED,eAAe,uBAAuB,CAAC"}
|
||||
4
dist/lib-esm/index.d.ts
vendored
Normal file
4
dist/lib-esm/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export { default as Client } from "./client";
|
||||
export { default as Config } from "./config";
|
||||
export * from "./service/";
|
||||
export { default as HttpURLConnectionClient } from "./httpClient/httpURLConnectionClient";
|
||||
25
dist/lib-esm/index.js
vendored
Normal file
25
dist/lib-esm/index.js
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
export { default as Client } from "./client";
|
||||
export { default as Config } from "./config";
|
||||
export * from "./service/";
|
||||
export { default as HttpURLConnectionClient } from "./httpClient/httpURLConnectionClient";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist/lib-esm/index.js.map
vendored
Normal file
1
dist/lib-esm/index.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC"}
|
||||
10
dist/lib-esm/notification/notificationRequest.d.ts
vendored
Normal file
10
dist/lib-esm/notification/notificationRequest.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Notification, NotificationItem, NotificationRequestItem } from "../typings/notification";
|
||||
declare class NotificationRequest {
|
||||
constructor(json: Notification);
|
||||
notificationItemContainers: NotificationItem[];
|
||||
live: string;
|
||||
readonly notificationItems: NotificationRequestItem[];
|
||||
private _live;
|
||||
private _notificationItemContainers;
|
||||
}
|
||||
export default NotificationRequest;
|
||||
61
dist/lib-esm/notification/notificationRequest.js
vendored
Normal file
61
dist/lib-esm/notification/notificationRequest.js
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import { Convert } from "../typings/notification";
|
||||
var NotificationRequest = /** @class */ (function () {
|
||||
function NotificationRequest(json) {
|
||||
var notification = Convert.toNotification(JSON.stringify(json));
|
||||
this._notificationItemContainers = notification.notificationItems;
|
||||
this._live = notification.live;
|
||||
}
|
||||
Object.defineProperty(NotificationRequest.prototype, "notificationItemContainers", {
|
||||
get: function () {
|
||||
return this._notificationItemContainers;
|
||||
},
|
||||
set: function (value) {
|
||||
this._notificationItemContainers = value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(NotificationRequest.prototype, "live", {
|
||||
get: function () {
|
||||
return this._live;
|
||||
},
|
||||
set: function (value) {
|
||||
this._live = value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(NotificationRequest.prototype, "notificationItems", {
|
||||
get: function () {
|
||||
if (!this._notificationItemContainers) {
|
||||
return null;
|
||||
}
|
||||
return this._notificationItemContainers.map(function (container) { return container.notificationRequestItem; });
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return NotificationRequest;
|
||||
}());
|
||||
export default NotificationRequest;
|
||||
//# sourceMappingURL=notificationRequest.js.map
|
||||
1
dist/lib-esm/notification/notificationRequest.js.map
vendored
Normal file
1
dist/lib-esm/notification/notificationRequest.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"notificationRequest.js","sourceRoot":"","sources":["../../../src/notification/notificationRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAC,OAAO,EAA0D,MAAM,yBAAyB,CAAC;AAEzG;IACI,6BAAmB,IAAkB;QACjC,IAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAClE,IAAI,CAAC,2BAA2B,GAAG,YAAY,CAAC,iBAAiB,CAAC;QAClE,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC;IACnC,CAAC;IAED,sBAAW,2DAA0B;aAArC;YACI,OAAO,IAAI,CAAC,2BAA2B,CAAC;QAC5C,CAAC;aAED,UAAsC,KAAyB;YAC3D,IAAI,CAAC,2BAA2B,GAAG,KAAK,CAAC;QAC7C,CAAC;;;OAJA;IAMD,sBAAW,qCAAI;aAAf;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;aAED,UAAgB,KAAa;YACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACvB,CAAC;;;OAJA;IAMD,sBAAW,kDAAiB;aAA5B;YACI,IAAI,CAAC,IAAI,CAAC,2BAA2B,EAAE;gBACnC,OAAO,IAAI,CAAC;aACf;YAED,OAAO,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,UAAC,SAAS,IAA8B,OAAA,SAAS,CAAC,uBAAuB,EAAjC,CAAiC,CAAC,CAAC;QAC3H,CAAC;;;OAAA;IAIL,0BAAC;AAAD,CAAC,AAjCD,IAiCC;AAED,eAAe,mBAAmB,CAAC"}
|
||||
8
dist/lib-esm/security/exception/invalidSecurityKeyException.d.ts
vendored
Normal file
8
dist/lib-esm/security/exception/invalidSecurityKeyException.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
declare class InvalidSecurityKeyException implements Error {
|
||||
private readonly _message;
|
||||
private readonly _name;
|
||||
constructor(message: string);
|
||||
readonly message: string;
|
||||
readonly name: string;
|
||||
}
|
||||
export default InvalidSecurityKeyException;
|
||||
43
dist/lib-esm/security/exception/invalidSecurityKeyException.js
vendored
Normal file
43
dist/lib-esm/security/exception/invalidSecurityKeyException.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var InvalidSecurityKeyException = /** @class */ (function () {
|
||||
function InvalidSecurityKeyException(message) {
|
||||
this._message = message;
|
||||
this._name = "InvalidSecurityKeyException";
|
||||
}
|
||||
Object.defineProperty(InvalidSecurityKeyException.prototype, "message", {
|
||||
get: function () {
|
||||
return this._message;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(InvalidSecurityKeyException.prototype, "name", {
|
||||
get: function () {
|
||||
return this._name;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return InvalidSecurityKeyException;
|
||||
}());
|
||||
export default InvalidSecurityKeyException;
|
||||
//# sourceMappingURL=invalidSecurityKeyException.js.map
|
||||
1
dist/lib-esm/security/exception/invalidSecurityKeyException.js.map
vendored
Normal file
1
dist/lib-esm/security/exception/invalidSecurityKeyException.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"invalidSecurityKeyException.js","sourceRoot":"","sources":["../../../../src/security/exception/invalidSecurityKeyException.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;IAII,qCAAmB,OAAe;QAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,6BAA6B,CAAC;IAC/C,CAAC;IAED,sBAAW,gDAAO;aAAlB;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAED,sBAAW,6CAAI;aAAf;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IACL,kCAAC;AAAD,CAAC,AAhBD,IAgBC;AAED,eAAe,2BAA2B,CAAC"}
|
||||
11
dist/lib-esm/security/nexoCrypto.d.ts
vendored
Normal file
11
dist/lib-esm/security/nexoCrypto.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { MessageHeader, SaleToPoiSecuredMessage, SecurityKey } from "../typings/terminal";
|
||||
declare class NexoCrypto {
|
||||
static encrypt(messageHeader: MessageHeader, saleToPoiMessageJson: string, securityKey: SecurityKey): SaleToPoiSecuredMessage;
|
||||
decrypt(saleToPoiSecureMessage: SaleToPoiSecuredMessage, securityKey: SecurityKey): string;
|
||||
private static validateSecurityKey;
|
||||
private static crypt;
|
||||
private static hmac;
|
||||
private static generateRandomIvNonce;
|
||||
private validateHmac;
|
||||
}
|
||||
export default NexoCrypto;
|
||||
102
dist/lib-esm/security/nexoCrypto.js
vendored
Normal file
102
dist/lib-esm/security/nexoCrypto.js
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import { createCipheriv, createDecipheriv, createHmac, randomBytes } from "crypto";
|
||||
import NexoCryptoException from "../service/exception/nexoCryptoException";
|
||||
import { NEXO_IV_LENGTH } from "../typings/constants/nexoConstants";
|
||||
import InvalidSecurityKeyException from "./exception/invalidSecurityKeyException";
|
||||
import NexoDerivedKeyGenerator from "./nexoDerivedKeyGenerator";
|
||||
var Modes;
|
||||
(function (Modes) {
|
||||
Modes[Modes["ENCRYPT"] = 0] = "ENCRYPT";
|
||||
Modes[Modes["DECRYPT"] = 1] = "DECRYPT";
|
||||
})(Modes || (Modes = {}));
|
||||
var NexoCrypto = /** @class */ (function () {
|
||||
function NexoCrypto() {
|
||||
}
|
||||
NexoCrypto.encrypt = function (messageHeader, saleToPoiMessageJson, securityKey) {
|
||||
var derivedKey = NexoDerivedKeyGenerator.deriveKeyMaterial(securityKey.passphrase);
|
||||
var saleToPoiMessageByteArray = Buffer.from(saleToPoiMessageJson, "ascii");
|
||||
var ivNonce = NexoCrypto.generateRandomIvNonce();
|
||||
var encryptedSaleToPoiMessage = NexoCrypto.crypt(saleToPoiMessageByteArray, derivedKey, ivNonce, Modes.ENCRYPT);
|
||||
var encryptedSaleToPoiMessageHmac = NexoCrypto.hmac(saleToPoiMessageByteArray, derivedKey);
|
||||
var securityTrailer = {
|
||||
adyenCryptoVersion: securityKey.adyenCryptoVersion,
|
||||
hmac: encryptedSaleToPoiMessageHmac.toString("base64"),
|
||||
keyIdentifier: securityKey.keyIdentifier,
|
||||
keyVersion: securityKey.keyVersion,
|
||||
nonce: ivNonce.toString("base64"),
|
||||
};
|
||||
return {
|
||||
messageHeader: messageHeader,
|
||||
nexoBlob: encryptedSaleToPoiMessage.toString("base64"),
|
||||
securityTrailer: securityTrailer,
|
||||
};
|
||||
};
|
||||
NexoCrypto.prototype.decrypt = function (saleToPoiSecureMessage, securityKey) {
|
||||
NexoCrypto.validateSecurityKey(securityKey);
|
||||
var encryptedSaleToPoiMessageByteArray = Buffer.from(saleToPoiSecureMessage.nexoBlob, "base64");
|
||||
var derivedKey = NexoDerivedKeyGenerator.deriveKeyMaterial(securityKey.passphrase);
|
||||
var ivNonce = Buffer.from(saleToPoiSecureMessage.securityTrailer.nonce, "base64");
|
||||
var decryptedSaleToPoiMessageByteArray = NexoCrypto.crypt(encryptedSaleToPoiMessageByteArray, derivedKey, ivNonce, Modes.DECRYPT);
|
||||
var receivedHmac = Buffer.from(saleToPoiSecureMessage.securityTrailer.hmac, "base64");
|
||||
this.validateHmac(receivedHmac, decryptedSaleToPoiMessageByteArray, derivedKey);
|
||||
return decryptedSaleToPoiMessageByteArray.toString("ascii");
|
||||
};
|
||||
NexoCrypto.validateSecurityKey = function (securityKey) {
|
||||
var isValid = securityKey
|
||||
&& securityKey.passphrase
|
||||
&& securityKey.keyIdentifier
|
||||
&& securityKey.keyVersion
|
||||
&& securityKey.adyenCryptoVersion;
|
||||
if (!isValid) {
|
||||
throw new InvalidSecurityKeyException("Invalid Security Key");
|
||||
}
|
||||
};
|
||||
NexoCrypto.crypt = function (bytes, dk, ivNonce, mode) {
|
||||
var actualIV = Buffer.alloc(NEXO_IV_LENGTH);
|
||||
for (var i = 0; i < NEXO_IV_LENGTH; i++) {
|
||||
actualIV[i] = dk.iv[i] ^ ivNonce[i];
|
||||
}
|
||||
var cipher = mode === Modes.ENCRYPT
|
||||
? createCipheriv("aes-256-cbc", dk.cipherKey, actualIV)
|
||||
: createDecipheriv("aes-256-cbc", dk.cipherKey, actualIV);
|
||||
var encrypted = cipher.update(bytes);
|
||||
encrypted = Buffer.concat([encrypted, cipher.final()]);
|
||||
return encrypted;
|
||||
};
|
||||
NexoCrypto.hmac = function (bytes, derivedKey) {
|
||||
var mac = createHmac("sha256", derivedKey.hmacKey);
|
||||
return mac.update(bytes).digest();
|
||||
};
|
||||
NexoCrypto.generateRandomIvNonce = function () {
|
||||
return randomBytes(NEXO_IV_LENGTH);
|
||||
};
|
||||
NexoCrypto.prototype.validateHmac = function (receivedHmac, decryptedMessage, derivedKey) {
|
||||
var hmac = NexoCrypto.hmac(decryptedMessage, derivedKey);
|
||||
var isValid = hmac.every(function (item, index) { return item === receivedHmac[index]; });
|
||||
if (!isValid) {
|
||||
throw new NexoCryptoException("Hmac validation failed");
|
||||
}
|
||||
};
|
||||
return NexoCrypto;
|
||||
}());
|
||||
export default NexoCrypto;
|
||||
//# sourceMappingURL=nexoCrypto.js.map
|
||||
1
dist/lib-esm/security/nexoCrypto.js.map
vendored
Normal file
1
dist/lib-esm/security/nexoCrypto.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"nexoCrypto.js","sourceRoot":"","sources":["../../../src/security/nexoCrypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAS,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC;AACzF,OAAO,mBAAmB,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAC,cAAc,EAAC,MAAM,oCAAoC,CAAC;AAQlE,OAAO,2BAA2B,MAAM,yCAAyC,CAAC;AAClF,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAEhE,IAAK,KAGJ;AAHD,WAAK,KAAK;IACN,uCAAO,CAAA;IACP,uCAAO,CAAA;AACX,CAAC,EAHI,KAAK,KAAL,KAAK,QAGT;AAED;IAAA;IAsFA,CAAC;IArFiB,kBAAO,GAArB,UACI,aAA4B,EAC5B,oBAA4B,EAC5B,WAAwB;QAExB,IAAM,UAAU,GAAmB,uBAAuB,CAAC,iBAAiB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACrG,IAAM,yBAAyB,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAC7E,IAAM,OAAO,GAAG,UAAU,CAAC,qBAAqB,EAAE,CAAC;QACnD,IAAM,yBAAyB,GAAG,UAAU,CAAC,KAAK,CAAC,yBAAyB,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAClH,IAAM,6BAA6B,GAAG,UAAU,CAAC,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC,CAAC;QAE7F,IAAM,eAAe,GAAoB;YACrC,kBAAkB,EAAE,WAAW,CAAC,kBAAkB;YAClD,IAAI,EAAE,6BAA6B,CAAC,QAAQ,CAAC,Q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I,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;QAE3D,IAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,UAAC,IAAI,EAAE,KAAK,IAAc,OAAA,IAAI,KAAK,YAAY,CAAC,KAAK,CAAC,EAA5B,CAA4B,CAAC,CAAC;QAEnF,IAAI,CAAC,OAAO,EAAE;YACV,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;SAC3D;IACL,CAAC;IACL,iBAAC;AAAD,CAAC,AAtFD,IAsFC;AAED,eAAe,UAAU,CAAC"}
|
||||
6
dist/lib-esm/security/nexoDerivedKeyGenerator.d.ts
vendored
Normal file
6
dist/lib-esm/security/nexoDerivedKeyGenerator.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { NexoDerivedKey } from "../typings/terminal";
|
||||
declare class NexoDerivedKeyGenerator {
|
||||
static deriveKeyMaterial(passphrase: string): NexoDerivedKey;
|
||||
private static readKeyData;
|
||||
}
|
||||
export default NexoDerivedKeyGenerator;
|
||||
44
dist/lib-esm/security/nexoDerivedKeyGenerator.js
vendored
Normal file
44
dist/lib-esm/security/nexoDerivedKeyGenerator.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import { pbkdf2Sync } from "crypto";
|
||||
import { NEXO_CIPHER_KEY_LENGTH, NEXO_HMAC_KEY_LENGTH, NEXO_IV_LENGTH } from "../typings/constants/nexoConstants";
|
||||
var NexoDerivedKeyGenerator = /** @class */ (function () {
|
||||
function NexoDerivedKeyGenerator() {
|
||||
}
|
||||
NexoDerivedKeyGenerator.deriveKeyMaterial = function (passphrase) {
|
||||
var pass = Buffer.from(passphrase, "binary");
|
||||
var salt = Buffer.from("AdyenNexoV1Salt", "binary");
|
||||
var iterations = 4000;
|
||||
var keylen = NEXO_CIPHER_KEY_LENGTH + NEXO_HMAC_KEY_LENGTH + NEXO_IV_LENGTH;
|
||||
var key = pbkdf2Sync(pass, salt, iterations, keylen * 8, "sha1");
|
||||
return NexoDerivedKeyGenerator.readKeyData(key);
|
||||
};
|
||||
NexoDerivedKeyGenerator.readKeyData = function (key) {
|
||||
return {
|
||||
cipherKey: key.slice(NEXO_HMAC_KEY_LENGTH, NEXO_HMAC_KEY_LENGTH + NEXO_CIPHER_KEY_LENGTH),
|
||||
hmacKey: key.slice(0, NEXO_HMAC_KEY_LENGTH),
|
||||
iv: key.slice(NEXO_HMAC_KEY_LENGTH + NEXO_CIPHER_KEY_LENGTH, NEXO_CIPHER_KEY_LENGTH + NEXO_HMAC_KEY_LENGTH + NEXO_IV_LENGTH),
|
||||
};
|
||||
};
|
||||
return NexoDerivedKeyGenerator;
|
||||
}());
|
||||
export default NexoDerivedKeyGenerator;
|
||||
//# sourceMappingURL=nexoDerivedKeyGenerator.js.map
|
||||
1
dist/lib-esm/security/nexoDerivedKeyGenerator.js.map
vendored
Normal file
1
dist/lib-esm/security/nexoDerivedKeyGenerator.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"nexoDerivedKeyGenerator.js","sourceRoot":"","sources":["../../../src/security/nexoDerivedKeyGenerator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAC,sBAAsB,EAAE,oBAAoB,EAAE,cAAc,EAAC,MAAM,oCAAoC,CAAC;AAGhH;IAAA;IAoBA,CAAC;IAnBiB,yCAAiB,GAA/B,UAAgC,UAAkB;QAC9C,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC/C,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QACtD,IAAM,UAAU,GAAG,IAAI,CAAC;QACxB,IAAM,MAAM,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,cAAc,CAAC;QAC9E,IAAM,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QACnE,OAAO,uBAAuB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAEc,mCAAW,GAA1B,UAA2B,GAAW;QAClC,OAAO;YACH,SAAS,EAAE,GAAG,CAAC,KAAK,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,sBAAsB,CAAC;YACzF,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,oBAAoB,CAAC;YAC3C,EAAE,EAAE,GAAG,CAAC,KAAK,CACT,oBAAoB,GAAG,sBAAsB,EAC7C,sBAAsB,GAAG,oBAAoB,GAAG,cAAc,CACjE;SACJ,CAAC;IACN,CAAC;IACL,8BAAC;AAAD,CAAC,AApBD,IAoBC;AAED,eAAe,uBAAuB,CAAC"}
|
||||
9
dist/lib-esm/service.d.ts
vendored
Normal file
9
dist/lib-esm/service.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import Client from "./client";
|
||||
declare class Service {
|
||||
protected _apiKeyRequired: boolean;
|
||||
private _client;
|
||||
protected constructor(client: Client);
|
||||
client: Client;
|
||||
apiKeyRequired: boolean;
|
||||
}
|
||||
export default Service;
|
||||
49
dist/lib-esm/service.js
vendored
Normal file
49
dist/lib-esm/service.js
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var Service = /** @class */ (function () {
|
||||
function Service(client) {
|
||||
this._apiKeyRequired = false;
|
||||
this._client = client;
|
||||
}
|
||||
Object.defineProperty(Service.prototype, "client", {
|
||||
get: function () {
|
||||
return this._client;
|
||||
},
|
||||
set: function (client) {
|
||||
this._client = client;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(Service.prototype, "apiKeyRequired", {
|
||||
get: function () {
|
||||
return this._apiKeyRequired;
|
||||
},
|
||||
set: function (apiKeyRequired) {
|
||||
this._apiKeyRequired = apiKeyRequired;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return Service;
|
||||
}());
|
||||
export default Service;
|
||||
//# sourceMappingURL=service.js.map
|
||||
1
dist/lib-esm/service.js.map
vendored
Normal file
1
dist/lib-esm/service.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH;IAII,iBAAsB,MAAc;QAH1B,oBAAe,GAAY,KAAK,CAAC;QAIvC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,sBAAW,2BAAM;aAAjB;YACI,OAAO,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;aAED,UAAkB,MAAc;YAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAC1B,CAAC;;;OAJA;IAMD,sBAAW,mCAAc;aAAzB;YACI,OAAO,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;aAED,UAA0B,cAAuB;YAC7C,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QAC1C,CAAC;;;OAJA;IAKL,cAAC;AAAD,CAAC,AAvBD,IAuBC;AAED,eAAe,OAAO,CAAC"}
|
||||
11
dist/lib-esm/service/binLookup.d.ts
vendored
Normal file
11
dist/lib-esm/service/binLookup.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
|
||||
import Client from "../client";
|
||||
import { CostEstimateRequest, CostEstimateResponse, ThreeDSAvailabilityRequest, ThreeDSAvailabilityResponse } from "../typings/binLookup";
|
||||
declare class BinLookup extends ApiKeyAuthenticatedService {
|
||||
private readonly _get3dsAvailability;
|
||||
private readonly _getCostEstimate;
|
||||
constructor(client: Client);
|
||||
get3dsAvailability(request: ThreeDSAvailabilityRequest): Promise<ThreeDSAvailabilityResponse>;
|
||||
getCostEstimate(request: CostEstimateRequest): Promise<CostEstimateResponse>;
|
||||
}
|
||||
export default BinLookup;
|
||||
104
dist/lib-esm/service/binLookup.js
vendored
Normal file
104
dist/lib-esm/service/binLookup.js
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
|
||||
import GetCostEstimate from "./resource/binLookup/getCostEstimate";
|
||||
import Get3dsAvailability from "./resource/binLookup/get3dsAvailability";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
var BinLookup = /** @class */ (function (_super) {
|
||||
__extends(BinLookup, _super);
|
||||
function BinLookup(client) {
|
||||
var _this = _super.call(this, client) || this;
|
||||
_this._get3dsAvailability = new Get3dsAvailability(_this);
|
||||
_this._getCostEstimate = new GetCostEstimate(_this);
|
||||
return _this;
|
||||
}
|
||||
BinLookup.prototype.get3dsAvailability = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._get3dsAvailability, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
BinLookup.prototype.getCostEstimate = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._getCostEstimate, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return BinLookup;
|
||||
}(ApiKeyAuthenticatedService));
|
||||
export default BinLookup;
|
||||
//# sourceMappingURL=binLookup.js.map
|
||||
1
dist/lib-esm/service/binLookup.js.map
vendored
Normal file
1
dist/lib-esm/service/binLookup.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"binLookup.js","sourceRoot":"","sources":["../../../src/service/binLookup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AAEvE,OAAO,eAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,kBAAkB,MAAM,yCAAyC,CAAC;AAOzE,OAAO,eAAe,MAAM,4BAA4B,CAAC;AAEzD;IAAwB,6BAA0B;IAI9C,mBAAmB,MAAc;QAAjC,YACI,kBAAM,MAAM,CAAC,SAGhB;QAFG,KAAI,CAAC,mBAAmB,GAAG,IAAI,kBAAkB,CAAC,KAAI,CAAC,CAAC;QACxD,KAAI,CAAC,gBAAgB,GAAG,IAAI,eAAe,CAAC,KAAI,CAAC,CAAC;;IACtD,CAAC;IAEY,sCAAkB,GAA/B,UAAgC,OAAmC;;;;4BACxD,qBAAM,eAAe,CACxB,IAAI,CAAC,mBAAmB,EACxB,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IAEY,mCAAe,GAA5B,UAA6B,OAA4B;;;;4BAC9C,qBAAM,eAAe,CACxB,IAAI,CAAC,gBAAgB,EACrB,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IACL,gBAAC;AAAD,CAAC,AAvBD,CAAwB,0BAA0B,GAuBjD;AAED,eAAe,SAAS,CAAC"}
|
||||
18
dist/lib-esm/service/checkout.d.ts
vendored
Normal file
18
dist/lib-esm/service/checkout.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
|
||||
import Client from "../client";
|
||||
import { DetailsRequest, PaymentMethodsRequest, PaymentMethodsResponse, PaymentRequest, PaymentResponse, PaymentSetupRequest, PaymentSetupResponse, PaymentVerificationRequest, PaymentVerificationResponse } from "../typings/checkout";
|
||||
import { RequestOptions } from "../typings/requestOptions";
|
||||
declare class Checkout extends ApiKeyAuthenticatedService {
|
||||
private readonly _payments;
|
||||
private readonly _paymentMethods;
|
||||
private readonly _paymentsDetails;
|
||||
private readonly _paymentSession;
|
||||
private readonly _paymentsResult;
|
||||
constructor(client: Client);
|
||||
payments(paymentsRequest: PaymentRequest, requestOptions?: RequestOptions): Promise<PaymentResponse>;
|
||||
paymentMethods(paymentMethodsRequest: PaymentMethodsRequest): Promise<PaymentMethodsResponse>;
|
||||
paymentsDetails(paymentsDetailsRequest: DetailsRequest): Promise<PaymentResponse>;
|
||||
paymentSession(paymentSessionRequest: PaymentSetupRequest, requestOptions?: RequestOptions): Promise<PaymentSetupResponse>;
|
||||
paymentResult(paymentResultRequest: PaymentVerificationRequest): Promise<PaymentVerificationResponse>;
|
||||
}
|
||||
export default Checkout;
|
||||
125
dist/lib-esm/service/checkout.js
vendored
Normal file
125
dist/lib-esm/service/checkout.js
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
import PaymentMethods from "./resource/checkout/paymentMethods";
|
||||
import Payments from "./resource/checkout/payments";
|
||||
import PaymentsDetails from "./resource/checkout/paymentsDetails";
|
||||
import PaymentSession from "./resource/checkout/paymentSession";
|
||||
import PaymentsResult from "./resource/checkout/paymentsResult";
|
||||
var Checkout = /** @class */ (function (_super) {
|
||||
__extends(Checkout, _super);
|
||||
function Checkout(client) {
|
||||
var _this = _super.call(this, client) || this;
|
||||
_this._payments = new Payments(_this);
|
||||
_this._paymentMethods = new PaymentMethods(_this);
|
||||
_this._paymentsDetails = new PaymentsDetails(_this);
|
||||
_this._paymentSession = new PaymentSession(_this);
|
||||
_this._paymentsResult = new PaymentsResult(_this);
|
||||
return _this;
|
||||
}
|
||||
Checkout.prototype.payments = function (paymentsRequest, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, getJsonResponse(this._payments, paymentsRequest, requestOptions)];
|
||||
});
|
||||
});
|
||||
};
|
||||
Checkout.prototype.paymentMethods = function (paymentMethodsRequest) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, getJsonResponse(this._paymentMethods, paymentMethodsRequest)];
|
||||
});
|
||||
});
|
||||
};
|
||||
Checkout.prototype.paymentsDetails = function (paymentsDetailsRequest) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, getJsonResponse(this._paymentsDetails, paymentsDetailsRequest)];
|
||||
});
|
||||
});
|
||||
};
|
||||
Checkout.prototype.paymentSession = function (paymentSessionRequest, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, getJsonResponse(this._paymentSession, paymentSessionRequest, requestOptions)];
|
||||
});
|
||||
});
|
||||
};
|
||||
Checkout.prototype.paymentResult = function (paymentResultRequest) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, getJsonResponse(this._paymentsResult, paymentResultRequest)];
|
||||
});
|
||||
});
|
||||
};
|
||||
return Checkout;
|
||||
}(ApiKeyAuthenticatedService));
|
||||
export default Checkout;
|
||||
//# sourceMappingURL=checkout.js.map
|
||||
1
dist/lib-esm/service/checkout.js.map
vendored
Normal file
1
dist/lib-esm/service/checkout.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../../src/service/checkout.ts"],"names":[],"mappings":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BAAO,eAAe,CAClB,IAAI,CAAC,eAAe,EACpB,qBAAqB,EACrB,cAAc,CACjB,EAAC;;;KACL;IAEY,gCAAa,GAA1B,UAA2B,oBAAgD;;;gBACvE,sBAAO,eAAe,CAClB,IAAI,CAAC,eAAe,EACpB,oBAAoB,CACvB,EAAC;;;KACL;IACL,eAAC;AAAD,CAAC,AA1DD,CAAuB,0BAA0B,GA0DhD;AAED,eAAe,QAAQ,CAAC"}
|
||||
9
dist/lib-esm/service/checkoutUtility.d.ts
vendored
Normal file
9
dist/lib-esm/service/checkoutUtility.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
|
||||
import Client from "../client";
|
||||
import { CheckoutUtilityRequest, CheckoutUtilityResponse } from "../typings/checkoutUtility";
|
||||
declare class CheckoutUtility extends ApiKeyAuthenticatedService {
|
||||
private readonly _originKeys;
|
||||
constructor(client: Client);
|
||||
originKeys(originKeysRequest: CheckoutUtilityRequest): Promise<CheckoutUtilityResponse>;
|
||||
}
|
||||
export default CheckoutUtility;
|
||||
89
dist/lib-esm/service/checkoutUtility.js
vendored
Normal file
89
dist/lib-esm/service/checkoutUtility.js
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
import OriginKeys from "./resource/checkoutUtility/originKeys";
|
||||
var CheckoutUtility = /** @class */ (function (_super) {
|
||||
__extends(CheckoutUtility, _super);
|
||||
function CheckoutUtility(client) {
|
||||
var _this = _super.call(this, client) || this;
|
||||
_this._originKeys = new OriginKeys(_this);
|
||||
return _this;
|
||||
}
|
||||
CheckoutUtility.prototype.originKeys = function (originKeysRequest) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
return [2 /*return*/, getJsonResponse(this._originKeys, originKeysRequest)];
|
||||
});
|
||||
});
|
||||
};
|
||||
return CheckoutUtility;
|
||||
}(ApiKeyAuthenticatedService));
|
||||
export default CheckoutUtility;
|
||||
//# sourceMappingURL=checkoutUtility.js.map
|
||||
1
dist/lib-esm/service/checkoutUtility.js.map
vendored
Normal file
1
dist/lib-esm/service/checkoutUtility.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"checkoutUtility.js","sourceRoot":"","sources":["../../../src/service/checkoutUtility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AAEvE,OAAO,eAAe,MAAM,4BAA4B,CAAC;AAEzD,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAE/D;IAA8B,mCAA0B;IAGpD,yBAAmB,MAAc;QAAjC,YACI,kBAAM,MAAM,CAAC,SAEhB;QADG,KAAI,CAAC,WAAW,GAAG,IAAI,UAAU,CAAC,KAAI,CAAC,CAAC;;IAC5C,CAAC;IAEY,oCAAU,GAAvB,UAAwB,iBAAyC;;;gBAC7D,sBAAO,eAAe,CAClB,IAAI,CAAC,WAAW,EAChB,iBAAiB,CACpB,EAAC;;;KACL;IACL,sBAAC;AAAD,CAAC,AAdD,CAA8B,0BAA0B,GAcvD;AAED,eAAe,eAAe,CAAC"}
|
||||
13
dist/lib-esm/service/exception/apiException.d.ts
vendored
Normal file
13
dist/lib-esm/service/exception/apiException.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { ApiError } from "../../typings/apiError";
|
||||
declare class ApiException implements Error {
|
||||
private _error;
|
||||
private _statusCode;
|
||||
private readonly _message;
|
||||
private readonly _name;
|
||||
constructor(message: string, statusCode: number);
|
||||
error: ApiError;
|
||||
statusCode: number;
|
||||
readonly message: string;
|
||||
readonly name: string;
|
||||
}
|
||||
export default ApiException;
|
||||
64
dist/lib-esm/service/exception/apiException.js
vendored
Normal file
64
dist/lib-esm/service/exception/apiException.js
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var ApiException = /** @class */ (function () {
|
||||
function ApiException(message, statusCode) {
|
||||
this._name = "ApiException";
|
||||
this._message = message;
|
||||
this._statusCode = statusCode;
|
||||
}
|
||||
Object.defineProperty(ApiException.prototype, "error", {
|
||||
get: function () {
|
||||
return this._error;
|
||||
},
|
||||
set: function (error) {
|
||||
this._error = error;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(ApiException.prototype, "statusCode", {
|
||||
get: function () {
|
||||
return this._statusCode;
|
||||
},
|
||||
set: function (statusCode) {
|
||||
this._statusCode = statusCode;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(ApiException.prototype, "message", {
|
||||
get: function () {
|
||||
return this._message;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(ApiException.prototype, "name", {
|
||||
get: function () {
|
||||
return this._name;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return ApiException;
|
||||
}());
|
||||
export default ApiException;
|
||||
//# sourceMappingURL=apiException.js.map
|
||||
1
dist/lib-esm/service/exception/apiException.js.map
vendored
Normal file
1
dist/lib-esm/service/exception/apiException.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"apiException.js","sourceRoot":"","sources":["../../../../src/service/exception/apiException.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH;IAMI,sBAAmB,OAAe,EAAE,UAAkB;QAClD,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAClC,CAAC;IAED,sBAAW,+BAAK;aAAhB;YACI,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC;aAED,UAAiB,KAAe;YAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,CAAC;;;OAJA;IAMD,sBAAW,oCAAU;aAArB;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;aAED,UAAsB,UAAkB;YACpC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAClC,CAAC;;;OAJA;IAMD,sBAAW,iCAAO;aAAlB;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAED,sBAAW,8BAAI;aAAf;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IACL,mBAAC;AAAD,CAAC,AAnCD,IAmCC;AAED,eAAe,YAAY,CAAC"}
|
||||
8
dist/lib-esm/service/exception/nexoCryptoException.d.ts
vendored
Normal file
8
dist/lib-esm/service/exception/nexoCryptoException.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
declare class NexoCryptoException implements Error {
|
||||
private readonly _message;
|
||||
private readonly _name;
|
||||
constructor(message: string);
|
||||
readonly message: string;
|
||||
readonly name: string;
|
||||
}
|
||||
export default NexoCryptoException;
|
||||
43
dist/lib-esm/service/exception/nexoCryptoException.js
vendored
Normal file
43
dist/lib-esm/service/exception/nexoCryptoException.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var NexoCryptoException = /** @class */ (function () {
|
||||
function NexoCryptoException(message) {
|
||||
this._name = "NexoCryptoException";
|
||||
this._message = message;
|
||||
}
|
||||
Object.defineProperty(NexoCryptoException.prototype, "message", {
|
||||
get: function () {
|
||||
return this._message;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(NexoCryptoException.prototype, "name", {
|
||||
get: function () {
|
||||
return this._name;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return NexoCryptoException;
|
||||
}());
|
||||
export default NexoCryptoException;
|
||||
//# sourceMappingURL=nexoCryptoException.js.map
|
||||
1
dist/lib-esm/service/exception/nexoCryptoException.js.map
vendored
Normal file
1
dist/lib-esm/service/exception/nexoCryptoException.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"nexoCryptoException.js","sourceRoot":"","sources":["../../../../src/service/exception/nexoCryptoException.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;IAII,6BAAmB,OAAe;QAC9B,IAAI,CAAC,KAAK,GAAG,qBAAqB,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5B,CAAC;IAED,sBAAW,wCAAO;aAAlB;YACI,OAAO,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;;;OAAA;IAED,sBAAW,qCAAI;aAAf;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;;;OAAA;IACL,0BAAC;AAAD,CAAC,AAhBD,IAgBC;AAED,eAAe,mBAAmB,CAAC"}
|
||||
8
dist/lib-esm/service/index.d.ts
vendored
Normal file
8
dist/lib-esm/service/index.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export { default as TerminalLocalAPI } from "./terminalLocalAPI";
|
||||
export { default as TerminalCloudAPI } from "./terminalCloudAPI";
|
||||
export { default as CheckoutAPI } from "./checkout";
|
||||
export { default as CheckoutUtility } from "./checkoutUtility";
|
||||
export { default as Recurring } from "./recurring";
|
||||
export { default as Modification } from "./modification";
|
||||
export { default as BinLookup } from "./binLookup";
|
||||
export { default as Payout } from "./payout";
|
||||
29
dist/lib-esm/service/index.js
vendored
Normal file
29
dist/lib-esm/service/index.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
export { default as TerminalLocalAPI } from "./terminalLocalAPI";
|
||||
export { default as TerminalCloudAPI } from "./terminalCloudAPI";
|
||||
export { default as CheckoutAPI } from "./checkout";
|
||||
export { default as CheckoutUtility } from "./checkoutUtility";
|
||||
export { default as Recurring } from "./recurring";
|
||||
export { default as Modification } from "./modification";
|
||||
export { default as BinLookup } from "./binLookup";
|
||||
export { default as Payout } from "./payout";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist/lib-esm/service/index.js.map
vendored
Normal file
1
dist/lib-esm/service/index.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/service/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
||||
20
dist/lib-esm/service/modification.d.ts
vendored
Normal file
20
dist/lib-esm/service/modification.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import Client from "../client";
|
||||
import Service from "../service";
|
||||
import { ModificationRequest, ModificationResult } from "../typings/payments";
|
||||
import { RequestOptions } from "../typings/requestOptions";
|
||||
declare class Modification extends Service {
|
||||
private readonly _cancelOrRefund;
|
||||
private readonly _cancel;
|
||||
private readonly _capture;
|
||||
private readonly _refund;
|
||||
private readonly _adjustAuthorisation;
|
||||
private readonly _technicalCancel;
|
||||
constructor(client: Client);
|
||||
capture(captureRequest: ModificationRequest, requestOptions?: RequestOptions): Promise<ModificationResult>;
|
||||
cancelOrRefund(cancelOrRefundRequest: ModificationRequest, requestOptions?: RequestOptions): Promise<ModificationResult>;
|
||||
refund(refundRequest: ModificationRequest, requestOptions?: RequestOptions): Promise<ModificationResult>;
|
||||
cancel(cancelRequest: ModificationRequest, requestOptions?: RequestOptions): Promise<ModificationResult>;
|
||||
technicalCancel(technicalCancelRequest: ModificationRequest, requestOptions?: RequestOptions): Promise<ModificationResult>;
|
||||
adjustAuthorisation(adjustAuthorisationRequest: ModificationRequest, requestOptions?: RequestOptions): Promise<ModificationResult>;
|
||||
}
|
||||
export default Modification;
|
||||
132
dist/lib-esm/service/modification.js
vendored
Normal file
132
dist/lib-esm/service/modification.js
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
import Service from "../service";
|
||||
import AdjustAuthorisation from "./resource/modification/adjustAuthorisation";
|
||||
import Cancel from "./resource/modification/cancel";
|
||||
import CancelOrRefund from "./resource/modification/cancelOrRefund";
|
||||
import Capture from "./resource/modification/capture";
|
||||
import Refund from "./resource/modification/refund";
|
||||
import TechnicalCancel from "./resource/modification/technicalCancel";
|
||||
var Modification = /** @class */ (function (_super) {
|
||||
__extends(Modification, _super);
|
||||
function Modification(client) {
|
||||
var _this = _super.call(this, client) || this;
|
||||
_this._capture = new Capture(_this);
|
||||
_this._cancelOrRefund = new CancelOrRefund(_this);
|
||||
_this._cancel = new Cancel(_this);
|
||||
_this._refund = new Refund(_this);
|
||||
_this._adjustAuthorisation = new AdjustAuthorisation(_this);
|
||||
_this._technicalCancel = new TechnicalCancel(_this);
|
||||
return _this;
|
||||
}
|
||||
Modification.prototype.capture = function (captureRequest, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._capture, captureRequest, requestOptions)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Modification.prototype.cancelOrRefund = function (cancelOrRefundRequest, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._cancelOrRefund, cancelOrRefundRequest, requestOptions)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Modification.prototype.refund = function (refundRequest, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._refund, refundRequest, requestOptions)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Modification.prototype.cancel = function (cancelRequest, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._cancel, cancelRequest, requestOptions)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Modification.prototype.technicalCancel = function (technicalCancelRequest, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._technicalCancel, technicalCancelRequest, requestOptions)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Modification.prototype.adjustAuthorisation = function (adjustAuthorisationRequest, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._adjustAuthorisation, adjustAuthorisationRequest, requestOptions)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Modification;
|
||||
}(Service));
|
||||
export default Modification;
|
||||
//# sourceMappingURL=modification.js.map
|
||||
1
dist/lib-esm/service/modification.js.map
vendored
Normal file
1
dist/lib-esm/service/modification.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"modification.js","sourceRoot":"","sources":["../../../src/service/modification.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,OAAO,MAAM,YAAY,CAAC;AAGjC,OAAO,mBAAmB,MAAM,6CAA6C,CAAC;AAC9E,OAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,OAAO,MAAM,iCAAiC,CAAC;AACtD,OAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,OAAO,eAAe,MAAM,yCAAyC,CAAC;AAEtE;IAA2B,gCAAO;IAQ9B,sBAAmB,MAAc;QAAjC,YACI,kBAAM,MAAM,CAAC,SAOhB;QANG,KAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAC,KAAI,CAAC,CAAC;QAClC,KAAI,CAAC,eAAe,GAAG,IAAI,cAAc,CAAC,KAAI,CAAC,CAAC;QAChD,KAAI,CAAC,OAAO,GAAG,IAAI,MAAM,CAAC,KAAI,CAAC,CAAC;QAChC,KAAI,CAAC,OAAO,GAAG,IAAI,MAAM,CAAC,KAAI,CAAC,CAAC;QAChC,KAAI,CAAC,oBAAoB,GAAG,IAAI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vendored
Normal file
17
dist/lib-esm/service/payout.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import Client from "../client";
|
||||
import Service from "../service";
|
||||
import { ModifyRequest, ModifyResponse, StoreDetailAndSubmitRequest, StoreDetailAndSubmitResponse, StoreDetailRequest, StoreDetailResponse, SubmitRequest, SubmitResponse } from "../typings/payout";
|
||||
declare class Payout extends Service {
|
||||
private readonly _storeDetailAndSubmitThirdParty;
|
||||
private readonly _confirmThirdParty;
|
||||
private readonly _declineThirdParty;
|
||||
private readonly _storeDetail;
|
||||
private readonly _submitThirdParty;
|
||||
constructor(client: Client);
|
||||
storeDetailAndSubmitThirdParty(request: StoreDetailAndSubmitRequest): Promise<StoreDetailAndSubmitResponse>;
|
||||
confirmThirdParty(request: ModifyRequest): Promise<ModifyResponse>;
|
||||
declineThirdParty(request: ModifyRequest): Promise<ModifyResponse>;
|
||||
storeDetail(request: StoreDetailRequest): Promise<StoreDetailResponse>;
|
||||
submitThirdparty(request: SubmitRequest): Promise<SubmitResponse>;
|
||||
}
|
||||
export default Payout;
|
||||
120
dist/lib-esm/service/payout.js
vendored
Normal file
120
dist/lib-esm/service/payout.js
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
import Service from "../service";
|
||||
import DeclineThirdParty from "./resource/payout/declineThirdParty";
|
||||
import StoreDetail from "./resource/payout/storeDetail";
|
||||
import SubmitThirdParty from "./resource/payout/submitThirdParty";
|
||||
import ConfirmThirdParty from "./resource/payout/confirmThirdParty";
|
||||
import StoreDetailAndSubmitThirdParty from "./resource/payout/storeDetailAndSubmitThirdParty";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
var Payout = /** @class */ (function (_super) {
|
||||
__extends(Payout, _super);
|
||||
function Payout(client) {
|
||||
var _this = _super.call(this, client) || this;
|
||||
_this._storeDetailAndSubmitThirdParty = new StoreDetailAndSubmitThirdParty(_this);
|
||||
_this._confirmThirdParty = new ConfirmThirdParty(_this);
|
||||
_this._declineThirdParty = new DeclineThirdParty(_this);
|
||||
_this._storeDetail = new StoreDetail(_this);
|
||||
_this._submitThirdParty = new SubmitThirdParty(_this);
|
||||
return _this;
|
||||
}
|
||||
Payout.prototype.storeDetailAndSubmitThirdParty = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._storeDetailAndSubmitThirdParty, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Payout.prototype.confirmThirdParty = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._confirmThirdParty, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Payout.prototype.declineThirdParty = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._declineThirdParty, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Payout.prototype.storeDetail = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._storeDetail, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Payout.prototype.submitThirdparty = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._submitThirdParty, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Payout;
|
||||
}(Service));
|
||||
export default Payout;
|
||||
//# sourceMappingURL=payout.js.map
|
||||
1
dist/lib-esm/service/payout.js.map
vendored
Normal file
1
dist/lib-esm/service/payout.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"payout.js","sourceRoot":"","sources":["../../../src/service/payout.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,iBAAiB,MAAM,qCAAqC,CAAC;AACpE,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,gBAAgB,MAAM,oCAAoC,CAAC;AAClE,OAAO,iBAAiB,MAAM,qCAAqC,CAAC;AACpE,OAAO,8BAA8B,MAAM,kDAAkD,CAAC;AAO9F,OAAO,eAAe,MAAM,4BAA4B,CAAC;AAEzD;IAAqB,0BAAO;IAOxB,gBAAmB,MAAc;QAAjC,YACI,kBAAM,MAAM,CAAC,SAOhB;QALG,KAAI,CAAC,+BAA+B,GAAG,IAAI,8BAA8B,CAAC,KAAI,CAAC,CAAC;QAChF,KAAI,CAAC,kBAAkB,GAAG,IAAI,iBAAiB,CAAC,KAAI,CAAC,CAAC;QACtD,KAAI,CAAC,kBAAkB,GAAG,IAAI,iBAAiB,CAAC,KAAI,CAAC,CAAC;QACtD,KAAI,CAAC,YAAY,GAAG,IAAI,WAAW,CAAC,KAAI,CAAC,CAAC;QAC1C,KAAI,CAAC,iBAAiB,GAAG,IAAI,gBAAgB,CAAC,KAAI,CAAC,CAAC;;IACxD,CAAC;IAEY,+CAA8B,GAA3C,UAA4C,OAAoC;;;;4BACrE,qBAAM,eAAe,CACxB,IAAI,CAAC,+BAA+B,EACpC,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IAEY,kCAAiB,GAA9B,UAA+B,OAAsB;;;;4BAC1C,qBAAM,eAAe,CACxB,IAAI,CAAC,kBAAkB,EACvB,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IAEY,kCAAiB,GAA9B,UAA+B,OAAsB;;;;4BAC1C,qBAAM,eAAe,CACxB,IAAI,CAAC,kBAAkB,EACvB,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IAEY,4BAAW,GAAxB,UAAyB,OAA2B;;;;4BACzC,qBAAM,eAAe,CACxB,IAAI,CAAC,YAAY,EACjB,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IAEY,iCAAgB,GAA7B,UAA8B,OAAsB;;;;4BACzC,qBAAM,eAAe,CACxB,IAAI,CAAC,iBAAiB,EACtB,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IACL,aAAC;AAAD,CAAC,AAnDD,CAAqB,OAAO,GAmD3B;AAED,eAAe,MAAM,CAAC"}
|
||||
11
dist/lib-esm/service/recurring.d.ts
vendored
Normal file
11
dist/lib-esm/service/recurring.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import Client from "../client";
|
||||
import Service from "../service";
|
||||
import { DisableRequest, DisableResult, RecurringDetailsRequest, RecurringDetailsResult } from "../typings/recurring";
|
||||
declare class Recurring extends Service {
|
||||
private readonly _listRecurringDetails;
|
||||
private readonly _disable;
|
||||
constructor(client: Client);
|
||||
listRecurringDetails(request: RecurringDetailsRequest): Promise<RecurringDetailsResult>;
|
||||
disable(request: DisableRequest): Promise<DisableResult>;
|
||||
}
|
||||
export default Recurring;
|
||||
104
dist/lib-esm/service/recurring.js
vendored
Normal file
104
dist/lib-esm/service/recurring.js
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
import Service from "../service";
|
||||
import Disable from "./resource/recurring/disable";
|
||||
import ListRecurringDetails from "./resource/recurring/listRecurringDetails";
|
||||
var Recurring = /** @class */ (function (_super) {
|
||||
__extends(Recurring, _super);
|
||||
function Recurring(client) {
|
||||
var _this = _super.call(this, client) || this;
|
||||
_this._listRecurringDetails = new ListRecurringDetails(_this);
|
||||
_this._disable = new Disable(_this);
|
||||
return _this;
|
||||
}
|
||||
Recurring.prototype.listRecurringDetails = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._listRecurringDetails, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Recurring.prototype.disable = function (request) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, getJsonResponse(this._disable, request)];
|
||||
case 1: return [2 /*return*/, _a.sent()];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Recurring;
|
||||
}(Service));
|
||||
export default Recurring;
|
||||
//# sourceMappingURL=recurring.js.map
|
||||
1
dist/lib-esm/service/recurring.js.map
vendored
Normal file
1
dist/lib-esm/service/recurring.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"recurring.js","sourceRoot":"","sources":["../../../src/service/recurring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,OAAO,MAAM,8BAA8B,CAAC;AACnD,OAAO,oBAAoB,MAAM,2CAA2C,CAAC;AAE7E;IAAwB,6BAAO;IAI3B,mBAAmB,MAAc;QAAjC,YACI,kBAAM,MAAM,CAAC,SAGhB;QAFG,KAAI,CAAC,qBAAqB,GAAG,IAAI,oBAAoB,CAAC,KAAI,CAAC,CAAC;QAC5D,KAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAC,KAAI,CAAC,CAAC;;IACtC,CAAC;IAEY,wCAAoB,GAAjC,UAAkC,OAAgC;;;;4BACvD,qBAAM,eAAe,CACxB,IAAI,CAAC,qBAAqB,EAC1B,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IAEY,2BAAO,GAApB,UAAqB,OAAuB;;;;4BACjC,qBAAM,eAAe,CACxB,IAAI,CAAC,QAAQ,EACb,OAAO,CACV,EAAA;4BAHD,sBAAO,SAGN,EAAC;;;;KACL;IACL,gBAAC;AAAD,CAAC,AAvBD,CAAwB,OAAO,GAuB9B;AAED,eAAe,SAAS,CAAC"}
|
||||
9
dist/lib-esm/service/resource.d.ts
vendored
Normal file
9
dist/lib-esm/service/resource.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import Service from "../service";
|
||||
import { RequestOptions } from "../typings/requestOptions";
|
||||
declare class Resource {
|
||||
protected endpoint: string;
|
||||
private service;
|
||||
constructor(service: Service, endpoint: string);
|
||||
request(json: string, requestOptions?: RequestOptions): Promise<string>;
|
||||
}
|
||||
export default Resource;
|
||||
95
dist/lib-esm/service/resource.js
vendored
Normal file
95
dist/lib-esm/service/resource.js
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
import ApiException from "./exception/apiException";
|
||||
var Resource = /** @class */ (function () {
|
||||
function Resource(service, endpoint) {
|
||||
this.service = service;
|
||||
this.endpoint = endpoint;
|
||||
}
|
||||
Resource.prototype.request = function (json, requestOptions) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var clientInterface, config, responseBody, apiException, e_1;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
clientInterface = this.service.client.httpClient;
|
||||
config = this.service.client.config;
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
_a.trys.push([1, 3, , 4]);
|
||||
return [4 /*yield*/, clientInterface.request(this.endpoint, json, config, this.service.apiKeyRequired, requestOptions)];
|
||||
case 2: return [2 /*return*/, _a.sent()];
|
||||
case 3:
|
||||
e_1 = _a.sent();
|
||||
responseBody = e_1.responseBody;
|
||||
apiException = new ApiException(e_1.message, e_1.code);
|
||||
return [3 /*break*/, 4];
|
||||
case 4:
|
||||
try {
|
||||
apiException.error = responseBody;
|
||||
}
|
||||
catch (e) {
|
||||
throw new ApiException("Invalid response or an invalid X-API-Key key was used", e.statusCode);
|
||||
}
|
||||
throw apiException;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return Resource;
|
||||
}());
|
||||
export default Resource;
|
||||
//# sourceMappingURL=resource.js.map
|
||||
1
dist/lib-esm/service/resource.js.map
vendored
Normal file
1
dist/lib-esm/service/resource.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../../../src/service/resource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMH,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD;IAII,kBAAmB,OAAgB,EAAE,QAAgB;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAEY,0BAAO,GAApB,UAAqB,IAAY,EAAE,cAA+B;;;;;;wBACxD,eAAe,GAAoB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;wBAClE,MAAM,GAAW,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;;;;wBAKvC,qBAAM,eAAe,CAAC,OAAO,CAChC,IAAI,CAAC,QAAQ,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,OAAO,CAAC,cAAc,EAC3B,cAAc,CACjB,EAAA;4BALD,sBAAO,SAKN,EAAC;;;wBAEF,YAAY,GAAG,GAAC,CAAC,YAAY,CAAC;wBAC9B,YAAY,GAAG,IAAI,YAAY,CAAC,GAAC,CAAC,OAAO,EAAE,GAAC,CAAC,IAAI,CAAC,CAAC;;;wBAGvD,IAAI;4BACA,YAAY,CAAC,KAAK,GAAG,YAAY,CAAC;yBACrC;wBAAC,OAAO,CAAC,EAAE;4BACR,MAAM,IAAI,YAAY,CAAC,uDAAuD,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC;yBACjG;wBAED,MAAM,YAAY,CAAC;;;;KACtB;IACL,eAAC;AAAD,CAAC,AAnCD,IAmCC;AAED,eAAe,QAAQ,CAAC"}
|
||||
6
dist/lib-esm/service/resource/binLookup/get3dsAvailability.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/binLookup/get3dsAvailability.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
declare class Get3dsAvailability extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default Get3dsAvailability;
|
||||
44
dist/lib-esm/service/resource/binLookup/get3dsAvailability.js
vendored
Normal file
44
dist/lib-esm/service/resource/binLookup/get3dsAvailability.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Resource from "../../resource";
|
||||
import Client from "../../../client";
|
||||
var Get3dsAvailability = /** @class */ (function (_super) {
|
||||
__extends(Get3dsAvailability, _super);
|
||||
function Get3dsAvailability(service) {
|
||||
return _super.call(this, service, "" + service.client.config.endpoint + Client.BIN_LOOKUP_PAL_SUFFIX + Client.BIN_LOOKUP_API_VERSION + "/get3dsAvailability") || this;
|
||||
}
|
||||
return Get3dsAvailability;
|
||||
}(Resource));
|
||||
export default Get3dsAvailability;
|
||||
//# sourceMappingURL=get3dsAvailability.js.map
|
||||
1
dist/lib-esm/service/resource/binLookup/get3dsAvailability.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/binLookup/get3dsAvailability.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"get3dsAvailability.js","sourceRoot":"","sources":["../../../../../src/service/resource/binLookup/get3dsAvailability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC;IAAiC,sCAAQ;IACrC,4BAAmB,OAAgB;eAC/B,kBACI,OAAO,EACP,KAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,sBAAsB,wBAAqB,CACxH;IACL,CAAC;IACL,yBAAC;AAAD,CAAC,AAPD,CAAiC,QAAQ,GAOxC;AAED,eAAe,kBAAkB,CAAC"}
|
||||
6
dist/lib-esm/service/resource/binLookup/getCostEstimate.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/binLookup/getCostEstimate.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
declare class GetCostEstimate extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default GetCostEstimate;
|
||||
44
dist/lib-esm/service/resource/binLookup/getCostEstimate.js
vendored
Normal file
44
dist/lib-esm/service/resource/binLookup/getCostEstimate.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Resource from "../../resource";
|
||||
import Client from "../../../client";
|
||||
var GetCostEstimate = /** @class */ (function (_super) {
|
||||
__extends(GetCostEstimate, _super);
|
||||
function GetCostEstimate(service) {
|
||||
return _super.call(this, service, "" + service.client.config.endpoint + Client.BIN_LOOKUP_PAL_SUFFIX + Client.BIN_LOOKUP_API_VERSION + "/getCostEstimate") || this;
|
||||
}
|
||||
return GetCostEstimate;
|
||||
}(Resource));
|
||||
export default GetCostEstimate;
|
||||
//# sourceMappingURL=getCostEstimate.js.map
|
||||
1
dist/lib-esm/service/resource/binLookup/getCostEstimate.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/binLookup/getCostEstimate.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getCostEstimate.js","sourceRoot":"","sources":["../../../../../src/service/resource/binLookup/getCostEstimate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC;IAA8B,mCAAQ;IAClC,yBAAmB,OAAgB;eAC/B,kBACI,OAAO,EACP,KAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,sBAAsB,qBAAkB,CACrH;IACL,CAAC;IACL,sBAAC;AAAD,CAAC,AAPD,CAA8B,QAAQ,GAOrC;AAED,eAAe,eAAe,CAAC"}
|
||||
6
dist/lib-esm/service/resource/checkout/paymentMethods.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/checkout/paymentMethods.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
declare class PaymentMethods extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default PaymentMethods;
|
||||
44
dist/lib-esm/service/resource/checkout/paymentMethods.js
vendored
Normal file
44
dist/lib-esm/service/resource/checkout/paymentMethods.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Client from "../../../client";
|
||||
import Resource from "../../resource";
|
||||
var PaymentMethods = /** @class */ (function (_super) {
|
||||
__extends(PaymentMethods, _super);
|
||||
function PaymentMethods(service) {
|
||||
return _super.call(this, service, service.client.config.checkoutEndpoint + "/" + Client.CHECKOUT_API_VERSION + "/paymentMethods") || this;
|
||||
}
|
||||
return PaymentMethods;
|
||||
}(Resource));
|
||||
export default PaymentMethods;
|
||||
//# sourceMappingURL=paymentMethods.js.map
|
||||
1
dist/lib-esm/service/resource/checkout/paymentMethods.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/checkout/paymentMethods.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"paymentMethods.js","sourceRoot":"","sources":["../../../../../src/service/resource/checkout/paymentMethods.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAEH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;IAA6B,kCAAQ;IACjC,wBAAmB,OAAgB;eAC/B,kBACI,OAAO,EACJ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,SAAI,MAAM,CAAC,oBAAoB,oBAAiB,CAC5F;IACL,CAAC;IACL,qBAAC;AAAD,CAAC,AAPD,CAA6B,QAAQ,GAOpC;AAED,eAAe,cAAc,CAAC"}
|
||||
6
dist/lib-esm/service/resource/checkout/paymentSession.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/checkout/paymentSession.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
declare class PaymentSession extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default PaymentSession;
|
||||
44
dist/lib-esm/service/resource/checkout/paymentSession.js
vendored
Normal file
44
dist/lib-esm/service/resource/checkout/paymentSession.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Client from "../../../client";
|
||||
import Resource from "../../resource";
|
||||
var PaymentSession = /** @class */ (function (_super) {
|
||||
__extends(PaymentSession, _super);
|
||||
function PaymentSession(service) {
|
||||
return _super.call(this, service, service.client.config.checkoutEndpoint + "/" + Client.CHECKOUT_API_VERSION + "/paymentSession") || this;
|
||||
}
|
||||
return PaymentSession;
|
||||
}(Resource));
|
||||
export default PaymentSession;
|
||||
//# sourceMappingURL=paymentSession.js.map
|
||||
1
dist/lib-esm/service/resource/checkout/paymentSession.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/checkout/paymentSession.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"paymentSession.js","sourceRoot":"","sources":["../../../../../src/service/resource/checkout/paymentSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAEH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;IAA6B,kCAAQ;IACjC,wBAAmB,OAAgB;eAC/B,kBACI,OAAO,EACJ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,SAAI,MAAM,CAAC,oBAAoB,oBAAiB,CAC5F;IACL,CAAC;IACL,qBAAC;AAAD,CAAC,AAPD,CAA6B,QAAQ,GAOpC;AAED,eAAe,cAAc,CAAC"}
|
||||
6
dist/lib-esm/service/resource/checkout/payments.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/checkout/payments.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
declare class Payments extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default Payments;
|
||||
44
dist/lib-esm/service/resource/checkout/payments.js
vendored
Normal file
44
dist/lib-esm/service/resource/checkout/payments.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Client from "../../../client";
|
||||
import Resource from "../../resource";
|
||||
var Payments = /** @class */ (function (_super) {
|
||||
__extends(Payments, _super);
|
||||
function Payments(service) {
|
||||
return _super.call(this, service, service.client.config.checkoutEndpoint + "/" + Client.CHECKOUT_API_VERSION + "/payments") || this;
|
||||
}
|
||||
return Payments;
|
||||
}(Resource));
|
||||
export default Payments;
|
||||
//# sourceMappingURL=payments.js.map
|
||||
1
dist/lib-esm/service/resource/checkout/payments.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/checkout/payments.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"payments.js","sourceRoot":"","sources":["../../../../../src/service/resource/checkout/payments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAEH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;IAAuB,4BAAQ;IAC3B,kBAAmB,OAAgB;eAC/B,kBACI,OAAO,EACJ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,SAAI,MAAM,CAAC,oBAAoB,cAAW,CACtF;IACL,CAAC;IACL,eAAC;AAAD,CAAC,AAPD,CAAuB,QAAQ,GAO9B;AAED,eAAe,QAAQ,CAAC"}
|
||||
6
dist/lib-esm/service/resource/checkout/paymentsDetails.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/checkout/paymentsDetails.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
declare class PaymentsDetails extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default PaymentsDetails;
|
||||
44
dist/lib-esm/service/resource/checkout/paymentsDetails.js
vendored
Normal file
44
dist/lib-esm/service/resource/checkout/paymentsDetails.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Client from "../../../client";
|
||||
import Resource from "../../resource";
|
||||
var PaymentsDetails = /** @class */ (function (_super) {
|
||||
__extends(PaymentsDetails, _super);
|
||||
function PaymentsDetails(service) {
|
||||
return _super.call(this, service, service.client.config.checkoutEndpoint + "/" + Client.CHECKOUT_API_VERSION + "/payments/details") || this;
|
||||
}
|
||||
return PaymentsDetails;
|
||||
}(Resource));
|
||||
export default PaymentsDetails;
|
||||
//# sourceMappingURL=paymentsDetails.js.map
|
||||
1
dist/lib-esm/service/resource/checkout/paymentsDetails.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/checkout/paymentsDetails.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"paymentsDetails.js","sourceRoot":"","sources":["../../../../../src/service/resource/checkout/paymentsDetails.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAEH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;IAA8B,mCAAQ;IAClC,yBAAmB,OAAgB;eAC/B,kBACI,OAAO,EACJ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,SAAI,MAAM,CAAC,oBAAoB,sBAAmB,CAC9F;IACL,CAAC;IACL,sBAAC;AAAD,CAAC,AAPD,CAA8B,QAAQ,GAOrC;AAED,eAAe,eAAe,CAAC"}
|
||||
6
dist/lib-esm/service/resource/checkout/paymentsResult.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/checkout/paymentsResult.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
declare class PaymentsResult extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default PaymentsResult;
|
||||
44
dist/lib-esm/service/resource/checkout/paymentsResult.js
vendored
Normal file
44
dist/lib-esm/service/resource/checkout/paymentsResult.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Client from "../../../client";
|
||||
import Resource from "../../resource";
|
||||
var PaymentsResult = /** @class */ (function (_super) {
|
||||
__extends(PaymentsResult, _super);
|
||||
function PaymentsResult(service) {
|
||||
return _super.call(this, service, service.client.config.checkoutEndpoint + "/" + Client.CHECKOUT_API_VERSION + "/payments/result") || this;
|
||||
}
|
||||
return PaymentsResult;
|
||||
}(Resource));
|
||||
export default PaymentsResult;
|
||||
//# sourceMappingURL=paymentsResult.js.map
|
||||
1
dist/lib-esm/service/resource/checkout/paymentsResult.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/checkout/paymentsResult.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"paymentsResult.js","sourceRoot":"","sources":["../../../../../src/service/resource/checkout/paymentsResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAEH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;IAA6B,kCAAQ;IACjC,wBAAmB,OAAgB;eAC/B,kBACI,OAAO,EACJ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,SAAI,MAAM,CAAC,oBAAoB,qBAAkB,CAC7F;IACL,CAAC;IACL,qBAAC;AAAD,CAAC,AAPD,CAA6B,QAAQ,GAOpC;AAED,eAAe,cAAc,CAAC"}
|
||||
6
dist/lib-esm/service/resource/checkoutUtility/originKeys.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/checkoutUtility/originKeys.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
declare class OriginKeys extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default OriginKeys;
|
||||
44
dist/lib-esm/service/resource/checkoutUtility/originKeys.js
vendored
Normal file
44
dist/lib-esm/service/resource/checkoutUtility/originKeys.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import Client from "../../../client";
|
||||
import Resource from "../../resource";
|
||||
var OriginKeys = /** @class */ (function (_super) {
|
||||
__extends(OriginKeys, _super);
|
||||
function OriginKeys(service) {
|
||||
return _super.call(this, service, service.client.config.checkoutEndpoint + "/" + Client.CHECKOUT_UTILITY_API_VERSION + "/originKeys") || this;
|
||||
}
|
||||
return OriginKeys;
|
||||
}(Resource));
|
||||
export default OriginKeys;
|
||||
//# sourceMappingURL=originKeys.js.map
|
||||
1
dist/lib-esm/service/resource/checkoutUtility/originKeys.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/checkoutUtility/originKeys.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"originKeys.js","sourceRoot":"","sources":["../../../../../src/service/resource/checkoutUtility/originKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAEH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;IAAyB,8BAAQ;IAC7B,oBAAmB,OAAgB;eAC/B,kBACI,OAAO,EACJ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,SAAI,MAAM,CAAC,4BAA4B,gBAAa,CAChG;IACL,CAAC;IACL,iBAAC;AAAD,CAAC,AAPD,CAAyB,QAAQ,GAOhC;AAED,eAAe,UAAU,CAAC"}
|
||||
6
dist/lib-esm/service/resource/modification/adjustAuthorisation.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/modification/adjustAuthorisation.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
declare class AdjustAuthorisation extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default AdjustAuthorisation;
|
||||
44
dist/lib-esm/service/resource/modification/adjustAuthorisation.js
vendored
Normal file
44
dist/lib-esm/service/resource/modification/adjustAuthorisation.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import Client from "../../../client";
|
||||
import Resource from "../../resource";
|
||||
var AdjustAuthorisation = /** @class */ (function (_super) {
|
||||
__extends(AdjustAuthorisation, _super);
|
||||
function AdjustAuthorisation(service) {
|
||||
return _super.call(this, service, service.client.config.endpoint + "/pal/servlet/Payment/" + Client.API_VERSION + "/adjustAuthorisation") || this;
|
||||
}
|
||||
return AdjustAuthorisation;
|
||||
}(Resource));
|
||||
export default AdjustAuthorisation;
|
||||
//# sourceMappingURL=adjustAuthorisation.js.map
|
||||
1
dist/lib-esm/service/resource/modification/adjustAuthorisation.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/modification/adjustAuthorisation.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"adjustAuthorisation.js","sourceRoot":"","sources":["../../../../../src/service/resource/modification/adjustAuthorisation.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;IAAkC,uCAAQ;IACtC,6BAAmB,OAAgB;eAC/B,kBACI,OAAO,EACJ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,6BAAwB,MAAM,CAAC,WAAW,yBAAsB,CACpG;IACL,CAAC;IACL,0BAAC;AAAD,CAAC,AAPD,CAAkC,QAAQ,GAOzC;AAED,eAAe,mBAAmB,CAAC"}
|
||||
6
dist/lib-esm/service/resource/modification/cancel.d.ts
vendored
Normal file
6
dist/lib-esm/service/resource/modification/cancel.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
declare class Cancel extends Resource {
|
||||
constructor(service: Service);
|
||||
}
|
||||
export default Cancel;
|
||||
44
dist/lib-esm/service/resource/modification/cancel.js
vendored
Normal file
44
dist/lib-esm/service/resource/modification/cancel.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
*
|
||||
* Adyen NodeJS API Library
|
||||
*
|
||||
* Copyright (c) 2019 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import Client from "../../../client";
|
||||
import Resource from "../../resource";
|
||||
var Cancel = /** @class */ (function (_super) {
|
||||
__extends(Cancel, _super);
|
||||
function Cancel(service) {
|
||||
return _super.call(this, service, service.client.config.endpoint + "/pal/servlet/Payment/" + Client.API_VERSION + "/cancel") || this;
|
||||
}
|
||||
return Cancel;
|
||||
}(Resource));
|
||||
export default Cancel;
|
||||
//# sourceMappingURL=cancel.js.map
|
||||
1
dist/lib-esm/service/resource/modification/cancel.js.map
vendored
Normal file
1
dist/lib-esm/service/resource/modification/cancel.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../../../src/service/resource/modification/cancel.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC;IAAqB,0BAAQ;IACzB,gBAAmB,OAAgB;eAC/B,kBACI,OAAO,EACJ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,6BAAwB,MAAM,CAAC,WAAW,YAAS,CACvF;IACL,CAAC;IACL,aAAC;AAAD,CAAC,AAPD,CAAqB,QAAQ,GAO5B;AAED,eAAe,MAAM,CAAC"}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user